@scaleway/sdk-iam 2.8.0 → 2.9.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/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +6 -6
- package/dist/metadata.gen.js +6 -2
- package/dist/v1alpha1/api.gen.js +451 -909
- package/dist/v1alpha1/marshalling.gen.js +82 -82
- package/dist/v1alpha1/metadata.gen.js +1 -1
- package/dist/v1alpha1/validation-rules.gen.js +37 -37
- package/package.json +8 -6
- package/LICENSE +0 -191
- package/dist/metadata.gen.json +0 -6
- package/dist/metadata2.gen.js +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isJSONObject, marshalBlobToScwFile, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
3
|
//#region src/v1alpha1/marshalling.gen.ts
|
|
4
|
-
|
|
4
|
+
const unmarshalJWT = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JWT' failed as data isn't a dictionary.`);
|
|
6
6
|
return {
|
|
7
7
|
audienceId: data.audience_id,
|
|
@@ -14,7 +14,7 @@ var unmarshalJWT = (data) => {
|
|
|
14
14
|
userAgent: data.user_agent
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
const unmarshalAPIKey = (data) => {
|
|
18
18
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'APIKey' failed as data isn't a dictionary.`);
|
|
19
19
|
return {
|
|
20
20
|
accessKey: data.access_key,
|
|
@@ -32,7 +32,7 @@ var unmarshalAPIKey = (data) => {
|
|
|
32
32
|
userId: data.user_id
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
const unmarshalApplication = (data) => {
|
|
36
36
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
|
|
37
37
|
return {
|
|
38
38
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -48,7 +48,7 @@ var unmarshalApplication = (data) => {
|
|
|
48
48
|
updatedAt: unmarshalDate(data.updated_at)
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
const unmarshalGroup = (data) => {
|
|
52
52
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Group' failed as data isn't a dictionary.`);
|
|
53
53
|
return {
|
|
54
54
|
applicationIds: data.application_ids,
|
|
@@ -65,7 +65,7 @@ var unmarshalGroup = (data) => {
|
|
|
65
65
|
userIds: data.user_ids
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
const unmarshalLog = (data) => {
|
|
69
69
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
70
70
|
return {
|
|
71
71
|
action: data.action,
|
|
@@ -79,7 +79,7 @@ var unmarshalLog = (data) => {
|
|
|
79
79
|
userAgent: data.user_agent
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
const unmarshalPolicy = (data) => {
|
|
83
83
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Policy' failed as data isn't a dictionary.`);
|
|
84
84
|
return {
|
|
85
85
|
applicationId: data.application_id,
|
|
@@ -101,7 +101,7 @@ var unmarshalPolicy = (data) => {
|
|
|
101
101
|
userId: data.user_id
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
const unmarshalQuotumLimit = (data) => {
|
|
105
105
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'QuotumLimit' failed as data isn't a dictionary.`);
|
|
106
106
|
return {
|
|
107
107
|
global: data.global,
|
|
@@ -111,7 +111,7 @@ var unmarshalQuotumLimit = (data) => {
|
|
|
111
111
|
zone: data.zone
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
const unmarshalQuotum = (data) => {
|
|
115
115
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Quotum' failed as data isn't a dictionary.`);
|
|
116
116
|
return {
|
|
117
117
|
description: data.description,
|
|
@@ -124,7 +124,7 @@ var unmarshalQuotum = (data) => {
|
|
|
124
124
|
unlimited: data.unlimited
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
const unmarshalSSHKey = (data) => {
|
|
128
128
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SSHKey' failed as data isn't a dictionary.`);
|
|
129
129
|
return {
|
|
130
130
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -138,7 +138,7 @@ var unmarshalSSHKey = (data) => {
|
|
|
138
138
|
updatedAt: unmarshalDate(data.updated_at)
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
const unmarshalSamlCertificate = (data) => {
|
|
142
142
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SamlCertificate' failed as data isn't a dictionary.`);
|
|
143
143
|
return {
|
|
144
144
|
content: data.content,
|
|
@@ -148,7 +148,7 @@ var unmarshalSamlCertificate = (data) => {
|
|
|
148
148
|
type: data.type
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
|
-
|
|
151
|
+
const unmarshalWebAuthnAuthenticator = (data) => {
|
|
152
152
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'WebAuthnAuthenticator' failed as data isn't a dictionary.`);
|
|
153
153
|
return {
|
|
154
154
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -157,7 +157,7 @@ var unmarshalWebAuthnAuthenticator = (data) => {
|
|
|
157
157
|
name: data.name
|
|
158
158
|
};
|
|
159
159
|
};
|
|
160
|
-
|
|
160
|
+
const unmarshalUser = (data) => {
|
|
161
161
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
162
162
|
return {
|
|
163
163
|
accountRootUserId: data.account_root_user_id,
|
|
@@ -181,7 +181,7 @@ var unmarshalUser = (data) => {
|
|
|
181
181
|
username: data.username
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
const unmarshalScimToken = (data) => {
|
|
185
185
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ScimToken' failed as data isn't a dictionary.`);
|
|
186
186
|
return {
|
|
187
187
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -190,14 +190,14 @@ var unmarshalScimToken = (data) => {
|
|
|
190
190
|
scimId: data.scim_id
|
|
191
191
|
};
|
|
192
192
|
};
|
|
193
|
-
|
|
193
|
+
const unmarshalCreateScimTokenResponse = (data) => {
|
|
194
194
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateScimTokenResponse' failed as data isn't a dictionary.`);
|
|
195
195
|
return {
|
|
196
196
|
bearerToken: data.bearer_token,
|
|
197
197
|
token: data.token ? unmarshalScimToken(data.token) : void 0
|
|
198
198
|
};
|
|
199
199
|
};
|
|
200
|
-
|
|
200
|
+
const unmarshalEncodedJWT = (data) => {
|
|
201
201
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EncodedJWT' failed as data isn't a dictionary.`);
|
|
202
202
|
return {
|
|
203
203
|
jwt: data.jwt ? unmarshalJWT(data.jwt) : void 0,
|
|
@@ -205,11 +205,11 @@ var unmarshalEncodedJWT = (data) => {
|
|
|
205
205
|
token: data.token
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
const unmarshalFinishUserWebAuthnRegistrationResponse = (data) => {
|
|
209
209
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'FinishUserWebAuthnRegistrationResponse' failed as data isn't a dictionary.`);
|
|
210
210
|
return { authenticatorId: data.authenticator_id };
|
|
211
211
|
};
|
|
212
|
-
|
|
212
|
+
const unmarshalConnectionConnectedOrganization = (data) => {
|
|
213
213
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ConnectionConnectedOrganization' failed as data isn't a dictionary.`);
|
|
214
214
|
return {
|
|
215
215
|
id: data.id,
|
|
@@ -217,7 +217,7 @@ var unmarshalConnectionConnectedOrganization = (data) => {
|
|
|
217
217
|
name: data.name
|
|
218
218
|
};
|
|
219
219
|
};
|
|
220
|
-
|
|
220
|
+
const unmarshalConnectionConnectedUser = (data) => {
|
|
221
221
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ConnectionConnectedUser' failed as data isn't a dictionary.`);
|
|
222
222
|
return {
|
|
223
223
|
id: data.id,
|
|
@@ -225,36 +225,36 @@ var unmarshalConnectionConnectedUser = (data) => {
|
|
|
225
225
|
username: data.username
|
|
226
226
|
};
|
|
227
227
|
};
|
|
228
|
-
|
|
228
|
+
const unmarshalConnection = (data) => {
|
|
229
229
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Connection' failed as data isn't a dictionary.`);
|
|
230
230
|
return {
|
|
231
231
|
organization: data.organization ? unmarshalConnectionConnectedOrganization(data.organization) : void 0,
|
|
232
232
|
user: data.user ? unmarshalConnectionConnectedUser(data.user) : void 0
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
|
|
235
|
+
const unmarshalGetUserConnectionsResponse = (data) => {
|
|
236
236
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetUserConnectionsResponse' failed as data isn't a dictionary.`);
|
|
237
237
|
return { connections: unmarshalArrayOfObject(data.connections, unmarshalConnection) };
|
|
238
238
|
};
|
|
239
|
-
|
|
239
|
+
const unmarshalInitiateUserConnectionResponse = (data) => {
|
|
240
240
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InitiateUserConnectionResponse' failed as data isn't a dictionary.`);
|
|
241
241
|
return { token: data.token };
|
|
242
242
|
};
|
|
243
|
-
|
|
243
|
+
const unmarshalListAPIKeysResponse = (data) => {
|
|
244
244
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAPIKeysResponse' failed as data isn't a dictionary.`);
|
|
245
245
|
return {
|
|
246
246
|
apiKeys: unmarshalArrayOfObject(data.api_keys, unmarshalAPIKey),
|
|
247
247
|
totalCount: data.total_count
|
|
248
248
|
};
|
|
249
249
|
};
|
|
250
|
-
|
|
250
|
+
const unmarshalListApplicationsResponse = (data) => {
|
|
251
251
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
|
|
252
252
|
return {
|
|
253
253
|
applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
|
|
254
254
|
totalCount: data.total_count
|
|
255
255
|
};
|
|
256
256
|
};
|
|
257
|
-
|
|
257
|
+
const unmarshalGracePeriod = (data) => {
|
|
258
258
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GracePeriod' failed as data isn't a dictionary.`);
|
|
259
259
|
return {
|
|
260
260
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -262,32 +262,32 @@ var unmarshalGracePeriod = (data) => {
|
|
|
262
262
|
type: data.type
|
|
263
263
|
};
|
|
264
264
|
};
|
|
265
|
-
|
|
265
|
+
const unmarshalListGracePeriodsResponse = (data) => {
|
|
266
266
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGracePeriodsResponse' failed as data isn't a dictionary.`);
|
|
267
267
|
return { gracePeriods: unmarshalArrayOfObject(data.grace_periods, unmarshalGracePeriod) };
|
|
268
268
|
};
|
|
269
|
-
|
|
269
|
+
const unmarshalListGroupsResponse = (data) => {
|
|
270
270
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGroupsResponse' failed as data isn't a dictionary.`);
|
|
271
271
|
return {
|
|
272
272
|
groups: unmarshalArrayOfObject(data.groups, unmarshalGroup),
|
|
273
273
|
totalCount: data.total_count
|
|
274
274
|
};
|
|
275
275
|
};
|
|
276
|
-
|
|
276
|
+
const unmarshalListJWTsResponse = (data) => {
|
|
277
277
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJWTsResponse' failed as data isn't a dictionary.`);
|
|
278
278
|
return {
|
|
279
279
|
jwts: unmarshalArrayOfObject(data.jwts, unmarshalJWT),
|
|
280
280
|
totalCount: data.total_count
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
|
-
|
|
283
|
+
const unmarshalListLogsResponse = (data) => {
|
|
284
284
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
|
|
285
285
|
return {
|
|
286
286
|
logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
|
|
287
287
|
totalCount: data.total_count
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
|
-
|
|
290
|
+
const unmarshalPermissionSet = (data) => {
|
|
291
291
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
|
|
292
292
|
return {
|
|
293
293
|
categories: data.categories,
|
|
@@ -297,28 +297,28 @@ var unmarshalPermissionSet = (data) => {
|
|
|
297
297
|
scopeType: data.scope_type
|
|
298
298
|
};
|
|
299
299
|
};
|
|
300
|
-
|
|
300
|
+
const unmarshalListPermissionSetsResponse = (data) => {
|
|
301
301
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPermissionSetsResponse' failed as data isn't a dictionary.`);
|
|
302
302
|
return {
|
|
303
303
|
permissionSets: unmarshalArrayOfObject(data.permission_sets, unmarshalPermissionSet),
|
|
304
304
|
totalCount: data.total_count
|
|
305
305
|
};
|
|
306
306
|
};
|
|
307
|
-
|
|
307
|
+
const unmarshalListPoliciesResponse = (data) => {
|
|
308
308
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPoliciesResponse' failed as data isn't a dictionary.`);
|
|
309
309
|
return {
|
|
310
310
|
policies: unmarshalArrayOfObject(data.policies, unmarshalPolicy),
|
|
311
311
|
totalCount: data.total_count
|
|
312
312
|
};
|
|
313
313
|
};
|
|
314
|
-
|
|
314
|
+
const unmarshalListQuotaResponse = (data) => {
|
|
315
315
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListQuotaResponse' failed as data isn't a dictionary.`);
|
|
316
316
|
return {
|
|
317
317
|
quota: unmarshalArrayOfObject(data.quota, unmarshalQuotum),
|
|
318
318
|
totalCount: data.total_count
|
|
319
319
|
};
|
|
320
320
|
};
|
|
321
|
-
|
|
321
|
+
const unmarshalRule = (data) => {
|
|
322
322
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Rule' failed as data isn't a dictionary.`);
|
|
323
323
|
return {
|
|
324
324
|
accountRootUserId: data.account_root_user_id,
|
|
@@ -330,50 +330,50 @@ var unmarshalRule = (data) => {
|
|
|
330
330
|
projectIds: data.project_ids
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
|
-
|
|
333
|
+
const unmarshalListRulesResponse = (data) => {
|
|
334
334
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRulesResponse' failed as data isn't a dictionary.`);
|
|
335
335
|
return {
|
|
336
336
|
rules: unmarshalArrayOfObject(data.rules, unmarshalRule),
|
|
337
337
|
totalCount: data.total_count
|
|
338
338
|
};
|
|
339
339
|
};
|
|
340
|
-
|
|
340
|
+
const unmarshalListSSHKeysResponse = (data) => {
|
|
341
341
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSSHKeysResponse' failed as data isn't a dictionary.`);
|
|
342
342
|
return {
|
|
343
343
|
sshKeys: unmarshalArrayOfObject(data.ssh_keys, unmarshalSSHKey),
|
|
344
344
|
totalCount: data.total_count
|
|
345
345
|
};
|
|
346
346
|
};
|
|
347
|
-
|
|
347
|
+
const unmarshalListSamlCertificatesResponse = (data) => {
|
|
348
348
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSamlCertificatesResponse' failed as data isn't a dictionary.`);
|
|
349
349
|
return { certificates: unmarshalArrayOfObject(data.certificates, unmarshalSamlCertificate) };
|
|
350
350
|
};
|
|
351
|
-
|
|
351
|
+
const unmarshalListScimTokensResponse = (data) => {
|
|
352
352
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListScimTokensResponse' failed as data isn't a dictionary.`);
|
|
353
353
|
return {
|
|
354
354
|
scimTokens: unmarshalArrayOfObject(data.scim_tokens, unmarshalScimToken),
|
|
355
355
|
totalCount: data.total_count
|
|
356
356
|
};
|
|
357
357
|
};
|
|
358
|
-
|
|
358
|
+
const unmarshalListUserWebAuthnAuthenticatorsResponse = (data) => {
|
|
359
359
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUserWebAuthnAuthenticatorsResponse' failed as data isn't a dictionary.`);
|
|
360
360
|
return {
|
|
361
361
|
authenticators: unmarshalArrayOfObject(data.authenticators, unmarshalWebAuthnAuthenticator),
|
|
362
362
|
totalCount: data.total_count
|
|
363
363
|
};
|
|
364
364
|
};
|
|
365
|
-
|
|
365
|
+
const unmarshalListUsersResponse = (data) => {
|
|
366
366
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
367
367
|
return {
|
|
368
368
|
totalCount: data.total_count,
|
|
369
369
|
users: unmarshalArrayOfObject(data.users, unmarshalUser)
|
|
370
370
|
};
|
|
371
371
|
};
|
|
372
|
-
|
|
372
|
+
const unmarshalMFAOTP = (data) => {
|
|
373
373
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'MFAOTP' failed as data isn't a dictionary.`);
|
|
374
374
|
return { secret: data.secret };
|
|
375
375
|
};
|
|
376
|
-
|
|
376
|
+
const unmarshalOrganization = (data) => {
|
|
377
377
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Organization' failed as data isn't a dictionary.`);
|
|
378
378
|
return {
|
|
379
379
|
alias: data.alias,
|
|
@@ -385,7 +385,7 @@ var unmarshalOrganization = (data) => {
|
|
|
385
385
|
name: data.name
|
|
386
386
|
};
|
|
387
387
|
};
|
|
388
|
-
|
|
388
|
+
const unmarshalOrganizationSecuritySettings = (data) => {
|
|
389
389
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OrganizationSecuritySettings' failed as data isn't a dictionary.`);
|
|
390
390
|
return {
|
|
391
391
|
enforcePasswordRenewal: data.enforce_password_renewal,
|
|
@@ -395,7 +395,7 @@ var unmarshalOrganizationSecuritySettings = (data) => {
|
|
|
395
395
|
maxLoginSessionDuration: data.max_login_session_duration
|
|
396
396
|
};
|
|
397
397
|
};
|
|
398
|
-
|
|
398
|
+
const unmarshalParseSamlMetadataResponse = (data) => {
|
|
399
399
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ParseSamlMetadataResponse' failed as data isn't a dictionary.`);
|
|
400
400
|
return {
|
|
401
401
|
entityId: data.entity_id,
|
|
@@ -403,14 +403,14 @@ var unmarshalParseSamlMetadataResponse = (data) => {
|
|
|
403
403
|
singleSignOnUrl: data.single_sign_on_url
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
|
-
|
|
406
|
+
const unmarshalSamlServiceProvider = (data) => {
|
|
407
407
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SamlServiceProvider' failed as data isn't a dictionary.`);
|
|
408
408
|
return {
|
|
409
409
|
assertionConsumerServiceUrl: data.assertion_consumer_service_url,
|
|
410
410
|
entityId: data.entity_id
|
|
411
411
|
};
|
|
412
412
|
};
|
|
413
|
-
|
|
413
|
+
const unmarshalSaml = (data) => {
|
|
414
414
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Saml' failed as data isn't a dictionary.`);
|
|
415
415
|
return {
|
|
416
416
|
entityId: data.entity_id,
|
|
@@ -420,18 +420,18 @@ var unmarshalSaml = (data) => {
|
|
|
420
420
|
status: data.status
|
|
421
421
|
};
|
|
422
422
|
};
|
|
423
|
-
|
|
423
|
+
const unmarshalScim = (data) => {
|
|
424
424
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Scim' failed as data isn't a dictionary.`);
|
|
425
425
|
return {
|
|
426
426
|
createdAt: unmarshalDate(data.created_at),
|
|
427
427
|
id: data.id
|
|
428
428
|
};
|
|
429
429
|
};
|
|
430
|
-
|
|
430
|
+
const unmarshalSetRulesResponse = (data) => {
|
|
431
431
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetRulesResponse' failed as data isn't a dictionary.`);
|
|
432
432
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalRule) };
|
|
433
433
|
};
|
|
434
|
-
|
|
434
|
+
const unmarshalStartUserWebAuthnRegistrationResponse = (data) => {
|
|
435
435
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'StartUserWebAuthnRegistrationResponse' failed as data isn't a dictionary.`);
|
|
436
436
|
return {
|
|
437
437
|
ceremonyId: data.ceremony_id,
|
|
@@ -441,26 +441,26 @@ var unmarshalStartUserWebAuthnRegistrationResponse = (data) => {
|
|
|
441
441
|
timeout: data.timeout
|
|
442
442
|
};
|
|
443
443
|
};
|
|
444
|
-
|
|
444
|
+
const unmarshalValidateUserMFAOTPResponse = (data) => {
|
|
445
445
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ValidateUserMFAOTPResponse' failed as data isn't a dictionary.`);
|
|
446
446
|
return { recoveryCodes: data.recovery_codes };
|
|
447
447
|
};
|
|
448
|
-
|
|
448
|
+
const marshalAddGroupMemberRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
449
449
|
param: "user_id",
|
|
450
450
|
value: request.userId
|
|
451
451
|
}, {
|
|
452
452
|
param: "application_id",
|
|
453
453
|
value: request.applicationId
|
|
454
454
|
}]) });
|
|
455
|
-
|
|
455
|
+
const marshalAddGroupMembersRequest = (request, defaults) => ({
|
|
456
456
|
application_ids: request.applicationIds,
|
|
457
457
|
user_ids: request.userIds
|
|
458
458
|
});
|
|
459
|
-
|
|
459
|
+
const marshalAddSamlCertificateRequest = (request, defaults) => ({
|
|
460
460
|
content: request.content,
|
|
461
461
|
type: request.type
|
|
462
462
|
});
|
|
463
|
-
|
|
463
|
+
const marshalCreateAPIKeyRequest = (request, defaults) => ({
|
|
464
464
|
default_project_id: request.defaultProjectId,
|
|
465
465
|
description: request.description,
|
|
466
466
|
expires_at: request.expiresAt,
|
|
@@ -472,23 +472,23 @@ var marshalCreateAPIKeyRequest = (request, defaults) => ({
|
|
|
472
472
|
value: request.userId
|
|
473
473
|
}])
|
|
474
474
|
});
|
|
475
|
-
|
|
475
|
+
const marshalCreateApplicationRequest = (request, defaults) => ({
|
|
476
476
|
description: request.description,
|
|
477
477
|
name: request.name || randomName("app"),
|
|
478
478
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
479
479
|
tags: request.tags
|
|
480
480
|
});
|
|
481
|
-
|
|
481
|
+
const marshalCreateGroupRequest = (request, defaults) => ({
|
|
482
482
|
description: request.description,
|
|
483
483
|
name: request.name || randomName("grp"),
|
|
484
484
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
485
485
|
tags: request.tags
|
|
486
486
|
});
|
|
487
|
-
|
|
487
|
+
const marshalCreateJWTRequest = (request, defaults) => ({
|
|
488
488
|
referrer: request.referrer,
|
|
489
489
|
user_id: request.userId
|
|
490
490
|
});
|
|
491
|
-
|
|
491
|
+
const marshalRuleSpecs = (request, defaults) => ({
|
|
492
492
|
condition: request.condition,
|
|
493
493
|
permission_set_names: request.permissionSetNames,
|
|
494
494
|
...resolveOneOf([{
|
|
@@ -499,7 +499,7 @@ var marshalRuleSpecs = (request, defaults) => ({
|
|
|
499
499
|
value: request.organizationId
|
|
500
500
|
}])
|
|
501
501
|
});
|
|
502
|
-
|
|
502
|
+
const marshalCreatePolicyRequest = (request, defaults) => ({
|
|
503
503
|
description: request.description,
|
|
504
504
|
name: request.name || randomName("pol"),
|
|
505
505
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
@@ -524,12 +524,12 @@ var marshalCreatePolicyRequest = (request, defaults) => ({
|
|
|
524
524
|
}
|
|
525
525
|
])
|
|
526
526
|
});
|
|
527
|
-
|
|
527
|
+
const marshalCreateSSHKeyRequest = (request, defaults) => ({
|
|
528
528
|
name: request.name || randomName("key"),
|
|
529
529
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
530
530
|
public_key: request.publicKey
|
|
531
531
|
});
|
|
532
|
-
|
|
532
|
+
const marshalCreateUserRequestMember = (request, defaults) => ({
|
|
533
533
|
email: request.email,
|
|
534
534
|
first_name: request.firstName,
|
|
535
535
|
last_name: request.lastName,
|
|
@@ -540,7 +540,7 @@ var marshalCreateUserRequestMember = (request, defaults) => ({
|
|
|
540
540
|
send_welcome_email: request.sendWelcomeEmail,
|
|
541
541
|
username: request.username
|
|
542
542
|
});
|
|
543
|
-
|
|
543
|
+
const marshalCreateUserRequest = (request, defaults) => ({
|
|
544
544
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
545
545
|
tags: request.tags,
|
|
546
546
|
...resolveOneOf([{
|
|
@@ -551,7 +551,7 @@ var marshalCreateUserRequest = (request, defaults) => ({
|
|
|
551
551
|
value: request.member !== void 0 ? marshalCreateUserRequestMember(request.member, defaults) : void 0
|
|
552
552
|
}])
|
|
553
553
|
});
|
|
554
|
-
|
|
554
|
+
const marshalFinishUserWebAuthnRegistrationRequest = (request, defaults) => ({
|
|
555
555
|
attestation_object: request.attestationObject,
|
|
556
556
|
authenticator_data: request.authenticatorData,
|
|
557
557
|
authenticator_name: request.authenticatorName,
|
|
@@ -562,54 +562,54 @@ var marshalFinishUserWebAuthnRegistrationRequest = (request, defaults) => ({
|
|
|
562
562
|
public_key_algorithm: request.publicKeyAlgorithm,
|
|
563
563
|
raw_id: request.rawId
|
|
564
564
|
});
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
const marshalJoinUserConnectionRequest = (request, defaults) => ({ token: request.token });
|
|
566
|
+
const marshalParseSamlMetadataRequest = async (request, defaults) => ({ file: await marshalBlobToScwFile(request.file) });
|
|
567
|
+
const marshalRemoveGroupMemberRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
568
568
|
param: "user_id",
|
|
569
569
|
value: request.userId
|
|
570
570
|
}, {
|
|
571
571
|
param: "application_id",
|
|
572
572
|
value: request.applicationId
|
|
573
573
|
}]) });
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
const marshalRemoveUserConnectionRequest = (request, defaults) => ({ target_user_id: request.targetUserId });
|
|
575
|
+
const marshalSetGroupMembersRequest = (request, defaults) => ({
|
|
576
576
|
application_ids: request.applicationIds,
|
|
577
577
|
user_ids: request.userIds
|
|
578
578
|
});
|
|
579
|
-
|
|
580
|
-
|
|
579
|
+
const marshalSetOrganizationAliasRequest = (request, defaults) => ({ alias: request.alias });
|
|
580
|
+
const marshalSetRulesRequest = (request, defaults) => ({
|
|
581
581
|
policy_id: request.policyId,
|
|
582
582
|
rules: request.rules.map((elt) => marshalRuleSpecs(elt, defaults))
|
|
583
583
|
});
|
|
584
|
-
|
|
584
|
+
const marshalUpdateAPIKeyRequest = (request, defaults) => ({
|
|
585
585
|
default_project_id: request.defaultProjectId,
|
|
586
586
|
description: request.description,
|
|
587
587
|
expires_at: request.expiresAt
|
|
588
588
|
});
|
|
589
|
-
|
|
589
|
+
const marshalUpdateApplicationRequest = (request, defaults) => ({
|
|
590
590
|
description: request.description,
|
|
591
591
|
name: request.name,
|
|
592
592
|
tags: request.tags
|
|
593
593
|
});
|
|
594
|
-
|
|
594
|
+
const marshalUpdateGroupRequest = (request, defaults) => ({
|
|
595
595
|
description: request.description,
|
|
596
596
|
name: request.name,
|
|
597
597
|
tags: request.tags
|
|
598
598
|
});
|
|
599
|
-
|
|
599
|
+
const marshalUpdateOrganizationLoginMethodsRequest = (request, defaults) => ({
|
|
600
600
|
login_magic_code_enabled: request.loginMagicCodeEnabled,
|
|
601
601
|
login_oauth2_enabled: request.loginOauth2Enabled,
|
|
602
602
|
login_password_enabled: request.loginPasswordEnabled,
|
|
603
603
|
login_saml_enabled: request.loginSamlEnabled
|
|
604
604
|
});
|
|
605
|
-
|
|
605
|
+
const marshalUpdateOrganizationSecuritySettingsRequest = (request, defaults) => ({
|
|
606
606
|
enforce_password_renewal: request.enforcePasswordRenewal,
|
|
607
607
|
grace_period_duration: request.gracePeriodDuration,
|
|
608
608
|
login_attempts_before_locked: request.loginAttemptsBeforeLocked,
|
|
609
609
|
max_api_key_expiration_duration: request.maxApiKeyExpirationDuration,
|
|
610
610
|
max_login_session_duration: request.maxLoginSessionDuration
|
|
611
611
|
});
|
|
612
|
-
|
|
612
|
+
const marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
613
613
|
description: request.description,
|
|
614
614
|
name: request.name,
|
|
615
615
|
tags: request.tags,
|
|
@@ -632,16 +632,16 @@ var marshalUpdatePolicyRequest = (request, defaults) => ({
|
|
|
632
632
|
}
|
|
633
633
|
])
|
|
634
634
|
});
|
|
635
|
-
|
|
635
|
+
const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
636
636
|
disabled: request.disabled,
|
|
637
637
|
name: request.name
|
|
638
638
|
});
|
|
639
|
-
|
|
639
|
+
const marshalUpdateSamlRequest = (request, defaults) => ({
|
|
640
640
|
entity_id: request.entityId,
|
|
641
641
|
single_sign_on_url: request.singleSignOnUrl
|
|
642
642
|
});
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
const marshalUpdateUserPasswordRequest = (request, defaults) => ({ password: request.password });
|
|
644
|
+
const marshalUpdateUserRequest = (request, defaults) => ({
|
|
645
645
|
email: request.email,
|
|
646
646
|
first_name: request.firstName,
|
|
647
647
|
last_name: request.lastName,
|
|
@@ -649,8 +649,8 @@ var marshalUpdateUserRequest = (request, defaults) => ({
|
|
|
649
649
|
phone_number: request.phoneNumber,
|
|
650
650
|
tags: request.tags
|
|
651
651
|
});
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
652
|
+
const marshalUpdateUserUsernameRequest = (request, defaults) => ({ username: request.username });
|
|
653
|
+
const marshalUpdateWebAuthnAuthenticatorRequest = (request, defaults) => ({ authenticator_name: request.authenticatorName });
|
|
654
|
+
const marshalValidateUserMFAOTPRequest = (request, defaults) => ({ one_time_password: request.oneTimePassword });
|
|
655
655
|
//#endregion
|
|
656
656
|
export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalAddSamlCertificateRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreateJWTRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalFinishUserWebAuthnRegistrationRequest, marshalJoinUserConnectionRequest, marshalParseSamlMetadataRequest, marshalRemoveGroupMemberRequest, marshalRemoveUserConnectionRequest, marshalSetGroupMembersRequest, marshalSetOrganizationAliasRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdateOrganizationLoginMethodsRequest, marshalUpdateOrganizationSecuritySettingsRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, marshalUpdateSamlRequest, marshalUpdateUserPasswordRequest, marshalUpdateUserRequest, marshalUpdateUserUsernameRequest, marshalUpdateWebAuthnAuthenticatorRequest, marshalValidateUserMFAOTPRequest, unmarshalAPIKey, unmarshalApplication, unmarshalCreateScimTokenResponse, unmarshalEncodedJWT, unmarshalFinishUserWebAuthnRegistrationResponse, unmarshalGetUserConnectionsResponse, unmarshalGroup, unmarshalInitiateUserConnectionResponse, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGracePeriodsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListSamlCertificatesResponse, unmarshalListScimTokensResponse, unmarshalListUserWebAuthnAuthenticatorsResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalMFAOTP, unmarshalOrganization, unmarshalOrganizationSecuritySettings, unmarshalParseSamlMetadataResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSaml, unmarshalSamlCertificate, unmarshalScim, unmarshalSetRulesResponse, unmarshalStartUserWebAuthnRegistrationResponse, unmarshalUser, unmarshalValidateUserMFAOTPResponse, unmarshalWebAuthnAuthenticator };
|