@cboxdk/id-js 0.17.0 → 0.18.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.
@@ -0,0 +1,4335 @@
1
+ import { CboxIdError, ConfigurationError } from './chunk-SEUD4TE4.js';
2
+ export { CboxIdError, ConfigurationError } from './chunk-SEUD4TE4.js';
3
+
4
+ // src/management/errors.ts
5
+ var CboxIdApiError = class extends CboxIdError {
6
+ /** HTTP status. */
7
+ status;
8
+ /** The stable machine code, e.g. `validation_failed`, `slug_taken`, `not_found`. */
9
+ error;
10
+ /**
11
+ * On `validation_failed` only: the offending request fields, each mapped to its messages
12
+ * (`{ name: ['The name field is required.'] }`). Empty otherwise.
13
+ */
14
+ errors;
15
+ /** The id the server served the request under (`request_id`, else `X-Request-Id`). Quote it when reporting a problem. */
16
+ requestId;
17
+ /** Seconds to wait, off `Retry-After` — set on a `429` the client gave up retrying. */
18
+ retryAfter;
19
+ constructor(init) {
20
+ super(init.message);
21
+ this.status = init.status;
22
+ this.error = init.error;
23
+ this.errors = init.errors ?? {};
24
+ this.requestId = init.requestId ?? null;
25
+ this.retryAfter = init.retryAfter;
26
+ }
27
+ /** Whether this is a `422 validation_failed` with field errors. */
28
+ get isValidationError() {
29
+ return this.error === "validation_failed";
30
+ }
31
+ };
32
+ var ManagementNetworkError = class extends CboxIdError {
33
+ constructor(message, idempotencyKey, options) {
34
+ super(message);
35
+ this.idempotencyKey = idempotencyKey;
36
+ if (options && "cause" in options) {
37
+ this.cause = options.cause;
38
+ }
39
+ }
40
+ idempotencyKey;
41
+ };
42
+ var ApprovalError = class extends CboxIdError {
43
+ constructor(message, reason, approval) {
44
+ super(message);
45
+ this.reason = reason;
46
+ this.approval = approval;
47
+ }
48
+ reason;
49
+ approval;
50
+ };
51
+ var ApprovalDeniedError = class extends ApprovalError {
52
+ constructor(approval) {
53
+ super(`Approval ${approval.id} was denied.`, "denied", approval);
54
+ }
55
+ };
56
+ var ApprovalExpiredError = class extends ApprovalError {
57
+ constructor(approval) {
58
+ super(`Approval ${approval.id} expired before it was approved.`, "expired", approval);
59
+ }
60
+ };
61
+
62
+ // src/management/transport.ts
63
+ var KEY_PREFIX = {
64
+ environment: "cbid_env_",
65
+ workspace: "cbid_ws_",
66
+ platform: null,
67
+ account: null
68
+ };
69
+ var APPROVAL_MOUNT = {
70
+ environment: "",
71
+ workspace: "/workspace",
72
+ platform: "/platform",
73
+ account: "/me"
74
+ };
75
+ var WRITE_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
76
+ var MAX_APPROVAL_ROUNDS = 3;
77
+ function isRecord(value) {
78
+ return typeof value === "object" && value !== null && !Array.isArray(value);
79
+ }
80
+ function uuid() {
81
+ if (typeof crypto.randomUUID === "function") {
82
+ return crypto.randomUUID();
83
+ }
84
+ const bytes = crypto.getRandomValues(new Uint8Array(16));
85
+ bytes[6] = bytes[6] & 15 | 64;
86
+ bytes[8] = bytes[8] & 63 | 128;
87
+ const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
88
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
89
+ }
90
+ function retryAfterMs(headers) {
91
+ const raw = headers.get("retry-after")?.trim();
92
+ if (raw === void 0 || raw === "") {
93
+ return void 0;
94
+ }
95
+ if (/^\d+$/.test(raw)) {
96
+ return Number(raw) * 1e3;
97
+ }
98
+ const date = Date.parse(raw);
99
+ return Number.isNaN(date) ? void 0 : Math.max(0, date - Date.now());
100
+ }
101
+ function sleep(ms, signal) {
102
+ if (ms <= 0) {
103
+ return signal?.aborted ? Promise.reject(signal.reason) : Promise.resolve();
104
+ }
105
+ return new Promise((resolve, reject) => {
106
+ if (signal?.aborted) {
107
+ reject(signal.reason);
108
+ return;
109
+ }
110
+ const timer = setTimeout(() => {
111
+ signal?.removeEventListener("abort", onAbort);
112
+ resolve();
113
+ }, ms);
114
+ const onAbort = () => {
115
+ clearTimeout(timer);
116
+ reject(signal?.reason);
117
+ };
118
+ signal?.addEventListener("abort", onAbort, { once: true });
119
+ });
120
+ }
121
+ function normalizeBaseUrl(raw) {
122
+ let url;
123
+ try {
124
+ url = new URL(raw);
125
+ } catch {
126
+ throw new ConfigurationError("Management client `baseUrl` is not a valid URL.");
127
+ }
128
+ const loopback = ["localhost", "127.0.0.1", "[::1]", "::1"].includes(url.hostname);
129
+ if (url.protocol !== "https:" && !(url.protocol === "http:" && loopback)) {
130
+ throw new ConfigurationError(`Management client \`baseUrl\` must be https (got ${url.protocol}//${url.hostname}).`);
131
+ }
132
+ const path = url.pathname.replace(/\/+$/, "");
133
+ return `${url.origin}${path.endsWith("/api/v1") ? path : `${path}/api/v1`}`;
134
+ }
135
+ function appendQuery(params, key, value) {
136
+ if (value === void 0 || value === null) {
137
+ return;
138
+ }
139
+ if (Array.isArray(value)) {
140
+ for (const item of value) {
141
+ appendQuery(params, `${key}[]`, item);
142
+ }
143
+ return;
144
+ }
145
+ if (typeof value === "boolean") {
146
+ params.append(key, value ? "1" : "0");
147
+ return;
148
+ }
149
+ params.append(key, typeof value === "object" ? JSON.stringify(value) : String(value));
150
+ }
151
+ async function readJson(response) {
152
+ const text = await response.text();
153
+ if (text === "") {
154
+ return void 0;
155
+ }
156
+ try {
157
+ return JSON.parse(text);
158
+ } catch {
159
+ return void 0;
160
+ }
161
+ }
162
+ var ManagementTransport = class {
163
+ plane;
164
+ baseUrl;
165
+ #options;
166
+ #fetch;
167
+ #maxRetries;
168
+ #baseDelayMs;
169
+ #maxDelayMs;
170
+ #dpopNonce;
171
+ constructor(plane, options, defaultBaseUrl) {
172
+ const baseUrl = options.baseUrl ?? defaultBaseUrl;
173
+ if (baseUrl === void 0 || baseUrl === "") {
174
+ throw new ConfigurationError(`The ${plane} management client needs a \`baseUrl\` (the environment's own host).`);
175
+ }
176
+ const hasKey = options.apiKey !== void 0;
177
+ const hasToken = options.accessToken !== void 0;
178
+ if (hasKey === hasToken) {
179
+ throw new ConfigurationError("Pass exactly one of `apiKey` and `accessToken` to a management client.");
180
+ }
181
+ if (hasKey) {
182
+ const key = options.apiKey ?? "";
183
+ const expected = KEY_PREFIX[plane];
184
+ if (key === "") {
185
+ throw new ConfigurationError("Management client `apiKey` is empty.");
186
+ }
187
+ if (expected === null) {
188
+ throw new ConfigurationError(
189
+ `The ${plane} plane accepts no management key \u2014 only an access token a person delegated (\`accessToken\`).`
190
+ );
191
+ }
192
+ const wrong = Object.values(KEY_PREFIX).find((prefix) => prefix !== null && prefix !== expected && key.startsWith(prefix));
193
+ if (wrong !== void 0) {
194
+ throw new ConfigurationError(`A \`${wrong}\u2026\` key cannot call the ${plane} plane; it takes \`${expected}\u2026\` keys.`);
195
+ }
196
+ if (options.dpop !== void 0) {
197
+ throw new ConfigurationError("`dpop` applies to an `accessToken`, not a management key.");
198
+ }
199
+ }
200
+ if (options.environment !== void 0) {
201
+ if (plane !== "environment") {
202
+ throw new ConfigurationError(`\`environment\` applies to the environment plane, not the ${plane} plane.`);
203
+ }
204
+ if (options.environment === "") {
205
+ throw new ConfigurationError("Management client `environment` is empty.");
206
+ }
207
+ if (hasKey) {
208
+ throw new ConfigurationError(
209
+ "`environment` names the environment for a root access token. A `cbid_env_\u2026` key is bound to its own environment's host: use that host as `baseUrl` instead."
210
+ );
211
+ }
212
+ }
213
+ this.plane = plane;
214
+ this.baseUrl = normalizeBaseUrl(baseUrl);
215
+ this.#options = options;
216
+ this.#fetch = options.fetch ?? ((input, init) => fetch(input, init));
217
+ this.#maxRetries = Math.max(0, options.retry?.maxRetries ?? 3);
218
+ this.#baseDelayMs = Math.max(0, options.retry?.baseDelayMs ?? 500);
219
+ this.#maxDelayMs = Math.max(0, options.retry?.maxDelayMs ?? 3e4);
220
+ }
221
+ /** Run one operation. Generated methods call this; so can you, with an operation spec. */
222
+ async call(op, pathArgs, input, options) {
223
+ const url = this.#url(op, pathArgs, op.body ? void 0 : input);
224
+ const payload = op.body ? input : void 0;
225
+ const idempotencyKey = WRITE_METHODS.has(op.method) ? options?.idempotencyKey ?? uuid() : void 0;
226
+ const send = {
227
+ idempotencyKey,
228
+ approvalId: options?.approvalId,
229
+ signal: options?.signal,
230
+ headers: options?.headers
231
+ };
232
+ const context = { action: op.action, danger: op.danger, method: op.method, path: op.path };
233
+ const response = await this.#send(op.method, url, payload, send);
234
+ const held = await this.#heldApproval(response);
235
+ if (held !== null && options?.approval === "return") {
236
+ const result = {
237
+ pending: true,
238
+ status: 202,
239
+ approval: held.approval,
240
+ idempotencyKey,
241
+ action: op.action,
242
+ resume: (resumeOptions) => this.#approveAndRepeat(op.method, url, payload, { ...send, signal: resumeOptions?.signal ?? send.signal }, held, context, false)
243
+ };
244
+ return result;
245
+ }
246
+ if (held !== null) {
247
+ return await this.#approveAndRepeat(op.method, url, payload, send, held, context, true);
248
+ }
249
+ return await this.#result(response, idempotencyKey);
250
+ }
251
+ /**
252
+ * Every item of a paged list, fetching pages as the iteration reaches them. Works for both
253
+ * cursor (`after` / `meta.next_cursor`) and numbered (`page` / `meta.next_page`) lists.
254
+ */
255
+ async *paginate(op, pathArgs, input, options) {
256
+ let query = { ...input ?? {} };
257
+ for (; ; ) {
258
+ const page = await this.call(op, pathArgs, query, {
259
+ ...options,
260
+ approval: "wait"
261
+ });
262
+ const items = Array.isArray(page.data) ? page.data : [];
263
+ yield* items;
264
+ const meta = page.meta;
265
+ if (items.length === 0 || meta?.has_more !== true) {
266
+ return;
267
+ }
268
+ if (op.pagination === "page") {
269
+ const current = typeof query.page === "number" ? query.page : Number(query.page ?? 1);
270
+ query = { ...query, page: meta.next_page ?? current + 1 };
271
+ } else {
272
+ if (typeof meta.next_cursor !== "string" || meta.next_cursor === "") {
273
+ return;
274
+ }
275
+ query = { ...query, after: meta.next_cursor };
276
+ }
277
+ }
278
+ }
279
+ /**
280
+ * An escape hatch for a route the generated surface does not cover. `path` is relative to
281
+ * `/api/v1`. Writes get an `Idempotency-Key` and the approval loop like any operation.
282
+ */
283
+ request(method, path, input, options) {
284
+ const op = {
285
+ action: null,
286
+ operationId: null,
287
+ method,
288
+ path,
289
+ pathParams: [],
290
+ scope: null,
291
+ danger: null,
292
+ approval: true,
293
+ body: input?.body !== void 0,
294
+ pagination: null
295
+ };
296
+ return this.call(op, [], input?.body ?? input?.query, options);
297
+ }
298
+ #url(op, pathArgs, query) {
299
+ let index = 0;
300
+ const path = op.path.replace(/\{([^}]+)\}/g, (_, name) => {
301
+ const value = pathArgs[index++];
302
+ if (value === void 0 || value === "") {
303
+ throw new TypeError(`${op.action ?? op.path}: missing path parameter \`${name}\`.`);
304
+ }
305
+ return encodeURIComponent(value);
306
+ });
307
+ const url = new URL(`${this.baseUrl}${path}`);
308
+ if (isRecord(query)) {
309
+ for (const [key, value] of Object.entries(query)) {
310
+ appendQuery(url.searchParams, key, value);
311
+ }
312
+ }
313
+ return url.toString();
314
+ }
315
+ async #headers(method, url, send, hasBody) {
316
+ const headers = new Headers({ ...this.#options.headers, ...send.headers });
317
+ headers.set("accept", "application/json");
318
+ if (hasBody) {
319
+ headers.set("content-type", "application/json");
320
+ }
321
+ if (send.idempotencyKey !== void 0) {
322
+ headers.set("idempotency-key", send.idempotencyKey);
323
+ }
324
+ if (send.approvalId !== void 0) {
325
+ headers.set("cbox-approval", send.approvalId);
326
+ }
327
+ if (this.#options.environment !== void 0) {
328
+ headers.set("cbox-environment", this.#options.environment);
329
+ }
330
+ if (this.#options.apiKey !== void 0) {
331
+ headers.set("authorization", `Bearer ${this.#options.apiKey}`);
332
+ return headers;
333
+ }
334
+ const source = this.#options.accessToken;
335
+ const token = typeof source === "function" ? await source() : source;
336
+ if (typeof token !== "string" || token === "") {
337
+ throw new ConfigurationError("The management client `accessToken` provider returned no token.");
338
+ }
339
+ const dpop = this.#options.dpop;
340
+ if (dpop === void 0) {
341
+ headers.set("authorization", `Bearer ${token}`);
342
+ return headers;
343
+ }
344
+ headers.set("authorization", `DPoP ${token}`);
345
+ headers.set(
346
+ "dpop",
347
+ await dpop.proof({
348
+ method,
349
+ url,
350
+ accessToken: token,
351
+ ...this.#dpopNonce !== void 0 ? { nonce: this.#dpopNonce } : {}
352
+ })
353
+ );
354
+ return headers;
355
+ }
356
+ /** One HTTP exchange, plus the single DPoP-nonce challenge retry RFC 9449 §8 describes. */
357
+ async #exchange(method, url, payload, send) {
358
+ for (let nonceRetry = 0; ; nonceRetry++) {
359
+ const headers = await this.#headers(method, url, send, payload !== void 0);
360
+ const timeout = AbortSignal.timeout(this.#options.timeoutMs ?? 3e4);
361
+ const signal = send.signal ? AbortSignal.any([send.signal, timeout]) : timeout;
362
+ const init = { method, headers, signal };
363
+ if (payload !== void 0) {
364
+ init.body = JSON.stringify(payload);
365
+ }
366
+ const response = await this.#fetch(url, init);
367
+ const nonce = response.headers.get("dpop-nonce");
368
+ if (nonce !== null && this.#options.dpop !== void 0) {
369
+ const challenged = response.status === 401 && nonce !== this.#dpopNonce && nonceRetry === 0;
370
+ this.#dpopNonce = nonce;
371
+ if (challenged) {
372
+ await response.body?.cancel();
373
+ continue;
374
+ }
375
+ }
376
+ return response;
377
+ }
378
+ }
379
+ async #shouldRetry(response) {
380
+ if (response.status >= 500 || response.status === 429) {
381
+ return true;
382
+ }
383
+ if (response.status === 409) {
384
+ const body = await readJson(response.clone());
385
+ return isRecord(body) && body.error === "idempotency_in_progress";
386
+ }
387
+ return false;
388
+ }
389
+ #backoff(attempt) {
390
+ const exponential = this.#baseDelayMs * 2 ** attempt;
391
+ return Math.min(this.#maxDelayMs, exponential / 2 + Math.random() * (exponential / 2));
392
+ }
393
+ /** Send with retries. Every attempt carries the SAME Idempotency-Key, so a write lands once. */
394
+ async #send(method, url, payload, send) {
395
+ for (let attempt = 0; ; attempt++) {
396
+ let response;
397
+ try {
398
+ response = await this.#exchange(method, url, payload, send);
399
+ } catch (error) {
400
+ if (send.signal?.aborted) {
401
+ throw send.signal.reason ?? error;
402
+ }
403
+ if (error instanceof CboxIdError || attempt >= this.#maxRetries) {
404
+ if (error instanceof CboxIdError) {
405
+ throw error;
406
+ }
407
+ throw new ManagementNetworkError(
408
+ `${method} ${new URL(url).pathname} failed: ${error instanceof Error ? error.message : String(error)}`,
409
+ send.idempotencyKey,
410
+ { cause: error }
411
+ );
412
+ }
413
+ await sleep(this.#backoff(attempt), send.signal);
414
+ continue;
415
+ }
416
+ if (attempt >= this.#maxRetries || !await this.#shouldRetry(response)) {
417
+ return response;
418
+ }
419
+ const delay = retryAfterMs(response.headers) ?? this.#backoff(attempt);
420
+ if (delay > this.#maxDelayMs) {
421
+ return response;
422
+ }
423
+ await response.body?.cancel();
424
+ await sleep(delay, send.signal);
425
+ }
426
+ }
427
+ async #heldApproval(response) {
428
+ if (response.status !== 202) {
429
+ return null;
430
+ }
431
+ const body = await readJson(response.clone());
432
+ if (!isRecord(body) || body.error !== "approval_required" || !isRecord(body.approval)) {
433
+ return null;
434
+ }
435
+ const approval = body.approval;
436
+ if (typeof approval.id !== "string" || approval.id === "") {
437
+ return null;
438
+ }
439
+ return {
440
+ approval: {
441
+ id: approval.id,
442
+ status: typeof approval.status === "string" ? approval.status : "pending",
443
+ binding_code: typeof approval.binding_code === "string" ? approval.binding_code : "",
444
+ expires_at: typeof approval.expires_at === "string" ? approval.expires_at : "",
445
+ poll_url: typeof approval.poll_url === "string" ? approval.poll_url : `${this.baseUrl}${APPROVAL_MOUNT[this.plane]}/action-approvals/${encodeURIComponent(approval.id)}`
446
+ },
447
+ retryAfter: retryAfterMs(response.headers)
448
+ };
449
+ }
450
+ async #approveAndRepeat(method, url, payload, send, first, context, notify) {
451
+ let held = first;
452
+ for (let round = 1; ; round++) {
453
+ if (notify || round > 1) {
454
+ await this.#options.onApprovalRequired?.(held.approval, context);
455
+ }
456
+ await this.#awaitApproval(held.approval, held.retryAfter, send.signal);
457
+ const response = await this.#send(method, url, payload, { ...send, approvalId: held.approval.id });
458
+ const again = await this.#heldApproval(response);
459
+ if (again === null) {
460
+ return this.#result(response, send.idempotencyKey);
461
+ }
462
+ if (round >= MAX_APPROVAL_ROUNDS) {
463
+ throw new ApprovalError(
464
+ `The request was held for approval ${round} times; giving up.`,
465
+ "consumed",
466
+ again.approval
467
+ );
468
+ }
469
+ held = again;
470
+ }
471
+ }
472
+ /** Poll an approval until the person decides. Resolves on `approved`; throws otherwise. */
473
+ async #awaitApproval(approval, initialDelay, signal) {
474
+ const pollUrl = new URL(approval.poll_url, this.baseUrl);
475
+ if (pollUrl.origin !== new URL(this.baseUrl).origin) {
476
+ throw new CboxIdError(`Refusing to poll approval ${approval.id} at another origin (${pollUrl.origin}).`);
477
+ }
478
+ const fallback = Math.max(0, this.#options.approvalPollIntervalMs ?? 2e3);
479
+ const expiresAt = Date.parse(approval.expires_at);
480
+ let delay = initialDelay ?? fallback;
481
+ for (; ; ) {
482
+ await sleep(Math.min(delay, 6e4), signal);
483
+ const response = await this.#send("GET", pollUrl.toString(), void 0, { signal });
484
+ if (!response.ok) {
485
+ throw await this.#error(response);
486
+ }
487
+ const body = await readJson(response);
488
+ const data = isRecord(body) && isRecord(body.data) ? body.data : {};
489
+ const status = typeof data.status === "string" ? data.status : "pending";
490
+ switch (status) {
491
+ case "approved":
492
+ return;
493
+ case "denied":
494
+ throw new ApprovalDeniedError(approval);
495
+ case "expired":
496
+ throw new ApprovalExpiredError(approval);
497
+ case "consumed":
498
+ throw new ApprovalError(`Approval ${approval.id} was already used by another request.`, "consumed", approval);
499
+ }
500
+ if (!Number.isNaN(expiresAt) && Date.now() > expiresAt + 3e4) {
501
+ throw new ApprovalExpiredError(approval);
502
+ }
503
+ delay = retryAfterMs(response.headers) ?? fallback;
504
+ }
505
+ }
506
+ async #result(response, idempotencyKey) {
507
+ if (!response.ok) {
508
+ throw await this.#error(response);
509
+ }
510
+ const body = response.status === 204 ? void 0 : await readJson(response);
511
+ const envelope = isRecord(body) && "data" in body;
512
+ return {
513
+ pending: false,
514
+ status: response.status,
515
+ data: envelope ? body.data : body,
516
+ meta: envelope ? body.meta : void 0,
517
+ body,
518
+ replayed: response.headers.get("idempotent-replayed")?.toLowerCase() === "true",
519
+ idempotencyKey,
520
+ requestId: response.headers.get("x-request-id"),
521
+ headers: response.headers
522
+ };
523
+ }
524
+ async #error(response) {
525
+ const body = await readJson(response);
526
+ const fields = isRecord(body) ? body : {};
527
+ const code = typeof fields.error === "string" ? fields.error : `http_${response.status}`;
528
+ const message = typeof fields.message === "string" ? fields.message : typeof fields.error_description === "string" ? fields.error_description : `HTTP ${response.status}`;
529
+ const errors = {};
530
+ if (isRecord(fields.errors)) {
531
+ for (const [field, messages] of Object.entries(fields.errors)) {
532
+ errors[field] = Array.isArray(messages) ? messages.map(String) : [String(messages)];
533
+ }
534
+ }
535
+ const retryAfter = retryAfterMs(response.headers);
536
+ const requestId = typeof fields.request_id === "string" && fields.request_id !== "" ? fields.request_id : response.headers.get("x-request-id");
537
+ return new CboxIdApiError({
538
+ status: response.status,
539
+ error: code,
540
+ message,
541
+ errors,
542
+ requestId,
543
+ retryAfter: retryAfter === void 0 ? void 0 : Math.ceil(retryAfter / 1e3)
544
+ });
545
+ }
546
+ };
547
+
548
+ // src/management/generated/environment.ts
549
+ var environmentOperations = {
550
+ "access_reviews.close": { action: "access_reviews.close", operationId: "access_reviews_close", method: "POST", path: "/access-reviews/{id}/close", pathParams: ["id"], scope: "governance:write", danger: "destructive", approval: true, body: true, pagination: null },
551
+ "access_reviews.create": { action: "access_reviews.create", operationId: "access_reviews_create", method: "POST", path: "/access-reviews", pathParams: [], scope: "governance:write", danger: "write", approval: true, body: true, pagination: null },
552
+ "access_reviews.get": { action: "access_reviews.get", operationId: "access_reviews_get", method: "GET", path: "/access-reviews/{id}", pathParams: ["id"], scope: "governance:read", danger: "read", approval: true, body: false, pagination: null },
553
+ "access_reviews.items.decide": { action: "access_reviews.items.decide", operationId: "access_reviews_items_decide", method: "POST", path: "/access-reviews/{id}/items/{item_id}", pathParams: ["id", "item_id"], scope: "governance:write", danger: "write", approval: true, body: true, pagination: null },
554
+ "access_reviews.items.list": { action: "access_reviews.items.list", operationId: "access_reviews_items_list", method: "GET", path: "/access-reviews/{id}/items", pathParams: ["id"], scope: "governance:read", danger: "read", approval: true, body: false, pagination: "cursor" },
555
+ "access_reviews.list": { action: "access_reviews.list", operationId: "access_reviews_list", method: "GET", path: "/access-reviews", pathParams: [], scope: "governance:read", danger: "read", approval: true, body: false, pagination: "cursor" },
556
+ "action_approvals.get": { action: null, operationId: null, method: "GET", path: "/action-approvals/{id}", pathParams: ["id"], scope: null, danger: null, approval: false, body: false, pagination: null },
557
+ "api_keys.list": { action: "api_keys.list", operationId: "api_keys_list", method: "GET", path: "/organizations/{organization_id}/api-keys", pathParams: ["organization_id"], scope: "api_keys:read", danger: "read", approval: true, body: false, pagination: "cursor" },
558
+ "api_keys.revoke": { action: "api_keys.revoke", operationId: "api_keys_revoke", method: "DELETE", path: "/api-keys/{id}", pathParams: ["id"], scope: "api_keys:write", danger: "destructive", approval: true, body: false, pagination: null },
559
+ "apis.create": { action: "apis.create", operationId: null, method: "POST", path: "/apis", pathParams: [], scope: "apis:write", danger: "write", approval: true, body: true, pagination: null },
560
+ "apis.delete": { action: "apis.delete", operationId: null, method: "DELETE", path: "/apis/{id}", pathParams: ["id"], scope: "apis:write", danger: "destructive", approval: true, body: false, pagination: null },
561
+ "apis.get": { action: "apis.get", operationId: null, method: "GET", path: "/apis/{id}", pathParams: ["id"], scope: "apis:read", danger: "read", approval: true, body: false, pagination: null },
562
+ "apis.list": { action: "apis.list", operationId: null, method: "GET", path: "/apis", pathParams: [], scope: "apis:read", danger: "read", approval: true, body: false, pagination: "cursor" },
563
+ "apis.scopes.define": { action: "apis.scopes.define", operationId: "apis_scopes_define", method: "PUT", path: "/apis/{id}/scopes/{key}", pathParams: ["id", "key"], scope: "apis:write", danger: "write", approval: true, body: true, pagination: null },
564
+ "apis.scopes.remove": { action: "apis.scopes.remove", operationId: "apis_scopes_remove", method: "DELETE", path: "/apis/{id}/scopes/{key}", pathParams: ["id", "key"], scope: "apis:write", danger: "destructive", approval: true, body: false, pagination: null },
565
+ "apis.update": { action: "apis.update", operationId: null, method: "PATCH", path: "/apis/{id}", pathParams: ["id"], scope: "apis:write", danger: "write", approval: true, body: true, pagination: null },
566
+ "approvals.deny": { action: "approvals.deny", operationId: "approvals_deny", method: "POST", path: "/agent-requests/{request_id}/deny", pathParams: ["request_id"], scope: "approvals:write", danger: "destructive", approval: true, body: false, pagination: null },
567
+ "approvals.list": { action: "approvals.list", operationId: "approvals_list", method: "GET", path: "/agent-requests", pathParams: [], scope: "approvals:read", danger: "read", approval: true, body: false, pagination: "cursor" },
568
+ "apps.blueprint": { action: "apps.blueprint", operationId: "apps_blueprint", method: "GET", path: "/apps/{id}/blueprint", pathParams: ["id"], scope: "apps:read", danger: "read", approval: true, body: false, pagination: null },
569
+ "apps.copy": { action: "apps.copy", operationId: "apps_copy", method: "POST", path: "/apps/{id}/copy", pathParams: ["id"], scope: "apps:write", danger: "critical", approval: true, body: true, pagination: null },
570
+ "apps.create": { action: "apps.create", operationId: "apps_create", method: "POST", path: "/apps", pathParams: [], scope: "apps:write", danger: "critical", approval: true, body: true, pagination: null },
571
+ "apps.delete": { action: "apps.delete", operationId: "apps_delete", method: "DELETE", path: "/apps/{id}", pathParams: ["id"], scope: "apps:write", danger: "critical", approval: true, body: false, pagination: null },
572
+ "apps.get": { action: "apps.get", operationId: "apps_get", method: "GET", path: "/apps/{id}", pathParams: ["id"], scope: "apps:read", danger: "read", approval: true, body: false, pagination: null },
573
+ "apps.list": { action: "apps.list", operationId: "apps_list", method: "GET", path: "/apps", pathParams: [], scope: "apps:read", danger: "read", approval: true, body: false, pagination: "cursor" },
574
+ "apps.manifest.set": { action: "apps.manifest.set", operationId: "apps_manifest_set", method: "PUT", path: "/apps/{id}/manifest", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
575
+ "apps.manifest.sync": { action: "apps.manifest.sync", operationId: "apps_manifest_sync", method: "POST", path: "/apps/{id}/manifest/sync", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: false, pagination: null },
576
+ "apps.scopes.set": { action: "apps.scopes.set", operationId: "apps_scopes_set", method: "PUT", path: "/apps/{id}/scopes", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
577
+ "apps.secrets.list": { action: "apps.secrets.list", operationId: "apps_secrets_list", method: "GET", path: "/apps/{id}/secrets", pathParams: ["id"], scope: "apps:read", danger: "read", approval: true, body: false, pagination: null },
578
+ "apps.secrets.revoke": { action: "apps.secrets.revoke", operationId: "apps_secrets_revoke", method: "DELETE", path: "/apps/{id}/secrets/{secret_id}", pathParams: ["id", "secret_id"], scope: "apps:write", danger: "critical", approval: true, body: false, pagination: null },
579
+ "apps.secrets.rotate": { action: "apps.secrets.rotate", operationId: "apps_secrets_rotate", method: "POST", path: "/apps/{id}/secrets", pathParams: ["id"], scope: "apps:write", danger: "critical", approval: true, body: true, pagination: null },
580
+ "apps.settings.api_key_prefix": { action: "apps.settings.api_key_prefix", operationId: "apps_settings_api_key_prefix", method: "PUT", path: "/apps/{id}/settings/api-key-prefix", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
581
+ "apps.settings.backchannel_logout": { action: "apps.settings.backchannel_logout", operationId: "apps_settings_backchannel_logout", method: "PUT", path: "/apps/{id}/settings/backchannel-logout", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
582
+ "apps.settings.token_exchange": { action: "apps.settings.token_exchange", operationId: "apps_settings_token_exchange", method: "PUT", path: "/apps/{id}/settings/token-exchange", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
583
+ "apps.settings.token_lifetime": { action: "apps.settings.token_lifetime", operationId: "apps_settings_token_lifetime", method: "PUT", path: "/apps/{id}/settings/token-lifetime", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
584
+ "apps.update": { action: "apps.update", operationId: "apps_update", method: "PATCH", path: "/apps/{id}", pathParams: ["id"], scope: "apps:write", danger: "write", approval: true, body: true, pagination: null },
585
+ "audit_logs.events.create": { action: "audit_logs.events.create", operationId: "audit_logs_events_create", method: "POST", path: "/audit-logs/events", pathParams: [], scope: "audit_logs:write", danger: "write", approval: true, body: true, pagination: null },
586
+ "audit_logs.events.list": { action: "audit_logs.events.list", operationId: "audit_logs_events_list", method: "GET", path: "/audit-logs/events", pathParams: [], scope: "audit_logs:read", danger: "read", approval: true, body: false, pagination: "cursor" },
587
+ "audit_logs.exports.create": { action: "audit_logs.exports.create", operationId: "audit_logs_exports_create", method: "POST", path: "/audit-logs/exports", pathParams: [], scope: "audit_logs:export", danger: "write", approval: true, body: true, pagination: null },
588
+ "audit_logs.exports.get": { action: "audit_logs.exports.get", operationId: "audit_logs_exports_get", method: "GET", path: "/audit-logs/exports/{id}", pathParams: ["id"], scope: "audit_logs:read", danger: "read", approval: true, body: false, pagination: null },
589
+ "audit_logs.schemas.create": { action: "audit_logs.schemas.create", operationId: "audit_logs_schemas_create", method: "POST", path: "/audit-logs/schemas", pathParams: [], scope: "audit_logs:manage", danger: "write", approval: true, body: true, pagination: null },
590
+ "audit_logs.schemas.delete": { action: "audit_logs.schemas.delete", operationId: "audit_logs_schemas_delete", method: "DELETE", path: "/audit-logs/schemas/{action}", pathParams: ["action"], scope: "audit_logs:manage", danger: "destructive", approval: true, body: false, pagination: null },
591
+ "audit_logs.schemas.get": { action: "audit_logs.schemas.get", operationId: "audit_logs_schemas_get", method: "GET", path: "/audit-logs/schemas/{action}", pathParams: ["action"], scope: "audit_logs:read", danger: "read", approval: true, body: false, pagination: null },
592
+ "audit_logs.schemas.list": { action: "audit_logs.schemas.list", operationId: "audit_logs_schemas_list", method: "GET", path: "/audit-logs/schemas", pathParams: [], scope: "audit_logs:read", danger: "read", approval: true, body: false, pagination: "cursor" },
593
+ "audit_logs.schemas.update": { action: "audit_logs.schemas.update", operationId: "audit_logs_schemas_update", method: "PUT", path: "/audit-logs/schemas/{action}", pathParams: ["action"], scope: "audit_logs:manage", danger: "write", approval: true, body: true, pagination: null },
594
+ "audit_logs.settings.get": { action: "audit_logs.settings.get", operationId: "audit_logs_settings_get", method: "GET", path: "/audit-logs/settings", pathParams: [], scope: "audit_logs:read", danger: "read", approval: true, body: false, pagination: null },
595
+ "audit_logs.settings.update": { action: "audit_logs.settings.update", operationId: "audit_logs_settings_update", method: "PATCH", path: "/audit-logs/settings", pathParams: [], scope: "audit_logs:manage", danger: "destructive", approval: true, body: true, pagination: null },
596
+ "audit_logs.verify": { action: "audit_logs.verify", operationId: "audit_logs_verify", method: "GET", path: "/audit-logs/verify", pathParams: [], scope: "audit_logs:read", danger: "read", approval: true, body: false, pagination: null },
597
+ "audit.list": { action: "audit.list", operationId: "audit_list", method: "GET", path: "/audit-log", pathParams: [], scope: "audit:read", danger: "read", approval: true, body: false, pagination: "cursor" },
598
+ "branding.appearance.get": { action: "branding.appearance.get", operationId: "branding_appearance_get", method: "GET", path: "/branding/appearance", pathParams: [], scope: "branding:read", danger: "read", approval: true, body: false, pagination: null },
599
+ "branding.appearance.set": { action: "branding.appearance.set", operationId: "branding_appearance_set", method: "PUT", path: "/branding/appearance", pathParams: [], scope: "branding:write", danger: "write", approval: true, body: true, pagination: null },
600
+ "branding.whitelabel.get": { action: "branding.whitelabel.get", operationId: "branding_whitelabel_get", method: "GET", path: "/branding/whitelabel", pathParams: [], scope: "branding:read", danger: "read", approval: true, body: false, pagination: null },
601
+ "branding.whitelabel.set": { action: "branding.whitelabel.set", operationId: "branding_whitelabel_set", method: "PUT", path: "/branding/whitelabel", pathParams: [], scope: "branding:write", danger: "write", approval: true, body: true, pagination: null },
602
+ "directories.connect": { action: "directories.connect", operationId: "directories_connect", method: "POST", path: "/directories/connect", pathParams: [], scope: "directory_sync:write", danger: "critical", approval: true, body: true, pagination: null },
603
+ "directories.create": { action: "directories.create", operationId: "directories_create", method: "POST", path: "/directories", pathParams: [], scope: "directory_sync:write", danger: "critical", approval: true, body: true, pagination: null },
604
+ "directories.delete": { action: "directories.delete", operationId: "directories_delete", method: "DELETE", path: "/directories/{id}", pathParams: ["id"], scope: "directory_sync:write", danger: "destructive", approval: true, body: true, pagination: null },
605
+ "directories.get": { action: "directories.get", operationId: "directories_get", method: "GET", path: "/directories/{id}", pathParams: ["id"], scope: "directory_sync:read", danger: "read", approval: true, body: false, pagination: null },
606
+ "directories.groups.list": { action: "directories.groups.list", operationId: "directories_groups_list", method: "GET", path: "/directories/{id}/groups", pathParams: ["id"], scope: "directory_sync:read", danger: "read", approval: true, body: false, pagination: "cursor" },
607
+ "directories.groups.map": { action: "directories.groups.map", operationId: "directories_groups_map", method: "POST", path: "/directories/{id}/group-roles", pathParams: ["id"], scope: "directory_sync:write", danger: "write", approval: true, body: true, pagination: null },
608
+ "directories.list": { action: "directories.list", operationId: "directories_list", method: "GET", path: "/directories", pathParams: [], scope: "directory_sync:read", danger: "read", approval: true, body: false, pagination: "cursor" },
609
+ "directories.status.set": { action: "directories.status.set", operationId: "directories_status_set", method: "POST", path: "/directories/{id}/status", pathParams: ["id"], scope: "directory_sync:write", danger: "write", approval: true, body: true, pagination: null },
610
+ "directories.token.rotate": { action: "directories.token.rotate", operationId: "directories_token_rotate", method: "POST", path: "/directories/{id}/rotate", pathParams: ["id"], scope: "directory_sync:write", danger: "critical", approval: true, body: true, pagination: null },
611
+ "directories.update": { action: "directories.update", operationId: "directories_update", method: "PATCH", path: "/directories/{id}", pathParams: ["id"], scope: "directory_sync:write", danger: "write", approval: true, body: true, pagination: null },
612
+ "domains.add": { action: "domains.add", operationId: "domains_add", method: "POST", path: "/domains", pathParams: [], scope: "domains:write", danger: "write", approval: true, body: true, pagination: null },
613
+ "domains.get": { action: "domains.get", operationId: "domains_get", method: "GET", path: "/domains", pathParams: [], scope: "domains:read", danger: "read", approval: true, body: false, pagination: null },
614
+ "domains.remove": { action: "domains.remove", operationId: "domains_remove", method: "DELETE", path: "/domains", pathParams: [], scope: "domains:write", danger: "destructive", approval: true, body: false, pagination: null },
615
+ "domains.verify": { action: "domains.verify", operationId: "domains_verify", method: "POST", path: "/domains/verify", pathParams: [], scope: "domains:write", danger: "write", approval: true, body: false, pagination: null },
616
+ "events.list": { action: "events.list", operationId: "events_list", method: "GET", path: "/events", pathParams: [], scope: "events:read", danger: "read", approval: true, body: false, pagination: "cursor" },
617
+ "frontend_keys.create": { action: "frontend_keys.create", operationId: "frontend_keys_create", method: "POST", path: "/frontend-keys", pathParams: [], scope: "frontend_keys:write", danger: "write", approval: true, body: true, pagination: null },
618
+ "frontend_keys.list": { action: "frontend_keys.list", operationId: "frontend_keys_list", method: "GET", path: "/frontend-keys", pathParams: [], scope: "frontend_keys:read", danger: "read", approval: true, body: false, pagination: "cursor" },
619
+ "frontend_keys.revoke": { action: "frontend_keys.revoke", operationId: "frontend_keys_revoke", method: "DELETE", path: "/frontend-keys/{id}", pathParams: ["id"], scope: "frontend_keys:write", danger: "destructive", approval: true, body: false, pagination: null },
620
+ "frontend_keys.set_origins": { action: "frontend_keys.set_origins", operationId: "frontend_keys_set_origins", method: "PUT", path: "/frontend-keys/{id}/origins", pathParams: ["id"], scope: "frontend_keys:write", danger: "write", approval: true, body: true, pagination: null },
621
+ "hooks.create": { action: "hooks.create", operationId: "hooks_create", method: "POST", path: "/hooks", pathParams: [], scope: "hooks:write", danger: "critical", approval: true, body: true, pagination: null },
622
+ "hooks.delete": { action: "hooks.delete", operationId: "hooks_delete", method: "DELETE", path: "/hooks/{id}", pathParams: ["id"], scope: "hooks:write", danger: "destructive", approval: true, body: false, pagination: null },
623
+ "hooks.get": { action: "hooks.get", operationId: "hooks_get", method: "GET", path: "/hooks/{id}", pathParams: ["id"], scope: "hooks:read", danger: "read", approval: true, body: false, pagination: null },
624
+ "hooks.list": { action: "hooks.list", operationId: "hooks_list", method: "GET", path: "/hooks", pathParams: [], scope: "hooks:read", danger: "read", approval: true, body: false, pagination: "cursor" },
625
+ "hooks.update": { action: "hooks.update", operationId: "hooks_update", method: "PATCH", path: "/hooks/{id}", pathParams: ["id"], scope: "hooks:write", danger: "critical", approval: true, body: true, pagination: null },
626
+ "invitations.list": { action: "invitations.list", operationId: "invitations_list", method: "GET", path: "/organizations/{organization_id}/invitations", pathParams: ["organization_id"], scope: "invitations:read", danger: "read", approval: true, body: false, pagination: "cursor" },
627
+ "invitations.resend": { action: "invitations.resend", operationId: "invitations_resend", method: "POST", path: "/organizations/{organization_id}/invitations/{invitation_id}/resend", pathParams: ["organization_id", "invitation_id"], scope: "invitations:write", danger: "write", approval: true, body: false, pagination: null },
628
+ "invitations.revoke": { action: "invitations.revoke", operationId: "invitations_revoke", method: "DELETE", path: "/organizations/{organization_id}/invitations/{invitation_id}", pathParams: ["organization_id", "invitation_id"], scope: "invitations:write", danger: "destructive", approval: true, body: false, pagination: null },
629
+ "invitations.send": { action: "invitations.send", operationId: "invitations_send", method: "POST", path: "/organizations/{organization_id}/invitations", pathParams: ["organization_id"], scope: "invitations:write", danger: "write", approval: true, body: true, pagination: null },
630
+ "keys.create": { action: "keys.create", operationId: "keys_create", method: "POST", path: "/keys", pathParams: [], scope: "keys:write", danger: "critical", approval: true, body: true, pagination: null },
631
+ "keys.list": { action: "keys.list", operationId: "keys_list", method: "GET", path: "/keys", pathParams: [], scope: "keys:read", danger: "read", approval: true, body: false, pagination: "cursor" },
632
+ "keys.revoke": { action: "keys.revoke", operationId: "keys_revoke", method: "DELETE", path: "/keys/{id}", pathParams: ["id"], scope: "keys:write", danger: "destructive", approval: true, body: false, pagination: null },
633
+ "keys.rotate": { action: "keys.rotate", operationId: "keys_rotate", method: "POST", path: "/keys/{id}/rotate", pathParams: ["id"], scope: "keys:write", danger: "critical", approval: true, body: true, pagination: null },
634
+ "legacy_login.approve": { action: "legacy_login.approve", operationId: "legacy_login_approve", method: "POST", path: "/legacy-login/approve", pathParams: [], scope: "signin:write", danger: "critical", approval: true, body: false, pagination: null },
635
+ "legacy_login.get": { action: "legacy_login.get", operationId: "legacy_login_get", method: "GET", path: "/legacy-login", pathParams: [], scope: "signin:read", danger: "read", approval: true, body: false, pagination: null },
636
+ "legacy_login.probe": { action: "legacy_login.probe", operationId: "legacy_login_probe", method: "POST", path: "/legacy-login/probe", pathParams: [], scope: "signin:write", danger: "write", approval: true, body: true, pagination: null },
637
+ "legacy_login.revoke": { action: "legacy_login.revoke", operationId: "legacy_login_revoke", method: "POST", path: "/legacy-login/revoke", pathParams: [], scope: "signin:write", danger: "critical", approval: true, body: false, pagination: null },
638
+ "log_streams.create": { action: "log_streams.create", operationId: "log_streams_create", method: "POST", path: "/log-streams", pathParams: [], scope: "log_streams:write", danger: "critical", approval: true, body: true, pagination: null },
639
+ "log_streams.delete": { action: "log_streams.delete", operationId: "log_streams_delete", method: "DELETE", path: "/log-streams/{id}", pathParams: ["id"], scope: "log_streams:write", danger: "destructive", approval: true, body: false, pagination: null },
640
+ "log_streams.get": { action: "log_streams.get", operationId: "log_streams_get", method: "GET", path: "/log-streams/{id}", pathParams: ["id"], scope: "log_streams:read", danger: "read", approval: true, body: false, pagination: null },
641
+ "log_streams.list": { action: "log_streams.list", operationId: "log_streams_list", method: "GET", path: "/log-streams", pathParams: [], scope: "log_streams:read", danger: "read", approval: true, body: false, pagination: "cursor" },
642
+ "log_streams.test": { action: "log_streams.test", operationId: "log_streams_test", method: "POST", path: "/log-streams/{id}/test", pathParams: ["id"], scope: "log_streams:write", danger: "write", approval: true, body: false, pagination: null },
643
+ "log_streams.update": { action: "log_streams.update", operationId: "log_streams_update", method: "PATCH", path: "/log-streams/{id}", pathParams: ["id"], scope: "log_streams:write", danger: "critical", approval: true, body: true, pagination: null },
644
+ "members.add": { action: "members.add", operationId: "members_add", method: "POST", path: "/organizations/{organization_id}/members", pathParams: ["organization_id"], scope: "members:write", danger: "write", approval: true, body: true, pagination: null },
645
+ "members.list": { action: "members.list", operationId: "members_list", method: "GET", path: "/organizations/{organization_id}/members", pathParams: ["organization_id"], scope: "members:read", danger: "read", approval: true, body: false, pagination: "cursor" },
646
+ "members.remove": { action: "members.remove", operationId: "members_remove", method: "DELETE", path: "/organizations/{organization_id}/members/{user_id}", pathParams: ["organization_id", "user_id"], scope: "members:write", danger: "destructive", approval: true, body: false, pagination: null },
647
+ "members.roles.grant": { action: "members.roles.grant", operationId: "members_roles_grant", method: "PUT", path: "/organizations/{organization_id}/members/{user_id}/roles/{role_id}", pathParams: ["organization_id", "user_id", "role_id"], scope: "roles:write", danger: "write", approval: true, body: false, pagination: null },
648
+ "members.roles.list": { action: "members.roles.list", operationId: "members_roles_list", method: "GET", path: "/organizations/{organization_id}/members/{user_id}/roles", pathParams: ["organization_id", "user_id"], scope: "roles:read", danger: "read", approval: true, body: false, pagination: null },
649
+ "members.roles.revoke": { action: "members.roles.revoke", operationId: "members_roles_revoke", method: "DELETE", path: "/organizations/{organization_id}/members/{user_id}/roles/{role_id}", pathParams: ["organization_id", "user_id", "role_id"], scope: "roles:write", danger: "destructive", approval: true, body: false, pagination: null },
650
+ "members.update": { action: "members.update", operationId: "members_update", method: "PATCH", path: "/organizations/{organization_id}/members/{user_id}", pathParams: ["organization_id", "user_id"], scope: "members:write", danger: "write", approval: true, body: true, pagination: null },
651
+ "organizations.create": { action: "organizations.create", operationId: "organizations_create", method: "POST", path: "/organizations", pathParams: [], scope: "organizations:write", danger: "write", approval: true, body: true, pagination: null },
652
+ "organizations.delete": { action: "organizations.delete", operationId: "organizations_delete", method: "DELETE", path: "/organizations/{id}", pathParams: ["id"], scope: "organizations:write", danger: "destructive", approval: true, body: false, pagination: null },
653
+ "organizations.domains.add": { action: "organizations.domains.add", operationId: "organizations_domains_add", method: "POST", path: "/organizations/{organization_id}/domains", pathParams: ["organization_id"], scope: "organizations:write", danger: "write", approval: true, body: true, pagination: null },
654
+ "organizations.domains.capture": { action: "organizations.domains.capture", operationId: "organizations_domains_capture", method: "PUT", path: "/organizations/{organization_id}/domains/{domain_id}/capture", pathParams: ["organization_id", "domain_id"], scope: "organizations:write", danger: "critical", approval: true, body: true, pagination: null },
655
+ "organizations.domains.list": { action: "organizations.domains.list", operationId: "organizations_domains_list", method: "GET", path: "/organizations/{organization_id}/domains", pathParams: ["organization_id"], scope: "organizations:read", danger: "read", approval: true, body: false, pagination: null },
656
+ "organizations.domains.remove": { action: "organizations.domains.remove", operationId: "organizations_domains_remove", method: "DELETE", path: "/organizations/{organization_id}/domains/{domain_id}", pathParams: ["organization_id", "domain_id"], scope: "organizations:write", danger: "destructive", approval: true, body: false, pagination: null },
657
+ "organizations.domains.verify": { action: "organizations.domains.verify", operationId: "organizations_domains_verify", method: "POST", path: "/organizations/{organization_id}/domains/{domain_id}/verify", pathParams: ["organization_id", "domain_id"], scope: "organizations:write", danger: "write", approval: true, body: false, pagination: null },
658
+ "organizations.get": { action: "organizations.get", operationId: "organizations_get", method: "GET", path: "/organizations/{id}", pathParams: ["id"], scope: "organizations:read", danger: "read", approval: true, body: false, pagination: null },
659
+ "organizations.list": { action: "organizations.list", operationId: "organizations_list", method: "GET", path: "/organizations", pathParams: [], scope: "organizations:read", danger: "read", approval: true, body: false, pagination: "cursor" },
660
+ "organizations.portal_links.create": { action: "organizations.portal_links.create", operationId: "organizations_portal_links_create", method: "POST", path: "/organizations/{organization_id}/portal-links", pathParams: ["organization_id"], scope: "portal_links:write", danger: "critical", approval: true, body: true, pagination: null },
661
+ "organizations.portal_links.list": { action: "organizations.portal_links.list", operationId: "organizations_portal_links_list", method: "GET", path: "/organizations/{organization_id}/portal-links", pathParams: ["organization_id"], scope: "portal_links:read", danger: "read", approval: true, body: false, pagination: null },
662
+ "organizations.portal_links.revoke": { action: "organizations.portal_links.revoke", operationId: "organizations_portal_links_revoke", method: "DELETE", path: "/organizations/{organization_id}/portal-links/{id}", pathParams: ["organization_id", "id"], scope: "portal_links:write", danger: "destructive", approval: true, body: false, pagination: null },
663
+ "organizations.reactivate": { action: "organizations.reactivate", operationId: "organizations_reactivate", method: "POST", path: "/organizations/{id}/reactivate", pathParams: ["id"], scope: "organizations:write", danger: "write", approval: true, body: false, pagination: null },
664
+ "organizations.suspend": { action: "organizations.suspend", operationId: "organizations_suspend", method: "POST", path: "/organizations/{id}/suspend", pathParams: ["id"], scope: "organizations:write", danger: "write", approval: true, body: false, pagination: null },
665
+ "organizations.transfer_ownership": { action: "organizations.transfer_ownership", operationId: "organizations_transfer_ownership", method: "POST", path: "/organizations/{id}/transfer-ownership", pathParams: ["id"], scope: "organizations:write", danger: "critical", approval: true, body: true, pagination: null },
666
+ "organizations.update": { action: "organizations.update", operationId: "organizations_update", method: "PATCH", path: "/organizations/{id}", pathParams: ["id"], scope: "organizations:write", danger: "write", approval: true, body: true, pagination: null },
667
+ "permissions.create": { action: "permissions.create", operationId: "permissions_create", method: "POST", path: "/permissions", pathParams: [], scope: "role_definitions:write", danger: "write", approval: true, body: true, pagination: null },
668
+ "permissions.delete": { action: "permissions.delete", operationId: "permissions_delete", method: "DELETE", path: "/permissions/{id}", pathParams: ["id"], scope: "role_definitions:write", danger: "destructive", approval: true, body: false, pagination: null },
669
+ "permissions.list": { action: "permissions.list", operationId: "permissions_list", method: "GET", path: "/permissions", pathParams: [], scope: "roles:read", danger: "read", approval: true, body: false, pagination: "cursor" },
670
+ "permissions.update": { action: "permissions.update", operationId: "permissions_update", method: "PATCH", path: "/permissions/{id}", pathParams: ["id"], scope: "role_definitions:write", danger: "write", approval: true, body: true, pagination: null },
671
+ "provisioning.targets.create": { action: "provisioning.targets.create", operationId: "provisioning_targets_create", method: "POST", path: "/provisioning-targets", pathParams: [], scope: "provisioning:write", danger: "critical", approval: true, body: true, pagination: null },
672
+ "provisioning.targets.delete": { action: "provisioning.targets.delete", operationId: "provisioning_targets_delete", method: "DELETE", path: "/provisioning-targets/{id}", pathParams: ["id"], scope: "provisioning:write", danger: "destructive", approval: true, body: true, pagination: null },
673
+ "provisioning.targets.get": { action: "provisioning.targets.get", operationId: "provisioning_targets_get", method: "GET", path: "/provisioning-targets/{id}", pathParams: ["id"], scope: "provisioning:read", danger: "read", approval: true, body: false, pagination: null },
674
+ "provisioning.targets.list": { action: "provisioning.targets.list", operationId: "provisioning_targets_list", method: "GET", path: "/provisioning-targets", pathParams: [], scope: "provisioning:read", danger: "read", approval: true, body: false, pagination: "cursor" },
675
+ "provisioning.targets.status.set": { action: "provisioning.targets.status.set", operationId: "provisioning_targets_status_set", method: "POST", path: "/provisioning-targets/{id}/status", pathParams: ["id"], scope: "provisioning:write", danger: "write", approval: true, body: true, pagination: null },
676
+ "roles.create": { action: "roles.create", operationId: "roles_create", method: "POST", path: "/roles", pathParams: [], scope: "role_definitions:write", danger: "write", approval: true, body: true, pagination: null },
677
+ "roles.delete": { action: "roles.delete", operationId: "roles_delete", method: "DELETE", path: "/roles/{id}", pathParams: ["id"], scope: "role_definitions:write", danger: "destructive", approval: true, body: false, pagination: null },
678
+ "roles.get": { action: "roles.get", operationId: "roles_get", method: "GET", path: "/roles/{id}", pathParams: ["id"], scope: "roles:read", danger: "read", approval: true, body: false, pagination: null },
679
+ "roles.list": { action: "roles.list", operationId: "roles_list", method: "GET", path: "/roles", pathParams: [], scope: "roles:read", danger: "read", approval: true, body: false, pagination: null },
680
+ "roles.permissions.grant": { action: "roles.permissions.grant", operationId: "roles_permissions_grant", method: "PUT", path: "/roles/{id}/permissions/{permission_id}", pathParams: ["id", "permission_id"], scope: "role_definitions:write", danger: "write", approval: true, body: false, pagination: null },
681
+ "roles.permissions.revoke": { action: "roles.permissions.revoke", operationId: "roles_permissions_revoke", method: "DELETE", path: "/roles/{id}/permissions/{permission_id}", pathParams: ["id", "permission_id"], scope: "role_definitions:write", danger: "destructive", approval: true, body: false, pagination: null },
682
+ "roles.update": { action: "roles.update", operationId: "roles_update", method: "PATCH", path: "/roles/{id}", pathParams: ["id"], scope: "role_definitions:write", danger: "write", approval: true, body: true, pagination: null },
683
+ "saml_apps.create": { action: "saml_apps.create", operationId: "saml_apps_create", method: "POST", path: "/saml-apps", pathParams: [], scope: "saml_apps:write", danger: "critical", approval: true, body: true, pagination: null },
684
+ "saml_apps.delete": { action: "saml_apps.delete", operationId: "saml_apps_delete", method: "DELETE", path: "/saml-apps/{id}", pathParams: ["id"], scope: "saml_apps:write", danger: "critical", approval: true, body: false, pagination: null },
685
+ "saml_apps.get": { action: "saml_apps.get", operationId: "saml_apps_get", method: "GET", path: "/saml-apps/{id}", pathParams: ["id"], scope: "saml_apps:read", danger: "read", approval: true, body: false, pagination: null },
686
+ "saml_apps.list": { action: "saml_apps.list", operationId: "saml_apps_list", method: "GET", path: "/saml-apps", pathParams: [], scope: "saml_apps:read", danger: "read", approval: true, body: false, pagination: "cursor" },
687
+ "saml_apps.update": { action: "saml_apps.update", operationId: "saml_apps_update", method: "PATCH", path: "/saml-apps/{id}", pathParams: ["id"], scope: "saml_apps:write", danger: "critical", approval: true, body: true, pagination: null },
688
+ "signin.policy.get": { action: "signin.policy.get", operationId: "signin_policy_get", method: "GET", path: "/sign-in/policy", pathParams: [], scope: "signin:read", danger: "read", approval: true, body: false, pagination: null },
689
+ "signin.policy.inherit": { action: "signin.policy.inherit", operationId: "signin_policy_inherit", method: "DELETE", path: "/sign-in/policy/organizations/{organization_id}", pathParams: ["organization_id"], scope: "signin:write", danger: "critical", approval: true, body: false, pagination: null },
690
+ "signin.policy.update": { action: "signin.policy.update", operationId: "signin_policy_update", method: "PATCH", path: "/sign-in/policy", pathParams: [], scope: "signin:write", danger: "critical", approval: true, body: true, pagination: null },
691
+ "signin.self_service_signup.set": { action: "signin.self_service_signup.set", operationId: "signin_self_service_signup_set", method: "PUT", path: "/sign-in/self-service-signup", pathParams: [], scope: "signin:write", danger: "critical", approval: true, body: true, pagination: null },
692
+ "signin.social.delete": { action: "signin.social.delete", operationId: "signin_social_delete", method: "DELETE", path: "/sign-in/social-providers/{id}", pathParams: ["id"], scope: "signin:write", danger: "critical", approval: true, body: true, pagination: null },
693
+ "signin.social.list": { action: "signin.social.list", operationId: "signin_social_list", method: "GET", path: "/sign-in/social-providers", pathParams: [], scope: "signin:read", danger: "read", approval: true, body: false, pagination: "cursor" },
694
+ "signin.social.set": { action: "signin.social.set", operationId: "signin_social_set", method: "POST", path: "/sign-in/social-providers", pathParams: [], scope: "signin:write", danger: "critical", approval: true, body: true, pagination: null },
695
+ "sod_policies.create": { action: "sod_policies.create", operationId: "sod_policies_create", method: "POST", path: "/sod-policies", pathParams: [], scope: "governance:write", danger: "write", approval: true, body: true, pagination: null },
696
+ "sod_policies.delete": { action: "sod_policies.delete", operationId: "sod_policies_delete", method: "DELETE", path: "/sod-policies/{id}", pathParams: ["id"], scope: "governance:write", danger: "critical", approval: true, body: true, pagination: null },
697
+ "sod_policies.get": { action: "sod_policies.get", operationId: "sod_policies_get", method: "GET", path: "/sod-policies/{id}", pathParams: ["id"], scope: "governance:read", danger: "read", approval: true, body: false, pagination: null },
698
+ "sod_policies.list": { action: "sod_policies.list", operationId: "sod_policies_list", method: "GET", path: "/sod-policies", pathParams: [], scope: "governance:read", danger: "read", approval: true, body: false, pagination: "cursor" },
699
+ "sod_policies.status.set": { action: "sod_policies.status.set", operationId: "sod_policies_status_set", method: "POST", path: "/sod-policies/{id}/status", pathParams: ["id"], scope: "governance:write", danger: "critical", approval: true, body: true, pagination: null },
700
+ "sso.connections.activate": { action: "sso.connections.activate", operationId: "sso_connections_activate", method: "POST", path: "/sso/connections/{id}/activate", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
701
+ "sso.connections.certificates.activate": { action: "sso.connections.certificates.activate", operationId: "sso_connections_certificates_activate", method: "POST", path: "/sso/connections/{id}/certificates/activate", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
702
+ "sso.connections.certificates.list": { action: "sso.connections.certificates.list", operationId: "sso_connections_certificates_list", method: "GET", path: "/sso/connections/{id}/certificates", pathParams: ["id"], scope: "sso:read", danger: "read", approval: true, body: false, pagination: null },
703
+ "sso.connections.certificates.stage": { action: "sso.connections.certificates.stage", operationId: "sso_connections_certificates_stage", method: "POST", path: "/sso/connections/{id}/certificates", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
704
+ "sso.connections.create": { action: "sso.connections.create", operationId: "sso_connections_create", method: "POST", path: "/sso/connections", pathParams: [], scope: "sso:write", danger: "write", approval: true, body: true, pagination: null },
705
+ "sso.connections.delete": { action: "sso.connections.delete", operationId: "sso_connections_delete", method: "DELETE", path: "/sso/connections/{id}", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
706
+ "sso.connections.disable": { action: "sso.connections.disable", operationId: "sso_connections_disable", method: "POST", path: "/sso/connections/{id}/disable", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
707
+ "sso.connections.get": { action: "sso.connections.get", operationId: "sso_connections_get", method: "GET", path: "/sso/connections/{id}", pathParams: ["id"], scope: "sso:read", danger: "read", approval: true, body: false, pagination: null },
708
+ "sso.connections.list": { action: "sso.connections.list", operationId: "sso_connections_list", method: "GET", path: "/sso/connections", pathParams: [], scope: "sso:read", danger: "read", approval: true, body: false, pagination: "cursor" },
709
+ "sso.connections.require_sso": { action: "sso.connections.require_sso", operationId: "sso_connections_require_sso", method: "POST", path: "/sso/connections/{id}/require-sso", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
710
+ "sso.connections.update": { action: "sso.connections.update", operationId: "sso_connections_update", method: "PATCH", path: "/sso/connections/{id}", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
711
+ "sso.domains.capture": { action: "sso.domains.capture", operationId: "sso_domains_capture", method: "POST", path: "/sso/domains/{id}/capture", pathParams: ["id"], scope: "sso:write", danger: "critical", approval: true, body: true, pagination: null },
712
+ "sso.domains.create": { action: "sso.domains.create", operationId: "sso_domains_create", method: "POST", path: "/sso/domains", pathParams: [], scope: "sso:write", danger: "write", approval: true, body: true, pagination: null },
713
+ "sso.domains.delete": { action: "sso.domains.delete", operationId: "sso_domains_delete", method: "DELETE", path: "/sso/domains/{id}", pathParams: ["id"], scope: "sso:write", danger: "destructive", approval: true, body: true, pagination: null },
714
+ "sso.domains.list": { action: "sso.domains.list", operationId: "sso_domains_list", method: "GET", path: "/sso/domains", pathParams: [], scope: "sso:read", danger: "read", approval: true, body: false, pagination: "cursor" },
715
+ "sso.domains.verify": { action: "sso.domains.verify", operationId: "sso_domains_verify", method: "POST", path: "/sso/domains/{id}/verify", pathParams: ["id"], scope: "sso:write", danger: "write", approval: true, body: true, pagination: null },
716
+ "sso.saml_metadata.import": { action: "sso.saml_metadata.import", operationId: "sso_saml_metadata_import", method: "POST", path: "/sso/saml-metadata", pathParams: [], scope: "sso:write", danger: "write", approval: true, body: true, pagination: null },
717
+ "support_sessions.end": { action: "support_sessions.end", operationId: "support_sessions_end", method: "DELETE", path: "/support-sessions/{id}", pathParams: ["id"], scope: "support:write", danger: "destructive", approval: true, body: false, pagination: null },
718
+ "support_sessions.start": { action: "support_sessions.start", operationId: "support_sessions_start", method: "POST", path: "/support-sessions", pathParams: [], scope: "support:write", danger: "critical", approval: true, body: true, pagination: null },
719
+ "token_vault.grants.create": { action: "token_vault.grants.create", operationId: "token_vault_grants_create", method: "POST", path: "/token-vault/secrets/{id}/grants", pathParams: ["id"], scope: "token_vault:write", danger: "critical", approval: true, body: true, pagination: null },
720
+ "token_vault.grants.delete": { action: "token_vault.grants.delete", operationId: "token_vault_grants_delete", method: "DELETE", path: "/token-vault/secrets/{id}/grants/{client_id}", pathParams: ["id", "client_id"], scope: "token_vault:write", danger: "destructive", approval: true, body: true, pagination: null },
721
+ "token_vault.secrets.create": { action: "token_vault.secrets.create", operationId: "token_vault_secrets_create", method: "POST", path: "/token-vault/secrets", pathParams: [], scope: "token_vault:write", danger: "write", approval: true, body: true, pagination: null },
722
+ "token_vault.secrets.get": { action: "token_vault.secrets.get", operationId: "token_vault_secrets_get", method: "GET", path: "/token-vault/secrets/{id}", pathParams: ["id"], scope: "token_vault:read", danger: "read", approval: true, body: false, pagination: null },
723
+ "token_vault.secrets.list": { action: "token_vault.secrets.list", operationId: "token_vault_secrets_list", method: "GET", path: "/token-vault/secrets", pathParams: [], scope: "token_vault:read", danger: "read", approval: true, body: false, pagination: "cursor" },
724
+ "token_vault.secrets.revoke": { action: "token_vault.secrets.revoke", operationId: "token_vault_secrets_revoke", method: "POST", path: "/token-vault/secrets/{id}/revoke", pathParams: ["id"], scope: "token_vault:write", danger: "destructive", approval: true, body: true, pagination: null },
725
+ "token_vault.secrets.rotate": { action: "token_vault.secrets.rotate", operationId: "token_vault_secrets_rotate", method: "POST", path: "/token-vault/secrets/{id}/rotate", pathParams: ["id"], scope: "token_vault:write", danger: "critical", approval: true, body: true, pagination: null },
726
+ "users.create": { action: "users.create", operationId: "users_create", method: "POST", path: "/users", pathParams: [], scope: "users:write", danger: "write", approval: true, body: true, pagination: null },
727
+ "users.deactivate": { action: "users.deactivate", operationId: "users_deactivate", method: "DELETE", path: "/users/{id}", pathParams: ["id"], scope: "users:write", danger: "destructive", approval: true, body: false, pagination: null },
728
+ "users.environment_roles.get": { action: "users.environment_roles.get", operationId: "users_environment_roles_get", method: "GET", path: "/users/{id}/environment-roles/{role_id}", pathParams: ["id", "role_id"], scope: "roles:read", danger: "read", approval: true, body: false, pagination: null },
729
+ "users.environment_roles.grant": { action: "users.environment_roles.grant", operationId: "users_environment_roles_grant", method: "PUT", path: "/users/{id}/environment-roles/{role_id}", pathParams: ["id", "role_id"], scope: "roles:write", danger: "critical", approval: true, body: false, pagination: null },
730
+ "users.environment_roles.list": { action: "users.environment_roles.list", operationId: "users_environment_roles_list", method: "GET", path: "/users/{id}/environment-roles", pathParams: ["id"], scope: "roles:read", danger: "read", approval: true, body: false, pagination: null },
731
+ "users.environment_roles.revoke": { action: "users.environment_roles.revoke", operationId: "users_environment_roles_revoke", method: "DELETE", path: "/users/{id}/environment-roles/{role_id}", pathParams: ["id", "role_id"], scope: "roles:write", danger: "destructive", approval: true, body: false, pagination: null },
732
+ "users.erase": { action: "users.erase", operationId: "users_erase", method: "POST", path: "/users/{id}/erase", pathParams: ["id"], scope: "users:erase", danger: "critical", approval: true, body: false, pagination: null },
733
+ "users.get": { action: "users.get", operationId: "users_get", method: "GET", path: "/users/{id}", pathParams: ["id"], scope: "users:read", danger: "read", approval: true, body: false, pagination: null },
734
+ "users.list": { action: "users.list", operationId: "users_list", method: "GET", path: "/users", pathParams: [], scope: "users:read", danger: "read", approval: true, body: false, pagination: "cursor" },
735
+ "users.mfa.reset": { action: "users.mfa.reset", operationId: "users_mfa_reset", method: "DELETE", path: "/users/{id}/mfa", pathParams: ["id"], scope: "users:write", danger: "critical", approval: true, body: false, pagination: null },
736
+ "users.password_reset.send": { action: "users.password_reset.send", operationId: "users_password_reset_send", method: "POST", path: "/users/{id}/password-reset", pathParams: ["id"], scope: "users:write", danger: "write", approval: true, body: false, pagination: null },
737
+ "users.password.set": { action: "users.password.set", operationId: "users_password_set", method: "POST", path: "/users/{id}/password", pathParams: ["id"], scope: "users:write", danger: "critical", approval: true, body: true, pagination: null },
738
+ "users.reactivate": { action: "users.reactivate", operationId: "users_reactivate", method: "POST", path: "/users/{id}/reactivate", pathParams: ["id"], scope: "users:write", danger: "write", approval: true, body: false, pagination: null },
739
+ "users.sessions.list": { action: "users.sessions.list", operationId: "users_sessions_list", method: "GET", path: "/users/{id}/sessions", pathParams: ["id"], scope: "users:read", danger: "read", approval: true, body: false, pagination: null },
740
+ "users.sessions.revoke": { action: "users.sessions.revoke", operationId: "users_sessions_revoke", method: "DELETE", path: "/users/{id}/sessions/{session_id}", pathParams: ["id", "session_id"], scope: "users:write", danger: "destructive", approval: true, body: false, pagination: null },
741
+ "users.sessions.revoke_all": { action: "users.sessions.revoke_all", operationId: "users_sessions_revoke_all", method: "DELETE", path: "/users/{id}/sessions", pathParams: ["id"], scope: "users:write", danger: "destructive", approval: true, body: false, pagination: null },
742
+ "users.update": { action: "users.update", operationId: "users_update", method: "PATCH", path: "/users/{id}", pathParams: ["id"], scope: "users:write", danger: "critical", approval: true, body: true, pagination: null },
743
+ "users.verification.send": { action: "users.verification.send", operationId: "users_verification_send", method: "POST", path: "/users/{id}/verification", pathParams: ["id"], scope: "users:write", danger: "write", approval: true, body: false, pagination: null },
744
+ "users.verify": { action: "users.verify", operationId: "users_verify", method: "POST", path: "/users/{id}/verify", pathParams: ["id"], scope: "users:write", danger: "critical", approval: true, body: false, pagination: null },
745
+ "webhooks.create": { action: "webhooks.create", operationId: "webhooks_create", method: "POST", path: "/webhooks", pathParams: [], scope: "webhooks:write", danger: "critical", approval: true, body: true, pagination: null },
746
+ "webhooks.delete": { action: "webhooks.delete", operationId: "webhooks_delete", method: "DELETE", path: "/webhooks/{id}", pathParams: ["id"], scope: "webhooks:write", danger: "destructive", approval: true, body: false, pagination: null },
747
+ "webhooks.get": { action: "webhooks.get", operationId: "webhooks_get", method: "GET", path: "/webhooks/{id}", pathParams: ["id"], scope: "webhooks:read", danger: "read", approval: true, body: false, pagination: null },
748
+ "webhooks.list": { action: "webhooks.list", operationId: "webhooks_list", method: "GET", path: "/webhooks", pathParams: [], scope: "webhooks:read", danger: "read", approval: true, body: false, pagination: "cursor" },
749
+ "webhooks.pause": { action: "webhooks.pause", operationId: "webhooks_pause", method: "POST", path: "/webhooks/{id}/pause", pathParams: ["id"], scope: "webhooks:write", danger: "write", approval: true, body: false, pagination: null },
750
+ "webhooks.resume": { action: "webhooks.resume", operationId: "webhooks_resume", method: "POST", path: "/webhooks/{id}/resume", pathParams: ["id"], scope: "webhooks:write", danger: "write", approval: true, body: false, pagination: null },
751
+ "webhooks.secret.rotate": { action: "webhooks.secret.rotate", operationId: "webhooks_secret_rotate", method: "POST", path: "/webhooks/{id}/rotate", pathParams: ["id"], scope: "webhooks:write", danger: "critical", approval: true, body: false, pagination: null },
752
+ "webhooks.signature_scheme.change": { action: "webhooks.signature_scheme.change", operationId: "webhooks_signature_scheme_change", method: "POST", path: "/webhooks/{id}/signature-scheme", pathParams: ["id"], scope: "webhooks:write", danger: "destructive", approval: true, body: true, pagination: null },
753
+ "webhooks.update": { action: "webhooks.update", operationId: "webhooks_update", method: "PATCH", path: "/webhooks/{id}", pathParams: ["id"], scope: "webhooks:write", danger: "write", approval: true, body: true, pagination: null }
754
+ };
755
+ var EnvironmentClient = class {
756
+ /** The transport every method runs on — authentication, retries, approvals. */
757
+ transport;
758
+ constructor(options) {
759
+ this.transport = new ManagementTransport("environment", options);
760
+ }
761
+ /** Call a route by method and path (relative to `/api/v1`) — for anything not generated. */
762
+ request(method, path, input, options) {
763
+ return this.transport.request(method, path, input, options);
764
+ }
765
+ accessReviews = {
766
+ /**
767
+ * Close an access review and apply it: every revoke is carried out, and undecided items get the review's pending policy (revoke by default).
768
+ *
769
+ * Requires scope `governance:write`. Danger: destructive.
770
+ *
771
+ * `POST /access-reviews/{id}/close` · action `access_reviews.close`
772
+ * @scope `governance:write`
773
+ * @danger destructive
774
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
775
+ */
776
+ close: (id, body, options) => this.transport.call(environmentOperations["access_reviews.close"], [id], body, options),
777
+ /**
778
+ * Open an access review of one organization's roles and memberships — or of staff roles — for someone to certify or revoke.
779
+ *
780
+ * Requires scope `governance:write`. Danger: write.
781
+ *
782
+ * `POST /access-reviews` · action `access_reviews.create`
783
+ * @scope `governance:write`
784
+ * @danger write
785
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
786
+ */
787
+ create: (body, options) => this.transport.call(environmentOperations["access_reviews.create"], [], body, options),
788
+ /**
789
+ * Read one access review: its status, due date, pending-item policy and item count.
790
+ *
791
+ * Requires scope `governance:read`. Danger: read.
792
+ *
793
+ * `GET /access-reviews/{id}` · action `access_reviews.get`
794
+ * @scope `governance:read`
795
+ * @danger read
796
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
797
+ */
798
+ get: (id, query, options) => this.transport.call(environmentOperations["access_reviews.get"], [id], query, options),
799
+ /**
800
+ * List access reviews (certification campaigns), open and closed, optionally those covering one organization.
801
+ *
802
+ * Requires scope `governance:read`. Danger: read.
803
+ *
804
+ * `GET /access-reviews` · action `access_reviews.list`
805
+ * @scope `governance:read`
806
+ * @danger read
807
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
808
+ */
809
+ list: (query, options) => this.transport.call(environmentOperations["access_reviews.list"], [], query, options),
810
+ /** Every item of `access_reviews.list`, fetching pages as the iteration reaches them. */
811
+ listAll: (query, options) => this.transport.paginate(environmentOperations["access_reviews.list"], [], query, options),
812
+ items: {
813
+ /**
814
+ * Certify or revoke one item of an open access review. Revokes are applied when the review closes.
815
+ *
816
+ * Requires scope `governance:write`. Danger: write.
817
+ *
818
+ * `POST /access-reviews/{id}/items/{item_id}` · action `access_reviews.items.decide`
819
+ * @scope `governance:write`
820
+ * @danger write
821
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
822
+ */
823
+ decide: (id, itemId, body, options) => this.transport.call(environmentOperations["access_reviews.items.decide"], [id, itemId], body, options),
824
+ /**
825
+ * List the items an access review asks someone to certify or revoke: who holds what, and the decision on each.
826
+ *
827
+ * Requires scope `governance:read`. Danger: read.
828
+ *
829
+ * `GET /access-reviews/{id}/items` · action `access_reviews.items.list`
830
+ * @scope `governance:read`
831
+ * @danger read
832
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
833
+ */
834
+ list: (id, query, options) => this.transport.call(environmentOperations["access_reviews.items.list"], [id], query, options),
835
+ /** Every item of `access_reviews.items.list`, fetching pages as the iteration reaches them. */
836
+ listAll: (id, query, options) => this.transport.paginate(environmentOperations["access_reviews.items.list"], [id], query, options)
837
+ }
838
+ };
839
+ actionApprovals = {
840
+ /**
841
+ * Where an approval this key asked for stands
842
+ *
843
+ * Any key may poll the approvals it raised, and only those: another key's id is a 404.
844
+ * `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.
845
+ *
846
+ * `GET /action-approvals/{id}`
847
+ */
848
+ get: (id, options) => this.transport.call(environmentOperations["action_approvals.get"], [id], void 0, options)
849
+ };
850
+ apiKeys = {
851
+ /**
852
+ * List the API keys an organization's members created for your apps
853
+ *
854
+ * Requires scope `api_keys:read`. Revoked and expired keys are included, marked by
855
+ * `status`. Never the key itself. Narrow to one app with `?client_id=`.
856
+ *
857
+ * `GET /organizations/{organization_id}/api-keys` · action `api_keys.list`
858
+ * @scope `api_keys:read`
859
+ * @danger read
860
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
861
+ */
862
+ list: (organizationId, query, options) => this.transport.call(environmentOperations["api_keys.list"], [organizationId], query, options),
863
+ /** Every item of `api_keys.list`, fetching pages as the iteration reaches them. */
864
+ listAll: (organizationId, query, options) => this.transport.paginate(environmentOperations["api_keys.list"], [organizationId], query, options),
865
+ /**
866
+ * Revoke a member API key
867
+ *
868
+ * Requires scope `api_keys:write`. The key stops verifying at once. Idempotent — an
869
+ * already-revoked key is a 204 too. Recorded as `api_key.revoked`, with this
870
+ * management key as the actor.
871
+ *
872
+ * `DELETE /api-keys/{id}` · action `api_keys.revoke`
873
+ * @scope `api_keys:write`
874
+ * @danger destructive
875
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
876
+ */
877
+ revoke: (id, options) => this.transport.call(environmentOperations["api_keys.revoke"], [id], void 0, options)
878
+ };
879
+ apis = {
880
+ /**
881
+ * Register an API and its scopes
882
+ *
883
+ * Requires scope `apis:write`. Registering an API is the environment's act; no tenant
884
+ * surface can. `identifier` is an absolute URI (RFC 8707) and becomes the token's
885
+ * `aud`. Scope keys are unique across the environment. `client_id` links the app whose
886
+ * roles and permissions the API enforces, and must have the API's owner.
887
+ * `organization_id` makes the API one organization's; left out, the environment owns
888
+ * it. Refusals are `422 invalid_api` with the reason.
889
+ *
890
+ * `POST /apis` · action `apis.create`
891
+ * @scope `apis:write`
892
+ * @danger write
893
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
894
+ */
895
+ create: (body, options) => this.transport.call(environmentOperations["apis.create"], [], body, options),
896
+ /**
897
+ * Delete an API and its scopes
898
+ *
899
+ * Requires scope `apis:write`. Tokens already minted for it keep their `aud` until they
900
+ * expire; apps holding its scope keys keep them as plain scopes.
901
+ *
902
+ * `DELETE /apis/{id}` · action `apis.delete`
903
+ * @scope `apis:write`
904
+ * @danger destructive
905
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
906
+ */
907
+ delete: (id, options) => this.transport.call(environmentOperations["apis.delete"], [id], void 0, options),
908
+ /**
909
+ * Get an API
910
+ *
911
+ * Requires scope `apis:read`.
912
+ *
913
+ * `GET /apis/{id}` · action `apis.get`
914
+ * @scope `apis:read`
915
+ * @danger read
916
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
917
+ */
918
+ get: (id, options) => this.transport.call(environmentOperations["apis.get"], [id], void 0, options),
919
+ /**
920
+ * List registered APIs
921
+ *
922
+ * Requires scope `apis:read`.
923
+ *
924
+ * `GET /apis` · action `apis.list`
925
+ * @scope `apis:read`
926
+ * @danger read
927
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
928
+ */
929
+ list: (query, options) => this.transport.call(environmentOperations["apis.list"], [], query, options),
930
+ /** Every item of `apis.list`, fetching pages as the iteration reaches them. */
931
+ listAll: (query, options) => this.transport.paginate(environmentOperations["apis.list"], [], query, options),
932
+ /**
933
+ * Change an API
934
+ *
935
+ * Requires scope `apis:write`. Any of: `name`; `client_id` (null unlinks the app);
936
+ * `scopes`, which is the **complete** set afterwards — scopes named are added or
937
+ * updated, scopes left out are removed. All or nothing. The identifier never changes:
938
+ * register a new API instead.
939
+ *
940
+ * `PATCH /apis/{id}` · action `apis.update`
941
+ * @scope `apis:write`
942
+ * @danger write
943
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
944
+ */
945
+ update: (id, body, options) => this.transport.call(environmentOperations["apis.update"], [id], body, options),
946
+ scopes: {
947
+ /**
948
+ * Add a scope to an API, or change the description or tenant access of one it owns.
949
+ *
950
+ * Requires scope `apis:write`. Danger: write.
951
+ *
952
+ * `PUT /apis/{id}/scopes/{key}` · action `apis.scopes.define`
953
+ * @scope `apis:write`
954
+ * @danger write
955
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
956
+ */
957
+ define: (id, key, body, options) => this.transport.call(environmentOperations["apis.scopes.define"], [id, key], body, options),
958
+ /**
959
+ * Remove a scope from an API. Apps holding it keep it as a plain scope that no longer reaches the API.
960
+ *
961
+ * Requires scope `apis:write`. Danger: destructive.
962
+ *
963
+ * `DELETE /apis/{id}/scopes/{key}` · action `apis.scopes.remove`
964
+ * @scope `apis:write`
965
+ * @danger destructive
966
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
967
+ */
968
+ remove: (id, key, options) => this.transport.call(environmentOperations["apis.scopes.remove"], [id, key], void 0, options)
969
+ }
970
+ };
971
+ approvals = {
972
+ /**
973
+ * Deny a pending approval request (CIBA) for the person it was raised for: the agent gets access_denied and no token.
974
+ *
975
+ * Requires scope `approvals:write`. Danger: destructive.
976
+ *
977
+ * `POST /agent-requests/{request_id}/deny` · action `approvals.deny`
978
+ * @scope `approvals:write`
979
+ * @danger destructive
980
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
981
+ */
982
+ deny: (requestId, options) => this.transport.call(environmentOperations["approvals.deny"], [requestId], void 0, options),
983
+ /**
984
+ * List the pending requests from agents to act as one of this environment's people (CIBA): which app, for whom, and what it asks.
985
+ *
986
+ * Requires scope `approvals:read`. Danger: read.
987
+ *
988
+ * `GET /agent-requests` · action `approvals.list`
989
+ * @scope `approvals:read`
990
+ * @danger read
991
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
992
+ */
993
+ list: (query, options) => this.transport.call(environmentOperations["approvals.list"], [], query, options),
994
+ /** Every item of `approvals.list`, fetching pages as the iteration reaches them. */
995
+ listAll: (query, options) => this.transport.paginate(environmentOperations["approvals.list"], [], query, options)
996
+ };
997
+ apps = {
998
+ /**
999
+ * Export an app's configuration as a blueprint
1000
+ *
1001
+ * Requires scope `apps:read`. `{id}` is the app's id or its `client_id`. The document
1002
+ * carries the app's settings and none of its identity or credentials: no client id,
1003
+ * no secret, no key set, no owning organization. `POST /apps` with it as `blueprint`
1004
+ * creates the same app in another environment.
1005
+ *
1006
+ * `GET /apps/{id}/blueprint` · action `apps.blueprint`
1007
+ * @scope `apps:read`
1008
+ * @danger read
1009
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1010
+ */
1011
+ blueprint: (id, options) => this.transport.call(environmentOperations["apps.blueprint"], [id], void 0, options),
1012
+ /**
1013
+ * Copy an app into another environment of this project, with a new client id and secret there. A person on the environment console only; a key exports the blueprint instead.
1014
+ *
1015
+ * Requires scope `apps:write`. Danger: critical.
1016
+ *
1017
+ * `POST /apps/{id}/copy` · action `apps.copy`
1018
+ * @scope `apps:write`
1019
+ * @danger critical
1020
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1021
+ */
1022
+ copy: (id, body, options) => this.transport.call(environmentOperations["apps.copy"], [id], body, options),
1023
+ /**
1024
+ * Register an app
1025
+ *
1026
+ * Requires scope `apps:write`. Two ways to describe it:
1027
+ *
1028
+ * - **From a blueprint** — send `GET /apps/{id}/blueprint`'s document from another
1029
+ * environment as `blueprint` (promote staging to production). `name`,
1030
+ * `redirect_uris` and `post_logout_redirect_uris` beside it replace the
1031
+ * blueprint's own, since those usually name the environment it came from. A
1032
+ * `private_key_jwt` blueprint needs `jwks`.
1033
+ * - **Short form** — `name` and `type` (`web`, `spa`, `cli`, `service`, `agent`; default
1034
+ * `web`), which decide the client type, grants and default scopes as the console's
1035
+ * "Create app" does. `advanced` takes `client_type` and `grant_types`.
1036
+ *
1037
+ * The response carries `client_secret` for an app that authenticates with one —
1038
+ * **once**. Only its hash is kept, and an idempotent replay returns `client_secret: null`.
1039
+ *
1040
+ * A platform scope reserved for the console (`vault.manage`, `decisions:read`) is
1041
+ * refused (`scope_not_grantable`), as is a registered API's scope this app's owner may
1042
+ * not hold. Danger: critical — it mints a credential.
1043
+ *
1044
+ * `POST /apps` · action `apps.create`
1045
+ * @scope `apps:write`
1046
+ * @danger critical
1047
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1048
+ */
1049
+ create: (body, options) => this.transport.call(environmentOperations["apps.create"], [], body, options),
1050
+ /**
1051
+ * Delete an app and every secret it holds. Anything signing in as it stops working immediately.
1052
+ *
1053
+ * Requires scope `apps:write`. Danger: critical.
1054
+ *
1055
+ * `DELETE /apps/{id}` · action `apps.delete`
1056
+ * @scope `apps:write`
1057
+ * @danger critical
1058
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1059
+ */
1060
+ delete: (id, options) => this.transport.call(environmentOperations["apps.delete"], [id], void 0, options),
1061
+ /**
1062
+ * Get one app (OAuth client) by its id or its client_id: its kind, grants, redirect URIs, scopes and settings. Never a secret.
1063
+ *
1064
+ * Requires scope `apps:read`. Danger: read.
1065
+ *
1066
+ * `GET /apps/{id}` · action `apps.get`
1067
+ * @scope `apps:read`
1068
+ * @danger read
1069
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1070
+ */
1071
+ get: (id, options) => this.transport.call(environmentOperations["apps.get"], [id], void 0, options),
1072
+ /**
1073
+ * List apps
1074
+ *
1075
+ * Requires scope `apps:read`. Never a secret.
1076
+ *
1077
+ * `GET /apps` · action `apps.list`
1078
+ * @scope `apps:read`
1079
+ * @danger read
1080
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1081
+ */
1082
+ list: (query, options) => this.transport.call(environmentOperations["apps.list"], [], query, options),
1083
+ /** Every item of `apps.list`, fetching pages as the iteration reaches them. */
1084
+ listAll: (query, options) => this.transport.paginate(environmentOperations["apps.list"], [], query, options),
1085
+ /**
1086
+ * Rename an app and replace its redirect URIs or sign-out redirect URIs. Fields left out are unchanged.
1087
+ *
1088
+ * Requires scope `apps:write`. Danger: write.
1089
+ *
1090
+ * `PATCH /apps/{id}` · action `apps.update`
1091
+ * @scope `apps:write`
1092
+ * @danger write
1093
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1094
+ */
1095
+ update: (id, body, options) => this.transport.call(environmentOperations["apps.update"], [id], body, options),
1096
+ manifest: {
1097
+ /**
1098
+ * Set or clear the URL an app publishes its roles-and-permissions manifest at. Does not fetch it; apps.manifest.sync does.
1099
+ *
1100
+ * Requires scope `apps:write`. Danger: write.
1101
+ *
1102
+ * `PUT /apps/{id}/manifest` · action `apps.manifest.set`
1103
+ * @scope `apps:write`
1104
+ * @danger write
1105
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1106
+ */
1107
+ set: (id, body, options) => this.transport.call(environmentOperations["apps.manifest.set"], [id], body, options),
1108
+ /**
1109
+ * Fetch an app's published manifest now and sync the roles and permissions it declares.
1110
+ *
1111
+ * Requires scope `apps:write`. Danger: write.
1112
+ *
1113
+ * `POST /apps/{id}/manifest/sync` · action `apps.manifest.sync`
1114
+ * @scope `apps:write`
1115
+ * @danger write
1116
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1117
+ */
1118
+ sync: (id, options) => this.transport.call(environmentOperations["apps.manifest.sync"], [id], void 0, options)
1119
+ },
1120
+ scopes: {
1121
+ /**
1122
+ * Replace an app's complete scope set — the ceiling of what it may request, applied from its next token.
1123
+ *
1124
+ * Requires scope `apps:write`. Danger: write.
1125
+ *
1126
+ * `PUT /apps/{id}/scopes` · action `apps.scopes.set`
1127
+ * @scope `apps:write`
1128
+ * @danger write
1129
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1130
+ */
1131
+ set: (id, body, options) => this.transport.call(environmentOperations["apps.scopes.set"], [id], body, options)
1132
+ },
1133
+ secrets: {
1134
+ /**
1135
+ * List an app's live client secrets
1136
+ *
1137
+ * Requires scope `apps:read`. Every live secret, newest first: its id (what
1138
+ * `DELETE /apps/{id}/secrets/{secret_id}` names), the characters it ends in, and its
1139
+ * dates — never a secret. `expires_at` is set on one a rotation replaced, still working
1140
+ * through its overlap. An app holds a handful at most, so there is no page to turn.
1141
+ *
1142
+ * `GET /apps/{id}/secrets` · action `apps.secrets.list`
1143
+ * @scope `apps:read`
1144
+ * @danger read
1145
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1146
+ */
1147
+ list: (id, options) => this.transport.call(environmentOperations["apps.secrets.list"], [id], void 0, options),
1148
+ /**
1149
+ * Revoke one of an app's client secrets immediately. Never its last live secret — rotate that instead.
1150
+ *
1151
+ * Requires scope `apps:write`. Danger: critical.
1152
+ *
1153
+ * `DELETE /apps/{id}/secrets/{secret_id}` · action `apps.secrets.revoke`
1154
+ * @scope `apps:write`
1155
+ * @danger critical
1156
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1157
+ */
1158
+ revoke: (id, secretId, options) => this.transport.call(environmentOperations["apps.secrets.revoke"], [id, secretId], void 0, options),
1159
+ /**
1160
+ * Mint a new client secret for an app and retire the current ones after grace_seconds (0 = at once). The new secret is returned once.
1161
+ *
1162
+ * Requires scope `apps:write`. Danger: critical.
1163
+ *
1164
+ * `POST /apps/{id}/secrets` · action `apps.secrets.rotate`
1165
+ * @scope `apps:write`
1166
+ * @danger critical
1167
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1168
+ */
1169
+ rotate: (id, body, options) => this.transport.call(environmentOperations["apps.secrets.rotate"], [id], body, options)
1170
+ },
1171
+ settings: {
1172
+ /**
1173
+ * Set the prefix of an app's customer API keys (acme_live), which lets its users create keys for it, or null to stop new keys.
1174
+ *
1175
+ * Requires scope `apps:write`. Danger: write.
1176
+ *
1177
+ * `PUT /apps/{id}/settings/api-key-prefix` · action `apps.settings.api_key_prefix`
1178
+ * @scope `apps:write`
1179
+ * @danger write
1180
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1181
+ */
1182
+ apiKeyPrefix: (id, body, options) => this.transport.call(environmentOperations["apps.settings.api_key_prefix"], [id], body, options),
1183
+ /**
1184
+ * Set or clear the URI an app is sent a logout token at when somebody signs out (OIDC Back-Channel Logout).
1185
+ *
1186
+ * Requires scope `apps:write`. Danger: write.
1187
+ *
1188
+ * `PUT /apps/{id}/settings/backchannel-logout` · action `apps.settings.backchannel_logout`
1189
+ * @scope `apps:write`
1190
+ * @danger write
1191
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1192
+ */
1193
+ backchannelLogout: (id, body, options) => this.transport.call(environmentOperations["apps.settings.backchannel_logout"], [id], body, options),
1194
+ /**
1195
+ * Turn token exchange (RFC 8693) on or off for a confidential app.
1196
+ *
1197
+ * Requires scope `apps:write`. Danger: write.
1198
+ *
1199
+ * `PUT /apps/{id}/settings/token-exchange` · action `apps.settings.token_exchange`
1200
+ * @scope `apps:write`
1201
+ * @danger write
1202
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1203
+ */
1204
+ tokenExchange: (id, body, options) => this.transport.call(environmentOperations["apps.settings.token_exchange"], [id], body, options),
1205
+ /**
1206
+ * Set how long an app's access tokens live, in seconds, or null for the install's default.
1207
+ *
1208
+ * Requires scope `apps:write`. Danger: write.
1209
+ *
1210
+ * `PUT /apps/{id}/settings/token-lifetime` · action `apps.settings.token_lifetime`
1211
+ * @scope `apps:write`
1212
+ * @danger write
1213
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1214
+ */
1215
+ tokenLifetime: (id, body, options) => this.transport.call(environmentOperations["apps.settings.token_lifetime"], [id], body, options)
1216
+ }
1217
+ };
1218
+ auditLogs = {
1219
+ /**
1220
+ * Re-hash one organization's audit-event chain (from the oldest event retention kept, or from_sequence) and report whether every event is unchanged and in place.
1221
+ *
1222
+ * Requires scope `audit_logs:read`. Danger: read.
1223
+ *
1224
+ * `GET /audit-logs/verify` · action `audit_logs.verify`
1225
+ * @scope `audit_logs:read`
1226
+ * @danger read
1227
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1228
+ */
1229
+ verify: (query, options) => this.transport.call(environmentOperations["audit_logs.verify"], [], query, options),
1230
+ events: {
1231
+ /**
1232
+ * Record 1–100 audit events your app's users caused, each for one of your organizations (customers); checked against the action's schema when it has one and appended to that organization's tamper-evident chain. Send an Idempotency-Key.
1233
+ *
1234
+ * Requires scope `audit_logs:write`. Danger: write.
1235
+ *
1236
+ * `POST /audit-logs/events` · action `audit_logs.events.create`
1237
+ * @scope `audit_logs:write`
1238
+ * @danger write
1239
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1240
+ */
1241
+ create: (body, options) => this.transport.call(environmentOperations["audit_logs.events.create"], [], body, options),
1242
+ /**
1243
+ * Read audit events newest first, for one organization or the whole environment, filtered by action, actor, target and time range; pass `next_cursor` as `after` to page.
1244
+ *
1245
+ * Requires scope `audit_logs:read`. Danger: read.
1246
+ *
1247
+ * `GET /audit-logs/events` · action `audit_logs.events.list`
1248
+ * @scope `audit_logs:read`
1249
+ * @danger read
1250
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1251
+ */
1252
+ list: (query, options) => this.transport.call(environmentOperations["audit_logs.events.list"], [], query, options),
1253
+ /** Every item of `audit_logs.events.list`, fetching pages as the iteration reaches them. */
1254
+ listAll: (query, options) => this.transport.paginate(environmentOperations["audit_logs.events.list"], [], query, options)
1255
+ },
1256
+ exports: {
1257
+ /**
1258
+ * Start a CSV export of audit events (same filters as the list). It is written on the queue: poll audit_logs.exports.get until state is ready, then download from its short-lived url.
1259
+ *
1260
+ * Requires scope `audit_logs:export`. Danger: write.
1261
+ *
1262
+ * `POST /audit-logs/exports` · action `audit_logs.exports.create`
1263
+ * @scope `audit_logs:export`
1264
+ * @danger write
1265
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1266
+ */
1267
+ create: (body, options) => this.transport.call(environmentOperations["audit_logs.exports.create"], [], body, options),
1268
+ /**
1269
+ * Read an audit-log export's state; once ready it carries a signed download url valid for a few minutes (read it again for a fresh one).
1270
+ *
1271
+ * Requires scope `audit_logs:read`. Danger: read.
1272
+ *
1273
+ * `GET /audit-logs/exports/{id}` · action `audit_logs.exports.get`
1274
+ * @scope `audit_logs:read`
1275
+ * @danger read
1276
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1277
+ */
1278
+ get: (id, options) => this.transport.call(environmentOperations["audit_logs.exports.get"], [id], void 0, options)
1279
+ },
1280
+ schemas: {
1281
+ /**
1282
+ * Define the schema one audit-log action's events must match — allowed target types and metadata schemas (a subset of JSON Schema). Events of that action are then validated on arrival.
1283
+ *
1284
+ * Requires scope `audit_logs:manage`. Danger: write.
1285
+ *
1286
+ * `POST /audit-logs/schemas` · action `audit_logs.schemas.create`
1287
+ * @scope `audit_logs:manage`
1288
+ * @danger write
1289
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1290
+ */
1291
+ create: (body, options) => this.transport.call(environmentOperations["audit_logs.schemas.create"], [], body, options),
1292
+ /**
1293
+ * Delete an audit-log action's schema. Its events are then accepted unchecked — or refused, if the environment is in strict mode.
1294
+ *
1295
+ * Requires scope `audit_logs:manage`. Danger: destructive.
1296
+ *
1297
+ * `DELETE /audit-logs/schemas/{action}` · action `audit_logs.schemas.delete`
1298
+ * @scope `audit_logs:manage`
1299
+ * @danger destructive
1300
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1301
+ */
1302
+ delete: (action, options) => this.transport.call(environmentOperations["audit_logs.schemas.delete"], [action], void 0, options),
1303
+ /**
1304
+ * Read the schema one audit-log action's events are validated against.
1305
+ *
1306
+ * Requires scope `audit_logs:read`. Danger: read.
1307
+ *
1308
+ * `GET /audit-logs/schemas/{action}` · action `audit_logs.schemas.get`
1309
+ * @scope `audit_logs:read`
1310
+ * @danger read
1311
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1312
+ */
1313
+ get: (action, options) => this.transport.call(environmentOperations["audit_logs.schemas.get"], [action], void 0, options),
1314
+ /**
1315
+ * List the audit-log schemas this environment validates events against, one per action.
1316
+ *
1317
+ * Requires scope `audit_logs:read`. Danger: read.
1318
+ *
1319
+ * `GET /audit-logs/schemas` · action `audit_logs.schemas.list`
1320
+ * @scope `audit_logs:read`
1321
+ * @danger read
1322
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1323
+ */
1324
+ list: (query, options) => this.transport.call(environmentOperations["audit_logs.schemas.list"], [], query, options),
1325
+ /** Every item of `audit_logs.schemas.list`, fetching pages as the iteration reaches them. */
1326
+ listAll: (query, options) => this.transport.paginate(environmentOperations["audit_logs.schemas.list"], [], query, options),
1327
+ /**
1328
+ * Replace an audit-log action's schema with a new version (omitted parts are removed). Recorded events keep the version they were checked against.
1329
+ *
1330
+ * Requires scope `audit_logs:manage`. Danger: write.
1331
+ *
1332
+ * `PUT /audit-logs/schemas/{action}` · action `audit_logs.schemas.update`
1333
+ * @scope `audit_logs:manage`
1334
+ * @danger write
1335
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1336
+ */
1337
+ update: (action, body, options) => this.transport.call(environmentOperations["audit_logs.schemas.update"], [action], body, options)
1338
+ },
1339
+ settings: {
1340
+ /**
1341
+ * Read this environment's audit-log settings: retention in days and whether strict schemas are on.
1342
+ *
1343
+ * Requires scope `audit_logs:read`. Danger: read.
1344
+ *
1345
+ * `GET /audit-logs/settings` · action `audit_logs.settings.get`
1346
+ * @scope `audit_logs:read`
1347
+ * @danger read
1348
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1349
+ */
1350
+ get: (options) => this.transport.call(environmentOperations["audit_logs.settings.get"], [], void 0, options),
1351
+ /**
1352
+ * Change this environment's audit-log retention (days, 1–3650) and strict mode. Shortening retention deletes older events at the next daily prune — irreversibly.
1353
+ *
1354
+ * Requires scope `audit_logs:manage`. Danger: destructive.
1355
+ *
1356
+ * `PATCH /audit-logs/settings` · action `audit_logs.settings.update`
1357
+ * @scope `audit_logs:manage`
1358
+ * @danger destructive
1359
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1360
+ */
1361
+ update: (body, options) => this.transport.call(environmentOperations["audit_logs.settings.update"], [], body, options)
1362
+ }
1363
+ };
1364
+ audit = {
1365
+ /**
1366
+ * Read this environment's audit trail oldest first, optionally narrowed by action, actor type or organization; pass the last id as `after` to page.
1367
+ *
1368
+ * Requires scope `audit:read`. Danger: read.
1369
+ *
1370
+ * `GET /audit-log` · action `audit.list`
1371
+ * @scope `audit:read`
1372
+ * @danger read
1373
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1374
+ */
1375
+ list: (query, options) => this.transport.call(environmentOperations["audit.list"], [], query, options),
1376
+ /** Every item of `audit.list`, fetching pages as the iteration reaches them. */
1377
+ listAll: (query, options) => this.transport.paginate(environmentOperations["audit.list"], [], query, options)
1378
+ };
1379
+ branding = {
1380
+ appearance: {
1381
+ /**
1382
+ * Read the hosted sign-in theme: the environment default, or one organization's own.
1383
+ *
1384
+ * Requires scope `branding:read`. Danger: read.
1385
+ *
1386
+ * `GET /branding/appearance` · action `branding.appearance.get`
1387
+ * @scope `branding:read`
1388
+ * @danger read
1389
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1390
+ */
1391
+ get: (query, options) => this.transport.call(environmentOperations["branding.appearance.get"], [], query, options),
1392
+ /**
1393
+ * Set the hosted sign-in theme (preset, colours, corners, type, logo) for the environment default or one organization.
1394
+ *
1395
+ * Requires scope `branding:write`. Danger: write.
1396
+ *
1397
+ * `PUT /branding/appearance` · action `branding.appearance.set`
1398
+ * @scope `branding:write`
1399
+ * @danger write
1400
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1401
+ */
1402
+ set: (body, options) => this.transport.call(environmentOperations["branding.appearance.set"], [], body, options)
1403
+ },
1404
+ whitelabel: {
1405
+ /**
1406
+ * Read the white-label branding (palette, app name, email sender, logo) of the environment default or one organization.
1407
+ *
1408
+ * Requires scope `branding:read`. Danger: read.
1409
+ *
1410
+ * `GET /branding/whitelabel` · action `branding.whitelabel.get`
1411
+ * @scope `branding:read`
1412
+ * @danger read
1413
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1414
+ */
1415
+ get: (query, options) => this.transport.call(environmentOperations["branding.whitelabel.get"], [], query, options),
1416
+ /**
1417
+ * Save the white-label branding (palette, app name, email sender, welcome email) of the environment default or one organization.
1418
+ *
1419
+ * Requires scope `branding:write`. Danger: write.
1420
+ *
1421
+ * `PUT /branding/whitelabel` · action `branding.whitelabel.set`
1422
+ * @scope `branding:write`
1423
+ * @danger write
1424
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1425
+ */
1426
+ set: (body, options) => this.transport.call(environmentOperations["branding.whitelabel.set"], [], body, options)
1427
+ }
1428
+ };
1429
+ directories = {
1430
+ /**
1431
+ * Connect a Google Workspace or Microsoft Entra directory to sync an organization's people from, verifying the credentials first. Runs the first sync.
1432
+ *
1433
+ * Requires scope `directory_sync:write`. Danger: critical.
1434
+ *
1435
+ * `POST /directories/connect` · action `directories.connect`
1436
+ * @scope `directory_sync:write`
1437
+ * @danger critical
1438
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1439
+ */
1440
+ connect: (body, options) => this.transport.call(environmentOperations["directories.connect"], [], body, options),
1441
+ /**
1442
+ * Register a SCIM directory for an organization. Answers the SCIM base URL and a bearer token, shown once.
1443
+ *
1444
+ * Requires scope `directory_sync:write`. Danger: critical.
1445
+ *
1446
+ * `POST /directories` · action `directories.create`
1447
+ * @scope `directory_sync:write`
1448
+ * @danger critical
1449
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1450
+ */
1451
+ create: (body, options) => this.transport.call(environmentOperations["directories.create"], [], body, options),
1452
+ /**
1453
+ * Delete an inbound directory. Its token stops working; the people it provisioned keep their accounts.
1454
+ *
1455
+ * Requires scope `directory_sync:write`. Danger: destructive.
1456
+ *
1457
+ * `DELETE /directories/{id}` · action `directories.delete`
1458
+ * @scope `directory_sync:write`
1459
+ * @danger destructive
1460
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1461
+ */
1462
+ delete: (id, body, options) => this.transport.call(environmentOperations["directories.delete"], [id], body, options),
1463
+ /**
1464
+ * Read one inbound directory: its provider, status, SCIM base URL and last sync error. Never its token or credentials.
1465
+ *
1466
+ * Requires scope `directory_sync:read`. Danger: read.
1467
+ *
1468
+ * `GET /directories/{id}` · action `directories.get`
1469
+ * @scope `directory_sync:read`
1470
+ * @danger read
1471
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1472
+ */
1473
+ get: (id, query, options) => this.transport.call(environmentOperations["directories.get"], [id], query, options),
1474
+ /**
1475
+ * List the directories (SCIM, Google Workspace, Microsoft Entra) syncing people in, optionally for one organization, with their last sync error.
1476
+ *
1477
+ * Requires scope `directory_sync:read`. Danger: read.
1478
+ *
1479
+ * `GET /directories` · action `directories.list`
1480
+ * @scope `directory_sync:read`
1481
+ * @danger read
1482
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1483
+ */
1484
+ list: (query, options) => this.transport.call(environmentOperations["directories.list"], [], query, options),
1485
+ /** Every item of `directories.list`, fetching pages as the iteration reaches them. */
1486
+ listAll: (query, options) => this.transport.paginate(environmentOperations["directories.list"], [], query, options),
1487
+ /**
1488
+ * Rename an inbound directory.
1489
+ *
1490
+ * Requires scope `directory_sync:write`. Danger: write.
1491
+ *
1492
+ * `PATCH /directories/{id}` · action `directories.update`
1493
+ * @scope `directory_sync:write`
1494
+ * @danger write
1495
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1496
+ */
1497
+ update: (id, body, options) => this.transport.call(environmentOperations["directories.update"], [id], body, options),
1498
+ groups: {
1499
+ /**
1500
+ * List the groups a directory has synced, with the role ids each group is mapped onto.
1501
+ *
1502
+ * Requires scope `directory_sync:read`. Danger: read.
1503
+ *
1504
+ * `GET /directories/{id}/groups` · action `directories.groups.list`
1505
+ * @scope `directory_sync:read`
1506
+ * @danger read
1507
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1508
+ */
1509
+ list: (id, query, options) => this.transport.call(environmentOperations["directories.groups.list"], [id], query, options),
1510
+ /** Every item of `directories.groups.list`, fetching pages as the iteration reaches them. */
1511
+ listAll: (id, query, options) => this.transport.paginate(environmentOperations["directories.groups.list"], [id], query, options),
1512
+ /**
1513
+ * Map a directory group onto a role (everyone in the group holds it as membership syncs), or unmap it.
1514
+ *
1515
+ * Requires scope `directory_sync:write`. Danger: write.
1516
+ *
1517
+ * `POST /directories/{id}/group-roles` · action `directories.groups.map`
1518
+ * @scope `directory_sync:write`
1519
+ * @danger write
1520
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1521
+ */
1522
+ map: (id, body, options) => this.transport.call(environmentOperations["directories.groups.map"], [id], body, options)
1523
+ },
1524
+ status: {
1525
+ /**
1526
+ * Pause or resume an inbound directory's provisioning.
1527
+ *
1528
+ * Requires scope `directory_sync:write`. Danger: write.
1529
+ *
1530
+ * `POST /directories/{id}/status` · action `directories.status.set`
1531
+ * @scope `directory_sync:write`
1532
+ * @danger write
1533
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1534
+ */
1535
+ set: (id, body, options) => this.transport.call(environmentOperations["directories.status.set"], [id], body, options)
1536
+ },
1537
+ token: {
1538
+ /**
1539
+ * Issue a new bearer token for a SCIM directory, returned once. The old token stops working immediately.
1540
+ *
1541
+ * Requires scope `directory_sync:write`. Danger: critical.
1542
+ *
1543
+ * `POST /directories/{id}/rotate` · action `directories.token.rotate`
1544
+ * @scope `directory_sync:write`
1545
+ * @danger critical
1546
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1547
+ */
1548
+ rotate: (id, body, options) => this.transport.call(environmentOperations["directories.token.rotate"], [id], body, options)
1549
+ }
1550
+ };
1551
+ domains = {
1552
+ /**
1553
+ * Start serving this environment on a custom domain: returns the DNS TXT record that proves you control it.
1554
+ *
1555
+ * Requires scope `domains:write`. Danger: write.
1556
+ *
1557
+ * `POST /domains` · action `domains.add`
1558
+ * @scope `domains:write`
1559
+ * @danger write
1560
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1561
+ */
1562
+ add: (body, options) => this.transport.call(environmentOperations["domains.add"], [], body, options),
1563
+ /**
1564
+ * Read this environment's custom domain, and the DNS TXT record that proves a pending one.
1565
+ *
1566
+ * Requires scope `domains:read`. Danger: read.
1567
+ *
1568
+ * `GET /domains` · action `domains.get`
1569
+ * @scope `domains:read`
1570
+ * @danger read
1571
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1572
+ */
1573
+ get: (options) => this.transport.call(environmentOperations["domains.get"], [], void 0, options),
1574
+ /**
1575
+ * Stop serving this environment on its custom domain. Anything using that domain stops reaching the environment.
1576
+ *
1577
+ * Requires scope `domains:write`. Danger: destructive.
1578
+ *
1579
+ * `DELETE /domains` · action `domains.remove`
1580
+ * @scope `domains:write`
1581
+ * @danger destructive
1582
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1583
+ */
1584
+ remove: (options) => this.transport.call(environmentOperations["domains.remove"], [], void 0, options),
1585
+ /**
1586
+ * Look for the pending domain's DNS TXT record and, once it is visible, serve this environment on that domain.
1587
+ *
1588
+ * Requires scope `domains:write`. Danger: write.
1589
+ *
1590
+ * `POST /domains/verify` · action `domains.verify`
1591
+ * @scope `domains:write`
1592
+ * @danger write
1593
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1594
+ */
1595
+ verify: (options) => this.transport.call(environmentOperations["domains.verify"], [], void 0, options)
1596
+ };
1597
+ events = {
1598
+ /**
1599
+ * Read this environment's domain events (the facts webhooks deliver) oldest first; pass the last id as `after` to poll for new ones.
1600
+ *
1601
+ * Requires scope `events:read`. Danger: read.
1602
+ *
1603
+ * `GET /events` · action `events.list`
1604
+ * @scope `events:read`
1605
+ * @danger read
1606
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1607
+ */
1608
+ list: (query, options) => this.transport.call(environmentOperations["events.list"], [], query, options),
1609
+ /** Every item of `events.list`, fetching pages as the iteration reaches them. */
1610
+ listAll: (query, options) => this.transport.paginate(environmentOperations["events.list"], [], query, options)
1611
+ };
1612
+ frontendKeys = {
1613
+ /**
1614
+ * Create a publishable frontend key for a browser app, usable only from the origins listed. The key is public by design.
1615
+ *
1616
+ * Requires scope `frontend_keys:write`. Danger: write.
1617
+ *
1618
+ * `POST /frontend-keys` · action `frontend_keys.create`
1619
+ * @scope `frontend_keys:write`
1620
+ * @danger write
1621
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1622
+ */
1623
+ create: (body, options) => this.transport.call(environmentOperations["frontend_keys.create"], [], body, options),
1624
+ /**
1625
+ * List the publishable frontend keys browser apps present to the Frontend API, in full, with their allowed origins.
1626
+ *
1627
+ * Requires scope `frontend_keys:read`. Danger: read.
1628
+ *
1629
+ * `GET /frontend-keys` · action `frontend_keys.list`
1630
+ * @scope `frontend_keys:read`
1631
+ * @danger read
1632
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1633
+ */
1634
+ list: (query, options) => this.transport.call(environmentOperations["frontend_keys.list"], [], query, options),
1635
+ /** Every item of `frontend_keys.list`, fetching pages as the iteration reaches them. */
1636
+ listAll: (query, options) => this.transport.paginate(environmentOperations["frontend_keys.list"], [], query, options),
1637
+ /**
1638
+ * Revoke a publishable frontend key. Pages still holding it stop working immediately.
1639
+ *
1640
+ * Requires scope `frontend_keys:write`. Danger: destructive.
1641
+ *
1642
+ * `DELETE /frontend-keys/{id}` · action `frontend_keys.revoke`
1643
+ * @scope `frontend_keys:write`
1644
+ * @danger destructive
1645
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1646
+ */
1647
+ revoke: (id, options) => this.transport.call(environmentOperations["frontend_keys.revoke"], [id], void 0, options),
1648
+ /**
1649
+ * Replace the exact list of origins allowed to present a publishable frontend key. Live on the next request.
1650
+ *
1651
+ * Requires scope `frontend_keys:write`. Danger: write.
1652
+ *
1653
+ * `PUT /frontend-keys/{id}/origins` · action `frontend_keys.set_origins`
1654
+ * @scope `frontend_keys:write`
1655
+ * @danger write
1656
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1657
+ */
1658
+ setOrigins: (id, body, options) => this.transport.call(environmentOperations["frontend_keys.set_origins"], [id], body, options)
1659
+ };
1660
+ hooks = {
1661
+ /**
1662
+ * Register a hook at a hook point (token minting, login, registration, password change). Returns its signing secret once.
1663
+ *
1664
+ * Requires scope `hooks:write`. Danger: critical.
1665
+ *
1666
+ * `POST /hooks` · action `hooks.create`
1667
+ * @scope `hooks:write`
1668
+ * @danger critical
1669
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1670
+ */
1671
+ create: (body, options) => this.transport.call(environmentOperations["hooks.create"], [], body, options),
1672
+ /**
1673
+ * Remove a hook. It is no longer called at its hook point.
1674
+ *
1675
+ * Requires scope `hooks:write`. Danger: destructive.
1676
+ *
1677
+ * `DELETE /hooks/{id}` · action `hooks.delete`
1678
+ * @scope `hooks:write`
1679
+ * @danger destructive
1680
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1681
+ */
1682
+ delete: (id, options) => this.transport.call(environmentOperations["hooks.delete"], [id], void 0, options),
1683
+ /**
1684
+ * Get one hook: its URL, hook point, owner and whether it is active. Never its signing secret.
1685
+ *
1686
+ * Requires scope `hooks:read`. Danger: read.
1687
+ *
1688
+ * `GET /hooks/{id}` · action `hooks.get`
1689
+ * @scope `hooks:read`
1690
+ * @danger read
1691
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1692
+ */
1693
+ get: (id, options) => this.transport.call(environmentOperations["hooks.get"], [id], void 0, options),
1694
+ /**
1695
+ * List the hooks — endpoints called during sign-in and token issuance — with their hook point, owner and whether each is active.
1696
+ *
1697
+ * Requires scope `hooks:read`. Danger: read.
1698
+ *
1699
+ * `GET /hooks` · action `hooks.list`
1700
+ * @scope `hooks:read`
1701
+ * @danger read
1702
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1703
+ */
1704
+ list: (query, options) => this.transport.call(environmentOperations["hooks.list"], [], query, options),
1705
+ /** Every item of `hooks.list`, fetching pages as the iteration reaches them. */
1706
+ listAll: (query, options) => this.transport.paginate(environmentOperations["hooks.list"], [], query, options),
1707
+ /**
1708
+ * Pause (active: false) or activate (active: true) a hook.
1709
+ *
1710
+ * Requires scope `hooks:write`. Danger: critical.
1711
+ *
1712
+ * `PATCH /hooks/{id}` · action `hooks.update`
1713
+ * @scope `hooks:write`
1714
+ * @danger critical
1715
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1716
+ */
1717
+ update: (id, body, options) => this.transport.call(environmentOperations["hooks.update"], [id], body, options)
1718
+ };
1719
+ invitations = {
1720
+ /**
1721
+ * List an organization's pending invitations
1722
+ *
1723
+ * Requires scope `invitations:read`. Pending and unexpired only.
1724
+ *
1725
+ * `GET /organizations/{organization_id}/invitations` · action `invitations.list`
1726
+ * @scope `invitations:read`
1727
+ * @danger read
1728
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1729
+ */
1730
+ list: (organizationId, query, options) => this.transport.call(environmentOperations["invitations.list"], [organizationId], query, options),
1731
+ /** Every item of `invitations.list`, fetching pages as the iteration reaches them. */
1732
+ listAll: (organizationId, query, options) => this.transport.paginate(environmentOperations["invitations.list"], [organizationId], query, options),
1733
+ /**
1734
+ * Mail a pending invitation again
1735
+ *
1736
+ * Requires scope `invitations:write`. On a **fresh link**: only a hash of the old one is
1737
+ * kept, so it cannot be re-sent, and the reason people ask is usually that it expired.
1738
+ * The response is the NEW invitation — its `id` replaces the old one, which stops
1739
+ * working. Its roles and app context move with it.
1740
+ *
1741
+ * One re-send per address per minute (`429 too_soon`); `409 not_pending` for one that
1742
+ * was accepted, withdrawn or has expired; `503 mail_failed` keeps the invitation.
1743
+ *
1744
+ * `POST /organizations/{organization_id}/invitations/{invitation_id}/resend` · action `invitations.resend`
1745
+ * @scope `invitations:write`
1746
+ * @danger write
1747
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1748
+ */
1749
+ resend: (organizationId, invitationId, options) => this.transport.call(environmentOperations["invitations.resend"], [organizationId, invitationId], void 0, options),
1750
+ /**
1751
+ * Withdraw a pending invitation
1752
+ *
1753
+ * Requires scope `invitations:write`. The link stops working, and the roles parked
1754
+ * for it go with it. `409 not_pending` for one already accepted, withdrawn or expired.
1755
+ *
1756
+ * `DELETE /organizations/{organization_id}/invitations/{invitation_id}` · action `invitations.revoke`
1757
+ * @scope `invitations:write`
1758
+ * @danger destructive
1759
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1760
+ */
1761
+ revoke: (organizationId, invitationId, options) => this.transport.call(environmentOperations["invitations.revoke"], [organizationId, invitationId], void 0, options),
1762
+ /**
1763
+ * Invite someone to the organization
1764
+ *
1765
+ * Requires scope `invitations:write`. Mails a link; the person joins when they open it
1766
+ * and confirm. Inviting an address again replaces its earlier pending invitation.
1767
+ *
1768
+ * - `role` — `admin` or `member` (default `member`). Never `owner`.
1769
+ * - `roles` — access roles granted when the invitation is accepted: role ids, or your
1770
+ * app's manifest **keys** when `client_id` names the app that declared them. Only
1771
+ * roles the organization's own administrators could grant are accepted: a **staff
1772
+ * role** is refused (`422 role_not_assignable`) — grant it after they join, with
1773
+ * `PUT …/members/{user_id}/roles/{role_id}`.
1774
+ * - `client_id` + `return_to` — after accepting, the person is sent to `return_to`,
1775
+ * which must be on one of that app's registered redirect-URI origins (checked again
1776
+ * when the invitation is accepted).
1777
+ * - `inviter_name` — who the mail says it is from. Defaults to the app's name, or the
1778
+ * environment's.
1779
+ *
1780
+ * Refusals: `409 already_member`, `409 access_role_conflict` (segregation of duties),
1781
+ * `422 unknown_role`, `422 role_not_assignable`, `422 unknown_app`,
1782
+ * `422 return_without_app`, `422 return_to_malformed`, `422 return_to_not_registered`,
1783
+ * `503 mail_failed` (nothing was created — retry).
1784
+ *
1785
+ * `POST /organizations/{organization_id}/invitations` · action `invitations.send`
1786
+ * @scope `invitations:write`
1787
+ * @danger write
1788
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1789
+ */
1790
+ send: (organizationId, body, options) => this.transport.call(environmentOperations["invitations.send"], [organizationId], body, options)
1791
+ };
1792
+ keys = {
1793
+ /**
1794
+ * Mint a management key for this environment, at most as wide as the caller. The value is returned once, as `token`.
1795
+ *
1796
+ * Requires scope `keys:write`. Danger: critical.
1797
+ *
1798
+ * `POST /keys` · action `keys.create`
1799
+ * @scope `keys:write`
1800
+ * @danger critical
1801
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1802
+ */
1803
+ create: (body, options) => this.transport.call(environmentOperations["keys.create"], [], body, options),
1804
+ /**
1805
+ * List this environment's management keys (names, scopes, parents, expiry, last use — never their values).
1806
+ *
1807
+ * Requires scope `keys:read`. Danger: read.
1808
+ *
1809
+ * `GET /keys` · action `keys.list`
1810
+ * @scope `keys:read`
1811
+ * @danger read
1812
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1813
+ */
1814
+ list: (query, options) => this.transport.call(environmentOperations["keys.list"], [], query, options),
1815
+ /** Every item of `keys.list`, fetching pages as the iteration reaches them. */
1816
+ listAll: (query, options) => this.transport.paginate(environmentOperations["keys.list"], [], query, options),
1817
+ /**
1818
+ * Revoke a management key and every key it minted, immediately.
1819
+ *
1820
+ * Requires scope `keys:write`. Danger: destructive.
1821
+ *
1822
+ * `DELETE /keys/{id}` · action `keys.revoke`
1823
+ * @scope `keys:write`
1824
+ * @danger destructive
1825
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1826
+ */
1827
+ revoke: (id, options) => this.transport.call(environmentOperations["keys.revoke"], [id], void 0, options),
1828
+ /**
1829
+ * Rotate a management key: mint a successor with the same scopes and retire the old one after a grace period.
1830
+ *
1831
+ * Requires scope `keys:write`. Danger: critical.
1832
+ *
1833
+ * `POST /keys/{id}/rotate` · action `keys.rotate`
1834
+ * @scope `keys:write`
1835
+ * @danger critical
1836
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1837
+ */
1838
+ rotate: (id, body, options) => this.transport.call(environmentOperations["keys.rotate"], [id], body, options)
1839
+ };
1840
+ legacyLogin = {
1841
+ /**
1842
+ * Approve the declared legacy login endpoint: sign-ins for people not yet migrated, with their passwords, go to that URL.
1843
+ *
1844
+ * Requires scope `signin:write`. Danger: critical.
1845
+ *
1846
+ * `POST /legacy-login/approve` · action `legacy_login.approve`
1847
+ * @scope `signin:write`
1848
+ * @danger critical
1849
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1850
+ */
1851
+ approve: (options) => this.transport.call(environmentOperations["legacy_login.approve"], [], void 0, options),
1852
+ /**
1853
+ * Read the legacy login endpoint an app declared for migration, and whether it is approved to receive sign-ins.
1854
+ *
1855
+ * Requires scope `signin:read`. Danger: read.
1856
+ *
1857
+ * `GET /legacy-login` · action `legacy_login.get`
1858
+ * @scope `signin:read`
1859
+ * @danger read
1860
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1861
+ */
1862
+ get: (options) => this.transport.call(environmentOperations["legacy_login.get"], [], void 0, options),
1863
+ /**
1864
+ * Ask the declared legacy login endpoint whether it knows an address — your own — to test it before approving. Sends no password.
1865
+ *
1866
+ * Requires scope `signin:write`. Danger: write.
1867
+ *
1868
+ * `POST /legacy-login/probe` · action `legacy_login.probe`
1869
+ * @scope `signin:write`
1870
+ * @danger write
1871
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1872
+ */
1873
+ probe: (body, options) => this.transport.call(environmentOperations["legacy_login.probe"], [], body, options),
1874
+ /**
1875
+ * Withdraw the legacy login approval. People not yet migrated can no longer sign in; the declaration stays on file.
1876
+ *
1877
+ * Requires scope `signin:write`. Danger: critical.
1878
+ *
1879
+ * `POST /legacy-login/revoke` · action `legacy_login.revoke`
1880
+ * @scope `signin:write`
1881
+ * @danger critical
1882
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1883
+ */
1884
+ revoke: (options) => this.transport.call(environmentOperations["legacy_login.revoke"], [], void 0, options)
1885
+ };
1886
+ logStreams = {
1887
+ /**
1888
+ * Stream the audit trail to a SIEM (Splunk, Elastic, Graylog, CEF, JSON), Datadog, or an S3 or GCS bucket. A generated HMAC key is returned once.
1889
+ *
1890
+ * Requires scope `log_streams:write`. Danger: critical.
1891
+ *
1892
+ * `POST /log-streams` · action `log_streams.create`
1893
+ * @scope `log_streams:write`
1894
+ * @danger critical
1895
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1896
+ */
1897
+ create: (body, options) => this.transport.call(environmentOperations["log_streams.create"], [], body, options),
1898
+ /**
1899
+ * Delete an audit log stream. Nothing more is delivered to its endpoint.
1900
+ *
1901
+ * Requires scope `log_streams:write`. Danger: destructive.
1902
+ *
1903
+ * `DELETE /log-streams/{id}` · action `log_streams.delete`
1904
+ * @scope `log_streams:write`
1905
+ * @danger destructive
1906
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1907
+ */
1908
+ delete: (id, options) => this.transport.call(environmentOperations["log_streams.delete"], [id], void 0, options),
1909
+ /**
1910
+ * Get one audit log stream: destination, endpoint, auth scheme, owner and health. Never its secret.
1911
+ *
1912
+ * Requires scope `log_streams:read`. Danger: read.
1913
+ *
1914
+ * `GET /log-streams/{id}` · action `log_streams.get`
1915
+ * @scope `log_streams:read`
1916
+ * @danger read
1917
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1918
+ */
1919
+ get: (id, options) => this.transport.call(environmentOperations["log_streams.get"], [id], void 0, options),
1920
+ /**
1921
+ * List the SIEM destinations this environment's audit trail is streamed to, and whether each is enabled. Never a secret.
1922
+ *
1923
+ * Requires scope `log_streams:read`. Danger: read.
1924
+ *
1925
+ * `GET /log-streams` · action `log_streams.list`
1926
+ * @scope `log_streams:read`
1927
+ * @danger read
1928
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1929
+ */
1930
+ list: (query, options) => this.transport.call(environmentOperations["log_streams.list"], [], query, options),
1931
+ /** Every item of `log_streams.list`, fetching pages as the iteration reaches them. */
1932
+ listAll: (query, options) => this.transport.paginate(environmentOperations["log_streams.list"], [], query, options),
1933
+ /**
1934
+ * Send one test event to a log stream now and report whether the destination accepted it, and if not, why.
1935
+ *
1936
+ * Requires scope `log_streams:write`. Danger: write.
1937
+ *
1938
+ * `POST /log-streams/{id}/test` · action `log_streams.test`
1939
+ * @scope `log_streams:write`
1940
+ * @danger write
1941
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1942
+ */
1943
+ test: (id, options) => this.transport.call(environmentOperations["log_streams.test"], [id], void 0, options),
1944
+ /**
1945
+ * Change an audit log stream's name, destination, endpoint, options or credential (re-validated; resets its circuit breaker), or disable (enabled: false) / resume (enabled: true) it.
1946
+ *
1947
+ * Requires scope `log_streams:write`. Danger: critical.
1948
+ *
1949
+ * `PATCH /log-streams/{id}` · action `log_streams.update`
1950
+ * @scope `log_streams:write`
1951
+ * @danger critical
1952
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1953
+ */
1954
+ update: (id, body, options) => this.transport.call(environmentOperations["log_streams.update"], [id], body, options)
1955
+ };
1956
+ members = {
1957
+ /**
1958
+ * Add an existing user as a member
1959
+ *
1960
+ * Requires scope `members:write`. Straight in — no invitation, no mail. Name the user by
1961
+ * `user_id` or by `email`; they must exist in this environment (`422 user_not_found`).
1962
+ * A suspended or archived organization takes no new members (`409 organization_inactive`).
1963
+ *
1964
+ * `roles` grants access roles at the same time — ids, or your app's manifest keys with
1965
+ * `client_id` — with the environment's authority (staff roles included). One the
1966
+ * organization cannot hold is `422 role_not_assignable`; a segregation-of-duties
1967
+ * conflict is `409 role_conflict`, and nothing is added.
1968
+ *
1969
+ * `role` is `admin` or `member` (default `member`). `owner` is never assignable:
1970
+ * ownership moves with `transfer-ownership`.
1971
+ *
1972
+ * **Idempotent for the same role**: repeating the request answers `200` with the
1973
+ * existing membership. A member on a *different* role is `409 already_member` — change
1974
+ * the role with `PATCH`.
1975
+ *
1976
+ * `POST /organizations/{organization_id}/members` · action `members.add`
1977
+ * @scope `members:write`
1978
+ * @danger write
1979
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1980
+ */
1981
+ add: (organizationId, body, options) => this.transport.call(environmentOperations["members.add"], [organizationId], body, options),
1982
+ /**
1983
+ * List an organization's members
1984
+ *
1985
+ * Requires scope `members:read`. Every membership, whatever its status, oldest first.
1986
+ *
1987
+ * `GET /organizations/{organization_id}/members` · action `members.list`
1988
+ * @scope `members:read`
1989
+ * @danger read
1990
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
1991
+ */
1992
+ list: (organizationId, query, options) => this.transport.call(environmentOperations["members.list"], [organizationId], query, options),
1993
+ /** Every item of `members.list`, fetching pages as the iteration reaches them. */
1994
+ listAll: (organizationId, query, options) => this.transport.paginate(environmentOperations["members.list"], [organizationId], query, options),
1995
+ /**
1996
+ * Remove a member
1997
+ *
1998
+ * Requires scope `members:write`. The member's roles in the organization go with the
1999
+ * membership. Removing the only owner is refused with `409 last_owner`.
2000
+ *
2001
+ * `DELETE /organizations/{organization_id}/members/{user_id}` · action `members.remove`
2002
+ * @scope `members:write`
2003
+ * @danger destructive
2004
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2005
+ */
2006
+ remove: (organizationId, userId, options) => this.transport.call(environmentOperations["members.remove"], [organizationId, userId], void 0, options),
2007
+ /**
2008
+ * Change a member's role
2009
+ *
2010
+ * Requires scope `members:write`. `role` is `admin` or `member`. Demoting the only
2011
+ * owner is refused with `409 last_owner` — transfer ownership first.
2012
+ *
2013
+ * `PATCH /organizations/{organization_id}/members/{user_id}` · action `members.update`
2014
+ * @scope `members:write`
2015
+ * @danger write
2016
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2017
+ */
2018
+ update: (organizationId, userId, body, options) => this.transport.call(environmentOperations["members.update"], [organizationId, userId], body, options),
2019
+ roles: {
2020
+ /**
2021
+ * Grant a member a role in the organization
2022
+ *
2023
+ * Requires scope `roles:write`. Idempotent.
2024
+ *
2025
+ * **This API grants with the environment's authority.** It is your backend, so it may
2026
+ * grant any role the organization can hold — including a **staff role**
2027
+ * (`tenant_assignable: false`), such as your support lead's "Support" role at one
2028
+ * customer. An organization's own administrators still cannot: their console, their
2029
+ * invitations and their directory mappings refuse staff roles, and nothing here
2030
+ * changes that.
2031
+ *
2032
+ * Refusals: `422 role_not_assignable` (another organization's role, or one from an app
2033
+ * this organization cannot use), `409 role_conflict` (segregation of duties).
2034
+ *
2035
+ * `PUT /organizations/{organization_id}/members/{user_id}/roles/{role_id}` · action `members.roles.grant`
2036
+ * @scope `roles:write`
2037
+ * @danger write
2038
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2039
+ */
2040
+ grant: (organizationId, userId, roleId, query, options) => this.transport.call(environmentOperations["members.roles.grant"], [organizationId, userId, roleId], query, options),
2041
+ /**
2042
+ * List the roles a member holds in the organization
2043
+ *
2044
+ * Requires scope `roles:read`. Roles granted AT this organization. Roles a person holds
2045
+ * everywhere in the environment (staff) are listed under
2046
+ * `/users/{id}/environment-roles`.
2047
+ *
2048
+ * `GET /organizations/{organization_id}/members/{user_id}/roles` · action `members.roles.list`
2049
+ * @scope `roles:read`
2050
+ * @danger read
2051
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2052
+ */
2053
+ list: (organizationId, userId, options) => this.transport.call(environmentOperations["members.roles.list"], [organizationId, userId], void 0, options),
2054
+ /**
2055
+ * Take a role back from a member
2056
+ *
2057
+ * Requires scope `roles:write`. Idempotent — a role the member does not hold is a 204 too.
2058
+ *
2059
+ * `DELETE /organizations/{organization_id}/members/{user_id}/roles/{role_id}` · action `members.roles.revoke`
2060
+ * @scope `roles:write`
2061
+ * @danger destructive
2062
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2063
+ */
2064
+ revoke: (organizationId, userId, roleId, query, options) => this.transport.call(environmentOperations["members.roles.revoke"], [organizationId, userId, roleId], query, options)
2065
+ }
2066
+ };
2067
+ organizations = {
2068
+ /**
2069
+ * Create an organization, optionally with its owner
2070
+ *
2071
+ * Requires scope `organizations:write`.
2072
+ *
2073
+ * `POST /organizations` · action `organizations.create`
2074
+ * @scope `organizations:write`
2075
+ * @danger write
2076
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2077
+ */
2078
+ create: (body, options) => this.transport.call(environmentOperations["organizations.create"], [], body, options),
2079
+ /**
2080
+ * Archive an organization
2081
+ *
2082
+ * Requires scope `organizations:write`. **Archives** rather than erases: the status
2083
+ * becomes `deleted`, every member loses access from their next request, the rows stay
2084
+ * for the audit trail, and `organization.deleted` is announced. Idempotent — archiving
2085
+ * an archived organization answers with it unchanged.
2086
+ *
2087
+ * Refused with `409 owns_products` for an organization that owns identity-provider
2088
+ * projects on this platform (a platform customer, not a tenant of your app).
2089
+ *
2090
+ * `DELETE /organizations/{id}` · action `organizations.delete`
2091
+ * @scope `organizations:write`
2092
+ * @danger destructive
2093
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2094
+ */
2095
+ delete: (id, options) => this.transport.call(environmentOperations["organizations.delete"], [id], void 0, options),
2096
+ /**
2097
+ * Get an organization
2098
+ *
2099
+ * Requires scope `organizations:read`.
2100
+ *
2101
+ * `GET /organizations/{id}` · action `organizations.get`
2102
+ * @scope `organizations:read`
2103
+ * @danger read
2104
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2105
+ */
2106
+ get: (id, options) => this.transport.call(environmentOperations["organizations.get"], [id], void 0, options),
2107
+ /**
2108
+ * List organizations
2109
+ *
2110
+ * Requires scope `organizations:read`. A page at a time, archived ones included. Narrow
2111
+ * with `q` (a fragment of the name or slug) or `status`.
2112
+ *
2113
+ * `GET /organizations` · action `organizations.list`
2114
+ * @scope `organizations:read`
2115
+ * @danger read
2116
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2117
+ */
2118
+ list: (query, options) => this.transport.call(environmentOperations["organizations.list"], [], query, options),
2119
+ /** Every item of `organizations.list`, fetching pages as the iteration reaches them. */
2120
+ listAll: (query, options) => this.transport.paginate(environmentOperations["organizations.list"], [], query, options),
2121
+ /**
2122
+ * Lift an organization's suspension so its members can sign in again.
2123
+ *
2124
+ * Requires scope `organizations:write`. Danger: write.
2125
+ *
2126
+ * `POST /organizations/{id}/reactivate` · action `organizations.reactivate`
2127
+ * @scope `organizations:write`
2128
+ * @danger write
2129
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2130
+ */
2131
+ reactivate: (id, options) => this.transport.call(environmentOperations["organizations.reactivate"], [id], void 0, options),
2132
+ /**
2133
+ * Suspend an organization: its members cannot sign in to it until it is reactivated.
2134
+ *
2135
+ * Requires scope `organizations:write`. Danger: write.
2136
+ *
2137
+ * `POST /organizations/{id}/suspend` · action `organizations.suspend`
2138
+ * @scope `organizations:write`
2139
+ * @danger write
2140
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2141
+ */
2142
+ suspend: (id, options) => this.transport.call(environmentOperations["organizations.suspend"], [id], void 0, options),
2143
+ /**
2144
+ * Make a member the organization's owner
2145
+ *
2146
+ * Requires scope `organizations:write`. The new owner must be an **active** member.
2147
+ * With one current owner this is a hand-over: the previous owner stays on as `admin`.
2148
+ * An organization with no owner (created without `owner_user_id`) gets its first; one
2149
+ * with several (from before ownership was transfer-only) ends with exactly one, the
2150
+ * others stepping down to `admin`.
2151
+ *
2152
+ * Refusals: `422 not_a_member`, `409 not_active`, `409 already_owner`.
2153
+ *
2154
+ * `POST /organizations/{id}/transfer-ownership` · action `organizations.transfer_ownership`
2155
+ * @scope `organizations:write`
2156
+ * @danger critical
2157
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2158
+ */
2159
+ transferOwnership: (id, body, options) => this.transport.call(environmentOperations["organizations.transfer_ownership"], [id], body, options),
2160
+ /**
2161
+ * Rename an organization, change its slug, or replace its metadata
2162
+ *
2163
+ * Requires scope `organizations:write`. A field left out is left alone; a request
2164
+ * that changes nothing answers with the organization as it is and records nothing.
2165
+ * A change is announced as the `organization.updated` webhook and recorded on the
2166
+ * organization's trail as `organization.renamed`, with the values before and after.
2167
+ *
2168
+ * `PATCH /organizations/{id}` · action `organizations.update`
2169
+ * @scope `organizations:write`
2170
+ * @danger write
2171
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2172
+ */
2173
+ update: (id, body, options) => this.transport.call(environmentOperations["organizations.update"], [id], body, options),
2174
+ domains: {
2175
+ /**
2176
+ * Claim an email domain (acme.com) for an organization. Returns the DNS TXT record to publish before verifying it.
2177
+ *
2178
+ * Requires scope `organizations:write`. Danger: write.
2179
+ *
2180
+ * `POST /organizations/{organization_id}/domains` · action `organizations.domains.add`
2181
+ * @scope `organizations:write`
2182
+ * @danger write
2183
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2184
+ */
2185
+ add: (organizationId, body, options) => this.transport.call(environmentOperations["organizations.domains.add"], [organizationId], body, options),
2186
+ /**
2187
+ * Turn capture on or off for a verified domain: with it on, everyone with an address there signs in through the organization's SSO.
2188
+ *
2189
+ * Requires scope `organizations:write`. Danger: critical.
2190
+ *
2191
+ * `PUT /organizations/{organization_id}/domains/{domain_id}/capture` · action `organizations.domains.capture`
2192
+ * @scope `organizations:write`
2193
+ * @danger critical
2194
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2195
+ */
2196
+ capture: (organizationId, domainId, body, options) => this.transport.call(environmentOperations["organizations.domains.capture"], [organizationId, domainId], body, options),
2197
+ /**
2198
+ * List the email domains an organization claims
2199
+ *
2200
+ * Requires scope `organizations:read`. Verified or not, each with the DNS TXT record
2201
+ * that proves it (`record_name`, `record_value`). A handful at most; not paged.
2202
+ *
2203
+ * `GET /organizations/{organization_id}/domains` · action `organizations.domains.list`
2204
+ * @scope `organizations:read`
2205
+ * @danger read
2206
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2207
+ */
2208
+ list: (organizationId, options) => this.transport.call(environmentOperations["organizations.domains.list"], [organizationId], void 0, options),
2209
+ /**
2210
+ * Remove a claimed email domain from an organization. Capture on it ends.
2211
+ *
2212
+ * Requires scope `organizations:write`. Danger: destructive.
2213
+ *
2214
+ * `DELETE /organizations/{organization_id}/domains/{domain_id}` · action `organizations.domains.remove`
2215
+ * @scope `organizations:write`
2216
+ * @danger destructive
2217
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2218
+ */
2219
+ remove: (organizationId, domainId, options) => this.transport.call(environmentOperations["organizations.domains.remove"], [organizationId, domainId], void 0, options),
2220
+ /**
2221
+ * Check a claimed domain's DNS TXT record and mark the domain verified if it is published.
2222
+ *
2223
+ * Requires scope `organizations:write`. Danger: write.
2224
+ *
2225
+ * `POST /organizations/{organization_id}/domains/{domain_id}/verify` · action `organizations.domains.verify`
2226
+ * @scope `organizations:write`
2227
+ * @danger write
2228
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2229
+ */
2230
+ verify: (organizationId, domainId, options) => this.transport.call(environmentOperations["organizations.domains.verify"], [organizationId, domainId], void 0, options)
2231
+ },
2232
+ portalLinks: {
2233
+ /**
2234
+ * Create a one-time Admin Portal link an organization's IT administrator uses to set up SSO, directory sync, domain verification, log streams or SAML certificate renewal, or to read its audit logs, without an account. The URL is shown once.
2235
+ *
2236
+ * Requires scope `portal_links:write`. Danger: critical.
2237
+ *
2238
+ * `POST /organizations/{organization_id}/portal-links` · action `organizations.portal_links.create`
2239
+ * @scope `portal_links:write`
2240
+ * @danger critical
2241
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2242
+ */
2243
+ create: (organizationId, body, options) => this.transport.call(environmentOperations["organizations.portal_links.create"], [organizationId], body, options),
2244
+ /**
2245
+ * List an organization's Admin Portal links
2246
+ *
2247
+ * Requires scope `portal_links:read`. Danger: read. The links minted in the last 30
2248
+ * days, newest first — every link that can still be opened is among them, since a link
2249
+ * waits a week at most. Each says what it opens, who minted it, whom it was mailed to
2250
+ * and where it stands (`status`). Never the link itself: it was shown once, when it was
2251
+ * minted, and only its hash is kept. Not paged.
2252
+ *
2253
+ * `GET /organizations/{organization_id}/portal-links` · action `organizations.portal_links.list`
2254
+ * @scope `portal_links:read`
2255
+ * @danger read
2256
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2257
+ */
2258
+ list: (organizationId, options) => this.transport.call(environmentOperations["organizations.portal_links.list"], [organizationId], void 0, options),
2259
+ /**
2260
+ * Withdraw an Admin Portal link: it can no longer be opened, and a setup session it already opened ends on its next request. What was already set up through it stays.
2261
+ *
2262
+ * Requires scope `portal_links:write`. Danger: destructive.
2263
+ *
2264
+ * `DELETE /organizations/{organization_id}/portal-links/{id}` · action `organizations.portal_links.revoke`
2265
+ * @scope `portal_links:write`
2266
+ * @danger destructive
2267
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2268
+ */
2269
+ revoke: (organizationId, id, options) => this.transport.call(environmentOperations["organizations.portal_links.revoke"], [organizationId, id], void 0, options)
2270
+ }
2271
+ };
2272
+ permissions = {
2273
+ /**
2274
+ * Author a manual `feature:action` permission, shared with the environment (organization_id null) or one organization's own.
2275
+ *
2276
+ * Requires scope `role_definitions:write`. Danger: write.
2277
+ *
2278
+ * `POST /permissions` · action `permissions.create`
2279
+ * @scope `role_definitions:write`
2280
+ * @danger write
2281
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2282
+ */
2283
+ create: (body, options) => this.transport.call(environmentOperations["permissions.create"], [], body, options),
2284
+ /**
2285
+ * Delete a manual permission: every role carrying it loses it first.
2286
+ *
2287
+ * Requires scope `role_definitions:write`. Danger: destructive.
2288
+ *
2289
+ * `DELETE /permissions/{id}` · action `permissions.delete`
2290
+ * @scope `role_definitions:write`
2291
+ * @danger destructive
2292
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2293
+ */
2294
+ delete: (id, options) => this.transport.call(environmentOperations["permissions.delete"], [id], void 0, options),
2295
+ /**
2296
+ * List the permission catalogue roles are composed from, a page at a time. Narrow by `client_id` (one app's), `organization_id` (what it can see) or a `q` fragment.
2297
+ *
2298
+ * Requires scope `roles:read`. Danger: read.
2299
+ *
2300
+ * `GET /permissions` · action `permissions.list`
2301
+ * @scope `roles:read`
2302
+ * @danger read
2303
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2304
+ */
2305
+ list: (query, options) => this.transport.call(environmentOperations["permissions.list"], [], query, options),
2306
+ /** Every item of `permissions.list`, fetching pages as the iteration reaches them. */
2307
+ listAll: (query, options) => this.transport.paginate(environmentOperations["permissions.list"], [], query, options),
2308
+ /**
2309
+ * Change a manual permission's description, and on the shared tier whether organizations may use it. The key itself never changes.
2310
+ *
2311
+ * Requires scope `role_definitions:write`. Danger: write.
2312
+ *
2313
+ * `PATCH /permissions/{id}` · action `permissions.update`
2314
+ * @scope `role_definitions:write`
2315
+ * @danger write
2316
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2317
+ */
2318
+ update: (id, body, options) => this.transport.call(environmentOperations["permissions.update"], [id], body, options)
2319
+ };
2320
+ provisioning = {
2321
+ targets: {
2322
+ /**
2323
+ * Register a downstream app this platform pushes an organization's people to over SCIM, or every organization's with environment_wide.
2324
+ *
2325
+ * Requires scope `provisioning:write`. Danger: critical.
2326
+ *
2327
+ * `POST /provisioning-targets` · action `provisioning.targets.create`
2328
+ * @scope `provisioning:write`
2329
+ * @danger critical
2330
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2331
+ */
2332
+ create: (body, options) => this.transport.call(environmentOperations["provisioning.targets.create"], [], body, options),
2333
+ /**
2334
+ * Delete a downstream SCIM target. Nothing more is pushed to it.
2335
+ *
2336
+ * Requires scope `provisioning:write`. Danger: destructive.
2337
+ *
2338
+ * `DELETE /provisioning-targets/{id}` · action `provisioning.targets.delete`
2339
+ * @scope `provisioning:write`
2340
+ * @danger destructive
2341
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2342
+ */
2343
+ delete: (id, body, options) => this.transport.call(environmentOperations["provisioning.targets.delete"], [id], body, options),
2344
+ /**
2345
+ * Read one downstream SCIM target: its URL, auth scheme, status and last error. Never its credential.
2346
+ *
2347
+ * Requires scope `provisioning:read`. Danger: read.
2348
+ *
2349
+ * `GET /provisioning-targets/{id}` · action `provisioning.targets.get`
2350
+ * @scope `provisioning:read`
2351
+ * @danger read
2352
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2353
+ */
2354
+ get: (id, query, options) => this.transport.call(environmentOperations["provisioning.targets.get"], [id], query, options),
2355
+ /**
2356
+ * List the downstream SCIM targets people are provisioned to, optionally for one organization, with their failures. Never their credentials.
2357
+ *
2358
+ * Requires scope `provisioning:read`. Danger: read.
2359
+ *
2360
+ * `GET /provisioning-targets` · action `provisioning.targets.list`
2361
+ * @scope `provisioning:read`
2362
+ * @danger read
2363
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2364
+ */
2365
+ list: (query, options) => this.transport.call(environmentOperations["provisioning.targets.list"], [], query, options),
2366
+ /** Every item of `provisioning.targets.list`, fetching pages as the iteration reaches them. */
2367
+ listAll: (query, options) => this.transport.paginate(environmentOperations["provisioning.targets.list"], [], query, options),
2368
+ status: {
2369
+ /**
2370
+ * Pause or resume pushing people to a downstream SCIM target.
2371
+ *
2372
+ * Requires scope `provisioning:write`. Danger: write.
2373
+ *
2374
+ * `POST /provisioning-targets/{id}/status` · action `provisioning.targets.status.set`
2375
+ * @scope `provisioning:write`
2376
+ * @danger write
2377
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2378
+ */
2379
+ set: (id, body, options) => this.transport.call(environmentOperations["provisioning.targets.status.set"], [id], body, options)
2380
+ }
2381
+ }
2382
+ };
2383
+ roles = {
2384
+ /**
2385
+ * Define a role for one organization, or (organization_id null) for the whole environment, optionally scoped to one app, with its opening permissions.
2386
+ *
2387
+ * Requires scope `role_definitions:write`. Danger: write.
2388
+ *
2389
+ * `POST /roles` · action `roles.create`
2390
+ * @scope `role_definitions:write`
2391
+ * @danger write
2392
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2393
+ */
2394
+ create: (body, options) => this.transport.call(environmentOperations["roles.create"], [], body, options),
2395
+ /**
2396
+ * Delete a role: everyone who holds it loses it. An app-declared role is removed from the app's manifest instead.
2397
+ *
2398
+ * Requires scope `role_definitions:write`. Danger: destructive.
2399
+ *
2400
+ * `DELETE /roles/{id}` · action `roles.delete`
2401
+ * @scope `role_definitions:write`
2402
+ * @danger destructive
2403
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2404
+ */
2405
+ delete: (id, options) => this.transport.call(environmentOperations["roles.delete"], [id], void 0, options),
2406
+ /**
2407
+ * Get one role and the permissions it carries. Name it by id, or by manifest `key` with `client_id`.
2408
+ *
2409
+ * Requires scope `roles:read`. Danger: read.
2410
+ *
2411
+ * `GET /roles/{id}` · action `roles.get`
2412
+ * @scope `roles:read`
2413
+ * @danger read
2414
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2415
+ */
2416
+ get: (id, query, options) => this.transport.call(environmentOperations["roles.get"], [id], query, options),
2417
+ /**
2418
+ * List roles
2419
+ *
2420
+ * Requires scope `roles:read`. Every role that can still be granted, ordered by name,
2421
+ * with the permissions each carries. Not paginated. `?client_id=` narrows to one
2422
+ * app's roles; `?organization_id=` to what can be granted in that organization.
2423
+ *
2424
+ * `GET /roles` · action `roles.list`
2425
+ * @scope `roles:read`
2426
+ * @danger read
2427
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2428
+ */
2429
+ list: (query, options) => this.transport.call(environmentOperations["roles.list"], [], query, options),
2430
+ /**
2431
+ * Rename a role or change its description. An app-declared role is changed in the app's manifest instead.
2432
+ *
2433
+ * Requires scope `role_definitions:write`. Danger: write.
2434
+ *
2435
+ * `PATCH /roles/{id}` · action `roles.update`
2436
+ * @scope `role_definitions:write`
2437
+ * @danger write
2438
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2439
+ */
2440
+ update: (id, body, options) => this.transport.call(environmentOperations["roles.update"], [id], body, options),
2441
+ permissions: {
2442
+ /**
2443
+ * Add a permission to a role: everyone holding the role gains it. The permission must be unscoped or declared by the role's own app.
2444
+ *
2445
+ * Requires scope `role_definitions:write`. Danger: write.
2446
+ *
2447
+ * `PUT /roles/{id}/permissions/{permission_id}` · action `roles.permissions.grant`
2448
+ * @scope `role_definitions:write`
2449
+ * @danger write
2450
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2451
+ */
2452
+ grant: (id, permissionId, options) => this.transport.call(environmentOperations["roles.permissions.grant"], [id, permissionId], void 0, options),
2453
+ /**
2454
+ * Remove a permission from a role: everyone holding the role loses it.
2455
+ *
2456
+ * Requires scope `role_definitions:write`. Danger: destructive.
2457
+ *
2458
+ * `DELETE /roles/{id}/permissions/{permission_id}` · action `roles.permissions.revoke`
2459
+ * @scope `role_definitions:write`
2460
+ * @danger destructive
2461
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2462
+ */
2463
+ revoke: (id, permissionId, options) => this.transport.call(environmentOperations["roles.permissions.revoke"], [id, permissionId], void 0, options)
2464
+ }
2465
+ };
2466
+ samlApps = {
2467
+ /**
2468
+ * Register a SAML app that signs people in with their account here. Decides where assertions — and their attributes — are sent.
2469
+ *
2470
+ * Requires scope `saml_apps:write`. Danger: critical.
2471
+ *
2472
+ * `POST /saml-apps` · action `saml_apps.create`
2473
+ * @scope `saml_apps:write`
2474
+ * @danger critical
2475
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2476
+ */
2477
+ create: (body, options) => this.transport.call(environmentOperations["saml_apps.create"], [], body, options),
2478
+ /**
2479
+ * Remove a SAML app. People can no longer sign in to it with their account here.
2480
+ *
2481
+ * Requires scope `saml_apps:write`. Danger: critical.
2482
+ *
2483
+ * `DELETE /saml-apps/{id}` · action `saml_apps.delete`
2484
+ * @scope `saml_apps:write`
2485
+ * @danger critical
2486
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2487
+ */
2488
+ delete: (id, options) => this.transport.call(environmentOperations["saml_apps.delete"], [id], void 0, options),
2489
+ /**
2490
+ * Read one SAML app: its entity id, ACS URL, NameID and attribute mappings. Never its certificate.
2491
+ *
2492
+ * Requires scope `saml_apps:read`. Danger: read.
2493
+ *
2494
+ * `GET /saml-apps/{id}` · action `saml_apps.get`
2495
+ * @scope `saml_apps:read`
2496
+ * @danger read
2497
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2498
+ */
2499
+ get: (id, options) => this.transport.call(environmentOperations["saml_apps.get"], [id], void 0, options),
2500
+ /**
2501
+ * List the SAML apps that trust this environment as their identity provider.
2502
+ *
2503
+ * Requires scope `saml_apps:read`. Danger: read.
2504
+ *
2505
+ * `GET /saml-apps` · action `saml_apps.list`
2506
+ * @scope `saml_apps:read`
2507
+ * @danger read
2508
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2509
+ */
2510
+ list: (query, options) => this.transport.call(environmentOperations["saml_apps.list"], [], query, options),
2511
+ /** Every item of `saml_apps.list`, fetching pages as the iteration reaches them. */
2512
+ listAll: (query, options) => this.transport.paginate(environmentOperations["saml_apps.list"], [], query, options),
2513
+ /**
2514
+ * Change a SAML app's entity id, ACS URL, NameID, attribute mappings, signing certificate or owning organization.
2515
+ *
2516
+ * Requires scope `saml_apps:write`. Danger: critical.
2517
+ *
2518
+ * `PATCH /saml-apps/{id}` · action `saml_apps.update`
2519
+ * @scope `saml_apps:write`
2520
+ * @danger critical
2521
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2522
+ */
2523
+ update: (id, body, options) => this.transport.call(environmentOperations["saml_apps.update"], [id], body, options)
2524
+ };
2525
+ signin = {
2526
+ policy: {
2527
+ /**
2528
+ * Read the authentication policy (password, MFA, SSO, lockout): the environment baseline, or one organization's effective rules and override.
2529
+ *
2530
+ * Requires scope `signin:read`. Danger: read.
2531
+ *
2532
+ * `GET /sign-in/policy` · action `signin.policy.get`
2533
+ * @scope `signin:read`
2534
+ * @danger read
2535
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2536
+ */
2537
+ get: (query, options) => this.transport.call(environmentOperations["signin.policy.get"], [], query, options),
2538
+ /**
2539
+ * Drop one organization's authentication policy override, so it inherits the environment baseline again.
2540
+ *
2541
+ * Requires scope `signin:write`. Danger: critical.
2542
+ *
2543
+ * `DELETE /sign-in/policy/organizations/{organization_id}` · action `signin.policy.inherit`
2544
+ * @scope `signin:write`
2545
+ * @danger critical
2546
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2547
+ */
2548
+ inherit: (organizationId, options) => this.transport.call(environmentOperations["signin.policy.inherit"], [organizationId], void 0, options),
2549
+ /**
2550
+ * Change the authentication policy of the environment baseline, or tighten one organization's override. Requiring SSO signs out password sessions.
2551
+ *
2552
+ * Requires scope `signin:write`. Danger: critical.
2553
+ *
2554
+ * `PATCH /sign-in/policy` · action `signin.policy.update`
2555
+ * @scope `signin:write`
2556
+ * @danger critical
2557
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2558
+ */
2559
+ update: (body, options) => this.transport.call(environmentOperations["signin.policy.update"], [], body, options)
2560
+ },
2561
+ selfServiceSignup: {
2562
+ /**
2563
+ * Switch self-service sign-up on or off: whether people can create an account and their own organization in this environment.
2564
+ *
2565
+ * Requires scope `signin:write`. Danger: critical.
2566
+ *
2567
+ * `PUT /sign-in/self-service-signup` · action `signin.self_service_signup.set`
2568
+ * @scope `signin:write`
2569
+ * @danger critical
2570
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2571
+ */
2572
+ set: (body, options) => this.transport.call(environmentOperations["signin.self_service_signup.set"], [], body, options)
2573
+ },
2574
+ social: {
2575
+ /**
2576
+ * Stop offering a social login provider. People who used it keep their accounts.
2577
+ *
2578
+ * Requires scope `signin:write`. Danger: critical.
2579
+ *
2580
+ * `DELETE /sign-in/social-providers/{id}` · action `signin.social.delete`
2581
+ * @scope `signin:write`
2582
+ * @danger critical
2583
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2584
+ */
2585
+ delete: (id, body, options) => this.transport.call(environmentOperations["signin.social.delete"], [id], body, options),
2586
+ /**
2587
+ * List the social login providers (Google, GitHub, Apple…) enabled in this environment, optionally for one organization.
2588
+ *
2589
+ * Requires scope `signin:read`. Danger: read.
2590
+ *
2591
+ * `GET /sign-in/social-providers` · action `signin.social.list`
2592
+ * @scope `signin:read`
2593
+ * @danger read
2594
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2595
+ */
2596
+ list: (query, options) => this.transport.call(environmentOperations["signin.social.list"], [], query, options),
2597
+ /** Every item of `signin.social.list`, fetching pages as the iteration reaches them. */
2598
+ listAll: (query, options) => this.transport.paginate(environmentOperations["signin.social.list"], [], query, options),
2599
+ /**
2600
+ * Enable a social login provider (Google, GitHub, Apple…) for one organization with its client credentials. The secret is never returned.
2601
+ *
2602
+ * Requires scope `signin:write`. Danger: critical.
2603
+ *
2604
+ * `POST /sign-in/social-providers` · action `signin.social.set`
2605
+ * @scope `signin:write`
2606
+ * @danger critical
2607
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2608
+ */
2609
+ set: (body, options) => this.transport.call(environmentOperations["signin.social.set"], [], body, options)
2610
+ }
2611
+ };
2612
+ sodPolicies = {
2613
+ /**
2614
+ * Define a role-conflict rule: two or more roles no one person may hold together. Enforced on every grant from now on.
2615
+ *
2616
+ * Requires scope `governance:write`. Danger: write.
2617
+ *
2618
+ * `POST /sod-policies` · action `sod_policies.create`
2619
+ * @scope `governance:write`
2620
+ * @danger write
2621
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2622
+ */
2623
+ create: (body, options) => this.transport.call(environmentOperations["sod_policies.create"], [], body, options),
2624
+ /**
2625
+ * Remove a role-conflict rule. Grants it refused are allowed from then on.
2626
+ *
2627
+ * Requires scope `governance:write`. Danger: critical.
2628
+ *
2629
+ * `DELETE /sod-policies/{id}` · action `sod_policies.delete`
2630
+ * @scope `governance:write`
2631
+ * @danger critical
2632
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2633
+ */
2634
+ delete: (id, body, options) => this.transport.call(environmentOperations["sod_policies.delete"], [id], body, options),
2635
+ /**
2636
+ * Read one role-conflict rule: the roles no one person may hold together, and whether it is enforced.
2637
+ *
2638
+ * Requires scope `governance:read`. Danger: read.
2639
+ *
2640
+ * `GET /sod-policies/{id}` · action `sod_policies.get`
2641
+ * @scope `governance:read`
2642
+ * @danger read
2643
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2644
+ */
2645
+ get: (id, query, options) => this.transport.call(environmentOperations["sod_policies.get"], [id], query, options),
2646
+ /**
2647
+ * List role-conflict (segregation of duties) rules: sets of roles no one person may hold together. Optionally those binding one organization.
2648
+ *
2649
+ * Requires scope `governance:read`. Danger: read.
2650
+ *
2651
+ * `GET /sod-policies` · action `sod_policies.list`
2652
+ * @scope `governance:read`
2653
+ * @danger read
2654
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2655
+ */
2656
+ list: (query, options) => this.transport.call(environmentOperations["sod_policies.list"], [], query, options),
2657
+ /** Every item of `sod_policies.list`, fetching pages as the iteration reaches them. */
2658
+ listAll: (query, options) => this.transport.paginate(environmentOperations["sod_policies.list"], [], query, options),
2659
+ status: {
2660
+ /**
2661
+ * Enforce a role-conflict rule, or stop enforcing it — switched off, grants that break it are allowed again.
2662
+ *
2663
+ * Requires scope `governance:write`. Danger: critical.
2664
+ *
2665
+ * `POST /sod-policies/{id}/status` · action `sod_policies.status.set`
2666
+ * @scope `governance:write`
2667
+ * @danger critical
2668
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2669
+ */
2670
+ set: (id, body, options) => this.transport.call(environmentOperations["sod_policies.status.set"], [id], body, options)
2671
+ }
2672
+ };
2673
+ sso = {
2674
+ connections: {
2675
+ /**
2676
+ * Activate an SSO connection: people whose email domain routes to it start signing in through it.
2677
+ *
2678
+ * Requires scope `sso:write`. Danger: critical.
2679
+ *
2680
+ * `POST /sso/connections/{id}/activate` · action `sso.connections.activate`
2681
+ * @scope `sso:write`
2682
+ * @danger critical
2683
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2684
+ */
2685
+ activate: (id, body, options) => this.transport.call(environmentOperations["sso.connections.activate"], [id], body, options),
2686
+ /**
2687
+ * Connect an organization's SAML or OIDC identity provider as a draft. Activate it to start signing people in through it.
2688
+ *
2689
+ * Requires scope `sso:write`. Danger: write.
2690
+ *
2691
+ * `POST /sso/connections` · action `sso.connections.create`
2692
+ * @scope `sso:write`
2693
+ * @danger write
2694
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2695
+ */
2696
+ create: (body, options) => this.transport.call(environmentOperations["sso.connections.create"], [], body, options),
2697
+ /**
2698
+ * Delete an SSO connection and its settings. Where SSO is required, its people cannot sign in until another is activated.
2699
+ *
2700
+ * Requires scope `sso:write`. Danger: critical.
2701
+ *
2702
+ * `DELETE /sso/connections/{id}` · action `sso.connections.delete`
2703
+ * @scope `sso:write`
2704
+ * @danger critical
2705
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2706
+ */
2707
+ delete: (id, body, options) => this.transport.call(environmentOperations["sso.connections.delete"], [id], body, options),
2708
+ /**
2709
+ * Disable an SSO connection without deleting it. Where SSO is required, its people cannot sign in until it is re-activated.
2710
+ *
2711
+ * Requires scope `sso:write`. Danger: critical.
2712
+ *
2713
+ * `POST /sso/connections/{id}/disable` · action `sso.connections.disable`
2714
+ * @scope `sso:write`
2715
+ * @danger critical
2716
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2717
+ */
2718
+ disable: (id, body, options) => this.transport.call(environmentOperations["sso.connections.disable"], [id], body, options),
2719
+ /**
2720
+ * Read one SSO connection: its type, status, entity ids, URLs, issuer and client id. Never a certificate or secret.
2721
+ *
2722
+ * Requires scope `sso:read`. Danger: read.
2723
+ *
2724
+ * `GET /sso/connections/{id}` · action `sso.connections.get`
2725
+ * @scope `sso:read`
2726
+ * @danger read
2727
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2728
+ */
2729
+ get: (id, query, options) => this.transport.call(environmentOperations["sso.connections.get"], [id], query, options),
2730
+ /**
2731
+ * List the SAML and OIDC connections organizations sign in through, optionally for one organization. Never a certificate or secret.
2732
+ *
2733
+ * Requires scope `sso:read`. Danger: read.
2734
+ *
2735
+ * `GET /sso/connections` · action `sso.connections.list`
2736
+ * @scope `sso:read`
2737
+ * @danger read
2738
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2739
+ */
2740
+ list: (query, options) => this.transport.call(environmentOperations["sso.connections.list"], [], query, options),
2741
+ /** Every item of `sso.connections.list`, fetching pages as the iteration reaches them. */
2742
+ listAll: (query, options) => this.transport.paginate(environmentOperations["sso.connections.list"], [], query, options),
2743
+ /**
2744
+ * Require single sign-on for the organization an SSO connection belongs to. Ends every password session there.
2745
+ *
2746
+ * Requires scope `sso:write`. Danger: critical.
2747
+ *
2748
+ * `POST /sso/connections/{id}/require-sso` · action `sso.connections.require_sso`
2749
+ * @scope `sso:write`
2750
+ * @danger critical
2751
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2752
+ */
2753
+ requireSso: (id, body, options) => this.transport.call(environmentOperations["sso.connections.require_sso"], [id], body, options),
2754
+ /**
2755
+ * Change an SSO connection's name or identity-provider settings. Secrets left out keep the ones on file.
2756
+ *
2757
+ * Requires scope `sso:write`. Danger: critical.
2758
+ *
2759
+ * `PATCH /sso/connections/{id}` · action `sso.connections.update`
2760
+ * @scope `sso:write`
2761
+ * @danger critical
2762
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2763
+ */
2764
+ update: (id, body, options) => this.transport.call(environmentOperations["sso.connections.update"], [id], body, options),
2765
+ certificates: {
2766
+ /**
2767
+ * Make a staged SAML signing certificate the connection's primary. The certificate it replaces stops being trusted.
2768
+ *
2769
+ * Requires scope `sso:write`. Danger: critical.
2770
+ *
2771
+ * `POST /sso/connections/{id}/certificates/activate` · action `sso.connections.certificates.activate`
2772
+ * @scope `sso:write`
2773
+ * @danger critical
2774
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2775
+ */
2776
+ activate: (id, body, options) => this.transport.call(environmentOperations["sso.connections.certificates.activate"], [id], body, options),
2777
+ /**
2778
+ * List a SAML connection's signing certificates — primary and staged — with each one's fingerprint and expiry.
2779
+ *
2780
+ * Requires scope `sso:read`. Danger: read.
2781
+ *
2782
+ * `GET /sso/connections/{id}/certificates` · action `sso.connections.certificates.list`
2783
+ * @scope `sso:read`
2784
+ * @danger read
2785
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2786
+ */
2787
+ list: (id, query, options) => this.transport.call(environmentOperations["sso.connections.certificates.list"], [id], query, options),
2788
+ /**
2789
+ * Stage a SAML connection's new IdP signing certificate (PEM or IdP metadata) beside the current one, so a renewal has no outage. Activate it once the IdP signs with it.
2790
+ *
2791
+ * Requires scope `sso:write`. Danger: critical.
2792
+ *
2793
+ * `POST /sso/connections/{id}/certificates` · action `sso.connections.certificates.stage`
2794
+ * @scope `sso:write`
2795
+ * @danger critical
2796
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2797
+ */
2798
+ stage: (id, body, options) => this.transport.call(environmentOperations["sso.connections.certificates.stage"], [id], body, options)
2799
+ }
2800
+ },
2801
+ domains: {
2802
+ /**
2803
+ * Turn capture on or off for a verified domain: captured, everyone with an address at it must sign in through the organization's SSO.
2804
+ *
2805
+ * Requires scope `sso:write`. Danger: critical.
2806
+ *
2807
+ * `POST /sso/domains/{id}/capture` · action `sso.domains.capture`
2808
+ * @scope `sso:write`
2809
+ * @danger critical
2810
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2811
+ */
2812
+ capture: (id, body, options) => this.transport.call(environmentOperations["sso.domains.capture"], [id], body, options),
2813
+ /**
2814
+ * Claim an email domain for an organization's single sign-on, and get the DNS TXT record to publish to prove it.
2815
+ *
2816
+ * Requires scope `sso:write`. Danger: write.
2817
+ *
2818
+ * `POST /sso/domains` · action `sso.domains.create`
2819
+ * @scope `sso:write`
2820
+ * @danger write
2821
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2822
+ */
2823
+ create: (body, options) => this.transport.call(environmentOperations["sso.domains.create"], [], body, options),
2824
+ /**
2825
+ * Remove a claimed email domain. Its people stop being routed to the organization's SSO connection.
2826
+ *
2827
+ * Requires scope `sso:write`. Danger: destructive.
2828
+ *
2829
+ * `DELETE /sso/domains/{id}` · action `sso.domains.delete`
2830
+ * @scope `sso:write`
2831
+ * @danger destructive
2832
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2833
+ */
2834
+ delete: (id, body, options) => this.transport.call(environmentOperations["sso.domains.delete"], [id], body, options),
2835
+ /**
2836
+ * List the email domains organizations claimed for single sign-on, whether each is verified and captured, and the DNS record that proves an unverified one.
2837
+ *
2838
+ * Requires scope `sso:read`. Danger: read.
2839
+ *
2840
+ * `GET /sso/domains` · action `sso.domains.list`
2841
+ * @scope `sso:read`
2842
+ * @danger read
2843
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2844
+ */
2845
+ list: (query, options) => this.transport.call(environmentOperations["sso.domains.list"], [], query, options),
2846
+ /** Every item of `sso.domains.list`, fetching pages as the iteration reaches them. */
2847
+ listAll: (query, options) => this.transport.paginate(environmentOperations["sso.domains.list"], [], query, options),
2848
+ /**
2849
+ * Check a claimed domain's DNS TXT record now. Answers the domain, with verified true once the record is found.
2850
+ *
2851
+ * Requires scope `sso:write`. Danger: write.
2852
+ *
2853
+ * `POST /sso/domains/{id}/verify` · action `sso.domains.verify`
2854
+ * @scope `sso:write`
2855
+ * @danger write
2856
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2857
+ */
2858
+ verify: (id, body, options) => this.transport.call(environmentOperations["sso.domains.verify"], [id], body, options)
2859
+ },
2860
+ samlMetadata: {
2861
+ /**
2862
+ * Parse an identity provider's SAML metadata (XML or a metadata URL) into the entity id, SSO URL and certificate a SAML connection needs. Stores nothing.
2863
+ *
2864
+ * Requires scope `sso:write`. Danger: write.
2865
+ *
2866
+ * `POST /sso/saml-metadata` · action `sso.saml_metadata.import`
2867
+ * @scope `sso:write`
2868
+ * @danger write
2869
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2870
+ */
2871
+ import: (body, options) => this.transport.call(environmentOperations["sso.saml_metadata.import"], [], body, options)
2872
+ }
2873
+ };
2874
+ supportSessions = {
2875
+ /**
2876
+ * End a support session now: every token it issued is revoked.
2877
+ *
2878
+ * Requires scope `support:write`. Danger: destructive.
2879
+ *
2880
+ * `DELETE /support-sessions/{id}` · action `support_sessions.end`
2881
+ * @scope `support:write`
2882
+ * @danger destructive
2883
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2884
+ */
2885
+ end: (id, options) => this.transport.call(environmentOperations["support_sessions.end"], [id], void 0, options),
2886
+ /**
2887
+ * Start a support session
2888
+ *
2889
+ * Requires scope `support:write`. A member of your staff (`actor_user_id`) signs in to
2890
+ * one of your apps (`client_id`) AS one of a customer's users (`user_id` in
2891
+ * `organization_id`), for a stated `reason`, for at most 60 minutes.
2892
+ *
2893
+ * The actor must hold your app's own `support:impersonate` permission through an
2894
+ * **environment-wide** grant (see `PUT /users/{id}/environment-roles/{role_id}`);
2895
+ * otherwise `403 not_permitted`. The app must be a first-party app the environment
2896
+ * owns that uses the authorization-code grant (`422 client_not_eligible`). The target
2897
+ * must be an active member (`422 target_not_member`) of an active organization
2898
+ * (`409 organization_inactive`).
2899
+ *
2900
+ * Send `redirect_uri` (registered for the app) and a PKCE S256 `code_challenge` to get
2901
+ * the first authorization `code` in the response. Your app redeems it at `/oauth/token`
2902
+ * with the verifier; every token carries `act: {"sub": actor_user_id}` and there is
2903
+ * never a refresh token. The session is audited on the customer's trail and the
2904
+ * environment's, and announced as the `support_session.started` webhook.
2905
+ *
2906
+ * `scopes` in the response are exactly what every token of the session carries: the
2907
+ * ones asked for (or, with none, the app's registration), never `offline_access`, and
2908
+ * audienced the way the token endpoint audiences them — once any of them belongs to a
2909
+ * registered API, the token is for that API and a scope no API registered (such as
2910
+ * `apps.manifest`) is left out. Scopes of two registered APIs cannot be audienced to
2911
+ * one token and are refused before the session starts (`422 invalid_target`).
2912
+ *
2913
+ * `POST /support-sessions` · action `support_sessions.start`
2914
+ * @scope `support:write`
2915
+ * @danger critical
2916
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2917
+ */
2918
+ start: (body, options) => this.transport.call(environmentOperations["support_sessions.start"], [], body, options)
2919
+ };
2920
+ tokenVault = {
2921
+ grants: {
2922
+ /**
2923
+ * Grant an app (by OAuth client id) the right to lease a stored credential.
2924
+ *
2925
+ * Requires scope `token_vault:write`. Danger: critical.
2926
+ *
2927
+ * `POST /token-vault/secrets/{id}/grants` · action `token_vault.grants.create`
2928
+ * @scope `token_vault:write`
2929
+ * @danger critical
2930
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2931
+ */
2932
+ create: (id, body, options) => this.transport.call(environmentOperations["token_vault.grants.create"], [id], body, options),
2933
+ /**
2934
+ * Withdraw an app's right to lease a stored credential.
2935
+ *
2936
+ * Requires scope `token_vault:write`. Danger: destructive.
2937
+ *
2938
+ * `DELETE /token-vault/secrets/{id}/grants/{client_id}` · action `token_vault.grants.delete`
2939
+ * @scope `token_vault:write`
2940
+ * @danger destructive
2941
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2942
+ */
2943
+ delete: (id, clientId, body, options) => this.transport.call(environmentOperations["token_vault.grants.delete"], [id, clientId], body, options)
2944
+ },
2945
+ secrets: {
2946
+ /**
2947
+ * Store a downstream credential (a third-party API key) in an organization's token vault, or the environment's own. The value is sealed and never returned.
2948
+ *
2949
+ * Requires scope `token_vault:write`. Danger: write.
2950
+ *
2951
+ * `POST /token-vault/secrets` · action `token_vault.secrets.create`
2952
+ * @scope `token_vault:write`
2953
+ * @danger write
2954
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2955
+ */
2956
+ create: (body, options) => this.transport.call(environmentOperations["token_vault.secrets.create"], [], body, options),
2957
+ /**
2958
+ * Read one stored credential and the client ids granted to lease it. Never its value.
2959
+ *
2960
+ * Requires scope `token_vault:read`. Danger: read.
2961
+ *
2962
+ * `GET /token-vault/secrets/{id}` · action `token_vault.secrets.get`
2963
+ * @scope `token_vault:read`
2964
+ * @danger read
2965
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2966
+ */
2967
+ get: (id, query, options) => this.transport.call(environmentOperations["token_vault.secrets.get"], [id], query, options),
2968
+ /**
2969
+ * List the downstream credentials stored in an organization's token vault (or the environment's own): names, providers, status. Never a value.
2970
+ *
2971
+ * Requires scope `token_vault:read`. Danger: read.
2972
+ *
2973
+ * `GET /token-vault/secrets` · action `token_vault.secrets.list`
2974
+ * @scope `token_vault:read`
2975
+ * @danger read
2976
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2977
+ */
2978
+ list: (query, options) => this.transport.call(environmentOperations["token_vault.secrets.list"], [], query, options),
2979
+ /** Every item of `token_vault.secrets.list`, fetching pages as the iteration reaches them. */
2980
+ listAll: (query, options) => this.transport.paginate(environmentOperations["token_vault.secrets.list"], [], query, options),
2981
+ /**
2982
+ * Revoke a stored credential permanently. No app can lease it again.
2983
+ *
2984
+ * Requires scope `token_vault:write`. Danger: destructive.
2985
+ *
2986
+ * `POST /token-vault/secrets/{id}/revoke` · action `token_vault.secrets.revoke`
2987
+ * @scope `token_vault:write`
2988
+ * @danger destructive
2989
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
2990
+ */
2991
+ revoke: (id, body, options) => this.transport.call(environmentOperations["token_vault.secrets.revoke"], [id], body, options),
2992
+ /**
2993
+ * Replace a stored credential's value. Every later lease hands out the new one. The value is never returned.
2994
+ *
2995
+ * Requires scope `token_vault:write`. Danger: critical.
2996
+ *
2997
+ * `POST /token-vault/secrets/{id}/rotate` · action `token_vault.secrets.rotate`
2998
+ * @scope `token_vault:write`
2999
+ * @danger critical
3000
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3001
+ */
3002
+ rotate: (id, body, options) => this.transport.call(environmentOperations["token_vault.secrets.rotate"], [id], body, options)
3003
+ }
3004
+ };
3005
+ users = {
3006
+ /**
3007
+ * Create a user
3008
+ *
3009
+ * Requires scope `users:write`. Password is optional — omit it to create a passwordless identity the user completes via an invite/magic-link.
3010
+ *
3011
+ * `POST /users` · action `users.create`
3012
+ * @scope `users:write`
3013
+ * @danger write
3014
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3015
+ */
3016
+ create: (body, options) => this.transport.call(environmentOperations["users.create"], [], body, options),
3017
+ /**
3018
+ * Deactivate a user
3019
+ *
3020
+ * Requires scope `users:write`. A **soft disable** — the identity can no longer
3021
+ * authenticate, but is never hard-deleted — and every OAuth grant they hold is
3022
+ * revoked, which reactivating them does not bring back. Returns the user in its new
3023
+ * `disabled` state. Idempotent. The console's "Deactivate" is this action.
3024
+ *
3025
+ * `DELETE /users/{id}` · action `users.deactivate`
3026
+ * @scope `users:write`
3027
+ * @danger destructive
3028
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3029
+ */
3030
+ deactivate: (id, options) => this.transport.call(environmentOperations["users.deactivate"], [id], void 0, options),
3031
+ /**
3032
+ * Erase a person (GDPR Art. 17): revoke their sessions and tokens, delete their credentials, memberships and personal data, and pseudonymise their account. Cannot be undone.
3033
+ *
3034
+ * Requires scope `users:erase`. Danger: critical.
3035
+ *
3036
+ * `POST /users/{id}/erase` · action `users.erase`
3037
+ * @scope `users:erase`
3038
+ * @danger critical
3039
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3040
+ */
3041
+ erase: (id, options) => this.transport.call(environmentOperations["users.erase"], [id], void 0, options),
3042
+ /**
3043
+ * Get a user
3044
+ *
3045
+ * Requires scope `users:read`.
3046
+ *
3047
+ * `GET /users/{id}` · action `users.get`
3048
+ * @scope `users:read`
3049
+ * @danger read
3050
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3051
+ */
3052
+ get: (id, options) => this.transport.call(environmentOperations["users.get"], [id], void 0, options),
3053
+ /**
3054
+ * List users
3055
+ *
3056
+ * Requires scope `users:read`. A page at a time, in id order. Narrow it the ways you
3057
+ * look for somebody: `email` (exactly that address, case-insensitive), `q` (a fragment
3058
+ * of the address or the name) and `status`. Filters combine.
3059
+ *
3060
+ * `GET /users` · action `users.list`
3061
+ * @scope `users:read`
3062
+ * @danger read
3063
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3064
+ */
3065
+ list: (query, options) => this.transport.call(environmentOperations["users.list"], [], query, options),
3066
+ /** Every item of `users.list`, fetching pages as the iteration reaches them. */
3067
+ listAll: (query, options) => this.transport.paginate(environmentOperations["users.list"], [], query, options),
3068
+ /**
3069
+ * Reactivate a deactivated user so they can sign in again. Grants revoked on deactivation stay revoked.
3070
+ *
3071
+ * Requires scope `users:write`. Danger: write.
3072
+ *
3073
+ * `POST /users/{id}/reactivate` · action `users.reactivate`
3074
+ * @scope `users:write`
3075
+ * @danger write
3076
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3077
+ */
3078
+ reactivate: (id, options) => this.transport.call(environmentOperations["users.reactivate"], [id], void 0, options),
3079
+ /**
3080
+ * Change a user's name and/or email address. A changed address must be verified again.
3081
+ *
3082
+ * Requires scope `users:write`. Danger: critical.
3083
+ *
3084
+ * `PATCH /users/{id}` · action `users.update`
3085
+ * @scope `users:write`
3086
+ * @danger critical
3087
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3088
+ */
3089
+ update: (id, body, options) => this.transport.call(environmentOperations["users.update"], [id], body, options),
3090
+ /**
3091
+ * Mark a user's email address verified without the emailed link. It can then be used to recover the account.
3092
+ *
3093
+ * Requires scope `users:write`. Danger: critical.
3094
+ *
3095
+ * `POST /users/{id}/verify` · action `users.verify`
3096
+ * @scope `users:write`
3097
+ * @danger critical
3098
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3099
+ */
3100
+ verify: (id, options) => this.transport.call(environmentOperations["users.verify"], [id], void 0, options),
3101
+ environmentRoles: {
3102
+ /**
3103
+ * Whether a user holds a role everywhere
3104
+ *
3105
+ * Requires scope `roles:read`. `200` with the grant, or `404` when it is not held.
3106
+ *
3107
+ * `GET /users/{id}/environment-roles/{role_id}` · action `users.environment_roles.get`
3108
+ * @scope `roles:read`
3109
+ * @danger read
3110
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3111
+ */
3112
+ get: (id, roleId, query, options) => this.transport.call(environmentOperations["users.environment_roles.get"], [id, roleId], query, options),
3113
+ /**
3114
+ * Grant a role everywhere in the environment (staff)
3115
+ *
3116
+ * Requires scope `roles:write`. Idempotent. For your own people who act across every
3117
+ * customer. Any role that belongs to no organization may be granted this way: an
3118
+ * app-agnostic one reaches every app's tokens, one your app declared reaches only
3119
+ * your app's. An organization's own role is refused with `422 role_not_assignable`; a
3120
+ * grant that would form a segregation-of-duties conflict in any organization the
3121
+ * person belongs to with `409 role_conflict`.
3122
+ *
3123
+ * `PUT /users/{id}/environment-roles/{role_id}` · action `users.environment_roles.grant`
3124
+ * @scope `roles:write`
3125
+ * @danger critical
3126
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3127
+ */
3128
+ grant: (id, roleId, query, options) => this.transport.call(environmentOperations["users.environment_roles.grant"], [id, roleId], query, options),
3129
+ /**
3130
+ * List the roles a user holds everywhere (staff)
3131
+ *
3132
+ * Requires scope `roles:read`.
3133
+ *
3134
+ * `GET /users/{id}/environment-roles` · action `users.environment_roles.list`
3135
+ * @scope `roles:read`
3136
+ * @danger read
3137
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3138
+ */
3139
+ list: (id, options) => this.transport.call(environmentOperations["users.environment_roles.list"], [id], void 0, options),
3140
+ /**
3141
+ * Take back an environment-wide grant
3142
+ *
3143
+ * Requires scope `roles:write`. Idempotent.
3144
+ *
3145
+ * `DELETE /users/{id}/environment-roles/{role_id}` · action `users.environment_roles.revoke`
3146
+ * @scope `roles:write`
3147
+ * @danger destructive
3148
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3149
+ */
3150
+ revoke: (id, roleId, query, options) => this.transport.call(environmentOperations["users.environment_roles.revoke"], [id, roleId], query, options)
3151
+ },
3152
+ mfa: {
3153
+ /**
3154
+ * Reset a user's two-factor authentication: their authenticator and recovery codes are removed and they must enrol again.
3155
+ *
3156
+ * Requires scope `users:write`. Danger: critical.
3157
+ *
3158
+ * `DELETE /users/{id}/mfa` · action `users.mfa.reset`
3159
+ * @scope `users:write`
3160
+ * @danger critical
3161
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3162
+ */
3163
+ reset: (id, options) => this.transport.call(environmentOperations["users.mfa.reset"], [id], void 0, options)
3164
+ },
3165
+ passwordReset: {
3166
+ /**
3167
+ * Mail a user a password-reset link at their own address.
3168
+ *
3169
+ * Requires scope `users:write`. Danger: write.
3170
+ *
3171
+ * `POST /users/{id}/password-reset` · action `users.password_reset.send`
3172
+ * @scope `users:write`
3173
+ * @danger write
3174
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3175
+ */
3176
+ send: (id, options) => this.transport.call(environmentOperations["users.password_reset.send"], [id], void 0, options)
3177
+ },
3178
+ password: {
3179
+ /**
3180
+ * Set a user's password, temporary by default, and mail it to them unless told not to. Signs them out according to `revoke`.
3181
+ *
3182
+ * Requires scope `users:write`. Danger: critical.
3183
+ *
3184
+ * `POST /users/{id}/password` · action `users.password.set`
3185
+ * @scope `users:write`
3186
+ * @danger critical
3187
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3188
+ */
3189
+ set: (id, body, options) => this.transport.call(environmentOperations["users.password.set"], [id], body, options)
3190
+ },
3191
+ sessions: {
3192
+ /**
3193
+ * List a user's live sign-in sessions
3194
+ *
3195
+ * Requires scope `users:read`. The fifty most recently active, newest first — enough to
3196
+ * recognise a device and end one (`DELETE /users/{id}/sessions/{session_id}`), not a log.
3197
+ * `impersonation` marks a session somebody else opened as this person.
3198
+ *
3199
+ * `GET /users/{id}/sessions` · action `users.sessions.list`
3200
+ * @scope `users:read`
3201
+ * @danger read
3202
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3203
+ */
3204
+ list: (id, options) => this.transport.call(environmentOperations["users.sessions.list"], [id], void 0, options),
3205
+ /**
3206
+ * End one of a user's sign-in sessions.
3207
+ *
3208
+ * Requires scope `users:write`. Danger: destructive.
3209
+ *
3210
+ * `DELETE /users/{id}/sessions/{session_id}` · action `users.sessions.revoke`
3211
+ * @scope `users:write`
3212
+ * @danger destructive
3213
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3214
+ */
3215
+ revoke: (id, sessionId, options) => this.transport.call(environmentOperations["users.sessions.revoke"], [id, sessionId], void 0, options),
3216
+ /**
3217
+ * Sign a user out everywhere: end every session and revoke every OAuth grant they hold.
3218
+ *
3219
+ * Requires scope `users:write`. Danger: destructive.
3220
+ *
3221
+ * `DELETE /users/{id}/sessions` · action `users.sessions.revoke_all`
3222
+ * @scope `users:write`
3223
+ * @danger destructive
3224
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3225
+ */
3226
+ revokeAll: (id, options) => this.transport.call(environmentOperations["users.sessions.revoke_all"], [id], void 0, options)
3227
+ },
3228
+ verification: {
3229
+ /**
3230
+ * Mail a user the link that verifies their email address. Does nothing for an address already verified.
3231
+ *
3232
+ * Requires scope `users:write`. Danger: write.
3233
+ *
3234
+ * `POST /users/{id}/verification` · action `users.verification.send`
3235
+ * @scope `users:write`
3236
+ * @danger write
3237
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3238
+ */
3239
+ send: (id, options) => this.transport.call(environmentOperations["users.verification.send"], [id], void 0, options)
3240
+ }
3241
+ };
3242
+ webhooks = {
3243
+ /**
3244
+ * Register a webhook endpoint for one organization or the whole environment. Returns its signing secret once.
3245
+ *
3246
+ * Requires scope `webhooks:write`. Danger: critical.
3247
+ *
3248
+ * `POST /webhooks` · action `webhooks.create`
3249
+ * @scope `webhooks:write`
3250
+ * @danger critical
3251
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3252
+ */
3253
+ create: (body, options) => this.transport.call(environmentOperations["webhooks.create"], [], body, options),
3254
+ /**
3255
+ * Delete a webhook endpoint. It stops receiving events at once.
3256
+ *
3257
+ * Requires scope `webhooks:write`. Danger: destructive.
3258
+ *
3259
+ * `DELETE /webhooks/{id}` · action `webhooks.delete`
3260
+ * @scope `webhooks:write`
3261
+ * @danger destructive
3262
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3263
+ */
3264
+ delete: (id, options) => this.transport.call(environmentOperations["webhooks.delete"], [id], void 0, options),
3265
+ /**
3266
+ * Get one webhook endpoint: URL, owner, subscribed events, health. Never its signing secret.
3267
+ *
3268
+ * Requires scope `webhooks:read`. Danger: read.
3269
+ *
3270
+ * `GET /webhooks/{id}` · action `webhooks.get`
3271
+ * @scope `webhooks:read`
3272
+ * @danger read
3273
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3274
+ */
3275
+ get: (id, options) => this.transport.call(environmentOperations["webhooks.get"], [id], void 0, options),
3276
+ /**
3277
+ * List the webhook endpoints registered in this environment: URL, owner, subscribed events and whether each is active.
3278
+ *
3279
+ * Requires scope `webhooks:read`. Danger: read.
3280
+ *
3281
+ * `GET /webhooks` · action `webhooks.list`
3282
+ * @scope `webhooks:read`
3283
+ * @danger read
3284
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3285
+ */
3286
+ list: (query, options) => this.transport.call(environmentOperations["webhooks.list"], [], query, options),
3287
+ /** Every item of `webhooks.list`, fetching pages as the iteration reaches them. */
3288
+ listAll: (query, options) => this.transport.paginate(environmentOperations["webhooks.list"], [], query, options),
3289
+ /**
3290
+ * Pause a webhook endpoint: it stops receiving events until resumed.
3291
+ *
3292
+ * Requires scope `webhooks:write`. Danger: write.
3293
+ *
3294
+ * `POST /webhooks/{id}/pause` · action `webhooks.pause`
3295
+ * @scope `webhooks:write`
3296
+ * @danger write
3297
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3298
+ */
3299
+ pause: (id, options) => this.transport.call(environmentOperations["webhooks.pause"], [id], void 0, options),
3300
+ /**
3301
+ * Resume a paused webhook endpoint: it receives events again.
3302
+ *
3303
+ * Requires scope `webhooks:write`. Danger: write.
3304
+ *
3305
+ * `POST /webhooks/{id}/resume` · action `webhooks.resume`
3306
+ * @scope `webhooks:write`
3307
+ * @danger write
3308
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3309
+ */
3310
+ resume: (id, options) => this.transport.call(environmentOperations["webhooks.resume"], [id], void 0, options),
3311
+ /**
3312
+ * Change a webhook endpoint's URL and/or the events it subscribes to.
3313
+ *
3314
+ * Requires scope `webhooks:write`. Danger: write.
3315
+ *
3316
+ * `PATCH /webhooks/{id}` · action `webhooks.update`
3317
+ * @scope `webhooks:write`
3318
+ * @danger write
3319
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3320
+ */
3321
+ update: (id, body, options) => this.transport.call(environmentOperations["webhooks.update"], [id], body, options),
3322
+ secret: {
3323
+ /**
3324
+ * Issue a new signing secret for a webhook endpoint, returned once. The old secret stops verifying immediately.
3325
+ *
3326
+ * Requires scope `webhooks:write`. Danger: critical.
3327
+ *
3328
+ * `POST /webhooks/{id}/rotate` · action `webhooks.secret.rotate`
3329
+ * @scope `webhooks:write`
3330
+ * @danger critical
3331
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3332
+ */
3333
+ rotate: (id, options) => this.transport.call(environmentOperations["webhooks.secret.rotate"], [id], void 0, options)
3334
+ },
3335
+ signatureScheme: {
3336
+ /**
3337
+ * Change how a webhook endpoint's deliveries are signed (cbox or standard_webhooks). No new secret is issued: a hex secret is used as whsec_ + base64 of itself. Update the receiver first.
3338
+ *
3339
+ * Requires scope `webhooks:write`. Danger: destructive.
3340
+ *
3341
+ * `POST /webhooks/{id}/signature-scheme` · action `webhooks.signature_scheme.change`
3342
+ * @scope `webhooks:write`
3343
+ * @danger destructive
3344
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3345
+ */
3346
+ change: (id, body, options) => this.transport.call(environmentOperations["webhooks.signature_scheme.change"], [id], body, options)
3347
+ }
3348
+ };
3349
+ };
3350
+
3351
+ // src/management/generated/workspace.ts
3352
+ var workspaceOperations = {
3353
+ "action_approvals.get": { action: null, operationId: null, method: "GET", path: "/workspace/action-approvals/{id}", pathParams: ["id"], scope: null, danger: null, approval: false, body: false, pagination: null },
3354
+ "environments.create": { action: "environments.create", operationId: "environments_create", method: "POST", path: "/workspace/environments", pathParams: [], scope: "environments:write", danger: "critical", approval: true, body: true, pagination: null },
3355
+ "environments.domain.remove": { action: "environments.domain.remove", operationId: "environments_domain_remove", method: "DELETE", path: "/workspace/environments/{environment_id}/domain", pathParams: ["environment_id"], scope: "environments:write", danger: "destructive", approval: true, body: false, pagination: null },
3356
+ "environments.domain.request": { action: "environments.domain.request", operationId: "environments_domain_request", method: "POST", path: "/workspace/environments/{environment_id}/domain", pathParams: ["environment_id"], scope: "environments:write", danger: "write", approval: true, body: true, pagination: null },
3357
+ "environments.domain.verify": { action: "environments.domain.verify", operationId: "environments_domain_verify", method: "POST", path: "/workspace/environments/{environment_id}/domain/verify", pathParams: ["environment_id"], scope: "environments:write", danger: "write", approval: true, body: false, pagination: null },
3358
+ "environments.list": { action: "environments.list", operationId: "environments_list", method: "GET", path: "/workspace/environments", pathParams: [], scope: "workspace:read", danger: "read", approval: true, body: false, pagination: "page" },
3359
+ "keys.environment.create": { action: "keys.environment.create", operationId: "keys_environment_create", method: "POST", path: "/workspace/environments/{environment_id}/keys", pathParams: ["environment_id"], scope: "keys:write", danger: "critical", approval: true, body: true, pagination: null },
3360
+ "keys.environment.revoke": { action: "keys.environment.revoke", operationId: "keys_environment_revoke", method: "DELETE", path: "/workspace/environments/{environment_id}/keys/{id}", pathParams: ["environment_id", "id"], scope: "keys:write", danger: "destructive", approval: true, body: false, pagination: null },
3361
+ "keys.workspace.create": { action: "keys.workspace.create", operationId: "keys_workspace_create", method: "POST", path: "/workspace/keys", pathParams: [], scope: "keys:write", danger: "critical", approval: true, body: true, pagination: null },
3362
+ "keys.workspace.list": { action: "keys.workspace.list", operationId: "keys_workspace_list", method: "GET", path: "/workspace/keys", pathParams: [], scope: "workspace:read", danger: "read", approval: true, body: false, pagination: "page" },
3363
+ "keys.workspace.revoke": { action: "keys.workspace.revoke", operationId: "keys_workspace_revoke", method: "DELETE", path: "/workspace/keys/{id}", pathParams: ["id"], scope: "keys:write", danger: "destructive", approval: true, body: false, pagination: null },
3364
+ "projects.create": { action: "projects.create", operationId: "projects_create", method: "POST", path: "/workspace/projects", pathParams: [], scope: "projects:write", danger: "write", approval: true, body: true, pagination: null },
3365
+ "projects.list": { action: "projects.list", operationId: "projects_list", method: "GET", path: "/workspace/projects", pathParams: [], scope: "workspace:read", danger: "read", approval: true, body: false, pagination: null },
3366
+ "projects.reactivate": { action: "projects.reactivate", operationId: "projects_reactivate", method: "POST", path: "/workspace/projects/{id}/reactivate", pathParams: ["id"], scope: "projects:write", danger: "write", approval: true, body: false, pagination: null },
3367
+ "projects.rename": { action: "projects.rename", operationId: "projects_rename", method: "PATCH", path: "/workspace/projects/{id}", pathParams: ["id"], scope: "projects:write", danger: "write", approval: true, body: true, pagination: null },
3368
+ "projects.suspend": { action: "projects.suspend", operationId: "projects_suspend", method: "POST", path: "/workspace/projects/{id}/suspend", pathParams: ["id"], scope: "projects:write", danger: "write", approval: true, body: false, pagination: null },
3369
+ "projects.verification.resend": { action: "projects.verification.resend", operationId: "projects_verification_resend", method: "POST", path: "/workspace/projects/verification/resend", pathParams: [], scope: "projects:write", danger: "write", approval: true, body: false, pagination: null },
3370
+ "team.environment_access": { action: "team.environment_access", operationId: "team_environment_access", method: "PUT", path: "/workspace/members/{id}/access", pathParams: ["id"], scope: "team:write", danger: "write", approval: true, body: true, pagination: null },
3371
+ "team.invitations.list": { action: "team.invitations.list", operationId: "team_invitations_list", method: "GET", path: "/workspace/invitations", pathParams: [], scope: "team:read", danger: "read", approval: true, body: false, pagination: null },
3372
+ "team.invitations.resend": { action: "team.invitations.resend", operationId: "team_invitations_resend", method: "POST", path: "/workspace/invitations/{id}/resend", pathParams: ["id"], scope: "team:write", danger: "write", approval: true, body: false, pagination: null },
3373
+ "team.invitations.revoke": { action: "team.invitations.revoke", operationId: "team_invitations_revoke", method: "DELETE", path: "/workspace/invitations/{id}", pathParams: ["id"], scope: "team:write", danger: "destructive", approval: true, body: false, pagination: null },
3374
+ "team.invite": { action: "team.invite", operationId: "team_invite", method: "POST", path: "/workspace/members", pathParams: [], scope: "team:write", danger: "write", approval: true, body: true, pagination: null },
3375
+ "team.list": { action: "team.list", operationId: "team_list", method: "GET", path: "/workspace/members", pathParams: [], scope: "team:read", danger: "read", approval: true, body: false, pagination: "page" },
3376
+ "team.remove": { action: "team.remove", operationId: "team_remove", method: "DELETE", path: "/workspace/members/{id}", pathParams: ["id"], scope: "team:write", danger: "destructive", approval: true, body: false, pagination: null },
3377
+ "team.role": { action: "team.role", operationId: "team_role", method: "PATCH", path: "/workspace/members/{id}/role", pathParams: ["id"], scope: "team:write", danger: "write", approval: true, body: true, pagination: null },
3378
+ "team.transfer_ownership": { action: "team.transfer_ownership", operationId: "team_transfer_ownership", method: "POST", path: "/workspace/members/{id}/transfer-ownership", pathParams: ["id"], scope: "team:write", danger: "critical", approval: true, body: false, pagination: null },
3379
+ "workspace.get": { action: "workspace.get", operationId: "workspace_get", method: "GET", path: "/workspace", pathParams: [], scope: "workspace:read", danger: "read", approval: true, body: false, pagination: null },
3380
+ "workspace.settings.update": { action: "workspace.settings.update", operationId: "workspace_settings_update", method: "PATCH", path: "/workspace", pathParams: [], scope: "settings:write", danger: "write", approval: true, body: true, pagination: null }
3381
+ };
3382
+ var WorkspaceClient = class {
3383
+ /** The transport every method runs on — authentication, retries, approvals. */
3384
+ transport;
3385
+ constructor(options) {
3386
+ this.transport = new ManagementTransport("workspace", options, "https://api.cboxid.com");
3387
+ }
3388
+ /** Call a route by method and path (relative to `/api/v1`) — for anything not generated. */
3389
+ request(method, path, input, options) {
3390
+ return this.transport.request(method, path, input, options);
3391
+ }
3392
+ actionApprovals = {
3393
+ /**
3394
+ * Where an approval this key asked for stands
3395
+ *
3396
+ * Any workspace key — or a member's token — may poll the approvals it raised, and only
3397
+ * those: another credential's id is a 404. `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.
3398
+ *
3399
+ * `GET /workspace/action-approvals/{id}`
3400
+ */
3401
+ get: (id, options) => this.transport.call(workspaceOperations["action_approvals.get"], [id], void 0, options)
3402
+ };
3403
+ environments = {
3404
+ /**
3405
+ * Create an environment
3406
+ *
3407
+ * Requires scope `environments:write` and the `manage-environments` capability
3408
+ * (owner/admin/developer). Danger: critical — with `initial_key` it mints a credential.
3409
+ *
3410
+ * With `initial_key`, the environment's first management key is minted in the same
3411
+ * call and returned once as `initial_key.token` — enough for an agent holding one
3412
+ * workspace key to stand an environment up and start configuring it on the
3413
+ * environment's own host. An idempotent replay returns `initial_key.token: null`.
3414
+ *
3415
+ * `POST /workspace/environments` · action `environments.create`
3416
+ * @scope `environments:write`
3417
+ * @danger critical
3418
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3419
+ */
3420
+ create: (body, options) => this.transport.call(workspaceOperations["environments.create"], [], body, options),
3421
+ /**
3422
+ * List environments
3423
+ *
3424
+ * Requires scope `workspace:read` (any role).
3425
+ *
3426
+ * `GET /workspace/environments` · action `environments.list`
3427
+ * @scope `workspace:read`
3428
+ * @danger read
3429
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3430
+ */
3431
+ list: (query, options) => this.transport.call(workspaceOperations["environments.list"], [], query, options),
3432
+ /** Every item of `environments.list`, fetching pages as the iteration reaches them. */
3433
+ listAll: (query, options) => this.transport.paginate(workspaceOperations["environments.list"], [], query, options),
3434
+ domain: {
3435
+ /**
3436
+ * Stop serving one of the workspace's environments on its custom domain. Anything using that domain stops reaching it.
3437
+ *
3438
+ * Requires scope `environments:write` and a role that may `manage-environments`. Danger: destructive.
3439
+ *
3440
+ * `DELETE /workspace/environments/{environment_id}/domain` · action `environments.domain.remove`
3441
+ * @scope `environments:write`
3442
+ * @danger destructive
3443
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3444
+ */
3445
+ remove: (environmentId, options) => this.transport.call(workspaceOperations["environments.domain.remove"], [environmentId], void 0, options),
3446
+ /**
3447
+ * Start serving one of the workspace's environments on a custom domain: returns the DNS TXT record that proves you control it.
3448
+ *
3449
+ * Requires scope `environments:write` and a role that may `manage-environments`. Danger: write.
3450
+ *
3451
+ * `POST /workspace/environments/{environment_id}/domain` · action `environments.domain.request`
3452
+ * @scope `environments:write`
3453
+ * @danger write
3454
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3455
+ */
3456
+ request: (environmentId, body, options) => this.transport.call(workspaceOperations["environments.domain.request"], [environmentId], body, options),
3457
+ /**
3458
+ * Look for the pending domain's DNS TXT record and, once it is visible, serve the environment on that domain.
3459
+ *
3460
+ * Requires scope `environments:write` and a role that may `manage-environments`. Danger: write.
3461
+ *
3462
+ * `POST /workspace/environments/{environment_id}/domain/verify` · action `environments.domain.verify`
3463
+ * @scope `environments:write`
3464
+ * @danger write
3465
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3466
+ */
3467
+ verify: (environmentId, options) => this.transport.call(workspaceOperations["environments.domain.verify"], [environmentId], void 0, options)
3468
+ }
3469
+ };
3470
+ keys = {
3471
+ environment: {
3472
+ /**
3473
+ * Mint a management key for one of the workspace's environments, with the scopes it needs. The value is returned once, as `token`.
3474
+ *
3475
+ * Requires scope `keys:write` and a role that may `manage-environments`. Danger: critical.
3476
+ *
3477
+ * `POST /workspace/environments/{environment_id}/keys` · action `keys.environment.create`
3478
+ * @scope `keys:write`
3479
+ * @danger critical
3480
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3481
+ */
3482
+ create: (environmentId, body, options) => this.transport.call(workspaceOperations["keys.environment.create"], [environmentId], body, options),
3483
+ /**
3484
+ * Revoke one of an environment's management keys; whatever uses it stops immediately.
3485
+ *
3486
+ * Requires scope `keys:write` and a role that may `manage-environments`. Danger: destructive.
3487
+ *
3488
+ * `DELETE /workspace/environments/{environment_id}/keys/{id}` · action `keys.environment.revoke`
3489
+ * @scope `keys:write`
3490
+ * @danger destructive
3491
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3492
+ */
3493
+ revoke: (environmentId, id, options) => this.transport.call(workspaceOperations["keys.environment.revoke"], [environmentId, id], void 0, options)
3494
+ },
3495
+ workspace: {
3496
+ /**
3497
+ * Mint a workspace key with a role and optional scopes, never wider than the caller. The value is returned once, as `token`.
3498
+ *
3499
+ * Requires scope `keys:write` and a role that may `manage-environments` and `manage-members`. Danger: critical.
3500
+ *
3501
+ * `POST /workspace/keys` · action `keys.workspace.create`
3502
+ * @scope `keys:write`
3503
+ * @danger critical
3504
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3505
+ */
3506
+ create: (body, options) => this.transport.call(workspaceOperations["keys.workspace.create"], [], body, options),
3507
+ /**
3508
+ * List the workspace's keys, newest first, revoked ones included — names, roles, scopes and expiry, never their values.
3509
+ *
3510
+ * Requires scope `workspace:read` and a role that may `manage-members`. Danger: read.
3511
+ *
3512
+ * `GET /workspace/keys` · action `keys.workspace.list`
3513
+ * @scope `workspace:read`
3514
+ * @danger read
3515
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3516
+ */
3517
+ list: (query, options) => this.transport.call(workspaceOperations["keys.workspace.list"], [], query, options),
3518
+ /** Every item of `keys.workspace.list`, fetching pages as the iteration reaches them. */
3519
+ listAll: (query, options) => this.transport.paginate(workspaceOperations["keys.workspace.list"], [], query, options),
3520
+ /**
3521
+ * Revoke a workspace key, and every key it minted on either plane (workspace keys and environment management keys, all the way down); whatever uses them stops immediately.
3522
+ *
3523
+ * Requires scope `keys:write` and a role that may `manage-environments` and `manage-members`. Danger: destructive.
3524
+ *
3525
+ * `DELETE /workspace/keys/{id}` · action `keys.workspace.revoke`
3526
+ * @scope `keys:write`
3527
+ * @danger destructive
3528
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3529
+ */
3530
+ revoke: (id, options) => this.transport.call(workspaceOperations["keys.workspace.revoke"], [id], void 0, options)
3531
+ }
3532
+ };
3533
+ projects = {
3534
+ /**
3535
+ * Create a project
3536
+ *
3537
+ * Stand up another independently-billed IdP product. Requires scope `projects:write` and the `manage-environments` capability (owner/admin/developer).
3538
+ *
3539
+ * `POST /workspace/projects` · action `projects.create`
3540
+ * @scope `projects:write`
3541
+ * @danger write
3542
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3543
+ */
3544
+ create: (body, options) => this.transport.call(workspaceOperations["projects.create"], [], body, options),
3545
+ /**
3546
+ * List projects
3547
+ *
3548
+ * Requires scope `workspace:read` (any role). The workspace's projects (IdP products). Each carries its own plan and environment allowance.
3549
+ *
3550
+ * `GET /workspace/projects` · action `projects.list`
3551
+ * @scope `workspace:read`
3552
+ * @danger read
3553
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3554
+ */
3555
+ list: (options) => this.transport.call(workspaceOperations["projects.list"], [], void 0, options),
3556
+ /**
3557
+ * Reactivate a suspended project, so environments can be added to it again.
3558
+ *
3559
+ * Requires scope `projects:write` and a role that may `manage-environments`. Danger: write.
3560
+ *
3561
+ * `POST /workspace/projects/{id}/reactivate` · action `projects.reactivate`
3562
+ * @scope `projects:write`
3563
+ * @danger write
3564
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3565
+ */
3566
+ reactivate: (id, options) => this.transport.call(workspaceOperations["projects.reactivate"], [id], void 0, options),
3567
+ /**
3568
+ * Rename a project.
3569
+ *
3570
+ * Requires scope `projects:write` and a role that may `manage-environments`. Danger: write.
3571
+ *
3572
+ * `PATCH /workspace/projects/{id}` · action `projects.rename`
3573
+ * @scope `projects:write`
3574
+ * @danger write
3575
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3576
+ */
3577
+ rename: (id, body, options) => this.transport.call(workspaceOperations["projects.rename"], [id], body, options),
3578
+ /**
3579
+ * Suspend a project: its environments stay live, but no new ones can be added until it is reactivated.
3580
+ *
3581
+ * Requires scope `projects:write` and a role that may `manage-environments`. Danger: write.
3582
+ *
3583
+ * `POST /workspace/projects/{id}/suspend` · action `projects.suspend`
3584
+ * @scope `projects:write`
3585
+ * @danger write
3586
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3587
+ */
3588
+ suspend: (id, options) => this.transport.call(workspaceOperations["projects.suspend"], [id], void 0, options),
3589
+ verification: {
3590
+ /**
3591
+ * Re-send the signup confirmation the workspace's first environment is waiting on, to the owner's address on file.
3592
+ *
3593
+ * Requires scope `projects:write` and a role that may `manage-environments`. Danger: write.
3594
+ *
3595
+ * `POST /workspace/projects/verification/resend` · action `projects.verification.resend`
3596
+ * @scope `projects:write`
3597
+ * @danger write
3598
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3599
+ */
3600
+ resend: (options) => this.transport.call(workspaceOperations["projects.verification.resend"], [], void 0, options)
3601
+ }
3602
+ };
3603
+ team = {
3604
+ /**
3605
+ * Set which of the workspace's environments a team member reaches: all of them, or the listed ones.
3606
+ *
3607
+ * Requires scope `team:write` and a role that may `manage-members`. Danger: write.
3608
+ *
3609
+ * `PUT /workspace/members/{id}/access` · action `team.environment_access`
3610
+ * @scope `team:write`
3611
+ * @danger write
3612
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3613
+ */
3614
+ environmentAccess: (id, body, options) => this.transport.call(workspaceOperations["team.environment_access"], [id], body, options),
3615
+ /**
3616
+ * Invite a member
3617
+ *
3618
+ * Requires scope `team:write` and the `manage-members` capability (owner/admin). Invites the address onto the
3619
+ * workspace's team — the same invitation the console's Team page sends: a mail naming
3620
+ * this key as the inviter and the role, with a signed link on which the invitee sets a
3621
+ * password and is signed in. Owner is never invited; ownership is transferred. An
3622
+ * earlier pending invitation for the same address is superseded. List, re-send and
3623
+ * withdraw it under `/workspace/invitations`.
3624
+ *
3625
+ * `POST /workspace/members` · action `team.invite`
3626
+ * @scope `team:write`
3627
+ * @danger write
3628
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3629
+ */
3630
+ invite: (body, options) => this.transport.call(workspaceOperations["team.invite"], [], body, options),
3631
+ /**
3632
+ * List members
3633
+ *
3634
+ * Requires scope `team:read` and the `read-members` capability (owner/admin/viewer). The roster is PII — a developer key is refused.
3635
+ *
3636
+ * `GET /workspace/members` · action `team.list`
3637
+ * @scope `team:read`
3638
+ * @danger read
3639
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3640
+ */
3641
+ list: (query, options) => this.transport.call(workspaceOperations["team.list"], [], query, options),
3642
+ /** Every item of `team.list`, fetching pages as the iteration reaches them. */
3643
+ listAll: (query, options) => this.transport.paginate(workspaceOperations["team.list"], [], query, options),
3644
+ /**
3645
+ * Remove a member from the workspace's team. The owner is never removed; transfer ownership first.
3646
+ *
3647
+ * Requires scope `team:write` and a role that may `manage-members`. Danger: destructive.
3648
+ *
3649
+ * `DELETE /workspace/members/{id}` · action `team.remove`
3650
+ * @scope `team:write`
3651
+ * @danger destructive
3652
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3653
+ */
3654
+ remove: (id, options) => this.transport.call(workspaceOperations["team.remove"], [id], void 0, options),
3655
+ /**
3656
+ * Change a team member's role (admin, developer, member or viewer). The owner's role changes only by transferring ownership.
3657
+ *
3658
+ * Requires scope `team:write` and a role that may `manage-members`. Danger: write.
3659
+ *
3660
+ * `PATCH /workspace/members/{id}/role` · action `team.role`
3661
+ * @scope `team:write`
3662
+ * @danger write
3663
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3664
+ */
3665
+ role: (id, body, options) => this.transport.call(workspaceOperations["team.role"], [id], body, options),
3666
+ /**
3667
+ * Make another member the workspace's owner; the current owner stays on as an admin. Only the owner, signed in, may do this.
3668
+ *
3669
+ * Requires scope `team:write` and a role that may `manage-members`. Danger: critical.
3670
+ *
3671
+ * `POST /workspace/members/{id}/transfer-ownership` · action `team.transfer_ownership`
3672
+ * @scope `team:write`
3673
+ * @danger critical
3674
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3675
+ */
3676
+ transferOwnership: (id, options) => this.transport.call(workspaceOperations["team.transfer_ownership"], [id], void 0, options),
3677
+ invitations: {
3678
+ /**
3679
+ * List pending invitations
3680
+ *
3681
+ * Requires scope `team:read` and the `read-members` capability. The team's invitations nobody has accepted yet, newest first (at most 100).
3682
+ *
3683
+ * `GET /workspace/invitations` · action `team.invitations.list`
3684
+ * @scope `team:read`
3685
+ * @danger read
3686
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3687
+ */
3688
+ list: (options) => this.transport.call(workspaceOperations["team.invitations.list"], [], void 0, options),
3689
+ /**
3690
+ * Re-send an invitation
3691
+ *
3692
+ * Requires scope `team:write` and the `manage-members` capability. Mails a fresh link; the earlier link stops
3693
+ * working and the invitation gets a new `id`. At most once a minute per address
3694
+ * (`429`, `too_soon`). If the mail server refuses, the earlier invitation is kept (`503`).
3695
+ *
3696
+ * `POST /workspace/invitations/{id}/resend` · action `team.invitations.resend`
3697
+ * @scope `team:write`
3698
+ * @danger write
3699
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3700
+ */
3701
+ resend: (id, options) => this.transport.call(workspaceOperations["team.invitations.resend"], [id], void 0, options),
3702
+ /**
3703
+ * Withdraw an invitation
3704
+ *
3705
+ * Requires scope `team:write` and the `manage-members` capability. The link stops working. An invitation that is not pending in this workspace is a `404`.
3706
+ *
3707
+ * `DELETE /workspace/invitations/{id}` · action `team.invitations.revoke`
3708
+ * @scope `team:write`
3709
+ * @danger destructive
3710
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3711
+ */
3712
+ revoke: (id, options) => this.transport.call(workspaceOperations["team.invitations.revoke"], [id], void 0, options)
3713
+ }
3714
+ };
3715
+ workspace = {
3716
+ /**
3717
+ * Get the workspace
3718
+ *
3719
+ * Requires scope `workspace:read` (any role). Returns the workspace's identity. The `projects` block (each project's plan/allowance) is included only for keys whose role can read billing (owner/admin/viewer — not developer).
3720
+ *
3721
+ * `GET /workspace` · action `workspace.get`
3722
+ * @scope `workspace:read`
3723
+ * @danger read
3724
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3725
+ */
3726
+ get: (options) => this.transport.call(workspaceOperations["workspace.get"], [], void 0, options),
3727
+ settings: {
3728
+ /**
3729
+ * Rename the workspace.
3730
+ *
3731
+ * Requires scope `settings:write` and a role that may `manage-members`. Danger: write.
3732
+ *
3733
+ * `PATCH /workspace` · action `workspace.settings.update`
3734
+ * @scope `settings:write`
3735
+ * @danger write
3736
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3737
+ */
3738
+ update: (body, options) => this.transport.call(workspaceOperations["workspace.settings.update"], [], body, options)
3739
+ }
3740
+ };
3741
+ };
3742
+
3743
+ // src/management/generated/platform.ts
3744
+ var platformOperations = {
3745
+ "action_approvals.get": { action: null, operationId: null, method: "GET", path: "/platform/action-approvals/{id}", pathParams: ["id"], scope: null, danger: null, approval: false, body: false, pagination: null },
3746
+ "platform.environments.create": { action: "platform.environments.create", operationId: "platform_environments_create", method: "POST", path: "/platform/environments", pathParams: [], scope: "operator:environments:write", danger: "critical", approval: true, body: true, pagination: null },
3747
+ "platform.environments.provision": { action: "platform.environments.provision", operationId: "platform_environments_provision", method: "POST", path: "/platform/environments/{environment_id}/provision", pathParams: ["environment_id"], scope: "operator:environments:write", danger: "critical", approval: true, body: true, pagination: null },
3748
+ "platform.operators.create": { action: "platform.operators.create", operationId: "platform_operators_create", method: "POST", path: "/platform/operators", pathParams: [], scope: "operator:operators:write", danger: "critical", approval: true, body: true, pagination: null },
3749
+ "platform.operators.set_status": { action: "platform.operators.set_status", operationId: "platform_operators_set_status", method: "PUT", path: "/platform/operators/{operator_id}/status", pathParams: ["operator_id"], scope: "operator:operators:write", danger: "critical", approval: true, body: true, pagination: null },
3750
+ "platform.organizations.create": { action: "platform.organizations.create", operationId: "platform_organizations_create", method: "POST", path: "/platform/environments/{environment_id}/organizations", pathParams: ["environment_id"], scope: "operator:organizations:write", danger: "critical", approval: true, body: true, pagination: null },
3751
+ "platform.organizations.move": { action: "platform.organizations.move", operationId: "platform_organizations_move", method: "PUT", path: "/platform/environments/{environment_id}/organizations/{organization_id}/parent", pathParams: ["environment_id", "organization_id"], scope: "operator:organizations:write", danger: "critical", approval: true, body: true, pagination: null },
3752
+ "platform.organizations.set_status": { action: "platform.organizations.set_status", operationId: "platform_organizations_set_status", method: "PUT", path: "/platform/environments/{environment_id}/organizations/{organization_id}/status", pathParams: ["environment_id", "organization_id"], scope: "operator:organizations:write", danger: "critical", approval: true, body: true, pagination: null },
3753
+ "platform.workspaces.create": { action: "platform.workspaces.create", operationId: "platform_workspaces_create", method: "POST", path: "/platform/workspaces", pathParams: [], scope: "operator:workspaces:write", danger: "critical", approval: true, body: true, pagination: null },
3754
+ "platform.workspaces.set_status": { action: "platform.workspaces.set_status", operationId: "platform_workspaces_set_status", method: "PUT", path: "/platform/workspaces/{workspace_id}/status", pathParams: ["workspace_id"], scope: "operator:workspaces:write", danger: "critical", approval: true, body: true, pagination: null }
3755
+ };
3756
+ var PlatformClient = class {
3757
+ /** The transport every method runs on — authentication, retries, approvals. */
3758
+ transport;
3759
+ constructor(options) {
3760
+ this.transport = new ManagementTransport("platform", options, "https://api.cboxid.com");
3761
+ }
3762
+ /** Call a route by method and path (relative to `/api/v1`) — for anything not generated. */
3763
+ request(method, path, input, options) {
3764
+ return this.transport.request(method, path, input, options);
3765
+ }
3766
+ actionApprovals = {
3767
+ /**
3768
+ * Where an approval you asked for stands
3769
+ *
3770
+ * The `poll_url` of a `202 approval_required`: an approval this token raised, and only those — another token's id is a 404. `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.
3771
+ *
3772
+ * `GET /platform/action-approvals/{id}`
3773
+ */
3774
+ get: (id, options) => this.transport.call(platformOperations["action_approvals.get"], [id], void 0, options)
3775
+ };
3776
+ environments = {
3777
+ /**
3778
+ * Create an environment on the deployment, with its own signing key. A domain is verified separately, by DNS.
3779
+ *
3780
+ * Requires scope `operator:environments:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3781
+ *
3782
+ * `POST /platform/environments` · action `platform.environments.create`
3783
+ * @scope `operator:environments:write`
3784
+ * @danger critical
3785
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3786
+ */
3787
+ create: (body, options) => this.transport.call(platformOperations["platform.environments.create"], [], body, options),
3788
+ /**
3789
+ * Bootstrap an environment with its first organization and an owner administrator, so people can sign in to it.
3790
+ *
3791
+ * Requires scope `operator:environments:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3792
+ *
3793
+ * `POST /platform/environments/{environment_id}/provision` · action `platform.environments.provision`
3794
+ * @scope `operator:environments:write`
3795
+ * @danger critical
3796
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3797
+ */
3798
+ provision: (environmentId, body, options) => this.transport.call(platformOperations["platform.environments.provision"], [environmentId], body, options)
3799
+ };
3800
+ operators = {
3801
+ /**
3802
+ * Add a platform operator: a person with authority over the whole deployment.
3803
+ *
3804
+ * Requires scope `operator:operators:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3805
+ *
3806
+ * `POST /platform/operators` · action `platform.operators.create`
3807
+ * @scope `operator:operators:write`
3808
+ * @danger critical
3809
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3810
+ */
3811
+ create: (body, options) => this.transport.call(platformOperations["platform.operators.create"], [], body, options),
3812
+ /**
3813
+ * Suspend a platform operator, or reactivate one. Never yourself, and never the last active operator.
3814
+ *
3815
+ * Requires scope `operator:operators:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3816
+ *
3817
+ * `PUT /platform/operators/{operator_id}/status` · action `platform.operators.set_status`
3818
+ * @scope `operator:operators:write`
3819
+ * @danger critical
3820
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3821
+ */
3822
+ setStatus: (operatorId, body, options) => this.transport.call(platformOperations["platform.operators.set_status"], [operatorId], body, options)
3823
+ };
3824
+ organizations = {
3825
+ /**
3826
+ * Create an organization inside an environment, optionally under a parent organization of the same environment.
3827
+ *
3828
+ * Requires scope `operator:organizations:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3829
+ *
3830
+ * `POST /platform/environments/{environment_id}/organizations` · action `platform.organizations.create`
3831
+ * @scope `operator:organizations:write`
3832
+ * @danger critical
3833
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3834
+ */
3835
+ create: (environmentId, body, options) => this.transport.call(platformOperations["platform.organizations.create"], [environmentId], body, options),
3836
+ /**
3837
+ * Move an organization under another organization of the same environment, or to the top of its hierarchy.
3838
+ *
3839
+ * Requires scope `operator:organizations:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3840
+ *
3841
+ * `PUT /platform/environments/{environment_id}/organizations/{organization_id}/parent` · action `platform.organizations.move`
3842
+ * @scope `operator:organizations:write`
3843
+ * @danger critical
3844
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3845
+ */
3846
+ move: (environmentId, organizationId, body, options) => this.transport.call(platformOperations["platform.organizations.move"], [environmentId, organizationId], body, options),
3847
+ /**
3848
+ * Suspend an organization inside an environment (its members can no longer sign in to it) or reactivate it.
3849
+ *
3850
+ * Requires scope `operator:organizations:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3851
+ *
3852
+ * `PUT /platform/environments/{environment_id}/organizations/{organization_id}/status` · action `platform.organizations.set_status`
3853
+ * @scope `operator:organizations:write`
3854
+ * @danger critical
3855
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3856
+ */
3857
+ setStatus: (environmentId, organizationId, body, options) => this.transport.call(platformOperations["platform.organizations.set_status"], [environmentId, organizationId], body, options)
3858
+ };
3859
+ workspaces = {
3860
+ /**
3861
+ * Create a workspace with its owner, first project and first environment; the owner is emailed a link to set their password.
3862
+ *
3863
+ * Requires scope `operator:workspaces:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3864
+ *
3865
+ * `POST /platform/workspaces` · action `platform.workspaces.create`
3866
+ * @scope `operator:workspaces:write`
3867
+ * @danger critical
3868
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3869
+ */
3870
+ create: (body, options) => this.transport.call(platformOperations["platform.workspaces.create"], [], body, options),
3871
+ /**
3872
+ * Suspend a workspace (its people can no longer sign in, its environments stop serving) or reactivate it.
3873
+ *
3874
+ * Requires scope `operator:workspaces:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.
3875
+ *
3876
+ * `PUT /platform/workspaces/{workspace_id}/status` · action `platform.workspaces.set_status`
3877
+ * @scope `operator:workspaces:write`
3878
+ * @danger critical
3879
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3880
+ */
3881
+ setStatus: (workspaceId, body, options) => this.transport.call(platformOperations["platform.workspaces.set_status"], [workspaceId], body, options)
3882
+ };
3883
+ };
3884
+
3885
+ // src/management/generated/account.ts
3886
+ var accountOperations = {
3887
+ "action_approvals.get": { action: null, operationId: null, method: "GET", path: "/me/action-approvals/{id}", pathParams: ["id"], scope: null, danger: null, approval: false, body: false, pagination: null },
3888
+ "account.api_keys.create": { action: "account.api_keys.create", operationId: "account_api_keys_create", method: "POST", path: "/me/organizations/{organization_id}/api-keys", pathParams: ["organization_id"], scope: "account:api_keys:write", danger: "critical", approval: true, body: true, pagination: null },
3889
+ "account.api_keys.revoke": { action: "account.api_keys.revoke", operationId: "account_api_keys_revoke", method: "DELETE", path: "/me/organizations/{organization_id}/api-keys/{key_id}", pathParams: ["organization_id", "key_id"], scope: "account:api_keys:write", danger: "destructive", approval: true, body: false, pagination: null },
3890
+ "account.applications.revoke": { action: "account.applications.revoke", operationId: "account_applications_revoke", method: "DELETE", path: "/me/applications/{client_id}", pathParams: ["client_id"], scope: "account:applications:write", danger: "destructive", approval: true, body: false, pagination: null },
3891
+ "account.devices.remove": { action: "account.devices.remove", operationId: "account_devices_remove", method: "DELETE", path: "/me/devices/{device_id}", pathParams: ["device_id"], scope: "account:devices:write", danger: "destructive", approval: true, body: false, pagination: null },
3892
+ "account.organizations.leave": { action: "account.organizations.leave", operationId: "account_organizations_leave", method: "POST", path: "/me/organizations/{organization_id}/leave", pathParams: ["organization_id"], scope: "account:organizations:write", danger: "destructive", approval: true, body: false, pagination: null },
3893
+ "account.passkeys.remove": { action: "account.passkeys.remove", operationId: "account_passkeys_remove", method: "DELETE", path: "/me/passkeys/{passkey_id}", pathParams: ["passkey_id"], scope: "account:sign_in:write", danger: "critical", approval: true, body: false, pagination: null },
3894
+ "account.profile.update": { action: "account.profile.update", operationId: "account_profile_update", method: "PATCH", path: "/me/profile", pathParams: [], scope: "account:profile:write", danger: "write", approval: true, body: true, pagination: null },
3895
+ "account.sessions.revoke": { action: "account.sessions.revoke", operationId: "account_sessions_revoke", method: "DELETE", path: "/me/sessions/{session_id}", pathParams: ["session_id"], scope: "account:sessions:write", danger: "destructive", approval: true, body: false, pagination: null },
3896
+ "account.sessions.revoke_others": { action: "account.sessions.revoke_others", operationId: "account_sessions_revoke_others", method: "POST", path: "/me/sessions/revoke-others", pathParams: [], scope: "account:sessions:write", danger: "critical", approval: true, body: false, pagination: null },
3897
+ "account.social.unlink": { action: "account.social.unlink", operationId: "account_social_unlink", method: "DELETE", path: "/me/social/{provider}", pathParams: ["provider"], scope: "account:sign_in:write", danger: "critical", approval: true, body: false, pagination: null }
3898
+ };
3899
+ var AccountClient = class {
3900
+ /** The transport every method runs on — authentication, retries, approvals. */
3901
+ transport;
3902
+ constructor(options) {
3903
+ this.transport = new ManagementTransport("account", options);
3904
+ }
3905
+ /** Call a route by method and path (relative to `/api/v1`) — for anything not generated. */
3906
+ request(method, path, input, options) {
3907
+ return this.transport.request(method, path, input, options);
3908
+ }
3909
+ actionApprovals = {
3910
+ /**
3911
+ * Where an approval you asked for stands
3912
+ *
3913
+ * The `poll_url` of a `202 approval_required`: an approval this token raised, and only those — another token's id is a 404. `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.
3914
+ *
3915
+ * `GET /me/action-approvals/{id}`
3916
+ */
3917
+ get: (id, options) => this.transport.call(accountOperations["action_approvals.get"], [id], void 0, options)
3918
+ };
3919
+ apiKeys = {
3920
+ /**
3921
+ * Create an API key of your own for one of this environment's apps, in an organization you belong to. The value is returned once, as `token`.
3922
+ *
3923
+ * Requires scope `account:api_keys:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.
3924
+ *
3925
+ * `POST /me/organizations/{organization_id}/api-keys` · action `account.api_keys.create`
3926
+ * @scope `account:api_keys:write`
3927
+ * @danger critical
3928
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3929
+ */
3930
+ create: (organizationId, body, options) => this.transport.call(accountOperations["account.api_keys.create"], [organizationId], body, options),
3931
+ /**
3932
+ * Revoke one of your own API keys.
3933
+ *
3934
+ * Requires scope `account:api_keys:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.
3935
+ *
3936
+ * `DELETE /me/organizations/{organization_id}/api-keys/{key_id}` · action `account.api_keys.revoke`
3937
+ * @scope `account:api_keys:write`
3938
+ * @danger destructive
3939
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3940
+ */
3941
+ revoke: (organizationId, keyId, options) => this.transport.call(accountOperations["account.api_keys.revoke"], [organizationId, keyId], void 0, options)
3942
+ };
3943
+ applications = {
3944
+ /**
3945
+ * Withdraw an application's access to your account; it must ask you again to act as you.
3946
+ *
3947
+ * Requires scope `account:applications:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.
3948
+ *
3949
+ * `DELETE /me/applications/{client_id}` · action `account.applications.revoke`
3950
+ * @scope `account:applications:write`
3951
+ * @danger destructive
3952
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3953
+ */
3954
+ revoke: (clientId, options) => this.transport.call(accountOperations["account.applications.revoke"], [clientId], void 0, options)
3955
+ };
3956
+ devices = {
3957
+ /**
3958
+ * Remove one of your trusted devices; it is no longer asked to approve anything.
3959
+ *
3960
+ * Requires scope `account:devices:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.
3961
+ *
3962
+ * `DELETE /me/devices/{device_id}` · action `account.devices.remove`
3963
+ * @scope `account:devices:write`
3964
+ * @danger destructive
3965
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3966
+ */
3967
+ remove: (deviceId, options) => this.transport.call(accountOperations["account.devices.remove"], [deviceId], void 0, options)
3968
+ };
3969
+ organizations = {
3970
+ /**
3971
+ * Leave one of your own organizations. The last owner cannot leave — transfer ownership first.
3972
+ *
3973
+ * Requires scope `account:organizations:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.
3974
+ *
3975
+ * `POST /me/organizations/{organization_id}/leave` · action `account.organizations.leave`
3976
+ * @scope `account:organizations:write`
3977
+ * @danger destructive
3978
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3979
+ */
3980
+ leave: (organizationId, options) => this.transport.call(accountOperations["account.organizations.leave"], [organizationId], void 0, options)
3981
+ };
3982
+ passkeys = {
3983
+ /**
3984
+ * Remove one of your passkeys.
3985
+ *
3986
+ * Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.
3987
+ *
3988
+ * `DELETE /me/passkeys/{passkey_id}` · action `account.passkeys.remove`
3989
+ * @scope `account:sign_in:write`
3990
+ * @danger critical
3991
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
3992
+ */
3993
+ remove: (passkeyId, options) => this.transport.call(accountOperations["account.passkeys.remove"], [passkeyId], void 0, options)
3994
+ };
3995
+ profile = {
3996
+ /**
3997
+ * Change the display name on your own account.
3998
+ *
3999
+ * Requires scope `account:profile:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.
4000
+ *
4001
+ * `PATCH /me/profile` · action `account.profile.update`
4002
+ * @scope `account:profile:write`
4003
+ * @danger write
4004
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
4005
+ */
4006
+ update: (body, options) => this.transport.call(accountOperations["account.profile.update"], [], body, options)
4007
+ };
4008
+ sessions = {
4009
+ /**
4010
+ * Sign out one of your own sessions.
4011
+ *
4012
+ * Requires scope `account:sessions:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.
4013
+ *
4014
+ * `DELETE /me/sessions/{session_id}` · action `account.sessions.revoke`
4015
+ * @scope `account:sessions:write`
4016
+ * @danger destructive
4017
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
4018
+ */
4019
+ revoke: (sessionId, options) => this.transport.call(accountOperations["account.sessions.revoke"], [sessionId], void 0, options),
4020
+ /**
4021
+ * Sign out every one of your sessions except the one you are using.
4022
+ *
4023
+ * Requires scope `account:sessions:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.
4024
+ *
4025
+ * `POST /me/sessions/revoke-others` · action `account.sessions.revoke_others`
4026
+ * @scope `account:sessions:write`
4027
+ * @danger critical
4028
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
4029
+ */
4030
+ revokeOthers: (options) => this.transport.call(accountOperations["account.sessions.revoke_others"], [], void 0, options)
4031
+ };
4032
+ social = {
4033
+ /**
4034
+ * Disconnect a social account from yours — never the last way you can sign in.
4035
+ *
4036
+ * Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.
4037
+ *
4038
+ * `DELETE /me/social/{provider}` · action `account.social.unlink`
4039
+ * @scope `account:sign_in:write`
4040
+ * @danger critical
4041
+ * May be held for approval (`202 approval_required`); waited on unless `approval: 'return'`.
4042
+ */
4043
+ unlink: (provider, options) => this.transport.call(accountOperations["account.social.unlink"], [provider], void 0, options)
4044
+ };
4045
+ };
4046
+
4047
+ // src/management/dpop.ts
4048
+ var encoder = new TextEncoder();
4049
+ function base64url(bytes) {
4050
+ const view = bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
4051
+ let binary = "";
4052
+ for (const byte of view) {
4053
+ binary += String.fromCharCode(byte);
4054
+ }
4055
+ return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
4056
+ }
4057
+ async function sha256(input) {
4058
+ return base64url(await crypto.subtle.digest("SHA-256", encoder.encode(input)));
4059
+ }
4060
+ async function generateDPoPKeyPair() {
4061
+ return crypto.subtle.generateKey({ name: "ECDSA", namedCurve: "P-256" }, false, ["sign", "verify"]);
4062
+ }
4063
+ async function createDPoPSigner(keyPair) {
4064
+ const exported = await crypto.subtle.exportKey("jwk", keyPair.publicKey);
4065
+ const { crv, x, y } = exported;
4066
+ if (exported.kty !== "EC" || crv !== "P-256" || typeof x !== "string" || typeof y !== "string") {
4067
+ throw new TypeError("A DPoP key must be an ECDSA P-256 key pair.");
4068
+ }
4069
+ const jwk = { crv, kty: "EC", x, y };
4070
+ const jkt = await sha256(JSON.stringify(jwk));
4071
+ return {
4072
+ jkt,
4073
+ async proof({ method, url, accessToken, nonce }) {
4074
+ const target = new URL(url);
4075
+ const header = { typ: "dpop+jwt", alg: "ES256", jwk };
4076
+ const payload = {
4077
+ jti: crypto.randomUUID(),
4078
+ htm: method.toUpperCase(),
4079
+ // RFC 9449 §4.2: the URI without query and fragment.
4080
+ htu: `${target.origin}${target.pathname}`,
4081
+ iat: Math.floor(Date.now() / 1e3),
4082
+ ath: await sha256(accessToken)
4083
+ };
4084
+ if (nonce !== void 0) {
4085
+ payload.nonce = nonce;
4086
+ }
4087
+ const signingInput = `${base64url(encoder.encode(JSON.stringify(header)))}.${base64url(encoder.encode(JSON.stringify(payload)))}`;
4088
+ const signature = await crypto.subtle.sign(
4089
+ { name: "ECDSA", hash: "SHA-256" },
4090
+ keyPair.privateKey,
4091
+ encoder.encode(signingInput)
4092
+ );
4093
+ return `${signingInput}.${base64url(signature)}`;
4094
+ }
4095
+ };
4096
+ }
4097
+
4098
+ // src/management/audit-logs.ts
4099
+ var MAX_AUDIT_BATCH = 100;
4100
+ var AUDIT_CHAIN_GENESIS = "0".repeat(64);
4101
+ function uuid2() {
4102
+ return crypto.randomUUID();
4103
+ }
4104
+ var AuditLogger = class {
4105
+ #client;
4106
+ #batchSize;
4107
+ #onError;
4108
+ #buffer = [];
4109
+ #queue = [];
4110
+ #sending = Promise.resolve();
4111
+ #timer;
4112
+ #closed = false;
4113
+ constructor(client, options = {}) {
4114
+ const batchSize = options.batchSize ?? MAX_AUDIT_BATCH;
4115
+ if (!Number.isInteger(batchSize) || batchSize < 1 || batchSize > MAX_AUDIT_BATCH) {
4116
+ throw new RangeError(`batchSize must be 1\u2013${MAX_AUDIT_BATCH}.`);
4117
+ }
4118
+ this.#client = client;
4119
+ this.#batchSize = batchSize;
4120
+ this.#onError = options.onError;
4121
+ const interval = options.flushIntervalMs ?? 5e3;
4122
+ if (interval > 0) {
4123
+ this.#timer = setInterval(() => this.#background(), interval);
4124
+ this.#timer.unref?.();
4125
+ }
4126
+ }
4127
+ /** Events buffered or queued, not yet acknowledged by the server. */
4128
+ get pending() {
4129
+ return this.#buffer.length + this.#queue.reduce((n, batch) => n + batch.events.length, 0);
4130
+ }
4131
+ /** Buffer one event. A full batch is sent in the background. */
4132
+ record(event) {
4133
+ if (this.#closed) {
4134
+ throw new CboxIdError("This AuditLogger is closed.");
4135
+ }
4136
+ this.#buffer.push({ ...event, occurred_at: event.occurred_at ?? (/* @__PURE__ */ new Date()).toISOString() });
4137
+ if (this.#buffer.length >= this.#batchSize) {
4138
+ this.#background();
4139
+ }
4140
+ }
4141
+ /** Send everything buffered, and resolve once the server has it. Throws if a batch fails. */
4142
+ flush() {
4143
+ this.#cut();
4144
+ const run = this.#sending.catch(() => void 0).then(() => this.#drain());
4145
+ this.#sending = run;
4146
+ return run;
4147
+ }
4148
+ /** Stop the interval and flush. */
4149
+ async close() {
4150
+ this.#closed = true;
4151
+ if (this.#timer !== void 0) {
4152
+ clearInterval(this.#timer);
4153
+ this.#timer = void 0;
4154
+ }
4155
+ await this.flush();
4156
+ }
4157
+ #background() {
4158
+ this.flush().catch((error) => {
4159
+ this.#onError?.(error, this.#queue[0]?.events ?? []);
4160
+ });
4161
+ }
4162
+ /** Move the buffer into batches, each with the key every resend of it will carry. */
4163
+ #cut() {
4164
+ while (this.#buffer.length > 0) {
4165
+ this.#queue.push({ events: this.#buffer.splice(0, this.#batchSize), idempotencyKey: uuid2() });
4166
+ }
4167
+ }
4168
+ async #drain() {
4169
+ while (this.#queue.length > 0) {
4170
+ const batch = this.#queue[0];
4171
+ await this.#client.auditLogs.events.create({ events: batch.events }, { idempotencyKey: batch.idempotencyKey });
4172
+ this.#queue.shift();
4173
+ }
4174
+ }
4175
+ };
4176
+ var AuditLogExportError = class extends CboxIdError {
4177
+ constructor(message, auditExport) {
4178
+ super(message);
4179
+ this.auditExport = auditExport;
4180
+ }
4181
+ auditExport;
4182
+ };
4183
+ function sleep2(ms, signal) {
4184
+ return new Promise((resolve, reject) => {
4185
+ if (signal?.aborted) {
4186
+ reject(signal.reason);
4187
+ return;
4188
+ }
4189
+ const timer = setTimeout(() => {
4190
+ signal?.removeEventListener("abort", onAbort);
4191
+ resolve();
4192
+ }, ms);
4193
+ const onAbort = () => {
4194
+ clearTimeout(timer);
4195
+ reject(signal?.reason);
4196
+ };
4197
+ signal?.addEventListener("abort", onAbort, { once: true });
4198
+ });
4199
+ }
4200
+ async function exportAuditLogs(client, filters = {}, options = {}) {
4201
+ const call = {
4202
+ ...options.signal !== void 0 ? { signal: options.signal } : {}
4203
+ };
4204
+ const created = await client.auditLogs.exports.create(filters, {
4205
+ ...call,
4206
+ ...options.idempotencyKey !== void 0 ? { idempotencyKey: options.idempotencyKey } : {}
4207
+ });
4208
+ const deadline = Date.now() + (options.timeoutMs ?? 6e5);
4209
+ const interval = Math.max(0, options.pollIntervalMs ?? 2e3);
4210
+ let current = created.data;
4211
+ for (; ; ) {
4212
+ switch (current.state) {
4213
+ case "ready":
4214
+ return current;
4215
+ case "failed":
4216
+ case "expired":
4217
+ throw new AuditLogExportError(`Audit log export ${current.id} is ${current.state}.`, current);
4218
+ }
4219
+ if (Date.now() >= deadline) {
4220
+ throw new AuditLogExportError(`Audit log export ${current.id} was not ready in time.`, current);
4221
+ }
4222
+ await sleep2(interval, options.signal);
4223
+ current = (await client.auditLogs.exports.get(current.id, call)).data;
4224
+ }
4225
+ }
4226
+ var encoder2 = new TextEncoder();
4227
+ function compareBytes(a, b) {
4228
+ const x = encoder2.encode(a);
4229
+ const y = encoder2.encode(b);
4230
+ const n = Math.min(x.length, y.length);
4231
+ for (let i = 0; i < n; i++) {
4232
+ if (x[i] !== y[i]) return x[i] - y[i];
4233
+ }
4234
+ return x.length - y.length;
4235
+ }
4236
+ function phpFloat(value) {
4237
+ if (!Number.isFinite(value)) {
4238
+ throw new TypeError("Canonical JSON cannot encode NaN or Infinity.");
4239
+ }
4240
+ if (Object.is(value, -0)) return "-0";
4241
+ if (Number.isSafeInteger(value)) return String(value);
4242
+ const sign = value < 0 ? "-" : "";
4243
+ const [mantissa, exp] = Math.abs(value).toExponential().split("e");
4244
+ const digits = mantissa.replace(".", "");
4245
+ const exponent = Number(exp);
4246
+ const decpt = exponent + 1;
4247
+ if (decpt < -3 || decpt > 17) {
4248
+ return `${sign}${digits[0]}.${digits.slice(1) || "0"}e${exponent < 0 ? "-" : "+"}${Math.abs(exponent)}`;
4249
+ }
4250
+ if (decpt <= 0) return `${sign}0.${"0".repeat(-decpt)}${digits}`;
4251
+ if (decpt >= digits.length) return `${sign}${digits}${"0".repeat(decpt - digits.length)}`;
4252
+ return `${sign}${digits.slice(0, decpt)}.${digits.slice(decpt)}`;
4253
+ }
4254
+ function canonicalJson(value) {
4255
+ if (value === null || value === void 0) return "null";
4256
+ if (typeof value === "boolean") return value ? "true" : "false";
4257
+ if (typeof value === "number") return phpFloat(value);
4258
+ if (typeof value === "string") return JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
4259
+ if (Array.isArray(value)) {
4260
+ return `[${value.map(canonicalJson).join(",")}]`;
4261
+ }
4262
+ if (typeof value === "object") {
4263
+ const entries = Object.entries(value).filter(([, v]) => v !== void 0).sort(([a], [b]) => compareBytes(a, b));
4264
+ if (entries.length === 0) return "[]";
4265
+ if (entries.every(([key], index) => key === String(index))) {
4266
+ return `[${entries.map(([, v]) => canonicalJson(v)).join(",")}]`;
4267
+ }
4268
+ return `{${entries.map(([k, v]) => `${canonicalJson(k)}:${canonicalJson(v)}`).join(",")}}`;
4269
+ }
4270
+ throw new TypeError(`Canonical JSON cannot encode a ${typeof value}.`);
4271
+ }
4272
+ function metadataOf(value) {
4273
+ if (Array.isArray(value)) return value.length > 0 ? value : null;
4274
+ if (typeof value === "object" && value !== null) return Object.keys(value).length > 0 ? value : null;
4275
+ return null;
4276
+ }
4277
+ function auditEventDocument(event) {
4278
+ const actor = event.actor ?? {};
4279
+ const context = event.context ?? {};
4280
+ return {
4281
+ id: event.id,
4282
+ organization_id: event.organization_id,
4283
+ sequence: event.sequence,
4284
+ action: event.action,
4285
+ occurred_at: event.occurred_at,
4286
+ actor: { id: actor.id ?? null, type: actor.type ?? null, name: actor.name ?? null, metadata: metadataOf(actor.metadata) },
4287
+ targets: (event.targets ?? []).map((target) => ({
4288
+ id: target.id ?? null,
4289
+ type: target.type ?? null,
4290
+ name: target.name ?? null,
4291
+ metadata: metadataOf(target.metadata)
4292
+ })),
4293
+ context: { location: context.location ?? null, user_agent: context.user_agent ?? null },
4294
+ metadata: metadataOf(event.metadata)
4295
+ };
4296
+ }
4297
+ async function auditEventHash(previousHash, event) {
4298
+ const digest = await crypto.subtle.digest("SHA-256", encoder2.encode(previousHash + canonicalJson(auditEventDocument(event))));
4299
+ return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join("");
4300
+ }
4301
+ async function verifyAuditChain(events, options = {}) {
4302
+ const all = [];
4303
+ for await (const event of events) {
4304
+ all.push(event);
4305
+ }
4306
+ all.sort((a, b) => a.sequence - b.sequence);
4307
+ const first = all[0];
4308
+ let previous = options.previousHash ?? (first === void 0 || first.sequence === 1 ? AUDIT_CHAIN_GENESIS : first.prev_hash);
4309
+ let expected = first?.sequence ?? 1;
4310
+ let verified = 0;
4311
+ const result = (reason) => ({
4312
+ valid: reason === null,
4313
+ verified_count: verified,
4314
+ first_sequence: verified === 0 ? null : first.sequence,
4315
+ last_sequence: verified === 0 ? null : expected - 1,
4316
+ broken_at_sequence: reason === null ? null : expected,
4317
+ reason
4318
+ });
4319
+ for (const event of all) {
4320
+ if (event.sequence !== expected) return result("missing");
4321
+ if (event.prev_hash !== previous) return result("link");
4322
+ if (await auditEventHash(previous, event) !== event.hash) return result("hash");
4323
+ previous = event.hash;
4324
+ expected++;
4325
+ verified++;
4326
+ }
4327
+ return result(null);
4328
+ }
4329
+ async function verifyAuditLogChain(client, query, options = {}) {
4330
+ return verifyAuditChain(client.auditLogs.events.listAll({ ...query, order: "asc" }), options);
4331
+ }
4332
+
4333
+ export { AUDIT_CHAIN_GENESIS, AccountClient, ApprovalDeniedError, ApprovalError, ApprovalExpiredError, AuditLogExportError, AuditLogger, CboxIdApiError, EnvironmentClient, MAX_AUDIT_BATCH, ManagementNetworkError, ManagementTransport, PlatformClient, WorkspaceClient, accountOperations, auditEventDocument, auditEventHash, canonicalJson, createDPoPSigner, environmentOperations, exportAuditLogs, generateDPoPKeyPair, platformOperations, retryAfterMs, verifyAuditChain, verifyAuditLogChain, workspaceOperations };
4334
+ //# sourceMappingURL=management.js.map
4335
+ //# sourceMappingURL=management.js.map