77package polykeyv2
88
99import (
10+ v2 "github.com/spounge-ai/spounge-proto/gen/go/common/v2"
1011 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
1112 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
1213 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
@@ -89,7 +90,7 @@ type AuthenticateResponse struct {
8990 ExpiresIn int64 `protobuf:"varint,3,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // Token TTL in seconds
9091 Permissions []string `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"` // ["secrets:read", "secrets:write"]
9192 IssuedAt * timestamppb.Timestamp `protobuf:"bytes,5,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"`
92- ServiceTier ClientTier `protobuf:"varint,6,opt,name=service_tier ,json=serviceTier ,proto3,enum=polykey .v2.ClientTier" json:"service_tier ,omitempty"`
93+ ClientTier v2. ClientTier `protobuf:"varint,6,opt,name=client_tier ,json=clientTier ,proto3,enum=common .v2.ClientTier" json:"client_tier ,omitempty"`
9394 unknownFields protoimpl.UnknownFields
9495 sizeCache protoimpl.SizeCache
9596}
@@ -159,11 +160,11 @@ func (x *AuthenticateResponse) GetIssuedAt() *timestamppb.Timestamp {
159160 return nil
160161}
161162
162- func (x * AuthenticateResponse ) GetServiceTier () ClientTier {
163+ func (x * AuthenticateResponse ) GetClientTier () v2. ClientTier {
163164 if x != nil {
164- return x .ServiceTier
165+ return x .ClientTier
165166 }
166- return ClientTier_CLIENT_TIER_UNSPECIFIED
167+ return v2 . ClientTier ( 0 )
167168}
168169
169170type RefreshTokenRequest struct {
@@ -391,7 +392,7 @@ type ClientInfo struct {
391392 Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` // "dev", "staging", "prod"
392393 CreatedAt * timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
393394 LastUsedAt * timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"`
394- ServiceTier ClientTier `protobuf:"varint,7,opt,name=service_tier ,json=serviceTier ,proto3,enum=polykey .v2.ClientTier" json:"service_tier ,omitempty"`
395+ ClientTier v2. ClientTier `protobuf:"varint,7,opt,name=client_tier ,json=clientTier ,proto3,enum=common .v2.ClientTier" json:"client_tier ,omitempty"`
395396 unknownFields protoimpl.UnknownFields
396397 sizeCache protoimpl.SizeCache
397398}
@@ -468,33 +469,34 @@ func (x *ClientInfo) GetLastUsedAt() *timestamppb.Timestamp {
468469 return nil
469470}
470471
471- func (x * ClientInfo ) GetServiceTier () ClientTier {
472+ func (x * ClientInfo ) GetClientTier () v2. ClientTier {
472473 if x != nil {
473- return x .ServiceTier
474+ return x .ClientTier
474475 }
475- return ClientTier_CLIENT_TIER_UNSPECIFIED
476+ return v2 . ClientTier ( 0 )
476477}
477478
478479var File_polykey_v2_auth_proto protoreflect.FileDescriptor
479480
480481const file_polykey_v2_auth_proto_rawDesc = "" +
481482 "\n " +
482483 "\x15 polykey/v2/auth.proto\x12 \n " +
483- "polykey.v2\x1a \x1f google/protobuf/timestamp.proto\x1a \x17 polykey /v2/common.proto\" j\n " +
484+ "polykey.v2\x1a \x1f google/protobuf/timestamp.proto\x1a \x16 common /v2/common.proto\" j\n " +
484485 "\x13 AuthenticateRequest\x12 \x1b \n " +
485486 "\t client_id\x18 \x01 \x01 (\t R\b clientId\x12 \x17 \n " +
486487 "\a api_key\x18 \x02 \x01 (\t R\x06 apiKey\x12 \x1d \n " +
487488 "\n " +
488- "grant_type\x18 \x03 \x01 (\t R\t grantType\" \x8d \x02 \n " +
489+ "grant_type\x18 \x03 \x01 (\t R\t grantType\" \x8a \x02 \n " +
489490 "\x14 AuthenticateResponse\x12 !\n " +
490491 "\f access_token\x18 \x01 \x01 (\t R\v accessToken\x12 \x1d \n " +
491492 "\n " +
492493 "token_type\x18 \x02 \x01 (\t R\t tokenType\x12 \x1d \n " +
493494 "\n " +
494495 "expires_in\x18 \x03 \x01 (\x03 R\t expiresIn\x12 \n " +
495496 "\v permissions\x18 \x04 \x03 (\t R\v permissions\x12 7\n " +
496- "\t issued_at\x18 \x05 \x01 (\v 2\x1a .google.protobuf.TimestampR\b issuedAt\x12 9\n " +
497- "\f service_tier\x18 \x06 \x01 (\x0e 2\x16 .polykey.v2.ClientTierR\v serviceTier\" :\n " +
497+ "\t issued_at\x18 \x05 \x01 (\v 2\x1a .google.protobuf.TimestampR\b issuedAt\x12 6\n " +
498+ "\v client_tier\x18 \x06 \x01 (\x0e 2\x15 .common.v2.ClientTierR\n " +
499+ "clientTier\" :\n " +
498500 "\x13 RefreshTokenRequest\x12 #\n " +
499501 "\r refresh_token\x18 \x01 \x01 (\t R\f refreshToken\" \xb0 \x01 \n " +
500502 "\x14 RefreshTokenResponse\x12 !\n " +
@@ -510,7 +512,7 @@ const file_polykey_v2_auth_proto_rawDesc = "" +
510512 "\x13 RevokeTokenResponse\x12 \x18 \n " +
511513 "\a revoked\x18 \x01 \x01 (\b R\a revoked\x12 9\n " +
512514 "\n " +
513- "revoked_at\x18 \x02 \x01 (\v 2\x1a .google.protobuf.TimestampR\t revokedAt\" \xc2 \x02 \n " +
515+ "revoked_at\x18 \x02 \x01 (\v 2\x1a .google.protobuf.TimestampR\t revokedAt\" \xbf \x02 \n " +
514516 "\n " +
515517 "ClientInfo\x12 \x1b \n " +
516518 "\t client_id\x18 \x01 \x01 (\t R\b clientId\x12 \x1f \n " +
@@ -521,8 +523,9 @@ const file_polykey_v2_auth_proto_rawDesc = "" +
521523 "\n " +
522524 "created_at\x18 \x05 \x01 (\v 2\x1a .google.protobuf.TimestampR\t createdAt\x12 <\n " +
523525 "\f last_used_at\x18 \x06 \x01 (\v 2\x1a .google.protobuf.TimestampR\n " +
524- "lastUsedAt\x12 9\n " +
525- "\f service_tier\x18 \a \x01 (\x0e 2\x16 .polykey.v2.ClientTierR\v serviceTierB\xa5 \x01 \n " +
526+ "lastUsedAt\x12 6\n " +
527+ "\v client_tier\x18 \a \x01 (\x0e 2\x15 .common.v2.ClientTierR\n " +
528+ "clientTierB\xa5 \x01 \n " +
526529 "\x0e com.polykey.v2B\t AuthProtoP\x01 Z?github.com/spounge-ai/spounge-proto/gen/go/polykey/v2;polykeyv2\xa2 \x02 \x03 PXX\xaa \x02 \n " +
527530 "Polykey.V2\xca \x02 \n " +
528531 "Polykey\\ V2\xe2 \x02 \x16 Polykey\\ V2\\ GPBMetadata\xea \x02 \v Polykey::V2b\x06 proto3"
@@ -549,16 +552,16 @@ var file_polykey_v2_auth_proto_goTypes = []any{
549552 (* RevokeTokenResponse )(nil ), // 5: polykey.v2.RevokeTokenResponse
550553 (* ClientInfo )(nil ), // 6: polykey.v2.ClientInfo
551554 (* timestamppb .Timestamp )(nil ), // 7: google.protobuf.Timestamp
552- (ClientTier )(0 ), // 8: polykey .v2.ClientTier
555+ (v2 . ClientTier )(0 ), // 8: common .v2.ClientTier
553556}
554557var file_polykey_v2_auth_proto_depIdxs = []int32 {
555558 7 , // 0: polykey.v2.AuthenticateResponse.issued_at:type_name -> google.protobuf.Timestamp
556- 8 , // 1: polykey.v2.AuthenticateResponse.service_tier :type_name -> polykey .v2.ClientTier
559+ 8 , // 1: polykey.v2.AuthenticateResponse.client_tier :type_name -> common .v2.ClientTier
557560 7 , // 2: polykey.v2.RefreshTokenResponse.issued_at:type_name -> google.protobuf.Timestamp
558561 7 , // 3: polykey.v2.RevokeTokenResponse.revoked_at:type_name -> google.protobuf.Timestamp
559562 7 , // 4: polykey.v2.ClientInfo.created_at:type_name -> google.protobuf.Timestamp
560563 7 , // 5: polykey.v2.ClientInfo.last_used_at:type_name -> google.protobuf.Timestamp
561- 8 , // 6: polykey.v2.ClientInfo.service_tier :type_name -> polykey .v2.ClientTier
564+ 8 , // 6: polykey.v2.ClientInfo.client_tier :type_name -> common .v2.ClientTier
562565 7 , // [7:7] is the sub-list for method output_type
563566 7 , // [7:7] is the sub-list for method input_type
564567 7 , // [7:7] is the sub-list for extension type_name
@@ -571,7 +574,6 @@ func file_polykey_v2_auth_proto_init() {
571574 if File_polykey_v2_auth_proto != nil {
572575 return
573576 }
574- file_polykey_v2_common_proto_init ()
575577 type x struct {}
576578 out := protoimpl.TypeBuilder {
577579 File : protoimpl.DescBuilder {
0 commit comments