diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2dd879b --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +.PHONY: generate install-tools + +# Generate protobuf files +generate: + buf generate --template buf.gen.yaml proto --verbose + +# Install required tools +install-tools: + go install github.com/bufbuild/buf/cmd/buf@latest + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.6 + go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest \ No newline at end of file diff --git a/buf.gen.yaml b/buf.gen.yaml index 742ba94..17173fd 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -23,4 +23,5 @@ types: - scalekit.v1.organizations - scalekit.v1.directories - scalekit.v1.users - - scalekit.v1.auth.passwordless \ No newline at end of file + - scalekit.v1.auth.passwordless + - scalekit.v1.connected_accounts \ No newline at end of file diff --git a/connected_account.go b/connected_account.go new file mode 100644 index 0000000..11977a1 --- /dev/null +++ b/connected_account.go @@ -0,0 +1,265 @@ +package scalekit + +import ( + "context" + "errors" + + connectedAccountsv1 "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/connected_accounts" + "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/connected_accounts/connected_accountsconnect" +) + +type ListConnectedAccountsResponse = connectedAccountsv1.ListConnectedAccountsResponse +type CreateConnectedAccountResponse = connectedAccountsv1.CreateConnectedAccountResponse +type UpdateConnectedAccountResponse = connectedAccountsv1.UpdateConnectedAccountResponse +type DeleteConnectedAccountResponse = connectedAccountsv1.DeleteConnectedAccountResponse +type GetMagicLinkForConnectedAccountResponse = connectedAccountsv1.GetMagicLinkForConnectedAccountResponse +type GetConnectedAccountByIdentifierResponse = connectedAccountsv1.GetConnectedAccountByIdentifierResponse + +type ListConnectedAccountsOptions struct { + OrganizationId *string + UserId *string + Connector *string + Identifier *string + Provider *string + PageSize uint32 + PageToken string + Query string +} + +type CreateConnectedAccountOptions struct { + OrganizationId *string + UserId *string + Connector *string + Identifier *string + ConnectedAccount *connectedAccountsv1.CreateConnectedAccount +} + +type UpdateConnectedAccountOptions struct { + OrganizationId *string + UserId *string + Connector *string + Identifier *string + Id *string + ConnectedAccount *connectedAccountsv1.UpdateConnectedAccount +} + +type DeleteConnectedAccountOptions struct { + OrganizationId *string + UserId *string + Connector *string + Identifier *string + Id *string +} + +type MagicLinkOptions struct { + OrganizationId *string + UserId *string + Connector *string + Identifier *string + Id *string +} + +type GetConnectedAccountAuthOptions struct { + OrganizationId *string + UserId *string + Connector *string + Identifier *string + Id *string +} + +type ConnectedAccount interface { + ListConnectedAccounts(ctx context.Context, options *ListConnectedAccountsOptions) (*ListConnectedAccountsResponse, error) + CreateConnectedAccount(ctx context.Context, options *CreateConnectedAccountOptions) (*CreateConnectedAccountResponse, error) + UpdateConnectedAccount(ctx context.Context, options *UpdateConnectedAccountOptions) (*UpdateConnectedAccountResponse, error) + DeleteConnectedAccount(ctx context.Context, options *DeleteConnectedAccountOptions) (*DeleteConnectedAccountResponse, error) + GetMagicLinkForConnectedAccount(ctx context.Context, options *MagicLinkOptions) (*GetMagicLinkForConnectedAccountResponse, error) + GetConnectedAccountAuth(ctx context.Context, options *GetConnectedAccountAuthOptions) (*GetConnectedAccountByIdentifierResponse, error) +} + +type connectedAccount struct { + coreClient *coreClient + client connected_accountsconnect.ConnectedAccountServiceClient +} + +func newConnectedAccountClient(coreClient *coreClient) ConnectedAccount { + return &connectedAccount{ + coreClient: coreClient, + client: newConnectClient(coreClient, connected_accountsconnect.NewConnectedAccountServiceClient), + } +} + +func (ca *connectedAccount) ListConnectedAccounts(ctx context.Context, options *ListConnectedAccountsOptions) (*ListConnectedAccountsResponse, error) { + requestData := &connectedAccountsv1.ListConnectedAccountsRequest{} + + if options != nil { + if options.OrganizationId != nil { + requestData.OrganizationId = options.OrganizationId + } + if options.UserId != nil { + requestData.UserId = options.UserId + } + if options.Connector != nil { + requestData.Connector = options.Connector + } + if options.Identifier != nil { + requestData.Identifier = options.Identifier + } + if options.Provider != nil { + requestData.Provider = *options.Provider + } + requestData.PageSize = options.PageSize + requestData.PageToken = options.PageToken + requestData.Query = options.Query + } + + return newConnectExecuter( + ca.coreClient, + ca.client.ListConnectedAccounts, + requestData, + ).exec(ctx) +} + +func (ca *connectedAccount) CreateConnectedAccount(ctx context.Context, options *CreateConnectedAccountOptions) (*CreateConnectedAccountResponse, error) { + if options == nil || options.ConnectedAccount == nil { + return nil, errors.New("connected account data is required") + } + + requestData := &connectedAccountsv1.CreateConnectedAccountRequest{ + ConnectedAccount: options.ConnectedAccount, + } + + if options.OrganizationId != nil { + requestData.OrganizationId = options.OrganizationId + } + if options.UserId != nil { + requestData.UserId = options.UserId + } + if options.Connector != nil { + requestData.Connector = options.Connector + } + if options.Identifier != nil { + requestData.Identifier = options.Identifier + } + + return newConnectExecuter( + ca.coreClient, + ca.client.CreateConnectedAccount, + requestData, + ).exec(ctx) +} + +func (ca *connectedAccount) UpdateConnectedAccount(ctx context.Context, options *UpdateConnectedAccountOptions) (*UpdateConnectedAccountResponse, error) { + if options == nil || options.ConnectedAccount == nil { + return nil, errors.New("connected account data is required") + } + + requestData := &connectedAccountsv1.UpdateConnectedAccountRequest{ + ConnectedAccount: options.ConnectedAccount, + } + + if options.OrganizationId != nil { + requestData.OrganizationId = options.OrganizationId + } + if options.UserId != nil { + requestData.UserId = options.UserId + } + if options.Connector != nil { + requestData.Connector = options.Connector + } + if options.Identifier != nil { + requestData.Identifier = options.Identifier + } + if options.Id != nil { + requestData.Id = options.Id + } + + return newConnectExecuter( + ca.coreClient, + ca.client.UpdateConnectedAccount, + requestData, + ).exec(ctx) +} + +func (ca *connectedAccount) DeleteConnectedAccount(ctx context.Context, options *DeleteConnectedAccountOptions) (*DeleteConnectedAccountResponse, error) { + requestData := &connectedAccountsv1.DeleteConnectedAccountRequest{} + + if options != nil { + if options.OrganizationId != nil { + requestData.OrganizationId = options.OrganizationId + } + if options.UserId != nil { + requestData.UserId = options.UserId + } + if options.Connector != nil { + requestData.Connector = options.Connector + } + if options.Identifier != nil { + requestData.Identifier = options.Identifier + } + if options.Id != nil { + requestData.Id = options.Id + } + } + + return newConnectExecuter( + ca.coreClient, + ca.client.DeleteConnectedAccount, + requestData, + ).exec(ctx) +} + +func (ca *connectedAccount) GetMagicLinkForConnectedAccount(ctx context.Context, options *MagicLinkOptions) (*GetMagicLinkForConnectedAccountResponse, error) { + requestData := &connectedAccountsv1.GetMagicLinkForConnectedAccountRequest{} + + if options != nil { + if options.OrganizationId != nil { + requestData.OrganizationId = options.OrganizationId + } + if options.UserId != nil { + requestData.UserId = options.UserId + } + if options.Connector != nil { + requestData.Connector = options.Connector + } + if options.Identifier != nil { + requestData.Identifier = options.Identifier + } + if options.Id != nil { + requestData.Id = options.Id + } + } + + return newConnectExecuter( + ca.coreClient, + ca.client.GetMagicLinkForConnectedAccount, + requestData, + ).exec(ctx) +} + +func (ca *connectedAccount) GetConnectedAccountAuth(ctx context.Context, options *GetConnectedAccountAuthOptions) (*GetConnectedAccountByIdentifierResponse, error) { + requestData := &connectedAccountsv1.GetConnectedAccountByIdentifierRequest{} + + if options != nil { + if options.OrganizationId != nil { + requestData.OrganizationId = options.OrganizationId + } + if options.UserId != nil { + requestData.UserId = options.UserId + } + if options.Connector != nil { + requestData.Connector = options.Connector + } + if options.Identifier != nil { + requestData.Identifier = options.Identifier + } + if options.Id != nil { + requestData.Id = options.Id + } + } + + return newConnectExecuter( + ca.coreClient, + ca.client.GetConnectedAccountAuth, + requestData, + ).exec(ctx) +} diff --git a/pkg/grpc/scalekit/v1/auth/passwordless.pb.go b/pkg/grpc/scalekit/v1/auth/passwordless.pb.go index e9b0af5..f4f9afc 100644 --- a/pkg/grpc/scalekit/v1/auth/passwordless.pb.go +++ b/pkg/grpc/scalekit/v1/auth/passwordless.pb.go @@ -7,6 +7,7 @@ package auth import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -483,7 +484,7 @@ var File_scalekit_v1_auth_passwordless_proto protoreflect.FileDescriptor const file_scalekit_v1_auth_passwordless_proto_rawDesc = "" + "\n" + - "#scalekit/v1/auth/passwordless.proto\x12\x1dscalekit.v1.auth.passwordless\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a!scalekit/v1/options/options.proto\"\xc8\x10\n" + + "#scalekit/v1/auth/passwordless.proto\x12\x1dscalekit.v1.auth.passwordless\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a!scalekit/v1/options/options.proto\"\xc8\x10\n" + "\x17SendPasswordlessRequest\x12\xad\x01\n" + "\x05email\x18\x01 \x01(\tB\x96\x01\x92A\x85\x012kEmail address where the passwordless authentication credentials will be sent. Must be a valid email format.J\x16\"john.doe@example.com\"\xbaH\n" + "\xc8\x01\x01r\x05\x10\x01\x18\xc0\x02R\x05email\x12\xa6\x02\n" + @@ -541,154 +542,23 @@ const file_scalekit_v1_auth_passwordless_proto_rawDesc = "" + "\x1dPASSWORDLESS_TYPE_UNSPECIFIED\x10\x00\x12\a\n" + "\x03OTP\x10\x01\x12\b\n" + "\x04LINK\x10\x02\x12\f\n" + - "\bLINK_OTP\x10\x032\xe9!\n" + - "\x13PasswordlessService\x12\xdb\f\n" + - "\x15SendPasswordlessEmail\x126.scalekit.v1.auth.passwordless.SendPasswordlessRequest\x1a7.scalekit.v1.auth.passwordless.SendPasswordlessResponse\"\xd0\v\x92A\x9c\v\n" + + "\bLINK_OTP\x10\x032\xac\x0e\n" + + "\x13PasswordlessService\x12\xb4\x04\n" + + "\x15SendPasswordlessEmail\x126.scalekit.v1.auth.passwordless.SendPasswordlessRequest\x1a7.scalekit.v1.auth.passwordless.SendPasswordlessResponse\"\xa9\x03\x92A\xf5\x02\n" + "\x11Passwordless Auth\x12\x17Send passwordless email\x1atSend a verification email containing either a verification code (OTP), magic link, or both to a user's email addressJ\xd0\x01\n" + "\x03200\x12\xc8\x01\n" + "\x8d\x01Successfully sent passwordless authentication email. Returns the authentication request details including expiration time and auth request ID\x126\n" + - "4\x1a2#/definitions/passwordlessSendPasswordlessResponsej\xa4\b\n" + - "\rx-codeSamples\x12\x92\b2\x8f\b\n" + - "\xfc\x02*\xf9\x02\n" + - "\x16\n" + - "\x05label\x12\r\x1a\vNode.js SDK\n" + - "\x14\n" + - "\x04lang\x12\f\x1a\n" + - "javascript\n" + - "\xc8\x02\n" + - "\x06source\x12\xbd\x02\x1a\xba\x02const response = await scalekit.passwordless.\n" + - " sendPasswordlessEmail(\n" + - "\t\"john.doe@example.com\",\n" + - "\t{\n" + - "\t\ttemplate: \"SIGNIN\",\n" + - "\t\texpiresIn: 100,\n" + - "\t\tmagiclinkAuthUri: \"https://www.google.com\",\n" + - "\t\ttemplateVariables: {\n" + - "\t\t\temployeeID: \"EMP523\",\n" + - "\t\t\tteamName: \"Alpha Team\",\n" + - "\t\t\tsupportEmail: \"support@yourcompany.com\",\n" + - "\t\t},\n" + - "\t}\n" + - ");\n" + - "\x8d\x05*\x8a\x05\n" + - "\x11\n" + - "\x05label\x12\b\x1a\x06Go SDK\n" + - "\f\n" + - "\x04lang\x12\x04\x1a\x02go\n" + - "\xe6\x04\n" + - "\x06source\x12\xdb\x04\x1a\xd8\x04templateType := scalekit.TemplateTypeSignin\n" + - "response, err := client.Passwordless().SendPasswordlessEmail(\n" + - " ctx,\n" + - " \"john.doe@example.com\",\n" + - " &scalekit.SendPasswordlessOptions{\n" + - " Template: &templateType,\n" + - " ExpiresIn: 100,\n" + - " MagiclinkAuthUri: \"https://www.google.com\",\n" + - " TemplateVariables: map[string]string{\n" + - " \"employeeID\": \"EMP523\",\n" + - " \"teamName\": \"Alpha Team\",\n" + - " \"supportEmail\": \"support@yourcompany.com\",\n" + - " },\n" + - " },\n" + - ")\n" + - "\n" + - "if err != nil {\n" + - " // Handle error\n" + - " return\n" + - "}\n" + - "\n" + - "authRequestId := response.AuthRequestId\x82\xb5\x18\x02\x18\x04\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/api/v1/passwordless/email/send\x12\xbc\v\n" + - "\x17VerifyPasswordlessEmail\x128.scalekit.v1.auth.passwordless.VerifyPasswordLessRequest\x1a9.scalekit.v1.auth.passwordless.VerifyPasswordLessResponse\"\xab\n" + - "\x92A\xf5\t\n" + + "4\x1a2#/definitions/passwordlessSendPasswordlessResponse\x82\xb5\x18\x02\x18\x04\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/api/v1/passwordless/email/send\x12\xd9\x03\n" + + "\x17VerifyPasswordlessEmail\x128.scalekit.v1.auth.passwordless.VerifyPasswordLessRequest\x1a9.scalekit.v1.auth.passwordless.VerifyPasswordLessResponse\"\xc8\x02\x92A\x92\x02\n" + "\x11Passwordless Auth\x12\x19Verify passwordless email\x1aMVerify a user's identity using either a verification code or magic link tokenJ\x92\x01\n" + "\x03200\x12\x8a\x01\n" + "ISuccessfully verified the passwordless authentication. Returns user email\x12=\n" + - ";\x1a9.scalekit.v1.auth.passwordless.VerifyPasswordLessResponsej\xe0\a\n" + - "\rx-codeSamples\x12\xce\a2\xcb\a\n" + - "\xac\x02*\xa9\x02\n" + - "\x16\n" + - "\x05label\x12\r\x1a\vNode.js SDK\n" + - "\x14\n" + - "\x04lang\x12\f\x1a\n" + - "javascript\n" + - "\xf8\x01\n" + - "\x06source\x12\xed\x01\x1a\xea\x01const { authRequestId } = sendResponse;\n" + - "const verifyResponse = await scalekit.passwordless.\n" + - " verifyPasswordlessEmail(\n" + - "\t// Verification Code (OTP)\n" + - "\t{ code: \"123456\" },\n" + - "\t// Magic Link Token\n" + - "\t{ linkToken: link_token },\n" + - "\tauthRequestId\n" + - ");\n" + - "\x99\x05*\x96\x05\n" + - "\x11\n" + - "\x05label\x12\b\x1a\x06Go SDK\n" + - "\f\n" + - "\x04lang\x12\x04\x1a\x02go\n" + - "\xf2\x04\n" + - "\x06source\x12\xe7\x04\x1a\xe4\x04// Verify with OTP code\n" + - "verifyResponse, err := client.Passwordless().VerifyPasswordlessEmail(\n" + - " ctx,\n" + - " &scalekit.VerifyPasswordlessOptions{\n" + - " Code: \"123456\", // OTP code\n" + - " AuthRequestId: authRequestId,\n" + - " },\n" + - ")\n" + - "\n" + - "if err != nil {\n" + - " // Handle error\n" + - " return\n" + - "}\n" + - "\n" + - "// Verify with magic link token\n" + - "verifyResponse, err := client.Passwordless().VerifyPasswordlessEmail(\n" + - " ctx,\n" + - " &scalekit.VerifyPasswordlessOptions{\n" + - " LinkToken: linkToken, // Magic link token\n" + - " },\n" + - ")\n" + - "\n" + - "if err != nil {\n" + - " // Handle error\n" + - " return\n" + - "}\n" + - "\n" + - "// User verified successfully\n" + - "userEmail := verifyResponse.Email\x82\xb5\x18\x02\x18\x04\x82\xd3\xe4\x93\x02&:\x01*\"!/api/v1/passwordless/email/verify\x12\xd8\a\n" + - "\x17ResendPasswordlessEmail\x128.scalekit.v1.auth.passwordless.ResendPasswordlessRequest\x1a7.scalekit.v1.auth.passwordless.SendPasswordlessResponse\"\xc9\x06\x92A\x93\x06\n" + + ";\x1a9.scalekit.v1.auth.passwordless.VerifyPasswordLessResponse\x82\xb5\x18\x02\x18\x04\x82\xd3\xe4\x93\x02&:\x01*\"!/api/v1/passwordless/email/verify\x12\xa5\x04\n" + + "\x17ResendPasswordlessEmail\x128.scalekit.v1.auth.passwordless.ResendPasswordlessRequest\x1a7.scalekit.v1.auth.passwordless.SendPasswordlessResponse\"\x96\x03\x92A\xe0\x02\n" + "\x11Passwordless Auth\x12\x19Resend passwordless email\x1abResend a verification email if the user didn't receive it or if the previous code/link has expiredJ\xcb\x01\n" + "\x03200\x12\xc3\x01\n" + "\x83\x01Successfully resent the passwordless authentication email. Returns updated authentication request details with new expiration time.\x12;\n" + - "9\x1a7.scalekit.v1.auth.passwordless.SendPasswordlessResponsej\xb0\x03\n" + - "\rx-codeSamples\x12\x9e\x032\x9b\x03\n" + - "\xcb\x01*\xc8\x01\n" + - "\x16\n" + - "\x05label\x12\r\x1a\vNode.js SDK\n" + - "\x14\n" + - "\x04lang\x12\f\x1a\n" + - "javascript\n" + - "\x97\x01\n" + - "\x06source\x12\x8c\x01\x1a\x89\x01const { authRequestId } = sendResponse;\n" + - "const resendResponse = await scalekit.passwordless\n" + - ".resendPasswordlessEmail(\n" + - " authRequestId\n" + - ");\n" + - "\xca\x01*\xc7\x01\n" + - "\x11\n" + - "\x05label\x12\b\x1a\x06Go SDK\n" + - "\f\n" + - "\x04lang\x12\x04\x1a\x02go\n" + - "\xa3\x01\n" + - "\x06source\x12\x98\x01\x1a\x95\x01resendResponse, err := client.Passwordless().ResendPasswordlessEmail(\n" + - " ctx,\n" + - " authRequestId,\n" + - ")\n" + - "\n" + - "if err != nil {\n" + - " // Handle error\n" + - " return\n" + - "}\x82\xb5\x18\x02\x18\x04\x82\xd3\xe4\x93\x02&:\x01*\"!/api/v1/passwordless/email/resend\x1a\xd9\x01\x92A\xd5\x01\n" + + "9\x1a7.scalekit.v1.auth.passwordless.SendPasswordlessResponse\x82\xb5\x18\x02\x18\x04\x82\xd3\xe4\x93\x02&:\x01*\"!/api/v1/passwordless/email/resend\x1a\xd9\x01\x92A\xd5\x01\n" + "\x11Passwordless Auth\x12\xbf\x01Endpoints for sending and verifying passwordless authentication emails. These APIs allow users to authenticate without passwords by receiving a verification code or magic link in their email.B\x94\x02\n" + "!com.scalekit.v1.auth.passwordlessB\x11PasswordlessProtoP\x01ZDgithub.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/auth\xa2\x02\x04SVAP\xaa\x02\x1dScalekit.V1.Auth.Passwordless\xca\x02\x1dScalekit\\V1\\Auth\\Passwordless\xe2\x02)Scalekit\\V1\\Auth\\Passwordless\\GPBMetadata\xea\x02 Scalekit::V1::Auth::Passwordlessb\x06proto3" diff --git a/pkg/grpc/scalekit/v1/commons/commons.pb.go b/pkg/grpc/scalekit/v1/commons/commons.pb.go index 4b0c50e..d5a34dd 100644 --- a/pkg/grpc/scalekit/v1/commons/commons.pb.go +++ b/pkg/grpc/scalekit/v1/commons/commons.pb.go @@ -7,6 +7,7 @@ package commons import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -425,7 +426,7 @@ var File_scalekit_v1_commons_commons_proto protoreflect.FileDescriptor const file_scalekit_v1_commons_commons_proto_rawDesc = "" + "\n" + - "!scalekit/v1/commons/commons.proto\x12\x13scalekit.v1.commons\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xb9\v\n" + + "!scalekit/v1/commons/commons.proto\x12\x13scalekit.v1.commons\x1a\x1bbuf/validate/validate.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xb9\v\n" + "\x16OrganizationMembership\x12\x86\x01\n" + "\x0forganization_id\x18\x01 \x01(\tB]\x92AZ2@Unique identifier for the organization. Immutable and read-only.J\x16\"org_1234abcd5678efgh\"R\x0eorganizationId\x12\x89\x01\n" + "\tjoin_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampBP\x92AM2KTimestamp when the membership was created. Automatically set by the server.R\bjoinTime\x12R\n" + diff --git a/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts.pb.go b/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts.pb.go new file mode 100644 index 0000000..9d04272 --- /dev/null +++ b/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts.pb.go @@ -0,0 +1,2009 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc (unknown) +// source: scalekit/v1/connected_accounts/connected_accounts.proto + +package connected_accounts + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ConnectorStatus int32 + +const ( + ConnectorStatus_CONNECTION_STATUS_UNSPECIFIED ConnectorStatus = 0 + ConnectorStatus_ACTIVE ConnectorStatus = 1 + ConnectorStatus_EXPIRED ConnectorStatus = 2 + ConnectorStatus_PENDING_AUTH ConnectorStatus = 3 +) + +// Enum value maps for ConnectorStatus. +var ( + ConnectorStatus_name = map[int32]string{ + 0: "CONNECTION_STATUS_UNSPECIFIED", + 1: "ACTIVE", + 2: "EXPIRED", + 3: "PENDING_AUTH", + } + ConnectorStatus_value = map[string]int32{ + "CONNECTION_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "EXPIRED": 2, + "PENDING_AUTH": 3, + } +) + +func (x ConnectorStatus) Enum() *ConnectorStatus { + p := new(ConnectorStatus) + *p = x + return p +} + +func (x ConnectorStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConnectorStatus) Descriptor() protoreflect.EnumDescriptor { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_enumTypes[0].Descriptor() +} + +func (ConnectorStatus) Type() protoreflect.EnumType { + return &file_scalekit_v1_connected_accounts_connected_accounts_proto_enumTypes[0] +} + +func (x ConnectorStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConnectorStatus.Descriptor instead. +func (ConnectorStatus) EnumDescriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{0} +} + +type ConnectorType int32 + +const ( + ConnectorType_CONNECTION_TYPE_UNSPECIFIED ConnectorType = 0 + ConnectorType_OAUTH ConnectorType = 1 + ConnectorType_API_KEY ConnectorType = 2 + ConnectorType_BASIC_AUTH ConnectorType = 3 + ConnectorType_BEARER_TOKEN ConnectorType = 4 + ConnectorType_CUSTOM ConnectorType = 5 + ConnectorType_BASIC ConnectorType = 6 +) + +// Enum value maps for ConnectorType. +var ( + ConnectorType_name = map[int32]string{ + 0: "CONNECTION_TYPE_UNSPECIFIED", + 1: "OAUTH", + 2: "API_KEY", + 3: "BASIC_AUTH", + 4: "BEARER_TOKEN", + 5: "CUSTOM", + 6: "BASIC", + } + ConnectorType_value = map[string]int32{ + "CONNECTION_TYPE_UNSPECIFIED": 0, + "OAUTH": 1, + "API_KEY": 2, + "BASIC_AUTH": 3, + "BEARER_TOKEN": 4, + "CUSTOM": 5, + "BASIC": 6, + } +) + +func (x ConnectorType) Enum() *ConnectorType { + p := new(ConnectorType) + *p = x + return p +} + +func (x ConnectorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConnectorType) Descriptor() protoreflect.EnumDescriptor { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_enumTypes[1].Descriptor() +} + +func (ConnectorType) Type() protoreflect.EnumType { + return &file_scalekit_v1_connected_accounts_connected_accounts_proto_enumTypes[1] +} + +func (x ConnectorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConnectorType.Descriptor instead. +func (ConnectorType) EnumDescriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{1} +} + +type ListConnectedAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId *string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3,oneof" json:"organization_id,omitempty"` + UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` + Connector *string `protobuf:"bytes,3,opt,name=connector,proto3,oneof" json:"connector,omitempty"` + Identifier *string `protobuf:"bytes,4,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"` + PageSize uint32 `protobuf:"varint,6,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,7,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Query string `protobuf:"bytes,8,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListConnectedAccountsRequest) Reset() { + *x = ListConnectedAccountsRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListConnectedAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConnectedAccountsRequest) ProtoMessage() {} + +func (x *ListConnectedAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConnectedAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListConnectedAccountsRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{0} +} + +func (x *ListConnectedAccountsRequest) GetOrganizationId() string { + if x != nil && x.OrganizationId != nil { + return *x.OrganizationId + } + return "" +} + +func (x *ListConnectedAccountsRequest) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId + } + return "" +} + +func (x *ListConnectedAccountsRequest) GetConnector() string { + if x != nil && x.Connector != nil { + return *x.Connector + } + return "" +} + +func (x *ListConnectedAccountsRequest) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *ListConnectedAccountsRequest) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *ListConnectedAccountsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListConnectedAccountsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListConnectedAccountsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type ListConnectedAccountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConnectedAccounts []*ConnectedAccountForList `protobuf:"bytes,1,rep,name=connected_accounts,json=connectedAccounts,proto3" json:"connected_accounts,omitempty"` + TotalSize uint32 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PrevPageToken string `protobuf:"bytes,4,opt,name=prev_page_token,json=prevPageToken,proto3" json:"prev_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListConnectedAccountsResponse) Reset() { + *x = ListConnectedAccountsResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListConnectedAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConnectedAccountsResponse) ProtoMessage() {} + +func (x *ListConnectedAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConnectedAccountsResponse.ProtoReflect.Descriptor instead. +func (*ListConnectedAccountsResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{1} +} + +func (x *ListConnectedAccountsResponse) GetConnectedAccounts() []*ConnectedAccountForList { + if x != nil { + return x.ConnectedAccounts + } + return nil +} + +func (x *ListConnectedAccountsResponse) GetTotalSize() uint32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *ListConnectedAccountsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListConnectedAccountsResponse) GetPrevPageToken() string { + if x != nil { + return x.PrevPageToken + } + return "" +} + +type SearchConnectedAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchConnectedAccountsRequest) Reset() { + *x = SearchConnectedAccountsRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchConnectedAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchConnectedAccountsRequest) ProtoMessage() {} + +func (x *SearchConnectedAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchConnectedAccountsRequest.ProtoReflect.Descriptor instead. +func (*SearchConnectedAccountsRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{2} +} + +func (x *SearchConnectedAccountsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchConnectedAccountsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchConnectedAccountsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type SearchConnectedAccountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConnectedAccounts []*ConnectedAccountForList `protobuf:"bytes,1,rep,name=connected_accounts,json=connectedAccounts,proto3" json:"connected_accounts,omitempty"` + TotalSize uint32 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + PrevPageToken string `protobuf:"bytes,4,opt,name=prev_page_token,json=prevPageToken,proto3" json:"prev_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchConnectedAccountsResponse) Reset() { + *x = SearchConnectedAccountsResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchConnectedAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchConnectedAccountsResponse) ProtoMessage() {} + +func (x *SearchConnectedAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchConnectedAccountsResponse.ProtoReflect.Descriptor instead. +func (*SearchConnectedAccountsResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{3} +} + +func (x *SearchConnectedAccountsResponse) GetConnectedAccounts() []*ConnectedAccountForList { + if x != nil { + return x.ConnectedAccounts + } + return nil +} + +func (x *SearchConnectedAccountsResponse) GetTotalSize() uint32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *SearchConnectedAccountsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *SearchConnectedAccountsResponse) GetPrevPageToken() string { + if x != nil { + return x.PrevPageToken + } + return "" +} + +type CreateConnectedAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId *string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3,oneof" json:"organization_id,omitempty"` + UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` + Connector *string `protobuf:"bytes,3,opt,name=connector,proto3,oneof" json:"connector,omitempty"` + Identifier *string `protobuf:"bytes,4,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + ConnectedAccount *CreateConnectedAccount `protobuf:"bytes,5,opt,name=connected_account,json=connectedAccount,proto3" json:"connected_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateConnectedAccountRequest) Reset() { + *x = CreateConnectedAccountRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateConnectedAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConnectedAccountRequest) ProtoMessage() {} + +func (x *CreateConnectedAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateConnectedAccountRequest.ProtoReflect.Descriptor instead. +func (*CreateConnectedAccountRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateConnectedAccountRequest) GetOrganizationId() string { + if x != nil && x.OrganizationId != nil { + return *x.OrganizationId + } + return "" +} + +func (x *CreateConnectedAccountRequest) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId + } + return "" +} + +func (x *CreateConnectedAccountRequest) GetConnector() string { + if x != nil && x.Connector != nil { + return *x.Connector + } + return "" +} + +func (x *CreateConnectedAccountRequest) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *CreateConnectedAccountRequest) GetConnectedAccount() *CreateConnectedAccount { + if x != nil { + return x.ConnectedAccount + } + return nil +} + +type CreateConnectedAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConnectedAccount *ConnectedAccount `protobuf:"bytes,1,opt,name=connected_account,json=connectedAccount,proto3" json:"connected_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateConnectedAccountResponse) Reset() { + *x = CreateConnectedAccountResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateConnectedAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConnectedAccountResponse) ProtoMessage() {} + +func (x *CreateConnectedAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateConnectedAccountResponse.ProtoReflect.Descriptor instead. +func (*CreateConnectedAccountResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateConnectedAccountResponse) GetConnectedAccount() *ConnectedAccount { + if x != nil { + return x.ConnectedAccount + } + return nil +} + +type UpdateConnectedAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId *string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3,oneof" json:"organization_id,omitempty"` + UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` + Connector *string `protobuf:"bytes,3,opt,name=connector,proto3,oneof" json:"connector,omitempty"` + Identifier *string `protobuf:"bytes,4,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + Id *string `protobuf:"bytes,6,opt,name=id,proto3,oneof" json:"id,omitempty"` + ConnectedAccount *UpdateConnectedAccount `protobuf:"bytes,5,opt,name=connected_account,json=connectedAccount,proto3" json:"connected_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateConnectedAccountRequest) Reset() { + *x = UpdateConnectedAccountRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateConnectedAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConnectedAccountRequest) ProtoMessage() {} + +func (x *UpdateConnectedAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConnectedAccountRequest.ProtoReflect.Descriptor instead. +func (*UpdateConnectedAccountRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateConnectedAccountRequest) GetOrganizationId() string { + if x != nil && x.OrganizationId != nil { + return *x.OrganizationId + } + return "" +} + +func (x *UpdateConnectedAccountRequest) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId + } + return "" +} + +func (x *UpdateConnectedAccountRequest) GetConnector() string { + if x != nil && x.Connector != nil { + return *x.Connector + } + return "" +} + +func (x *UpdateConnectedAccountRequest) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *UpdateConnectedAccountRequest) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +func (x *UpdateConnectedAccountRequest) GetConnectedAccount() *UpdateConnectedAccount { + if x != nil { + return x.ConnectedAccount + } + return nil +} + +type UpdateConnectedAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConnectedAccount *ConnectedAccount `protobuf:"bytes,1,opt,name=connected_account,json=connectedAccount,proto3" json:"connected_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateConnectedAccountResponse) Reset() { + *x = UpdateConnectedAccountResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateConnectedAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConnectedAccountResponse) ProtoMessage() {} + +func (x *UpdateConnectedAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConnectedAccountResponse.ProtoReflect.Descriptor instead. +func (*UpdateConnectedAccountResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateConnectedAccountResponse) GetConnectedAccount() *ConnectedAccount { + if x != nil { + return x.ConnectedAccount + } + return nil +} + +type DeleteConnectedAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId *string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3,oneof" json:"organization_id,omitempty"` + UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` + Connector *string `protobuf:"bytes,3,opt,name=connector,proto3,oneof" json:"connector,omitempty"` + Identifier *string `protobuf:"bytes,4,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + Id *string `protobuf:"bytes,5,opt,name=id,proto3,oneof" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteConnectedAccountRequest) Reset() { + *x = DeleteConnectedAccountRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteConnectedAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteConnectedAccountRequest) ProtoMessage() {} + +func (x *DeleteConnectedAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteConnectedAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteConnectedAccountRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteConnectedAccountRequest) GetOrganizationId() string { + if x != nil && x.OrganizationId != nil { + return *x.OrganizationId + } + return "" +} + +func (x *DeleteConnectedAccountRequest) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId + } + return "" +} + +func (x *DeleteConnectedAccountRequest) GetConnector() string { + if x != nil && x.Connector != nil { + return *x.Connector + } + return "" +} + +func (x *DeleteConnectedAccountRequest) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *DeleteConnectedAccountRequest) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +type DeleteConnectedAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteConnectedAccountResponse) Reset() { + *x = DeleteConnectedAccountResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteConnectedAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteConnectedAccountResponse) ProtoMessage() {} + +func (x *DeleteConnectedAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteConnectedAccountResponse.ProtoReflect.Descriptor instead. +func (*DeleteConnectedAccountResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{9} +} + +type GetMagicLinkForConnectedAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId *string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3,oneof" json:"organization_id,omitempty"` + UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` + Connector *string `protobuf:"bytes,3,opt,name=connector,proto3,oneof" json:"connector,omitempty"` + Identifier *string `protobuf:"bytes,4,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + Id *string `protobuf:"bytes,5,opt,name=id,proto3,oneof" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMagicLinkForConnectedAccountRequest) Reset() { + *x = GetMagicLinkForConnectedAccountRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMagicLinkForConnectedAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMagicLinkForConnectedAccountRequest) ProtoMessage() {} + +func (x *GetMagicLinkForConnectedAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMagicLinkForConnectedAccountRequest.ProtoReflect.Descriptor instead. +func (*GetMagicLinkForConnectedAccountRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{10} +} + +func (x *GetMagicLinkForConnectedAccountRequest) GetOrganizationId() string { + if x != nil && x.OrganizationId != nil { + return *x.OrganizationId + } + return "" +} + +func (x *GetMagicLinkForConnectedAccountRequest) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId + } + return "" +} + +func (x *GetMagicLinkForConnectedAccountRequest) GetConnector() string { + if x != nil && x.Connector != nil { + return *x.Connector + } + return "" +} + +func (x *GetMagicLinkForConnectedAccountRequest) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *GetMagicLinkForConnectedAccountRequest) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +type GetMagicLinkForConnectedAccountRedirectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RedirectTo string `protobuf:"bytes,1,opt,name=redirect_to,json=redirectTo,proto3" json:"redirect_to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMagicLinkForConnectedAccountRedirectRequest) Reset() { + *x = GetMagicLinkForConnectedAccountRedirectRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMagicLinkForConnectedAccountRedirectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMagicLinkForConnectedAccountRedirectRequest) ProtoMessage() {} + +func (x *GetMagicLinkForConnectedAccountRedirectRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMagicLinkForConnectedAccountRedirectRequest.ProtoReflect.Descriptor instead. +func (*GetMagicLinkForConnectedAccountRedirectRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{11} +} + +func (x *GetMagicLinkForConnectedAccountRedirectRequest) GetRedirectTo() string { + if x != nil { + return x.RedirectTo + } + return "" +} + +type GetMagicLinkForConnectedAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` + Expiry *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMagicLinkForConnectedAccountResponse) Reset() { + *x = GetMagicLinkForConnectedAccountResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMagicLinkForConnectedAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMagicLinkForConnectedAccountResponse) ProtoMessage() {} + +func (x *GetMagicLinkForConnectedAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMagicLinkForConnectedAccountResponse.ProtoReflect.Descriptor instead. +func (*GetMagicLinkForConnectedAccountResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{12} +} + +func (x *GetMagicLinkForConnectedAccountResponse) GetLink() string { + if x != nil { + return x.Link + } + return "" +} + +func (x *GetMagicLinkForConnectedAccountResponse) GetExpiry() *timestamppb.Timestamp { + if x != nil { + return x.Expiry + } + return nil +} + +type GetMagicLinkForConnectedAccountRedirectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + RedirectTo string `protobuf:"bytes,1,opt,name=redirect_to,json=redirectTo,proto3" json:"redirect_to,omitempty"` + Expiry *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMagicLinkForConnectedAccountRedirectResponse) Reset() { + *x = GetMagicLinkForConnectedAccountRedirectResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMagicLinkForConnectedAccountRedirectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMagicLinkForConnectedAccountRedirectResponse) ProtoMessage() {} + +func (x *GetMagicLinkForConnectedAccountRedirectResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMagicLinkForConnectedAccountRedirectResponse.ProtoReflect.Descriptor instead. +func (*GetMagicLinkForConnectedAccountRedirectResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{13} +} + +func (x *GetMagicLinkForConnectedAccountRedirectResponse) GetRedirectTo() string { + if x != nil { + return x.RedirectTo + } + return "" +} + +func (x *GetMagicLinkForConnectedAccountRedirectResponse) GetExpiry() *timestamppb.Timestamp { + if x != nil { + return x.Expiry + } + return nil +} + +type GetConnectedAccountByIdentifierRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrganizationId *string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3,oneof" json:"organization_id,omitempty"` + UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` + Connector *string `protobuf:"bytes,3,opt,name=connector,proto3,oneof" json:"connector,omitempty"` + Identifier *string `protobuf:"bytes,4,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + Id *string `protobuf:"bytes,5,opt,name=id,proto3,oneof" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConnectedAccountByIdentifierRequest) Reset() { + *x = GetConnectedAccountByIdentifierRequest{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConnectedAccountByIdentifierRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConnectedAccountByIdentifierRequest) ProtoMessage() {} + +func (x *GetConnectedAccountByIdentifierRequest) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConnectedAccountByIdentifierRequest.ProtoReflect.Descriptor instead. +func (*GetConnectedAccountByIdentifierRequest) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{14} +} + +func (x *GetConnectedAccountByIdentifierRequest) GetOrganizationId() string { + if x != nil && x.OrganizationId != nil { + return *x.OrganizationId + } + return "" +} + +func (x *GetConnectedAccountByIdentifierRequest) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId + } + return "" +} + +func (x *GetConnectedAccountByIdentifierRequest) GetConnector() string { + if x != nil && x.Connector != nil { + return *x.Connector + } + return "" +} + +func (x *GetConnectedAccountByIdentifierRequest) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *GetConnectedAccountByIdentifierRequest) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +type GetConnectedAccountByIdentifierResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConnectedAccount *ConnectedAccount `protobuf:"bytes,1,opt,name=connected_account,json=connectedAccount,proto3" json:"connected_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConnectedAccountByIdentifierResponse) Reset() { + *x = GetConnectedAccountByIdentifierResponse{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConnectedAccountByIdentifierResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConnectedAccountByIdentifierResponse) ProtoMessage() {} + +func (x *GetConnectedAccountByIdentifierResponse) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConnectedAccountByIdentifierResponse.ProtoReflect.Descriptor instead. +func (*GetConnectedAccountByIdentifierResponse) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{15} +} + +func (x *GetConnectedAccountByIdentifierResponse) GetConnectedAccount() *ConnectedAccount { + if x != nil { + return x.ConnectedAccount + } + return nil +} + +type ConnectedAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Status ConnectorStatus `protobuf:"varint,3,opt,name=status,proto3,enum=scalekit.v1.connected_accounts.ConnectorStatus" json:"status,omitempty"` + AuthorizationType ConnectorType `protobuf:"varint,4,opt,name=authorization_type,json=authorizationType,proto3,enum=scalekit.v1.connected_accounts.ConnectorType" json:"authorization_type,omitempty"` + AuthorizationDetails *AuthorizationDetails `protobuf:"bytes,5,opt,name=authorization_details,json=authorizationDetails,proto3" json:"authorization_details,omitempty"` + TokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=token_expires_at,json=tokenExpiresAt,proto3" json:"token_expires_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Connector string `protobuf:"bytes,8,opt,name=connector,proto3" json:"connector,omitempty"` + LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"` + Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"` + ConnectionId string `protobuf:"bytes,11,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConnectedAccount) Reset() { + *x = ConnectedAccount{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConnectedAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectedAccount) ProtoMessage() {} + +func (x *ConnectedAccount) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectedAccount.ProtoReflect.Descriptor instead. +func (*ConnectedAccount) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{16} +} + +func (x *ConnectedAccount) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +func (x *ConnectedAccount) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *ConnectedAccount) GetStatus() ConnectorStatus { + if x != nil { + return x.Status + } + return ConnectorStatus_CONNECTION_STATUS_UNSPECIFIED +} + +func (x *ConnectedAccount) GetAuthorizationType() ConnectorType { + if x != nil { + return x.AuthorizationType + } + return ConnectorType_CONNECTION_TYPE_UNSPECIFIED +} + +func (x *ConnectedAccount) GetAuthorizationDetails() *AuthorizationDetails { + if x != nil { + return x.AuthorizationDetails + } + return nil +} + +func (x *ConnectedAccount) GetTokenExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.TokenExpiresAt + } + return nil +} + +func (x *ConnectedAccount) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *ConnectedAccount) GetConnector() string { + if x != nil { + return x.Connector + } + return "" +} + +func (x *ConnectedAccount) GetLastUsedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastUsedAt + } + return nil +} + +func (x *ConnectedAccount) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ConnectedAccount) GetConnectionId() string { + if x != nil { + return x.ConnectionId + } + return "" +} + +type CreateConnectedAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + AuthorizationDetails *AuthorizationDetails `protobuf:"bytes,5,opt,name=authorization_details,json=authorizationDetails,proto3" json:"authorization_details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateConnectedAccount) Reset() { + *x = CreateConnectedAccount{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateConnectedAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConnectedAccount) ProtoMessage() {} + +func (x *CreateConnectedAccount) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateConnectedAccount.ProtoReflect.Descriptor instead. +func (*CreateConnectedAccount) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateConnectedAccount) GetAuthorizationDetails() *AuthorizationDetails { + if x != nil { + return x.AuthorizationDetails + } + return nil +} + +type UpdateConnectedAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + AuthorizationDetails *AuthorizationDetails `protobuf:"bytes,5,opt,name=authorization_details,json=authorizationDetails,proto3" json:"authorization_details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateConnectedAccount) Reset() { + *x = UpdateConnectedAccount{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateConnectedAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConnectedAccount) ProtoMessage() {} + +func (x *UpdateConnectedAccount) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConnectedAccount.ProtoReflect.Descriptor instead. +func (*UpdateConnectedAccount) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{18} +} + +func (x *UpdateConnectedAccount) GetAuthorizationDetails() *AuthorizationDetails { + if x != nil { + return x.AuthorizationDetails + } + return nil +} + +// dont send auth for list calls +type ConnectedAccountForList struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Status ConnectorStatus `protobuf:"varint,3,opt,name=status,proto3,enum=scalekit.v1.connected_accounts.ConnectorStatus" json:"status,omitempty"` + AuthorizationType ConnectorType `protobuf:"varint,4,opt,name=authorization_type,json=authorizationType,proto3,enum=scalekit.v1.connected_accounts.ConnectorType" json:"authorization_type,omitempty"` + TokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=token_expires_at,json=tokenExpiresAt,proto3" json:"token_expires_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Connector string `protobuf:"bytes,8,opt,name=connector,proto3" json:"connector,omitempty"` + LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"` + Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"` + ConnectionId string `protobuf:"bytes,11,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConnectedAccountForList) Reset() { + *x = ConnectedAccountForList{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConnectedAccountForList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectedAccountForList) ProtoMessage() {} + +func (x *ConnectedAccountForList) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectedAccountForList.ProtoReflect.Descriptor instead. +func (*ConnectedAccountForList) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{19} +} + +func (x *ConnectedAccountForList) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +func (x *ConnectedAccountForList) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *ConnectedAccountForList) GetStatus() ConnectorStatus { + if x != nil { + return x.Status + } + return ConnectorStatus_CONNECTION_STATUS_UNSPECIFIED +} + +func (x *ConnectedAccountForList) GetAuthorizationType() ConnectorType { + if x != nil { + return x.AuthorizationType + } + return ConnectorType_CONNECTION_TYPE_UNSPECIFIED +} + +func (x *ConnectedAccountForList) GetTokenExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.TokenExpiresAt + } + return nil +} + +func (x *ConnectedAccountForList) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *ConnectedAccountForList) GetConnector() string { + if x != nil { + return x.Connector + } + return "" +} + +func (x *ConnectedAccountForList) GetLastUsedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastUsedAt + } + return nil +} + +func (x *ConnectedAccountForList) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ConnectedAccountForList) GetConnectionId() string { + if x != nil { + return x.ConnectionId + } + return "" +} + +type AuthorizationDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Details: + // + // *AuthorizationDetails_OauthToken + // *AuthorizationDetails_StaticAuth + Details isAuthorizationDetails_Details `protobuf_oneof:"details"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthorizationDetails) Reset() { + *x = AuthorizationDetails{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthorizationDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthorizationDetails) ProtoMessage() {} + +func (x *AuthorizationDetails) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthorizationDetails.ProtoReflect.Descriptor instead. +func (*AuthorizationDetails) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{20} +} + +func (x *AuthorizationDetails) GetDetails() isAuthorizationDetails_Details { + if x != nil { + return x.Details + } + return nil +} + +func (x *AuthorizationDetails) GetOauthToken() *OauthToken { + if x != nil { + if x, ok := x.Details.(*AuthorizationDetails_OauthToken); ok { + return x.OauthToken + } + } + return nil +} + +func (x *AuthorizationDetails) GetStaticAuth() *StaticAuth { + if x != nil { + if x, ok := x.Details.(*AuthorizationDetails_StaticAuth); ok { + return x.StaticAuth + } + } + return nil +} + +type isAuthorizationDetails_Details interface { + isAuthorizationDetails_Details() +} + +type AuthorizationDetails_OauthToken struct { + OauthToken *OauthToken `protobuf:"bytes,1,opt,name=oauth_token,json=oauthToken,proto3,oneof"` +} + +type AuthorizationDetails_StaticAuth struct { + StaticAuth *StaticAuth `protobuf:"bytes,2,opt,name=static_auth,json=staticAuth,proto3,oneof"` +} + +func (*AuthorizationDetails_OauthToken) isAuthorizationDetails_Details() {} + +func (*AuthorizationDetails_StaticAuth) isAuthorizationDetails_Details() {} + +type OauthToken struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` + Scopes []string `protobuf:"bytes,3,rep,name=scopes,proto3" json:"scopes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OauthToken) Reset() { + *x = OauthToken{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OauthToken) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OauthToken) ProtoMessage() {} + +func (x *OauthToken) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OauthToken.ProtoReflect.Descriptor instead. +func (*OauthToken) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{21} +} + +func (x *OauthToken) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *OauthToken) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *OauthToken) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +type StaticAuth struct { + state protoimpl.MessageState `protogen:"open.v1"` + Details *structpb.Struct `protobuf:"bytes,1,opt,name=details,proto3" json:"details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StaticAuth) Reset() { + *x = StaticAuth{} + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StaticAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAuth) ProtoMessage() {} + +func (x *StaticAuth) ProtoReflect() protoreflect.Message { + mi := &file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAuth.ProtoReflect.Descriptor instead. +func (*StaticAuth) Descriptor() ([]byte, []int) { + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP(), []int{22} +} + +func (x *StaticAuth) GetDetails() *structpb.Struct { + if x != nil { + return x.Details + } + return nil +} + +var File_scalekit_v1_connected_accounts_connected_accounts_proto protoreflect.FileDescriptor + +const file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDesc = "" + + "\n" + + "7scalekit/v1/connected_accounts/connected_accounts.proto\x12\x1escalekit.v1.connected_accounts\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/api/visibility.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a!scalekit/v1/options/options.proto\"\xfa\x06\n" + + "\x1cListConnectedAccountsRequest\x12t\n" + + "\x0forganization_id\x18\x01 \x01(\tBF\x92A:2!Organization ID for the connectorJ\x15\"org_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x00R\x0eorganizationId\x88\x01\x01\x12]\n" + + "\auser_id\x18\x02 \x01(\tB?\x92A32\x19User ID for the connectorJ\x16\"user_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x01R\x06userId\x88\x01\x01\x12a\n" + + "\tconnector\x18\x03 \x01(\tB>\x92A 2\x14Connector identifierJ\b\"notion\"\xbaH\x18r\x16\x10\x00\x1822\x10^[a-zA-Z0-9_-]*$H\x02R\tconnector\x88\x01\x01\x12b\n" + + "\n" + + "identifier\x18\x04 \x01(\tB=\x92A12!Organization ID for the connectorJ\f\"app_google\"\xbaH\x06r\x04\x10\x00\x18dH\x03R\n" + + "identifier\x88\x01\x01\x12U\n" + + "\bprovider\x18\x05 \x01(\tB9\x92A-2!Provider of the connected accountJ\b\"google\"\xbaH\x06r\x04\x10\x00\x182R\bprovider\x12^\n" + + "\tpage_size\x18\x06 \x01(\rBA\x92A52/Number of connected accounts to return per pageJ\x0210\xbaH\x06*\x04\x10d(\x00R\bpageSize\x12l\n" + + "\n" + + "page_token\x18\a \x01(\tBM\x92AA227Total number of connected accounts matching the requestJ\x03100R\ttotalSize\x12o\n" + + "\x0fnext_page_token\x18\x03 \x01(\tBG\x92A;2\"Token for the next page of resultsJ\x15\"next_page_token_123\"\xbaH\x06r\x04\x10\x00\x18 R\rnextPageToken\x12w\n" + + "\x0fprev_page_token\x18\x04 \x01(\tBO\x92AC2&Token for the previous page of resultsJ\x19\"previous_page_token_123\"\xbaH\x06r\x04\x10\x00\x18 R\rprevPageToken\"\xf5\x05\n" + + "\x1eSearchConnectedAccountsRequest\x12\xb9\x01\n" + + "\x05query\x18\x01 \x01(\tB\xa2\x01\x92A\x91\x012\x86\x01Search term to match against connected account identifiers, providers, or connectors. Must be at least 3 characters. Case insensitive.J\x06google\xbaH\n" + + "\xc8\x01\x01r\x05\x10\x03\x18\xc8\x01R\x05query\x12\x85\x01\n" + + "\tpage_size\x18\x02 \x01(\rBh\x92A^2XMaximum number of connected accounts to return per page. Value must be between 1 and 30.J\x0230\xbaH\x04*\x02\x18\x1eR\bpageSize\x12\xa5\x01\n" + + "\n" + + "page_token\x18\x03 \x01(\tB\x85\x01\x92A\x81\x012aToken from a previous response for pagination. Provide this to retrieve the next page of results.J\x1ceyJwYWdlIjoyLCJsaW1pdCI6MzB9R\tpageToken:\xe6\x01\x92A\xe2\x01\n" + + "\x9c\x01*\x19Search Connected Accounts2\x7fSearch for connected accounts in your environment using a text query that matches against identifiers, providers, or connectors2Aquery=google&page_size=30&page_token=eyJwYWdlIjoyLCJsaW1pdCI6MzB9\"\xda\x03\n" + + "\x1fSearchConnectedAccountsResponse\x12f\n" + + "\x12connected_accounts\x18\x01 \x03(\v27.scalekit.v1.connected_accounts.ConnectedAccountForListR\x11connectedAccounts\x12e\n" + + "\n" + + "total_size\x18\x02 \x01(\rBF\x92AC2\x92A 2\x14Connector identifierJ\b\"notion\"\xbaH\x18r\x16\x10\x00\x1822\x10^[a-zA-Z0-9_-]*$H\x02R\tconnector\x88\x01\x01\x12b\n" + + "\n" + + "identifier\x18\x04 \x01(\tB=\x92A12!Organization ID for the connectorJ\f\"app_google\"\xbaH\x06r\x04\x10\x00\x18dH\x03R\n" + + "identifier\x88\x01\x01\x12\xbd\x02\n" + + "\x11connected_account\x18\x05 \x01(\v26.scalekit.v1.connected_accounts.CreateConnectedAccountB\xd7\x01\x92A\xcd\x012*Details of the connected account to createJ\x9e\x01{ \"authorization_type\": \"OAUTH2\", \"authorization_details\": { \"oauth_token\": { \"access_token\": \"...\", \"refresh_token\": \"...\", \"scopes\": [\"read\", \"write\"] } } }\xbaH\x03\xc8\x01\x01R\x10connectedAccountB\x12\n" + + "\x10_organization_idB\n" + + "\n" + + "\b_user_idB\f\n" + + "\n" + + "_connectorB\r\n" + + "\v_identifier\"\xaf\x01\n" + + "\x1eCreateConnectedAccountResponse\x12\x8c\x01\n" + + "\x11connected_account\x18\x01 \x01(\v20.scalekit.v1.connected_accounts.ConnectedAccountB-\x92A*2(Details of the created connected accountR\x10connectedAccount\"\x96\a\n" + + "\x1dUpdateConnectedAccountRequest\x12t\n" + + "\x0forganization_id\x18\x01 \x01(\tBF\x92A:2!Organization ID for the connectorJ\x15\"org_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x00R\x0eorganizationId\x88\x01\x01\x12]\n" + + "\auser_id\x18\x02 \x01(\tB?\x92A32\x19User ID for the connectorJ\x16\"user_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x01R\x06userId\x88\x01\x01\x12O\n" + + "\tconnector\x18\x03 \x01(\tB,\x92A 2\x14Connector identifierJ\b\"notion\"\xbaH\x06r\x04\x10\x00\x182H\x02R\tconnector\x88\x01\x01\x12b\n" + + "\n" + + "identifier\x18\x04 \x01(\tB=\x92A12!Organization ID for the connectorJ\f\"app_google\"\xbaH\x06r\x04\x10\x00\x18dH\x03R\n" + + "identifier\x88\x01\x01\x12g\n" + + "\x02id\x18\x06 \x01(\tBR\x92AA25Unique identifier for the connected account to updateJ\b\"ca_123\"\xbaH\vr\t\x10\x00\x18 :\x03ca_H\x04R\x02id\x88\x01\x01\x12\xbd\x02\n" + + "\x11connected_account\x18\x05 \x01(\v26.scalekit.v1.connected_accounts.UpdateConnectedAccountB\xd7\x01\x92A\xcd\x012*Details of the connected account to updateJ\x9e\x01{ \"authorization_type\": \"OAUTH2\", \"authorization_details\": { \"oauth_token\": { \"access_token\": \"...\", \"refresh_token\": \"...\", \"scopes\": [\"read\", \"write\"] } } }\xbaH\x03\xc8\x01\x01R\x10connectedAccountB\x12\n" + + "\x10_organization_idB\n" + + "\n" + + "\b_user_idB\f\n" + + "\n" + + "_connectorB\r\n" + + "\v_identifierB\x05\n" + + "\x03_id\"\xaf\x01\n" + + "\x1eUpdateConnectedAccountResponse\x12\x8c\x01\n" + + "\x11connected_account\x18\x01 \x01(\v20.scalekit.v1.connected_accounts.ConnectedAccountB-\x92A*2(Details of the updated connected accountR\x10connectedAccount\"\xe8\x04\n" + + "\x1dDeleteConnectedAccountRequest\x12t\n" + + "\x0forganization_id\x18\x01 \x01(\tBF\x92A:2!Organization ID for the connectorJ\x15\"org_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x00R\x0eorganizationId\x88\x01\x01\x12]\n" + + "\auser_id\x18\x02 \x01(\tB?\x92A32\x19User ID for the connectorJ\x16\"user_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x01R\x06userId\x88\x01\x01\x12a\n" + + "\tconnector\x18\x03 \x01(\tB>\x92A 2\x14Connector identifierJ\b\"notion\"\xbaH\x18r\x16\x10\x00\x1822\x10^[a-zA-Z0-9_-]*$H\x02R\tconnector\x88\x01\x01\x12b\n" + + "\n" + + "identifier\x18\x04 \x01(\tB=\x92A12!Organization ID for the connectorJ\f\"app_google\"\xbaH\x06r\x04\x10\x00\x18dH\x03R\n" + + "identifier\x88\x01\x01\x12g\n" + + "\x02id\x18\x05 \x01(\tBR\x92AA25Unique identifier for the connected account to deleteJ\b\"ca_123\"\xbaH\vr\t\x10\x00\x18 :\x03ca_H\x04R\x02id\x88\x01\x01B\x12\n" + + "\x10_organization_idB\n" + + "\n" + + "\b_user_idB\f\n" + + "\n" + + "_connectorB\r\n" + + "\v_identifierB\x05\n" + + "\x03_id\" \n" + + "\x1eDeleteConnectedAccountResponse\"\xd5\x04\n" + + "&GetMagicLinkForConnectedAccountRequest\x12t\n" + + "\x0forganization_id\x18\x01 \x01(\tBF\x92A:2!Organization ID for the connectorJ\x15\"org_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x00R\x0eorganizationId\x88\x01\x01\x12]\n" + + "\auser_id\x18\x02 \x01(\tB?\x92A32\x19User ID for the connectorJ\x16\"user_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x01R\x06userId\x88\x01\x01\x12O\n" + + "\tconnector\x18\x03 \x01(\tB,\x92A 2\x14Connector identifierJ\b\"notion\"\xbaH\x06r\x04\x10\x00\x182H\x02R\tconnector\x88\x01\x01\x12b\n" + + "\n" + + "identifier\x18\x04 \x01(\tB=\x92A12!Organization ID for the connectorJ\f\"app_google\"\xbaH\x06r\x04\x10\x00\x18dH\x03R\n" + + "identifier\x88\x01\x01\x12]\n" + + "\x02id\x18\x05 \x01(\tBH\x92A72+Unique identifier for the connected accountJ\b\"ca_123\"\xbaH\vr\t\x10\x00\x18 :\x03ca_H\x04R\x02id\x88\x01\x01B\x12\n" + + "\x10_organization_idB\n" + + "\n" + + "\b_user_idB\f\n" + + "\n" + + "_connectorB\r\n" + + "\v_identifierB\x05\n" + + "\x03_id\"\x99\x01\n" + + ".GetMagicLinkForConnectedAccountRedirectRequest\x12g\n" + + "\vredirect_to\x18\x01 \x01(\tBF\x92A:2!Organization ID for the connectorJ\x15\"org_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 R\n" + + "redirectTo\"\x9c\x02\n" + + "'GetMagicLinkForConnectedAccountResponse\x12r\n" + + "\x04link\x18\x01 \x01(\tB^\x92A[2%Authentication link for the connectorJ2\"https://notion.com/oauth/authorize?client_id=...\"R\x04link\x12}\n" + + "\x06expiry\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampBI\x92AF2,Expiry timestamp for the authentication linkJ\x16\"2024-03-20T15:04:05Z\"R\x06expiry\"\xb1\x02\n" + + "/GetMagicLinkForConnectedAccountRedirectResponse\x12\x7f\n" + + "\vredirect_to\x18\x01 \x01(\tB^\x92A[2%Authentication link for the connectorJ2\"https://notion.com/oauth/authorize?client_id=...\"R\n" + + "redirectTo\x12}\n" + + "\x06expiry\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampBI\x92AF2,Expiry timestamp for the authentication linkJ\x16\"2024-03-20T15:04:05Z\"R\x06expiry\"\xd5\x04\n" + + "&GetConnectedAccountByIdentifierRequest\x12t\n" + + "\x0forganization_id\x18\x01 \x01(\tBF\x92A:2!Organization ID for the connectorJ\x15\"org_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x00R\x0eorganizationId\x88\x01\x01\x12]\n" + + "\auser_id\x18\x02 \x01(\tB?\x92A32\x19User ID for the connectorJ\x16\"user_121312434123312\"\xbaH\x06r\x04\x10\x00\x18 H\x01R\x06userId\x88\x01\x01\x12O\n" + + "\tconnector\x18\x03 \x01(\tB,\x92A 2\x14Connector identifierJ\b\"notion\"\xbaH\x06r\x04\x10\x00\x182H\x02R\tconnector\x88\x01\x01\x12b\n" + + "\n" + + "identifier\x18\x04 \x01(\tB=\x92A12!Organization ID for the connectorJ\f\"app_google\"\xbaH\x06r\x04\x10\x00\x18dH\x03R\n" + + "identifier\x88\x01\x01\x12]\n" + + "\x02id\x18\x05 \x01(\tBH\x92A72+Unique identifier for the connected accountJ\b\"ca_123\"\xbaH\vr\t\x10\x00\x18 :\x03ca_H\x04R\x02id\x88\x01\x01B\x12\n" + + "\x10_organization_idB\n" + + "\n" + + "\b_user_idB\f\n" + + "\n" + + "_connectorB\r\n" + + "\v_identifierB\x05\n" + + "\x03_id\"\x88\x01\n" + + "'GetConnectedAccountByIdentifierResponse\x12]\n" + + "\x11connected_account\x18\x01 \x01(\v20.scalekit.v1.connected_accounts.ConnectedAccountR\x10connectedAccount\"\xff\x05\n" + + "\x10ConnectedAccount\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\tR\n" + + "identifier\x12\x1a\n" + + "\bprovider\x18\x02 \x01(\tR\bprovider\x12G\n" + + "\x06status\x18\x03 \x01(\x0e2/.scalekit.v1.connected_accounts.ConnectorStatusR\x06status\x12\\\n" + + "\x12authorization_type\x18\x04 \x01(\x0e2-.scalekit.v1.connected_accounts.ConnectorTypeR\x11authorizationType\x12i\n" + + "\x15authorization_details\x18\x05 \x01(\v24.scalekit.v1.connected_accounts.AuthorizationDetailsR\x14authorizationDetails\x12D\n" + + "\x10token_expires_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x0etokenExpiresAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1c\n" + + "\tconnector\x18\b \x01(\tR\tconnector\x12<\n" + + "\flast_used_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "lastUsedAt\x12X\n" + + "\x02id\x18\n" + + " \x01(\tBH\x92A72+Unique identifier for the connected accountJ\b\"ca_123\"\xbaH\vr\t\x10\x00\x18 :\x03ca_R\x02id\x12f\n" + + "\rconnection_id\x18\v \x01(\tBA\x92A52'Connection ID for the connected accountJ\n" + + "\"conn_123\"\xbaH\x06r\x04\x10\x00\x18 R\fconnectionId\"\xfd\x01\n" + + "\x16CreateConnectedAccount\x12\xac\x01\n" + + "\x15authorization_details\x18\x05 \x01(\v24.scalekit.v1.connected_accounts.AuthorizationDetailsBA\x92A826Details of the authorization for the connected account\xbaH\x03\xc8\x01\x01R\x14authorizationDetailsJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\x04\x10\x05J\x04\b\x06\x10\aJ\x04\b\a\x10\bJ\x04\b\b\x10\tJ\x04\b\t\x10\n" + + "J\x04\b\n" + + "\x10\v\"\xf7\x01\n" + + "\x16UpdateConnectedAccount\x12\xac\x01\n" + + "\x15authorization_details\x18\x05 \x01(\v24.scalekit.v1.connected_accounts.AuthorizationDetailsBA\x92A826Details of the authorization for the connected account\xbaH\x03\xc8\x01\x01R\x14authorizationDetailsJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\x04\x10\x05J\x04\b\x06\x10\aJ\x04\b\a\x10\bJ\x04\b\b\x10\tJ\x04\b\t\x10\n" + + "\"\xd7\x04\n" + + "\x17ConnectedAccountForList\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\tR\n" + + "identifier\x12\x1a\n" + + "\bprovider\x18\x02 \x01(\tR\bprovider\x12G\n" + + "\x06status\x18\x03 \x01(\x0e2/.scalekit.v1.connected_accounts.ConnectorStatusR\x06status\x12\\\n" + + "\x12authorization_type\x18\x04 \x01(\x0e2-.scalekit.v1.connected_accounts.ConnectorTypeR\x11authorizationType\x12D\n" + + "\x10token_expires_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x0etokenExpiresAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1c\n" + + "\tconnector\x18\b \x01(\tR\tconnector\x12<\n" + + "\flast_used_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "lastUsedAt\x12\x0e\n" + + "\x02id\x18\n" + + " \x01(\tR\x02id\x12f\n" + + "\rconnection_id\x18\v \x01(\tBA\x92A52'Connection ID for the connected accountJ\n" + + "\"conn_123\"\xbaH\x06r\x04\x10\x00\x18 R\fconnectionIdJ\x04\b\x05\x10\x06\"\xbf\x01\n" + + "\x14AuthorizationDetails\x12M\n" + + "\voauth_token\x18\x01 \x01(\v2*.scalekit.v1.connected_accounts.OauthTokenH\x00R\n" + + "oauthToken\x12M\n" + + "\vstatic_auth\x18\x02 \x01(\v2*.scalekit.v1.connected_accounts.StaticAuthH\x00R\n" + + "staticAuthB\t\n" + + "\adetails\"l\n" + + "\n" + + "OauthToken\x12!\n" + + "\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" + + "\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\x12\x16\n" + + "\x06scopes\x18\x03 \x03(\tR\x06scopes\"?\n" + + "\n" + + "StaticAuth\x121\n" + + "\adetails\x18\x01 \x01(\v2\x17.google.protobuf.StructR\adetails*_\n" + + "\x0fConnectorStatus\x12!\n" + + "\x1dCONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\n" + + "\n" + + "\x06ACTIVE\x10\x01\x12\v\n" + + "\aEXPIRED\x10\x02\x12\x10\n" + + "\fPENDING_AUTH\x10\x03*\x81\x01\n" + + "\rConnectorType\x12\x1f\n" + + "\x1bCONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\t\n" + + "\x05OAUTH\x10\x01\x12\v\n" + + "\aAPI_KEY\x10\x02\x12\x0e\n" + + "\n" + + "BASIC_AUTH\x10\x03\x12\x10\n" + + "\fBEARER_TOKEN\x10\x04\x12\n" + + "\n" + + "\x06CUSTOM\x10\x05\x12\t\n" + + "\x05BASIC\x10\x062\xb0\x15\n" + + "\x17ConnectedAccountService\x12\xd0\x02\n" + + "\x15ListConnectedAccounts\x12<.scalekit.v1.connected_accounts.ListConnectedAccountsRequest\x1a=.scalekit.v1.connected_accounts.ListConnectedAccountsResponse\"\xb9\x01\x92A\x7f\n" + + "\rAppConnectors\x12\x1bList all connected accounts\x1aQList all connected accounts, optionally filtered by connection and/or identifier.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02\x1c\x12\x1a/api/v1/connected_accounts\x12\x8a\x03\n" + + "\x17SearchConnectedAccounts\x12>.scalekit.v1.connected_accounts.SearchConnectedAccountsRequest\x1a?.scalekit.v1.connected_accounts.SearchConnectedAccountsResponse\"\xed\x01\x92A\xab\x01\n" + + "\rAppConnectors\x12\x19Search connected accounts\x1a\x7fSearch for connected accounts in your environment using a text query that matches against identifiers, providers, or connectors\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02#\x12!/api/v1/connected_accounts:search\x12\xa3\x02\n" + + "\x16CreateConnectedAccount\x12=.scalekit.v1.connected_accounts.CreateConnectedAccountRequest\x1a>.scalekit.v1.connected_accounts.CreateConnectedAccountResponse\"\x89\x01\x92AL\n" + + "\rAppConnectors\x12\x1aCreate a connected account\x1a\x1fCreate a new connected account.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v1/connected_accounts\x12\xa9\x02\n" + + "\x16UpdateConnectedAccount\x12=.scalekit.v1.connected_accounts.UpdateConnectedAccountRequest\x1a>.scalekit.v1.connected_accounts.UpdateConnectedAccountResponse\"\x8f\x01\x92AR\n" + + "\rAppConnectors\x12\x1aUpdate a connected account\x1a%Update an existing connected account.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02\x1f:\x01*\x1a\x1a/api/v1/connected_accounts\x12\xa6\x02\n" + + "\x16DeleteConnectedAccount\x12=.scalekit.v1.connected_accounts.DeleteConnectedAccountRequest\x1a>.scalekit.v1.connected_accounts.DeleteConnectedAccountResponse\"\x8c\x01\x92AH\n" + + "\rAppConnectors\x12\x1aDelete a connected account\x1a\x1bDelete a connected account.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02&:\x01*\"!/api/v1/connected_accounts:delete\x12\xe1\x02\n" + + "\x1fGetMagicLinkForConnectedAccount\x12F.scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRequest\x1aG.scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountResponse\"\xac\x01\x92Ad\n" + + "\rAppConnectors\x12(Get a magic link for a connected account\x1a)Get a magic link for a connected account.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02*:\x01*\"%/api/v1/connected_accounts/magic_link\x12\xcc\x02\n" + + "\x17GetConnectedAccountAuth\x12F.scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierRequest\x1aG.scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierResponse\"\x9f\x01\x92A`\n" + + "\rAppConnectors\x12#Get connected account by identifier\x1a*Get a connected account by its identifier.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02!\x12\x1f/api/v1/connected_accounts/auth\x12\x86\x03\n" + + "+GetMagicLinkForConnectedAccountWithRedirect\x12N.scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest\x1aO.scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse\"\xb5\x01\x92Ad\n" + + "\rAppConnectors\x12(Get a magic link for a connected account\x1a)Get a magic link for a connected account.\x82\xb5\x18\x02\x18\x01\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x023:\x01*\"./api/v1/connected_accounts/magic_link/redirectB\xa6\x02\n" + + "\"com.scalekit.v1.connected_accountsB\x16ConnectedAccountsProtoP\x01ZRgithub.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/connected_accounts\xa2\x02\x03SVC\xaa\x02\x1dScalekit.V1.ConnectedAccounts\xca\x02\x1dScalekit\\V1\\ConnectedAccounts\xe2\x02)Scalekit\\V1\\ConnectedAccounts\\GPBMetadata\xea\x02\x1fScalekit::V1::ConnectedAccountsb\x06proto3" + +var ( + file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescOnce sync.Once + file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescData []byte +) + +func file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescGZIP() []byte { + file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescOnce.Do(func() { + file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDesc), len(file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDesc))) + }) + return file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDescData +} + +var file_scalekit_v1_connected_accounts_connected_accounts_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_scalekit_v1_connected_accounts_connected_accounts_proto_goTypes = []any{ + (ConnectorStatus)(0), // 0: scalekit.v1.connected_accounts.ConnectorStatus + (ConnectorType)(0), // 1: scalekit.v1.connected_accounts.ConnectorType + (*ListConnectedAccountsRequest)(nil), // 2: scalekit.v1.connected_accounts.ListConnectedAccountsRequest + (*ListConnectedAccountsResponse)(nil), // 3: scalekit.v1.connected_accounts.ListConnectedAccountsResponse + (*SearchConnectedAccountsRequest)(nil), // 4: scalekit.v1.connected_accounts.SearchConnectedAccountsRequest + (*SearchConnectedAccountsResponse)(nil), // 5: scalekit.v1.connected_accounts.SearchConnectedAccountsResponse + (*CreateConnectedAccountRequest)(nil), // 6: scalekit.v1.connected_accounts.CreateConnectedAccountRequest + (*CreateConnectedAccountResponse)(nil), // 7: scalekit.v1.connected_accounts.CreateConnectedAccountResponse + (*UpdateConnectedAccountRequest)(nil), // 8: scalekit.v1.connected_accounts.UpdateConnectedAccountRequest + (*UpdateConnectedAccountResponse)(nil), // 9: scalekit.v1.connected_accounts.UpdateConnectedAccountResponse + (*DeleteConnectedAccountRequest)(nil), // 10: scalekit.v1.connected_accounts.DeleteConnectedAccountRequest + (*DeleteConnectedAccountResponse)(nil), // 11: scalekit.v1.connected_accounts.DeleteConnectedAccountResponse + (*GetMagicLinkForConnectedAccountRequest)(nil), // 12: scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRequest + (*GetMagicLinkForConnectedAccountRedirectRequest)(nil), // 13: scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest + (*GetMagicLinkForConnectedAccountResponse)(nil), // 14: scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountResponse + (*GetMagicLinkForConnectedAccountRedirectResponse)(nil), // 15: scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse + (*GetConnectedAccountByIdentifierRequest)(nil), // 16: scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierRequest + (*GetConnectedAccountByIdentifierResponse)(nil), // 17: scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierResponse + (*ConnectedAccount)(nil), // 18: scalekit.v1.connected_accounts.ConnectedAccount + (*CreateConnectedAccount)(nil), // 19: scalekit.v1.connected_accounts.CreateConnectedAccount + (*UpdateConnectedAccount)(nil), // 20: scalekit.v1.connected_accounts.UpdateConnectedAccount + (*ConnectedAccountForList)(nil), // 21: scalekit.v1.connected_accounts.ConnectedAccountForList + (*AuthorizationDetails)(nil), // 22: scalekit.v1.connected_accounts.AuthorizationDetails + (*OauthToken)(nil), // 23: scalekit.v1.connected_accounts.OauthToken + (*StaticAuth)(nil), // 24: scalekit.v1.connected_accounts.StaticAuth + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*structpb.Struct)(nil), // 26: google.protobuf.Struct +} +var file_scalekit_v1_connected_accounts_connected_accounts_proto_depIdxs = []int32{ + 21, // 0: scalekit.v1.connected_accounts.ListConnectedAccountsResponse.connected_accounts:type_name -> scalekit.v1.connected_accounts.ConnectedAccountForList + 21, // 1: scalekit.v1.connected_accounts.SearchConnectedAccountsResponse.connected_accounts:type_name -> scalekit.v1.connected_accounts.ConnectedAccountForList + 19, // 2: scalekit.v1.connected_accounts.CreateConnectedAccountRequest.connected_account:type_name -> scalekit.v1.connected_accounts.CreateConnectedAccount + 18, // 3: scalekit.v1.connected_accounts.CreateConnectedAccountResponse.connected_account:type_name -> scalekit.v1.connected_accounts.ConnectedAccount + 20, // 4: scalekit.v1.connected_accounts.UpdateConnectedAccountRequest.connected_account:type_name -> scalekit.v1.connected_accounts.UpdateConnectedAccount + 18, // 5: scalekit.v1.connected_accounts.UpdateConnectedAccountResponse.connected_account:type_name -> scalekit.v1.connected_accounts.ConnectedAccount + 25, // 6: scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountResponse.expiry:type_name -> google.protobuf.Timestamp + 25, // 7: scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse.expiry:type_name -> google.protobuf.Timestamp + 18, // 8: scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierResponse.connected_account:type_name -> scalekit.v1.connected_accounts.ConnectedAccount + 0, // 9: scalekit.v1.connected_accounts.ConnectedAccount.status:type_name -> scalekit.v1.connected_accounts.ConnectorStatus + 1, // 10: scalekit.v1.connected_accounts.ConnectedAccount.authorization_type:type_name -> scalekit.v1.connected_accounts.ConnectorType + 22, // 11: scalekit.v1.connected_accounts.ConnectedAccount.authorization_details:type_name -> scalekit.v1.connected_accounts.AuthorizationDetails + 25, // 12: scalekit.v1.connected_accounts.ConnectedAccount.token_expires_at:type_name -> google.protobuf.Timestamp + 25, // 13: scalekit.v1.connected_accounts.ConnectedAccount.updated_at:type_name -> google.protobuf.Timestamp + 25, // 14: scalekit.v1.connected_accounts.ConnectedAccount.last_used_at:type_name -> google.protobuf.Timestamp + 22, // 15: scalekit.v1.connected_accounts.CreateConnectedAccount.authorization_details:type_name -> scalekit.v1.connected_accounts.AuthorizationDetails + 22, // 16: scalekit.v1.connected_accounts.UpdateConnectedAccount.authorization_details:type_name -> scalekit.v1.connected_accounts.AuthorizationDetails + 0, // 17: scalekit.v1.connected_accounts.ConnectedAccountForList.status:type_name -> scalekit.v1.connected_accounts.ConnectorStatus + 1, // 18: scalekit.v1.connected_accounts.ConnectedAccountForList.authorization_type:type_name -> scalekit.v1.connected_accounts.ConnectorType + 25, // 19: scalekit.v1.connected_accounts.ConnectedAccountForList.token_expires_at:type_name -> google.protobuf.Timestamp + 25, // 20: scalekit.v1.connected_accounts.ConnectedAccountForList.updated_at:type_name -> google.protobuf.Timestamp + 25, // 21: scalekit.v1.connected_accounts.ConnectedAccountForList.last_used_at:type_name -> google.protobuf.Timestamp + 23, // 22: scalekit.v1.connected_accounts.AuthorizationDetails.oauth_token:type_name -> scalekit.v1.connected_accounts.OauthToken + 24, // 23: scalekit.v1.connected_accounts.AuthorizationDetails.static_auth:type_name -> scalekit.v1.connected_accounts.StaticAuth + 26, // 24: scalekit.v1.connected_accounts.StaticAuth.details:type_name -> google.protobuf.Struct + 2, // 25: scalekit.v1.connected_accounts.ConnectedAccountService.ListConnectedAccounts:input_type -> scalekit.v1.connected_accounts.ListConnectedAccountsRequest + 4, // 26: scalekit.v1.connected_accounts.ConnectedAccountService.SearchConnectedAccounts:input_type -> scalekit.v1.connected_accounts.SearchConnectedAccountsRequest + 6, // 27: scalekit.v1.connected_accounts.ConnectedAccountService.CreateConnectedAccount:input_type -> scalekit.v1.connected_accounts.CreateConnectedAccountRequest + 8, // 28: scalekit.v1.connected_accounts.ConnectedAccountService.UpdateConnectedAccount:input_type -> scalekit.v1.connected_accounts.UpdateConnectedAccountRequest + 10, // 29: scalekit.v1.connected_accounts.ConnectedAccountService.DeleteConnectedAccount:input_type -> scalekit.v1.connected_accounts.DeleteConnectedAccountRequest + 12, // 30: scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccount:input_type -> scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRequest + 16, // 31: scalekit.v1.connected_accounts.ConnectedAccountService.GetConnectedAccountAuth:input_type -> scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierRequest + 13, // 32: scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccountWithRedirect:input_type -> scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest + 3, // 33: scalekit.v1.connected_accounts.ConnectedAccountService.ListConnectedAccounts:output_type -> scalekit.v1.connected_accounts.ListConnectedAccountsResponse + 5, // 34: scalekit.v1.connected_accounts.ConnectedAccountService.SearchConnectedAccounts:output_type -> scalekit.v1.connected_accounts.SearchConnectedAccountsResponse + 7, // 35: scalekit.v1.connected_accounts.ConnectedAccountService.CreateConnectedAccount:output_type -> scalekit.v1.connected_accounts.CreateConnectedAccountResponse + 9, // 36: scalekit.v1.connected_accounts.ConnectedAccountService.UpdateConnectedAccount:output_type -> scalekit.v1.connected_accounts.UpdateConnectedAccountResponse + 11, // 37: scalekit.v1.connected_accounts.ConnectedAccountService.DeleteConnectedAccount:output_type -> scalekit.v1.connected_accounts.DeleteConnectedAccountResponse + 14, // 38: scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccount:output_type -> scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountResponse + 17, // 39: scalekit.v1.connected_accounts.ConnectedAccountService.GetConnectedAccountAuth:output_type -> scalekit.v1.connected_accounts.GetConnectedAccountByIdentifierResponse + 15, // 40: scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccountWithRedirect:output_type -> scalekit.v1.connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse + 33, // [33:41] is the sub-list for method output_type + 25, // [25:33] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name +} + +func init() { file_scalekit_v1_connected_accounts_connected_accounts_proto_init() } +func file_scalekit_v1_connected_accounts_connected_accounts_proto_init() { + if File_scalekit_v1_connected_accounts_connected_accounts_proto != nil { + return + } + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[0].OneofWrappers = []any{} + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[4].OneofWrappers = []any{} + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[6].OneofWrappers = []any{} + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[8].OneofWrappers = []any{} + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[10].OneofWrappers = []any{} + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[14].OneofWrappers = []any{} + file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes[20].OneofWrappers = []any{ + (*AuthorizationDetails_OauthToken)(nil), + (*AuthorizationDetails_StaticAuth)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDesc), len(file_scalekit_v1_connected_accounts_connected_accounts_proto_rawDesc)), + NumEnums: 2, + NumMessages: 23, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_scalekit_v1_connected_accounts_connected_accounts_proto_goTypes, + DependencyIndexes: file_scalekit_v1_connected_accounts_connected_accounts_proto_depIdxs, + EnumInfos: file_scalekit_v1_connected_accounts_connected_accounts_proto_enumTypes, + MessageInfos: file_scalekit_v1_connected_accounts_connected_accounts_proto_msgTypes, + }.Build() + File_scalekit_v1_connected_accounts_connected_accounts_proto = out.File + file_scalekit_v1_connected_accounts_connected_accounts_proto_goTypes = nil + file_scalekit_v1_connected_accounts_connected_accounts_proto_depIdxs = nil +} diff --git a/pkg/grpc/scalekit/v1/connected_accounts/connected_accountsconnect/connected_accounts.connect.go b/pkg/grpc/scalekit/v1/connected_accounts/connected_accountsconnect/connected_accounts.connect.go new file mode 100644 index 0000000..54507ab --- /dev/null +++ b/pkg/grpc/scalekit/v1/connected_accounts/connected_accountsconnect/connected_accounts.connect.go @@ -0,0 +1,326 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: scalekit/v1/connected_accounts/connected_accounts.proto + +package connected_accountsconnect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + connected_accounts "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/connected_accounts" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // ConnectedAccountServiceName is the fully-qualified name of the ConnectedAccountService service. + ConnectedAccountServiceName = "scalekit.v1.connected_accounts.ConnectedAccountService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // ConnectedAccountServiceListConnectedAccountsProcedure is the fully-qualified name of the + // ConnectedAccountService's ListConnectedAccounts RPC. + ConnectedAccountServiceListConnectedAccountsProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/ListConnectedAccounts" + // ConnectedAccountServiceSearchConnectedAccountsProcedure is the fully-qualified name of the + // ConnectedAccountService's SearchConnectedAccounts RPC. + ConnectedAccountServiceSearchConnectedAccountsProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/SearchConnectedAccounts" + // ConnectedAccountServiceCreateConnectedAccountProcedure is the fully-qualified name of the + // ConnectedAccountService's CreateConnectedAccount RPC. + ConnectedAccountServiceCreateConnectedAccountProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/CreateConnectedAccount" + // ConnectedAccountServiceUpdateConnectedAccountProcedure is the fully-qualified name of the + // ConnectedAccountService's UpdateConnectedAccount RPC. + ConnectedAccountServiceUpdateConnectedAccountProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/UpdateConnectedAccount" + // ConnectedAccountServiceDeleteConnectedAccountProcedure is the fully-qualified name of the + // ConnectedAccountService's DeleteConnectedAccount RPC. + ConnectedAccountServiceDeleteConnectedAccountProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/DeleteConnectedAccount" + // ConnectedAccountServiceGetMagicLinkForConnectedAccountProcedure is the fully-qualified name of + // the ConnectedAccountService's GetMagicLinkForConnectedAccount RPC. + ConnectedAccountServiceGetMagicLinkForConnectedAccountProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/GetMagicLinkForConnectedAccount" + // ConnectedAccountServiceGetConnectedAccountAuthProcedure is the fully-qualified name of the + // ConnectedAccountService's GetConnectedAccountAuth RPC. + ConnectedAccountServiceGetConnectedAccountAuthProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/GetConnectedAccountAuth" + // ConnectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectProcedure is the + // fully-qualified name of the ConnectedAccountService's GetMagicLinkForConnectedAccountWithRedirect + // RPC. + ConnectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectProcedure = "/scalekit.v1.connected_accounts.ConnectedAccountService/GetMagicLinkForConnectedAccountWithRedirect" +) + +// ConnectedAccountServiceClient is a client for the +// scalekit.v1.connected_accounts.ConnectedAccountService service. +type ConnectedAccountServiceClient interface { + ListConnectedAccounts(context.Context, *connect.Request[connected_accounts.ListConnectedAccountsRequest]) (*connect.Response[connected_accounts.ListConnectedAccountsResponse], error) + SearchConnectedAccounts(context.Context, *connect.Request[connected_accounts.SearchConnectedAccountsRequest]) (*connect.Response[connected_accounts.SearchConnectedAccountsResponse], error) + CreateConnectedAccount(context.Context, *connect.Request[connected_accounts.CreateConnectedAccountRequest]) (*connect.Response[connected_accounts.CreateConnectedAccountResponse], error) + UpdateConnectedAccount(context.Context, *connect.Request[connected_accounts.UpdateConnectedAccountRequest]) (*connect.Response[connected_accounts.UpdateConnectedAccountResponse], error) + DeleteConnectedAccount(context.Context, *connect.Request[connected_accounts.DeleteConnectedAccountRequest]) (*connect.Response[connected_accounts.DeleteConnectedAccountResponse], error) + GetMagicLinkForConnectedAccount(context.Context, *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountResponse], error) + // this will return the auth details for a connected account by its identifier + GetConnectedAccountAuth(context.Context, *connect.Request[connected_accounts.GetConnectedAccountByIdentifierRequest]) (*connect.Response[connected_accounts.GetConnectedAccountByIdentifierResponse], error) + GetMagicLinkForConnectedAccountWithRedirect(context.Context, *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse], error) +} + +// NewConnectedAccountServiceClient constructs a client for the +// scalekit.v1.connected_accounts.ConnectedAccountService service. By default, it uses the Connect +// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed +// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewConnectedAccountServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConnectedAccountServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + connectedAccountServiceMethods := connected_accounts.File_scalekit_v1_connected_accounts_connected_accounts_proto.Services().ByName("ConnectedAccountService").Methods() + return &connectedAccountServiceClient{ + listConnectedAccounts: connect.NewClient[connected_accounts.ListConnectedAccountsRequest, connected_accounts.ListConnectedAccountsResponse]( + httpClient, + baseURL+ConnectedAccountServiceListConnectedAccountsProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("ListConnectedAccounts")), + connect.WithClientOptions(opts...), + ), + searchConnectedAccounts: connect.NewClient[connected_accounts.SearchConnectedAccountsRequest, connected_accounts.SearchConnectedAccountsResponse]( + httpClient, + baseURL+ConnectedAccountServiceSearchConnectedAccountsProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("SearchConnectedAccounts")), + connect.WithClientOptions(opts...), + ), + createConnectedAccount: connect.NewClient[connected_accounts.CreateConnectedAccountRequest, connected_accounts.CreateConnectedAccountResponse]( + httpClient, + baseURL+ConnectedAccountServiceCreateConnectedAccountProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("CreateConnectedAccount")), + connect.WithClientOptions(opts...), + ), + updateConnectedAccount: connect.NewClient[connected_accounts.UpdateConnectedAccountRequest, connected_accounts.UpdateConnectedAccountResponse]( + httpClient, + baseURL+ConnectedAccountServiceUpdateConnectedAccountProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("UpdateConnectedAccount")), + connect.WithClientOptions(opts...), + ), + deleteConnectedAccount: connect.NewClient[connected_accounts.DeleteConnectedAccountRequest, connected_accounts.DeleteConnectedAccountResponse]( + httpClient, + baseURL+ConnectedAccountServiceDeleteConnectedAccountProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("DeleteConnectedAccount")), + connect.WithClientOptions(opts...), + ), + getMagicLinkForConnectedAccount: connect.NewClient[connected_accounts.GetMagicLinkForConnectedAccountRequest, connected_accounts.GetMagicLinkForConnectedAccountResponse]( + httpClient, + baseURL+ConnectedAccountServiceGetMagicLinkForConnectedAccountProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("GetMagicLinkForConnectedAccount")), + connect.WithClientOptions(opts...), + ), + getConnectedAccountAuth: connect.NewClient[connected_accounts.GetConnectedAccountByIdentifierRequest, connected_accounts.GetConnectedAccountByIdentifierResponse]( + httpClient, + baseURL+ConnectedAccountServiceGetConnectedAccountAuthProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("GetConnectedAccountAuth")), + connect.WithClientOptions(opts...), + ), + getMagicLinkForConnectedAccountWithRedirect: connect.NewClient[connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest, connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse]( + httpClient, + baseURL+ConnectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectProcedure, + connect.WithSchema(connectedAccountServiceMethods.ByName("GetMagicLinkForConnectedAccountWithRedirect")), + connect.WithClientOptions(opts...), + ), + } +} + +// connectedAccountServiceClient implements ConnectedAccountServiceClient. +type connectedAccountServiceClient struct { + listConnectedAccounts *connect.Client[connected_accounts.ListConnectedAccountsRequest, connected_accounts.ListConnectedAccountsResponse] + searchConnectedAccounts *connect.Client[connected_accounts.SearchConnectedAccountsRequest, connected_accounts.SearchConnectedAccountsResponse] + createConnectedAccount *connect.Client[connected_accounts.CreateConnectedAccountRequest, connected_accounts.CreateConnectedAccountResponse] + updateConnectedAccount *connect.Client[connected_accounts.UpdateConnectedAccountRequest, connected_accounts.UpdateConnectedAccountResponse] + deleteConnectedAccount *connect.Client[connected_accounts.DeleteConnectedAccountRequest, connected_accounts.DeleteConnectedAccountResponse] + getMagicLinkForConnectedAccount *connect.Client[connected_accounts.GetMagicLinkForConnectedAccountRequest, connected_accounts.GetMagicLinkForConnectedAccountResponse] + getConnectedAccountAuth *connect.Client[connected_accounts.GetConnectedAccountByIdentifierRequest, connected_accounts.GetConnectedAccountByIdentifierResponse] + getMagicLinkForConnectedAccountWithRedirect *connect.Client[connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest, connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse] +} + +// ListConnectedAccounts calls +// scalekit.v1.connected_accounts.ConnectedAccountService.ListConnectedAccounts. +func (c *connectedAccountServiceClient) ListConnectedAccounts(ctx context.Context, req *connect.Request[connected_accounts.ListConnectedAccountsRequest]) (*connect.Response[connected_accounts.ListConnectedAccountsResponse], error) { + return c.listConnectedAccounts.CallUnary(ctx, req) +} + +// SearchConnectedAccounts calls +// scalekit.v1.connected_accounts.ConnectedAccountService.SearchConnectedAccounts. +func (c *connectedAccountServiceClient) SearchConnectedAccounts(ctx context.Context, req *connect.Request[connected_accounts.SearchConnectedAccountsRequest]) (*connect.Response[connected_accounts.SearchConnectedAccountsResponse], error) { + return c.searchConnectedAccounts.CallUnary(ctx, req) +} + +// CreateConnectedAccount calls +// scalekit.v1.connected_accounts.ConnectedAccountService.CreateConnectedAccount. +func (c *connectedAccountServiceClient) CreateConnectedAccount(ctx context.Context, req *connect.Request[connected_accounts.CreateConnectedAccountRequest]) (*connect.Response[connected_accounts.CreateConnectedAccountResponse], error) { + return c.createConnectedAccount.CallUnary(ctx, req) +} + +// UpdateConnectedAccount calls +// scalekit.v1.connected_accounts.ConnectedAccountService.UpdateConnectedAccount. +func (c *connectedAccountServiceClient) UpdateConnectedAccount(ctx context.Context, req *connect.Request[connected_accounts.UpdateConnectedAccountRequest]) (*connect.Response[connected_accounts.UpdateConnectedAccountResponse], error) { + return c.updateConnectedAccount.CallUnary(ctx, req) +} + +// DeleteConnectedAccount calls +// scalekit.v1.connected_accounts.ConnectedAccountService.DeleteConnectedAccount. +func (c *connectedAccountServiceClient) DeleteConnectedAccount(ctx context.Context, req *connect.Request[connected_accounts.DeleteConnectedAccountRequest]) (*connect.Response[connected_accounts.DeleteConnectedAccountResponse], error) { + return c.deleteConnectedAccount.CallUnary(ctx, req) +} + +// GetMagicLinkForConnectedAccount calls +// scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccount. +func (c *connectedAccountServiceClient) GetMagicLinkForConnectedAccount(ctx context.Context, req *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountResponse], error) { + return c.getMagicLinkForConnectedAccount.CallUnary(ctx, req) +} + +// GetConnectedAccountAuth calls +// scalekit.v1.connected_accounts.ConnectedAccountService.GetConnectedAccountAuth. +func (c *connectedAccountServiceClient) GetConnectedAccountAuth(ctx context.Context, req *connect.Request[connected_accounts.GetConnectedAccountByIdentifierRequest]) (*connect.Response[connected_accounts.GetConnectedAccountByIdentifierResponse], error) { + return c.getConnectedAccountAuth.CallUnary(ctx, req) +} + +// GetMagicLinkForConnectedAccountWithRedirect calls +// scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccountWithRedirect. +func (c *connectedAccountServiceClient) GetMagicLinkForConnectedAccountWithRedirect(ctx context.Context, req *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse], error) { + return c.getMagicLinkForConnectedAccountWithRedirect.CallUnary(ctx, req) +} + +// ConnectedAccountServiceHandler is an implementation of the +// scalekit.v1.connected_accounts.ConnectedAccountService service. +type ConnectedAccountServiceHandler interface { + ListConnectedAccounts(context.Context, *connect.Request[connected_accounts.ListConnectedAccountsRequest]) (*connect.Response[connected_accounts.ListConnectedAccountsResponse], error) + SearchConnectedAccounts(context.Context, *connect.Request[connected_accounts.SearchConnectedAccountsRequest]) (*connect.Response[connected_accounts.SearchConnectedAccountsResponse], error) + CreateConnectedAccount(context.Context, *connect.Request[connected_accounts.CreateConnectedAccountRequest]) (*connect.Response[connected_accounts.CreateConnectedAccountResponse], error) + UpdateConnectedAccount(context.Context, *connect.Request[connected_accounts.UpdateConnectedAccountRequest]) (*connect.Response[connected_accounts.UpdateConnectedAccountResponse], error) + DeleteConnectedAccount(context.Context, *connect.Request[connected_accounts.DeleteConnectedAccountRequest]) (*connect.Response[connected_accounts.DeleteConnectedAccountResponse], error) + GetMagicLinkForConnectedAccount(context.Context, *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountResponse], error) + // this will return the auth details for a connected account by its identifier + GetConnectedAccountAuth(context.Context, *connect.Request[connected_accounts.GetConnectedAccountByIdentifierRequest]) (*connect.Response[connected_accounts.GetConnectedAccountByIdentifierResponse], error) + GetMagicLinkForConnectedAccountWithRedirect(context.Context, *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse], error) +} + +// NewConnectedAccountServiceHandler builds an HTTP handler from the service implementation. It +// returns the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewConnectedAccountServiceHandler(svc ConnectedAccountServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + connectedAccountServiceMethods := connected_accounts.File_scalekit_v1_connected_accounts_connected_accounts_proto.Services().ByName("ConnectedAccountService").Methods() + connectedAccountServiceListConnectedAccountsHandler := connect.NewUnaryHandler( + ConnectedAccountServiceListConnectedAccountsProcedure, + svc.ListConnectedAccounts, + connect.WithSchema(connectedAccountServiceMethods.ByName("ListConnectedAccounts")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceSearchConnectedAccountsHandler := connect.NewUnaryHandler( + ConnectedAccountServiceSearchConnectedAccountsProcedure, + svc.SearchConnectedAccounts, + connect.WithSchema(connectedAccountServiceMethods.ByName("SearchConnectedAccounts")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceCreateConnectedAccountHandler := connect.NewUnaryHandler( + ConnectedAccountServiceCreateConnectedAccountProcedure, + svc.CreateConnectedAccount, + connect.WithSchema(connectedAccountServiceMethods.ByName("CreateConnectedAccount")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceUpdateConnectedAccountHandler := connect.NewUnaryHandler( + ConnectedAccountServiceUpdateConnectedAccountProcedure, + svc.UpdateConnectedAccount, + connect.WithSchema(connectedAccountServiceMethods.ByName("UpdateConnectedAccount")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceDeleteConnectedAccountHandler := connect.NewUnaryHandler( + ConnectedAccountServiceDeleteConnectedAccountProcedure, + svc.DeleteConnectedAccount, + connect.WithSchema(connectedAccountServiceMethods.ByName("DeleteConnectedAccount")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceGetMagicLinkForConnectedAccountHandler := connect.NewUnaryHandler( + ConnectedAccountServiceGetMagicLinkForConnectedAccountProcedure, + svc.GetMagicLinkForConnectedAccount, + connect.WithSchema(connectedAccountServiceMethods.ByName("GetMagicLinkForConnectedAccount")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceGetConnectedAccountAuthHandler := connect.NewUnaryHandler( + ConnectedAccountServiceGetConnectedAccountAuthProcedure, + svc.GetConnectedAccountAuth, + connect.WithSchema(connectedAccountServiceMethods.ByName("GetConnectedAccountAuth")), + connect.WithHandlerOptions(opts...), + ) + connectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectHandler := connect.NewUnaryHandler( + ConnectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectProcedure, + svc.GetMagicLinkForConnectedAccountWithRedirect, + connect.WithSchema(connectedAccountServiceMethods.ByName("GetMagicLinkForConnectedAccountWithRedirect")), + connect.WithHandlerOptions(opts...), + ) + return "/scalekit.v1.connected_accounts.ConnectedAccountService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ConnectedAccountServiceListConnectedAccountsProcedure: + connectedAccountServiceListConnectedAccountsHandler.ServeHTTP(w, r) + case ConnectedAccountServiceSearchConnectedAccountsProcedure: + connectedAccountServiceSearchConnectedAccountsHandler.ServeHTTP(w, r) + case ConnectedAccountServiceCreateConnectedAccountProcedure: + connectedAccountServiceCreateConnectedAccountHandler.ServeHTTP(w, r) + case ConnectedAccountServiceUpdateConnectedAccountProcedure: + connectedAccountServiceUpdateConnectedAccountHandler.ServeHTTP(w, r) + case ConnectedAccountServiceDeleteConnectedAccountProcedure: + connectedAccountServiceDeleteConnectedAccountHandler.ServeHTTP(w, r) + case ConnectedAccountServiceGetMagicLinkForConnectedAccountProcedure: + connectedAccountServiceGetMagicLinkForConnectedAccountHandler.ServeHTTP(w, r) + case ConnectedAccountServiceGetConnectedAccountAuthProcedure: + connectedAccountServiceGetConnectedAccountAuthHandler.ServeHTTP(w, r) + case ConnectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectProcedure: + connectedAccountServiceGetMagicLinkForConnectedAccountWithRedirectHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedConnectedAccountServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedConnectedAccountServiceHandler struct{} + +func (UnimplementedConnectedAccountServiceHandler) ListConnectedAccounts(context.Context, *connect.Request[connected_accounts.ListConnectedAccountsRequest]) (*connect.Response[connected_accounts.ListConnectedAccountsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.ListConnectedAccounts is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) SearchConnectedAccounts(context.Context, *connect.Request[connected_accounts.SearchConnectedAccountsRequest]) (*connect.Response[connected_accounts.SearchConnectedAccountsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.SearchConnectedAccounts is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) CreateConnectedAccount(context.Context, *connect.Request[connected_accounts.CreateConnectedAccountRequest]) (*connect.Response[connected_accounts.CreateConnectedAccountResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.CreateConnectedAccount is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) UpdateConnectedAccount(context.Context, *connect.Request[connected_accounts.UpdateConnectedAccountRequest]) (*connect.Response[connected_accounts.UpdateConnectedAccountResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.UpdateConnectedAccount is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) DeleteConnectedAccount(context.Context, *connect.Request[connected_accounts.DeleteConnectedAccountRequest]) (*connect.Response[connected_accounts.DeleteConnectedAccountResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.DeleteConnectedAccount is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) GetMagicLinkForConnectedAccount(context.Context, *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccount is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) GetConnectedAccountAuth(context.Context, *connect.Request[connected_accounts.GetConnectedAccountByIdentifierRequest]) (*connect.Response[connected_accounts.GetConnectedAccountByIdentifierResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.GetConnectedAccountAuth is not implemented")) +} + +func (UnimplementedConnectedAccountServiceHandler) GetMagicLinkForConnectedAccountWithRedirect(context.Context, *connect.Request[connected_accounts.GetMagicLinkForConnectedAccountRedirectRequest]) (*connect.Response[connected_accounts.GetMagicLinkForConnectedAccountRedirectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("scalekit.v1.connected_accounts.ConnectedAccountService.GetMagicLinkForConnectedAccountWithRedirect is not implemented")) +} diff --git a/pkg/grpc/scalekit/v1/connections/connections.pb.go b/pkg/grpc/scalekit/v1/connections/connections.pb.go index 3041518..1432845 100644 --- a/pkg/grpc/scalekit/v1/connections/connections.pb.go +++ b/pkg/grpc/scalekit/v1/connections/connections.pb.go @@ -3112,6 +3112,9 @@ type SAMLConnectionConfigRequest struct { WantRequestSigned *wrapperspb.BoolValue `protobuf:"bytes,17,opt,name=want_request_signed,json=wantRequestSigned,proto3" json:"want_request_signed,omitempty"` CertificateId *wrapperspb.StringValue `protobuf:"bytes,18,opt,name=certificate_id,json=certificateId,proto3" json:"certificate_id,omitempty"` IdpSloRequired *wrapperspb.BoolValue `protobuf:"bytes,19,opt,name=idp_slo_required,json=idpSloRequired,proto3" json:"idp_slo_required,omitempty"` + SpEntityId *wrapperspb.StringValue `protobuf:"bytes,20,opt,name=sp_entity_id,json=spEntityId,proto3" json:"sp_entity_id,omitempty"` + SpAssertionUrl *wrapperspb.StringValue `protobuf:"bytes,21,opt,name=sp_assertion_url,json=spAssertionUrl,proto3" json:"sp_assertion_url,omitempty"` + SpSloUrl *wrapperspb.StringValue `protobuf:"bytes,22,opt,name=sp_slo_url,json=spSloUrl,proto3" json:"sp_slo_url,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3258,6 +3261,27 @@ func (x *SAMLConnectionConfigRequest) GetIdpSloRequired() *wrapperspb.BoolValue return nil } +func (x *SAMLConnectionConfigRequest) GetSpEntityId() *wrapperspb.StringValue { + if x != nil { + return x.SpEntityId + } + return nil +} + +func (x *SAMLConnectionConfigRequest) GetSpAssertionUrl() *wrapperspb.StringValue { + if x != nil { + return x.SpAssertionUrl + } + return nil +} + +func (x *SAMLConnectionConfigRequest) GetSpSloUrl() *wrapperspb.StringValue { + if x != nil { + return x.SpSloUrl + } + return nil +} + type SAMLConnectionConfigResponse struct { state protoimpl.MessageState `protogen:"open.v1"` SpEntityId string `protobuf:"bytes,1,opt,name=sp_entity_id,json=spEntityId,proto3" json:"sp_entity_id,omitempty"` @@ -4644,7 +4668,7 @@ const file_scalekit_v1_connections_connections_proto_rawDesc = "" + "\x14_code_challenge_typeB0\n" + "._regenerate_passwordless_credentials_on_resend\"P\n" + "\x10StaticAuthConfig\x12<\n" + - "\rstatic_config\x18\x01 \x01(\v2\x17.google.protobuf.StructR\fstaticConfig\"\xab\x0f\n" + + "\rstatic_config\x18\x01 \x01(\v2\x17.google.protobuf.StructR\fstaticConfig\"\xf1\x12\n" + "\x1bSAMLConnectionConfigRequest\x12\x8a\x01\n" + "\x10idp_metadata_url\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueBB\x92A?2\x10IDP Metadata URLJ+\"https://youridp.com/service/saml/metadata\"R\x0eidpMetadataUrl\x12x\n" + "\ridp_entity_id\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueB6\x92A32\rIDP Entity IDJ\"\"https://youridp.com/service/saml\"R\vidpEntityId\x12v\n" + @@ -4663,7 +4687,12 @@ const file_scalekit_v1_connections_connections_proto_rawDesc = "" + "\x13assertion_encrypted\x18\x10 \x01(\v2\x1a.google.protobuf.BoolValueB\x1e\x92A\x1b2\x13Assertion EncryptedJ\x04trueR\x12assertionEncrypted\x12j\n" + "\x13want_request_signed\x18\x11 \x01(\v2\x1a.google.protobuf.BoolValueB\x1e\x92A\x1b2\x13Want Request SignedJ\x04trueR\x11wantRequestSigned\x12q\n" + "\x0ecertificate_id\x18\x12 \x01(\v2\x1c.google.protobuf.StringValueB,\x92A)2\x0eCertificate IDJ\x17\"cer_35585423166144613\"R\rcertificateId\x12b\n" + - "\x10idp_slo_required\x18\x13 \x01(\v2\x1a.google.protobuf.BoolValueB\x1c\x92A\x192\x11Enable IDP logoutJ\x04trueR\x0eidpSloRequiredJ\x04\b\v\x10\f\"\xf9\x13\n" + + "\x10idp_slo_required\x18\x13 \x01(\v2\x1a.google.protobuf.BoolValueB\x1c\x92A\x192\x11Enable IDP logoutJ\x04trueR\x0eidpSloRequired\x12\x90\x01\n" + + "\fsp_entity_id\x18\x14 \x01(\v2\x1c.google.protobuf.StringValueBP\x92AM2\x1aService Provider Entity IDJ/\"https://env.scalekit.com/sso/v1/saml/conn_123\"R\n" + + "spEntityId\x12\x9f\x01\n" + + "\x10sp_assertion_url\x18\x15 \x01(\v2\x1c.google.protobuf.StringValueBW\x92AT2\x18Service Provider SSO URLJ8\"https://env.scalekit.com/sso/v1/saml/conn_123/callback\"R\x0espAssertionUrl\x12\x8e\x01\n" + + "\n" + + "sp_slo_url\x18\x16 \x01(\v2\x1c.google.protobuf.StringValueBR\x92AO2\x18Service Provider SLO URLJ3\"https://env.scalekit.com/sso/v1/saml/conn_123/slo\"R\bspSloUrlJ\x04\b\v\x10\f\"\xf9\x13\n" + "\x1cSAMLConnectionConfigResponse\x12W\n" + "\fsp_entity_id\x18\x01 \x01(\tB5\x92A22\fSP Entity IDJ\"\"https://yourapp.com/service/saml\"R\n" + "spEntityId\x12m\n" + @@ -5463,72 +5492,75 @@ var file_scalekit_v1_connections_connections_proto_depIdxs = []int32{ 67, // 89: scalekit.v1.connections.SAMLConnectionConfigRequest.want_request_signed:type_name -> google.protobuf.BoolValue 68, // 90: scalekit.v1.connections.SAMLConnectionConfigRequest.certificate_id:type_name -> google.protobuf.StringValue 67, // 91: scalekit.v1.connections.SAMLConnectionConfigRequest.idp_slo_required:type_name -> google.protobuf.BoolValue - 68, // 92: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_metadata_url:type_name -> google.protobuf.StringValue - 68, // 93: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_entity_id:type_name -> google.protobuf.StringValue - 68, // 94: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_sso_url:type_name -> google.protobuf.StringValue - 47, // 95: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_certificates:type_name -> scalekit.v1.connections.IDPCertificate - 68, // 96: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_slo_url:type_name -> google.protobuf.StringValue - 68, // 97: scalekit.v1.connections.SAMLConnectionConfigResponse.ui_button_title:type_name -> google.protobuf.StringValue - 2, // 98: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_name_id_format:type_name -> scalekit.v1.connections.NameIdFormat - 6, // 99: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_sso_request_binding:type_name -> scalekit.v1.connections.RequestBinding - 6, // 100: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_slo_request_binding:type_name -> scalekit.v1.connections.RequestBinding - 5, // 101: scalekit.v1.connections.SAMLConnectionConfigResponse.saml_signing_option:type_name -> scalekit.v1.connections.SAMLSigningOptions - 67, // 102: scalekit.v1.connections.SAMLConnectionConfigResponse.allow_idp_initiated_login:type_name -> google.protobuf.BoolValue - 67, // 103: scalekit.v1.connections.SAMLConnectionConfigResponse.force_authn:type_name -> google.protobuf.BoolValue - 68, // 104: scalekit.v1.connections.SAMLConnectionConfigResponse.default_redirect_uri:type_name -> google.protobuf.StringValue - 67, // 105: scalekit.v1.connections.SAMLConnectionConfigResponse.assertion_encrypted:type_name -> google.protobuf.BoolValue - 67, // 106: scalekit.v1.connections.SAMLConnectionConfigResponse.want_request_signed:type_name -> google.protobuf.BoolValue - 68, // 107: scalekit.v1.connections.SAMLConnectionConfigResponse.certificate_id:type_name -> google.protobuf.StringValue - 67, // 108: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_slo_required:type_name -> google.protobuf.BoolValue - 68, // 109: scalekit.v1.connections.SAMLConnectionConfigResponse.sp_slo_url:type_name -> google.protobuf.StringValue - 65, // 110: scalekit.v1.connections.IDPCertificate.create_time:type_name -> google.protobuf.Timestamp - 65, // 111: scalekit.v1.connections.IDPCertificate.expiry_time:type_name -> google.protobuf.Timestamp - 49, // 112: scalekit.v1.connections.GetOIDCMetadataRequest.metadata:type_name -> scalekit.v1.connections.OIDCMetadataRequest - 52, // 113: scalekit.v1.connections.GetSAMLMetadataRequest.metadata:type_name -> scalekit.v1.connections.SAMLMetadataRequest - 55, // 114: scalekit.v1.connections.GetSAMLCertificateDetailsRequest.certificate:type_name -> scalekit.v1.connections.SAMLCertificateRequest - 4, // 115: scalekit.v1.connections.GetConnectionTestResultResponse.status:type_name -> scalekit.v1.connections.TestResultStatus - 33, // 116: scalekit.v1.connections.ListAppConnectionsResponse.connections:type_name -> scalekit.v1.connections.ListConnection - 17, // 117: scalekit.v1.connections.ConnectionService.CreateEnvironmentConnection:input_type -> scalekit.v1.connections.CreateEnvironmentConnectionRequest - 18, // 118: scalekit.v1.connections.ConnectionService.CreateConnection:input_type -> scalekit.v1.connections.CreateConnectionRequest - 12, // 119: scalekit.v1.connections.ConnectionService.AssignDomainsToConnection:input_type -> scalekit.v1.connections.AssignDomainsToConnectionRequest - 28, // 120: scalekit.v1.connections.ConnectionService.GetEnvironmentConnection:input_type -> scalekit.v1.connections.GetEnvironmentConnectionRequest - 29, // 121: scalekit.v1.connections.ConnectionService.GetConnection:input_type -> scalekit.v1.connections.GetConnectionRequest - 31, // 122: scalekit.v1.connections.ConnectionService.ListConnections:input_type -> scalekit.v1.connections.ListConnectionsRequest - 34, // 123: scalekit.v1.connections.ConnectionService.ListOrganizationConnections:input_type -> scalekit.v1.connections.ListOrganizationConnectionsRequest - 36, // 124: scalekit.v1.connections.ConnectionService.SearchOrganizationConnections:input_type -> scalekit.v1.connections.SearchOrganizationConnectionsRequest - 22, // 125: scalekit.v1.connections.ConnectionService.UpdateEnvironmentConnection:input_type -> scalekit.v1.connections.UpdateEnvironmentConnectionRequest - 23, // 126: scalekit.v1.connections.ConnectionService.UpdateConnection:input_type -> scalekit.v1.connections.UpdateConnectionRequest - 26, // 127: scalekit.v1.connections.ConnectionService.DeleteEnvironmentConnection:input_type -> scalekit.v1.connections.DeleteEnvironmentConnectionRequest - 27, // 128: scalekit.v1.connections.ConnectionService.DeleteConnection:input_type -> scalekit.v1.connections.DeleteConnectionRequest - 38, // 129: scalekit.v1.connections.ConnectionService.EnableEnvironmentConnection:input_type -> scalekit.v1.connections.ToggleEnvironmentConnectionRequest - 39, // 130: scalekit.v1.connections.ConnectionService.EnableConnection:input_type -> scalekit.v1.connections.ToggleConnectionRequest - 38, // 131: scalekit.v1.connections.ConnectionService.DisableEnvironmentConnection:input_type -> scalekit.v1.connections.ToggleEnvironmentConnectionRequest - 39, // 132: scalekit.v1.connections.ConnectionService.DisableConnection:input_type -> scalekit.v1.connections.ToggleConnectionRequest - 57, // 133: scalekit.v1.connections.ConnectionService.GetConnectionTestResult:input_type -> scalekit.v1.connections.GetConnectionTestResultRequest - 61, // 134: scalekit.v1.connections.ConnectionService.ListAppConnections:input_type -> scalekit.v1.connections.ListAppConnectionsRequest - 21, // 135: scalekit.v1.connections.ConnectionService.CreateEnvironmentConnection:output_type -> scalekit.v1.connections.CreateConnectionResponse - 21, // 136: scalekit.v1.connections.ConnectionService.CreateConnection:output_type -> scalekit.v1.connections.CreateConnectionResponse - 13, // 137: scalekit.v1.connections.ConnectionService.AssignDomainsToConnection:output_type -> scalekit.v1.connections.AssignDomainsToConnectionResponse - 30, // 138: scalekit.v1.connections.ConnectionService.GetEnvironmentConnection:output_type -> scalekit.v1.connections.GetConnectionResponse - 30, // 139: scalekit.v1.connections.ConnectionService.GetConnection:output_type -> scalekit.v1.connections.GetConnectionResponse - 32, // 140: scalekit.v1.connections.ConnectionService.ListConnections:output_type -> scalekit.v1.connections.ListConnectionsResponse - 35, // 141: scalekit.v1.connections.ConnectionService.ListOrganizationConnections:output_type -> scalekit.v1.connections.ListOrganizationConnectionsResponse - 37, // 142: scalekit.v1.connections.ConnectionService.SearchOrganizationConnections:output_type -> scalekit.v1.connections.SearchOrganizationConnectionsResponse - 25, // 143: scalekit.v1.connections.ConnectionService.UpdateEnvironmentConnection:output_type -> scalekit.v1.connections.UpdateConnectionResponse - 25, // 144: scalekit.v1.connections.ConnectionService.UpdateConnection:output_type -> scalekit.v1.connections.UpdateConnectionResponse - 71, // 145: scalekit.v1.connections.ConnectionService.DeleteEnvironmentConnection:output_type -> google.protobuf.Empty - 71, // 146: scalekit.v1.connections.ConnectionService.DeleteConnection:output_type -> google.protobuf.Empty - 40, // 147: scalekit.v1.connections.ConnectionService.EnableEnvironmentConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse - 40, // 148: scalekit.v1.connections.ConnectionService.EnableConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse - 40, // 149: scalekit.v1.connections.ConnectionService.DisableEnvironmentConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse - 40, // 150: scalekit.v1.connections.ConnectionService.DisableConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse - 58, // 151: scalekit.v1.connections.ConnectionService.GetConnectionTestResult:output_type -> scalekit.v1.connections.GetConnectionTestResultResponse - 62, // 152: scalekit.v1.connections.ConnectionService.ListAppConnections:output_type -> scalekit.v1.connections.ListAppConnectionsResponse - 135, // [135:153] is the sub-list for method output_type - 117, // [117:135] is the sub-list for method input_type - 117, // [117:117] is the sub-list for extension type_name - 117, // [117:117] is the sub-list for extension extendee - 0, // [0:117] is the sub-list for field type_name + 68, // 92: scalekit.v1.connections.SAMLConnectionConfigRequest.sp_entity_id:type_name -> google.protobuf.StringValue + 68, // 93: scalekit.v1.connections.SAMLConnectionConfigRequest.sp_assertion_url:type_name -> google.protobuf.StringValue + 68, // 94: scalekit.v1.connections.SAMLConnectionConfigRequest.sp_slo_url:type_name -> google.protobuf.StringValue + 68, // 95: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_metadata_url:type_name -> google.protobuf.StringValue + 68, // 96: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_entity_id:type_name -> google.protobuf.StringValue + 68, // 97: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_sso_url:type_name -> google.protobuf.StringValue + 47, // 98: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_certificates:type_name -> scalekit.v1.connections.IDPCertificate + 68, // 99: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_slo_url:type_name -> google.protobuf.StringValue + 68, // 100: scalekit.v1.connections.SAMLConnectionConfigResponse.ui_button_title:type_name -> google.protobuf.StringValue + 2, // 101: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_name_id_format:type_name -> scalekit.v1.connections.NameIdFormat + 6, // 102: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_sso_request_binding:type_name -> scalekit.v1.connections.RequestBinding + 6, // 103: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_slo_request_binding:type_name -> scalekit.v1.connections.RequestBinding + 5, // 104: scalekit.v1.connections.SAMLConnectionConfigResponse.saml_signing_option:type_name -> scalekit.v1.connections.SAMLSigningOptions + 67, // 105: scalekit.v1.connections.SAMLConnectionConfigResponse.allow_idp_initiated_login:type_name -> google.protobuf.BoolValue + 67, // 106: scalekit.v1.connections.SAMLConnectionConfigResponse.force_authn:type_name -> google.protobuf.BoolValue + 68, // 107: scalekit.v1.connections.SAMLConnectionConfigResponse.default_redirect_uri:type_name -> google.protobuf.StringValue + 67, // 108: scalekit.v1.connections.SAMLConnectionConfigResponse.assertion_encrypted:type_name -> google.protobuf.BoolValue + 67, // 109: scalekit.v1.connections.SAMLConnectionConfigResponse.want_request_signed:type_name -> google.protobuf.BoolValue + 68, // 110: scalekit.v1.connections.SAMLConnectionConfigResponse.certificate_id:type_name -> google.protobuf.StringValue + 67, // 111: scalekit.v1.connections.SAMLConnectionConfigResponse.idp_slo_required:type_name -> google.protobuf.BoolValue + 68, // 112: scalekit.v1.connections.SAMLConnectionConfigResponse.sp_slo_url:type_name -> google.protobuf.StringValue + 65, // 113: scalekit.v1.connections.IDPCertificate.create_time:type_name -> google.protobuf.Timestamp + 65, // 114: scalekit.v1.connections.IDPCertificate.expiry_time:type_name -> google.protobuf.Timestamp + 49, // 115: scalekit.v1.connections.GetOIDCMetadataRequest.metadata:type_name -> scalekit.v1.connections.OIDCMetadataRequest + 52, // 116: scalekit.v1.connections.GetSAMLMetadataRequest.metadata:type_name -> scalekit.v1.connections.SAMLMetadataRequest + 55, // 117: scalekit.v1.connections.GetSAMLCertificateDetailsRequest.certificate:type_name -> scalekit.v1.connections.SAMLCertificateRequest + 4, // 118: scalekit.v1.connections.GetConnectionTestResultResponse.status:type_name -> scalekit.v1.connections.TestResultStatus + 33, // 119: scalekit.v1.connections.ListAppConnectionsResponse.connections:type_name -> scalekit.v1.connections.ListConnection + 17, // 120: scalekit.v1.connections.ConnectionService.CreateEnvironmentConnection:input_type -> scalekit.v1.connections.CreateEnvironmentConnectionRequest + 18, // 121: scalekit.v1.connections.ConnectionService.CreateConnection:input_type -> scalekit.v1.connections.CreateConnectionRequest + 12, // 122: scalekit.v1.connections.ConnectionService.AssignDomainsToConnection:input_type -> scalekit.v1.connections.AssignDomainsToConnectionRequest + 28, // 123: scalekit.v1.connections.ConnectionService.GetEnvironmentConnection:input_type -> scalekit.v1.connections.GetEnvironmentConnectionRequest + 29, // 124: scalekit.v1.connections.ConnectionService.GetConnection:input_type -> scalekit.v1.connections.GetConnectionRequest + 31, // 125: scalekit.v1.connections.ConnectionService.ListConnections:input_type -> scalekit.v1.connections.ListConnectionsRequest + 34, // 126: scalekit.v1.connections.ConnectionService.ListOrganizationConnections:input_type -> scalekit.v1.connections.ListOrganizationConnectionsRequest + 36, // 127: scalekit.v1.connections.ConnectionService.SearchOrganizationConnections:input_type -> scalekit.v1.connections.SearchOrganizationConnectionsRequest + 22, // 128: scalekit.v1.connections.ConnectionService.UpdateEnvironmentConnection:input_type -> scalekit.v1.connections.UpdateEnvironmentConnectionRequest + 23, // 129: scalekit.v1.connections.ConnectionService.UpdateConnection:input_type -> scalekit.v1.connections.UpdateConnectionRequest + 26, // 130: scalekit.v1.connections.ConnectionService.DeleteEnvironmentConnection:input_type -> scalekit.v1.connections.DeleteEnvironmentConnectionRequest + 27, // 131: scalekit.v1.connections.ConnectionService.DeleteConnection:input_type -> scalekit.v1.connections.DeleteConnectionRequest + 38, // 132: scalekit.v1.connections.ConnectionService.EnableEnvironmentConnection:input_type -> scalekit.v1.connections.ToggleEnvironmentConnectionRequest + 39, // 133: scalekit.v1.connections.ConnectionService.EnableConnection:input_type -> scalekit.v1.connections.ToggleConnectionRequest + 38, // 134: scalekit.v1.connections.ConnectionService.DisableEnvironmentConnection:input_type -> scalekit.v1.connections.ToggleEnvironmentConnectionRequest + 39, // 135: scalekit.v1.connections.ConnectionService.DisableConnection:input_type -> scalekit.v1.connections.ToggleConnectionRequest + 57, // 136: scalekit.v1.connections.ConnectionService.GetConnectionTestResult:input_type -> scalekit.v1.connections.GetConnectionTestResultRequest + 61, // 137: scalekit.v1.connections.ConnectionService.ListAppConnections:input_type -> scalekit.v1.connections.ListAppConnectionsRequest + 21, // 138: scalekit.v1.connections.ConnectionService.CreateEnvironmentConnection:output_type -> scalekit.v1.connections.CreateConnectionResponse + 21, // 139: scalekit.v1.connections.ConnectionService.CreateConnection:output_type -> scalekit.v1.connections.CreateConnectionResponse + 13, // 140: scalekit.v1.connections.ConnectionService.AssignDomainsToConnection:output_type -> scalekit.v1.connections.AssignDomainsToConnectionResponse + 30, // 141: scalekit.v1.connections.ConnectionService.GetEnvironmentConnection:output_type -> scalekit.v1.connections.GetConnectionResponse + 30, // 142: scalekit.v1.connections.ConnectionService.GetConnection:output_type -> scalekit.v1.connections.GetConnectionResponse + 32, // 143: scalekit.v1.connections.ConnectionService.ListConnections:output_type -> scalekit.v1.connections.ListConnectionsResponse + 35, // 144: scalekit.v1.connections.ConnectionService.ListOrganizationConnections:output_type -> scalekit.v1.connections.ListOrganizationConnectionsResponse + 37, // 145: scalekit.v1.connections.ConnectionService.SearchOrganizationConnections:output_type -> scalekit.v1.connections.SearchOrganizationConnectionsResponse + 25, // 146: scalekit.v1.connections.ConnectionService.UpdateEnvironmentConnection:output_type -> scalekit.v1.connections.UpdateConnectionResponse + 25, // 147: scalekit.v1.connections.ConnectionService.UpdateConnection:output_type -> scalekit.v1.connections.UpdateConnectionResponse + 71, // 148: scalekit.v1.connections.ConnectionService.DeleteEnvironmentConnection:output_type -> google.protobuf.Empty + 71, // 149: scalekit.v1.connections.ConnectionService.DeleteConnection:output_type -> google.protobuf.Empty + 40, // 150: scalekit.v1.connections.ConnectionService.EnableEnvironmentConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse + 40, // 151: scalekit.v1.connections.ConnectionService.EnableConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse + 40, // 152: scalekit.v1.connections.ConnectionService.DisableEnvironmentConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse + 40, // 153: scalekit.v1.connections.ConnectionService.DisableConnection:output_type -> scalekit.v1.connections.ToggleConnectionResponse + 58, // 154: scalekit.v1.connections.ConnectionService.GetConnectionTestResult:output_type -> scalekit.v1.connections.GetConnectionTestResultResponse + 62, // 155: scalekit.v1.connections.ConnectionService.ListAppConnections:output_type -> scalekit.v1.connections.ListAppConnectionsResponse + 138, // [138:156] is the sub-list for method output_type + 120, // [120:138] is the sub-list for method input_type + 120, // [120:120] is the sub-list for extension type_name + 120, // [120:120] is the sub-list for extension extendee + 0, // [0:120] is the sub-list for field type_name } func init() { file_scalekit_v1_connections_connections_proto_init() } diff --git a/pkg/grpc/scalekit/v1/domains/domains.pb.go b/pkg/grpc/scalekit/v1/domains/domains.pb.go index 5e80ee1..ea5e048 100644 --- a/pkg/grpc/scalekit/v1/domains/domains.pb.go +++ b/pkg/grpc/scalekit/v1/domains/domains.pb.go @@ -8,8 +8,10 @@ package domains import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "github.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/options" _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -1239,103 +1241,108 @@ var File_scalekit_v1_domains_domains_proto protoreflect.FileDescriptor const file_scalekit_v1_domains_domains_proto_rawDesc = "" + "\n" + - "!scalekit/v1/domains/domains.proto\x12\x13scalekit.v1.domains\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a!scalekit/v1/options/options.proto\"\xfe\x01\n" + - "\x13CreateDomainRequest\x124\n" + - "\x0forganization_id\x18\x01 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12,\n" + - "\vexternal_id\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\n" + - "externalId\x12(\n" + - "\rconnection_id\x18\x03 \x01(\tH\x01R\fconnectionId\x88\x01\x01\x129\n" + - "\x06domain\x18\x04 \x01(\v2!.scalekit.v1.domains.CreateDomainR\x06domainB\f\n" + + "!scalekit/v1/domains/domains.proto\x12\x13scalekit.v1.domains\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/api/visibility.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a!scalekit/v1/options/options.proto\"\x8a\x06\n" + + "\x13CreateDomainRequest\x12\xcb\x01\n" + + "\x0forganization_id\x18\x01 \x01(\tB\x9f\x01\x92A\x92\x012wScalekit-generated unique identifier for the organization. Use either this or external_id to identify the organization.J\x17\"org_81667076086825451\"\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12\xcd\x01\n" + + "\vexternal_id\x18\x02 \x01(\tB\xa9\x01\x92A\x8d\x012{Your application's unique identifier for the organization. Alternative to organization_id for identifying the organization.J\x0e\"tenant_12345\"\xbaH\x06r\x04\x10\x01\x18 \xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x00R\n" + + "externalId\x12\xba\x01\n" + + "\rconnection_id\x18\x03 \x01(\tB\x8f\x01\x92A}2iOptional identity provider connection ID to associate with this domain for enterprise SSO configurations.J\x10\"conn_123456789\"\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x01R\fconnectionId\x88\x01\x01\x12x\n" + + "\x06domain\x18\x04 \x01(\v2!.scalekit.v1.domains.CreateDomainB=\x92A:28Domain configuration including the domain name and type.R\x06domainB\f\n" + "\n" + "identitiesB\x10\n" + - "\x0e_connection_id\"K\n" + - "\x14CreateDomainResponse\x123\n" + - "\x06domain\x18\x01 \x01(\v2\x1b.scalekit.v1.domains.DomainR\x06domain\"w\n" + - "\fCreateDomain\x12%\n" + - "\x06domain\x18\x01 \x01(\tB\r\xbaH\n" + - "\xc8\x01\x01r\x05\x10\x04\x18\xff\x01R\x06domain\x12@\n" + - "\vdomain_type\x18\x02 \x01(\x0e2\x1f.scalekit.v1.domains.DomainTypeR\n" + - "domainType\"\x8e\x02\n" + - "\x13UpdateDomainRequest\x124\n" + - "\x0forganization_id\x18\x01 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12,\n" + - "\vexternal_id\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\n" + - "externalId\x12(\n" + - "\rconnection_id\x18\x03 \x01(\tH\x01R\fconnectionId\x88\x01\x01\x12\x0e\n" + - "\x02id\x18\x04 \x01(\tR\x02id\x129\n" + - "\x06domain\x18\x05 \x01(\v2!.scalekit.v1.domains.UpdateDomainR\x06domainB\f\n" + + "\x0e_connection_id\"\xb3\x01\n" + + "\x14CreateDomainResponse\x12\x9a\x01\n" + + "\x06domain\x18\x01 \x01(\v2\x1b.scalekit.v1.domains.DomainBe\x92Ab2`The newly created domain object with all configuration details and system-generated identifiers.R\x06domain\"\xc0\x04\n" + + "\fCreateDomain\x12\xf2\x01\n" + + "\x06domain\x18\x01 \x01(\tB\xd9\x01\x92A\xc8\x012\xaf\x01The domain name to be configured. Must be a valid business domain you control. Public disposable domains (gmail.com, outlook.com, etc.) are automatically blocked for security.J\x14\"customerdomain.com\"\xbaH\n" + + "\xc8\x01\x01r\x05\x10\x04\x18\xff\x01R\x06domain\x12\xba\x02\n" + + "\vdomain_type\x18\x02 \x01(\x0e2\x1f.scalekit.v1.domains.DomainTypeB\xf7\x01\x92A\xf3\x012\xd8\x01The type of domain configuration. ALLOWED_EMAIL_DOMAIN enables automatic organization suggestions for users with matching email domains during sign-in/sign-up. ORGANIZATION_DOMAIN is for primary organization domains.J\x16\"ALLOWED_EMAIL_DOMAIN\"R\n" + + "domainType\"\x84\a\n" + + "\x13UpdateDomainRequest\x12\xcb\x01\n" + + "\x0forganization_id\x18\x01 \x01(\tB\x9f\x01\x92A\x92\x012wScalekit-generated unique identifier for the organization. Use either this or external_id to identify the organization.J\x17\"org_81667076086825451\"\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12\xcd\x01\n" + + "\vexternal_id\x18\x02 \x01(\tB\xa9\x01\x92A\x8d\x012{Your application's unique identifier for the organization. Alternative to organization_id for identifying the organization.J\x0e\"tenant_12345\"\xbaH\x06r\x04\x10\x01\x18 \xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x00R\n" + + "externalId\x12\x9f\x01\n" + + "\rconnection_id\x18\x03 \x01(\tBu\x92Ac2OOptional updated identity provider connection ID to associate with this domain.J\x10\"conn_123456789\"\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x01R\fconnectionId\x88\x01\x01\x12o\n" + + "\x02id\x18\x04 \x01(\tB_\x92A\\2AScalekit-generated unique identifier of the domain to be updated.J\x17\"dom_88351643129225005\"R\x02id\x12\x9b\x01\n" + + "\x06domain\x18\x05 \x01(\v2!.scalekit.v1.domains.UpdateDomainB`\x92A]2[Domain update configuration. Currently empty as domain name cannot be changed once created.R\x06domainB\f\n" + "\n" + "identitiesB\x10\n" + "\x0e_connection_id\"\x0e\n" + - "\fUpdateDomain\"K\n" + - "\x14UpdateDomainResponse\x123\n" + - "\x06domain\x18\x01 \x01(\v2\x1b.scalekit.v1.domains.DomainR\x06domain\"\x94\x01\n" + - "\x10GetDomainRequest\x124\n" + - "\x0forganization_id\x18\x01 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12,\n" + - "\vexternal_id\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\n" + - "externalId\x12\x0e\n" + - "\x02id\x18\x03 \x01(\tR\x02idB\f\n" + + "\fUpdateDomain\"\xa5\x01\n" + + "\x14UpdateDomainResponse\x12\x8c\x01\n" + + "\x06domain\x18\x01 \x01(\v2\x1b.scalekit.v1.domains.DomainBW\x92AT2RThe updated domain object reflecting all changes made to the domain configuration.R\x06domain\"\xad\x04\n" + + "\x10GetDomainRequest\x12\xcb\x01\n" + + "\x0forganization_id\x18\x01 \x01(\tB\x9f\x01\x92A\x92\x012wScalekit-generated unique identifier for the organization. Use either this or external_id to identify the organization.J\x17\"org_81667076086825451\"\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12\xcd\x01\n" + + "\vexternal_id\x18\x02 \x01(\tB\xa9\x01\x92A\x8d\x012{Your application's unique identifier for the organization. Alternative to organization_id for identifying the organization.J\x0e\"tenant_12345\"\xbaH\x06r\x04\x10\x01\x18 \xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x00R\n" + + "externalId\x12m\n" + + "\x02id\x18\x03 \x01(\tB]\x92AZ2?Scalekit-generated unique identifier of the domain to retrieve.J\x17\"dom_88351643129225005\"R\x02idB\f\n" + "\n" + - "identities\"H\n" + - "\x11GetDomainResponse\x123\n" + - "\x06domain\x18\x01 \x01(\v2\x1b.scalekit.v1.domains.DomainR\x06domain\"\xd3\x01\n" + - "\x13DeleteDomainRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x124\n" + - "\x0forganization_id\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12,\n" + - "\vexternal_id\x18\x03 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\n" + - "externalId\x12(\n" + - "\rconnection_id\x18\x04 \x01(\tH\x01R\fconnectionId\x88\x01\x01B\f\n" + + "identities\"\xaa\x01\n" + + "\x11GetDomainResponse\x12\x94\x01\n" + + "\x06domain\x18\x01 \x01(\v2\x1b.scalekit.v1.domains.DomainB_\x92A\\2ZThe requested domain object with complete details including timestamps, and configuration.R\x06domain\"\xeb\x05\n" + + "\x13DeleteDomainRequest\x12{\n" + + "\x02id\x18\x01 \x01(\tBk\x92Ah2MScalekit-generated unique identifier of the domain to be permanently deleted.J\x17\"dom_88351643129225005\"R\x02id\x12\xcb\x01\n" + + "\x0forganization_id\x18\x02 \x01(\tB\x9f\x01\x92A\x92\x012wScalekit-generated unique identifier for the organization. Use either this or external_id to identify the organization.J\x17\"org_81667076086825451\"\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12\xcd\x01\n" + + "\vexternal_id\x18\x03 \x01(\tB\xa9\x01\x92A\x8d\x012{Your application's unique identifier for the organization. Alternative to organization_id for identifying the organization.J\x0e\"tenant_12345\"\xbaH\x06r\x04\x10\x01\x18 \xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x00R\n" + + "externalId\x12\x98\x01\n" + + "\rconnection_id\x18\x04 \x01(\tBn\x92A\\2HOptional connection ID for additional validation during domain deletion.J\x10\"conn_123456789\"\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x01R\fconnectionId\x88\x01\x01B\f\n" + "\n" + "identitiesB\x10\n" + - "\x0e_connection_id\"\xa6\x03\n" + - "\x11ListDomainRequest\x124\n" + - "\x0forganization_id\x18\x01 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12,\n" + - "\vexternal_id\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 H\x00R\n" + - "externalId\x12(\n" + - "\rconnection_id\x18\x03 \x01(\tH\x01R\fconnectionId\x88\x01\x01\x12\x1d\n" + - "\ainclude\x18\x04 \x01(\tH\x02R\ainclude\x88\x01\x01\x128\n" + - "\tpage_size\x18\x05 \x01(\v2\x1b.google.protobuf.Int32ValueR\bpageSize\x12<\n" + - "\vpage_number\x18\x06 \x01(\v2\x1b.google.protobuf.Int32ValueR\n" + - "pageNumber\x12@\n" + - "\vdomain_type\x18\a \x01(\x0e2\x1f.scalekit.v1.domains.DomainTypeR\n" + + "\x0e_connection_id\"\xf9\n" + + "\n" + + "\x11ListDomainRequest\x12\xcb\x01\n" + + "\x0forganization_id\x18\x01 \x01(\tB\x9f\x01\x92A\x92\x012wScalekit-generated unique identifier for the organization. Use either this or external_id to identify the organization.J\x17\"org_81667076086825451\"\xbaH\x06r\x04\x10\x01\x18 H\x00R\x0eorganizationId\x12\xcd\x01\n" + + "\vexternal_id\x18\x02 \x01(\tB\xa9\x01\x92A\x8d\x012{Your application's unique identifier for the organization. Alternative to organization_id for identifying the organization.J\x0e\"tenant_12345\"\xbaH\x06r\x04\x10\x01\x18 \xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x00R\n" + + "externalId\x12\xa8\x01\n" + + "\rconnection_id\x18\x03 \x01(\tB~\x92Al2XOptional filter to list domains associated with a specific identity provider connection.J\x10\"conn_123456789\"\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEWH\x01R\fconnectionId\x88\x01\x01\x12\xab\x01\n" + + "\ainclude\x18\x04 \x01(\tB\x8b\x01\x92A\x87\x012mOptional comma-separated list of additional fields to include in the response (e.g., 'verification_details').J\x16\"verification_details\"H\x02R\ainclude\x88\x01\x01\x12\x8f\x01\n" + + "\tpage_size\x18\x05 \x01(\v2\x1b.google.protobuf.Int32ValueBU\x92AR2LMaximum number of domains to return per page. Default is 30, maximum is 100.J\x0230R\bpageSize\x12\x82\x01\n" + + "\vpage_number\x18\x06 \x01(\v2\x1b.google.protobuf.Int32ValueBD\x92AA2:\x06domain24/api/v1/organizations/{organization_id}/domains/{id}\x12\xea\x06\n" + + "\fVerifyDomain\x12(.scalekit.v1.domains.VerifyDomainRequest\x1a\x1a.google.protobuf.BoolValue\"\x93\x06\x92A\xb7\x05\n" + + "\aDomains\x12\rVerify Domain\x1a\x9e\x04Initiates domain ownership verification by checking the DNS TXT record that should be added to the domain's DNS configuration.\n" + + "\n" + + "Use this endpoint to manually trigger verification for domains that are in PENDING status. The system will check for the required TXT record and update the verification status accordingly.\n" + + "\n" + + "For automatically verified domains, this endpoint will return true immediately. For domains requiring manual verification, ensure the TXT record has been properly configured in your DNS settings before calling this endpoint.J|\n" + + "\x03200\x12u\n" + + "SDomain verification result. Returns true if verification succeeds, false otherwise.\x12\x1e\n" + + "\x1c\x1a\x1a.google.protobuf.BoolValue\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02=2;/api/v1/organizations/{organization_id}/domains/{id}:verify\x12\xa9\x03\n" + + "\tGetDomain\x12%.scalekit.v1.domains.GetDomainRequest\x1a&.scalekit.v1.domains.GetDomainResponse\"\xcc\x02\x92A\x86\x02\n" + + "\aDomains\x12\n" + + "Get Domain\x1a\x8d\x01Retrieves complete details for a specific allowed email domain or organization domain, including timestamps, and configuration information.\n" + + "\n" + + "J_\n" + + "\x03200\x12X\n" + + "*Successfully retrieved the domain details.\x12*\n" + + "(\x1a&.scalekit.v1.domains.GetDomainResponse\x82\xb5\x18\x02\x18t\x82\xd3\xe4\x93\x026\x124/api/v1/organizations/{organization_id}/domains/{id}\x12\xe2\x03\n" + + "\fDeleteDomain\x12(.scalekit.v1.domains.DeleteDomainRequest\x1a\x16.google.protobuf.Empty\"\x8f\x03\x92A\xc9\x02\n" + + "\aDomains\x12\rDelete Domain\x1a\x87\x02Permanently removes an allowed email domain or organization domain from the organization configuration.\n" + + "\n" + + "Use this endpoint when you need to remove a domain that is no longer trusted or when consolidating multiple domains. Note that this action cannot be undone.\n" + + "\n" + + "J%\n" + + "\x03200\x12\x1e\n" + + "\x1cDomain successfully deleted.\x82\xb5\x18\x02\x18t\x82\xd3\xe4\x93\x026*4/api/v1/organizations/{organization_id}/domains/{id}\x12\x9e\x05\n" + + "\vListDomains\x12&.scalekit.v1.domains.ListDomainRequest\x1a'.scalekit.v1.domains.ListDomainResponse\"\xbd\x04\x92A\xfc\x03\n" + + "\aDomains\x12\fList Domains\x1a\xff\x02Retrieves a paginated list of all allowed email domains and organization domains configured for the specified organization.Use this endpoint to view and manage domain configurations.\n" + + "\n" + + "ALLOWED_EMAIL_DOMAIN enables users to join an organization with automatic suggestions in the organization switcher.\n" + + "\n" + + "ORGANIZATION_DOMAIN is used to identify the SSO connection for the organization.\n" + + "\n" + + "Ja\n" + + "\x03200\x12Z\n" + + "+Successfully retrieved the list of domains.\x12+\n" + + ")\x1a'.scalekit.v1.domains.ListDomainResponse\x82\xb5\x18\x02\x18t\x82\xd3\xe4\x93\x021\x12//api/v1/organizations/{organization_id}/domains\x12\x90\x05\n" + + "\x15ListAuthorizedDomains\x120.scalekit.v1.domains.ListAuthorizedDomainRequest\x1a1.scalekit.v1.domains.ListAuthorizedDomainResponse\"\x91\x04\x92A\xd8\x03\n" + + "\aDomains\x12\x17List Authorized Domains\x1a\xbb\x02Retrieves a list of domains that are authorized for use with the specified origin URL.\n" + + "\n" + + "Use this endpoint to validate whether a particular domain is allowed for authentication or other domain-restricted operations.\n" + + "\n" + + "This is commonly used by frontend applications to verify domain allowlists and CORS configurations.Jv\n" + + "\x03200\x12o\n" + + "6Successfully retrieved the list of authorized domains.\x125\n" + + "3\x1a1.scalekit.v1.domains.ListAuthorizedDomainResponse\x82\xb5\x18\x02\x18\x01\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02\x1a\x12\x18/api/v1/domains/{origin}B\xde\x01\n" + "\x17com.scalekit.v1.domainsB\fDomainsProtoP\x01ZGgithub.com/scalekit-inc/scalekit-sdk-go/v2/pkg/grpc/scalekit/v1/domains\xa2\x02\x03SVD\xaa\x02\x13Scalekit.V1.Domains\xca\x02\x13Scalekit\\V1\\Domains\xe2\x02\x1fScalekit\\V1\\Domains\\GPBMetadata\xea\x02\x15Scalekit::V1::Domainsb\x06proto3" var ( diff --git a/pkg/grpc/scalekit/v1/organizations/organizations.pb.go b/pkg/grpc/scalekit/v1/organizations/organizations.pb.go index de56cfd..f36b728 100644 --- a/pkg/grpc/scalekit/v1/organizations/organizations.pb.go +++ b/pkg/grpc/scalekit/v1/organizations/organizations.pb.go @@ -2442,61 +2442,13 @@ const file_scalekit_v1_organizations_organizations_proto_rawDesc = "" + "\x13FEATURE_UNSPECIFIED\x10\x00\x12\x13\n" + "\vUNSPECIFIED\x10\x00\x1a\x02\b\x01\x12\f\n" + "\bdir_sync\x10\x01\x12\a\n" + - "\x03sso\x10\x02\x1a\x02\x10\x012Ԃ\x01\n" + - "\x13OrganizationService\x12\xef\n" + - "\n" + - "\x12CreateOrganization\x124.scalekit.v1.organizations.CreateOrganizationRequest\x1a5.scalekit.v1.organizations.CreateOrganizationResponse\"\xeb\t\x92A\xb6\t\n" + + "\x03sso\x10\x02\x1a\x02\x10\x012\xed{\n" + + "\x13OrganizationService\x12\x88\x04\n" + + "\x12CreateOrganization\x124.scalekit.v1.organizations.CreateOrganizationRequest\x1a5.scalekit.v1.organizations.CreateOrganizationResponse\"\x84\x03\x92A\xcf\x02\n" + "\rOrganizations\x12\x16Create an organization\x1a\x8f\x01Creates a new organization in your environment. Use this endpoint to add a new tenant that can be configured with various settings and metadataJ\x93\x01\n" + "\x03201\x12\x8b\x01\n" + "NReturns the newly created organization with its unique identifier and settings\x129\n" + - "7\x1a5.scalekit.v1.organizations.CreateOrganizationResponsej\xe4\x06\n" + - "\rx-codeSamples\x12\xd2\x062\xcf\x06\n" + - "\xa4\x01*\xa1\x01\n" + - "\x16\n" + - "\x05label\x12\r\x1a\vNode.js SDK\n" + - "\x14\n" + - "\x04lang\x12\f\x1a\n" + - "javascript\n" + - "q\n" + - "\x06source\x12g\x1aeconst organization = await sc.organization.createOrganization(name, {\n" + - " externalId: 'externalId',\n" + - "});\n" + - "\xd5\x01*\xd2\x01\n" + - "\x15\n" + - "\x05label\x12\f\x1a\n" + - "Python SDK\n" + - "\x10\n" + - "\x04lang\x12\b\x1a\x06python\n" + - "\xa6\x01\n" + - "\x06source\x12\x9b\x01\x1a\x98\x01options = CreateOrganizationOptions()\n" + - "options.external_id = \"externalId\"\n" + - "organization = sc.organization.create_organization(\n" + - " name,\n" + - " options=options\n" + - ")\n" + - "\xc7\x01*\xc4\x01\n" + - "\x11\n" + - "\x05label\x12\b\x1a\x06Go SDK\n" + - "\f\n" + - "\x04lang\x12\x04\x1a\x02go\n" + - "\xa0\x01\n" + - "\x06source\x12\x95\x01\x1a\x92\x01organization, err := sc.Organization.CreateOrganization(\n" + - " ctx,\n" + - " name,\n" + - " scalekit.CreateOrganizationOptions{\n" + - " ExternalID: \"externalId\",\n" + - " },\n" + - ")\n" + - "\x83\x02*\x80\x02\n" + - "\x13\n" + - "\x05label\x12\n" + - "\x1a\bJava SDK\n" + - "\x0e\n" + - "\x04lang\x12\x06\x1a\x04java\n" + - "\xd8\x01\n" + - "\x06source\x12\xcd\x01\x1a\xca\x01CreateOrganization createOrganization = CreateOrganization.newBuilder().setDisplayName(\"Test Org\").build();\n" + - "\n" + - "Organization createdOrganization = scalekitClient.organizations().create(createOrganization);\x82\xb5\x18\x02\x18T\x82\xd3\xe4\x93\x02%:\forganization\"\x15/api/v1/organizations\x12\xfd\v\n" + + "7\x1a5.scalekit.v1.organizations.CreateOrganizationResponse\x82\xb5\x18\x02\x18T\x82\xd3\xe4\x93\x02%:\forganization\"\x15/api/v1/organizations\x12\xfd\v\n" + "\x12UpdateOrganization\x124.scalekit.v1.organizations.UpdateOrganizationRequest\x1a5.scalekit.v1.organizations.UpdateOrganizationResponse\"\xf9\n" + "\x92A\xbf\n" + "\n" + @@ -2983,7 +2935,7 @@ const file_scalekit_v1_organizations_organizations_proto_rawDesc = "" + "J\x1aH.scalekit.v1.organizations.GetOrganizationUserManagementSettingsResponseJ+\n" + "\x03404\x12$\n" + "\"Organization or setting not found.\x82\xb5\x18\x02\x18t\xfa\xd2\xe4\x93\x02\t\x12\aPREVIEW\x82\xd3\xe4\x93\x02A\x12?/api/v1/organizations/{organization_id}/settings/usermanagement\x1aX\x92AU\n" + - "\rOrganizations\x12D{{import \"proto/scalekit/v1/organizations/organization_details.md\"}}B\x93\x1a\x92A\x87\x18\x12\xad\x13\n" + + "\rOrganizations\x12D{{import \"proto/scalekit/v1/organizations/organization_details.md\"}}B\xce\x13\x92A\xc2\x11\x12\xe8\f\n" + "\rScalekit APIs\x12\xd9\v# Introduction\n" + "\n" + "The Scalekit API is a comprehensive RESTful API that enables you to manage organizations, users, authentication settings, and identity provider integrations. All requests must use HTTPS and require proper authentication.\n" + @@ -3040,44 +2992,7 @@ const file_scalekit_v1_organizations_organizations_proto_rawDesc = "" + "\":\n" + "\fScalekit Inc\x12\x14https://scalekit.com\x1a\x14support@scalekit.com*8\n" + "\n" + - "Apache 2.0\x12*http://www.apache.org/licenses/LICENSE-2.02\x051.0.0:\xc2\x06\n" + - "\x19x-scalar-sdk-installation\x12\xa4\x062\xa1\x06\n" + - "\x7f*}\n" + - "?\n" + - "\vdescription\x120\x1a.Install the Scalekit SDK for Node.js from npm:\n" + - "\x0e\n" + - "\x04lang\x12\x06\x1a\x04node\n" + - "*\n" + - "\x06source\x12 \x1a\x1enpm install @scalekit-sdk/node\n" + - "\x83\x01*\x80\x01\n" + - "?\n" + - "\vdescription\x120\x1a.Install the Scalekit SDK for Python using pip:\n" + - "\x10\n" + - "\x04lang\x12\b\x1a\x06python\n" + - "+\n" + - "\x06source\x12!\x1a\x1fpip install scalekit-sdk-python\n" + - "\x83\x01*\x80\x01\n" + - "1\n" + - "\vdescription\x12\"\x1a Install the Scalekit SDK for Go:\n" + - "\f\n" + - "\x04lang\x12\x04\x1a\x02Go\n" + - "=\n" + - "\x06source\x123\x1a1go get -u github.com/scalekit-inc/scalekit-sdk-go\n" + - "\x91\x03*\x8e\x03\n" + - "+\n" + - "\vdescription\x12\x1c\x1a\x1aAdding Java SDK dependency\n" + - "\x0e\n" + - "\x04lang\x12\x06\x1a\x04Java\n" + - "\xce\x02\n" + - "\x06source\x12\xc3\x02\x1a\xc0\x02/* Gradle users - add the following to your dependencies in build file */\n" + - "implementation \"com.scalekit:scalekit-sdk-java:2.0.1\"\n" + - "\n" + - "\n" + - "\n" + - " com.scalekit\n" + - " scalekit-sdk-java\n" + - " 2.0.1\n" + - "\x1a\x19$SCALEKIT_ENVIRONMENT_URL*\x01\x022\x10application/json:\x10application/jsonj\x0f\n" + + "Apache 2.0\x12*http://www.apache.org/licenses/LICENSE-2.02\x051.0.0\x1a\x19$SCALEKIT_ENVIRONMENT_URL*\x01\x022\x10application/json:\x10application/jsonj\x0f\n" + "\rOrganizationsj\xd4\x03\n" + "\vPermissions\x12\xc4\x03Permission management for defining and controlling access to system resources. Create, retrieve, update, and delete granular permissions that represent specific actions users can perform. Permissions are the building blocks of role-based access control (RBAC) and can be assigned to roles to grant users the ability to perform specific operations. Use this service to define custom permissions for your application's unique access control requirements.r+\n" + "\rScalekit Docs\x12\x1ahttps://docs.scalekit.com/\n" + diff --git a/pkg/grpc/scalekit/v1/users/users.pb.go b/pkg/grpc/scalekit/v1/users/users.pb.go index 171c8ec..93dcbac 100644 --- a/pkg/grpc/scalekit/v1/users/users.pb.go +++ b/pkg/grpc/scalekit/v1/users/users.pb.go @@ -2880,47 +2880,13 @@ const file_scalekit_v1_users_users_proto_rawDesc = "" + "\vdescription\x18\x04 \x01(\tBS\x92AP2)Description of what the permission allowsJ#\"Allows creating new user accounts\"R\vdescription\x12X\n" + "\x04tags\x18\x05 \x03(\tBD\x92AA2!Tags for categorizing permissionsJ\x1c[\"user-management\", \"admin\"]R\x04tags\"\x8f\x01\n" + "\x1bListUserPermissionsResponse\x12p\n" + - "\vpermissions\x18\x01 \x03(\v2\x1d.scalekit.v1.users.PermissionB/\x92A,2*List of permissions the user has access toR\vpermissions2\x8c\x9b\x01\n" + - "\vUserService\x12\x81\a\n" + - "\aGetUser\x12!.scalekit.v1.users.GetUserRequest\x1a\".scalekit.v1.users.GetUserResponse\"\xae\x06\x92A\x8a\x06\n" + + "\vpermissions\x18\x01 \x03(\v2\x1d.scalekit.v1.users.PermissionB/\x92A,2*List of permissions the user has access toR\vpermissions2×\x01\n" + + "\vUserService\x12\xb8\x03\n" + + "\aGetUser\x12!.scalekit.v1.users.GetUserRequest\x1a\".scalekit.v1.users.GetUserResponse\"\xe5\x02\x92A\xc1\x02\n" + "\x05Users\x12\bGet user\x1a\x8e\x01Retrieves all details for a user by system-generated user ID or external ID. The response includes organization memberships and user metadata.J\x9c\x01\n" + "\x03200\x12\x94\x01\n" + "jUser details retrieved successfully. Returns full user object with system-generated fields and timestamps.\x12&\n" + - "$\x1a\".scalekit.v1.users.GetUserResponsej\xc6\x03\n" + - "\rx-codeSamples\x12\xb4\x032\xb1\x03\n" + - "n*l\n" + - "\x16\n" + - "\x05label\x12\r\x1a\vNode.js SDK\n" + - "\x14\n" + - "\x04lang\x12\f\x1a\n" + - "javascript\n" + - "<\n" + - "\x06source\x122\x1a0const { user } = await sc.user.getUser(user_id);\n" + - "o*m\n" + - "\x15\n" + - "\x05label\x12\f\x1a\n" + - "Python SDK\n" + - "\x10\n" + - "\x04lang\x12\b\x1a\x06python\n" + - "B\n" + - "\x06source\x128\x1a6response = users.get_user(organization_id, \n" + - " user_id)\n" + - "\\*Z\n" + - "\x11\n" + - "\x05label\x12\b\x1a\x06Go SDK\n" + - "\f\n" + - "\x04lang\x12\x04\x1a\x02go\n" + - "7\n" + - "\x06source\x12-\x1a+resp, err := sc.User().GetUser(ctx, userID)\n" + - "p*n\n" + - "\x13\n" + - "\x05label\x12\n" + - "\x1a\bJava SDK\n" + - "\x0e\n" + - "\x04lang\x12\x06\x1a\x04java\n" + - "G\n" + - "\x06source\x12=\x1a;GetUserResponse resp = scalekit.users().getUser(\n" + - " userId);\x82\xb5\x18\x02\x18T\x82\xd3\xe4\x93\x02\x14\x12\x12/api/v1/users/{id}\x12\xba\t\n" + + "$\x1a\".scalekit.v1.users.GetUserResponse\x82\xb5\x18\x02\x18T\x82\xd3\xe4\x93\x02\x14\x12\x12/api/v1/users/{id}\x12\xba\t\n" + "\tListUsers\x12#.scalekit.v1.users.ListUsersRequest\x1a$.scalekit.v1.users.ListUsersResponse\"\xe1\b\x92A\xc2\b\n" + "\x05Users\x12\x1dList all users in environment\x1a\xbc\x02Retrieves a paginated list of all users across your entire environment. Use this endpoint to view all users regardless of their organization memberships. This is useful for administrative purposes, user audits, or when you need to see all users in your Scalekit environment. Supports pagination for large user bases.JA\n" + "\x03200\x12:\n" + diff --git a/scalekit.go b/scalekit.go index d5d1495..3b0491e 100644 --- a/scalekit.go +++ b/scalekit.go @@ -38,6 +38,7 @@ type Scalekit interface { Organization() Organization User() UserService Passwordless() PasswordlessService + ConnectedAccount() ConnectedAccount GetAuthorizationUrl(redirectUri string, options AuthorizationUrlOptions) (*url.URL, error) AuthenticateWithCode( code string, @@ -53,13 +54,14 @@ type Scalekit interface { } type scalekitClient struct { - coreClient *coreClient - connection Connection - domain Domain - organization Organization - directory Directory - user UserService - passwordless PasswordlessService + coreClient *coreClient + connection Connection + domain Domain + organization Organization + directory Directory + user UserService + passwordless PasswordlessService + connectedAccount ConnectedAccount } type AuthorizationUrlOptions struct { @@ -167,13 +169,14 @@ type LogoutUrlOptions struct { func NewScalekitClient(envUrl, clientId, clientSecret string) Scalekit { coreClient := newCoreClient(envUrl, clientId, clientSecret) return &scalekitClient{ - coreClient: coreClient, - connection: newConnectionClient(coreClient), - directory: newDirectoryClient(coreClient), - domain: newDomainClient(coreClient), - organization: newOrganizationClient(coreClient), - user: newUserClient(coreClient), - passwordless: newPasswordlessClient(coreClient), + coreClient: coreClient, + connection: newConnectionClient(coreClient), + directory: newDirectoryClient(coreClient), + domain: newDomainClient(coreClient), + organization: newOrganizationClient(coreClient), + user: newUserClient(coreClient), + passwordless: newPasswordlessClient(coreClient), + connectedAccount: newConnectedAccountClient(coreClient), } } @@ -201,6 +204,10 @@ func (s *scalekitClient) Passwordless() PasswordlessService { return s.passwordless } +func (s *scalekitClient) ConnectedAccount() ConnectedAccount { + return s.connectedAccount +} + func (s *scalekitClient) GetAuthorizationUrl(redirectUri string, options AuthorizationUrlOptions) (*url.URL, error) { scopes := []string{"openid", "profile", "email"} if options.Scopes != nil { diff --git a/test/connected_accounts_test.go b/test/connected_accounts_test.go new file mode 100644 index 0000000..7a1e26b --- /dev/null +++ b/test/connected_accounts_test.go @@ -0,0 +1,32 @@ +package test + +import ( + "context" + "fmt" + "testing" + + "github.com/scalekit-inc/scalekit-sdk-go/v2" + "github.com/stretchr/testify/assert" +) + +func TestGetConnectedAccountAuth(t *testing.T) { + // Test with connection name and identifier + options := &scalekit.GetConnectedAccountAuthOptions{ + Connector: toPtr("GITHUB"), + Identifier: toPtr("avinash.kamath@scalekit.com"), + } + + authResp, err := client.ConnectedAccount().GetConnectedAccountAuth(context.Background(), options) + assert.NoError(t, err) + assert.NotNil(t, authResp) + assert.NotNil(t, authResp.ConnectedAccount) + fmt.Println("Connected Account Auth Response:", authResp.GetConnectedAccount().GetAuthorizationDetails().GetOauthToken()) + + // Verify the connected account details + connectedAccount := authResp.ConnectedAccount + assert.NotEmpty(t, connectedAccount.Id) + assert.Equal(t, "avinash.kamath@scalekit.com", connectedAccount.Identifier) + assert.Equal(t, "GITHUB", connectedAccount.Connector) + assert.NotNil(t, connectedAccount.AuthorizationDetails) + assert.NotNil(t, connectedAccount.UpdatedAt) +}