@scaleway/sdk-iam 2.7.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.
@@ -1,921 +1,463 @@
1
1
  import { 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 } from "./marshalling.gen.js";
2
2
  import { API as API$1, enrichForPagination, resolveOneOf, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
3
  //#region src/v1alpha1/api.gen.ts
4
- var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
+ const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
5
  /**
6
6
  * IAM API.
7
7
 
8
8
  This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources.
9
9
  */
10
10
  var API = class extends API$1 {
11
- pageOfListSSHKeys = (request = {}) => this.client.fetch({
12
- method: "GET",
13
- path: `/iam/v1alpha1/ssh-keys`,
14
- urlParams: urlParams(["disabled", request.disabled], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
15
- }, unmarshalListSSHKeysResponse);
16
- /**
17
- * List SSH keys. List SSH keys. By default, the SSH keys listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You can define additional parameters for your query such as `organization_id`, `name`, `project_id` and `disabled`.
18
- *
19
- * @param request - The request {@link ListSSHKeysRequest}
20
- * @returns A Promise of ListSSHKeysResponse
21
- */
22
- listSSHKeys = (request = {}) => enrichForPagination("sshKeys", this.pageOfListSSHKeys, request);
23
- /**
24
- * Create an SSH key. Add a new SSH key to a Scaleway Project. You must specify the `name`, `public_key` and `project_id`.
25
- *
26
- * @param request - The request {@link CreateSSHKeyRequest}
27
- * @returns A Promise of SSHKey
28
- */
29
- createSSHKey = (request) => this.client.fetch({
30
- body: JSON.stringify(marshalCreateSSHKeyRequest(request, this.client.settings)),
31
- headers: jsonContentHeaders,
32
- method: "POST",
33
- path: `/iam/v1alpha1/ssh-keys`
34
- }, unmarshalSSHKey);
35
- /**
36
- * Get an SSH key. Retrieve information about a given SSH key, specified by the `ssh_key_id` parameter. The SSH key's full details, including `id`, `name`, `public_key`, and `project_id` are returned in the response.
37
- *
38
- * @param request - The request {@link GetSSHKeyRequest}
39
- * @returns A Promise of SSHKey
40
- */
41
- getSSHKey = (request) => this.client.fetch({
42
- method: "GET",
43
- path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
44
- }, unmarshalSSHKey);
45
- /**
46
- * Update an SSH key. Update the parameters of an SSH key, including `name` and `disable`.
47
- *
48
- * @param request - The request {@link UpdateSSHKeyRequest}
49
- * @returns A Promise of SSHKey
50
- */
51
- updateSSHKey = (request) => this.client.fetch({
52
- body: JSON.stringify(marshalUpdateSSHKeyRequest(request, this.client.settings)),
53
- headers: jsonContentHeaders,
54
- method: "PATCH",
55
- path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
56
- }, unmarshalSSHKey);
57
- /**
58
- * Delete an SSH key. Delete a given SSH key, specified by the `ssh_key_id`. Deleting an SSH is permanent, and cannot be undone. Note that you might need to update any configurations that used the SSH key.
59
- *
60
- * @param request - The request {@link DeleteSSHKeyRequest}
61
- */
62
- deleteSSHKey = (request) => this.client.fetch({
63
- method: "DELETE",
64
- path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
65
- });
66
- pageOfListUsers = (request = {}) => this.client.fetch({
67
- method: "GET",
68
- path: `/iam/v1alpha1/users`,
69
- urlParams: urlParams(["mfa", request.mfa], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tag", request.tag], ["type", request.type], ["user_ids", request.userIds])
70
- }, unmarshalListUsersResponse);
71
- /**
72
- * List users of an Organization. List the users of an Organization. By default, the users listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters for your query such as `user_ids`.
73
- *
74
- * @param request - The request {@link ListUsersRequest}
75
- * @returns A Promise of ListUsersResponse
76
- */
77
- listUsers = (request = {}) => enrichForPagination("users", this.pageOfListUsers, request);
78
- /**
79
- * Get a given user. Retrieve information about a user, specified by the `user_id` parameter. The user's full details, including `id`, `email`, `organization_id`, `status` and `mfa` are returned in the response.
80
- *
81
- * @param request - The request {@link GetUserRequest}
82
- * @returns A Promise of User
83
- */
84
- getUser = (request) => this.client.fetch({
85
- method: "GET",
86
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
87
- }, unmarshalUser);
88
- /**
89
- * Update a user. Update the parameters of a user, including `tags`.
90
- *
91
- * @param request - The request {@link UpdateUserRequest}
92
- * @returns A Promise of User
93
- */
94
- updateUser = (request) => this.client.fetch({
95
- body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
96
- headers: jsonContentHeaders,
97
- method: "PATCH",
98
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
99
- }, unmarshalUser);
100
- /**
101
- * Delete a guest user from an Organization. Remove a user from an Organization in which they are a guest. You must define the `user_id` in your request. Note that removing a user from an Organization automatically deletes their API keys, and any policies directly attached to them become orphaned.
102
- *
103
- * @param request - The request {@link DeleteUserRequest}
104
- */
105
- deleteUser = (request) => this.client.fetch({
106
- method: "DELETE",
107
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
108
- });
109
- /**
110
- * Create a new user. Create a new user. You must define the `organization_id` in your request. If you are adding a member, enter the member's details. If you are adding a guest, you must define the `email` and not add the member attribute.
111
- *
112
- * @param request - The request {@link CreateUserRequest}
113
- * @returns A Promise of User
114
- */
115
- createUser = (request = {}) => this.client.fetch({
116
- body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
117
- headers: jsonContentHeaders,
118
- method: "POST",
119
- path: `/iam/v1alpha1/users`
120
- }, unmarshalUser);
121
- /**
122
- * Update an user's username.. Update an user's username.
123
- *
124
- * @param request - The request {@link UpdateUserUsernameRequest}
125
- * @returns A Promise of User
126
- */
127
- updateUserUsername = (request) => this.client.fetch({
128
- body: JSON.stringify(marshalUpdateUserUsernameRequest(request, this.client.settings)),
129
- headers: jsonContentHeaders,
130
- method: "POST",
131
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/update-username`
132
- }, unmarshalUser);
133
- /**
134
- * Update an user's password.. Update an user's password.
135
- *
136
- * @param request - The request {@link UpdateUserPasswordRequest}
137
- * @returns A Promise of User
138
- */
139
- updateUserPassword = (request) => this.client.fetch({
140
- body: JSON.stringify(marshalUpdateUserPasswordRequest(request, this.client.settings)),
141
- headers: jsonContentHeaders,
142
- method: "POST",
143
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/update-password`
144
- }, unmarshalUser);
145
- /**
146
- * Create a MFA OTP.. Create a MFA OTP.
147
- *
148
- * @param request - The request {@link CreateUserMFAOTPRequest}
149
- * @returns A Promise of MFAOTP
150
- */
151
- createUserMFAOTP = (request) => this.client.fetch({
152
- body: "{}",
153
- headers: jsonContentHeaders,
154
- method: "POST",
155
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/mfa-otp`
156
- }, unmarshalMFAOTP);
157
- /**
158
- * Validate a MFA OTP.. Validate a MFA OTP.
159
- *
160
- * @param request - The request {@link ValidateUserMFAOTPRequest}
161
- * @returns A Promise of ValidateUserMFAOTPResponse
162
- */
163
- validateUserMFAOTP = (request) => this.client.fetch({
164
- body: JSON.stringify(marshalValidateUserMFAOTPRequest(request, this.client.settings)),
165
- headers: jsonContentHeaders,
166
- method: "POST",
167
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/validate-mfa-otp`
168
- }, unmarshalValidateUserMFAOTPResponse);
169
- /**
170
- * Delete a MFA OTP.. Delete a MFA OTP.
171
- *
172
- * @param request - The request {@link DeleteUserMFAOTPRequest}
173
- */
174
- deleteUserMFAOTP = (request) => this.client.fetch({
175
- body: "{}",
176
- headers: jsonContentHeaders,
177
- method: "DELETE",
178
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/mfa-otp`
179
- });
180
- /**
181
- * Lock a member. Lock a member. A locked member cannot log in or use API keys until the locked status is removed.
182
- *
183
- * @param request - The request {@link LockUserRequest}
184
- * @returns A Promise of User
185
- */
186
- lockUser = (request) => this.client.fetch({
187
- body: "{}",
188
- headers: jsonContentHeaders,
189
- method: "POST",
190
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/lock`
191
- }, unmarshalUser);
192
- /**
193
- * Unlock a member.
194
- *
195
- * @param request - The request {@link UnlockUserRequest}
196
- * @returns A Promise of User
197
- */
198
- unlockUser = (request) => this.client.fetch({
199
- body: "{}",
200
- headers: jsonContentHeaders,
201
- method: "POST",
202
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/unlock`
203
- }, unmarshalUser);
204
- /**
205
- * List grace periods of a member. List the grace periods of a member.
206
- *
207
- * @param request - The request {@link ListGracePeriodsRequest}
208
- * @returns A Promise of ListGracePeriodsResponse
209
- */
210
- listGracePeriods = (request = {}) => this.client.fetch({
211
- method: "GET",
212
- path: `/iam/v1alpha1/grace-periods`,
213
- urlParams: urlParams(["user_id", request.userId])
214
- }, unmarshalListGracePeriodsResponse);
215
- getUserConnections = (request) => this.client.fetch({
216
- method: "GET",
217
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/connections`
218
- }, unmarshalGetUserConnectionsResponse);
219
- initiateUserConnection = (request) => this.client.fetch({
220
- body: "{}",
221
- headers: jsonContentHeaders,
222
- method: "POST",
223
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/initiate-connection`
224
- }, unmarshalInitiateUserConnectionResponse);
225
- joinUserConnection = (request) => this.client.fetch({
226
- body: JSON.stringify(marshalJoinUserConnectionRequest(request, this.client.settings)),
227
- headers: jsonContentHeaders,
228
- method: "POST",
229
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/join-connection`
230
- });
231
- removeUserConnection = (request) => this.client.fetch({
232
- body: JSON.stringify(marshalRemoveUserConnectionRequest(request, this.client.settings)),
233
- headers: jsonContentHeaders,
234
- method: "POST",
235
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/remove-connection`
236
- });
237
- pageOfListApplications = (request = {}) => this.client.fetch({
238
- method: "GET",
239
- path: `/iam/v1alpha1/applications`,
240
- urlParams: urlParams(["application_ids", request.applicationIds], ["editable", request.editable], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tag", request.tag])
241
- }, unmarshalListApplicationsResponse);
242
- /**
243
- * List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters for your query such as `application_ids`.
244
- *
245
- * @param request - The request {@link ListApplicationsRequest}
246
- * @returns A Promise of ListApplicationsResponse
247
- */
248
- listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
249
- /**
250
- * Create a new application. Create a new application. You must define the `name` parameter in the request.
251
- *
252
- * @param request - The request {@link CreateApplicationRequest}
253
- * @returns A Promise of Application
254
- */
255
- createApplication = (request) => this.client.fetch({
256
- body: JSON.stringify(marshalCreateApplicationRequest(request, this.client.settings)),
257
- headers: jsonContentHeaders,
258
- method: "POST",
259
- path: `/iam/v1alpha1/applications`
260
- }, unmarshalApplication);
261
- /**
262
- * Get a given application. Retrieve information about an application, specified by the `application_id` parameter. The application's full details, including `id`, `email`, `organization_id`, `status` and `two_factor_enabled` are returned in the response.
263
- *
264
- * @param request - The request {@link GetApplicationRequest}
265
- * @returns A Promise of Application
266
- */
267
- getApplication = (request) => this.client.fetch({
268
- method: "GET",
269
- path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
270
- }, unmarshalApplication);
271
- /**
272
- * Update an application. Update the parameters of an application, including `name` and `description`.
273
- *
274
- * @param request - The request {@link UpdateApplicationRequest}
275
- * @returns A Promise of Application
276
- */
277
- updateApplication = (request) => this.client.fetch({
278
- body: JSON.stringify(marshalUpdateApplicationRequest(request, this.client.settings)),
279
- headers: jsonContentHeaders,
280
- method: "PATCH",
281
- path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
282
- }, unmarshalApplication);
283
- /**
284
- * Delete an application. Delete an application. Note that this action is irreversible and will automatically delete the application's API keys. Policies attached to users and applications via this group will no longer apply.
285
- *
286
- * @param request - The request {@link DeleteApplicationRequest}
287
- */
288
- deleteApplication = (request) => this.client.fetch({
289
- method: "DELETE",
290
- path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
291
- });
292
- pageOfListGroups = (request = {}) => this.client.fetch({
293
- method: "GET",
294
- path: `/iam/v1alpha1/groups`,
295
- urlParams: urlParams(["application_ids", request.applicationIds], ["group_ids", request.groupIds], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tag", request.tag], ["user_ids", request.userIds])
296
- }, unmarshalListGroupsResponse);
297
- /**
298
- * List groups. List groups. By default, the groups listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You can define additional parameters to filter your query. Use `user_ids` or `application_ids` to list all groups certain users or applications belong to.
299
- *
300
- * @param request - The request {@link ListGroupsRequest}
301
- * @returns A Promise of ListGroupsResponse
302
- */
303
- listGroups = (request = {}) => enrichForPagination("groups", this.pageOfListGroups, request);
304
- /**
305
- * Create a group. Create a new group. You must define the `name` and `organization_id` parameters in the request.
306
- *
307
- * @param request - The request {@link CreateGroupRequest}
308
- * @returns A Promise of Group
309
- */
310
- createGroup = (request) => this.client.fetch({
311
- body: JSON.stringify(marshalCreateGroupRequest(request, this.client.settings)),
312
- headers: jsonContentHeaders,
313
- method: "POST",
314
- path: `/iam/v1alpha1/groups`
315
- }, unmarshalGroup);
316
- /**
317
- * Get a group. Retrieve information about a given group, specified by the `group_id` parameter. The group's full details, including `user_ids` and `application_ids` are returned in the response.
318
- *
319
- * @param request - The request {@link GetGroupRequest}
320
- * @returns A Promise of Group
321
- */
322
- getGroup = (request) => this.client.fetch({
323
- method: "GET",
324
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
325
- }, unmarshalGroup);
326
- /**
327
- * Update a group. Update the parameters of group, including `name` and `description`.
328
- *
329
- * @param request - The request {@link UpdateGroupRequest}
330
- * @returns A Promise of Group
331
- */
332
- updateGroup = (request) => this.client.fetch({
333
- body: JSON.stringify(marshalUpdateGroupRequest(request, this.client.settings)),
334
- headers: jsonContentHeaders,
335
- method: "PATCH",
336
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
337
- }, unmarshalGroup);
338
- /**
339
- * Overwrite users and applications of a group. Overwrite users and applications configuration in a group. Any information that you add using this command will overwrite the previous configuration.
340
- *
341
- * @param request - The request {@link SetGroupMembersRequest}
342
- * @returns A Promise of Group
343
- */
344
- setGroupMembers = (request) => this.client.fetch({
345
- body: JSON.stringify(marshalSetGroupMembersRequest(request, this.client.settings)),
346
- headers: jsonContentHeaders,
347
- method: "PUT",
348
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/members`
349
- }, unmarshalGroup);
350
- /**
351
- * Add a user or an application to a group. Add a user or an application to a group. You can specify a `user_id` and `application_id` in the body of your request. Note that you can only add one of each per request.
352
- *
353
- * @param request - The request {@link AddGroupMemberRequest}
354
- * @returns A Promise of Group
355
- */
356
- addGroupMember = (request) => this.client.fetch({
357
- body: JSON.stringify(marshalAddGroupMemberRequest(request, this.client.settings)),
358
- headers: jsonContentHeaders,
359
- method: "POST",
360
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/add-member`
361
- }, unmarshalGroup);
362
- /**
363
- * Add multiple users and applications to a group. Add multiple users and applications to a group in a single call. You can specify an array of `user_id`s and `application_id`s. Note that any existing users and applications in the group will remain. To add new users/applications and delete pre-existing ones, use the [Overwrite users and applications of a group](#path-groups-overwrite-users-and-applications-of-a-group) method.
364
- *
365
- * @param request - The request {@link AddGroupMembersRequest}
366
- * @returns A Promise of Group
367
- */
368
- addGroupMembers = (request) => this.client.fetch({
369
- body: JSON.stringify(marshalAddGroupMembersRequest(request, this.client.settings)),
370
- headers: jsonContentHeaders,
371
- method: "POST",
372
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/add-members`
373
- }, unmarshalGroup);
374
- /**
375
- * Remove a user or an application from a group. Remove a user or an application from a group. You can specify a `user_id` and `application_id` in the body of your request. Note that you can only remove one of each per request. Removing a user from a group means that any permissions given to them via the group (i.e. from an attached policy) will no longer apply. Be sure you want to remove these permissions from the user before proceeding.
376
- *
377
- * @param request - The request {@link RemoveGroupMemberRequest}
378
- * @returns A Promise of Group
379
- */
380
- removeGroupMember = (request) => this.client.fetch({
381
- body: JSON.stringify(marshalRemoveGroupMemberRequest(request, this.client.settings)),
382
- headers: jsonContentHeaders,
383
- method: "POST",
384
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/remove-member`
385
- }, unmarshalGroup);
386
- /**
387
- * Delete a group. Delete a group. Note that this action is irreversible and could delete permissions for group members. Policies attached to users and applications via this group will no longer apply.
388
- *
389
- * @param request - The request {@link DeleteGroupRequest}
390
- */
391
- deleteGroup = (request) => this.client.fetch({
392
- method: "DELETE",
393
- path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
394
- });
395
- pageOfListPolicies = (request = {}) => this.client.fetch({
396
- method: "GET",
397
- path: `/iam/v1alpha1/policies`,
398
- urlParams: urlParams(["application_ids", request.applicationIds], ["editable", request.editable], ["group_ids", request.groupIds], ["no_principal", request.noPrincipal], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["policy_ids", request.policyIds], ["policy_name", request.policyName], ["tag", request.tag], ["user_ids", request.userIds])
399
- }, unmarshalListPoliciesResponse);
400
- /**
401
- * List policies of an Organization. List the policies of an Organization. By default, the policies listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters to filter your query, such as `user_ids`, `groups_ids`, `application_ids`, and `policy_name`.
402
- *
403
- * @param request - The request {@link ListPoliciesRequest}
404
- * @returns A Promise of ListPoliciesResponse
405
- */
406
- listPolicies = (request = {}) => enrichForPagination("policies", this.pageOfListPolicies, request);
407
- /**
408
- * Create a new policy. Create a new application. You must define the `name` parameter in the request. You can specify parameters such as `user_id`, `groups_id`, `application_id`, `no_principal`, `rules` and its child attributes.
409
- *
410
- * @param request - The request {@link CreatePolicyRequest}
411
- * @returns A Promise of Policy
412
- */
413
- createPolicy = (request) => this.client.fetch({
414
- body: JSON.stringify(marshalCreatePolicyRequest(request, this.client.settings)),
415
- headers: jsonContentHeaders,
416
- method: "POST",
417
- path: `/iam/v1alpha1/policies`
418
- }, unmarshalPolicy);
419
- /**
420
- * Get an existing policy. Retrieve information about a policy, specified by the `policy_id` parameter. The policy's full details, including `id`, `name`, `organization_id`, `nb_rules` and `nb_scopes`, `nb_permission_sets` are returned in the response.
421
- *
422
- * @param request - The request {@link GetPolicyRequest}
423
- * @returns A Promise of Policy
424
- */
425
- getPolicy = (request) => this.client.fetch({
426
- method: "GET",
427
- path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
428
- }, unmarshalPolicy);
429
- /**
430
- * Update an existing policy. Update the parameters of a policy, including `name`, `description`, `user_id`, `group_id`, `application_id` and `no_principal`.
431
- *
432
- * @param request - The request {@link UpdatePolicyRequest}
433
- * @returns A Promise of Policy
434
- */
435
- updatePolicy = (request) => this.client.fetch({
436
- body: JSON.stringify(marshalUpdatePolicyRequest(request, this.client.settings)),
437
- headers: jsonContentHeaders,
438
- method: "PATCH",
439
- path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
440
- }, unmarshalPolicy);
441
- /**
442
- * Delete a policy. Delete a policy. You must define specify the `policy_id` parameter in your request. Note that when deleting a policy, all permissions it gives to its principal (user, group or application) will be revoked.
443
- *
444
- * @param request - The request {@link DeletePolicyRequest}
445
- */
446
- deletePolicy = (request) => this.client.fetch({
447
- method: "DELETE",
448
- path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
449
- });
450
- /**
451
- * Clone a policy. Clone a policy. You must define specify the `policy_id` parameter in your request.
452
- *
453
- * @param request - The request {@link ClonePolicyRequest}
454
- * @returns A Promise of Policy
455
- */
456
- clonePolicy = (request) => this.client.fetch({
457
- body: "{}",
458
- headers: jsonContentHeaders,
459
- method: "POST",
460
- path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}/clone`
461
- }, unmarshalPolicy);
462
- /**
463
- * Set rules of a given policy. Overwrite the rules of a given policy. Any information that you add using this command will overwrite the previous configuration. If you include some of the rules you already had in your previous configuration in your new one, but you change their order, the new order of display will apply. While policy rules are ordered, they have no impact on the access logic of IAM because rules are allow-only.
464
- *
465
- * @param request - The request {@link SetRulesRequest}
466
- * @returns A Promise of SetRulesResponse
467
- */
468
- setRules = (request) => this.client.fetch({
469
- body: JSON.stringify(marshalSetRulesRequest(request, this.client.settings)),
470
- headers: jsonContentHeaders,
471
- method: "PUT",
472
- path: `/iam/v1alpha1/rules`
473
- }, unmarshalSetRulesResponse);
474
- pageOfListRules = (request) => this.client.fetch({
475
- method: "GET",
476
- path: `/iam/v1alpha1/rules`,
477
- urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["policy_id", request.policyId])
478
- }, unmarshalListRulesResponse);
479
- /**
480
- * List rules of a given policy. List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `policy_id` in the query path of your request.
481
- *
482
- * @param request - The request {@link ListRulesRequest}
483
- * @returns A Promise of ListRulesResponse
484
- */
485
- listRules = (request) => enrichForPagination("rules", this.pageOfListRules, request);
486
- pageOfListPermissionSets = (request = {}) => this.client.fetch({
487
- method: "GET",
488
- path: `/iam/v1alpha1/permission-sets`,
489
- urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
490
- }, unmarshalListPermissionSetsResponse);
491
- /**
492
- * List permission sets. List permission sets available for given Organization. You must define the `organization_id` in the query path of your request.
493
- *
494
- * @param request - The request {@link ListPermissionSetsRequest}
495
- * @returns A Promise of ListPermissionSetsResponse
496
- */
497
- listPermissionSets = (request = {}) => enrichForPagination("permissionSets", this.pageOfListPermissionSets, request);
498
- pageOfListAPIKeys = (request = {}) => this.client.fetch({
499
- method: "GET",
500
- path: `/iam/v1alpha1/api-keys`,
501
- urlParams: urlParams(["access_key", request.accessKey], ["access_keys", request.accessKeys], ["bearer_id", request.bearerId], ["bearer_type", request.bearerType], ["description", request.description], ["editable", request.editable], ["expired", request.expired], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
502
- param: "application_id",
503
- value: request.applicationId
504
- }, {
505
- param: "user_id",
506
- value: request.userId
507
- }])))
508
- }, unmarshalListAPIKeysResponse);
509
- /**
510
- * List API keys. List API keys. By default, the API keys listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You can define additional parameters for your query such as `editable`, `expired`, `access_key` and `bearer_id`.
511
- *
512
- * @param request - The request {@link ListAPIKeysRequest}
513
- * @returns A Promise of ListAPIKeysResponse
514
- */
515
- listAPIKeys = (request = {}) => enrichForPagination("apiKeys", this.pageOfListAPIKeys, request);
516
- /**
517
- * Create an API key. Create an API key. You must specify the `application_id` or the `user_id` and the description. You can also specify the `default_project_id`, which is the Project ID of your preferred Project, to use with Object Storage. The `access_key` and `secret_key` values are returned in the response. Note that the secret key is only shown once. Make sure that you copy and store both keys somewhere safe.
518
- *
519
- * @param request - The request {@link CreateAPIKeyRequest}
520
- * @returns A Promise of APIKey
521
- */
522
- createAPIKey = (request) => this.client.fetch({
523
- body: JSON.stringify(marshalCreateAPIKeyRequest(request, this.client.settings)),
524
- headers: jsonContentHeaders,
525
- method: "POST",
526
- path: `/iam/v1alpha1/api-keys`
527
- }, unmarshalAPIKey);
528
- /**
529
- * Get an API key. Retrieve information about an API key, specified by the `access_key` parameter. The API key's details, including either the `user_id` or `application_id` of its bearer are returned in the response. Note that the string value for the `secret_key` is nullable, and therefore is not displayed in the response. The `secret_key` value is only displayed upon API key creation.
530
- *
531
- * @param request - The request {@link GetAPIKeyRequest}
532
- * @returns A Promise of APIKey
533
- */
534
- getAPIKey = (request) => this.client.fetch({
535
- method: "GET",
536
- path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
537
- }, unmarshalAPIKey);
538
- /**
539
- * Update an API key. Update the parameters of an API key, including `default_project_id` and `description`.
540
- *
541
- * @param request - The request {@link UpdateAPIKeyRequest}
542
- * @returns A Promise of APIKey
543
- */
544
- updateAPIKey = (request) => this.client.fetch({
545
- body: JSON.stringify(marshalUpdateAPIKeyRequest(request, this.client.settings)),
546
- headers: jsonContentHeaders,
547
- method: "PATCH",
548
- path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
549
- }, unmarshalAPIKey);
550
- /**
551
- * Delete an API key. Delete an API key. Note that this action is irreversible and cannot be undone. Make sure you update any configurations using the API keys you delete.
552
- *
553
- * @param request - The request {@link DeleteAPIKeyRequest}
554
- */
555
- deleteAPIKey = (request) => this.client.fetch({
556
- method: "DELETE",
557
- path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
558
- });
559
- pageOfListQuota = (request = {}) => this.client.fetch({
560
- method: "GET",
561
- path: `/iam/v1alpha1/quota`,
562
- urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["quotum_names", request.quotumNames])
563
- }, unmarshalListQuotaResponse);
564
- /**
565
- * List all quotas in the Organization. List all product and features quota for an Organization, with their associated limits. By default, the quota listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request.
566
- *
567
- * @param request - The request {@link ListQuotaRequest}
568
- * @returns A Promise of ListQuotaResponse
569
- */
570
- listQuota = (request = {}) => enrichForPagination("quota", this.pageOfListQuota, request);
571
- /**
572
- * Get a quota in the Organization. Retrieve information about a resource quota, specified by the `quotum_name` parameter. The quota's `limit`, or whether it is unlimited, is returned in the response.
573
- *
574
- * @param request - The request {@link GetQuotumRequest}
575
- * @returns A Promise of Quotum
576
- */
577
- getQuotum = (request) => this.client.fetch({
578
- method: "GET",
579
- path: `/iam/v1alpha1/quota/${validatePathParam("quotumName", request.quotumName)}`,
580
- urlParams: urlParams(["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId])
581
- }, unmarshalQuotum);
582
- pageOfListJWTs = (request) => this.client.fetch({
583
- method: "GET",
584
- path: `/iam/v1alpha1/jwts`,
585
- urlParams: urlParams(["audience_id", request.audienceId], ["expired", request.expired], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
586
- }, unmarshalListJWTsResponse);
587
- /**
588
- * List JWTs.
589
- *
590
- * @param request - The request {@link ListJWTsRequest}
591
- * @returns A Promise of ListJWTsResponse
592
- */
593
- listJWTs = (request) => enrichForPagination("jwts", this.pageOfListJWTs, request);
594
- /**
595
- * Create a JWT.
596
- *
597
- * @param request - The request {@link CreateJWTRequest}
598
- * @returns A Promise of EncodedJWT
599
- */
600
- createJWT = (request) => this.client.fetch({
601
- body: JSON.stringify(marshalCreateJWTRequest(request, this.client.settings)),
602
- headers: jsonContentHeaders,
603
- method: "POST",
604
- path: `/iam/v1alpha1/jwts`
605
- }, unmarshalEncodedJWT);
606
- /**
607
- * Get a JWT.
608
- *
609
- * @param request - The request {@link GetJWTRequest}
610
- * @returns A Promise of JWT
611
- */
612
- getJWT = (request) => this.client.fetch({
613
- method: "GET",
614
- path: `/iam/v1alpha1/jwts/${validatePathParam("jti", request.jti)}`
615
- }, unmarshalJWT);
616
- /**
617
- * Delete a JWT.
618
- *
619
- * @param request - The request {@link DeleteJWTRequest}
620
- */
621
- deleteJWT = (request) => this.client.fetch({
622
- method: "DELETE",
623
- path: `/iam/v1alpha1/jwts/${validatePathParam("jti", request.jti)}`
624
- });
625
- pageOfListLogs = (request = {}) => this.client.fetch({
626
- method: "GET",
627
- path: `/iam/v1alpha1/logs`,
628
- urlParams: urlParams(["action", request.action], ["created_after", request.createdAfter], ["created_before", request.createdBefore], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["resource_type", request.resourceType], ["search", request.search])
629
- }, unmarshalListLogsResponse);
630
- /**
631
- * List logs. List logs available for given Organization. You must define the `organization_id` in the query path of your request.
632
- *
633
- * @param request - The request {@link ListLogsRequest}
634
- * @returns A Promise of ListLogsResponse
635
- */
636
- listLogs = (request = {}) => enrichForPagination("logs", this.pageOfListLogs, request);
637
- /**
638
- * Get a log. Retrieve information about a log, specified by the `log_id` parameter. The log's full details, including `id`, `ip`, `user_agent`, `action`, `bearer_id`, `resource_type` and `resource_id` are returned in the response.
639
- *
640
- * @param request - The request {@link GetLogRequest}
641
- * @returns A Promise of Log
642
- */
643
- getLog = (request) => this.client.fetch({
644
- method: "GET",
645
- path: `/iam/v1alpha1/logs/${validatePathParam("logId", request.logId)}`
646
- }, unmarshalLog);
647
- /**
648
- * Get security settings of an Organization. Retrieve information about the security settings of an Organization, specified by the `organization_id` parameter.
649
- *
650
- * @param request - The request {@link GetOrganizationSecuritySettingsRequest}
651
- * @returns A Promise of OrganizationSecuritySettings
652
- */
653
- getOrganizationSecuritySettings = (request = {}) => this.client.fetch({
654
- method: "GET",
655
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/security-settings`
656
- }, unmarshalOrganizationSecuritySettings);
657
- /**
658
- * Update the security settings of an Organization.
659
- *
660
- * @param request - The request {@link UpdateOrganizationSecuritySettingsRequest}
661
- * @returns A Promise of OrganizationSecuritySettings
662
- */
663
- updateOrganizationSecuritySettings = (request = {}) => this.client.fetch({
664
- body: JSON.stringify(marshalUpdateOrganizationSecuritySettingsRequest(request, this.client.settings)),
665
- headers: jsonContentHeaders,
666
- method: "PATCH",
667
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/security-settings`
668
- }, unmarshalOrganizationSecuritySettings);
669
- /**
670
- * Set your Organization's alias.. This will fail if an alias has already been defined. Please contact support if you need to change your Organization's alias.
671
- *
672
- * @param request - The request {@link SetOrganizationAliasRequest}
673
- * @returns A Promise of Organization
674
- */
675
- setOrganizationAlias = (request) => this.client.fetch({
676
- body: JSON.stringify(marshalSetOrganizationAliasRequest(request, this.client.settings)),
677
- headers: jsonContentHeaders,
678
- method: "PUT",
679
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/alias`
680
- }, unmarshalOrganization);
681
- /**
682
- * Get your Organization's IAM information.
683
- *
684
- * @param request - The request {@link GetOrganizationRequest}
685
- * @returns A Promise of Organization
686
- */
687
- getOrganization = (request = {}) => this.client.fetch({
688
- method: "GET",
689
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}`
690
- }, unmarshalOrganization);
691
- /**
692
- * Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
693
- *
694
- * @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
695
- * @returns A Promise of Organization
696
- */
697
- updateOrganizationLoginMethods = (request = {}) => this.client.fetch({
698
- body: JSON.stringify(marshalUpdateOrganizationLoginMethodsRequest(request, this.client.settings)),
699
- headers: jsonContentHeaders,
700
- method: "PATCH",
701
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`
702
- }, unmarshalOrganization);
703
- /**
704
- * Get SAML Identity Provider configuration of an Organization.
705
- *
706
- * @param request - The request {@link GetOrganizationSamlRequest}
707
- * @returns A Promise of Saml
708
- */
709
- getOrganizationSaml = (request = {}) => this.client.fetch({
710
- method: "GET",
711
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`
712
- }, unmarshalSaml);
713
- /**
714
- * Enable SAML Identity Provider for an Organization.
715
- *
716
- * @param request - The request {@link EnableOrganizationSamlRequest}
717
- * @returns A Promise of Saml
718
- */
719
- enableOrganizationSaml = (request = {}) => this.client.fetch({
720
- body: "{}",
721
- headers: jsonContentHeaders,
722
- method: "POST",
723
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`
724
- }, unmarshalSaml);
725
- /**
726
- * Update SAML Identity Provider configuration.
727
- *
728
- * @param request - The request {@link UpdateSamlRequest}
729
- * @returns A Promise of Saml
730
- */
731
- updateSaml = (request) => this.client.fetch({
732
- body: JSON.stringify(marshalUpdateSamlRequest(request, this.client.settings)),
733
- headers: jsonContentHeaders,
734
- method: "PATCH",
735
- path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
736
- }, unmarshalSaml);
737
- /**
738
- * Disable SAML Identity Provider for an Organization.
739
- *
740
- * @param request - The request {@link DeleteSamlRequest}
741
- */
742
- deleteSaml = (request) => this.client.fetch({
743
- method: "DELETE",
744
- path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
745
- });
746
- /**
747
- * Parse SAML xml metadata file.
748
- *
749
- * @param request - The request {@link ParseSamlMetadataRequest}
750
- * @returns A Promise of ParseSamlMetadataResponse
751
- */
752
- parseSamlMetadata = async (request) => this.client.fetch({
753
- body: JSON.stringify(await marshalParseSamlMetadataRequest(request, this.client.settings)),
754
- headers: jsonContentHeaders,
755
- method: "POST",
756
- path: `/iam/v1alpha1/parse-saml-metadata`
757
- }, unmarshalParseSamlMetadataResponse);
758
- /**
759
- * List SAML certificates.
760
- *
761
- * @param request - The request {@link ListSamlCertificatesRequest}
762
- * @returns A Promise of ListSamlCertificatesResponse
763
- */
764
- listSamlCertificates = (request) => this.client.fetch({
765
- method: "GET",
766
- path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}/certificates`
767
- }, unmarshalListSamlCertificatesResponse);
768
- /**
769
- * Add a SAML certificate.
770
- *
771
- * @param request - The request {@link AddSamlCertificateRequest}
772
- * @returns A Promise of SamlCertificate
773
- */
774
- addSamlCertificate = (request) => this.client.fetch({
775
- body: JSON.stringify(marshalAddSamlCertificateRequest(request, this.client.settings)),
776
- headers: jsonContentHeaders,
777
- method: "POST",
778
- path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}/certificates`
779
- }, unmarshalSamlCertificate);
780
- /**
781
- * Get a SAML certificate.
782
- *
783
- * @param request - The request {@link GetSamlCertificateRequest}
784
- * @returns A Promise of SamlCertificate
785
- */
786
- getSamlCertificate = (request) => this.client.fetch({
787
- method: "GET",
788
- path: `/iam/v1alpha1/saml-certificates/${validatePathParam("certificateId", request.certificateId)}`
789
- }, unmarshalSamlCertificate);
790
- /**
791
- * Delete a SAML certificate.
792
- *
793
- * @param request - The request {@link DeleteSamlCertificateRequest}
794
- */
795
- deleteSamlCertificate = (request) => this.client.fetch({
796
- method: "DELETE",
797
- path: `/iam/v1alpha1/saml-certificates/${validatePathParam("certificateId", request.certificateId)}`
798
- });
799
- /**
800
- * Get SCIM configuration of an Organization.
801
- *
802
- * @param request - The request {@link GetOrganizationScimRequest}
803
- * @returns A Promise of Scim
804
- */
805
- getOrganizationScim = (request = {}) => this.client.fetch({
806
- method: "GET",
807
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/scim`
808
- }, unmarshalScim);
809
- /**
810
- * Enable SCIM for an Organization.
811
- *
812
- * @param request - The request {@link EnableOrganizationScimRequest}
813
- * @returns A Promise of Scim
814
- */
815
- enableOrganizationScim = (request = {}) => this.client.fetch({
816
- body: "{}",
817
- headers: jsonContentHeaders,
818
- method: "POST",
819
- path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/scim`
820
- }, unmarshalScim);
821
- /**
822
- * Disable SCIM for an Organization.
823
- *
824
- * @param request - The request {@link DeleteScimRequest}
825
- */
826
- deleteScim = (request) => this.client.fetch({
827
- method: "DELETE",
828
- path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}`
829
- });
830
- pageOfListScimTokens = (request) => this.client.fetch({
831
- method: "GET",
832
- path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}/tokens`,
833
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
834
- }, unmarshalListScimTokensResponse);
835
- /**
836
- * List SCIM tokens.
837
- *
838
- * @param request - The request {@link ListScimTokensRequest}
839
- * @returns A Promise of ListScimTokensResponse
840
- */
841
- listScimTokens = (request) => enrichForPagination("scimTokens", this.pageOfListScimTokens, request);
842
- /**
843
- * Create a SCIM token.
844
- *
845
- * @param request - The request {@link CreateScimTokenRequest}
846
- * @returns A Promise of CreateScimTokenResponse
847
- */
848
- createScimToken = (request) => this.client.fetch({
849
- method: "POST",
850
- path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}/tokens`
851
- }, unmarshalCreateScimTokenResponse);
852
- /**
853
- * Delete a SCIM token.
854
- *
855
- * @param request - The request {@link DeleteScimTokenRequest}
856
- */
857
- deleteScimToken = (request) => this.client.fetch({
858
- method: "DELETE",
859
- path: `/iam/v1alpha1/scim-tokens/${validatePathParam("tokenId", request.tokenId)}`
860
- });
861
- /**
862
- * Start registering a WebAuthn authenticator.
863
- *
864
- * @param request - The request {@link StartUserWebAuthnRegistrationRequest}
865
- * @returns A Promise of StartUserWebAuthnRegistrationResponse
866
- */
867
- startUserWebAuthnRegistration = (request) => this.client.fetch({
868
- method: "POST",
869
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/start-webauthn-registration`,
870
- urlParams: urlParams(["origin", request.origin])
871
- }, unmarshalStartUserWebAuthnRegistrationResponse);
872
- /**
873
- * Complete a WebAuthen authenticator registration.
874
- *
875
- * @param request - The request {@link FinishUserWebAuthnRegistrationRequest}
876
- * @returns A Promise of FinishUserWebAuthnRegistrationResponse
877
- */
878
- finishUserWebAuthnRegistration = (request) => this.client.fetch({
879
- body: JSON.stringify(marshalFinishUserWebAuthnRegistrationRequest(request, this.client.settings)),
880
- headers: jsonContentHeaders,
881
- method: "POST",
882
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/finish-webauthn-registration`
883
- }, unmarshalFinishUserWebAuthnRegistrationResponse);
884
- pageOfListUserWebAuthnAuthenticators = (request) => this.client.fetch({
885
- method: "GET",
886
- path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/webauthn-authenticators`,
887
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
888
- }, unmarshalListUserWebAuthnAuthenticatorsResponse);
889
- /**
890
- * List all of a user's WebAuthn Authenticators.
891
- *
892
- * @param request - The request {@link ListUserWebAuthnAuthenticatorsRequest}
893
- * @returns A Promise of ListUserWebAuthnAuthenticatorsResponse
894
- */
895
- listUserWebAuthnAuthenticators = (request) => enrichForPagination("authenticators", this.pageOfListUserWebAuthnAuthenticators, request);
896
- /**
897
- * Update a WebAuthn authenticator.
898
- *
899
- * @param request - The request {@link UpdateWebAuthnAuthenticatorRequest}
900
- * @returns A Promise of WebAuthnAuthenticator
901
- */
902
- updateWebAuthnAuthenticator = (request) => this.client.fetch({
903
- body: JSON.stringify(marshalUpdateWebAuthnAuthenticatorRequest(request, this.client.settings)),
904
- headers: jsonContentHeaders,
905
- method: "PATCH",
906
- path: `/iam/v1alpha1/webauthn-authenticator/${validatePathParam("authenticatorId", request.authenticatorId)}`
907
- }, unmarshalWebAuthnAuthenticator);
908
- /**
909
- * Delete a WebAuthn authenticator.
910
- *
911
- * @param request - The request {@link DeleteWebAuthnAuthenticatorRequest}
912
- */
913
- deleteWebAuthnAuthenticator = (request) => this.client.fetch({
914
- body: "{}",
915
- headers: jsonContentHeaders,
916
- method: "DELETE",
917
- path: `/iam/v1alpha1/webauthn-authenticator/${validatePathParam("authenticatorId", request.authenticatorId)}`
918
- });
11
+ constructor(..._args) {
12
+ super(..._args);
13
+ this.pageOfListSSHKeys = (request = {}) => this.client.fetch({
14
+ method: "GET",
15
+ path: `/iam/v1alpha1/ssh-keys`,
16
+ urlParams: urlParams(["disabled", request.disabled], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
17
+ }, unmarshalListSSHKeysResponse);
18
+ this.listSSHKeys = (request = {}) => enrichForPagination("sshKeys", this.pageOfListSSHKeys, request);
19
+ this.createSSHKey = (request) => this.client.fetch({
20
+ body: JSON.stringify(marshalCreateSSHKeyRequest(request, this.client.settings)),
21
+ headers: jsonContentHeaders,
22
+ method: "POST",
23
+ path: `/iam/v1alpha1/ssh-keys`
24
+ }, unmarshalSSHKey);
25
+ this.getSSHKey = (request) => this.client.fetch({
26
+ method: "GET",
27
+ path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
28
+ }, unmarshalSSHKey);
29
+ this.updateSSHKey = (request) => this.client.fetch({
30
+ body: JSON.stringify(marshalUpdateSSHKeyRequest(request, this.client.settings)),
31
+ headers: jsonContentHeaders,
32
+ method: "PATCH",
33
+ path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
34
+ }, unmarshalSSHKey);
35
+ this.deleteSSHKey = (request) => this.client.fetch({
36
+ method: "DELETE",
37
+ path: `/iam/v1alpha1/ssh-keys/${validatePathParam("sshKeyId", request.sshKeyId)}`
38
+ });
39
+ this.pageOfListUsers = (request = {}) => this.client.fetch({
40
+ method: "GET",
41
+ path: `/iam/v1alpha1/users`,
42
+ urlParams: urlParams(["mfa", request.mfa], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tag", request.tag], ["type", request.type], ["user_ids", request.userIds])
43
+ }, unmarshalListUsersResponse);
44
+ this.listUsers = (request = {}) => enrichForPagination("users", this.pageOfListUsers, request);
45
+ this.getUser = (request) => this.client.fetch({
46
+ method: "GET",
47
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
48
+ }, unmarshalUser);
49
+ this.updateUser = (request) => this.client.fetch({
50
+ body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
51
+ headers: jsonContentHeaders,
52
+ method: "PATCH",
53
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
54
+ }, unmarshalUser);
55
+ this.deleteUser = (request) => this.client.fetch({
56
+ method: "DELETE",
57
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}`
58
+ });
59
+ this.createUser = (request = {}) => this.client.fetch({
60
+ body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
61
+ headers: jsonContentHeaders,
62
+ method: "POST",
63
+ path: `/iam/v1alpha1/users`
64
+ }, unmarshalUser);
65
+ this.updateUserUsername = (request) => this.client.fetch({
66
+ body: JSON.stringify(marshalUpdateUserUsernameRequest(request, this.client.settings)),
67
+ headers: jsonContentHeaders,
68
+ method: "POST",
69
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/update-username`
70
+ }, unmarshalUser);
71
+ this.updateUserPassword = (request) => this.client.fetch({
72
+ body: JSON.stringify(marshalUpdateUserPasswordRequest(request, this.client.settings)),
73
+ headers: jsonContentHeaders,
74
+ method: "POST",
75
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/update-password`
76
+ }, unmarshalUser);
77
+ this.createUserMFAOTP = (request) => this.client.fetch({
78
+ body: "{}",
79
+ headers: jsonContentHeaders,
80
+ method: "POST",
81
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/mfa-otp`
82
+ }, unmarshalMFAOTP);
83
+ this.validateUserMFAOTP = (request) => this.client.fetch({
84
+ body: JSON.stringify(marshalValidateUserMFAOTPRequest(request, this.client.settings)),
85
+ headers: jsonContentHeaders,
86
+ method: "POST",
87
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/validate-mfa-otp`
88
+ }, unmarshalValidateUserMFAOTPResponse);
89
+ this.deleteUserMFAOTP = (request) => this.client.fetch({
90
+ body: "{}",
91
+ headers: jsonContentHeaders,
92
+ method: "DELETE",
93
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/mfa-otp`
94
+ });
95
+ this.lockUser = (request) => this.client.fetch({
96
+ body: "{}",
97
+ headers: jsonContentHeaders,
98
+ method: "POST",
99
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/lock`
100
+ }, unmarshalUser);
101
+ this.unlockUser = (request) => this.client.fetch({
102
+ body: "{}",
103
+ headers: jsonContentHeaders,
104
+ method: "POST",
105
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/unlock`
106
+ }, unmarshalUser);
107
+ this.listGracePeriods = (request = {}) => this.client.fetch({
108
+ method: "GET",
109
+ path: `/iam/v1alpha1/grace-periods`,
110
+ urlParams: urlParams(["user_id", request.userId])
111
+ }, unmarshalListGracePeriodsResponse);
112
+ this.getUserConnections = (request) => this.client.fetch({
113
+ method: "GET",
114
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/connections`
115
+ }, unmarshalGetUserConnectionsResponse);
116
+ this.initiateUserConnection = (request) => this.client.fetch({
117
+ body: "{}",
118
+ headers: jsonContentHeaders,
119
+ method: "POST",
120
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/initiate-connection`
121
+ }, unmarshalInitiateUserConnectionResponse);
122
+ this.joinUserConnection = (request) => this.client.fetch({
123
+ body: JSON.stringify(marshalJoinUserConnectionRequest(request, this.client.settings)),
124
+ headers: jsonContentHeaders,
125
+ method: "POST",
126
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/join-connection`
127
+ });
128
+ this.removeUserConnection = (request) => this.client.fetch({
129
+ body: JSON.stringify(marshalRemoveUserConnectionRequest(request, this.client.settings)),
130
+ headers: jsonContentHeaders,
131
+ method: "POST",
132
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/remove-connection`
133
+ });
134
+ this.pageOfListApplications = (request = {}) => this.client.fetch({
135
+ method: "GET",
136
+ path: `/iam/v1alpha1/applications`,
137
+ urlParams: urlParams(["application_ids", request.applicationIds], ["editable", request.editable], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tag", request.tag])
138
+ }, unmarshalListApplicationsResponse);
139
+ this.listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
140
+ this.createApplication = (request) => this.client.fetch({
141
+ body: JSON.stringify(marshalCreateApplicationRequest(request, this.client.settings)),
142
+ headers: jsonContentHeaders,
143
+ method: "POST",
144
+ path: `/iam/v1alpha1/applications`
145
+ }, unmarshalApplication);
146
+ this.getApplication = (request) => this.client.fetch({
147
+ method: "GET",
148
+ path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
149
+ }, unmarshalApplication);
150
+ this.updateApplication = (request) => this.client.fetch({
151
+ body: JSON.stringify(marshalUpdateApplicationRequest(request, this.client.settings)),
152
+ headers: jsonContentHeaders,
153
+ method: "PATCH",
154
+ path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
155
+ }, unmarshalApplication);
156
+ this.deleteApplication = (request) => this.client.fetch({
157
+ method: "DELETE",
158
+ path: `/iam/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
159
+ });
160
+ this.pageOfListGroups = (request = {}) => this.client.fetch({
161
+ method: "GET",
162
+ path: `/iam/v1alpha1/groups`,
163
+ urlParams: urlParams(["application_ids", request.applicationIds], ["group_ids", request.groupIds], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tag", request.tag], ["user_ids", request.userIds])
164
+ }, unmarshalListGroupsResponse);
165
+ this.listGroups = (request = {}) => enrichForPagination("groups", this.pageOfListGroups, request);
166
+ this.createGroup = (request) => this.client.fetch({
167
+ body: JSON.stringify(marshalCreateGroupRequest(request, this.client.settings)),
168
+ headers: jsonContentHeaders,
169
+ method: "POST",
170
+ path: `/iam/v1alpha1/groups`
171
+ }, unmarshalGroup);
172
+ this.getGroup = (request) => this.client.fetch({
173
+ method: "GET",
174
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
175
+ }, unmarshalGroup);
176
+ this.updateGroup = (request) => this.client.fetch({
177
+ body: JSON.stringify(marshalUpdateGroupRequest(request, this.client.settings)),
178
+ headers: jsonContentHeaders,
179
+ method: "PATCH",
180
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
181
+ }, unmarshalGroup);
182
+ this.setGroupMembers = (request) => this.client.fetch({
183
+ body: JSON.stringify(marshalSetGroupMembersRequest(request, this.client.settings)),
184
+ headers: jsonContentHeaders,
185
+ method: "PUT",
186
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/members`
187
+ }, unmarshalGroup);
188
+ this.addGroupMember = (request) => this.client.fetch({
189
+ body: JSON.stringify(marshalAddGroupMemberRequest(request, this.client.settings)),
190
+ headers: jsonContentHeaders,
191
+ method: "POST",
192
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/add-member`
193
+ }, unmarshalGroup);
194
+ this.addGroupMembers = (request) => this.client.fetch({
195
+ body: JSON.stringify(marshalAddGroupMembersRequest(request, this.client.settings)),
196
+ headers: jsonContentHeaders,
197
+ method: "POST",
198
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/add-members`
199
+ }, unmarshalGroup);
200
+ this.removeGroupMember = (request) => this.client.fetch({
201
+ body: JSON.stringify(marshalRemoveGroupMemberRequest(request, this.client.settings)),
202
+ headers: jsonContentHeaders,
203
+ method: "POST",
204
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}/remove-member`
205
+ }, unmarshalGroup);
206
+ this.deleteGroup = (request) => this.client.fetch({
207
+ method: "DELETE",
208
+ path: `/iam/v1alpha1/groups/${validatePathParam("groupId", request.groupId)}`
209
+ });
210
+ this.pageOfListPolicies = (request = {}) => this.client.fetch({
211
+ method: "GET",
212
+ path: `/iam/v1alpha1/policies`,
213
+ urlParams: urlParams(["application_ids", request.applicationIds], ["editable", request.editable], ["group_ids", request.groupIds], ["no_principal", request.noPrincipal], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["policy_ids", request.policyIds], ["policy_name", request.policyName], ["tag", request.tag], ["user_ids", request.userIds])
214
+ }, unmarshalListPoliciesResponse);
215
+ this.listPolicies = (request = {}) => enrichForPagination("policies", this.pageOfListPolicies, request);
216
+ this.createPolicy = (request) => this.client.fetch({
217
+ body: JSON.stringify(marshalCreatePolicyRequest(request, this.client.settings)),
218
+ headers: jsonContentHeaders,
219
+ method: "POST",
220
+ path: `/iam/v1alpha1/policies`
221
+ }, unmarshalPolicy);
222
+ this.getPolicy = (request) => this.client.fetch({
223
+ method: "GET",
224
+ path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
225
+ }, unmarshalPolicy);
226
+ this.updatePolicy = (request) => this.client.fetch({
227
+ body: JSON.stringify(marshalUpdatePolicyRequest(request, this.client.settings)),
228
+ headers: jsonContentHeaders,
229
+ method: "PATCH",
230
+ path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
231
+ }, unmarshalPolicy);
232
+ this.deletePolicy = (request) => this.client.fetch({
233
+ method: "DELETE",
234
+ path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}`
235
+ });
236
+ this.clonePolicy = (request) => this.client.fetch({
237
+ body: "{}",
238
+ headers: jsonContentHeaders,
239
+ method: "POST",
240
+ path: `/iam/v1alpha1/policies/${validatePathParam("policyId", request.policyId)}/clone`
241
+ }, unmarshalPolicy);
242
+ this.setRules = (request) => this.client.fetch({
243
+ body: JSON.stringify(marshalSetRulesRequest(request, this.client.settings)),
244
+ headers: jsonContentHeaders,
245
+ method: "PUT",
246
+ path: `/iam/v1alpha1/rules`
247
+ }, unmarshalSetRulesResponse);
248
+ this.pageOfListRules = (request) => this.client.fetch({
249
+ method: "GET",
250
+ path: `/iam/v1alpha1/rules`,
251
+ urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["policy_id", request.policyId])
252
+ }, unmarshalListRulesResponse);
253
+ this.listRules = (request) => enrichForPagination("rules", this.pageOfListRules, request);
254
+ this.pageOfListPermissionSets = (request = {}) => this.client.fetch({
255
+ method: "GET",
256
+ path: `/iam/v1alpha1/permission-sets`,
257
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
258
+ }, unmarshalListPermissionSetsResponse);
259
+ this.listPermissionSets = (request = {}) => enrichForPagination("permissionSets", this.pageOfListPermissionSets, request);
260
+ this.pageOfListAPIKeys = (request = {}) => this.client.fetch({
261
+ method: "GET",
262
+ path: `/iam/v1alpha1/api-keys`,
263
+ urlParams: urlParams(["access_key", request.accessKey], ["access_keys", request.accessKeys], ["bearer_id", request.bearerId], ["bearer_type", request.bearerType], ["description", request.description], ["editable", request.editable], ["expired", request.expired], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
264
+ param: "application_id",
265
+ value: request.applicationId
266
+ }, {
267
+ param: "user_id",
268
+ value: request.userId
269
+ }])))
270
+ }, unmarshalListAPIKeysResponse);
271
+ this.listAPIKeys = (request = {}) => enrichForPagination("apiKeys", this.pageOfListAPIKeys, request);
272
+ this.createAPIKey = (request) => this.client.fetch({
273
+ body: JSON.stringify(marshalCreateAPIKeyRequest(request, this.client.settings)),
274
+ headers: jsonContentHeaders,
275
+ method: "POST",
276
+ path: `/iam/v1alpha1/api-keys`
277
+ }, unmarshalAPIKey);
278
+ this.getAPIKey = (request) => this.client.fetch({
279
+ method: "GET",
280
+ path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
281
+ }, unmarshalAPIKey);
282
+ this.updateAPIKey = (request) => this.client.fetch({
283
+ body: JSON.stringify(marshalUpdateAPIKeyRequest(request, this.client.settings)),
284
+ headers: jsonContentHeaders,
285
+ method: "PATCH",
286
+ path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
287
+ }, unmarshalAPIKey);
288
+ this.deleteAPIKey = (request) => this.client.fetch({
289
+ method: "DELETE",
290
+ path: `/iam/v1alpha1/api-keys/${validatePathParam("accessKey", request.accessKey)}`
291
+ });
292
+ this.pageOfListQuota = (request = {}) => this.client.fetch({
293
+ method: "GET",
294
+ path: `/iam/v1alpha1/quota`,
295
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["quotum_names", request.quotumNames])
296
+ }, unmarshalListQuotaResponse);
297
+ this.listQuota = (request = {}) => enrichForPagination("quota", this.pageOfListQuota, request);
298
+ this.getQuotum = (request) => this.client.fetch({
299
+ method: "GET",
300
+ path: `/iam/v1alpha1/quota/${validatePathParam("quotumName", request.quotumName)}`,
301
+ urlParams: urlParams(["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId])
302
+ }, unmarshalQuotum);
303
+ this.pageOfListJWTs = (request) => this.client.fetch({
304
+ method: "GET",
305
+ path: `/iam/v1alpha1/jwts`,
306
+ urlParams: urlParams(["audience_id", request.audienceId], ["expired", request.expired], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
307
+ }, unmarshalListJWTsResponse);
308
+ this.listJWTs = (request) => enrichForPagination("jwts", this.pageOfListJWTs, request);
309
+ this.createJWT = (request) => this.client.fetch({
310
+ body: JSON.stringify(marshalCreateJWTRequest(request, this.client.settings)),
311
+ headers: jsonContentHeaders,
312
+ method: "POST",
313
+ path: `/iam/v1alpha1/jwts`
314
+ }, unmarshalEncodedJWT);
315
+ this.getJWT = (request) => this.client.fetch({
316
+ method: "GET",
317
+ path: `/iam/v1alpha1/jwts/${validatePathParam("jti", request.jti)}`
318
+ }, unmarshalJWT);
319
+ this.deleteJWT = (request) => this.client.fetch({
320
+ method: "DELETE",
321
+ path: `/iam/v1alpha1/jwts/${validatePathParam("jti", request.jti)}`
322
+ });
323
+ this.pageOfListLogs = (request = {}) => this.client.fetch({
324
+ method: "GET",
325
+ path: `/iam/v1alpha1/logs`,
326
+ urlParams: urlParams(["action", request.action], ["created_after", request.createdAfter], ["created_before", request.createdBefore], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["resource_type", request.resourceType], ["search", request.search])
327
+ }, unmarshalListLogsResponse);
328
+ this.listLogs = (request = {}) => enrichForPagination("logs", this.pageOfListLogs, request);
329
+ this.getLog = (request) => this.client.fetch({
330
+ method: "GET",
331
+ path: `/iam/v1alpha1/logs/${validatePathParam("logId", request.logId)}`
332
+ }, unmarshalLog);
333
+ this.getOrganizationSecuritySettings = (request = {}) => this.client.fetch({
334
+ method: "GET",
335
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/security-settings`
336
+ }, unmarshalOrganizationSecuritySettings);
337
+ this.updateOrganizationSecuritySettings = (request = {}) => this.client.fetch({
338
+ body: JSON.stringify(marshalUpdateOrganizationSecuritySettingsRequest(request, this.client.settings)),
339
+ headers: jsonContentHeaders,
340
+ method: "PATCH",
341
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/security-settings`
342
+ }, unmarshalOrganizationSecuritySettings);
343
+ this.setOrganizationAlias = (request) => this.client.fetch({
344
+ body: JSON.stringify(marshalSetOrganizationAliasRequest(request, this.client.settings)),
345
+ headers: jsonContentHeaders,
346
+ method: "PUT",
347
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/alias`
348
+ }, unmarshalOrganization);
349
+ this.getOrganization = (request = {}) => this.client.fetch({
350
+ method: "GET",
351
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}`
352
+ }, unmarshalOrganization);
353
+ this.updateOrganizationLoginMethods = (request = {}) => this.client.fetch({
354
+ body: JSON.stringify(marshalUpdateOrganizationLoginMethodsRequest(request, this.client.settings)),
355
+ headers: jsonContentHeaders,
356
+ method: "PATCH",
357
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`
358
+ }, unmarshalOrganization);
359
+ this.getOrganizationSaml = (request = {}) => this.client.fetch({
360
+ method: "GET",
361
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`
362
+ }, unmarshalSaml);
363
+ this.enableOrganizationSaml = (request = {}) => this.client.fetch({
364
+ body: "{}",
365
+ headers: jsonContentHeaders,
366
+ method: "POST",
367
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`
368
+ }, unmarshalSaml);
369
+ this.updateSaml = (request) => this.client.fetch({
370
+ body: JSON.stringify(marshalUpdateSamlRequest(request, this.client.settings)),
371
+ headers: jsonContentHeaders,
372
+ method: "PATCH",
373
+ path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
374
+ }, unmarshalSaml);
375
+ this.deleteSaml = (request) => this.client.fetch({
376
+ method: "DELETE",
377
+ path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}`
378
+ });
379
+ this.parseSamlMetadata = async (request) => this.client.fetch({
380
+ body: JSON.stringify(await marshalParseSamlMetadataRequest(request, this.client.settings)),
381
+ headers: jsonContentHeaders,
382
+ method: "POST",
383
+ path: `/iam/v1alpha1/parse-saml-metadata`
384
+ }, unmarshalParseSamlMetadataResponse);
385
+ this.listSamlCertificates = (request) => this.client.fetch({
386
+ method: "GET",
387
+ path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}/certificates`
388
+ }, unmarshalListSamlCertificatesResponse);
389
+ this.addSamlCertificate = (request) => this.client.fetch({
390
+ body: JSON.stringify(marshalAddSamlCertificateRequest(request, this.client.settings)),
391
+ headers: jsonContentHeaders,
392
+ method: "POST",
393
+ path: `/iam/v1alpha1/saml/${validatePathParam("samlId", request.samlId)}/certificates`
394
+ }, unmarshalSamlCertificate);
395
+ this.getSamlCertificate = (request) => this.client.fetch({
396
+ method: "GET",
397
+ path: `/iam/v1alpha1/saml-certificates/${validatePathParam("certificateId", request.certificateId)}`
398
+ }, unmarshalSamlCertificate);
399
+ this.deleteSamlCertificate = (request) => this.client.fetch({
400
+ method: "DELETE",
401
+ path: `/iam/v1alpha1/saml-certificates/${validatePathParam("certificateId", request.certificateId)}`
402
+ });
403
+ this.getOrganizationScim = (request = {}) => this.client.fetch({
404
+ method: "GET",
405
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/scim`
406
+ }, unmarshalScim);
407
+ this.enableOrganizationScim = (request = {}) => this.client.fetch({
408
+ body: "{}",
409
+ headers: jsonContentHeaders,
410
+ method: "POST",
411
+ path: `/iam/v1alpha1/organizations/${validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/scim`
412
+ }, unmarshalScim);
413
+ this.deleteScim = (request) => this.client.fetch({
414
+ method: "DELETE",
415
+ path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}`
416
+ });
417
+ this.pageOfListScimTokens = (request) => this.client.fetch({
418
+ method: "GET",
419
+ path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}/tokens`,
420
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
421
+ }, unmarshalListScimTokensResponse);
422
+ this.listScimTokens = (request) => enrichForPagination("scimTokens", this.pageOfListScimTokens, request);
423
+ this.createScimToken = (request) => this.client.fetch({
424
+ method: "POST",
425
+ path: `/iam/v1alpha1/scim/${validatePathParam("scimId", request.scimId)}/tokens`
426
+ }, unmarshalCreateScimTokenResponse);
427
+ this.deleteScimToken = (request) => this.client.fetch({
428
+ method: "DELETE",
429
+ path: `/iam/v1alpha1/scim-tokens/${validatePathParam("tokenId", request.tokenId)}`
430
+ });
431
+ this.startUserWebAuthnRegistration = (request) => this.client.fetch({
432
+ method: "POST",
433
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/start-webauthn-registration`,
434
+ urlParams: urlParams(["origin", request.origin])
435
+ }, unmarshalStartUserWebAuthnRegistrationResponse);
436
+ this.finishUserWebAuthnRegistration = (request) => this.client.fetch({
437
+ body: JSON.stringify(marshalFinishUserWebAuthnRegistrationRequest(request, this.client.settings)),
438
+ headers: jsonContentHeaders,
439
+ method: "POST",
440
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/finish-webauthn-registration`
441
+ }, unmarshalFinishUserWebAuthnRegistrationResponse);
442
+ this.pageOfListUserWebAuthnAuthenticators = (request) => this.client.fetch({
443
+ method: "GET",
444
+ path: `/iam/v1alpha1/users/${validatePathParam("userId", request.userId)}/webauthn-authenticators`,
445
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
446
+ }, unmarshalListUserWebAuthnAuthenticatorsResponse);
447
+ this.listUserWebAuthnAuthenticators = (request) => enrichForPagination("authenticators", this.pageOfListUserWebAuthnAuthenticators, request);
448
+ this.updateWebAuthnAuthenticator = (request) => this.client.fetch({
449
+ body: JSON.stringify(marshalUpdateWebAuthnAuthenticatorRequest(request, this.client.settings)),
450
+ headers: jsonContentHeaders,
451
+ method: "PATCH",
452
+ path: `/iam/v1alpha1/webauthn-authenticator/${validatePathParam("authenticatorId", request.authenticatorId)}`
453
+ }, unmarshalWebAuthnAuthenticator);
454
+ this.deleteWebAuthnAuthenticator = (request) => this.client.fetch({
455
+ body: "{}",
456
+ headers: jsonContentHeaders,
457
+ method: "DELETE",
458
+ path: `/iam/v1alpha1/webauthn-authenticator/${validatePathParam("authenticatorId", request.authenticatorId)}`
459
+ });
460
+ }
919
461
  };
920
462
  //#endregion
921
463
  export { API };