@scalekit-sdk/node 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.github/dependabot.yml +10 -0
  2. package/README.md +82 -12
  3. package/lib/connect.js +5 -4
  4. package/lib/connect.js.map +1 -1
  5. package/lib/connection.d.ts +17 -3
  6. package/lib/connection.js +36 -2
  7. package/lib/connection.js.map +1 -1
  8. package/lib/constants/user.d.ts +1 -1
  9. package/lib/core.d.ts +9 -5
  10. package/lib/core.js +27 -23
  11. package/lib/core.js.map +1 -1
  12. package/lib/domain.d.ts +1 -12
  13. package/lib/domain.js +0 -19
  14. package/lib/domain.js.map +1 -1
  15. package/lib/index.d.ts +4 -4
  16. package/lib/index.js +3 -3
  17. package/lib/index.js.map +1 -1
  18. package/lib/organization.d.ts +26 -8
  19. package/lib/organization.js +50 -14
  20. package/lib/organization.js.map +1 -1
  21. package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js +1 -1
  22. package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.d.ts +3 -3
  23. package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js +2 -2
  24. package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js.map +1 -1
  25. package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +19 -55
  26. package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +26 -63
  27. package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
  28. package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js +1 -1
  29. package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.js +1 -1
  30. package/lib/pkg/grpc/scalekit/v1/options/options_pb.js +1 -1
  31. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.d.ts +15 -19
  32. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js +14 -18
  33. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js.map +1 -1
  34. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.d.ts +58 -24
  35. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js +94 -32
  36. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js.map +1 -1
  37. package/lib/scalekit.d.ts +11 -14
  38. package/lib/scalekit.js +17 -14
  39. package/lib/scalekit.js.map +1 -1
  40. package/lib/types/{user.d.ts → auth.d.ts} +5 -0
  41. package/lib/types/{user.js → auth.js} +1 -1
  42. package/lib/types/auth.js.map +1 -0
  43. package/lib/types/scalekit.d.ts +9 -9
  44. package/lib/types/scalekit.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/connect.ts +5 -5
  47. package/src/connection.ts +41 -3
  48. package/src/constants/user.ts +1 -1
  49. package/src/core.ts +32 -25
  50. package/src/domain.ts +0 -21
  51. package/src/index.ts +4 -4
  52. package/src/organization.ts +59 -12
  53. package/src/pkg/grpc/scalekit/v1/commons/commons_pb.ts +1 -1
  54. package/src/pkg/grpc/scalekit/v1/connections/connections_connect.ts +3 -3
  55. package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +33 -89
  56. package/src/pkg/grpc/scalekit/v1/domains/domains_pb.ts +1 -1
  57. package/src/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.ts +1 -1
  58. package/src/pkg/grpc/scalekit/v1/options/options_pb.ts +1 -1
  59. package/src/pkg/grpc/scalekit/v1/organizations/organizations_connect.ts +15 -19
  60. package/src/pkg/grpc/scalekit/v1/organizations/organizations_pb.ts +117 -43
  61. package/src/scalekit.ts +26 -17
  62. package/src/types/{user.ts → auth.ts} +6 -0
  63. package/src/types/scalekit.ts +11 -11
  64. package/lib/types/user.js.map +0 -1
package/src/core.ts CHANGED
@@ -5,6 +5,14 @@ import os from "os";
5
5
  import QueryString from "qs";
6
6
  import { GrantType } from './types/scalekit';
7
7
  import { ErrorInfo } from './pkg/grpc/scalekit/v1/errdetails/errdetails_pb';
8
+ import { TokenResponse } from './types/auth';
9
+
10
+ export const headers = {
11
+ "user-agent": "user-agent",
12
+ "x-sdk-version": "x-sdk-version",
13
+ "x-api-version": "x-api-version",
14
+ "authorization": "authorization"
15
+ }
8
16
 
9
17
  const tokenEndpoint = "oauth/token";
