@aionixone/client-iam 0.0.0-stage → 0.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +11 -0
  3. package/dist/generated/catalog.d.ts +906 -0
  4. package/dist/generated/catalog.d.ts.map +1 -0
  5. package/dist/generated/catalog.js +879 -0
  6. package/dist/generated/catalog.js.map +1 -0
  7. package/dist/generated/index.d.ts +6 -0
  8. package/dist/generated/index.d.ts.map +1 -0
  9. package/dist/generated/index.js +7 -0
  10. package/dist/generated/index.js.map +1 -0
  11. package/dist/generated/schema_types.d.ts +98 -0
  12. package/dist/generated/schema_types.d.ts.map +1 -0
  13. package/dist/generated/schema_types.js +3 -0
  14. package/dist/generated/schema_types.js.map +1 -0
  15. package/dist/generated/service.d.ts +943 -0
  16. package/dist/generated/service.d.ts.map +1 -0
  17. package/dist/generated/service.js +1230 -0
  18. package/dist/generated/service.js.map +1 -0
  19. package/dist/generated/trn.d.ts +76 -0
  20. package/dist/generated/trn.d.ts.map +1 -0
  21. package/dist/generated/trn.js +299 -0
  22. package/dist/generated/trn.js.map +1 -0
  23. package/dist/generated/types.d.ts +462 -0
  24. package/dist/generated/types.d.ts.map +1 -0
  25. package/dist/generated/types.js +3 -0
  26. package/dist/generated/types.js.map +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +2 -0
  30. package/dist/index.js.map +1 -0
  31. package/package.json +30 -4
  32. package/src/generated/catalog.ts +882 -0
  33. package/src/generated/index.ts +7 -0
  34. package/src/generated/schema_types.ts +99 -0
  35. package/src/generated/service.ts +1311 -0
  36. package/src/generated/trn.ts +431 -0
  37. package/src/generated/types.ts +532 -0
  38. package/src/index.ts +1 -0
  39. package/README.md +0 -3
