@scalekit-sdk/node 2.3.0 → 2.5.0
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.
- package/lib/actions.d.ts +154 -0
- package/lib/actions.js +270 -0
- package/lib/actions.js.map +1 -0
- package/lib/connected-accounts.d.ts +134 -0
- package/lib/connected-accounts.js +187 -0
- package/lib/connected-accounts.js.map +1 -0
- package/lib/connection.d.ts +25 -1
- package/lib/connection.js +36 -0
- package/lib/connection.js.map +1 -1
- package/lib/core.d.ts +13 -3
- package/lib/core.js +36 -14
- package/lib/core.js.map +1 -1
- package/lib/directory.d.ts +25 -1
- package/lib/directory.js +36 -0
- package/lib/directory.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.d.ts +742 -0
- package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.js +216 -0
- package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +78 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +17 -2
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.d.ts +70 -0
- package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.js +18 -2
- package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.d.ts +8 -0
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/tools/tools_pb.d.ts +504 -0
- package/lib/pkg/grpc/scalekit/v1/tools/tools_pb.js +118 -0
- package/lib/pkg/grpc/scalekit/v1/tools/tools_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js.map +1 -1
- package/lib/role.d.ts +17 -0
- package/lib/role.js +22 -0
- package/lib/role.js.map +1 -1
- package/lib/scalekit.d.ts +23 -0
- package/lib/scalekit.js +53 -0
- package/lib/scalekit.js.map +1 -1
- package/lib/tools.d.ts +96 -0
- package/lib/tools.js +108 -0
- package/lib/tools.js.map +1 -0
- package/lib/user.d.ts +0 -3
- package/lib/user.js +0 -3
- package/lib/user.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
13
|
+
const errors_1 = require("./errors");
|
|
14
|
+
const connected_accounts_pb_1 = require("./pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb");
|
|
15
|
+
/**
|
|
16
|
+
* Client for managing connected accounts for third-party integrations.
|
|
17
|
+
*
|
|
18
|
+
* This mirrors the Python SDK `ConnectedAccountsClient` and exposes a typed,
|
|
19
|
+
* ergonomic API around the `ConnectedAccountService` to:
|
|
20
|
+
* - list connected accounts
|
|
21
|
+
* - create/update/delete connected accounts
|
|
22
|
+
* - generate magic links for authorization
|
|
23
|
+
* - fetch full authentication details for a connected account
|
|
24
|
+
*/
|
|
25
|
+
class ConnectedAccountsClient {
|
|
26
|
+
constructor(grpcConnect, coreClient) {
|
|
27
|
+
this.grpcConnect = grpcConnect;
|
|
28
|
+
this.coreClient = coreClient;
|
|
29
|
+
this.client = this.grpcConnect.createClient(connected_accounts_pb_1.ConnectedAccountService);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Lists connected accounts with optional filters and pagination.
|
|
33
|
+
*
|
|
34
|
+
* @param options Optional filtering and pagination parameters
|
|
35
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
36
|
+
*/
|
|
37
|
+
listConnectedAccounts(options) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
return this.coreClient.connectExec(this.client.listConnectedAccounts, (0, protobuf_1.create)(connected_accounts_pb_1.ListConnectedAccountsRequestSchema, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((options === null || options === void 0 ? void 0 : options.organizationId) && {
|
|
41
|
+
organizationId: options.organizationId,
|
|
42
|
+
})), ((options === null || options === void 0 ? void 0 : options.userId) && { userId: options.userId })), (((_a = options === null || options === void 0 ? void 0 : options.connector) === null || _a === void 0 ? void 0 : _a.trim()) && {
|
|
43
|
+
connector: options.connector.trim(),
|
|
44
|
+
})), (((_b = options === null || options === void 0 ? void 0 : options.identifier) === null || _b === void 0 ? void 0 : _b.trim()) && {
|
|
45
|
+
identifier: options.identifier.trim(),
|
|
46
|
+
})), (((_c = options === null || options === void 0 ? void 0 : options.provider) === null || _c === void 0 ? void 0 : _c.trim()) && { provider: options.provider.trim() })), ((options === null || options === void 0 ? void 0 : options.pageSize) !== undefined && { pageSize: options.pageSize })), ((options === null || options === void 0 ? void 0 : options.pageToken) && { pageToken: options.pageToken })), ((options === null || options === void 0 ? void 0 : options.query) && { query: options.query }))));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new connected account.
|
|
51
|
+
*
|
|
52
|
+
* @param params Connected account creation parameters
|
|
53
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
54
|
+
*/
|
|
55
|
+
createConnectedAccount(params) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const { connector, identifier, connectedAccount, organizationId, userId } = params;
|
|
58
|
+
return this.coreClient.connectExec(this.client.createConnectedAccount, (0, protobuf_1.create)(connected_accounts_pb_1.CreateConnectedAccountRequestSchema, Object.assign(Object.assign({ connector,
|
|
59
|
+
identifier,
|
|
60
|
+
connectedAccount }, (organizationId && { organizationId })), (userId && { userId }))));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets an existing connected account by connector and identifier, or creates one if none exists.
|
|
65
|
+
* Mirrors the Python SDK `get_or_create_connected_account`. When creating, the backend may require
|
|
66
|
+
* valid authorization details; if omitted, a minimal payload is sent and the server may return
|
|
67
|
+
* a validation error.
|
|
68
|
+
*
|
|
69
|
+
* @param params Get-or-create parameters
|
|
70
|
+
* @param params.connector Connector identifier (required)
|
|
71
|
+
* @param params.identifier Connected account identifier (required)
|
|
72
|
+
* @param params.authorizationDetails Optional auth details for the create path (OAuth token or static auth)
|
|
73
|
+
* @param params.organizationId Optional organization ID
|
|
74
|
+
* @param params.userId Optional user ID
|
|
75
|
+
* @param params.apiConfig Optional API config for the create path
|
|
76
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
77
|
+
* @throws {ScalekitException} If connector or identifier is missing.
|
|
78
|
+
*/
|
|
79
|
+
getOrCreateConnectedAccount(params) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const { connector: rawConnector, identifier: rawIdentifier, authorizationDetails, organizationId, userId, apiConfig, } = params;
|
|
82
|
+
const connector = rawConnector === null || rawConnector === void 0 ? void 0 : rawConnector.trim();
|
|
83
|
+
const identifier = rawIdentifier === null || rawIdentifier === void 0 ? void 0 : rawIdentifier.trim();
|
|
84
|
+
if (!connector) {
|
|
85
|
+
throw new Error('connector is required');
|
|
86
|
+
}
|
|
87
|
+
if (!identifier) {
|
|
88
|
+
throw new Error('identifier is required');
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const getResponse = yield this.getConnectedAccountByIdentifier({
|
|
92
|
+
connector,
|
|
93
|
+
identifier,
|
|
94
|
+
organizationId,
|
|
95
|
+
userId,
|
|
96
|
+
});
|
|
97
|
+
return (0, protobuf_1.create)(connected_accounts_pb_1.CreateConnectedAccountResponseSchema, {
|
|
98
|
+
connectedAccount: getResponse.connectedAccount,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
if (!(err instanceof errors_1.ScalekitNotFoundException)) {
|
|
103
|
+
throw err;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const resolvedAuthDetails = authorizationDetails
|
|
107
|
+
? (0, protobuf_1.create)(connected_accounts_pb_1.AuthorizationDetailsSchema, authorizationDetails)
|
|
108
|
+
: (0, protobuf_1.create)(connected_accounts_pb_1.AuthorizationDetailsSchema, {
|
|
109
|
+
details: { case: 'oauthToken', value: (0, protobuf_1.create)(connected_accounts_pb_1.OauthTokenSchema, {}) },
|
|
110
|
+
});
|
|
111
|
+
const connectedAccountPayload = (0, protobuf_1.create)(connected_accounts_pb_1.CreateConnectedAccountSchema, Object.assign({ authorizationDetails: resolvedAuthDetails }, (apiConfig != null && {
|
|
112
|
+
apiConfig: apiConfig,
|
|
113
|
+
})));
|
|
114
|
+
return this.createConnectedAccount({
|
|
115
|
+
connector,
|
|
116
|
+
identifier,
|
|
117
|
+
connectedAccount: connectedAccountPayload,
|
|
118
|
+
organizationId,
|
|
119
|
+
userId,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Updates an existing connected account.
|
|
125
|
+
*
|
|
126
|
+
* You can target the account either by `connectedAccountId` alone, or by the
|
|
127
|
+
* combination of `connector` and `identifier`.
|
|
128
|
+
*
|
|
129
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
130
|
+
* @throws {ScalekitException} If required parameters are missing.
|
|
131
|
+
*/
|
|
132
|
+
updateConnectedAccount(params) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
const { connector, identifier, connectedAccount, organizationId, userId, connectedAccountId, } = params;
|
|
135
|
+
if (!connectedAccountId && !((connector === null || connector === void 0 ? void 0 : connector.trim()) && (identifier === null || identifier === void 0 ? void 0 : identifier.trim()))) {
|
|
136
|
+
throw new Error('either connectedAccountId or connector + identifier is required');
|
|
137
|
+
}
|
|
138
|
+
return this.coreClient.connectExec(this.client.updateConnectedAccount, (0, protobuf_1.create)(connected_accounts_pb_1.UpdateConnectedAccountRequestSchema, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((connector === null || connector === void 0 ? void 0 : connector.trim()) && { connector: connector.trim() })), ((identifier === null || identifier === void 0 ? void 0 : identifier.trim()) && { identifier: identifier.trim() })), { connectedAccount }), (organizationId && { organizationId })), (userId && { userId })), (connectedAccountId && { id: connectedAccountId }))));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Deletes a connected account and revokes its credentials.
|
|
143
|
+
*
|
|
144
|
+
* You can target the account either by `connectedAccountId` alone, or by the
|
|
145
|
+
* combination of `connector` and `identifier`.
|
|
146
|
+
*
|
|
147
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
148
|
+
* @throws {ScalekitException} If required parameters are missing.
|
|
149
|
+
*/
|
|
150
|
+
deleteConnectedAccount(params) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const { connector, identifier, organizationId, userId, connectedAccountId, } = params;
|
|
153
|
+
if (!connectedAccountId && !((connector === null || connector === void 0 ? void 0 : connector.trim()) && (identifier === null || identifier === void 0 ? void 0 : identifier.trim()))) {
|
|
154
|
+
throw new Error('either connectedAccountId or connector + identifier is required');
|
|
155
|
+
}
|
|
156
|
+
return this.coreClient.connectExec(this.client.deleteConnectedAccount, (0, protobuf_1.create)(connected_accounts_pb_1.DeleteConnectedAccountRequestSchema, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((connector === null || connector === void 0 ? void 0 : connector.trim()) && { connector: connector.trim() })), ((identifier === null || identifier === void 0 ? void 0 : identifier.trim()) && { identifier: identifier.trim() })), (organizationId && { organizationId })), (userId && { userId })), (connectedAccountId && { id: connectedAccountId }))));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Generates a time-limited magic link for connecting or re-authorizing a third-party account.
|
|
161
|
+
*
|
|
162
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
163
|
+
*/
|
|
164
|
+
getMagicLinkForConnectedAccount(params) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
const { connector, identifier, organizationId, userId, connectedAccountId, } = params;
|
|
167
|
+
return this.coreClient.connectExec(this.client.getMagicLinkForConnectedAccount, (0, protobuf_1.create)(connected_accounts_pb_1.GetMagicLinkForConnectedAccountRequestSchema, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (connector && { connector })), (identifier && { identifier })), (organizationId && { organizationId })), (userId && { userId })), (connectedAccountId && { id: connectedAccountId }))));
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Retrieves complete authentication details for a connected account.
|
|
172
|
+
*
|
|
173
|
+
* This method returns sensitive credential information, so ensure you protect access
|
|
174
|
+
* to this in your application.
|
|
175
|
+
*
|
|
176
|
+
* @throws {ScalekitServerException} If a network or server error occurs.
|
|
177
|
+
* @throws {ScalekitNotFoundException} If no matching connected account is found.
|
|
178
|
+
*/
|
|
179
|
+
getConnectedAccountByIdentifier(params) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
const { connector, identifier, organizationId, userId, connectedAccountId, } = params;
|
|
182
|
+
return this.coreClient.connectExec(this.client.getConnectedAccountAuth, (0, protobuf_1.create)(connected_accounts_pb_1.GetConnectedAccountByIdentifierRequestSchema, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (connector && { connector })), (identifier && { identifier })), (organizationId && { organizationId })), (userId && { userId })), (connectedAccountId && { id: connectedAccountId }))));
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
exports.default = ConnectedAccountsClient;
|
|
187
|
+
//# sourceMappingURL=connected-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connected-accounts.js","sourceRoot":"","sources":["../src/connected-accounts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iDAAmE;AAInE,qCAAwE;AACxE,2GAqByE;AAEzE;;;;;;;;;GASG;AACH,MAAqB,uBAAuB;IAG1C,YACmB,WAAwB,EACxB,UAAsB;QADtB,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAY;QAEvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,+CAAuB,CAAC,CAAC;IACvE,CAAC;IAED;;;;;OAKG;IACG,qBAAqB,CAAC,OAS3B;;;YACC,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,qBAAqB,EACjC,IAAA,iBAAM,EAAC,0DAAkC,sHACpC,CAAC,CAAA,OAAO,aAAP,OA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
1
|
+
import { MessageShape } from '@bufbuild/protobuf';
|
|
2
|
+
import { EmptySchema } from '@bufbuild/protobuf/wkt';
|
|
1
3
|
import GrpcConnect from './connect';
|
|
2
4
|
import CoreClient from './core';
|
|
3
|
-
import { GetConnectionResponse, ToggleConnectionResponse, ListConnectionsResponse } from './pkg/grpc/scalekit/v1/connections/connections_pb';
|
|
5
|
+
import { CreateConnection, CreateConnectionResponse, GetConnectionResponse, ToggleConnectionResponse, ListConnectionsResponse } from './pkg/grpc/scalekit/v1/connections/connections_pb';
|
|
4
6
|
/**
|
|
5
7
|
* Client for managing enterprise SSO connections for organizations.
|
|
6
8
|
*
|
|
@@ -213,4 +215,26 @@ export default class ConnectionClient {
|
|
|
213
215
|
* @see {@link listConnections} - List all connections
|
|
214
216
|
*/
|
|
215
217
|
disableConnection(organizationId: string, id: string): Promise<ToggleConnectionResponse>;
|
|
218
|
+
/**
|
|
219
|
+
* Creates a new SSO connection for an organization.
|
|
220
|
+
*
|
|
221
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
222
|
+
* @param {CreateConnection} connection - The connection configuration to create
|
|
223
|
+
*
|
|
224
|
+
* @returns {Promise<CreateConnectionResponse>} Response containing the created connection
|
|
225
|
+
*
|
|
226
|
+
* @throws {ScalekitServerException} If the organization is not found or connection configuration is invalid
|
|
227
|
+
*/
|
|
228
|
+
createConnection(organizationId: string, connection: CreateConnection): Promise<CreateConnectionResponse>;
|
|
229
|
+
/**
|
|
230
|
+
* Deletes an SSO connection for an organization.
|
|
231
|
+
*
|
|
232
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
233
|
+
* @param {string} id - The connection ID to delete (format: "conn_...")
|
|
234
|
+
*
|
|
235
|
+
* @returns {Promise<MessageShape<typeof EmptySchema>>} Empty response on success
|
|
236
|
+
*
|
|
237
|
+
* @throws {ScalekitServerException} If the organization or connection is not found
|
|
238
|
+
*/
|
|
239
|
+
deleteConnection(organizationId: string, id: string): Promise<MessageShape<typeof EmptySchema>>;
|
|
216
240
|
}
|
package/lib/connection.js
CHANGED
|
@@ -9,7 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
12
13
|
const connections_pb_1 = require("./pkg/grpc/scalekit/v1/connections/connections_pb");
|
|
14
|
+
const connections_pb_2 = require("./pkg/grpc/scalekit/v1/connections/connections_pb");
|
|
13
15
|
/**
|
|
14
16
|
* Client for managing enterprise SSO connections for organizations.
|
|
15
17
|
*
|
|
@@ -256,6 +258,40 @@ class ConnectionClient {
|
|
|
256
258
|
});
|
|
257
259
|
});
|
|
258
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Creates a new SSO connection for an organization.
|
|
263
|
+
*
|
|
264
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
265
|
+
* @param {CreateConnection} connection - The connection configuration to create
|
|
266
|
+
*
|
|
267
|
+
* @returns {Promise<CreateConnectionResponse>} Response containing the created connection
|
|
268
|
+
*
|
|
269
|
+
* @throws {ScalekitServerException} If the organization is not found or connection configuration is invalid
|
|
270
|
+
*/
|
|
271
|
+
createConnection(organizationId, connection) {
|
|
272
|
+
const request = (0, protobuf_1.create)(connections_pb_2.CreateConnectionRequestSchema, {
|
|
273
|
+
organizationId,
|
|
274
|
+
connection,
|
|
275
|
+
});
|
|
276
|
+
return this.coreClient.connectExec(this.client.createConnection, request);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Deletes an SSO connection for an organization.
|
|
280
|
+
*
|
|
281
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
282
|
+
* @param {string} id - The connection ID to delete (format: "conn_...")
|
|
283
|
+
*
|
|
284
|
+
* @returns {Promise<MessageShape<typeof EmptySchema>>} Empty response on success
|
|
285
|
+
*
|
|
286
|
+
* @throws {ScalekitServerException} If the organization or connection is not found
|
|
287
|
+
*/
|
|
288
|
+
deleteConnection(organizationId, id) {
|
|
289
|
+
const request = (0, protobuf_1.create)(connections_pb_2.DeleteConnectionRequestSchema, {
|
|
290
|
+
organizationId,
|
|
291
|
+
id,
|
|
292
|
+
});
|
|
293
|
+
return this.coreClient.connectExec(this.client.deleteConnection, request);
|
|
294
|
+
}
|
|
259
295
|
}
|
|
260
296
|
exports.default = ConnectionClient;
|
|
261
297
|
//# sourceMappingURL=connection.js.map
|
package/lib/connection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iDAA0D;AAK1D,sFAAsF;AACtF,sFAQ2D;AAE3D;;;;;;;;;;;;;GAaG;AACH,MAAqB,gBAAgB;IAEnC,YACmB,WAAwB,EACxB,UAAsB;QADtB,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAY;QAEvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,kCAAiB,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;IACG,aAAa,CACjB,cAAsB,EACtB,EAAU;;YAEV,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;gBAC5D,EAAE;gBACF,cAAc;aACf,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,uBAAuB,CAC3B,MAAc;;YAEd,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,eA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,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF;AA5RD,mCA4RC"}
|
package/lib/core.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { Axios, AxiosResponse } from 'axios';
|
|
2
|
+
declare module 'axios' {
|
|
3
|
+
interface InternalAxiosRequestConfig {
|
|
4
|
+
skipAuth?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface AxiosRequestConfig {
|
|
7
|
+
skipAuth?: boolean;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
2
10
|
import { JWK } from 'jose';
|
|
3
11
|
import { TokenResponse } from './types/auth';
|
|
4
12
|
export declare const headers: {
|
|
@@ -30,12 +38,14 @@ export default class CoreClient {
|
|
|
30
38
|
* @returns {Promise<void>} Returns nothing
|
|
31
39
|
*/
|
|
32
40
|
getJwks(): Promise<void>;
|
|
41
|
+
private sleep;
|
|
33
42
|
/**
|
|
34
|
-
* Execute a function with error handling and retry logic
|
|
43
|
+
* Execute a function with error handling and retry logic.
|
|
44
|
+
*
|
|
35
45
|
* @param fn Function to execute
|
|
36
46
|
* @param data Data to pass to the function
|
|
37
|
-
* @param retryLeft Number of retries left
|
|
38
47
|
* @returns {Promise<TResponse>} Returns the response
|
|
39
48
|
*/
|
|
40
|
-
connectExec<TRequest, TResponse>(fn: (request: TRequest) => Promise<TResponse>, data: TRequest
|
|
49
|
+
connectExec<TRequest, TResponse>(fn: (request: TRequest) => Promise<TResponse>, data: TRequest): Promise<TResponse>;
|
|
50
|
+
private _connectExec;
|
|
41
51
|
}
|
package/lib/core.js
CHANGED
|
@@ -69,14 +69,14 @@ class CoreClient {
|
|
|
69
69
|
this.accessToken = null;
|
|
70
70
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
71
71
|
this.sdkVersion = `Scalekit-Node/${require('../package.json').version}`;
|
|
72
|
-
this.apiVersion = '
|
|
72
|
+
this.apiVersion = '20260310';
|
|
73
73
|
this.userAgent = `${this.sdkVersion} Node/${process.version} (${process.platform}; ${os_1.default.arch()})`;
|
|
74
74
|
this.axios = axios_1.default.create({ baseURL: envUrl });
|
|
75
75
|
this.axios.interceptors.request.use((config) => {
|
|
76
76
|
config.headers[exports.headers['user-agent']] = this.userAgent;
|
|
77
77
|
config.headers[exports.headers['x-sdk-version']] = this.sdkVersion;
|
|
78
78
|
config.headers[exports.headers['x-api-version']] = this.apiVersion;
|
|
79
|
-
if (this.accessToken) {
|
|
79
|
+
if (this.accessToken && !config.skipAuth) {
|
|
80
80
|
config.headers[exports.headers.authorization] = `Bearer ${this.accessToken}`;
|
|
81
81
|
}
|
|
82
82
|
return config;
|
|
@@ -105,6 +105,7 @@ class CoreClient {
|
|
|
105
105
|
headers: {
|
|
106
106
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
107
107
|
},
|
|
108
|
+
skipAuth: true,
|
|
108
109
|
});
|
|
109
110
|
});
|
|
110
111
|
}
|
|
@@ -121,27 +122,43 @@ class CoreClient {
|
|
|
121
122
|
this.keys = keys;
|
|
122
123
|
});
|
|
123
124
|
}
|
|
125
|
+
sleep(ms) {
|
|
126
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
127
|
+
}
|
|
124
128
|
/**
|
|
125
|
-
* Execute a function with error handling and retry logic
|
|
129
|
+
* Execute a function with error handling and retry logic.
|
|
130
|
+
*
|
|
126
131
|
* @param fn Function to execute
|
|
127
132
|
* @param data Data to pass to the function
|
|
128
|
-
* @param retryLeft Number of retries left
|
|
129
133
|
* @returns {Promise<TResponse>} Returns the response
|
|
130
134
|
*/
|
|
131
|
-
connectExec(
|
|
132
|
-
return __awaiter(this,
|
|
135
|
+
connectExec(fn, data) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
return this._connectExec(fn, data, 3, 0);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
_connectExec(fn, data, retryLeft, attempt) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
142
|
try {
|
|
134
|
-
|
|
135
|
-
return res;
|
|
143
|
+
return yield fn(data);
|
|
136
144
|
}
|
|
137
145
|
catch (error) {
|
|
138
146
|
// Handle gRPC Connect errors
|
|
139
147
|
if (error instanceof connect_1.ConnectError) {
|
|
140
148
|
if (retryLeft > 0) {
|
|
141
|
-
|
|
142
|
-
if (serverException.httpStatus === 401) {
|
|
149
|
+
if (error.code === connect_1.Code.Unauthenticated) {
|
|
143
150
|
yield this.authenticateClient();
|
|
144
|
-
return this.
|
|
151
|
+
return this._connectExec(fn, data, retryLeft - 1, attempt + 1);
|
|
152
|
+
}
|
|
153
|
+
// The Connect transport maps HTTP 429 to Code.Unavailable with a 429 body,
|
|
154
|
+
// and gRPC-native rate limits come as Code.ResourceExhausted.
|
|
155
|
+
const is429 = error.code === connect_1.Code.ResourceExhausted ||
|
|
156
|
+
(error.code === connect_1.Code.Unavailable && error.message.includes('429'));
|
|
157
|
+
if (is429) {
|
|
158
|
+
const baseBackoff = Math.min(1000 * Math.pow(2, attempt), 30000);
|
|
159
|
+
const backoffMs = baseBackoff * (0.5 + Math.random() * 0.5);
|
|
160
|
+
yield this.sleep(backoffMs);
|
|
161
|
+
return this._connectExec(fn, data, retryLeft - 1, attempt + 1);
|
|
145
162
|
}
|
|
146
163
|
}
|
|
147
164
|
throw base_exception_1.ScalekitServerException.promote(error);
|
|
@@ -150,10 +167,15 @@ class CoreClient {
|
|
|
150
167
|
if (error instanceof axios_1.AxiosError) {
|
|
151
168
|
if (error.response) {
|
|
152
169
|
if (retryLeft > 0) {
|
|
153
|
-
|
|
154
|
-
if (serverException.httpStatus === 401) {
|
|
170
|
+
if (error.response.status === 401) {
|
|
155
171
|
yield this.authenticateClient();
|
|
156
|
-
return this.
|
|
172
|
+
return this._connectExec(fn, data, retryLeft - 1, attempt + 1);
|
|
173
|
+
}
|
|
174
|
+
if (error.response.status === 429) {
|
|
175
|
+
const baseBackoff = Math.min(1000 * Math.pow(2, attempt), 30000);
|
|
176
|
+
const backoffMs = baseBackoff * (0.5 + Math.random() * 0.5);
|
|
177
|
+
yield this.sleep(backoffMs);
|
|
178
|
+
return this._connectExec(fn, data, retryLeft - 1, attempt + 1);
|
|
157
179
|
}
|
|
158
180
|
}
|
|
159
181
|
throw base_exception_1.ScalekitServerException.promote(error.response);
|
package/lib/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyD;AACzD,+
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyD;AACzD,+CAMe;AAWf,4CAAoB;AACpB,4CAA6B;AAC7B,+CAA6C;AAE7C,4DAGiC;AAEpB,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,YAAY;IAC1B,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE,eAAe;IAChC,aAAa,EAAE,eAAe;CAC/B,CAAC;AAEF,MAAM,aAAa,GAAG,aAAa,CAAC;AACpC,MAAM,YAAY,GAAG,MAAM,CAAC;AAC5B,MAAqB,UAAU;IAU7B,YACW,MAAc,EACd,QAAgB,EAChB,YAAoB;QAFpB,WAAM,GAAN,MAAM,CAAQ;QACd,aAAQ,GAAR,QAAQ,CAAQ;QAChB,iBAAY,GAAZ,YAAY,CAAQ;QAZxB,SAAI,GAAU,EAAE,CAAC;QACjB,gBAAW,GAAkB,IAAI,CAAC;QAEzC,8DAA8D;QACvD,eAAU,GAAG,iBAAkB,OAAO,CAAC,iBAAiB,CAAyB,CAAC,OAAO,EAAE,CAAC;QAC5F,eAAU,GAAG,UAAU,CAAC;QACxB,cAAS,GAAG,GAAG,IAAI,CAAC,UAAU,SAAS,OAAO,CAAC,OAAO,KAC3D,OAAO,CAAC,QACV,KAAK,YAA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,CAAC,IAAI,GAAG,SAAA,CAAC,EAAI,OAAO,CAAA,EAAE,KAAK,CAAC,CAAC;gCACzD,MAAM,SAAS,GAAG,WAAW,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;gCAC5D,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gCAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;4BACjE,CAAC;wBACH,CAAC;wBACD,MAAM,wCAAuB,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACxD,CAAC;yBAAM,CAAC;wBACN,MAAM,IAAI,kCAAiB,CAAC,KAAK,CAAC,CAAC;oBACrC,CAAC;gBACH,CAAC;gBACD,8CAA8C;gBAC9C,IAAI,KAAK,YAAY,kCAAiB,EAAE,CAAC;oBACvC,MAAM,KAAK,CAAC;gBACd,CAAC;gBACD,wBAAwB;gBACxB,MAAM,IAAI,kCAAiB,CAAC,KAAK,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;KAAA;CACF;AAjJD,6BAiJC"}
|
package/lib/directory.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { MessageShape } from '@bufbuild/protobuf';
|
|
2
|
+
import { EmptySchema } from '@bufbuild/protobuf/wkt';
|
|
1
3
|
import GrpcConnect from './connect';
|
|
2
4
|
import CoreClient from './core';
|
|
3
|
-
import { GetDirectoryResponse, Directory, ListDirectoriesResponse, ListDirectoryGroupsResponse, ListDirectoryUsersResponse, ToggleDirectoryResponse } from './pkg/grpc/scalekit/v1/directories/directories_pb';
|
|
5
|
+
import { CreateDirectory, CreateDirectoryResponse, GetDirectoryResponse, Directory, ListDirectoriesResponse, ListDirectoryGroupsResponse, ListDirectoryUsersResponse, ToggleDirectoryResponse } from './pkg/grpc/scalekit/v1/directories/directories_pb';
|
|
4
6
|
/**
|
|
5
7
|
* Client for managing SCIM directory synchronization.
|
|
6
8
|
*
|
|
@@ -328,4 +330,26 @@ export default class DirectoryClient {
|
|
|
328
330
|
* @see {@link listDirectories} - List all directories
|
|
329
331
|
*/
|
|
330
332
|
disableDirectory(organizationId: string, directoryId: string): Promise<ToggleDirectoryResponse>;
|
|
333
|
+
/**
|
|
334
|
+
* Creates a new SCIM directory for an organization.
|
|
335
|
+
*
|
|
336
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
337
|
+
* @param {CreateDirectory} directory - The directory configuration to create
|
|
338
|
+
*
|
|
339
|
+
* @returns {Promise<CreateDirectoryResponse>} Response containing the created directory
|
|
340
|
+
*
|
|
341
|
+
* @throws {ScalekitServerException} If the organization is not found or directory configuration is invalid
|
|
342
|
+
*/
|
|
343
|
+
createDirectory(organizationId: string, directory: CreateDirectory): Promise<CreateDirectoryResponse>;
|
|
344
|
+
/**
|
|
345
|
+
* Deletes a SCIM directory for an organization.
|
|
346
|
+
*
|
|
347
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
348
|
+
* @param {string} directoryId - The directory ID to delete (format: "dir_...")
|
|
349
|
+
*
|
|
350
|
+
* @returns {Promise<MessageShape<typeof EmptySchema>>} Empty response on success
|
|
351
|
+
*
|
|
352
|
+
* @throws {ScalekitServerException} If the organization or directory is not found
|
|
353
|
+
*/
|
|
354
|
+
deleteDirectory(organizationId: string, directoryId: string): Promise<MessageShape<typeof EmptySchema>>;
|
|
331
355
|
}
|
package/lib/directory.js
CHANGED
|
@@ -9,8 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
12
13
|
const wkt_1 = require("@bufbuild/protobuf/wkt");
|
|
13
14
|
const directories_pb_1 = require("./pkg/grpc/scalekit/v1/directories/directories_pb");
|
|
15
|
+
const directories_pb_2 = require("./pkg/grpc/scalekit/v1/directories/directories_pb");
|
|
14
16
|
/**
|
|
15
17
|
* Client for managing SCIM directory synchronization.
|
|
16
18
|
*
|
|
@@ -385,6 +387,40 @@ class DirectoryClient {
|
|
|
385
387
|
});
|
|
386
388
|
});
|
|
387
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* Creates a new SCIM directory for an organization.
|
|
392
|
+
*
|
|
393
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
394
|
+
* @param {CreateDirectory} directory - The directory configuration to create
|
|
395
|
+
*
|
|
396
|
+
* @returns {Promise<CreateDirectoryResponse>} Response containing the created directory
|
|
397
|
+
*
|
|
398
|
+
* @throws {ScalekitServerException} If the organization is not found or directory configuration is invalid
|
|
399
|
+
*/
|
|
400
|
+
createDirectory(organizationId, directory) {
|
|
401
|
+
const request = (0, protobuf_1.create)(directories_pb_2.CreateDirectoryRequestSchema, {
|
|
402
|
+
organizationId,
|
|
403
|
+
directory,
|
|
404
|
+
});
|
|
405
|
+
return this.coreClient.connectExec(this.client.createDirectory, request);
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Deletes a SCIM directory for an organization.
|
|
409
|
+
*
|
|
410
|
+
* @param {string} organizationId - The organization ID (format: "org_...")
|
|
411
|
+
* @param {string} directoryId - The directory ID to delete (format: "dir_...")
|
|
412
|
+
*
|
|
413
|
+
* @returns {Promise<MessageShape<typeof EmptySchema>>} Empty response on success
|
|
414
|
+
*
|
|
415
|
+
* @throws {ScalekitServerException} If the organization or directory is not found
|
|
416
|
+
*/
|
|
417
|
+
deleteDirectory(organizationId, directoryId) {
|
|
418
|
+
const request = (0, protobuf_1.create)(directories_pb_2.DeleteDirectoryRequestSchema, {
|
|
419
|
+
organizationId,
|
|
420
|
+
id: directoryId,
|
|
421
|
+
});
|
|
422
|
+
return this.coreClient.connectExec(this.client.deleteDirectory, request);
|
|
423
|
+
}
|
|
388
424
|
}
|
|
389
425
|
exports.default = DirectoryClient;
|
|
390
426
|
//# sourceMappingURL=directory.js.map
|
package/lib/directory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iDAA0D;AAC1D,gDAAwE;AAIxE,sFAAqF;AACrF,sFAW2D;AAE3D;;;;;;;;;;;;;;GAcG;AACH,MAAqB,eAAe;IAElC,YACmB,WAAwB,EACxB,UAAsB;QADtB,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAY;QAEvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,iCAAgB,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACG,eAAe,CACnB,cAAsB;;YAEtB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;gBAC9D,cAAc;aACf,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgDG;IACG,YAAY,CAChB,cAAsB,EACtB,WAAmB;;YAEnB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;gBAC3D,cAAc;gBACd,EAAE,EAAE,WAAW;aAChB,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,mCAAmC,CACvC,cAAsB;;YAEtB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YAC/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C;QACL,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,eAAe,CACnB,cAAsB,EACtB,WAAmB;;YAEnB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;gBAC9D,cAAc;gBACd,EAAE,EAAE,WAAW;aAChB,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,gBAAgB,CACpB,cAAsB,EACtB,WAAmB;;YAEnB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE;gBAC/D,cAAc;gBACd,EAAE,EAAE,WAAW;aAChB,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;;;;;OASG;IACH,eAAe,CACb,cAAsB,EACtB,SAA0B;QAE1B,MAAM,OAAO,GAAG,IAAA,iBAAM,EAAC,6CAA4B,EAAE;YACnD,cAAc;YACd,SAAS;SACV,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,eAAe,CACb,cAAsB,EACtB,WAAmB;QAEnB,MAAM,OAAO,GAAG,IAAA,iBAAM,EAAC,6CAA4B,EAAE;YACnD,cAAc;YACd,EAAE,EAAE,WAAW;SAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AA3bD,kCA2bC"}
|
|
@@ -12,7 +12,7 @@ const options_pb_1 = require("../options/options_pb");
|
|
|
12
12
|
/**
|
|
13
13
|
* Describes the file scalekit/v1/auditlogs/auditlogs.proto.
|
|
14
14
|
*/
|
|
15
|
-
exports.file_scalekit_v1_auditlogs_auditlogs = (0, codegenv2_1.fileDesc)("
|
|
15
|
+
exports.file_scalekit_v1_auditlogs_auditlogs = (0, codegenv2_1.fileDesc)("CiVzY2FsZWtpdC92MS9hdWRpdGxvZ3MvYXVkaXRsb2dzLnByb3RvEhVzY2FsZWtpdC52MS5hdWRpdGxvZ3MixgIKEkxpc3RBdXRoTG9nUmVxdWVzdBIRCglwYWdlX3NpemUYASABKA0SEgoKcGFnZV90b2tlbhgCIAEoCRINCgVlbWFpbBgDIAEoCRIOCgZzdGF0dXMYBCADKAkSLgoKc3RhcnRfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLAoIZW5kX3RpbWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhMKC3Jlc291cmNlX2lkGAcgASgJEiQKHGNvbm5lY3RlZF9hY2NvdW50X2lkZW50aWZpZXIYCCABKAkSUQoJY2xpZW50X2lkGAkgASgJQj6SQTsyJ0ZpbHRlciBhdXRoZW50aWNhdGlvbiBsb2dzIGJ5IGNsaWVudCBJREoQInNrY18xMjM0NTY3ODkwIiKYAQoTTGlzdEF1dGhMb2dSZXNwb25zZRIXCg9uZXh0X3BhZ2VfdG9rZW4YASABKAkSFwoPcHJldl9wYWdlX3Rva2VuGAIgASgJEhIKCnRvdGFsX3NpemUYAyABKA0SOwoMYXV0aFJlcXVlc3RzGAQgAygLMiUuc2NhbGVraXQudjEuYXVkaXRsb2dzLkF1dGhMb2dSZXF1ZXN0IsgFCg5BdXRoTG9nUmVxdWVzdBIXCg9vcmdhbml6YXRpb25faWQYASABKAkSFgoOZW52aXJvbm1lbnRfaWQYAiABKAkSFQoNY29ubmVjdGlvbl9pZBgDIAEoCRIXCg9hdXRoX3JlcXVlc3RfaWQYBCABKAkSDQoFZW1haWwYBSABKAkSFwoPY29ubmVjdGlvbl90eXBlGAYgASgJEhsKE2Nvbm5lY3Rpb25fcHJvdmlkZXIYByABKAkSDg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vZ3MvYXV0aGVudGljYXRpb24vcmVxdWVzdHNCNVozZ2l0aHViLmNvbS9zY2FsZWtpdC1pbmMvc2NhbGVraXQvcGtnL2dycGMvYXVkaXRsb2dzYgZwcm90bzM", [annotations_pb_1.file_google_api_annotations, wkt_1.file_google_protobuf_timestamp, annotations_pb_2.file_protoc_gen_openapiv2_options_annotations, options_pb_1.file_scalekit_v1_options_options]);
|
|
16
16
|
/**
|
|
17
17
|
* Describes the message scalekit.v1.auditlogs.ListAuthLogRequest.
|
|
18
18
|
* Use `create(ListAuthLogRequestSchema)` to create a new message.
|