10
18
  const jwksEndpoint = "keys";
@@ -12,7 +20,7 @@ export default class CoreClient {
12
20
  public keys: JWK[] = [];
13
21
  public accessToken: string | null = null;
14
22
  public axios: Axios;
15
- public sdkVersion = `Scalekit-Node/1.0.2`;
23
+ public sdkVersion = `Scalekit-Node/1.0.4`;
16
24
  public apiVersion = "20240430";
17
25
  public userAgent = `${this.sdkVersion} Node/${process.version} (${process.platform}; ${os.arch()})`;
18
26
  constructor(
@@ -22,11 +30,11 @@ export default class CoreClient {
22
30
  ) {
23
31
  this.axios = axios.create({ baseURL: envUrl });
24
32
  this.axios.interceptors.request.use((config) => {
25
- config.headers["User-Agent"] = this.userAgent;
26
- config.headers["x-sdk-version"] = this.sdkVersion;
27
- config.headers["x-api-version"] = this.apiVersion;
33
+ config.headers[headers['user-agent']] = this.userAgent;
34
+ config.headers[headers['x-sdk-version']] = this.sdkVersion;
35
+ config.headers[headers['x-api-version']] = this.apiVersion;
28
36
  if (this.accessToken) {
29
- config.headers["Authorization"] = `Bearer ${this.accessToken}`;
37
+ config.headers[headers.authorization] = `Bearer ${this.accessToken}`;
30
38
  }
31
39
 
32
40
  return config;
@@ -46,10 +54,10 @@ export default class CoreClient {
46
54
  /**
47
55
  * Authenticate with the code
48
56
  * @param {string} data Data to authenticate
49
- * @returns {Promise<AxiosResponse<{ access_token: string, id_token: string }>>} Returns access token and id token
57
+ * @returns {Promise<AxiosResponse<TokenResponse>>} Returns access token and id token
50
58
  */
51
- async authenticate(data: string): Promise<AxiosResponse<{ access_token: string; id_token: string; }, any>> {
52
- return this.axios.post<{ access_token: string, id_token: string }>(
59
+ async authenticate(data: string): Promise<AxiosResponse<TokenResponse, any>> {
60
+ return this.axios.post<TokenResponse>(
53
61
  tokenEndpoint,
54
62
  data,
55
63
  {
@@ -89,10 +97,10 @@ export default class CoreClient {
89
97
  return res;
90
98
  } catch (error) {
91
99
  if (retryLeft > 0) {
92
- let isUnauthenticatedError = false;
100
+ let isUnAuthenticatedError = false;
93
101
  if (error instanceof AxiosError) {
94
102
  if (error.status == HttpStatusCode.Unauthorized) {
95
- isUnauthenticatedError = true;
103
+ isUnAuthenticatedError = true;
96
104
  } else {
97
105
  throw new Error(error.message);
98
106
  }
@@ -100,23 +108,22 @@ export default class CoreClient {
100
108
  // ConnectError is a custom error class that extends Error class and has a code property
101
109
  if (error instanceof ConnectError) {
102
110
  if (error.code == Code.Unauthenticated) {
103
- isUnauthenticatedError = true;
104
- } else {
105
- if (error.code == Code.InvalidArgument) {
106
- const message = error.findDetails(ErrorInfo).map((detail) => {
107
- if (detail.validationErrorInfo) {
108
- return detail.validationErrorInfo.fieldViolations.map((fv) => {
109
- return `${fv.field}: ${fv.description}`
110
- }).join("\n")
111
- }
112
- return error.message;
113
- }).join("\n")
114
- throw new Error(message);
115
- }
116
- throw new Error(error.message);
111
+ isUnAuthenticatedError = true;
112
+ }
113
+ if (error.code == Code.InvalidArgument) {
114
+ const messages = [error.message]
115
+ error.findDetails(ErrorInfo).forEach((detail) => {
116
+ if (detail.validationErrorInfo) {
117
+ detail.validationErrorInfo.fieldViolations.forEach((fv) => {
118
+ messages.push(`${fv.field}: ${fv.description}`)
119
+ })
120
+ }
121
+ })
122
+
123
+ throw new Error(messages.join("\n"));
117
124
  }
118
125
  }
119
- if (isUnauthenticatedError) {
126
+ if (isUnAuthenticatedError) {
120
127
  await this.authenticateClient();
121
128
  return this.connectExec(fn, data, retryLeft - 1);
122
129
  }
package/src/domain.ts CHANGED
@@ -34,27 +34,6 @@ export default class DomainClient {
34
34
  )
35
35
  }
36
36
 
37
- /**
38
- * Get a domain by id
39
- * @param {object} options The options to get a domain
40
- * @param {string} options.id The domain id
41
- * @param {string} options.organizationId The organization id
42
- * @returns {Promise<GetDomainResponse>} The domain
43
- */
44
- async getDomain(options: { id: string, organizationId: string }): Promise<GetDomainResponse> {
45
- const { id, organizationId } = options;
46
- return this.coreClient.connectExec(
47
- this.client.getDomain,
48
- {
49
- id,
50
- identities: {
51
- case: 'organizationId',
52
- value: organizationId
53
- }
54
- }
55
- )
56
- }
57
-
58
37
  /**
59
38
  * List domains for an organization
60
39
  * @param organizationId The organization id
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- import Scalekit from "./scalekit";
1
+ import ScalekitClient from "./scalekit";
2
2
 
3
- export { Scalekit };
4
- export default Scalekit;
3
+ export { ScalekitClient };
4
+ export default ScalekitClient;
5
5
 
6
6
  export * from "./types/scalekit";
7
- export * from "./types/user";
7
+ export * from "./types/auth";
@@ -1,9 +1,9 @@
1
- import { PartialMessage } from '@bufbuild/protobuf';
1
+ import { Empty, PartialMessage } from '@bufbuild/protobuf';
2
2
  import { PromiseClient } from '@connectrpc/connect';
3
3
  import GrpcConnect from './connect';
4
4
  import CoreClient from './core';
5
5
  import { OrganizationService } from './pkg/grpc/scalekit/v1/organizations/organizations_connect';
6
- import { CreateOrganizationResponse, GetOrganizationResponse, ListOrganizationsResponse, UpdateOrganization, UpdateOrganizationResponse } from './pkg/grpc/scalekit/v1/organizations/organizations_pb';
6
+ import { CreateOrganizationResponse, GetOrganizationResponse, Link, ListOrganizationsResponse, UpdateOrganization, UpdateOrganizationResponse } from './pkg/grpc/scalekit/v1/organizations/organizations_pb';
7
7
 
8
8
  export default class OrganizationClient {
9
9
  private client: PromiseClient<typeof OrganizationService>;
@@ -16,19 +16,20 @@ export default class OrganizationClient {
16
16
 
17
17
  /**
18
18
  * Create an organization with the given name. Optionally, you can provide an external id.
19
+ * @param {string} name The organization name
19
20
  * @param {object} options The options to create an organization
20
- * @param {string} options.name The organization name
21
21
  * @param {string} options.externalId The external id
22
22
  * @returns {Promise<CreateOrganizationResponse>} The created organization
23
23
  */
24
- async createOrganization(options: { name: string, externalId?: string }): Promise<CreateOrganizationResponse> {
25
- const { name, externalId } = options;
24
+ async createOrganization(name: string, options?: { externalId?: string }): Promise<CreateOrganizationResponse> {
26
25
  return this.coreClient.connectExec(
27
26
  this.client.createOrganization,
28
27
  {
29
28
  organization: {
30
29
  displayName: name,
31
- externalId: externalId
30
+ ...(options?.externalId && {
31
+ externalId: options.externalId
32
+ })
32
33
  }
33
34
  }
34
35
  )
@@ -108,22 +109,68 @@ export default class OrganizationClient {
108
109
  }
109
110
 
110
111
  /**
111
- * Generate customer portal link for an organization
112
+ * Delete an organization by id
113
+ * @param {string} organizationId The organization id
114
+ * @returns {Promise<Empty>} Returns nothing
115
+ */
116
+ async deleteOrganization(organizationId: string): Promise<Empty> {
117
+ return this.coreClient.connectExec(
118
+ this.client.deleteOrganization,
119
+ {
120
+ identities: { case: "id", value: organizationId, },
121
+ },
122
+ )
123
+ }
124
+
125
+ /**
126
+ * Generate admin portal link for an organization
112
127
  * @param organizationId The organization id
113
- * @returns {Promise<string>} The customer portal link
128
+ * @returns {Promise<Link>} The admin portal link object with expiration time and location
114
129
  */
115
- async generateCustomerPortalLink(organizationId: string): Promise<string> {
130
+ async generatePortalLink(organizationId: string): Promise<Link> {
116
131
  const response = await this.coreClient.connectExec(
117
- this.client.generateCustomerPortalLink,
132
+ this.client.generatePortalLink,
118
133
  {
119
134
  id: organizationId
120
135
  },
121
136
  )
122
137
  if (!response.link) {
123
- throw new Error('Error generating customer portal link');
138
+ throw new Error('Error generating portal link');
124
139
  }
125
140
 
126
- return response.link?.location
141
+ return response.link
142
+ }
143
+
144
+ /**
145
+ * Get admin portal links for an organization
146
+ * @param organizationId The organization id
147
+ * @returns {Promise<Link[]>} The admin portal link object with expiration time and location
148
+ */
149
+ async getPortalLinks(organizationId: string): Promise<Link[]> {
150
+ const response = await this.coreClient.connectExec(
151
+ this.client.getPortalLinks,
152
+ {
153
+ id: organizationId
154
+ },
155
+ )
156
+
157
+ return response.links
158
+ }
159
+
160
+ /**
161
+ * Delete admin portal link for an organization
162
+ * @param organizationId The organization id
163
+ * @param linkId The link id
164
+ * @returns {Promise<Empty>} Returns nothing
165
+ */
166
+ async deletePortalLink(organizationId: string, linkId: string): Promise<Empty> {
167
+ return this.coreClient.connectExec(
168
+ this.client.deletePortalLink,
169
+ {
170
+ id: organizationId,
171
+ linkId
172
+ },
173
+ )
127
174
  }
128
175
  }
129
176
 
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v1.8.0 with parameter "target=ts"
1
+ // @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
2
2
  // @generated from file scalekit/v1/commons/commons.proto (package scalekit.v1.commons, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { CreateConnectionRequest, CreateConnectionResponse, DeleteConnectionRequest, DisableConnectionRequest, EnableConnectionRequest, GetConnectionRequest, GetConnectionResponse, ListConnectionsRequest, ListConnectionsResponse, ToggleConnectionResponse, UpdateConnectionRequest, UpdateConnectionResponse } from "./connections_pb.js";
6
+ import { CreateConnectionRequest, CreateConnectionResponse, DeleteConnectionRequest, GetConnectionRequest, GetConnectionResponse, ListConnectionsRequest, ListConnectionsResponse, ToggleConnectionRequest, ToggleConnectionResponse, UpdateConnectionRequest, UpdateConnectionResponse } from "./connections_pb.js";
7
7
  import { Empty, MethodKind } from "@bufbuild/protobuf";
8
8
 
9
9
  /**
@@ -62,7 +62,7 @@ export const ConnectionService = {
62
62
  */
63
63
  enableConnection: {
64
64
  name: "EnableConnection",
65
- I: EnableConnectionRequest,
65
+ I: ToggleConnectionRequest,
66
66
  O: ToggleConnectionResponse,
67
67
  kind: MethodKind.Unary,
68
68
  },
@@ -71,7 +71,7 @@ export const ConnectionService = {
71
71
  */
72
72
  disableConnection: {
73
73
  name: "DisableConnection",
74
- I: DisableConnectionRequest,
74
+ I: ToggleConnectionRequest,
75
75
  O: ToggleConnectionResponse,
76
76
  kind: MethodKind.Unary,
77
77
  },
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v1.8.0 with parameter "target=ts"
1
+ // @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
2
2
  // @generated from file scalekit/v1/connections/connections.proto (package scalekit.v1.connections, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
@@ -663,32 +663,32 @@ export class UpdateConnectionRequest extends Message<UpdateConnectionRequest> {
663
663
  */
664
664
  export class UpdateConnection extends Message<UpdateConnection> {
665
665
  /**
666
- * @generated from field: scalekit.v1.connections.ConnectionProvider provider = 1;
666
+ * @generated from field: scalekit.v1.connections.ConnectionProvider provider = 2;
667
667
  */
668
668
  provider = ConnectionProvider.CONNECTION_PROVIDER_UNSPECIFIED;
669
669
 
670
670
  /**
671
- * @generated from field: scalekit.v1.connections.ConnectionType type = 2;
671
+ * @generated from field: scalekit.v1.connections.ConnectionType type = 3;
672
672
  */
673
673
  type = ConnectionType.INVALID;
674
674
 
675
675
  /**
676
- * @generated from field: google.protobuf.BoolValue debug_enabled = 3;
676
+ * @generated from field: google.protobuf.BoolValue debug_enabled = 6;
677
677
  */
678
678
  debugEnabled?: boolean;
679
679
 
680
680
  /**
681
- * @generated from field: google.protobuf.StringValue ui_button_title = 4;
681
+ * @generated from field: google.protobuf.StringValue ui_button_title = 8;
682
682
  */
683
683
  uiButtonTitle?: string;
684
684
 
685
685
  /**
686
- * @generated from field: google.protobuf.StringValue logout_uri = 5;
686
+ * @generated from field: google.protobuf.StringValue logout_uri = 10;
687
687
  */
688
688
  logoutUri?: string;
689
689
 
690
690
  /**
691
- * @generated from field: scalekit.v1.connections.ConfigurationType configuration_type = 6;
691
+ * @generated from field: scalekit.v1.connections.ConfigurationType configuration_type = 11;
692
692
  */
693
693
  configurationType = ConfigurationType.CONFIGURATION_TYPE_UNSPECIFIED;
694
694
 
@@ -697,20 +697,20 @@ export class UpdateConnection extends Message<UpdateConnection> {
697
697
  */
698
698
  settings: {
699
699
  /**
700
- * @generated from field: scalekit.v1.connections.OIDCConnectionConfig oidc_config = 7;
700
+ * @generated from field: scalekit.v1.connections.OIDCConnectionConfig oidc_config = 13;
701
701
  */
702
702
  value: OIDCConnectionConfig;
703
703
  case: "oidcConfig";
704
704
  } | {
705
705
  /**
706
- * @generated from field: scalekit.v1.connections.SAMLConnectionConfigRequest saml_config = 8;
706
+ * @generated from field: scalekit.v1.connections.SAMLConnectionConfigResponse saml_config = 14;
707
707
  */
708
- value: SAMLConnectionConfigRequest;
708
+ value: SAMLConnectionConfigResponse;
709
709
  case: "samlConfig";
710
710
  } | { case: undefined; value?: undefined } = { case: undefined };
711
711
 
712
712
  /**
713
- * @generated from field: map<string, string> attribute_mapping = 9;
713
+ * @generated from field: map<string, string> attribute_mapping = 15;
714
714
  */
715
715
  attributeMapping: { [key: string]: string } = {};
716
716
 
@@ -722,15 +722,15 @@ export class UpdateConnection extends Message<UpdateConnection> {
722
722
  static readonly runtime: typeof proto3 = proto3;
723
723
  static readonly typeName = "scalekit.v1.connections.UpdateConnection";
724
724
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
725
- { no: 1, name: "provider", kind: "enum", T: proto3.getEnumType(ConnectionProvider) },
726
- { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(ConnectionType) },
727
- { no: 3, name: "debug_enabled", kind: "message", T: BoolValue },
728
- { no: 4, name: "ui_button_title", kind: "message", T: StringValue },
729
- { no: 5, name: "logout_uri", kind: "message", T: StringValue },
730
- { no: 6, name: "configuration_type", kind: "enum", T: proto3.getEnumType(ConfigurationType) },
731
- { no: 7, name: "oidc_config", kind: "message", T: OIDCConnectionConfig, oneof: "settings" },
732
- { no: 8, name: "saml_config", kind: "message", T: SAMLConnectionConfigRequest, oneof: "settings" },
733
- { no: 9, name: "attribute_mapping", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
725
+ { no: 2, name: "provider", kind: "enum", T: proto3.getEnumType(ConnectionProvider) },
726
+ { no: 3, name: "type", kind: "enum", T: proto3.getEnumType(ConnectionType) },
727
+ { no: 6, name: "debug_enabled", kind: "message", T: BoolValue },
728
+ { no: 8, name: "ui_button_title", kind: "message", T: StringValue },
729
+ { no: 10, name: "logout_uri", kind: "message", T: StringValue },
730
+ { no: 11, name: "configuration_type", kind: "enum", T: proto3.getEnumType(ConfigurationType) },
731
+ { no: 13, name: "oidc_config", kind: "message", T: OIDCConnectionConfig, oneof: "settings" },
732
+ { no: 14, name: "saml_config", kind: "message", T: SAMLConnectionConfigResponse, oneof: "settings" },
733
+ { no: 15, name: "attribute_mapping", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
734
734
  ]);
735
735
 
736
736
  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateConnection {
@@ -1110,67 +1110,11 @@ export class ListConnection extends Message<ListConnection> {
1110
1110
  }
1111
1111
 
1112
1112
  /**
1113
- * @generated from message scalekit.v1.connections.EnableConnectionRequest
1114
- */
1115
- export class EnableConnectionRequest extends Message<EnableConnectionRequest> {
1116
- /**
1117
- * @generated from oneof scalekit.v1.connections.EnableConnectionRequest.identities
1118
- */
1119
- identities: {
1120
- /**
1121
- * @generated from field: string organization_id = 1;
1122
- */
1123
- value: string;
1124
- case: "organizationId";
1125
- } | {
1126
- /**
1127
- * @generated from field: string external_id = 2;
1128
- */
1129
- value: string;
1130
- case: "externalId";
1131
- } | { case: undefined; value?: undefined } = { case: undefined };
1132
-
1133
- /**
1134
- * @generated from field: string id = 3;
1135
- */
1136
- id = "";
1137
-
1138
- constructor(data?: PartialMessage<EnableConnectionRequest>) {
1139
- super();
1140
- proto3.util.initPartial(data, this);
1141
- }
1142
-
1143
- static readonly runtime: typeof proto3 = proto3;
1144
- static readonly typeName = "scalekit.v1.connections.EnableConnectionRequest";
1145
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
1146
- { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
1147
- { no: 2, name: "external_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
1148
- { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1149
- ]);
1150
-
1151
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableConnectionRequest {
1152
- return new EnableConnectionRequest().fromBinary(bytes, options);
1153
- }
1154
-
1155
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableConnectionRequest {
1156
- return new EnableConnectionRequest().fromJson(jsonValue, options);
1157
- }
1158
-
1159
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableConnectionRequest {
1160
- return new EnableConnectionRequest().fromJsonString(jsonString, options);
1161
- }
1162
-
1163
- static equals(a: EnableConnectionRequest | PlainMessage<EnableConnectionRequest> | undefined, b: EnableConnectionRequest | PlainMessage<EnableConnectionRequest> | undefined): boolean {
1164
- return proto3.util.equals(EnableConnectionRequest, a, b);
1165
- }
1166
- }
1167
-
1168
- /**
1169
- * @generated from message scalekit.v1.connections.DisableConnectionRequest
1113
+ * @generated from message scalekit.v1.connections.ToggleConnectionRequest
1170
1114
  */
1171
- export class DisableConnectionRequest extends Message<DisableConnectionRequest> {
1115
+ export class ToggleConnectionRequest extends Message<ToggleConnectionRequest> {
1172
1116
  /**
1173
- * @generated from oneof scalekit.v1.connections.DisableConnectionRequest.identities
1117
+ * @generated from oneof scalekit.v1.connections.ToggleConnectionRequest.identities
1174
1118
  */
1175
1119
  identities: {
1176
1120
  /**
@@ -1191,33 +1135,33 @@ export class DisableConnectionRequest extends Message<DisableConnectionRequest>
1191
1135
  */
1192
1136
  id = "";
1193
1137
 
1194
- constructor(data?: PartialMessage<DisableConnectionRequest>) {
1138
+ constructor(data?: PartialMessage<ToggleConnectionRequest>) {
1195
1139
  super();
1196
1140
  proto3.util.initPartial(data, this);
1197
1141
  }
1198
1142
 
1199
1143
  static readonly runtime: typeof proto3 = proto3;
1200
- static readonly typeName = "scalekit.v1.connections.DisableConnectionRequest";
1144
+ static readonly typeName = "scalekit.v1.connections.ToggleConnectionRequest";
1201
1145
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
1202
1146
  { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
1203
1147
  { no: 2, name: "external_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
1204
1148
  { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1205
1149
  ]);
1206
1150
 
1207
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DisableConnectionRequest {
1208
- return new DisableConnectionRequest().fromBinary(bytes, options);
1151
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ToggleConnectionRequest {
1152
+ return new ToggleConnectionRequest().fromBinary(bytes, options);
1209
1153
  }
1210
1154
 
1211
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DisableConnectionRequest {
1212
- return new DisableConnectionRequest().fromJson(jsonValue, options);
1155
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ToggleConnectionRequest {
1156
+ return new ToggleConnectionRequest().fromJson(jsonValue, options);
1213
1157
  }
1214
1158
 
1215
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DisableConnectionRequest {
1216
- return new DisableConnectionRequest().fromJsonString(jsonString, options);
1159
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ToggleConnectionRequest {
1160
+ return new ToggleConnectionRequest().fromJsonString(jsonString, options);
1217
1161
  }
1218
1162
 
1219
- static equals(a: DisableConnectionRequest | PlainMessage<DisableConnectionRequest> | undefined, b: DisableConnectionRequest | PlainMessage<DisableConnectionRequest> | undefined): boolean {
1220
- return proto3.util.equals(DisableConnectionRequest, a, b);
1163
+ static equals(a: ToggleConnectionRequest | PlainMessage<ToggleConnectionRequest> | undefined, b: ToggleConnectionRequest | PlainMessage<ToggleConnectionRequest> | undefined): boolean {
1164
+ return proto3.util.equals(ToggleConnectionRequest, a, b);
1221
1165
  }
1222
1166
  }
1223
1167
 
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v1.8.0 with parameter "target=ts"
1
+ // @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
2
2
  // @generated from file scalekit/v1/domains/domains.proto (package scalekit.v1.domains, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v1.8.0 with parameter "target=ts"
1
+ // @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
2
2
  // @generated from file scalekit/v1/errdetails/errdetails.proto (package scalekit.v1.errdetails, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v1.8.0 with parameter "target=ts"
1
+ // @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
2
2
  // @generated from file scalekit/v1/options/options.proto (package scalekit.v1.options, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { CreateOrganizationRequest, CreateOrganizationResponse, CustomerPortalLinkRequest, CustomerPortalLinksResponse, DeleteOrganizationRequest, GenerateCustomerPortalLinkResponse, GetOrganizationRequest, GetOrganizationResponse, ListOrganizationsRequest, ListOrganizationsResponse, UpdateOrganizationRequest, UpdateOrganizationResponse } from "./organizations_pb.js";
6
+ import { CreateOrganizationRequest, CreateOrganizationResponse, DeleteOrganizationRequest, DeletePortalLinkRequest, GeneratePortalLinkRequest, GeneratePortalLinkResponse, GetOrganizationRequest, GetOrganizationResponse, GetPortalLinkRequest, GetPortalLinksResponse, ListOrganizationsRequest, ListOrganizationsResponse, UpdateOrganizationRequest, UpdateOrganizationResponse } from "./organizations_pb.js";
7
7
  import { Empty, MethodKind } from "@bufbuild/protobuf";
8
8
 
9
9
  /**
@@ -24,8 +24,6 @@ export const OrganizationService = {
24
24
  kind: MethodKind.Unary,
25
25
  },
26
26
  /**
27
- * Update Organization description here
28
- *
29
27
  * @generated from rpc scalekit.v1.organizations.OrganizationService.UpdateOrganization
30
28
  */
31
29
  updateOrganization: {
@@ -35,8 +33,6 @@ export const OrganizationService = {
35
33
  kind: MethodKind.Unary,
36
34
  },
37
35
  /**
38
- * Get Organization Description here
39
- *
40
36
  * @generated from rpc scalekit.v1.organizations.OrganizationService.GetOrganization
41
37
  */
42
38
  getOrganization: {
@@ -68,30 +64,30 @@ export const OrganizationService = {
68
64
  /**
69
65
  * Generate Portal Link for Org
70
66
  *
71
- * @generated from rpc scalekit.v1.organizations.OrganizationService.GenerateCustomerPortalLink
67
+ * @generated from rpc scalekit.v1.organizations.OrganizationService.GeneratePortalLink
72
68
  */
73
- generateCustomerPortalLink: {
74
- name: "GenerateCustomerPortalLink",
75
- I: CustomerPortalLinkRequest,
76
- O: GenerateCustomerPortalLinkResponse,
69
+ generatePortalLink: {
70
+ name: "GeneratePortalLink",
71
+ I: GeneratePortalLinkRequest,
72
+ O: GeneratePortalLinkResponse,
77
73
  kind: MethodKind.Unary,
78
74
  },
79
75
  /**
80
- * @generated from rpc scalekit.v1.organizations.OrganizationService.DeleteCustomerPortalLink
76
+ * @generated from rpc scalekit.v1.organizations.OrganizationService.DeletePortalLink
81
77
  */
82
- deleteCustomerPortalLink: {
83
- name: "DeleteCustomerPortalLink",
84
- I: CustomerPortalLinkRequest,
78
+ deletePortalLink: {
79
+ name: "DeletePortalLink",
80
+ I: DeletePortalLinkRequest,
85
81
  O: Empty,
86
82
  kind: MethodKind.Unary,
87
83
  },
88
84
  /**
89
- * @generated from rpc scalekit.v1.organizations.OrganizationService.GetCustomerPortalLink
85
+ * @generated from rpc scalekit.v1.organizations.OrganizationService.GetPortalLinks
90
86
  */
91
- getCustomerPortalLink: {
92
- name: "GetCustomerPortalLink",
93
- I: CustomerPortalLinkRequest,
94
- O: CustomerPortalLinksResponse,
87
+ getPortalLinks: {
88
+ name: "GetPortalLinks",
89
+ I: GetPortalLinkRequest,
90
+ O: GetPortalLinksResponse,
95
91
  kind: MethodKind.Unary,
96
92
  },
97
93
  }