@@ -0,0 +1,1311 @@
1
+ // @generated by xtask ts-client-export; DO NOT EDIT
2
+
3
+ import { encodePathParam, withQuery } from '@aionixone/client-core';
4
+ import type { CallEngine, CallOptions, KeyedCallOptions } from '@aionixone/client-core';
5
+ import { OPERATIONS } from './catalog.js';
6
+ import type { IamAccessGroupAccessGrantListQuery, IamAccessGroupAccessGrantListResponse, IamAccessGroupListQuery, IamAccessGroupListResponse, IamAccessGroupReadResponse, IamAccessGroupReferenceListQuery, IamAccessGroupReferenceListResponse, IamAccessPolicyListQuery, IamAccessPolicyListResponse, IamAccessPolicyReadResponse, IamAuthenticationOidcCodeExchangeResponse, IamAuthenticationOidcProviderListResponse, IamAuthenticationOidcStartResponse, IamAuthenticationPasswordLoginResponse, IamAuthenticationPasswordPolicyReadResponse, IamAuthenticationPasswordResetCompleteResponse, IamAuthorizationAccessPolicyTargetListQuery, IamAuthorizationAccessPolicyTargetListResponse, IamIdentityProviderCallbackEndpointReadResponse, IamIdentityProviderListQuery, IamIdentityProviderListResponse, IamIdentityProviderReadResponse, IamIdentityProviderSecretReplaceResponse, IamIdentityProviderSecretRevokeResponse, IamRoleBindingListQuery, IamRoleBindingListResponse, IamRoleBindingReadResponse, IamRoleListResponse, IamRoleReadResponse, IamServiceAccountAccessGrantListQuery, IamServiceAccountAccessGrantListResponse, IamServiceAccountAccessKeyIssueResponse, IamServiceAccountAccessKeyListQuery, IamServiceAccountAccessKeyListResponse, IamServiceAccountAccessKeyRevokeResponse, IamServiceAccountCredentialRevokeResponse, IamServiceAccountListQuery, IamServiceAccountListResponse, IamServiceAccountReadResponse, IamServiceAccountReferenceListQuery, IamServiceAccountReferenceListResponse, IamTenantAccessCheckResponse, IamTenantAccessGenerateResponse, IamTenantAuthorizationExplainResponse, IamTenantIamStatusReadResponse, IamTenantRenameResponse, IamUserAccessGrantListQuery, IamUserAccessGrantListResponse, IamUserActivateResponse, IamUserActivationReissueResponse, IamUserCreateResponse, IamUserCredentialRevokeResponse, IamUserCurrentAccessGrantListQuery, IamUserCurrentAccessGrantListResponse, IamUserCurrentReadResponse, IamUserDisableResponse, IamUserEnableResponse, IamUserExternalIdentityDisableResponse, IamUserExternalIdentityLinkStartResponse, IamUserExternalIdentityListResponse, IamUserListQuery, IamUserListResponse, IamUserLogoutResponse, IamUserPasswordReplaceResponse, IamUserPasswordResetStartResponse, IamUserReadResponse, IamUserRemovalBlockerListQuery, IamUserRemovalBlockerListResponse, IamUserRetireResponse } from './types.js';
7
+ import type { AccessCredentialId, ActivateUserWithPasswordRequest, ChangeOwnPasswordRequest, CompletePasswordResetRequest, ExchangeOidcCodeRequest, PasswordLoginRequest } from "@aionixone/client-types/authn";
8
+ import type { ResourceUid } from "@aionixone/client-types/core";
9
+ import type { CheckAccessRequest, CreatePendingUserRequest, ExplainAuthorizationRequest, GenerateAccessRequest, IamUserMutationRequest, IssueServiceAccountAccessKeyRequest, RevokeIdentityProviderSecretRequest, RevokeServiceAccountAccessKeyRequest, RevokeServiceAccountCredentialsRequest, RotateIdentityProviderSecretRequest, StartExternalIdentityLinkRequest, StartIamOidcLoginRequest, UpdateIamTenantDisplayNameRequest } from "@aionixone/client-types/iam";
10
+
11
+ /** The `iam` service. */
12
+ export class IamService {
13
+ readonly accessGroup: IamAccessGroupResource;
14
+ readonly accessPolicy: IamAccessPolicyResource;
15
+ readonly authentication: IamAuthenticationResource;
16
+ readonly authorization: IamAuthorizationResource;
17
+ readonly identityProvider: IamIdentityProviderResource;
18
+ readonly role: IamRoleResource;
19
+ readonly roleBinding: IamRoleBindingResource;
20
+ readonly serviceAccount: IamServiceAccountResource;
21
+ readonly tenant: IamTenantResource;
22
+ readonly user: IamUserResource;
23
+
24
+ /** Not part of the public API: `AionixOne` constructs every service. */
25
+ constructor(engine: CallEngine) {
26
+ this.accessGroup = new IamAccessGroupResource(engine);
27
+ this.accessPolicy = new IamAccessPolicyResource(engine);
28
+ this.authentication = new IamAuthenticationResource(engine);
29
+ this.authorization = new IamAuthorizationResource(engine);
30
+ this.identityProvider = new IamIdentityProviderResource(engine);
31
+ this.role = new IamRoleResource(engine);
32
+ this.roleBinding = new IamRoleBindingResource(engine);
33
+ this.serviceAccount = new IamServiceAccountResource(engine);
34
+ this.tenant = new IamTenantResource(engine);
35
+ this.user = new IamUserResource(engine);
36
+ }
37
+ }
38
+
39
+ /** The `accessGroup` operations of the `iam` service. */
40
+ export class IamAccessGroupResource {
41
+ readonly #engine: CallEngine;
42
+
43
+ /** Not part of the public API. */
44
+ constructor(engine: CallEngine) {
45
+ this.#engine = engine;
46
+ }
47
+
48
+ /**
49
+ * List AccessGroup access grants
50
+ *
51
+ * List one bounded page of the access grants that apply to one AccessGroup
52
+ *
53
+ * Replay: has no effect; retried after an attempt with an unknown result.
54
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
55
+ *
56
+ * @param trn IAM resource TRN in the route path
57
+ * @param query The query, by wire names.
58
+ * @param options Call options.
59
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
60
+ */
61
+ accessGrantList(trn: string, query?: IamAccessGroupAccessGrantListQuery, options?: CallOptions): Promise<IamAccessGroupAccessGrantListResponse> {
62
+ return this.#engine.call<IamAccessGroupAccessGrantListResponse>(OPERATIONS.iam_access_group_access_grant_list, { path: withQuery(`/access-groups/${encodePathParam(trn)}/access-grants`, query), primaryResourceTrn: trn }, options);
63
+ }
64
+
65
+ /**
66
+ * Every item of `iam.access-group.access_grant_list`, page after page, starting from `query`.
67
+ * Each page is one call with its own time budget and retries.
68
+ *
69
+ * @param trn IAM resource TRN in the route path
70
+ * @param query The query of the first page; `limit` is the size of every page.
71
+ * @param options Call options of every page.
72
+ */
73
+ async *accessGrantListIter(trn: string, query?: IamAccessGroupAccessGrantListQuery, options?: CallOptions): AsyncGenerator<IamAccessGroupAccessGrantListResponse['page']['items'][number], void, undefined> {
74
+ let cursor = query?.cursor;
75
+ for (;;) {
76
+ const response = await this.accessGrantList(trn, { ...query, cursor }, options);
77
+ const page = response.page;
78
+ yield* page.items;
79
+ if (page.nextCursor == null) return;
80
+ cursor = page.nextCursor;
81
+ }
82
+ }
83
+
84
+ /**
85
+ * List AccessGroup resources
86
+ *
87
+ * List the tenant's reconciled AccessGroup occurrences.
88
+ *
89
+ * Replay: has no effect; retried after an attempt with an unknown result.
90
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantRevisionConflict`.
91
+ *
92
+ * @param query The query, by wire names.
93
+ * @param options Call options.
94
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
95
+ */
96
+ list(query?: IamAccessGroupListQuery, options?: CallOptions): Promise<IamAccessGroupListResponse> {
97
+ return this.#engine.call<IamAccessGroupListResponse>(OPERATIONS.iam_access_group_list, { path: withQuery(`/access-groups`, query) }, options);
98
+ }
99
+
100
+ /**
101
+ * Every item of `iam.access-group.list`, page after page, starting from `query`.
102
+ * Each page is one call with its own time budget and retries.
103
+ *
104
+ * @param query The query of the first page; `limit` is the size of every page.
105
+ * @param options Call options of every page.
106
+ */
107
+ async *listIter(query?: IamAccessGroupListQuery, options?: CallOptions): AsyncGenerator<IamAccessGroupListResponse['page']['items'][number], void, undefined> {
108
+ let cursor = query?.cursor;
109
+ for (;;) {
110
+ const response = await this.list({ ...query, cursor }, options);
111
+ const page = response.page;
112
+ yield* page.items;
113
+ if (page.nextCursor == null) return;
114
+ cursor = page.nextCursor;
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Read one AccessGroup
120
+ *
121
+ * Read one reconciled AccessGroup occurrence by TRN.
122
+ *
123
+ * Replay: has no effect; retried after an attempt with an unknown result.
124
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`.
125
+ *
126
+ * @param trn IAM resource TRN in the route path
127
+ * @param options Call options.
128
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
129
+ */
130
+ read(trn: string, options?: CallOptions): Promise<IamAccessGroupReadResponse> {
131
+ return this.#engine.call<IamAccessGroupReadResponse>(OPERATIONS.iam_access_group_read, { path: `/access-groups/${encodePathParam(trn)}`, primaryResourceTrn: trn }, options);
132
+ }
133
+
134
+ /**
135
+ * List AccessGroup references
136
+ *
137
+ * List one bounded page of the active references that name one AccessGroup; they do not block deleting it
138
+ *
139
+ * Replay: has no effect; retried after an attempt with an unknown result.
140
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
141
+ *
142
+ * @param trn IAM resource TRN in the route path
143
+ * @param query The query, by wire names.
144
+ * @param options Call options.
145
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
146
+ */
147
+ referenceList(trn: string, query?: IamAccessGroupReferenceListQuery, options?: CallOptions): Promise<IamAccessGroupReferenceListResponse> {
148
+ return this.#engine.call<IamAccessGroupReferenceListResponse>(OPERATIONS.iam_access_group_reference_list, { path: withQuery(`/access-groups/${encodePathParam(trn)}/references`, query), primaryResourceTrn: trn }, options);
149
+ }
150
+
151
+ /**
152
+ * Every item of `iam.access-group.reference_list`, page after page, starting from `query`.
153
+ * Each page is one call with its own time budget and retries.
154
+ *
155
+ * @param trn IAM resource TRN in the route path
156
+ * @param query The query of the first page; `limit` is the size of every page.
157
+ * @param options Call options of every page.
158
+ */
159
+ async *referenceListIter(trn: string, query?: IamAccessGroupReferenceListQuery, options?: CallOptions): AsyncGenerator<IamAccessGroupReferenceListResponse['page']['items'][number], void, undefined> {
160
+ let cursor = query?.cursor;
161
+ for (;;) {
162
+ const response = await this.referenceList(trn, { ...query, cursor }, options);
163
+ const page = response.page;
164
+ yield* page.items;
165
+ if (page.nextCursor == null) return;
166
+ cursor = page.nextCursor;
167
+ }
168
+ }
169
+ }
170
+
171
+ /** The `accessPolicy` operations of the `iam` service. */
172
+ export class IamAccessPolicyResource {
173
+ readonly #engine: CallEngine;
174
+
175
+ /** Not part of the public API. */
176
+ constructor(engine: CallEngine) {
177
+ this.#engine = engine;
178
+ }
179
+
180
+ /**
181
+ * List AccessPolicy resources
182
+ *
183
+ * List the tenant's reconciled AccessPolicy occurrences.
184
+ *
185
+ * Replay: has no effect; retried after an attempt with an unknown result.
186
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantRevisionConflict`.
187
+ *
188
+ * @param query The query, by wire names.
189
+ * @param options Call options.
190
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
191
+ */
192
+ list(query?: IamAccessPolicyListQuery, options?: CallOptions): Promise<IamAccessPolicyListResponse> {
193
+ return this.#engine.call<IamAccessPolicyListResponse>(OPERATIONS.iam_access_policy_list, { path: withQuery(`/access-policies`, query) }, options);
194
+ }
195
+
196
+ /**
197
+ * Every item of `iam.access-policy.list`, page after page, starting from `query`.
198
+ * Each page is one call with its own time budget and retries.
199
+ *
200
+ * @param query The query of the first page; `limit` is the size of every page.
201
+ * @param options Call options of every page.
202
+ */
203
+ async *listIter(query?: IamAccessPolicyListQuery, options?: CallOptions): AsyncGenerator<IamAccessPolicyListResponse['page']['items'][number], void, undefined> {
204
+ let cursor = query?.cursor;
205
+ for (;;) {
206
+ const response = await this.list({ ...query, cursor }, options);
207
+ const page = response.page;
208
+ yield* page.items;
209
+ if (page.nextCursor == null) return;
210
+ cursor = page.nextCursor;
211
+ }
212
+ }
213
+
214
+ /**
215
+ * Read one AccessPolicy
216
+ *
217
+ * Read one reconciled AccessPolicy occurrence by TRN.
218
+ *
219
+ * Replay: has no effect; retried after an attempt with an unknown result.
220
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`.
221
+ *
222
+ * @param trn IAM resource TRN in the route path
223
+ * @param options Call options.
224
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
225
+ */
226
+ read(trn: string, options?: CallOptions): Promise<IamAccessPolicyReadResponse> {
227
+ return this.#engine.call<IamAccessPolicyReadResponse>(OPERATIONS.iam_access_policy_read, { path: `/access-policies/${encodePathParam(trn)}`, primaryResourceTrn: trn }, options);
228
+ }
229
+ }
230
+
231
+ /** The `authentication` operations of the `iam` service. */
232
+ export class IamAuthenticationResource {
233
+ readonly #engine: CallEngine;
234
+
235
+ /** Not part of the public API. */
236
+ constructor(engine: CallEngine) {
237
+ this.#engine = engine;
238
+ }
239
+
240
+ /**
241
+ * Exchange OIDC authorization code
242
+ *
243
+ * Consume one browser-bound or PKCE-bound IAM authorization code and issue the canonical credential
244
+ *
245
+ * Replay: not declared; an attempt with an unknown result is not retried.
246
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamAuthenticationProofInvalid`, `Internal_RateLimited`, `Product_CapabilityUnavailable`.
247
+ *
248
+ * @param body The request body.
249
+ * @param options Call options.
250
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
251
+ */
252
+ oidcCodeExchange(body: ExchangeOidcCodeRequest, options?: CallOptions): Promise<IamAuthenticationOidcCodeExchangeResponse> {
253
+ return this.#engine.call<IamAuthenticationOidcCodeExchangeResponse>(OPERATIONS.iam_authentication_oidc_code_exchange, { path: `/authentication/oidc/code-exchange`, body }, options);
254
+ }
255
+
256
+ /**
257
+ * List OIDC login Providers
258
+ *
259
+ * List enabled human OIDC login Providers for one Tenant hint
260
+ *
261
+ * Replay: has no effect; retried after an attempt with an unknown result.
262
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`.
263
+ *
264
+ * @param tenantId Untrusted Tenant routing hint verified against IAM proof state
265
+ * @param options Call options.
266
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
267
+ */
268
+ oidcProviderList(tenantId: string, options?: CallOptions): Promise<IamAuthenticationOidcProviderListResponse> {
269
+ return this.#engine.call<IamAuthenticationOidcProviderListResponse>(OPERATIONS.iam_authentication_oidc_provider_list, { path: `/tenants/${encodePathParam(tenantId)}/authentication/oidc/providers` }, options);
270
+ }
271
+
272
+ /**
273
+ * Start OIDC login
274
+ *
275
+ * Create one purpose-bound human OIDC login attempt
276
+ *
277
+ * Replay: not declared; an attempt with an unknown result is not retried.
278
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamAuthenticationProofInvalid`, `Internal_RateLimited`, `Product_CapabilityUnavailable`.
279
+ *
280
+ * @param tenantId Untrusted Tenant routing hint verified against IAM proof state
281
+ * @param body The request body.
282
+ * @param options Call options.
283
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
284
+ */
285
+ oidcStart(tenantId: string, body: StartIamOidcLoginRequest, options?: CallOptions): Promise<IamAuthenticationOidcStartResponse> {
286
+ return this.#engine.call<IamAuthenticationOidcStartResponse>(OPERATIONS.iam_authentication_oidc_start, { path: `/tenants/${encodePathParam(tenantId)}/authentication/oidc/start`, body }, options);
287
+ }
288
+
289
+ /**
290
+ * Sign in with password
291
+ *
292
+ * Authenticate an active IAM User with its password
293
+ *
294
+ * Replay: not declared; an attempt with an unknown result is not retried.
295
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamAuthenticationProofInvalid`, `Auth_IamPasswordPolicyViolation`, `Internal_RateLimited`, `Product_CapabilityUnavailable`.
296
+ *
297
+ * @param tenantId Untrusted Tenant routing hint verified against IAM proof state
298
+ * @param body The request body.
299
+ * @param options Call options.
300
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
301
+ */
302
+ passwordLogin(tenantId: string, body: PasswordLoginRequest, options?: CallOptions): Promise<IamAuthenticationPasswordLoginResponse> {
303
+ return this.#engine.call<IamAuthenticationPasswordLoginResponse>(OPERATIONS.iam_authentication_password_login, { path: `/tenants/${encodePathParam(tenantId)}/authentication/password`, body }, options);
304
+ }
305
+
306
+ /**
307
+ * Read password policy
308
+ *
309
+ * Read the deployment password-policy bounds stated to password-authoring surfaces
310
+ *
311
+ * Replay: has no effect; retried after an attempt with an unknown result.
312
+ * Declared errors: `Internal_ServiceUnavailable`, `Internal_SystemError`.
313
+ *
314
+ * @param options Call options.
315
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
316
+ */
317
+ passwordPolicyRead(options?: CallOptions): Promise<IamAuthenticationPasswordPolicyReadResponse> {
318
+ return this.#engine.call<IamAuthenticationPasswordPolicyReadResponse>(OPERATIONS.iam_authentication_password_policy_read, { path: `/authentication/password-policy` }, options);
319
+ }
320
+
321
+ /**
322
+ * Complete password reset
323
+ *
324
+ * Consume a password-reset proof and replace the User authenticator
325
+ *
326
+ * Replay: not declared; an attempt with an unknown result is not retried.
327
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamAuthenticationProofInvalid`, `Auth_IamPasswordPolicyViolation`, `Internal_RateLimited`, `Product_CapabilityUnavailable`.
328
+ *
329
+ * @param tenantId Untrusted Tenant routing hint verified against IAM proof state
330
+ * @param body The request body.
331
+ * @param options Call options.
332
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
333
+ */
334
+ passwordResetComplete(tenantId: string, body: CompletePasswordResetRequest, options?: CallOptions): Promise<IamAuthenticationPasswordResetCompleteResponse> {
335
+ return this.#engine.call<IamAuthenticationPasswordResetCompleteResponse>(OPERATIONS.iam_authentication_password_reset_complete, { path: `/tenants/${encodePathParam(tenantId)}/authentication/password-reset`, body }, options);
336
+ }
337
+ }
338
+
339
+ /** The `authorization` operations of the `iam` service. */
340
+ export class IamAuthorizationResource {
341
+ readonly #engine: CallEngine;
342
+
343
+ /** Not part of the public API. */
344
+ constructor(engine: CallEngine) {
345
+ this.#engine = engine;
346
+ }
347
+
348
+ /**
349
+ * List AccessPolicy targets
350
+ *
351
+ * List the contract-derived AccessPolicy target catalog
352
+ *
353
+ * Replay: has no effect; retried after an attempt with an unknown result.
354
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`.
355
+ *
356
+ * @param query The query, by wire names.
357
+ * @param options Call options.
358
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
359
+ */
360
+ accessPolicyTargetList(query?: IamAuthorizationAccessPolicyTargetListQuery, options?: CallOptions): Promise<IamAuthorizationAccessPolicyTargetListResponse> {
361
+ return this.#engine.call<IamAuthorizationAccessPolicyTargetListResponse>(OPERATIONS.iam_authorization_access_policy_target_list, { path: withQuery(`/authorization/access-policy-targets`, query) }, options);
362
+ }
363
+
364
+ /**
365
+ * Every item of `iam.authorization.access_policy_target_list`, page after page, starting from `query`.
366
+ * Each page is one call with its own time budget and retries.
367
+ *
368
+ * @param query The query of the first page; `limit` is the size of every page.
369
+ * @param options Call options of every page.
370
+ */
371
+ async *accessPolicyTargetListIter(query?: IamAuthorizationAccessPolicyTargetListQuery, options?: CallOptions): AsyncGenerator<IamAuthorizationAccessPolicyTargetListResponse['page']['items'][number], void, undefined> {
372
+ let cursor = query?.cursor;
373
+ for (;;) {
374
+ const response = await this.accessPolicyTargetList({ ...query, cursor }, options);
375
+ const page = response.page;
376
+ yield* page.items;
377
+ if (page.nextCursor == null) return;
378
+ cursor = page.nextCursor;
379
+ }
380
+ }
381
+ }
382
+
383
+ /** The `identityProvider` operations of the `iam` service. */
384
+ export class IamIdentityProviderResource {
385
+ readonly #engine: CallEngine;
386
+
387
+ /** Not part of the public API. */
388
+ constructor(engine: CallEngine) {
389
+ this.#engine = engine;
390
+ }
391
+
392
+ /**
393
+ * Read the sign-in callback URL to register with identity providers
394
+ *
395
+ * Replay: has no effect; retried after an attempt with an unknown result.
396
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`.
397
+ *
398
+ * @param options Call options.
399
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
400
+ */
401
+ callbackEndpointRead(options?: CallOptions): Promise<IamIdentityProviderCallbackEndpointReadResponse> {
402
+ return this.#engine.call<IamIdentityProviderCallbackEndpointReadResponse>(OPERATIONS.iam_identity_provider_callback_endpoint_read, { path: `/identity-providers/callback-endpoint` }, options);
403
+ }
404
+
405
+ /**
406
+ * List IdentityProvider resources
407
+ *
408
+ * List the tenant's reconciled IdentityProvider occurrences.
409
+ *
410
+ * Replay: has no effect; retried after an attempt with an unknown result.
411
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantRevisionConflict`.
412
+ *
413
+ * @param query The query, by wire names.
414
+ * @param options Call options.
415
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
416
+ */
417
+ list(query?: IamIdentityProviderListQuery, options?: CallOptions): Promise<IamIdentityProviderListResponse> {
418
+ return this.#engine.call<IamIdentityProviderListResponse>(OPERATIONS.iam_identity_provider_list, { path: withQuery(`/identity-providers`, query) }, options);
419
+ }
420
+
421
+ /**
422
+ * Every item of `iam.identity-provider.list`, page after page, starting from `query`.
423
+ * Each page is one call with its own time budget and retries.
424
+ *
425
+ * @param query The query of the first page; `limit` is the size of every page.
426
+ * @param options Call options of every page.
427
+ */
428
+ async *listIter(query?: IamIdentityProviderListQuery, options?: CallOptions): AsyncGenerator<IamIdentityProviderListResponse['page']['items'][number], void, undefined> {
429
+ let cursor = query?.cursor;
430
+ for (;;) {
431
+ const response = await this.list({ ...query, cursor }, options);
432
+ const page = response.page;
433
+ yield* page.items;
434
+ if (page.nextCursor == null) return;
435
+ cursor = page.nextCursor;
436
+ }
437
+ }
438
+
439
+ /**
440
+ * Read one IdentityProvider
441
+ *
442
+ * Read one reconciled IdentityProvider occurrence by TRN.
443
+ *
444
+ * Replay: has no effect; retried after an attempt with an unknown result.
445
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`.
446
+ *
447
+ * @param trn IAM resource TRN in the route path
448
+ * @param options Call options.
449
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
450
+ */
451
+ read(trn: string, options?: CallOptions): Promise<IamIdentityProviderReadResponse> {
452
+ return this.#engine.call<IamIdentityProviderReadResponse>(OPERATIONS.iam_identity_provider_read, { path: `/identity-providers/${encodePathParam(trn)}`, primaryResourceTrn: trn }, options);
453
+ }
454
+
455
+ /**
456
+ * Replace IdentityProvider client secret
457
+ *
458
+ * Replace encrypted client-secret material for one exact IdentityProvider occurrence
459
+ *
460
+ * Replay: not declared; an attempt with an unknown result is not retried.
461
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Internal_PreconditionFailed`.
462
+ *
463
+ * @param trn IAM resource TRN in the route path
464
+ * @param body The request body.
465
+ * @param options Call options.
466
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
467
+ */
468
+ secretReplace(trn: string, body: RotateIdentityProviderSecretRequest, options?: CallOptions): Promise<IamIdentityProviderSecretReplaceResponse> {
469
+ return this.#engine.call<IamIdentityProviderSecretReplaceResponse>(OPERATIONS.iam_identity_provider_secret_replace, { path: `/identity-providers/${encodePathParam(trn)}/client-secret/replace`, body, primaryResourceTrn: trn }, options);
470
+ }
471
+
472
+ /**
473
+ * Revoke IdentityProvider client secret
474
+ *
475
+ * Revoke encrypted client-secret material for one exact IdentityProvider occurrence
476
+ *
477
+ * Replay: not declared; an attempt with an unknown result is not retried.
478
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Internal_PreconditionFailed`, `Auth_IamLastHumanAdmin`.
479
+ *
480
+ * @param trn IAM resource TRN in the route path
481
+ * @param body The request body.
482
+ * @param options Call options.
483
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
484
+ */
485
+ secretRevoke(trn: string, body: RevokeIdentityProviderSecretRequest, options?: CallOptions): Promise<IamIdentityProviderSecretRevokeResponse> {
486
+ return this.#engine.call<IamIdentityProviderSecretRevokeResponse>(OPERATIONS.iam_identity_provider_secret_revoke, { path: `/identity-providers/${encodePathParam(trn)}/client-secret/revoke`, body, primaryResourceTrn: trn }, options);
487
+ }
488
+ }
489
+
490
+ /** The `role` operations of the `iam` service. */
491
+ export class IamRoleResource {
492
+ readonly #engine: CallEngine;
493
+
494
+ /** Not part of the public API. */
495
+ constructor(engine: CallEngine) {
496
+ this.#engine = engine;
497
+ }
498
+
499
+ /**
500
+ * List system Roles
501
+ *
502
+ * List system Role definitions
503
+ *
504
+ * List the revisioned system Role catalog.
505
+ *
506
+ * Replay: has no effect; retried after an attempt with an unknown result.
507
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_SystemError`.
508
+ *
509
+ * @param options Call options.
510
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
511
+ */
512
+ list(options?: CallOptions): Promise<IamRoleListResponse> {
513
+ return this.#engine.call<IamRoleListResponse>(OPERATIONS.iam_role_list, { path: `/roles` }, options);
514
+ }
515
+
516
+ /**
517
+ * Read a system Role
518
+ *
519
+ * Read one system Role definition
520
+ *
521
+ * Read one immutable system Role definition by name.
522
+ *
523
+ * Replay: has no effect; retried after an attempt with an unknown result.
524
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_SystemError`, `Auth_RoleNotFound`.
525
+ *
526
+ * @param name System Role name such as tenant-admin or viewer
527
+ * @param options Call options.
528
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
529
+ */
530
+ read(name: string, options?: CallOptions): Promise<IamRoleReadResponse> {
531
+ return this.#engine.call<IamRoleReadResponse>(OPERATIONS.iam_role_read, { path: `/roles/${encodePathParam(name)}` }, options);
532
+ }
533
+ }
534
+
535
+ /** The `roleBinding` operations of the `iam` service. */
536
+ export class IamRoleBindingResource {
537
+ readonly #engine: CallEngine;
538
+
539
+ /** Not part of the public API. */
540
+ constructor(engine: CallEngine) {
541
+ this.#engine = engine;
542
+ }
543
+
544
+ /**
545
+ * List RoleBinding resources
546
+ *
547
+ * List the tenant's reconciled RoleBinding occurrences.
548
+ *
549
+ * Replay: has no effect; retried after an attempt with an unknown result.
550
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantRevisionConflict`.
551
+ *
552
+ * @param query The query, by wire names.
553
+ * @param options Call options.
554
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
555
+ */
556
+ list(query?: IamRoleBindingListQuery, options?: CallOptions): Promise<IamRoleBindingListResponse> {
557
+ return this.#engine.call<IamRoleBindingListResponse>(OPERATIONS.iam_role_binding_list, { path: withQuery(`/role-bindings`, query) }, options);
558
+ }
559
+
560
+ /**
561
+ * Every item of `iam.role-binding.list`, page after page, starting from `query`.
562
+ * Each page is one call with its own time budget and retries.
563
+ *
564
+ * @param query The query of the first page; `limit` is the size of every page.
565
+ * @param options Call options of every page.
566
+ */
567
+ async *listIter(query?: IamRoleBindingListQuery, options?: CallOptions): AsyncGenerator<IamRoleBindingListResponse['page']['items'][number], void, undefined> {
568
+ let cursor = query?.cursor;
569
+ for (;;) {
570
+ const response = await this.list({ ...query, cursor }, options);
571
+ const page = response.page;
572
+ yield* page.items;
573
+ if (page.nextCursor == null) return;
574
+ cursor = page.nextCursor;
575
+ }
576
+ }
577
+
578
+ /**
579
+ * Read one RoleBinding
580
+ *
581
+ * Read one reconciled RoleBinding occurrence by TRN.
582
+ *
583
+ * Replay: has no effect; retried after an attempt with an unknown result.
584
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`.
585
+ *
586
+ * @param trn IAM resource TRN in the route path
587
+ * @param options Call options.
588
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
589
+ */
590
+ read(trn: string, options?: CallOptions): Promise<IamRoleBindingReadResponse> {
591
+ return this.#engine.call<IamRoleBindingReadResponse>(OPERATIONS.iam_role_binding_read, { path: `/role-bindings/${encodePathParam(trn)}`, primaryResourceTrn: trn }, options);
592
+ }
593
+ }
594
+
595
+ /** The `serviceAccount` operations of the `iam` service. */
596
+ export class IamServiceAccountResource {
597
+ readonly #engine: CallEngine;
598
+
599
+ /** Not part of the public API. */
600
+ constructor(engine: CallEngine) {
601
+ this.#engine = engine;
602
+ }
603
+
604
+ /**
605
+ * List ServiceAccount access grants
606
+ *
607
+ * List one bounded page of the access grants that apply to one ServiceAccount
608
+ *
609
+ * Replay: has no effect; retried after an attempt with an unknown result.
610
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
611
+ *
612
+ * @param trn IAM resource TRN in the route path
613
+ * @param query The query, by wire names.
614
+ * @param options Call options.
615
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
616
+ */
617
+ accessGrantList(trn: string, query?: IamServiceAccountAccessGrantListQuery, options?: CallOptions): Promise<IamServiceAccountAccessGrantListResponse> {
618
+ return this.#engine.call<IamServiceAccountAccessGrantListResponse>(OPERATIONS.iam_service_account_access_grant_list, { path: withQuery(`/service-accounts/${encodePathParam(trn)}/access-grants`, query), primaryResourceTrn: trn }, options);
619
+ }
620
+
621
+ /**
622
+ * Every item of `iam.service-account.access_grant_list`, page after page, starting from `query`.
623
+ * Each page is one call with its own time budget and retries.
624
+ *
625
+ * @param trn IAM resource TRN in the route path
626
+ * @param query The query of the first page; `limit` is the size of every page.
627
+ * @param options Call options of every page.
628
+ */
629
+ async *accessGrantListIter(trn: string, query?: IamServiceAccountAccessGrantListQuery, options?: CallOptions): AsyncGenerator<IamServiceAccountAccessGrantListResponse['page']['items'][number], void, undefined> {
630
+ let cursor = query?.cursor;
631
+ for (;;) {
632
+ const response = await this.accessGrantList(trn, { ...query, cursor }, options);
633
+ const page = response.page;
634
+ yield* page.items;
635
+ if (page.nextCursor == null) return;
636
+ cursor = page.nextCursor;
637
+ }
638
+ }
639
+
640
+ /**
641
+ * Issue one ServiceAccount access key
642
+ *
643
+ * Issue service account access key
644
+ *
645
+ * Create one canonical IAM credential for an exact ServiceAccount occurrence and disclose its bearer secret once.
646
+ *
647
+ * Replay: not declared; an attempt with an unknown result is not retried.
648
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamResourceNotFound`, `Auth_AuthProtectedResource`, `Auth_IamTenantRevisionConflict`, `Internal_PreconditionFailed`, `Product_CapabilityUnavailable`.
649
+ *
650
+ * @param trn IAM resource TRN in the route path
651
+ * @param body The request body.
652
+ * @param options Call options.
653
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
654
+ */
655
+ accessKeyIssue(trn: string, body: IssueServiceAccountAccessKeyRequest, options?: CallOptions): Promise<IamServiceAccountAccessKeyIssueResponse> {
656
+ return this.#engine.call<IamServiceAccountAccessKeyIssueResponse>(OPERATIONS.iam_service_account_access_key_issue, { path: `/service-accounts/${encodePathParam(trn)}/access-keys`, body, primaryResourceTrn: trn }, options);
657
+ }
658
+
659
+ /**
660
+ * List ServiceAccount access keys
661
+ *
662
+ * List non-secret access-key metadata for one ServiceAccount occurrence
663
+ *
664
+ * List non-secret credential metadata for the current ServiceAccount occurrence.
665
+ *
666
+ * Replay: has no effect; retried after an attempt with an unknown result.
667
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`.
668
+ *
669
+ * @param trn IAM ServiceAccount TRN in the route path
670
+ * @param query The query, by wire names.
671
+ * @param options Call options.
672
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
673
+ */
674
+ accessKeyList(trn: string, query?: IamServiceAccountAccessKeyListQuery, options?: CallOptions): Promise<IamServiceAccountAccessKeyListResponse> {
675
+ return this.#engine.call<IamServiceAccountAccessKeyListResponse>(OPERATIONS.iam_service_account_access_key_list, { path: withQuery(`/service-accounts/${encodePathParam(trn)}/access-keys`, query), primaryResourceTrn: trn }, options);
676
+ }
677
+
678
+ /**
679
+ * Every item of `iam.service-account.access_key_list`, page after page, starting from `query`.
680
+ * Each page is one call with its own time budget and retries.
681
+ *
682
+ * @param trn IAM ServiceAccount TRN in the route path
683
+ * @param query The query of the first page; `limit` is the size of every page.
684
+ * @param options Call options of every page.
685
+ */
686
+ async *accessKeyListIter(trn: string, query?: IamServiceAccountAccessKeyListQuery, options?: CallOptions): AsyncGenerator<IamServiceAccountAccessKeyListResponse['items'][number], void, undefined> {
687
+ let offset = query?.offset ?? 0;
688
+ for (;;) {
689
+ const response = await this.accessKeyList(trn, { ...query, offset }, options);
690
+ const page = response;
691
+ yield* page.items;
692
+ if (!page.hasMore) return;
693
+ offset += page.items.length;
694
+ }
695
+ }
696
+
697
+ /**
698
+ * Revoke one ServiceAccount access key
699
+ *
700
+ * Revoke service account access key
701
+ *
702
+ * Irreversibly revoke one canonical IAM credential without returning its secret.
703
+ *
704
+ * Replay: repeating it has no further effect; retried after an attempt with an unknown result.
705
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamResourceNotFound`, `Auth_AuthProtectedResource`, `Auth_IamTenantRevisionConflict`, `Internal_PreconditionFailed`, `Product_CapabilityUnavailable`.
706
+ *
707
+ * @param trn IAM ServiceAccount TRN in the route path
708
+ * @param credentialId Non-secret IAM access credential selector
709
+ * @param body The request body.
710
+ * @param options Call options.
711
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
712
+ */
713
+ accessKeyRevoke(trn: string, credentialId: AccessCredentialId, body: RevokeServiceAccountAccessKeyRequest, options?: CallOptions): Promise<IamServiceAccountAccessKeyRevokeResponse> {
714
+ return this.#engine.call<IamServiceAccountAccessKeyRevokeResponse>(OPERATIONS.iam_service_account_access_key_revoke, { path: `/service-accounts/${encodePathParam(trn)}/access-keys/${encodePathParam(credentialId)}/revoke`, body, primaryResourceTrn: trn }, options);
715
+ }
716
+
717
+ /**
718
+ * Revoke ServiceAccount credentials
719
+ *
720
+ * Revoke service account credentials
721
+ *
722
+ * Advance the security epoch of one exact ServiceAccount occurrence; the client supplies its ResourceUid, never an epoch.
723
+ *
724
+ * Replay: not declared; an attempt with an unknown result is not retried.
725
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamResourceNotFound`, `Auth_AuthProtectedResource`, `Auth_IamTenantRevisionConflict`, `Internal_PreconditionFailed`, `Product_CapabilityUnavailable`.
726
+ *
727
+ * @param trn IAM resource TRN in the route path
728
+ * @param body The request body.
729
+ * @param options Call options.
730
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
731
+ */
732
+ credentialRevoke(trn: string, body: RevokeServiceAccountCredentialsRequest, options?: CallOptions): Promise<IamServiceAccountCredentialRevokeResponse> {
733
+ return this.#engine.call<IamServiceAccountCredentialRevokeResponse>(OPERATIONS.iam_service_account_credential_revoke, { path: `/service-accounts/${encodePathParam(trn)}/credentials/revoke`, body, primaryResourceTrn: trn }, options);
734
+ }
735
+
736
+ /**
737
+ * List ServiceAccount resources
738
+ *
739
+ * List the tenant's reconciled ServiceAccount occurrences.
740
+ *
741
+ * Replay: has no effect; retried after an attempt with an unknown result.
742
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantRevisionConflict`.
743
+ *
744
+ * @param query The query, by wire names.
745
+ * @param options Call options.
746
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
747
+ */
748
+ list(query?: IamServiceAccountListQuery, options?: CallOptions): Promise<IamServiceAccountListResponse> {
749
+ return this.#engine.call<IamServiceAccountListResponse>(OPERATIONS.iam_service_account_list, { path: withQuery(`/service-accounts`, query) }, options);
750
+ }
751
+
752
+ /**
753
+ * Every item of `iam.service-account.list`, page after page, starting from `query`.
754
+ * Each page is one call with its own time budget and retries.
755
+ *
756
+ * @param query The query of the first page; `limit` is the size of every page.
757
+ * @param options Call options of every page.
758
+ */
759
+ async *listIter(query?: IamServiceAccountListQuery, options?: CallOptions): AsyncGenerator<IamServiceAccountListResponse['page']['items'][number], void, undefined> {
760
+ let cursor = query?.cursor;
761
+ for (;;) {
762
+ const response = await this.list({ ...query, cursor }, options);
763
+ const page = response.page;
764
+ yield* page.items;
765
+ if (page.nextCursor == null) return;
766
+ cursor = page.nextCursor;
767
+ }
768
+ }
769
+
770
+ /**
771
+ * Read one ServiceAccount
772
+ *
773
+ * Read one reconciled ServiceAccount occurrence by TRN.
774
+ *
775
+ * Replay: has no effect; retried after an attempt with an unknown result.
776
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`.
777
+ *
778
+ * @param trn IAM resource TRN in the route path
779
+ * @param options Call options.
780
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
781
+ */
782
+ read(trn: string, options?: CallOptions): Promise<IamServiceAccountReadResponse> {
783
+ return this.#engine.call<IamServiceAccountReadResponse>(OPERATIONS.iam_service_account_read, { path: `/service-accounts/${encodePathParam(trn)}`, primaryResourceTrn: trn }, options);
784
+ }
785
+
786
+ /**
787
+ * List ServiceAccount references
788
+ *
789
+ * List one bounded page of the active references that name one ServiceAccount; they do not block deleting it
790
+ *
791
+ * Replay: has no effect; retried after an attempt with an unknown result.
792
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
793
+ *
794
+ * @param trn IAM resource TRN in the route path
795
+ * @param query The query, by wire names.
796
+ * @param options Call options.
797
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
798
+ */
799
+ referenceList(trn: string, query?: IamServiceAccountReferenceListQuery, options?: CallOptions): Promise<IamServiceAccountReferenceListResponse> {
800
+ return this.#engine.call<IamServiceAccountReferenceListResponse>(OPERATIONS.iam_service_account_reference_list, { path: withQuery(`/service-accounts/${encodePathParam(trn)}/references`, query), primaryResourceTrn: trn }, options);
801
+ }
802
+
803
+ /**
804
+ * Every item of `iam.service-account.reference_list`, page after page, starting from `query`.
805
+ * Each page is one call with its own time budget and retries.
806
+ *
807
+ * @param trn IAM resource TRN in the route path
808
+ * @param query The query of the first page; `limit` is the size of every page.
809
+ * @param options Call options of every page.
810
+ */
811
+ async *referenceListIter(trn: string, query?: IamServiceAccountReferenceListQuery, options?: CallOptions): AsyncGenerator<IamServiceAccountReferenceListResponse['page']['items'][number], void, undefined> {
812
+ let cursor = query?.cursor;
813
+ for (;;) {
814
+ const response = await this.referenceList(trn, { ...query, cursor }, options);
815
+ const page = response.page;
816
+ yield* page.items;
817
+ if (page.nextCursor == null) return;
818
+ cursor = page.nextCursor;
819
+ }
820
+ }
821
+ }
822
+
823
+ /** The `tenant` operations of the `iam` service. */
824
+ export class IamTenantResource {
825
+ readonly #engine: CallEngine;
826
+
827
+ /** Not part of the public API. */
828
+ constructor(engine: CallEngine) {
829
+ this.#engine = engine;
830
+ }
831
+
832
+ /**
833
+ * Check service account access
834
+ *
835
+ * Check what one ServiceAccount is currently allowed against a list of requirements
836
+ *
837
+ * Check what one ServiceAccount is currently allowed against a list of operations and targets, through the same evaluator real authorization uses.
838
+ *
839
+ * Replay: has no effect; retried after an attempt with an unknown result.
840
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamTenantNotInitialized`.
841
+ *
842
+ * @param body The request body.
843
+ * @param options Call options.
844
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
845
+ */
846
+ accessCheck(body: CheckAccessRequest, options?: CallOptions): Promise<IamTenantAccessCheckResponse> {
847
+ return this.#engine.call<IamTenantAccessCheckResponse>(OPERATIONS.iam_tenant_access_check, { path: `/iam/access/check`, body }, options);
848
+ }
849
+
850
+ /**
851
+ * Generate service account access
852
+ *
853
+ * Calculate the account and access policy drafts for a list of requirements
854
+ *
855
+ * Calculate the account and access policy drafts for a list of requirements. Writes nothing; apply the drafts through the existing resource path with their preconditions.
856
+ *
857
+ * Replay: has no effect; retried after an attempt with an unknown result.
858
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamTenantNotInitialized`.
859
+ *
860
+ * @param body The request body.
861
+ * @param options Call options.
862
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
863
+ */
864
+ accessGenerate(body: GenerateAccessRequest, options?: CallOptions): Promise<IamTenantAccessGenerateResponse> {
865
+ return this.#engine.call<IamTenantAccessGenerateResponse>(OPERATIONS.iam_tenant_access_generate, { path: `/iam/access/generate`, body }, options);
866
+ }
867
+
868
+ /**
869
+ * Explain current authorization
870
+ *
871
+ * Explain the authenticated caller's current authorization
872
+ *
873
+ * Explain the authenticated caller's current authorization for one operation and target; no caller-selected principal or snapshot is accepted.
874
+ *
875
+ * Replay: has no effect; retried after an attempt with an unknown result.
876
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamTenantNotInitialized`.
877
+ *
878
+ * @param body The request body.
879
+ * @param options Call options.
880
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
881
+ */
882
+ authorizationExplain(body: ExplainAuthorizationRequest, options?: CallOptions): Promise<IamTenantAuthorizationExplainResponse> {
883
+ return this.#engine.call<IamTenantAuthorizationExplainResponse>(OPERATIONS.iam_tenant_authorization_explain, { path: `/iam/explain`, body }, options);
884
+ }
885
+
886
+ /**
887
+ * Read IAM snapshot status
888
+ *
889
+ * Read the complete current IAM snapshot observation for audit and operations. Never a write precondition.
890
+ *
891
+ * Replay: has no effect; retried after an attempt with an unknown result.
892
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantNotInitialized`.
893
+ *
894
+ * @param options Call options.
895
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
896
+ */
897
+ iamStatusRead(options?: CallOptions): Promise<IamTenantIamStatusReadResponse> {
898
+ return this.#engine.call<IamTenantIamStatusReadResponse>(OPERATIONS.iam_tenant_iam_status_read, { path: `/iam/status` }, options);
899
+ }
900
+
901
+ /**
902
+ * Rename tenant
903
+ *
904
+ * Replay: not idempotent; an attempt answered with `Internal_IdempotencyKeyReused` did not run.
905
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Internal_IdempotencyKeyReused`.
906
+ *
907
+ * @param body The request body.
908
+ * @param options Call options.
909
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
910
+ */
911
+ rename(body: UpdateIamTenantDisplayNameRequest, options?: KeyedCallOptions): Promise<IamTenantRenameResponse> {
912
+ return this.#engine.call<IamTenantRenameResponse>(OPERATIONS.iam_tenant_rename, { path: `/tenant/display-name`, body }, options);
913
+ }
914
+ }
915
+
916
+ /** The `user` operations of the `iam` service. */
917
+ export class IamUserResource {
918
+ readonly #engine: CallEngine;
919
+
920
+ /** Not part of the public API. */
921
+ constructor(engine: CallEngine) {
922
+ this.#engine = engine;
923
+ }
924
+
925
+ /**
926
+ * List IAM User access grants
927
+ *
928
+ * List one bounded page of the access grants that apply to one IAM User
929
+ *
930
+ * Replay: has no effect; retried after an attempt with an unknown result.
931
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
932
+ *
933
+ * @param trn IAM User TRN in the route path
934
+ * @param query The query, by wire names.
935
+ * @param options Call options.
936
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
937
+ */
938
+ accessGrantList(trn: string, query?: IamUserAccessGrantListQuery, options?: CallOptions): Promise<IamUserAccessGrantListResponse> {
939
+ return this.#engine.call<IamUserAccessGrantListResponse>(OPERATIONS.iam_user_access_grant_list, { path: withQuery(`/users/${encodePathParam(trn)}/access-grants`, query), primaryResourceTrn: trn }, options);
940
+ }
941
+
942
+ /**
943
+ * Every item of `iam.user.access_grant_list`, page after page, starting from `query`.
944
+ * Each page is one call with its own time budget and retries.
945
+ *
946
+ * @param trn IAM User TRN in the route path
947
+ * @param query The query of the first page; `limit` is the size of every page.
948
+ * @param options Call options of every page.
949
+ */
950
+ async *accessGrantListIter(trn: string, query?: IamUserAccessGrantListQuery, options?: CallOptions): AsyncGenerator<IamUserAccessGrantListResponse['page']['items'][number], void, undefined> {
951
+ let cursor = query?.cursor;
952
+ for (;;) {
953
+ const response = await this.accessGrantList(trn, { ...query, cursor }, options);
954
+ const page = response.page;
955
+ yield* page.items;
956
+ if (page.nextCursor == null) return;
957
+ cursor = page.nextCursor;
958
+ }
959
+ }
960
+
961
+ /**
962
+ * Activate IAM User
963
+ *
964
+ * Consume an activation proof and activate one pending IAM User
965
+ *
966
+ * Replay: not declared; an attempt with an unknown result is not retried.
967
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamAuthenticationProofInvalid`, `Auth_IamPasswordPolicyViolation`, `Internal_RateLimited`, `Product_CapabilityUnavailable`.
968
+ *
969
+ * @param tenantId Untrusted Tenant routing hint verified against IAM proof state
970
+ * @param body The request body.
971
+ * @param options Call options.
972
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
973
+ */
974
+ activate(tenantId: string, body: ActivateUserWithPasswordRequest, options?: CallOptions): Promise<IamUserActivateResponse> {
975
+ return this.#engine.call<IamUserActivateResponse>(OPERATIONS.iam_user_activate, { path: `/tenants/${encodePathParam(tenantId)}/authentication/activation/password`, body }, options);
976
+ }
977
+
978
+ /**
979
+ * Reissue IAM User activation
980
+ *
981
+ * Reissue user activation
982
+ *
983
+ * Replay: not declared; an attempt with an unknown result is not retried.
984
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamUserStateConflict`, `Internal_PreconditionFailed`, `Internal_IdempotencyKeyReused`.
985
+ *
986
+ * @param trn IAM User TRN in the route path
987
+ * @param body The request body.
988
+ * @param options Call options.
989
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
990
+ */
991
+ activationReissue(trn: string, body: IamUserMutationRequest, options?: CallOptions): Promise<IamUserActivationReissueResponse> {
992
+ return this.#engine.call<IamUserActivationReissueResponse>(OPERATIONS.iam_user_activation_reissue, { path: `/users/${encodePathParam(trn)}/activation/reissue`, body, primaryResourceTrn: trn }, options);
993
+ }
994
+
995
+ /**
996
+ * Create pending IAM User
997
+ *
998
+ * Create pending user
999
+ *
1000
+ * Replay: not declared; an attempt with an unknown result is not retried.
1001
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_UserAlreadyExists`, `Auth_IamTenantRevisionConflict`, `Internal_IdempotencyKeyReused`, `License_UserCapacityExceeded`.
1002
+ *
1003
+ * @param body The request body.
1004
+ * @param options Call options.
1005
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1006
+ */
1007
+ create(body: CreatePendingUserRequest, options?: CallOptions): Promise<IamUserCreateResponse> {
1008
+ return this.#engine.call<IamUserCreateResponse>(OPERATIONS.iam_user_create, { path: `/users`, body }, options);
1009
+ }
1010
+
1011
+ /**
1012
+ * Revoke IAM User credentials
1013
+ *
1014
+ * Revoke user credentials
1015
+ *
1016
+ * Replay: not declared; an attempt with an unknown result is not retried.
1017
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamUserStateConflict`, `Internal_PreconditionFailed`, `Internal_IdempotencyKeyReused`.
1018
+ *
1019
+ * @param trn IAM User TRN in the route path
1020
+ * @param body The request body.
1021
+ * @param options Call options.
1022
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1023
+ */
1024
+ credentialRevoke(trn: string, body: IamUserMutationRequest, options?: CallOptions): Promise<IamUserCredentialRevokeResponse> {
1025
+ return this.#engine.call<IamUserCredentialRevokeResponse>(OPERATIONS.iam_user_credential_revoke, { path: `/users/${encodePathParam(trn)}/credentials/revoke`, body, primaryResourceTrn: trn }, options);
1026
+ }
1027
+
1028
+ /**
1029
+ * List current IAM User access grants
1030
+ *
1031
+ * List one bounded page of the access grants that apply to the authenticated IAM User
1032
+ *
1033
+ * Replay: has no effect; retried after an attempt with an unknown result.
1034
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
1035
+ *
1036
+ * @param query The query, by wire names.
1037
+ * @param options Call options.
1038
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1039
+ */
1040
+ currentAccessGrantList(query?: IamUserCurrentAccessGrantListQuery, options?: CallOptions): Promise<IamUserCurrentAccessGrantListResponse> {
1041
+ return this.#engine.call<IamUserCurrentAccessGrantListResponse>(OPERATIONS.iam_user_current_access_grant_list, { path: withQuery(`/users/current/access-grants`, query) }, options);
1042
+ }
1043
+
1044
+ /**
1045
+ * Every item of `iam.user.current_access_grant_list`, page after page, starting from `query`.
1046
+ * Each page is one call with its own time budget and retries.
1047
+ *
1048
+ * @param query The query of the first page; `limit` is the size of every page.
1049
+ * @param options Call options of every page.
1050
+ */
1051
+ async *currentAccessGrantListIter(query?: IamUserCurrentAccessGrantListQuery, options?: CallOptions): AsyncGenerator<IamUserCurrentAccessGrantListResponse['page']['items'][number], void, undefined> {
1052
+ let cursor = query?.cursor;
1053
+ for (;;) {
1054
+ const response = await this.currentAccessGrantList({ ...query, cursor }, options);
1055
+ const page = response.page;
1056
+ yield* page.items;
1057
+ if (page.nextCursor == null) return;
1058
+ cursor = page.nextCursor;
1059
+ }
1060
+ }
1061
+
1062
+ /**
1063
+ * Read current IAM User
1064
+ *
1065
+ * Read the authenticated IAM User
1066
+ *
1067
+ * Replay: has no effect; retried after an attempt with an unknown result.
1068
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`.
1069
+ *
1070
+ * @param options Call options.
1071
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1072
+ */
1073
+ currentRead(options?: CallOptions): Promise<IamUserCurrentReadResponse> {
1074
+ return this.#engine.call<IamUserCurrentReadResponse>(OPERATIONS.iam_user_current_read, { path: `/users/current` }, options);
1075
+ }
1076
+
1077
+ /**
1078
+ * Disable IAM User
1079
+ *
1080
+ * Disable user
1081
+ *
1082
+ * Replay: not declared; an attempt with an unknown result is not retried.
1083
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamUserStateConflict`, `Auth_IamLastHumanAdmin`, `Auth_IamTenantRevisionConflict`, `Internal_PreconditionFailed`, `Internal_IdempotencyKeyReused`, `License_UserCapacityExceeded`.
1084
+ *
1085
+ * @param trn IAM User TRN in the route path
1086
+ * @param body The request body.
1087
+ * @param options Call options.
1088
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1089
+ */
1090
+ disable(trn: string, body: IamUserMutationRequest, options?: CallOptions): Promise<IamUserDisableResponse> {
1091
+ return this.#engine.call<IamUserDisableResponse>(OPERATIONS.iam_user_disable, { path: `/users/${encodePathParam(trn)}/disable`, body, primaryResourceTrn: trn }, options);
1092
+ }
1093
+
1094
+ /**
1095
+ * Enable IAM User
1096
+ *
1097
+ * Enable user
1098
+ *
1099
+ * Replay: not declared; an attempt with an unknown result is not retried.
1100
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamUserStateConflict`, `Auth_IamLastHumanAdmin`, `Auth_IamTenantRevisionConflict`, `Internal_PreconditionFailed`, `Internal_IdempotencyKeyReused`, `License_UserCapacityExceeded`.
1101
+ *
1102
+ * @param trn IAM User TRN in the route path
1103
+ * @param body The request body.
1104
+ * @param options Call options.
1105
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1106
+ */
1107
+ enable(trn: string, body: IamUserMutationRequest, options?: CallOptions): Promise<IamUserEnableResponse> {
1108
+ return this.#engine.call<IamUserEnableResponse>(OPERATIONS.iam_user_enable, { path: `/users/${encodePathParam(trn)}/enable`, body, primaryResourceTrn: trn }, options);
1109
+ }
1110
+
1111
+ /**
1112
+ * Disable external identity
1113
+ *
1114
+ * Irreversibly disable one proof-created ExternalUserBinding occurrence
1115
+ *
1116
+ * Replay: repeating it has no further effect; retried after an attempt with an unknown result.
1117
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_UserNotFound`, `Auth_IamResourceNotFound`, `Auth_IamLastHumanAdmin`, `Internal_PreconditionFailed`.
1118
+ *
1119
+ * @param trn IAM User TRN in the route path
1120
+ * @param bindingResourceUid Non-reusable ExternalUserBinding occurrence identifier
1121
+ * @param options Call options.
1122
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1123
+ */
1124
+ externalIdentityDisable(trn: string, bindingResourceUid: ResourceUid, options?: CallOptions): Promise<IamUserExternalIdentityDisableResponse> {
1125
+ return this.#engine.call<IamUserExternalIdentityDisableResponse>(OPERATIONS.iam_user_external_identity_disable, { path: `/users/${encodePathParam(trn)}/external-identities/${encodePathParam(bindingResourceUid)}/disable`, primaryResourceTrn: trn }, options);
1126
+ }
1127
+
1128
+ /**
1129
+ * Start external identity link
1130
+ *
1131
+ * Start one proof-bound OIDC link attempt for an exact IAM User occurrence
1132
+ *
1133
+ * Replay: not declared; an attempt with an unknown result is not retried.
1134
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_UserNotFound`, `Auth_IamResourceNotFound`, `Auth_IamAuthenticationProofInvalid`, `Internal_RateLimited`.
1135
+ *
1136
+ * @param trn IAM User TRN in the route path
1137
+ * @param body The request body.
1138
+ * @param options Call options.
1139
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1140
+ */
1141
+ externalIdentityLinkStart(trn: string, body: StartExternalIdentityLinkRequest, options?: CallOptions): Promise<IamUserExternalIdentityLinkStartResponse> {
1142
+ return this.#engine.call<IamUserExternalIdentityLinkStartResponse>(OPERATIONS.iam_user_external_identity_link_start, { path: `/users/${encodePathParam(trn)}/external-identities/oidc/link`, body, primaryResourceTrn: trn }, options);
1143
+ }
1144
+
1145
+ /**
1146
+ * List external identities
1147
+ *
1148
+ * List proof-created external identities for one exact IAM User
1149
+ *
1150
+ * Replay: has no effect; retried after an attempt with an unknown result.
1151
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_UserNotFound`.
1152
+ *
1153
+ * @param trn IAM User TRN in the route path
1154
+ * @param options Call options.
1155
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1156
+ */
1157
+ externalIdentityList(trn: string, options?: CallOptions): Promise<IamUserExternalIdentityListResponse> {
1158
+ return this.#engine.call<IamUserExternalIdentityListResponse>(OPERATIONS.iam_user_external_identity_list, { path: `/users/${encodePathParam(trn)}/external-identities`, primaryResourceTrn: trn }, options);
1159
+ }
1160
+
1161
+ /**
1162
+ * List IAM Users
1163
+ *
1164
+ * List one bounded page of managed IAM Users
1165
+ *
1166
+ * Replay: has no effect; retried after an attempt with an unknown result.
1167
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamTenantRevisionConflict`.
1168
+ *
1169
+ * @param query The query, by wire names.
1170
+ * @param options Call options.
1171
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1172
+ */
1173
+ list(query?: IamUserListQuery, options?: CallOptions): Promise<IamUserListResponse> {
1174
+ return this.#engine.call<IamUserListResponse>(OPERATIONS.iam_user_list, { path: withQuery(`/users`, query) }, options);
1175
+ }
1176
+
1177
+ /**
1178
+ * Every item of `iam.user.list`, page after page, starting from `query`.
1179
+ * Each page is one call with its own time budget and retries.
1180
+ *
1181
+ * @param query The query of the first page; `limit` is the size of every page.
1182
+ * @param options Call options of every page.
1183
+ */
1184
+ async *listIter(query?: IamUserListQuery, options?: CallOptions): AsyncGenerator<IamUserListResponse['page']['items'][number], void, undefined> {
1185
+ let cursor = query?.cursor;
1186
+ for (;;) {
1187
+ const response = await this.list({ ...query, cursor }, options);
1188
+ const page = response.page;
1189
+ yield* page.items;
1190
+ if (page.nextCursor == null) return;
1191
+ cursor = page.nextCursor;
1192
+ }
1193
+ }
1194
+
1195
+ /**
1196
+ * Sign out
1197
+ *
1198
+ * Revoke the authenticated User's current IAM credential
1199
+ *
1200
+ * Replay: not declared; an attempt with an unknown result is not retried.
1201
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamAuthenticationProofInvalid`.
1202
+ *
1203
+ * @param options Call options.
1204
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1205
+ */
1206
+ logout(options?: CallOptions): Promise<IamUserLogoutResponse> {
1207
+ return this.#engine.call<IamUserLogoutResponse>(OPERATIONS.iam_user_logout, { path: `/users/current/logout` }, options);
1208
+ }
1209
+
1210
+ /**
1211
+ * Change password
1212
+ *
1213
+ * Replace the authenticated User password and its current credential
1214
+ *
1215
+ * Replay: not declared; an attempt with an unknown result is not retried.
1216
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamAuthenticationProofInvalid`, `Auth_IamPasswordPolicyViolation`, `Internal_RateLimited`, `Product_CapabilityUnavailable`.
1217
+ *
1218
+ * @param body The request body.
1219
+ * @param options Call options.
1220
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1221
+ */
1222
+ passwordReplace(body: ChangeOwnPasswordRequest, options?: CallOptions): Promise<IamUserPasswordReplaceResponse> {
1223
+ return this.#engine.call<IamUserPasswordReplaceResponse>(OPERATIONS.iam_user_password_replace, { path: `/users/current/password`, body }, options);
1224
+ }
1225
+
1226
+ /**
1227
+ * Start password reset
1228
+ *
1229
+ * Request user password reset
1230
+ *
1231
+ * Replay: not declared; an attempt with an unknown result is not retried.
1232
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamUserStateConflict`, `Internal_PreconditionFailed`, `Internal_IdempotencyKeyReused`.
1233
+ *
1234
+ * @param trn IAM User TRN in the route path
1235
+ * @param body The request body.
1236
+ * @param options Call options.
1237
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1238
+ */
1239
+ passwordResetStart(trn: string, body: IamUserMutationRequest, options?: CallOptions): Promise<IamUserPasswordResetStartResponse> {
1240
+ return this.#engine.call<IamUserPasswordResetStartResponse>(OPERATIONS.iam_user_password_reset_start, { path: `/users/${encodePathParam(trn)}/password-reset`, body, primaryResourceTrn: trn }, options);
1241
+ }
1242
+
1243
+ /**
1244
+ * Read IAM User
1245
+ *
1246
+ * Read one exact managed IAM User
1247
+ *
1248
+ * Replay: has no effect; retried after an attempt with an unknown result.
1249
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_UserNotFound`, `Auth_IamTenantRevisionConflict`.
1250
+ *
1251
+ * @param trn IAM User TRN in the route path
1252
+ * @param options Call options.
1253
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1254
+ */
1255
+ read(trn: string, options?: CallOptions): Promise<IamUserReadResponse> {
1256
+ return this.#engine.call<IamUserReadResponse>(OPERATIONS.iam_user_read, { path: `/users/${encodePathParam(trn)}`, primaryResourceTrn: trn }, options);
1257
+ }
1258
+
1259
+ /**
1260
+ * List IAM User removal blockers
1261
+ *
1262
+ * List one bounded page of the active references that block retiring one IAM User
1263
+ *
1264
+ * Replay: has no effect; retried after an attempt with an unknown result.
1265
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Auth_IamResourceNotFound`, `Auth_IamTenantRevisionConflict`.
1266
+ *
1267
+ * @param trn IAM User TRN in the route path
1268
+ * @param query The query, by wire names.
1269
+ * @param options Call options.
1270
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1271
+ */
1272
+ removalBlockerList(trn: string, query?: IamUserRemovalBlockerListQuery, options?: CallOptions): Promise<IamUserRemovalBlockerListResponse> {
1273
+ return this.#engine.call<IamUserRemovalBlockerListResponse>(OPERATIONS.iam_user_removal_blocker_list, { path: withQuery(`/users/${encodePathParam(trn)}/removal-blockers`, query), primaryResourceTrn: trn }, options);
1274
+ }
1275
+
1276
+ /**
1277
+ * Every item of `iam.user.removal_blocker_list`, page after page, starting from `query`.
1278
+ * Each page is one call with its own time budget and retries.
1279
+ *
1280
+ * @param trn IAM User TRN in the route path
1281
+ * @param query The query of the first page; `limit` is the size of every page.
1282
+ * @param options Call options of every page.
1283
+ */
1284
+ async *removalBlockerListIter(trn: string, query?: IamUserRemovalBlockerListQuery, options?: CallOptions): AsyncGenerator<IamUserRemovalBlockerListResponse['page']['items'][number], void, undefined> {
1285
+ let cursor = query?.cursor;
1286
+ for (;;) {
1287
+ const response = await this.removalBlockerList(trn, { ...query, cursor }, options);
1288
+ const page = response.page;
1289
+ yield* page.items;
1290
+ if (page.nextCursor == null) return;
1291
+ cursor = page.nextCursor;
1292
+ }
1293
+ }
1294
+
1295
+ /**
1296
+ * Retire IAM User
1297
+ *
1298
+ * Retire user
1299
+ *
1300
+ * Replay: not declared; an attempt with an unknown result is not retried.
1301
+ * Declared errors: `Internal_Unauthorized`, `Internal_PermissionDenied`, `Internal_ValidationFailed`, `Internal_ServiceUnavailable`, `Internal_SystemError`, `Internal_DatabaseError`, `Internal_DatabaseConnectionError`, `Internal_InvalidState`, `Internal_Conflict`, `Internal_PayloadTooLarge`, `Internal_UnsupportedMediaType`, `Auth_IamUserStateConflict`, `Auth_IamLastHumanAdmin`, `Auth_IamTenantRevisionConflict`, `Declarative_RemovalBlocked`, `Internal_PreconditionFailed`, `Internal_IdempotencyKeyReused`.
1302
+ *
1303
+ * @param trn IAM User TRN in the route path
1304
+ * @param body The request body.
1305
+ * @param options Call options.
1306
+ * @throws {AionixCallError} when the call fails, summarized over its attempts.
1307
+ */
1308
+ retire(trn: string, body: IamUserMutationRequest, options?: CallOptions): Promise<IamUserRetireResponse> {
1309
+ return this.#engine.call<IamUserRetireResponse>(OPERATIONS.iam_user_retire, { path: `/users/${encodePathParam(trn)}/retire`, body, primaryResourceTrn: trn }, options);
1310
+ }
1311
+ }