@pontive/server 1.27.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"client-B3NStbMW.js","sources":["../src/env.ts","../src/management/errors.ts","../src/management/core.ts","../src/management/generated/namespaces.ts","../src/management/client.ts"],"sourcesContent":["import type { ServerAuthConfig } from \"./config\";\n\n/**\n * The environment contract (pontive-spec 47 §6.1): the variables the SDK falls\n * back to when the app does not pass a field. Explicit config always wins.\n *\n * | Variable | Holds |\n * | ------------------------ | -------------------------------------------------- |\n * | `PONTIVE_ISSUER` | the instance's issuer (its auth domain origin) |\n * | `PONTIVE_CLIENT_ID` | the app's id |\n * | `PONTIVE_CLIENT_SECRET` | a confidential (`web`) app's client secret |\n * | `PONTIVE_SESSION_SECRET` | 32+ random characters, generated locally |\n * | `PONTIVE_SECRET_KEY` | the instance's secret key (management calls; not read here) |\n * | `PONTIVE_INSTANCE_ID` | the instance's id (not secret; not read here) |\n * | `PONTIVE_MANAGEMENT_URL` | overrides the management API's base (`Pontive`) |\n *\n * And for keyless mode (§6.2): `PONTIVE_KEYLESS` (`0` turns it off),\n * `PONTIVE_API_URL` (where the provisioning routes live, default\n * `https://api.pontive.com`) and `PONTIVE_REGION` (the region to provision in;\n * default: the one nearest the caller).\n */\nexport const PONTIVE_ENV = {\n issuer: \"PONTIVE_ISSUER\",\n clientId: \"PONTIVE_CLIENT_ID\",\n clientSecret: \"PONTIVE_CLIENT_SECRET\",\n sessionSecret: \"PONTIVE_SESSION_SECRET\",\n secretKey: \"PONTIVE_SECRET_KEY\",\n instanceId: \"PONTIVE_INSTANCE_ID\",\n managementUrl: \"PONTIVE_MANAGEMENT_URL\",\n apiUrl: \"PONTIVE_API_URL\",\n region: \"PONTIVE_REGION\",\n keyless: \"PONTIVE_KEYLESS\",\n} as const;\n\nexport type Env = Readonly<Record<string, string | undefined>>;\n\n/** `process.env`, or nothing where there is no `process` (a browser, some edge runtimes). */\nexport function processEnv(): Env {\n try {\n return (globalThis as { process?: { env?: Env } }).process?.env ?? {};\n } catch {\n return {};\n }\n}\n\nconst nonEmpty = (value: string | undefined): string | undefined => (value && value.trim() ? value.trim() : undefined);\n\n/** The config with every field the app left out taken from the environment. */\nexport function withEnvFallback(config: ServerAuthConfig, env: Env = processEnv()): ServerAuthConfig {\n return {\n ...config,\n issuer: config.issuer || nonEmpty(env[PONTIVE_ENV.issuer]),\n clientId: config.clientId || nonEmpty(env[PONTIVE_ENV.clientId]),\n clientSecret: config.clientSecret || nonEmpty(env[PONTIVE_ENV.clientSecret]),\n sessionSecret: config.sessionSecret || nonEmpty(env[PONTIVE_ENV.sessionSecret]),\n };\n}\n\n/** `NODE_ENV === \"development\"`: `next dev`, `vite`, and the like. Never a production build. */\nexport function isDevelopment(env: Env = processEnv()): boolean {\n return env.NODE_ENV === \"development\";\n}\n\n/**\n * Whether keyless mode applies (pontive-spec 47 §6.2, decision E3): in\n * development only, with no issuer passed or in `PONTIVE_ISSUER`, unless\n * `PONTIVE_KEYLESS=0`. Anywhere else a missing issuer is the usual\n * `issuer is required` error.\n */\nexport function keylessApplies(config: ServerAuthConfig, env: Env = processEnv()): boolean {\n return isDevelopment(env) && !config.issuer && env[PONTIVE_ENV.keyless]?.trim() !== \"0\";\n}\n","/** One per-field finding of a refusal. */\nexport interface ErrorDetail {\n field?: string;\n code?: string;\n message?: string;\n path?: string;\n [key: string]: unknown;\n}\n\n/**\n * A refusal from the management API: a non-2xx answer, with the API's error\n * envelope. Each status has its own subclass (`NotFoundError`,\n * `RateLimitError`, …); read `code` for the precise reason.\n *\n * ```ts\n * try {\n * await pontive.organizations.createMember(org, { user_id });\n * } catch (err) {\n * if (err instanceof PontiveAPIError && err.code === \"seat_limit_reached\") { … }\n * else throw err;\n * }\n * ```\n */\nexport class PontiveAPIError extends Error {\n /** The HTTP status. */\n readonly status: number;\n /** The category: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. */\n readonly type?: string;\n /** The machine-readable reason, such as `permission_denied` or `seat_limit_reached`. */\n readonly code?: string;\n /** The request parameter the error is about, when there is one. */\n readonly param?: string;\n /** Documentation about the error, when there is some. */\n readonly docUrl?: string;\n /** Per-field findings, on a refusal that has them. */\n readonly details: ErrorDetail[];\n /** The `X-Request-ID` the API answered with; quote it to support. */\n readonly requestId?: string;\n /** The response's headers. */\n readonly headers: Headers;\n /** The response body as it came (parsed JSON, or text). */\n readonly body: unknown;\n\n constructor(status: number, headers: Headers, body: unknown) {\n const env = (body as { error?: Record<string, unknown> } | undefined)?.error ?? {};\n const str = (v: unknown): string | undefined => (typeof v === \"string\" && v ? v : undefined);\n const code = str(env.code);\n const requestId = headers.get(\"x-request-id\") ?? undefined;\n const message = str(env.message) ?? `HTTP ${status}`;\n super(`pontive: ${status}${code ? ` ${code}` : \"\"}: ${message}${requestId ? ` (request ${requestId})` : \"\"}`);\n this.name = new.target.name;\n this.status = status;\n this.type = str(env.type);\n this.code = code;\n this.param = str(env.param);\n this.docUrl = str(env.doc_url);\n this.details = Array.isArray(env.details) ? (env.details as ErrorDetail[]) : [];\n this.requestId = requestId;\n this.headers = headers;\n this.body = body;\n }\n\n /** The error for a status: its subclass where it has one. */\n static from(status: number, headers: Headers, body: unknown): PontiveAPIError {\n const Kind = STATUS[status] ?? (status >= 500 ? InternalServerError : PontiveAPIError);\n return new Kind(status, headers, body);\n }\n}\n\n/** 400 */\nexport class BadRequestError extends PontiveAPIError {}\n/** 401: the credential is missing, wrong, expired or for another API. */\nexport class AuthenticationError extends PontiveAPIError {}\n/** 403: the credential may not do this. */\nexport class PermissionDeniedError extends PontiveAPIError {}\n/** 404 */\nexport class NotFoundError extends PontiveAPIError {}\n/** 409 */\nexport class ConflictError extends PontiveAPIError {}\n/** 412: an `If-Match` that no longer matches. */\nexport class PreconditionFailedError extends PontiveAPIError {}\n/** 422: the request is understood but invalid; `details` says where. */\nexport class UnprocessableEntityError extends PontiveAPIError {}\n/** 429: retried automatically first; this is what is left after the retries. */\nexport class RateLimitError extends PontiveAPIError {}\n/** 5xx */\nexport class InternalServerError extends PontiveAPIError {}\n\nconst STATUS: Record<number, new (status: number, headers: Headers, body: unknown) => PontiveAPIError> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 412: PreconditionFailedError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n};\n\n/** A call that got no answer: a network failure, a timeout or an abort. */\nexport class PontiveConnectionError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"PontiveConnectionError\";\n }\n}\n","import { clientCredentialsToken } from \"../oidc\";\nimport { PontiveAPIError, PontiveConnectionError } from \"./errors\";\n\n/** The host an operation is served on: api.{region}, authz.{region}, ingest.{region}, or the instance's auth domain (`/v1/me`). */\nexport type Host = \"api\" | \"authz\" | \"ingest\" | \"auth\";\n\n/** One call, as a generated method describes it. */\nexport interface APIRequest {\n host: Host;\n method: string;\n path: string;\n query?: object;\n headers?: Record<string, string | undefined>;\n body?: unknown;\n /** The operation takes `X-Idempotency-Key`. */\n idempotent?: boolean;\n /** The result is a file, not JSON. */\n binary?: boolean;\n}\n\n/** Options for one call. */\nexport interface RequestOptions {\n /**\n * The call's `X-Idempotency-Key`. Operations that take one get a random key\n * by default, the same across the call's retries; set your own to make a\n * call safe to repeat across processes.\n */\n idempotencyKey?: string;\n /** Extra headers. */\n headers?: Record<string, string>;\n /** How many times the call is retried; `0` turns retries off. */\n maxRetries?: number;\n /** Milliseconds each attempt may take. */\n timeout?: number;\n /** Aborts the call. */\n signal?: AbortSignal;\n}\n\nexport interface CoreConfig {\n hosts: Record<Host, string>;\n token: () => Promise<string>;\n /** Drops a cached token the API refused; true when a new one can be had. */\n invalidate: () => boolean;\n instanceId?: string;\n maxRetries: number;\n timeout: number;\n fetch: typeof fetch;\n /** Tests replace the waits between retries. */\n sleep?: (ms: number) => Promise<void>;\n}\n\ndeclare const __PONTIVE_SERVER_VERSION__: string;\nconst VERSION: string = typeof __PONTIVE_SERVER_VERSION__ === \"string\" ? __PONTIVE_SERVER_VERSION__ : \"0.0.0\";\n\nconst MAX_RETRY_WAIT_MS = 60_000;\n\n/** The request engine every generated method calls. */\nexport class Core {\n constructor(private readonly config: CoreConfig) {}\n\n request<T>(req: APIRequest, options?: RequestOptions): APIPromise<T> {\n return new APIPromise(this.send<T>(req, options));\n }\n\n page<Item, Body>(kind: \"page\" | \"cursor\", req: APIRequest, options?: RequestOptions): PagePromise<Item, Body> {\n const load = (query: object | undefined): Promise<{ data: Page<Item, Body>; response: Response }> =>\n this.send<Body>({ ...req, query }, options).then(({ data, response }) => ({\n data: new Page<Item, Body>(kind, data, query, (next) => new PagePromise(load(next))),\n response,\n }));\n return new PagePromise(load(req.query));\n }\n\n private async send<T>(req: APIRequest, options: RequestOptions = {}): Promise<{ data: T; response: Response }> {\n const { config } = this;\n const retries = options.maxRetries ?? config.maxRetries;\n const idempotencyKey = options.idempotencyKey ?? (req.idempotent ? crypto.randomUUID() : undefined);\n // Safe to repeat: the method is, or an idempotency key makes the API answer a repeat from its record.\n const repeatable = req.method !== \"POST\" || idempotencyKey !== undefined;\n const host = config.hosts[req.host];\n if (!host) {\n throw new Error(\n req.host === \"auth\"\n ? \"pontive: pontive.me is served on the instance's auth domain: pass issuer or set PONTIVE_ISSUER\"\n : \"pontive: no region: pass region or managementUrl\",\n );\n }\n const url = host + req.path + queryString(req.query);\n const body = req.body === undefined ? undefined : JSON.stringify(req.body);\n const sleep = config.sleep ?? ((ms: number) => new Promise<void>((r) => setTimeout(r, ms)));\n\n let reauthed = false;\n for (let attempt = 0; ; attempt++) {\n const headers = new Headers();\n for (const [k, v] of Object.entries(req.headers ?? {})) if (v !== undefined && v !== \"\") headers.set(k, v);\n for (const [k, v] of Object.entries(options.headers ?? {})) headers.set(k, v);\n headers.set(\"authorization\", `Bearer ${await config.token()}`);\n headers.set(\"accept\", req.binary ? \"*/*\" : \"application/json\");\n headers.set(\"user-agent\", `pontive-typescript/${VERSION}`);\n if (body !== undefined) headers.set(\"content-type\", \"application/json\");\n if (idempotencyKey) headers.set(\"x-idempotency-key\", idempotencyKey);\n if (config.instanceId) headers.set(\"x-pontive-instance-id\", config.instanceId);\n\n const timeout = AbortSignal.timeout(options.timeout ?? config.timeout);\n const signal = options.signal ? AbortSignal.any([options.signal, timeout]) : timeout;\n let res: Response;\n try {\n res = await config.fetch(url, { method: req.method, headers, body, signal });\n } catch (err) {\n if (options.signal?.aborted || !repeatable || attempt >= retries) {\n throw new PontiveConnectionError(`pontive: ${req.method} ${req.path}: ${(err as Error).message}`, { cause: err });\n }\n await sleep(backoff(attempt));\n continue;\n }\n\n if (res.ok) return { data: (await decode(res, req.binary)) as T, response: res };\n if (res.status === 401 && !reauthed && config.invalidate()) {\n // A cached client-credentials token the API no longer accepts: exchange again, once.\n reauthed = true;\n attempt--;\n continue;\n }\n const errBody = await readBody(res);\n if (attempt < retries && retryable(res.status, repeatable)) {\n await sleep(backoff(attempt, res.headers));\n continue;\n }\n throw PontiveAPIError.from(res.status, res.headers, errBody);\n }\n }\n}\n\nfunction queryString(query: object | undefined): string {\n if (!query) return \"\";\n const q = new URLSearchParams();\n for (const [k, v] of Object.entries(query)) {\n if (v === undefined || v === null) continue;\n if (Array.isArray(v)) for (const item of v) q.append(k, String(item));\n else q.append(k, String(v));\n }\n const s = q.toString();\n return s ? `?${s}` : \"\";\n}\n\nasync function decode(res: Response, binary?: boolean): Promise<unknown> {\n if (binary) return new Uint8Array(await res.arrayBuffer());\n const text = await res.text();\n if (res.status === 204 || text.trim() === \"\") return undefined;\n try {\n return JSON.parse(text);\n } catch {\n throw new PontiveConnectionError(`pontive: the ${res.status} response is not JSON`);\n }\n}\n\nasync function readBody(res: Response): Promise<unknown> {\n const text = await res.text().catch(() => \"\");\n try {\n return JSON.parse(text);\n } catch {\n return text;\n }\n}\n\n/** A 429 was not executed, so it is always retried; a 408 or 5xx only when the call is safe to repeat. */\nfunction retryable(status: number, repeatable: boolean): boolean {\n if (status === 429) return true;\n return repeatable && [408, 500, 502, 503, 504].includes(status);\n}\n\n/** Honours Retry-After (seconds or an HTTP date, at most a minute), else 0.5s doubling, at most 8s, with jitter. */\nexport function backoff(attempt: number, headers?: Headers): number {\n const ra = headers?.get(\"retry-after\")?.trim();\n if (ra) {\n const secs = Number(ra);\n if (Number.isFinite(secs) && secs >= 0) return Math.min(secs * 1000, MAX_RETRY_WAIT_MS);\n const at = Date.parse(ra);\n if (!Number.isNaN(at)) return Math.min(Math.max(at - Date.now(), 0), MAX_RETRY_WAIT_MS);\n }\n const base = Math.min(500 * 2 ** attempt, 8000);\n return base * (0.75 + Math.random() * 0.5);\n}\n\n/**\n * The result of a call: await it for the decoded body, or call\n * `withResponse()` for the body and the `Response`, to read a header such as\n * the `ETag` an `If-Match` update needs.\n */\nexport class APIPromise<T> implements PromiseLike<T> {\n constructor(private readonly result: Promise<{ data: T; response: Response }>) {\n // A rejection nobody awaits is the caller's to handle, not an unhandled one of ours.\n result.catch(() => {});\n }\n\n /** The decoded body and the HTTP response. */\n withResponse(): Promise<{ data: T; response: Response }> {\n return this.result;\n }\n\n then<A = T, B = never>(\n onfulfilled?: ((value: T) => A | PromiseLike<A>) | null,\n onrejected?: ((reason: unknown) => B | PromiseLike<B>) | null,\n ): Promise<A | B> {\n return this.result.then((r) => r.data).then(onfulfilled, onrejected);\n }\n\n catch<B = never>(onrejected?: ((reason: unknown) => B | PromiseLike<B>) | null): Promise<T | B> {\n return this.then(undefined, onrejected);\n }\n\n finally(onfinally?: (() => void) | null): Promise<T> {\n return this.then().finally(onfinally);\n }\n}\n\n/** A page of a list, and the way to the next one. */\nexport class Page<Item, Body> implements AsyncIterable<Item> {\n /** This page's items. */\n readonly data: Item[];\n\n constructor(\n private readonly kind: \"page\" | \"cursor\",\n /** The response body as the API sent it, with its pagination. */\n readonly body: Body,\n private readonly query: object | undefined,\n private readonly load: (query: object) => PagePromise<Item, Body>,\n ) {\n const data = (body as { data?: Item[] } | undefined)?.data;\n this.data = Array.isArray(data) ? data : [];\n }\n\n /** Whether there is a page after this one. */\n hasNextPage(): boolean {\n if (this.data.length === 0) return false;\n if (this.kind === \"cursor\") {\n const next = (this.body as { next_cursor?: string }).next_cursor;\n return !!next && next !== (this.query as { after?: string } | undefined)?.after;\n }\n const p = (this.body as { pagination?: { page?: number; total_pages?: number } }).pagination;\n return !!p && (p.page ?? 0) < (p.total_pages ?? 0);\n }\n\n /** The next page; call only when `hasNextPage()`. */\n nextPage(): PagePromise<Item, Body> {\n if (this.kind === \"cursor\") {\n return this.load({ ...this.query, after: (this.body as { next_cursor?: string }).next_cursor });\n }\n const p = (this.body as { pagination?: { page?: number } }).pagination;\n return this.load({ ...this.query, page: (p?.page ?? 1) + 1 });\n }\n\n /** Every item from this page on, fetching the next pages as it goes. */\n async *[Symbol.asyncIterator](): AsyncIterator<Item> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let page: Page<Item, Body> = this;\n for (;;) {\n yield* page.data;\n if (!page.hasNextPage()) return;\n page = await page.nextPage();\n }\n }\n}\n\n/**\n * A list call: await it for the first `Page`, or iterate it with\n * `for await (const item of …)` for every item across pages.\n */\nexport class PagePromise<Item, Body> extends APIPromise<Page<Item, Body>> implements AsyncIterable<Item> {\n async *[Symbol.asyncIterator](): AsyncIterator<Item> {\n yield* await this;\n }\n}\n\n/** A token for a credential: as it is, from the caller's function, or exchanged for client credentials. */\nexport function tokenSource(input: {\n token?: string | (() => string | Promise<string>);\n clientId?: string;\n clientSecret?: string;\n issuer?: string;\n audience: string;\n fetch: typeof fetch;\n}): { token: () => Promise<string>; invalidate: () => boolean } {\n const { token } = input;\n if (typeof token === \"string\") return { token: async () => token, invalidate: () => false };\n if (typeof token === \"function\") return { token: async () => token(), invalidate: () => false };\n\n let cached: { value: string; until: number } | undefined;\n let pending: Promise<string> | undefined;\n return {\n token: async () => {\n if (cached && Date.now() < cached.until) return cached.value;\n pending ??= clientCredentialsToken(\n { issuer: input.issuer!, clientId: input.clientId!, clientSecret: input.clientSecret },\n input.fetch,\n { resource: input.audience },\n )\n .then((res) => {\n cached = { value: res.access_token, until: Date.now() + ((res.expires_in ?? 300) - 60) * 1000 };\n return res.access_token;\n })\n .finally(() => {\n pending = undefined;\n });\n return pending;\n },\n invalidate: () => {\n cached = undefined;\n return true;\n },\n };\n}\n","// Code generated by pontive-sdk-gen 1 from management-api's OpenAPI documents. DO NOT EDIT.\n// Source fingerprint: 21ac762c6242a973df6e7eeb7628bf278ce69cedd53e7961c76cb7e8814bd3a8\n\nimport type { APIPromise, Core, PagePromise, RequestOptions } from \"../core\";\nimport type * as T from \"./types\";\n\nconst e = encodeURIComponent;\n\n/**\n * Every namespace of the management API.\n */\nexport class PontiveNamespaces {\n /**\n * Access keys: the customer's own API credentials, issued by the instance.\n */\n readonly accessKeys: AccessKeys;\n /**\n * Agents, their credentials, and where they are installed.\n */\n readonly agents: Agents;\n /**\n * Registered APIs: the customer's own APIs, their scopes and the clients allowed to call them.\n */\n readonly apis: Apis;\n /**\n * Apps: OAuth clients, their secrets and keys, and the organizations they may sign in.\n */\n readonly apps: Apps;\n /**\n * Authentication configuration.\n */\n readonly authn: Authn;\n /**\n * Authorization: AuthZEN access decisions and searches on the authz host, and the authorization model.\n */\n readonly authz: Authz;\n /**\n * Billing for the instance's own customers. Bodies and results are open objects: the OpenAPI document\n * does not type them yet.\n */\n readonly billing: Billing;\n /**\n * The brand: its document, blueprints, localization and widgets.\n */\n readonly branding: Branding;\n /**\n * The instance's optional capabilities.\n */\n readonly capabilities: Capabilities;\n /**\n * Reference data.\n */\n readonly countries: Countries;\n /**\n * What agents may do for users.\n */\n readonly delegations: Delegations;\n /**\n * Groups and the roles they grant.\n */\n readonly groups: Groups;\n /**\n * Audit and request logs.\n */\n readonly logs: Logs;\n /**\n * The signed-in user's own surface. Needs a user's me token, not a secret key.\n */\n readonly me: Me;\n /**\n * Organizations, their members, invitations and settings.\n */\n readonly organizations: Organizations;\n /**\n * Personal access tokens.\n */\n readonly personalAccessTokens: PersonalAccessTokens;\n /**\n * Resources, their members and their parent.\n */\n readonly resources: Resources;\n /**\n * The instance root: its members, invitations, installations and group roles.\n */\n readonly root: Root;\n /**\n * Service accounts: machine identities, their credentials and roles.\n */\n readonly serviceAccounts: ServiceAccounts;\n /**\n * Bulk imports of users and organizations.\n */\n readonly userImports: UserImports;\n /**\n * Users in the instance.\n */\n readonly users: Users;\n /**\n * Webhook subscriptions, their deliveries and the event types.\n */\n readonly webhooks: Webhooks;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.accessKeys = new AccessKeys(core);\n this.agents = new Agents(core);\n this.apis = new Apis(core);\n this.apps = new Apps(core);\n this.authn = new Authn(core);\n this.authz = new Authz(core);\n this.billing = new Billing(core);\n this.branding = new Branding(core);\n this.capabilities = new Capabilities(core);\n this.countries = new Countries(core);\n this.delegations = new Delegations(core);\n this.groups = new Groups(core);\n this.logs = new Logs(core);\n this.me = new Me(core);\n this.organizations = new Organizations(core);\n this.personalAccessTokens = new PersonalAccessTokens(core);\n this.resources = new Resources(core);\n this.root = new Root(core);\n this.serviceAccounts = new ServiceAccounts(core);\n this.userImports = new UserImports(core);\n this.users = new Users(core);\n this.webhooks = new Webhooks(core);\n }\n}\n\n/**\n * Access keys: the customer's own API credentials, issued by the instance.\n */\nexport class AccessKeys {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create access key.\n *\n * Mint an access key bound to a service account. The credential value is returned only here (and later\n * via reveal for revealable keys).\n *\n * `POST /v1/access-keys` (CreateAccessKey)\n */\n create(body: T.CreateAccessKeyRequest, options?: RequestOptions): APIPromise<T.AccessKeyWithSecret> {\n return this.core.request<T.AccessKeyWithSecret>({ host: \"api\", method: \"POST\", path: `/v1/access-keys`, body }, options);\n }\n\n /**\n * Get access key.\n *\n * Get an access key by ID.\n *\n * `GET /v1/access-keys/{access_key_id}` (GetAccessKey)\n */\n get(accessKeyId: string, options?: RequestOptions): APIPromise<T.AccessKey> {\n return this.core.request<T.AccessKey>({ host: \"api\", method: \"GET\", path: `/v1/access-keys/${e(accessKeyId)}` }, options);\n }\n\n /**\n * Reveal access key.\n *\n * Return the full plaintext credential value; only for a key minted revealable.\n *\n * `GET /v1/access-keys/{access_key_id}/key` (GetAccessKeyValue)\n */\n getValue(accessKeyId: string, options?: RequestOptions): APIPromise<T.RevealAccessKeyResponse> {\n return this.core.request<T.RevealAccessKeyResponse>({ host: \"api\", method: \"GET\", path: `/v1/access-keys/${e(accessKeyId)}/key` }, options);\n }\n\n /**\n * List access keys.\n *\n * List access keys with filtering and pagination.\n *\n * `GET /v1/access-keys` (ListAccessKeys)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListAccessKeysParams, options?: RequestOptions): PagePromise<T.AccessKey, T.ListAccessKeysResponse> {\n return this.core.page<T.AccessKey, T.ListAccessKeysResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/access-keys`, query: params }, options);\n }\n\n /**\n * Revoke access key.\n *\n * Revoke an access key immediately and irreversibly.\n *\n * `POST /v1/access-keys/{access_key_id}/revoke` (RevokeAccessKey)\n */\n revoke(accessKeyId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/access-keys/${e(accessKeyId)}/revoke` }, options);\n }\n\n /**\n * Update access key.\n *\n * Update mutable fields (name, description, metadata).\n *\n * `PATCH /v1/access-keys/{access_key_id}` (UpdateAccessKey)\n */\n update(accessKeyId: string, body: T.UpdateAccessKeyRequest, options?: RequestOptions): APIPromise<T.AccessKey> {\n return this.core.request<T.AccessKey>({ host: \"api\", method: \"PATCH\", path: `/v1/access-keys/${e(accessKeyId)}`, body }, options);\n }\n}\n\n/**\n * Agents, their credentials, and where they are installed.\n */\nexport class Agents {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create agent.\n *\n * Define an agent (pontive-spec 45 §4): an instance agent (owner_type root; sys:agent:manage on the\n * root) or an organization agent (owner_type org, owner_id its org_ id; sys:agent:manage on the\n * organization). owner_type is the definer's resource-type key (D6, D44). An organization agent is\n * installed in its organization at once, with its requested org roles approved by its creator.\n *\n * `POST /v1/agents` (CreateAgent)\n */\n create(body: T.CreateAgentRequest, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents`, body }, options);\n }\n\n /**\n * Create agent client secret.\n *\n * Mint a client secret (D19); needs sys:agent:secret. Creating the agent mints none (D45). Its value\n * is returned here only. Without expire_others_in the others are kept, and the create is refused (409\n * client_secret_limit_reached) while two that do not expire are held; with it, every other secret\n * stops working that many seconds from now (0–604800; 0 at once), so a rotation is one call.\n *\n * `POST /v1/agents/{agent_id}/client-secrets` (CreateAgentClientSecret)\n */\n createClientSecret(agentId: string, body?: T.AgentCreateClientSecretRequest, options?: RequestOptions): APIPromise<T.AgentClientSecretWithValue> {\n return this.core.request<T.AgentClientSecretWithValue>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/client-secrets`, body }, options);\n }\n\n /**\n * Create agent federated credential.\n *\n * Let the agent authenticate at the token endpoint with a token a trusted issuer signed, with no\n * secret or key of its own (workload identity federation, pontive-spec 20 B7). The workload sends its\n * token as client_assertion, with client_assertion_type\n * urn:ietf:params:oauth:client-assertion-type:jwt-bearer and client_id the agent's id; it is accepted\n * when its iss is the credential's trusted issuer (enabled), its aud one the issuer accepts, exp at\n * most the issuer's max_token_lifetime_seconds (default 3600) ahead and at most that long after iat,\n * its signature the issuer's, its jti unused (unless the issuer has allow_reuse, which accepts the\n * same token until it expires), its sub matches subject and every required claim is present with\n * exactly its value. subject is exact by default; a '*' matches one or more characters within one ':'\n * or '/' segment, and '**' or a '*' in the first segment is refused, so repo:acme/api:environment:*\n * matches every environment of acme/api and nothing else. At most 20 per agent, the name once. Needs\n * sys:agent:secret on its definer (the instance root or its organization).\n *\n * `POST /v1/agents/{agent_id}/federated-credentials` (CreateAgentFederatedCredential)\n */\n createFederatedCredential(agentId: string, body: T.CreateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/federated-credentials`, body }, options);\n }\n\n /**\n * Add organizations to an agent's offer.\n *\n * Add one or more organizations to an instance agent's selected offer (D22); one already offered is\n * not an error. With auto_install on, an organization added is installed.\n *\n * `POST /v1/agents/{agent_id}/organizations` (CreateAgentOrganizations)\n */\n createOrganizations(agentId: string, body: T.AddAgentOrganizationsRequest, options?: RequestOptions): APIPromise<T.Organizations> {\n return this.core.request<T.Organizations>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/organizations`, body }, options);\n }\n\n /**\n * Add agent public key.\n *\n * Add a public JWK to the agent's inline keys, for private_key_jwt (pontive-spec 45 §7.2). The body\n * is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256, with a kid. At\n * most three; refused while the agent has a jwks_uri (409 key_source_conflict). Rotate by overlap: add\n * the new key, move over to it, then remove the old one.\n *\n * `POST /v1/agents/{agent_id}/public-keys` (CreateAgentPublicKey)\n */\n createPublicKey(agentId: string, body: T.JWK, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/public-keys`, body }, options);\n }\n\n /**\n * Deactivate agent.\n *\n * Deactivate an agent: every installation is suspended and its token requests are refused\n * (invalid_client). Its credentials are kept.\n *\n * `POST /v1/agents/{agent_id}/deactivate` (DeactivateAgent)\n */\n deactivate(agentId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/deactivate` }, options);\n }\n\n /**\n * Delete agent.\n *\n * Delete the agent with its installations, offer, sponsors and client grants. Tokens already issued\n * live out their lifetime.\n *\n * `DELETE /v1/agents/{agent_id}` (DeleteAgent)\n */\n delete(agentId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}` }, options);\n }\n\n /**\n * Delete agent client secret.\n *\n * Remove one of the agent's client secrets (D8, D19); it stops working at once.\n *\n * `DELETE /v1/agents/{agent_id}/client-secrets/{secret_id}` (DeleteAgentClientSecret)\n */\n deleteClientSecret(agentId: string, secretId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/client-secrets/${e(secretId)}` }, options);\n }\n\n /**\n * Delete agent federated credential.\n *\n * The credential stops authenticating at once; tokens already issued live out their lifetime. Needs\n * sys:agent:secret on its definer (the instance root or its organization).\n *\n * `DELETE /v1/agents/{agent_id}/federated-credentials/{credential_id}`\n * (DeleteAgentFederatedCredential)\n */\n deleteFederatedCredential(agentId: string, credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Remove an organization from an agent's offer.\n *\n * Take one organization off an instance agent's selected offer (D22), which suspends its installations\n * there.\n *\n * `DELETE /v1/agents/{agent_id}/organizations/{organization_id}` (DeleteAgentOrganization)\n */\n deleteOrganization(agentId: string, organizationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/organizations/${e(organizationId)}` }, options);\n }\n\n /**\n * Remove agent public key.\n *\n * Remove one of the agent's inline keys by kid. Assertions signed with it are refused from now on.\n *\n * `DELETE /v1/agents/{agent_id}/public-keys/{key_id}` (DeleteAgentPublicKey)\n */\n deletePublicKey(agentId: string, keyId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/public-keys/${e(keyId)}` }, options);\n }\n\n /**\n * Get agent.\n *\n * Get an agent: its definition, requested roles, offer, secrets (previews), keys and sponsors.\n *\n * `GET /v1/agents/{agent_id}` (GetAgent)\n */\n get(agentId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}` }, options);\n }\n\n /**\n * Get agent federated credential.\n *\n * Needs sys:agent:read on its definer (the instance root or its organization).\n *\n * `GET /v1/agents/{agent_id}/federated-credentials/{credential_id}` (GetAgentFederatedCredential)\n */\n getFederatedCredential(agentId: string, credentialId: string, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * List agents.\n *\n * List the instance agents and organization agents the caller may read. A caller holding\n * sys:agent:read only on some organizations lists those organizations' own agents.\n *\n * `GET /v1/agents` (ListAgents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListAgentsParams, options?: RequestOptions): PagePromise<T.Agent, T.ListAgentsResponse> {\n return this.core.page<T.Agent, T.ListAgentsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents`, query: params }, options);\n }\n\n /**\n * List agent client secrets.\n *\n * The agent's client secrets that still authenticate (D19), newest first: preview, label, status,\n * created and expiry, never the value.\n *\n * `GET /v1/agents/{agent_id}/client-secrets` (ListAgentClientSecrets)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientSecrets(agentId: string, params?: T.ListAgentClientSecretsParams, options?: RequestOptions): PagePromise<T.AgentClientSecret, T.AgentListClientSecretsResponse> {\n return this.core.page<T.AgentClientSecret, T.AgentListClientSecretsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/client-secrets`, query: params }, options);\n }\n\n /**\n * List agent federated credentials.\n *\n * Every federated credential of the agent (at most 20). Needs sys:agent:read on its definer (the\n * instance root or its organization).\n *\n * `GET /v1/agents/{agent_id}/federated-credentials` (ListAgentFederatedCredentials)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listFederatedCredentials(agentId: string, params?: T.ListAgentFederatedCredentialsParams, options?: RequestOptions): PagePromise<T.FederatedCredential, T.ListFederatedCredentialsResponse> {\n return this.core.page<T.FederatedCredential, T.ListFederatedCredentialsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/federated-credentials`, query: params }, options);\n }\n\n /**\n * List agent installations.\n *\n * Every installation of the agent — on the root, organizations and resources — with its approved\n * roles, pending approval and status. Each is managed by its id under its home (D21).\n *\n * `GET /v1/agents/{agent_id}/installations` (ListAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInstallations(agentId: string, params?: T.ListAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/installations`, query: params }, options);\n }\n\n /**\n * List an agent's offer.\n *\n * The organizations an instance agent's selected offer admits (pontive-spec 45 §5.1): its allow-list\n * edge (D22). org_access (all or selected) is a field of the agent.\n *\n * `GET /v1/agents/{agent_id}/organizations` (ListAgentOrganizations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listOrganizations(agentId: string, params?: T.ListAgentOrganizationsParams, options?: RequestOptions): PagePromise<T.AgentOrganization, T.ListAgentOrganizationsResponse> {\n return this.core.page<T.AgentOrganization, T.ListAgentOrganizationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/organizations`, query: params }, options);\n }\n\n /**\n * Reactivate agent.\n *\n * Reactivate a deactivated agent: its installations return to active.\n *\n * `POST /v1/agents/{agent_id}/reactivate` (ReactivateAgent)\n */\n reactivate(agentId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/reactivate` }, options);\n }\n\n /**\n * Update agent.\n *\n * Change an agent's definition; an omitted field is left as it is. sponsors, requested_roles and\n * org_access are fields of the agent (D22), each replaced whole when sent: adding a requested role\n * leaves every installation of its type with a pending approval, removing one takes it off every\n * installation at once. jwks_uri (D20) sets or, with null, clears where its keys are fetched from\n * (sys:agent:secret). Turning auto_install on installs the agent, once, in every organization it is\n * offered to.\n *\n * `PATCH /v1/agents/{agent_id}` (UpdateAgent)\n */\n update(agentId: string, body: T.UpdateAgentRequest, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"PATCH\", path: `/v1/agents/${e(agentId)}`, body }, options);\n }\n\n /**\n * Update agent federated credential.\n *\n * Change the name, description, subject or required claims; an absent field is left as it is, and\n * required_claims, when present, replaces the map. The trusted issuer never changes. Needs\n * sys:agent:secret on its definer (the instance root or its organization).\n *\n * `PATCH /v1/agents/{agent_id}/federated-credentials/{credential_id}` (UpdateAgentFederatedCredential)\n */\n updateFederatedCredential(agentId: string, credentialId: string, body: T.UpdateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"PATCH\", path: `/v1/agents/${e(agentId)}/federated-credentials/${e(credentialId)}`, body }, options);\n }\n}\n\n/**\n * Registered APIs: the customer's own APIs, their scopes and the clients allowed to call them.\n */\nexport class Apis {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create API.\n *\n * Register a resource server: its identifier, the resource clients send (RFC 8707) and the aud of\n * every token issued for it, and the scopes clients may request for it. The identifier is any absolute\n * URI or opaque string, an https URL being the form MCP clients can discover; it cannot be changed\n * later.\n *\n * `POST /v1/apis` (CreateRegisteredAPI)\n */\n create(body: T.CreateRegisteredAPIRequest, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"POST\", path: `/v1/apis`, body }, options);\n }\n\n /**\n * Delete API.\n *\n * Delete an API with its client grants and consent grants. Refresh tokens issued for it fail at their\n * next use with invalid_target. A system API refuses it.\n *\n * `DELETE /v1/apis/{api_id}` (DeleteRegisteredAPI)\n */\n delete(apiId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apis/${e(apiId)}` }, options);\n }\n\n /**\n * Disable API.\n *\n * Refuse new token requests for the API (invalid_target). Tokens already issued for it live out their\n * lifetime. A system API refuses it.\n *\n * `POST /v1/apis/{api_id}/disable` (DisableRegisteredAPI)\n */\n disable(apiId: string, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"POST\", path: `/v1/apis/${e(apiId)}/disable` }, options);\n }\n\n /**\n * Enable API.\n *\n * Let clients request tokens for a disabled API again.\n *\n * `POST /v1/apis/{api_id}/enable` (EnableRegisteredAPI)\n */\n enable(apiId: string, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"POST\", path: `/v1/apis/${e(apiId)}/enable` }, options);\n }\n\n /**\n * Get API.\n *\n * Get a registered API by id.\n *\n * `GET /v1/apis/{api_id}` (GetRegisteredAPI)\n */\n get(apiId: string, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"GET\", path: `/v1/apis/${e(apiId)}` }, options);\n }\n\n /**\n * Get API resource metadata.\n *\n * The RFC 9728 protected resource metadata document for the API, which its resource server serves at\n * /.well-known/oauth-protected-resource (with the identifier's path appended). Only an API whose\n * identifier is an https URL has one.\n *\n * `GET /v1/apis/{api_id}/resource-metadata` (GetRegisteredAPIResourceMetadata)\n */\n getResourceMetadata(apiId: string, options?: RequestOptions): APIPromise<T.ResourceMetadataDocument> {\n return this.core.request<T.ResourceMetadataDocument>({ host: \"api\", method: \"GET\", path: `/v1/apis/${e(apiId)}/resource-metadata` }, options);\n }\n\n /**\n * Import API scopes from MCP tools.\n *\n * Propose the API's tool scopes from an MCP server's tools/list result, sent as the server returns it\n * ({tools, nextCursor?}) with the import's options beside it; Pontive never fetches from the server.\n * One scope per group, then one tool:<name> scope per tool in no group, with the tool's description,\n * its title as display_name and its read-only and destructive hints. The response is the diff against\n * the API's scopes: added, changed (with the fields that differ), removed (tool_import scopes no\n * longer proposed, with what still names each) and unchanged. dry_run absent or true writes nothing;\n * dry_run false writes the diff in one transaction. A removed scope is kept unless remove_missing;\n * with it, one a client grant, consent grant or third-party profile still names refuses the import\n * (api_scope_in_use) unless force. Manual scopes are never removed. At most 500 tools and 100 groups;\n * the result is held to 100 scopes per API. A system API refuses it.\n *\n * `POST /v1/apis/{api_id}/scopes/import` (ImportRegisteredAPIScopes)\n */\n importScopes(apiId: string, body: T.ImportScopesRequest, options?: RequestOptions): APIPromise<T.ImportScopesResponse> {\n return this.core.request<T.ImportScopesResponse>({ host: \"api\", method: \"POST\", path: `/v1/apis/${e(apiId)}/scopes/import`, body }, options);\n }\n\n /**\n * List APIs.\n *\n * List the instance's registered APIs, the system API (the management API, read-only) included unless\n * exclude_system.\n *\n * `GET /v1/apis` (ListRegisteredAPIs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRegisteredAPIsParams, options?: RequestOptions): PagePromise<T.RegisteredAPI, T.ListRegisteredAPIsResponse> {\n return this.core.page<T.RegisteredAPI, T.ListRegisteredAPIsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apis`, query: params }, options);\n }\n\n /**\n * List API client grants.\n *\n * The API's client grants: every service account and agent of the instance that may request it, and\n * the apps that may when client_access is selected. Each holds every scope of the API (all_scopes) or\n * the ones named.\n *\n * `GET /v1/apis/{api_id}/clients` (ListRegisteredAPIClients)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClients(apiId: string, params?: T.ListRegisteredAPIClientsParams, options?: RequestOptions): PagePromise<T.ClientGrant, T.ListClientGrantsResponse> {\n return this.core.page<T.ClientGrant, T.ListClientGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apis/${e(apiId)}/clients`, query: params }, options);\n }\n\n /**\n * Replace API client grants.\n *\n * Replace every client grant of the API with items; [] removes them all. Each names an app, service\n * account or agent of the instance (never a third-party app) and every scope of the API (all_scopes)\n * or a subset of its keys. The system API (the management API) takes client grants too, the only way a\n * service account or agent reaches the management API: each names a service account or agent (an app\n * is api_client_invalid) with scopes exactly [\"pontive:management\"] (all_scopes, no scopes or any\n * other scope is api_scope_invalid).\n *\n * `PUT /v1/apis/{api_id}/clients` (ReplaceAPIClients)\n */\n replaceClients(apiId: string, body: T.SetClientGrantsRequest, options?: RequestOptions): APIPromise<T.ListClientGrantsResponse> {\n return this.core.request<T.ListClientGrantsResponse>({ host: \"api\", method: \"PUT\", path: `/v1/apis/${e(apiId)}/clients`, body }, options);\n }\n\n /**\n * Update API.\n *\n * Change an API's name, description, scopes, token lifetime, client access, third-party switch or\n * resource metadata; an absent field is left as it is. Scopes and resource metadata, when present, are\n * replaced wholesale, and null clears them, as it does the description. The identifier cannot be\n * changed. A system API refuses it; only its client grants can be changed.\n *\n * `PATCH /v1/apis/{api_id}` (UpdateRegisteredAPI)\n */\n update(apiId: string, body: T.UpdateRegisteredAPIRequest, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"PATCH\", path: `/v1/apis/${e(apiId)}`, body }, options);\n }\n}\n\n/**\n * Apps: OAuth clients, their secrets and keys, and the organizations they may sign in.\n */\nexport class Apps {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create app.\n *\n * Create a new application.\n *\n * `POST /v1/apps` (CreateApp)\n */\n create(body: T.CreateAppRequest, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps`, body }, options);\n }\n\n /**\n * Create app client secret.\n *\n * Mint a client secret for a confidential app (a web app in oauth mode; D19); needs sys:app:secret.\n * Creating the app mints none (D45). Its value is returned only in this response: only a hash is\n * stored, and reads show a preview. Without expire_others_in the others are kept, and the create is\n * refused (409 client_secret_limit_reached) while two that do not expire are held; with it, every\n * other secret stops working that many seconds from now (0–604800; 0 at once), so a rotation is one\n * call.\n *\n * `POST /v1/apps/{app_id}/client-secrets` (CreateAppClientSecret)\n */\n createClientSecret(appId: string, body?: T.CreateAppClientSecretRequest, options?: RequestOptions): APIPromise<T.AppClientSecretWithValue> {\n return this.core.request<T.AppClientSecretWithValue>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/client-secrets`, body }, options);\n }\n\n /**\n * Add app organizations.\n *\n * Admit organizations to an app (at most 100 per call). Adding one already admitted is not an error;\n * an unknown organization fails the whole call and nothing is added. The list is kept whatever the\n * app's org_access mode.\n *\n * `POST /v1/apps/{app_id}/organizations` (CreateAppOrganizations)\n */\n createOrganizations(appId: string, body: T.AddAppOrganizationsRequest, options?: RequestOptions): APIPromise<T.AppOrganizationsResponse> {\n return this.core.request<T.AppOrganizationsResponse>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/organizations`, body }, options);\n }\n\n /**\n * Add an app public key.\n *\n * Add a public JWK to a confidential app's inline keys, for private_key_jwt client authentication (RFC\n * 7523). The body is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256,\n * with a kid. At most three; refused while the app has a jwks_uri (409 key_source_conflict), and for a\n * public app (400 public_keys_require_confidential_app).\n *\n * `POST /v1/apps/{app_id}/public-keys` (CreateAppPublicKey)\n */\n createPublicKey(appId: string, body: T.JWK, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/public-keys`, body }, options);\n }\n\n /**\n * Deactivate app.\n *\n * Deactivate an application.\n *\n * `POST /v1/apps/{app_id}/deactivate` (DeactivateApp)\n */\n deactivate(appId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/deactivate` }, options);\n }\n\n /**\n * Delete app.\n *\n * Delete an application. A third-party (CIMD or DCR) app, which is otherwise read-only, is\n * hard-deleted with its consent grants and refresh tokens; the client is admitted again through the\n * normal flow.\n *\n * `DELETE /v1/apps/{app_id}` (DeleteApp)\n */\n delete(appId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}` }, options);\n }\n\n /**\n * Delete app client secret.\n *\n * Remove one of an app's client secrets (D8, D19). It stops working at once; deleting the last one\n * leaves the app unable to authenticate until a new one is created.\n *\n * `DELETE /v1/apps/{app_id}/client-secrets/{secret_id}` (DeleteAppClientSecret)\n */\n deleteClientSecret(appId: string, secretId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/client-secrets/${e(secretId)}` }, options);\n }\n\n /**\n * Remove an app organization.\n *\n * Stop admitting an organization. Sessions already in it end at their next refresh while the app's\n * org_access mode is selected. Removing one that is not admitted is not an error.\n *\n * `DELETE /v1/apps/{app_id}/organizations/{organization_id}` (DeleteAppOrganization)\n */\n deleteOrganization(appId: string, organizationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/organizations/${e(organizationId)}` }, options);\n }\n\n /**\n * Remove an app public key.\n *\n * Remove one of a confidential app's inline keys by kid. Assertions signed with it are refused from\n * now on.\n *\n * `DELETE /v1/apps/{app_id}/public-keys/{key_id}` (DeleteAppPublicKey)\n */\n deletePublicKey(appId: string, keyId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/public-keys/${e(keyId)}` }, options);\n }\n\n /**\n * Get app details.\n *\n * Get application details by ID.\n *\n * `GET /v1/apps/{app_id}` (GetApp)\n */\n get(appId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}` }, options);\n }\n\n /**\n * Get app security level.\n *\n * Get computed security level for an app.\n *\n * `GET /v1/apps/{app_id}/security-level` (GetAppSecurityLevel)\n */\n getSecurityLevel(appId: string, options?: RequestOptions): APIPromise<T.AppSecurityLevel> {\n return this.core.request<T.AppSecurityLevel>({ host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/security-level` }, options);\n }\n\n /**\n * Get third-party clients setting.\n *\n * When third-party OAuth clients — clients identified by a client ID metadata document (CIMD) or\n * registered dynamically (DCR), which the customer did not create — may connect, and the client\n * profile every admitted one is held to. An instance that never changed it reads the defaults:\n * everything off.\n *\n * `GET /v1/apps/settings` (GetAppSettings)\n */\n getSettings(options?: RequestOptions): APIPromise<T.ThirdPartyClients> {\n return this.core.request<T.ThirdPartyClients>({ host: \"api\", method: \"GET\", path: `/v1/apps/settings` }, options);\n }\n\n /**\n * List apps.\n *\n * Get a paginated list of apps.\n *\n * `GET /v1/apps` (ListApps)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListAppsParams, options?: RequestOptions): PagePromise<T.App, T.ListAppsResponse> {\n return this.core.page<T.App, T.ListAppsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps`, query: params }, options);\n }\n\n /**\n * List an app's client secrets.\n *\n * A confidential app's client secrets that still authenticate (D19), newest first: preview, label,\n * status, created and expiry, never the value, which only the create returns. Needs sys:app:secret.\n *\n * `GET /v1/apps/{app_id}/client-secrets` (ListAppClientSecrets)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientSecrets(appId: string, params?: T.ListAppClientSecretsParams, options?: RequestOptions): PagePromise<T.AppClientSecret, T.ListAppClientSecretsResponse> {\n return this.core.page<T.AppClientSecret, T.ListAppClientSecretsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/client-secrets`, query: params }, options);\n }\n\n /**\n * List app organizations.\n *\n * List the organizations an app admits. They take effect while the app's org_access mode is selected:\n * users then sign in only through one of them, and sign up only by accepting an invitation into one.\n *\n * `GET /v1/apps/{app_id}/organizations` (ListAppOrganizations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listOrganizations(appId: string, params?: T.ListAppOrganizationsParams, options?: RequestOptions): PagePromise<T.AppOrganization, T.ListAppOrganizationsResponse> {\n return this.core.page<T.AppOrganization, T.ListAppOrganizationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/organizations`, query: params }, options);\n }\n\n /**\n * List refused proxy bases.\n *\n * The link bases the app's pages named that the app does not accept, most recently seen first — only\n * those registering a proxy path would fix: on one of the app's allowed origins, with a valid path not\n * accepted yet. A flow's emailed links land on the page's bare origin instead, which a proxy mounted\n * under a path does not answer. Kept 30 days after last seen, at most 10.\n *\n * `GET /v1/apps/{app_id}/refused-proxy-bases` (ListRefusedProxyBases)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listRefusedProxyBases(appId: string, params?: T.ListRefusedProxyBasesParams, options?: RequestOptions): PagePromise<T.RefusedProxyBase, T.ListRefusedProxyBasesResponse> {\n return this.core.page<T.RefusedProxyBase, T.ListRefusedProxyBasesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/refused-proxy-bases`, query: params }, options);\n }\n\n /**\n * Preview an access-token claims template.\n *\n * Renders an access-token claims template for a user, and optionally an organization they belong to,\n * exactly as issuance would, without saving the template or issuing a token. Omit claims_template to\n * preview the app's saved one. A template the save would refuse fails here with the same message.\n *\n * `POST /v1/apps/{app_id}/claims-template/preview` (PreviewClaimsTemplate)\n */\n previewClaimsTemplate(appId: string, body: T.PreviewClaimsTemplateRequest, options?: RequestOptions): APIPromise<T.PreviewClaimsTemplateResponse> {\n return this.core.request<T.PreviewClaimsTemplateResponse>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/claims-template/preview`, body }, options);\n }\n\n /**\n * Reactivate app.\n *\n * Reactivate a previously deactivated application.\n *\n * `POST /v1/apps/{app_id}/reactivate` (ReactivateApp)\n */\n reactivate(appId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/reactivate` }, options);\n }\n\n /**\n * Update app.\n *\n * Update an existing app.\n *\n * `PATCH /v1/apps/{app_id}` (UpdateApp)\n */\n update(appId: string, body?: T.UpdateAppRequest, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"PATCH\", path: `/v1/apps/${e(appId)}`, body }, options);\n }\n\n /**\n * Update third-party clients setting.\n *\n * Change the admission policy (cimd, dcr, allowlist) or the client profile; an absent field is left as\n * it is. The allowlist and profile.apis, when present, replace the stored list wholesale, and null\n * empties it. An allow-list entry is an exact client_id URL or https://host/*, at most 100; a profile\n * API must be an API of the instance with third_party on, and scopes null covers all of its scopes.\n * The profile's authentication fields (authflow_bindings, signin_config, signup_config, mfa_config,\n * session_config) take the app routes' shapes and are every third-party app's, read when its user\n * signs in: a present one replaces the profile's wholesale, validated as the app routes validate it,\n * and null unsets it so third-party apps keep their own default.\n *\n * `PATCH /v1/apps/settings` (UpdateAppSettings)\n */\n updateSettings(body: T.UpdateThirdPartyClientsRequest, params?: T.UpdateAppSettingsParams, options?: RequestOptions): APIPromise<T.ThirdPartyClients> {\n const { if_match } = params ?? ({} as T.UpdateAppSettingsParams);\n return this.core.request<T.ThirdPartyClients>({ host: \"api\", method: \"PATCH\", path: `/v1/apps/settings`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Authentication configuration.\n */\nexport class Authn {\n /**\n * How sign-ins with the same email are linked to one user.\n */\n readonly accountLinking: AuthnAccountLinking;\n /**\n * Authentication flows, exported and imported as one document.\n */\n readonly authflows: AuthnAuthflows;\n /**\n * An app's sign-in connections (Google, Microsoft, SAML, …) and the connection types.\n */\n readonly connections: AuthnConnections;\n /**\n * The identity policy: which identifiers users have, and the email policy.\n */\n readonly identityPolicy: AuthnIdentityPolicy;\n /**\n * Systems users are migrated from, lazily or by import.\n */\n readonly migrationSources: AuthnMigrationSources;\n /**\n * The password policy, brute-force lockout included.\n */\n readonly passwordPolicy: AuthnPasswordPolicy;\n /**\n * Connection credentials shared by several apps.\n */\n readonly sharedCredentials: AuthnSharedCredentials;\n /**\n * External issuers whose tokens are accepted.\n */\n readonly trustedIssuers: AuthnTrustedIssuers;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.accountLinking = new AuthnAccountLinking(core);\n this.authflows = new AuthnAuthflows(core);\n this.connections = new AuthnConnections(core);\n this.identityPolicy = new AuthnIdentityPolicy(core);\n this.migrationSources = new AuthnMigrationSources(core);\n this.passwordPolicy = new AuthnPasswordPolicy(core);\n this.sharedCredentials = new AuthnSharedCredentials(core);\n this.trustedIssuers = new AuthnTrustedIssuers(core);\n }\n}\n\n/**\n * How sign-ins with the same email are linked to one user.\n */\nexport class AuthnAccountLinking {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get account-linking settings.\n *\n * Get the instance's account-linking settings: what a first sign-in through a social or enterprise\n * connection does when its email already belongs to an account. An instance that never saved them\n * links by the defaults, both settings on. Linking always needs the address verified on both sides, by\n * a provider trusted to vouch for it and on the account; no setting turns that off.\n *\n * `GET /v1/authn/account-linking-config` (GetAccountLinkingConfig)\n */\n get(options?: RequestOptions): APIPromise<T.AccountLinkingConfig> {\n return this.core.request<T.AccountLinkingConfig>({ host: \"api\", method: \"GET\", path: `/v1/authn/account-linking-config` }, options);\n }\n\n /**\n * Update account-linking settings.\n *\n * Patch the instance's account-linking settings. Omitted fields are left unchanged. auto_link_by_email\n * off refuses every first provider sign-in whose email belongs to an existing account with 409\n * auth_provider_link_required; allow_manual_linking off refuses a signed-in user starting a link\n * through POST /v1/me/external-identities.\n *\n * `PATCH /v1/authn/account-linking-config` (UpdateAccountLinkingConfig)\n */\n update(body: T.UpdateAccountLinkingConfigRequest, params?: T.UpdateAccountLinkingConfigParams, options?: RequestOptions): APIPromise<T.AccountLinkingConfig> {\n const { if_match } = params ?? ({} as T.UpdateAccountLinkingConfigParams);\n return this.core.request<T.AccountLinkingConfig>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/account-linking-config`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Authentication flows, exported and imported as one document.\n */\nexport class AuthnAuthflows {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delete authflow.\n *\n * Delete a custom auth flow. Builtin flows cannot be deleted. Returns 204 No Content on success; 409\n * when the flow is the project default or referenced by an app binding.\n *\n * `DELETE /v1/authn/authflows/{authflow_id}` (DeleteAuthflow)\n */\n delete(authflowId: string, params?: T.DeleteAuthflowParams, options?: RequestOptions): APIPromise<void> {\n const { if_match } = params ?? ({} as T.DeleteAuthflowParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/authflows/${e(authflowId)}`, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Export the authflows document.\n *\n * The instance's auth flows as one authflows/v1 document (api-route-review D47): its published custom\n * flows, each with its own widgets, and the custom widget definitions they show, so the document is\n * self-contained. Only the published state is exported; drafts stay in the dashboard. Built-in flows\n * and definitions are the same everywhere and never travel, and which app runs a flow is the app's\n * authflow_bindings, not part of the flow. Everything is named by a key, never an id: a view node's\n * widget is a definition's key or flow:<ref>, one of the flow's own widgets. authflow_id, repeatable,\n * exports just those flows and the definitions they show (a flow that is not a published custom flow\n * is 404); importing that document touches only them. The output is deterministic: two exports of the\n * same state are byte-identical, and the ETag is the hash of the bytes. Send it as If-None-Match to\n * get 304 when nothing changed. Import the document into another instance with POST\n * /v1/authn/authflows/document/import. Needs sys:flow:read and sys:widget:read.\n *\n * `GET /v1/authn/authflows/document` (GetAuthflowsDocument)\n */\n getDocument(params?: T.GetAuthflowsDocumentParams, options?: RequestOptions): APIPromise<T.AuthflowsDocument> {\n return this.core.request<T.AuthflowsDocument>({ host: \"api\", method: \"GET\", path: `/v1/authn/authflows/document`, query: params }, options);\n }\n\n /**\n * Import an authflows document.\n *\n * Plans importing an authflows/v1 document into this instance and, with dry_run false, applies the\n * plan (api-route-review D47). Flows and widget definitions are merged by key: a new key is created, a\n * differing flow replaced whole, and one the document lacks is listed as absent and left alone.\n * Nothing is deleted; delete a flow with DELETE /v1/authn/authflows/{authflow_id}. A definition the\n * instance lacks is created and published; identical markup is unchanged, and different markup is a\n * conflict, since a published definition never changes. A changed flow keeps each of its own widgets\n * whose content matches, and gets a new one where content changed. With publish true (the default)\n * each changed flow is published, its widgets first; with publish false it writes drafts for review in\n * the dashboard. Anything the flow's publish validator refuses, a reference to a key in neither the\n * document nor the instance, and a draft with unpublished changes the import would overwrite (unless\n * discard_unpublished) are conflicts. Re-importing an instance's own export plans every entry\n * unchanged and writes nothing. The dry run's ETag is the revision of the flows it read: send it as\n * If-Match on the apply to be refused 412 precondition_failed if anything changed since. An apply with\n * conflicts is 409 import_conflict, one detail per conflict, field <kind>.<key>.<field>, and applies\n * nothing. A document the format refuses (not JSON, a member it does not define, a pontive_document it\n * does not read) is 422 field_invalid_format; one over 5 MB is 422 field_too_long. X-Idempotency-Key\n * makes an apply safe to retry; the same key with another request is 422 idempotency_key_reused. Needs\n * sys:flow:manage, sys:widget:read and sys:widget:manage.\n *\n * `POST /v1/authn/authflows/document/import` (ImportAuthflowsDocument)\n */\n importDocument(body: T.ImportAuthflowsRequest, params?: T.ImportAuthflowsDocumentParams, options?: RequestOptions): APIPromise<T.AuthflowImportPlan> {\n const { if_match } = params ?? ({} as T.ImportAuthflowsDocumentParams);\n return this.core.request<T.AuthflowImportPlan>({ host: \"api\", method: \"POST\", path: `/v1/authn/authflows/document/import`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * An app's sign-in connections (Google, Microsoft, SAML, …) and the connection types.\n */\nexport class AuthnConnections {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delete OAuth connection.\n *\n * Delete an app's OAuth connection by provider slug. This also drops all stored user OAuth credentials\n * for that provider on this app; users must re-connect if it is recreated.\n *\n * `DELETE /v1/apps/{app_id}/auth-connections/{connection_slug}` (DeleteAuthConnection)\n */\n delete(appId: string, connectionSlug: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/auth-connections/${e(connectionSlug)}` }, options);\n }\n\n /**\n * Get OAuth provider.\n *\n * Get an app's provider by slug. Returns the resolved view; an unconnected catalog provider is\n * returned with connected=false and no config.\n *\n * `GET /v1/apps/{app_id}/auth-connections/{connection_slug}` (GetAuthConnection)\n */\n get(appId: string, connectionSlug: string, options?: RequestOptions): APIPromise<T.OAuthProvider> {\n return this.core.request<T.OAuthProvider>({ host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/auth-connections/${e(connectionSlug)}` }, options);\n }\n\n /**\n * List OAuth providers.\n *\n * List an app's configured OAuth providers merged with the catalog. The pagination block counts\n * connected (stored) providers only; data additionally includes unconnected catalog entries, so the\n * number of items may exceed limit.\n *\n * `GET /v1/apps/{app_id}/auth-connections` (ListAuthConnections)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(appId: string, params?: T.ListAuthConnectionsParams, options?: RequestOptions): PagePromise<T.OAuthProviderListItem, T.ListOAuthProvidersResponse> {\n return this.core.page<T.OAuthProviderListItem, T.ListOAuthProvidersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/auth-connections`, query: params }, options);\n }\n\n /**\n * List provider catalog.\n *\n * List the platform's supported OAuth provider types and their metadata (scopes, Pontive Credentials\n * availability, deprecation), independent of any app. Carries no credentials. The list is unpaginated.\n *\n * `GET /v1/authn/connection-types` (ListAuthConnectionTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listTypes(params?: T.ListAuthConnectionTypesParams, options?: RequestOptions): PagePromise<T.ProviderCatalogEntry, T.ListProviderCatalogResponse> {\n return this.core.page<T.ProviderCatalogEntry, T.ListProviderCatalogResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/connection-types`, query: params }, options);\n }\n\n /**\n * Upsert OAuth connection.\n *\n * Create or update an app's OAuth connection for the provider slug (unique per app). If no connection\n * exists yet it is created (201); otherwise it is updated (200). Omitted fields are left unchanged on\n * update, and an omitted secret leaves the stored secret intact. Secrets are accepted here but never\n * returned; responses expose only *_set booleans.\n *\n * `PUT /v1/apps/{app_id}/auth-connections/{connection_slug}` (ReplaceAuthConnection)\n */\n replace(appId: string, connectionSlug: string, body: T.CreateOAuthConnectionRequest, options?: RequestOptions): APIPromise<T.OAuthConnection> {\n return this.core.request<T.OAuthConnection>({ host: \"api\", method: \"PUT\", path: `/v1/apps/${e(appId)}/auth-connections/${e(connectionSlug)}`, body }, options);\n }\n}\n\n/**\n * The identity policy: which identifiers users have, and the email policy.\n */\nexport class AuthnIdentityPolicy {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get identity policy.\n *\n * Get the instance's identity policy (email, phone, and username rules). If none has been configured,\n * the default policy is returned.\n *\n * `GET /v1/authn/identity-policy` (GetIdentityPolicy)\n */\n get(options?: RequestOptions): APIPromise<T.IdentityPolicy> {\n return this.core.request<T.IdentityPolicy>({ host: \"api\", method: \"GET\", path: `/v1/authn/identity-policy` }, options);\n }\n\n /**\n * Preview email rules.\n *\n * Count the active users whose email the given rules would refuse at sign-in, were they enforced there\n * (email.enforce_at_signin), with a count per rule. Changes nothing. Ask before turning enforcement\n * on, or tightening a rule while it is on, to see who would be locked out.\n *\n * `POST /v1/authn/identity-policy/email/preview` (PreviewEmailPolicy)\n */\n previewEmailPolicy(body: T.PreviewEmailPolicyRequest, options?: RequestOptions): APIPromise<T.EmailPolicyPreview> {\n return this.core.request<T.EmailPolicyPreview>({ host: \"api\", method: \"POST\", path: `/v1/authn/identity-policy/email/preview`, body }, options);\n }\n\n /**\n * Update identity policy.\n *\n * Patch the instance's identity policy. Omitted sub-policies and fields are left unchanged.\n *\n * `PATCH /v1/authn/identity-policy` (UpdateIdentityPolicy)\n */\n update(body: T.UpdateIdentityPolicyRequest, params?: T.UpdateIdentityPolicyParams, options?: RequestOptions): APIPromise<T.IdentityPolicy> {\n const { if_match } = params ?? ({} as T.UpdateIdentityPolicyParams);\n return this.core.request<T.IdentityPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/identity-policy`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Systems users are migrated from, lazily or by import.\n */\nexport class AuthnMigrationSources {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create migration source.\n *\n * Register a system the instance's users are leaving (pontive-spec 46 §3): its name, its source_type\n * (which picks defaults and the guide, and decides nothing on its own), and the parameters its\n * password hashes need. A Firebase project's hashes need hash_config.firebase_scrypt: the signer key\n * (base64, write-only: answered as a four-character preview), the salt separator (base64), rounds and\n * mem_cost (1 to 16), from the Firebase console's password hash parameters. A source owns the legacy\n * identities its imports write, by which a re-sent row matches the user it created. lazy_migration (46\n * §24.1) has the old system asked, once, at the first password sign-in of a user imported without a\n * password (mode imported_users, the default) or, with all_users (one source at most), of an\n * identifier no user has, creating the user on a valid answer. Its verifier is http (a POST to url,\n * https and a hostname, signed with Standard Webhooks headers under a whsec_ secret answered once here\n * as signing_secret), cognito (region, user_pool_id, client_id, and client_secret when the app client\n * has one) or auth0 (domain, connection, client_id, client_secret); client secrets are write-only, and\n * auth0 without one is refused migration_source_client_secret_required. accept_until defaults to 90\n * days after enabling and is at most 365 days ahead; max_requests_per_second is 1 to 200, default 20.\n * At most 10 per instance. Needs sys:migration:manage on the instance root, held by the instance's\n * owners and admins only and never by a token acting for a user.\n *\n * `POST /v1/authn/migration-sources` (CreateMigrationSource)\n */\n create(body: T.CreateMigrationSourceRequest, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"POST\", path: `/v1/authn/migration-sources`, body }, options);\n }\n\n /**\n * Delete migration source.\n *\n * Delete the source with the legacy identities its imports wrote; runs keep their records. Refused\n * migration_source_in_use while imported hashes still need its parameters, or while users are still\n * pending_migration through it. Needs sys:migration:manage on the instance root.\n *\n * `DELETE /v1/authn/migration-sources/{migration_source_id}` (DeleteMigrationSource)\n */\n delete(migrationSourceId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}` }, options);\n }\n\n /**\n * Get migration source.\n *\n * The source, its signer key as a preview, and imported_passwords: how many users still sign in with a\n * hash that needs it. With lazy migration, its verifier (client and signing secrets as previews),\n * accept_until and pending_users: how many users' passwords the old system still has to confirm, so\n * the closing date can be announced or extended. Needs sys:migration:read on the instance root.\n *\n * `GET /v1/authn/migration-sources/{migration_source_id}` (GetMigrationSource)\n */\n get(migrationSourceId: string, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"GET\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}` }, options);\n }\n\n /**\n * List migration sources.\n *\n * The instance's migration sources, newest first. Needs sys:migration:read on the instance root, held\n * by the instance's owners and admins only.\n *\n * `GET /v1/authn/migration-sources` (ListMigrationSources)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListMigrationSourcesParams, options?: RequestOptions): PagePromise<T.MigrationSource, T.ListMigrationSourcesResponse> {\n return this.core.page<T.MigrationSource, T.ListMigrationSourcesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/migration-sources`, query: params }, options);\n }\n\n /**\n * Rotate migration source signing secret.\n *\n * Mint a new signing secret for the source's HTTP verifier (pontive-spec 46 §24.4). The previous\n * secret keeps signing beside the new one for expire_previous_in seconds (0 to 604800, default 86400;\n * 0 ends it now): during the overlap each request's webhook-signature header carries one signature per\n * secret, so the endpoint rotates without a refused check. The NEW secret is answered only here, as\n * signing_secret. Needs sys:migration:manage on the instance root.\n *\n * `POST /v1/authn/migration-sources/{migration_source_id}/rotate-secret` (RotateMigrationSourceSecret)\n */\n rotateSecret(migrationSourceId: string, body?: T.RotateMigrationSourceSecretRequest, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"POST\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}/rotate-secret`, body }, options);\n }\n\n /**\n * Update migration source.\n *\n * Change the name, or replace hash_config whole: an omitted signer_key keeps the stored one, and\n * {\"firebase_scrypt\": null} removes Firebase's parameters, refused migration_source_in_use while\n * imported hashes still need them. lazy_migration is replaced whole when present, and removed with\n * null. Within it, an omitted accept_until keeps the stored date, an extension included; the 90-day\n * default applies only when the section is first enabled or added again after its removal. A change of\n * accept_until, at most 365 days ahead of the change, is audited with its old and new dates.\n * verifier.client_secret omitted keeps the stored secret while the verifier's type stays the same, a\n * string replaces it, and null removes it: allowed for cognito, refused\n * migration_source_client_secret_required for auth0, which needs one. A verifier that becomes http\n * answers its new signing_secret, once. Needs sys:migration:manage on the instance root.\n *\n * `PATCH /v1/authn/migration-sources/{migration_source_id}` (UpdateMigrationSource)\n */\n update(migrationSourceId: string, body: T.UpdateMigrationSourceRequest, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}`, body }, options);\n }\n\n /**\n * Validate migration source.\n *\n * Report problems without changing anything: whether the source has the parameters its type needs and,\n * given firebase_scrypt_sample (a known Firebase user's password, password hash and salt), whether its\n * Firebase parameters verify that user. With lazy migration, the lazy_migration.verifier check asks\n * the verifier without a password: the HTTP verifier is sent a signed {\"type\": \"check\"} and must\n * answer 200 {\"result\": \"ok\"}; Cognito and Auth0 are asked for an identifier no one holds with a\n * random password and must answer as for a wrong password, which proves the client, its secret and the\n * grant; Auth0's Trust Token Endpoint IP Header cannot be checked. Needs sys:migration:manage on the\n * instance root.\n *\n * `POST /v1/authn/migration-sources/{migration_source_id}/validate` (ValidateMigrationSource)\n */\n validate(migrationSourceId: string, body?: T.ValidateMigrationSourceRequest, options?: RequestOptions): APIPromise<T.MigrationSourceValidation> {\n return this.core.request<T.MigrationSourceValidation>({ host: \"api\", method: \"POST\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}/validate`, body }, options);\n }\n}\n\n/**\n * The password policy, brute-force lockout included.\n */\nexport class AuthnPasswordPolicy {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Reset password policy.\n *\n * Delete the stored password policy, resetting it to the default. A subsequent GET returns the default\n * policy.\n *\n * `DELETE /v1/authn/password-policy` (DeletePasswordPolicy)\n */\n delete(params?: T.DeletePasswordPolicyParams, options?: RequestOptions): APIPromise<void> {\n const { if_match } = params ?? ({} as T.DeletePasswordPolicyParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/password-policy`, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get password policy.\n *\n * Get the instance's password policy. If none has been configured, the default policy is returned.\n *\n * `GET /v1/authn/password-policy` (GetPasswordPolicy)\n */\n get(options?: RequestOptions): APIPromise<T.PasswordPolicy> {\n return this.core.request<T.PasswordPolicy>({ host: \"api\", method: \"GET\", path: `/v1/authn/password-policy` }, options);\n }\n\n /**\n * Update password policy.\n *\n * Patch the instance's password policy. Omitted fields are left unchanged. lockout patches brute-force\n * protection's settings member by member (pontive-spec 04 Brute-force protection): max_failures 3 to\n * 100, block_minutes 1 to 1440, account_max_failures 10 to 1000, address_max_failures 20 to 10000, and\n * allowed_addresses, up to 100 IPv4 or IPv6 addresses or CIDR ranges, which replaces the whole list\n * ([] or null clears it) and is stored canonical. A setting out of its range or an entry that is not\n * an address is 422 field_invalid_format, its message naming the setting; more than 100 entries is 422\n * field_too_long.\n *\n * `PATCH /v1/authn/password-policy` (UpdatePasswordPolicy)\n */\n update(body: T.UpdatePasswordPolicyRequest, params?: T.UpdatePasswordPolicyParams, options?: RequestOptions): APIPromise<T.PasswordPolicy> {\n const { if_match } = params ?? ({} as T.UpdatePasswordPolicyParams);\n return this.core.request<T.PasswordPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/password-policy`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Connection credentials shared by several apps.\n */\nexport class AuthnSharedCredentials {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create shared credential.\n *\n * Create a project-level shared OAuth provider credential. The config is flat (the adapter's own\n * fields directly under \"config\"), discriminated by provider_type. Secrets are accepted here but never\n * returned.\n *\n * `POST /v1/authn/connection-credentials` (CreateSharedCredential)\n */\n create(body: T.CreateSharedCredentialRequest, options?: RequestOptions): APIPromise<T.SharedCredential> {\n return this.core.request<T.SharedCredential>({ host: \"api\", method: \"POST\", path: `/v1/authn/connection-credentials`, body }, options);\n }\n\n /**\n * Delete shared credential.\n *\n * Delete a shared credential by id.\n *\n * `DELETE /v1/authn/connection-credentials/{credential_id}` (DeleteSharedCredential)\n */\n delete(credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/connection-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Get shared credential.\n *\n * Get a shared credential by id. Secrets are redacted; their presence is reported via *_set booleans.\n *\n * `GET /v1/authn/connection-credentials/{credential_id}` (GetSharedCredential)\n */\n get(credentialId: string, options?: RequestOptions): APIPromise<T.SharedCredential> {\n return this.core.request<T.SharedCredential>({ host: \"api\", method: \"GET\", path: `/v1/authn/connection-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * List shared credentials.\n *\n * List the instance's shared OAuth provider credentials. Secrets are never returned; responses expose\n * only *_set booleans. The list is unpaginated.\n *\n * `GET /v1/authn/connection-credentials` (ListSharedCredentials)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListSharedCredentialsParams, options?: RequestOptions): PagePromise<T.SharedCredential, T.ListSharedCredentialsResponse> {\n return this.core.page<T.SharedCredential, T.ListSharedCredentialsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/connection-credentials`, query: params }, options);\n }\n\n /**\n * Update shared credential.\n *\n * Patch a shared credential by id. Omitted fields are unchanged; an omitted secret leaves the stored\n * secret intact.\n *\n * `PATCH /v1/authn/connection-credentials/{credential_id}` (UpdateSharedCredential)\n */\n update(credentialId: string, body: T.UpdateSharedCredentialRequest, options?: RequestOptions): APIPromise<T.SharedCredential> {\n return this.core.request<T.SharedCredential>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/connection-credentials/${e(credentialId)}`, body }, options);\n }\n}\n\n/**\n * External issuers whose tokens are accepted.\n */\nexport class AuthnTrustedIssuers {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create trusted issuer.\n *\n * Trust an external issuer to sign client assertions for this instance's service accounts and agents\n * (workload identity federation, pontive-spec 20 B7): a CI provider's OIDC issuer such as GitHub\n * Actions (https://token.actions.githubusercontent.com) or GitLab, a SPIFFE trust domain's JWT issuer,\n * or a Kubernetes cluster's service account issuer. The issuer is an https URL, matched exactly\n * against an assertion's iss. Without a jwks_uri it is read from the issuer's OpenID discovery\n * document, which must name exactly this issuer. audiences (at most 10) are the aud values an\n * assertion may carry; omitted, this instance's issuer and token endpoint. max_token_lifetime_seconds\n * (default 3600, 60 to 86400) caps how far ahead an assertion's exp may be and how long after its iat.\n * allow_reuse (default false) accepts the same token again until it expires, for workloads that reuse\n * one token (Kubernetes projected tokens, cached SPIFFE JWT-SVIDs); false spends each jti, or a token\n * with no jti whole, once. Trusting an issuer authenticates nobody by itself: a federated credential\n * on a service account or agent does. cross_app_access makes the issuer an organization's enterprise\n * IdP (Cross-App Access, pontive-spec 20 C8): it may then sign ID-JAGs for the organization's members,\n * which an app presents with the urn:ietf:params:oauth:grant-type:jwt-bearer grant for a token to a\n * registered API; the ID-JAG's sub is mapped to a user through the named sign-in connection's external\n * identities (sso_app_id, sso_provider: an OpenID Connect sign-in connection whose discovery document\n * is this issuer's), and the user must be a member of the organization. With cross_app_access, issuer\n * may be omitted: it is the one that connection signs in with. At most 50 per instance. Needs\n * sys:settings:manage on the instance root.\n *\n * `POST /v1/authn/trusted-issuers` (CreateTrustedIssuer)\n */\n create(body: T.CreateTrustedIssuerRequest, options?: RequestOptions): APIPromise<T.TrustedIssuer> {\n return this.core.request<T.TrustedIssuer>({ host: \"api\", method: \"POST\", path: `/v1/authn/trusted-issuers`, body }, options);\n }\n\n /**\n * Delete trusted issuer.\n *\n * Stop trusting an issuer. Refused while federated credentials name it: delete them first, or disable\n * the issuer instead. Needs sys:settings:manage on the instance root.\n *\n * `DELETE /v1/authn/trusted-issuers/{trusted_issuer_id}` (DeleteTrustedIssuer)\n */\n delete(trustedIssuerId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/trusted-issuers/${e(trustedIssuerId)}` }, options);\n }\n\n /**\n * Get trusted issuer.\n *\n * Needs sys:settings:read on the instance root.\n *\n * `GET /v1/authn/trusted-issuers/{trusted_issuer_id}` (GetTrustedIssuer)\n */\n get(trustedIssuerId: string, options?: RequestOptions): APIPromise<T.TrustedIssuer> {\n return this.core.request<T.TrustedIssuer>({ host: \"api\", method: \"GET\", path: `/v1/authn/trusted-issuers/${e(trustedIssuerId)}` }, options);\n }\n\n /**\n * List trusted issuers.\n *\n * Every issuer the instance trusts (at most 50). Needs sys:settings:read on the instance root.\n *\n * `GET /v1/authn/trusted-issuers` (ListTrustedIssuers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListTrustedIssuersParams, options?: RequestOptions): PagePromise<T.TrustedIssuer, T.ListTrustedIssuersResponse> {\n return this.core.page<T.TrustedIssuer, T.ListTrustedIssuersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/trusted-issuers`, query: params }, options);\n }\n\n /**\n * Update trusted issuer.\n *\n * Change the name, jwks_uri, audiences, enabled, allow_reuse, max_token_lifetime_seconds or\n * cross_app_access; an absent field is left as it is. cross_app_access replaces the organization link\n * (Cross-App Access, pontive-spec 20 C8); {\"organization_id\":\"\"} removes it. jwks_uri \"\" reads it\n * again from the issuer's discovery document; audiences, when present, replaces the list ([] means\n * this instance's issuer and token endpoint). enabled false refuses every assertion the issuer signs\n * at once. The issuer URL never changes: trust a new one instead. Needs sys:settings:manage on the\n * instance root.\n *\n * `PATCH /v1/authn/trusted-issuers/{trusted_issuer_id}` (UpdateTrustedIssuer)\n */\n update(trustedIssuerId: string, body: T.UpdateTrustedIssuerRequest, options?: RequestOptions): APIPromise<T.TrustedIssuer> {\n return this.core.request<T.TrustedIssuer>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/trusted-issuers/${e(trustedIssuerId)}`, body }, options);\n }\n}\n\n/**\n * Authorization: AuthZEN access decisions and searches on the authz host, and the authorization model.\n */\nexport class Authz {\n /**\n * The generated authorization model.\n */\n readonly model: AuthzModel;\n /**\n * Permissions of each resource type.\n */\n readonly permissions: AuthzPermissions;\n /**\n * Resource types.\n */\n readonly resourceTypes: AuthzResourceTypes;\n /**\n * Roles of each resource type.\n */\n readonly roles: AuthzRoles;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.model = new AuthzModel(core);\n this.permissions = new AuthzPermissions(core);\n this.resourceTypes = new AuthzResourceTypes(core);\n this.roles = new AuthzRoles(core);\n }\n\n /**\n * Evaluate access.\n *\n * AuthZEN Access Evaluation (OpenID AuthZEN Authorization API 1.0, §6): may the subject do the action\n * on the resource. The subject is a user (usr_), a service account (svc_), an agent (agt_), or a token\n * — an access token of this instance as subject.id: a token acting for a user through an agent is\n * answered for the (user, agent) pair, within its organization and while its delegation is live, and\n * the decision's context echoes the verified principal so the caller applies its own scope check.\n * context.actor names an agent acting for a user subject: only what both may do is allowed. A token\n * that does not verify is refused 400 invalid_token. Inherited roles are resolved through the resource\n * graph. Needs sys:authz:check. A check on a custom resource type bills as one authorization check.\n * Callers: a management credential asks about any subject; any other access token of the instance only\n * about itself, subject {\"type\": \"token\"} or its own subject by id, and is refused 403 for any other\n * (D24, D48).\n *\n * `POST /access/v1/evaluation` (EvaluateAccess)\n */\n evaluateAccess(body: T.AuthZENEvaluation, options?: RequestOptions): APIPromise<T.AuthZENDecision> {\n return this.core.request<T.AuthZENDecision>({ host: \"authz\", method: \"POST\", path: `/access/v1/evaluation`, body }, options);\n }\n\n /**\n * Evaluate access, many questions.\n *\n * AuthZEN Access Evaluations (OpenID AuthZEN Authorization API 1.0, §7): up to 100 questions,\n * answered in the order asked. The request's own subject, action, resource and context are the\n * defaults each evaluation's own keys override; with no evaluations it is a single evaluation,\n * answered as one. options.evaluations_semantic is execute_all (the default), deny_on_first_deny (stop\n * at the first denial) or permit_on_first_permit (stop at the first permit): the answer then ends with\n * the evaluation that stopped it. Subjects, tokens and context.actor are named as in an evaluation.\n * Needs sys:authz:check. Each check on a custom resource type bills as one authorization check.\n * Callers: a management credential asks about any subject; any other access token of the instance only\n * about itself, subject {\"type\": \"token\"} or its own subject by id, and is refused 403 for any other\n * (D24, D48).\n *\n * `POST /access/v1/evaluations` (EvaluateAccessBatch)\n */\n evaluateAccessBatch(body: T.AuthZENEvaluationsRequest, options?: RequestOptions): APIPromise<T.AuthZENEvaluationsResponse> {\n return this.core.request<T.AuthZENEvaluationsResponse>({ host: \"authz\", method: \"POST\", path: `/access/v1/evaluations`, body }, options);\n }\n\n /**\n * AuthZEN discovery.\n *\n * The decision point's metadata (OpenID AuthZEN Authorization API 1.0, §9): its identifier and the\n * endpoints it serves. Public.\n *\n * `GET /.well-known/authzen-configuration` (GetAuthZENConfiguration)\n */\n getConfiguration(options?: RequestOptions): APIPromise<T.AuthZENConfiguration> {\n return this.core.request<T.AuthZENConfiguration>({ host: \"authz\", method: \"GET\", path: `/.well-known/authzen-configuration` }, options);\n }\n\n /**\n * Search actions.\n *\n * AuthZEN Action Search (OpenID AuthZEN Authorization API 1.0, §8.6): the actions the subject may\n * take on the resource. For a subject named by id or by an access token, identity-svc checks every\n * permission of the resource's type on the object, as an evaluation is checked, and answers those held\n * in key order; context.actions narrows the answer to the ones asked about, and context.actor names an\n * agent acting for a user subject. For the caller itself — subject {\"type\": \"token\"} with no id —\n * context.actions names the catalog permissions (sys:<resource>:<action>, at most 32) to ask about on\n * the target instance (resource {\"type\": \"root\"}): what a client hides or disables by, never the\n * decision. Needs sys:authz:check; the caller's own question needs nothing. Callers: a management\n * credential asks about any subject; any other access token of the instance only about itself, subject\n * {\"type\": \"token\"} or its own subject by id, and is refused 403 for any other (D24, D48).\n *\n * `POST /access/v1/search/action` (SearchActions)\n */\n searchActions(body: T.AuthZENSearchRequest, options?: RequestOptions): APIPromise<T.AuthZENActionSearchResponse> {\n return this.core.request<T.AuthZENActionSearchResponse>({ host: \"authz\", method: \"POST\", path: `/access/v1/search/action`, body }, options);\n }\n\n /**\n * Search resources.\n *\n * AuthZEN Resource Search (OpenID AuthZEN Authorization API 1.0, §8.5): the resources of\n * resource.type the subject may do action.name on, directly or by inheritance, each with its name,\n * organization, parent and the roles held as properties. Subjects, tokens and context.actor are named\n * as in an evaluation; a delegated subject lists what the (user, agent) pair both reach. context takes\n * Pontive's filters: organization_id, parent_id, direct_only, include_ancestors. Pages by page.token\n * and page.limit (1 to 100); page.next_token is \"\" on the last page. Needs sys:authz:check for a token\n * or an actor; a subject alone needs what reading that principal does (sys:user:read, sys:sa:read or\n * sys:agent:read). Bills as one authorization check. Callers: a management credential asks about any\n * subject; any other access token of the instance only about itself, subject {\"type\": \"token\"} or its\n * own subject by id, and is refused 403 for any other (D24, D48).\n *\n * `POST /access/v1/search/resource` (SearchResources)\n */\n searchResources(body: T.AuthZENSearchRequest, options?: RequestOptions): APIPromise<T.AuthZENResourceSearchResponse> {\n return this.core.request<T.AuthZENResourceSearchResponse>({ host: \"authz\", method: \"POST\", path: `/access/v1/search/resource`, body }, options);\n }\n}\n\n/**\n * The generated authorization model.\n */\nexport class AuthzModel {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Preview authorization model.\n *\n * Generate a read-only preview of the instance's OpenFGA authorization (FGA) model from the current\n * registry (resource types, roles, permissions and inheritance), without writing it. Returns the\n * OpenFGA DSL and JSON.\n *\n * `GET /v1/authz/model/preview` (GetAuthorizationModelPreview)\n */\n getPreview(options?: RequestOptions): APIPromise<T.PreviewModelResponse> {\n return this.core.request<T.PreviewModelResponse>({ host: \"api\", method: \"GET\", path: `/v1/authz/model/preview` }, options);\n }\n\n /**\n * Regenerate authorization model.\n *\n * Regenerate the instance's OpenFGA authorization (FGA) model from the current registry and write it\n * to the instance's existing store; relationship tuples are kept. Registry changes do this\n * automatically — use it after a platform upgrade that changes how the model is generated.\n *\n * `POST /v1/authz/model/regenerate` (RegenerateAuthorizationModel)\n */\n regenerate(options?: RequestOptions): APIPromise<T.RegenerateModelResponse> {\n return this.core.request<T.RegenerateModelResponse>({ host: \"api\", method: \"POST\", path: `/v1/authz/model/regenerate` }, options);\n }\n}\n\n/**\n * Permissions of each resource type.\n */\nexport class AuthzPermissions {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create custom permission.\n *\n * Create a custom permission. Required: key, resource_type. Optional: description, name. Name format:\n * resource:action or resource:sub_resource:action.\n *\n * `POST /v1/authz/resource-types/{resource_type}/permissions` (CreatePermission)\n */\n create(resourceType: string, body: T.CreatePermissionRequest, options?: RequestOptions): APIPromise<T.Permission> {\n return this.core.request<T.Permission>({ host: \"api\", method: \"POST\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions`, body }, options);\n }\n\n /**\n * Delete custom permission.\n *\n * Delete a custom permission. System permissions cannot be deleted. Returns 204 No Content on success.\n *\n * `DELETE /v1/authz/resource-types/{resource_type}/permissions/{permission_key}` (DeletePermission)\n */\n delete(resourceType: string, permissionKey: string, params?: T.DeletePermissionParams, options?: RequestOptions): APIPromise<void> {\n const { if_match, ...query } = params ?? ({} as T.DeletePermissionParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions/${e(permissionKey)}`, query, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get permission details.\n *\n * Get a permission by name. Returns name, key, description, type, resource_type, created_at,\n * updated_at, used_in_roles. Works for both system and custom permissions.\n *\n * `GET /v1/authz/resource-types/{resource_type}/permissions/{permission_key}` (GetPermission)\n */\n get(resourceType: string, permissionKey: string, options?: RequestOptions): APIPromise<T.Permission> {\n return this.core.request<T.Permission>({ host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions/${e(permissionKey)}` }, options);\n }\n\n /**\n * List permissions.\n *\n * Get a paginated list of all permissions (system and custom) in the directory. Filter by type\n * (system/custom), resource_type, name (partial match).\n *\n * `GET /v1/authz/permissions` (ListPermissions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPermissionsParams, options?: RequestOptions): PagePromise<T.Permission, T.ListPermissionsResponse> {\n return this.core.page<T.Permission, T.ListPermissionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/permissions`, query: params }, options);\n }\n\n /**\n * List a resource type's permissions.\n *\n * The permissions of one resource type (D18), filtered as GET /authz/permissions is.\n *\n * `GET /v1/authz/resource-types/{resource_type}/permissions` (ListResourceTypePermissions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listResourceTypePermissions(resourceType: string, params?: T.ListResourceTypePermissionsParams, options?: RequestOptions): PagePromise<T.Permission, T.ListPermissionsResponse> {\n return this.core.page<T.Permission, T.ListPermissionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions`, query: params }, options);\n }\n\n /**\n * Update custom permission.\n *\n * Update a custom permission. Can update: description, name. Cannot update: key (immutable),\n * resource_type (immutable). System permissions cannot be updated.\n *\n * `PATCH /v1/authz/resource-types/{resource_type}/permissions/{permission_key}` (UpdatePermission)\n */\n update(resourceType: string, permissionKey: string, body?: T.UpdatePermissionRequest, params?: T.UpdatePermissionParams, options?: RequestOptions): APIPromise<T.Permission> {\n const { if_match } = params ?? ({} as T.UpdatePermissionParams);\n return this.core.request<T.Permission>({ host: \"api\", method: \"PATCH\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions/${e(permissionKey)}`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Resource types.\n */\nexport class AuthzResourceTypes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create resource type.\n *\n * Register a resource type in the instance's registry. Only custom types can be created: root and org\n * are reserved and seeded.\n *\n * `POST /v1/authz/resource-types` (CreateResourceType)\n */\n create(body: T.CreateResourceTypeRequest, options?: RequestOptions): APIPromise<T.ResourceType> {\n return this.core.request<T.ResourceType>({ host: \"api\", method: \"POST\", path: `/v1/authz/resource-types`, body }, options);\n }\n\n /**\n * Delete resource type.\n *\n * Delete a resource type from the registry by its key. The reserved root and organization types cannot\n * be deleted.\n *\n * `DELETE /v1/authz/resource-types/{resource_type}` (DeleteResourceType)\n */\n delete(resourceType: string, params?: T.DeleteResourceTypeParams, options?: RequestOptions): APIPromise<void> {\n const { if_match } = params ?? ({} as T.DeleteResourceTypeParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authz/resource-types/${e(resourceType)}`, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get resource type.\n *\n * Get a resource type by its key.\n *\n * `GET /v1/authz/resource-types/{resource_type}` (GetResourceType)\n */\n get(resourceType: string, options?: RequestOptions): APIPromise<T.ResourceType> {\n return this.core.request<T.ResourceType>({ host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}` }, options);\n }\n\n /**\n * List resource types.\n *\n * List the instance's resource types: the reserved root and org types (org in b2b instances only), and\n * the custom types.\n *\n * `GET /v1/authz/resource-types` (ListResourceTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListResourceTypesParams, options?: RequestOptions): PagePromise<T.ResourceType, T.ListResourceTypesResponse> {\n return this.core.page<T.ResourceType, T.ListResourceTypesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/resource-types`, query: params }, options);\n }\n\n /**\n * Update resource type.\n *\n * Update a resource type. Cannot update: key (immutable). The reserved root and org types accept only\n * name and description.\n *\n * `PATCH /v1/authz/resource-types/{resource_type}` (UpdateResourceType)\n */\n update(resourceType: string, body: T.UpdateResourceTypeRequest, params?: T.UpdateResourceTypeParams, options?: RequestOptions): APIPromise<T.ResourceType> {\n const { if_match } = params ?? ({} as T.UpdateResourceTypeParams);\n return this.core.request<T.ResourceType>({ host: \"api\", method: \"PATCH\", path: `/v1/authz/resource-types/${e(resourceType)}`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Roles of each resource type.\n */\nexport class AuthzRoles {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create custom role.\n *\n * Create a custom role. Required: key, resource_type, permissions. Optional: description, name,\n * metadata, resource_id. Setting resource_id (an organization id) makes the role instance-scoped —\n * assignable only on that instance; it is immutable. Role keys are unique within a resource type and\n * cannot collide with system roles.\n *\n * `POST /v1/authz/resource-types/{resource_type}/roles` (CreateRole)\n */\n create(resourceType: string, body: T.CreateRoleRequest, options?: RequestOptions): APIPromise<T.Role> {\n return this.core.request<T.Role>({ host: \"api\", method: \"POST\", path: `/v1/authz/resource-types/${e(resourceType)}/roles`, body }, options);\n }\n\n /**\n * Delete custom role.\n *\n * Delete a custom role. System roles cannot be deleted. Returns 204 No Content on success.\n *\n * `DELETE /v1/authz/resource-types/{resource_type}/roles/{role_key}` (DeleteRole)\n */\n delete(resourceType: string, roleKey: string, params?: T.DeleteRoleParams, options?: RequestOptions): APIPromise<void> {\n const { if_match, ...query } = params ?? ({} as T.DeleteRoleParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authz/resource-types/${e(resourceType)}/roles/${e(roleKey)}`, query, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get role details.\n *\n * Get a role by key and resource_type. Returns name, description, resource_type, type, permissions,\n * metadata, created_at, updated_at, assignment_count, permission_count.\n *\n * `GET /v1/authz/resource-types/{resource_type}/roles/{role_key}` (GetRole)\n */\n get(resourceType: string, roleKey: string, options?: RequestOptions): APIPromise<T.Role> {\n return this.core.request<T.Role>({ host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/roles/${e(roleKey)}` }, options);\n }\n\n /**\n * List roles.\n *\n * Get a paginated list of roles (system and custom) in the directory. Filter by type (system/custom),\n * resource_type, name (partial match), permission. By default only type-scoped roles are returned.\n * Pass resource_id to also include that organization instance's own instance-scoped roles, or set\n * include_instance_scoped=true to include every instance-scoped role alongside the type-scoped ones\n * (ignored when resource_id is set).\n *\n * `GET /v1/authz/roles` (ListRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRolesParams, options?: RequestOptions): PagePromise<T.Role, T.ListRolesResponse> {\n return this.core.page<T.Role, T.ListRolesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/roles`, query: params }, options);\n }\n\n /**\n * List a resource type's roles.\n *\n * The roles of one resource type (D18), filtered as GET /authz/roles is. With inheritable_from, the\n * roles of that parent type a role on this type could inherit instead: each a valid parent_role_key\n * for a RoleInheritance rule on it.\n *\n * `GET /v1/authz/resource-types/{resource_type}/roles` (ListResourceTypeRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listResourceTypeRoles(resourceType: string, params?: T.ListResourceTypeRolesParams, options?: RequestOptions): PagePromise<T.Role, T.ListRolesResponse> {\n return this.core.page<T.Role, T.ListRolesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/roles`, query: params }, options);\n }\n\n /**\n * Update custom role.\n *\n * Update a custom role. Can update: description, name, permissions, metadata. Cannot update: key\n * (immutable), resource_type (immutable). System roles cannot be updated.\n *\n * `PATCH /v1/authz/resource-types/{resource_type}/roles/{role_key}` (UpdateRole)\n */\n update(resourceType: string, roleKey: string, body?: T.UpdateRoleRequest, params?: T.UpdateRoleParams, options?: RequestOptions): APIPromise<T.Role> {\n const { if_match } = params ?? ({} as T.UpdateRoleParams);\n return this.core.request<T.Role>({ host: \"api\", method: \"PATCH\", path: `/v1/authz/resource-types/${e(resourceType)}/roles/${e(roleKey)}`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Billing for the instance's own customers. Bodies and results are open objects: the OpenAPI document\n * does not type them yet.\n */\nexport class Billing {\n readonly catalog: BillingCatalog;\n readonly catalogRules: BillingCatalogRules;\n readonly checkoutSessions: BillingCheckoutSessions;\n readonly contracts: BillingContracts;\n readonly creditNotes: BillingCreditNotes;\n readonly currencies: BillingCurrencies;\n readonly customers: BillingCustomers;\n readonly disputes: BillingDisputes;\n readonly dunning: BillingDunning;\n readonly entitlements: BillingEntitlements;\n readonly eventTypes: BillingEventTypes;\n readonly events: BillingEvents;\n readonly exchangeRates: BillingExchangeRates;\n readonly features: BillingFeatures;\n readonly grants: BillingGrants;\n readonly invoices: BillingInvoices;\n readonly ledger: BillingLedger;\n readonly meters: BillingMeters;\n readonly packages: BillingPackages;\n readonly paymentConnections: BillingPaymentConnections;\n readonly paymentMethods: BillingPaymentMethods;\n readonly payments: BillingPayments;\n readonly pricingUnits: BillingPricingUnits;\n readonly products: BillingProducts;\n readonly rateCards: BillingRateCards;\n readonly refunds: BillingRefunds;\n readonly settings: BillingSettings;\n readonly tax: BillingTax;\n readonly timeMachines: BillingTimeMachines;\n readonly usage: BillingUsage;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.catalog = new BillingCatalog(core);\n this.catalogRules = new BillingCatalogRules(core);\n this.checkoutSessions = new BillingCheckoutSessions(core);\n this.contracts = new BillingContracts(core);\n this.creditNotes = new BillingCreditNotes(core);\n this.currencies = new BillingCurrencies(core);\n this.customers = new BillingCustomers(core);\n this.disputes = new BillingDisputes(core);\n this.dunning = new BillingDunning(core);\n this.entitlements = new BillingEntitlements(core);\n this.eventTypes = new BillingEventTypes(core);\n this.events = new BillingEvents(core);\n this.exchangeRates = new BillingExchangeRates(core);\n this.features = new BillingFeatures(core);\n this.grants = new BillingGrants(core);\n this.invoices = new BillingInvoices(core);\n this.ledger = new BillingLedger(core);\n this.meters = new BillingMeters(core);\n this.packages = new BillingPackages(core);\n this.paymentConnections = new BillingPaymentConnections(core);\n this.paymentMethods = new BillingPaymentMethods(core);\n this.payments = new BillingPayments(core);\n this.pricingUnits = new BillingPricingUnits(core);\n this.products = new BillingProducts(core);\n this.rateCards = new BillingRateCards(core);\n this.refunds = new BillingRefunds(core);\n this.settings = new BillingSettings(core);\n this.tax = new BillingTax(core);\n this.timeMachines = new BillingTimeMachines(core);\n this.usage = new BillingUsage(core);\n }\n}\n\n/**\n * The `billing.catalog` operations.\n */\nexport class BillingCatalog {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.CatalogPromotionService/ExportCatalog (34-billing-catalog.md, Promoting a catalog\n * between instances; API Surface; billing-svc docs/questions.md, P113). The whole catalog as one\n * document keyed by key, never by id: { pontive_document: \"billing-catalog/v1\", event_types, meters,\n * products, features, pricing_units, rate_cards, packages, catalog_rules } (api-route-review D47),\n * every list in key order, written as billing-svc wrote it. Needs sys:billing:read, and answers while\n * billing is off, as every read does.\n *\n * `GET /v1/billing/catalog` (GetCatalog)\n */\n get(options?: RequestOptions): APIPromise<Record<string, unknown>> {\n return this.core.request<Record<string, unknown>>({ host: \"api\", method: \"GET\", path: `/v1/billing/catalog` }, options);\n }\n\n /**\n * billing.catalog.v1.CatalogPromotionService/ImportCatalog (34-billing-catalog.md, Promoting a catalog\n * between instances; API Surface; billing-svc docs/questions.md, P113). Body { document, dry_run,\n * effective_at }: document is a billing-catalog/v1 document, passed to billing-svc byte for byte;\n * dry_run is true when omitted, and returns the plan without applying it; with dry_run false the plan\n * is applied in one transaction; effective_at (RFC 3339, default now) is when changed rates start.\n * Answers the catalog_import_plan: dry_run, effective_at, created, changed, unchanged, absent (each {\n * kind, key, fields }) and conflicts ({ kind, key, field, message }). An apply with conflicts is\n * import_conflict, 409, with one details entry per conflict (field <kind>.<key>.<field>), and applies\n * nothing. The body may be up to 6 MiB (an import document is at most 5 MB). Needs sys:billing:manage.\n *\n * `POST /v1/billing/catalog/import` (ImportCatalog)\n */\n import(body?: T.ImportCatalogRequest, options?: RequestOptions): APIPromise<T.CatalogImportPlan> {\n return this.core.request<T.CatalogImportPlan>({ host: \"api\", method: \"POST\", path: `/v1/billing/catalog/import`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.catalogRules` operations.\n */\nexport class BillingCatalogRules {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.CatalogRulesService/GetCatalogRules (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/catalog-rules` (GetCatalogRules)\n */\n get(options?: RequestOptions): APIPromise<T.CatalogRules> {\n return this.core.request<T.CatalogRules>({ host: \"api\", method: \"GET\", path: `/v1/billing/catalog-rules` }, options);\n }\n\n /**\n * billing.catalog.v1.CatalogRulesService/UpdateCatalogRules (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/catalog-rules` (UpdateCatalogRules)\n */\n update(body?: T.UpdateCatalogRulesRequest, params?: T.UpdateCatalogRulesParams, options?: RequestOptions): APIPromise<T.CatalogRules> {\n const { if_match } = params ?? ({} as T.UpdateCatalogRulesParams);\n return this.core.request<T.CatalogRules>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/catalog-rules`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.checkoutSessions` operations.\n */\nexport class BillingCheckoutSessions {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.contract.v1.CheckoutSessionService/CreateCheckoutSession (35-contracts.md, Checkout session\n * and API Surface). The client's server creates a session for a Customer or a subject; the checkout\n * element confirms it through /v1/me/billing. success_url and cancel_url must be on one of the\n * instance's app origins (billing-svc docs/questions.md, P71).\n *\n * `POST /v1/billing/checkout-sessions` (CreateCheckoutSession)\n */\n create(body?: T.CreateCheckoutSessionRequest, options?: RequestOptions): APIPromise<T.CheckoutSession> {\n return this.core.request<T.CheckoutSession>({ host: \"api\", method: \"POST\", path: `/v1/billing/checkout-sessions`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.CheckoutSessionService/ExpireCheckoutSession (35-contracts.md, Checkout session\n * and API Surface). An open session becomes expired.\n *\n * `POST /v1/billing/checkout-sessions/{checkout_session_id}/expire` (ExpireCheckoutSession)\n */\n expire(checkoutSessionId: string, options?: RequestOptions): APIPromise<T.CheckoutSession> {\n return this.core.request<T.CheckoutSession>({ host: \"api\", method: \"POST\", path: `/v1/billing/checkout-sessions/${e(checkoutSessionId)}/expire`, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.CheckoutSessionService/GetCheckoutSession (35-contracts.md, Checkout session and\n * API Surface).\n *\n * `GET /v1/billing/checkout-sessions/{checkout_session_id}` (GetCheckoutSession)\n */\n get(checkoutSessionId: string, options?: RequestOptions): APIPromise<T.CheckoutSession> {\n return this.core.request<T.CheckoutSession>({ host: \"api\", method: \"GET\", path: `/v1/billing/checkout-sessions/${e(checkoutSessionId)}` }, options);\n }\n}\n\n/**\n * The `billing.contracts` operations.\n */\nexport class BillingContracts {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.contract.v1.ContractService/CancelContract (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/cancel` (CancelContract)\n */\n cancel(contractId: string, body?: T.CancelContractRequest, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/cancel`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/ChangeContractPackage (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/change-package` (ChangeContractPackage)\n */\n changePackage(contractId: string, body?: T.ChangeContractPackageRequest, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/change-package`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/CreateContract (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts` (CreateContract)\n */\n create(body?: T.CreateContractRequest, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/CreateContractEdit (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/edits` (CreateContractEdit)\n */\n createEdit(contractId: string, body?: T.CreateContractEditRequest, options?: RequestOptions): APIPromise<T.Edit> {\n return this.core.request<T.Edit>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/edits`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/DeleteContractEdit (35-contracts.md, API Surface).\n *\n * `DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}` (DeleteContractEdit)\n */\n deleteEdit(contractId: string, editId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/billing/contracts/${e(contractId)}/edits/${e(editId)}` }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/GetContract (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}` (GetContract)\n */\n get(contractId: string, params?: T.GetContractParams, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/GetContractHistory (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}/history` (GetContractHistory)\n */\n getHistory(contractId: string, options?: RequestOptions): APIPromise<T.ContractHistory> {\n return this.core.request<T.ContractHistory>({ host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}/history` }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/ListContracts (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts` (ListContracts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListContractsParams, options?: RequestOptions): PagePromise<T.Contract, T.ContractList> {\n return this.core.page<T.Contract, T.ContractList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/contracts`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/ListAllowanceSchedules (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}/allowance-schedules` (ListAllowanceSchedules)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAllowanceSchedules(contractId: string, params?: T.ListAllowanceSchedulesParams, options?: RequestOptions): PagePromise<T.AllowanceSchedule, T.AllowanceScheduleList> {\n return this.core.page<T.AllowanceSchedule, T.AllowanceScheduleList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}/allowance-schedules`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/ListContractEdits (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}/edits` (ListContractEdits)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEdits(contractId: string, params?: T.ListContractEditsParams, options?: RequestOptions): PagePromise<T.Edit, T.EditList> {\n return this.core.page<T.Edit, T.EditList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}/edits`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/PreviewContract (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/preview` (PreviewContract)\n */\n preview(body?: T.PreviewContractRequest, options?: RequestOptions): APIPromise<T.PreviewContractResponse> {\n return this.core.request<T.PreviewContractResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/PreviewContractEdit (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/edits/preview` (PreviewContractEdit)\n */\n previewEdit(contractId: string, body?: T.PreviewContractEditRequest, options?: RequestOptions): APIPromise<T.PreviewContractEditResponse> {\n return this.core.request<T.PreviewContractEditResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/edits/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/RevokeContractCancellation (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/revoke-cancellation` (RevokeContractCancellation)\n */\n revokeCancellation(contractId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.RevokeContractCancellationResponse> {\n return this.core.request<T.RevokeContractCancellationResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/revoke-cancellation`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.creditNotes` operations.\n */\nexport class BillingCreditNotes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.invoice.v1.CreditNoteService/CreateCreditNote (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/credit-notes` (CreateCreditNote)\n */\n create(body?: T.CreateCreditNoteRequest, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"POST\", path: `/v1/billing/credit-notes`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/GetCreditNote (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/credit-notes/{credit_note_id}` (GetCreditNote)\n */\n get(creditNoteId: string, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"GET\", path: `/v1/billing/credit-notes/${e(creditNoteId)}` }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/GetCreditNotePdf (37-invoicing.md, API Surface; The document).\n * The credit note's PDF as a download, not an envelope: Content-Type application/pdf and\n * Content-Disposition attachment with the file name billing-svc gives, {number}.pdf. A voided credit\n * note's is the VOID rendition (billing-svc docs/questions.md, X158). locale is not read until\n * documents are localized.\n *\n * `GET /v1/billing/credit-notes/{credit_note_id}/pdf` (GetCreditNotePdf)\n */\n getPdf(creditNoteId: string, params?: T.GetCreditNotePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"api\", method: \"GET\", path: `/v1/billing/credit-notes/${e(creditNoteId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/ListCreditNotes (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/credit-notes` (ListCreditNotes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCreditNotesParams, options?: RequestOptions): PagePromise<T.CreditNote, T.CreditNoteList> {\n return this.core.page<T.CreditNote, T.CreditNoteList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/credit-notes`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/PreviewCreditNote (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/credit-notes/preview` (PreviewCreditNote)\n */\n preview(body?: T.PreviewCreditNoteRequest, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"POST\", path: `/v1/billing/credit-notes/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/VoidCreditNote (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/credit-notes/{credit_note_id}/void` (VoidCreditNote)\n */\n void(creditNoteId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"POST\", path: `/v1/billing/credit-notes/${e(creditNoteId)}/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.currencies` operations.\n */\nexport class BillingCurrencies {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.CurrencyService/ListCurrencies (32-billing-overview.md, API Surface, Currencies).\n * Every currency billing accepts, sorted by code: its upper-case ISO 4217 code, English name, minor\n * units (exponent), whether Stripe can charge it (chargeable) and Stripe's minimum charge, or null.\n * chargeable=true lists only the chargeable ones. Paged like every list.\n *\n * `GET /v1/billing/currencies` (ListCurrencies)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCurrenciesParams, options?: RequestOptions): PagePromise<T.Currency, T.CurrencyList> {\n return this.core.page<T.Currency, T.CurrencyList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/currencies`, query: params }, options);\n }\n}\n\n/**\n * The `billing.customers` operations.\n */\nexport class BillingCustomers {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.customer.v1.CustomerService/AnonymizeCustomer (32-billing-overview.md, Customers,\n * Anonymizing). Removes a settled Customer's personal data for a GDPR erasure: its name becomes the\n * given one (default \"Deleted customer\"); its email, billing address, tax ids, locale, ingest aliases\n * and metadata are cleared; its payment methods are detached on the provider; it is archived and its\n * anonymized_at set. Its id, subject and history stay, and its issued invoices keep their documents,\n * the tax record. Refused with customer_in_use while a contract has not ended or an invoice is a\n * draft, held or open. Idempotent and irreversible: later writes are customer_anonymized.\n *\n * `POST /v1/billing/customers/{customer_id}/anonymize` (AnonymizeCustomer)\n */\n anonymize(customerId: string, body?: T.AnonymizeCustomerRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/anonymize`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/ArchiveCustomer (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/archive` (ArchiveCustomer)\n */\n archive(customerId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/ChangeCustomerSubject (32-billing-overview.md, Changing the\n * subject). Re-points the Customer from user to organization, or from external to user or\n * organization; the new subject must have no Customer of its own.\n *\n * `POST /v1/billing/customers/{customer_id}/change-subject` (ChangeCustomerSubject)\n */\n changeSubject(customerId: string, body?: T.ChangeCustomerSubjectRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/change-subject`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/CreateCustomer (32-billing-overview.md, API Surface; Customer).\n * tax_status is auto, taxable, exempt or reverse_charge; left out, it is auto: billing decides reverse\n * charge, and taxable forces tax (billing-svc docs/questions.md, P104, P105).\n *\n * `POST /v1/billing/customers` (CreateCustomer)\n */\n create(body?: T.CreateCustomerRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/GetCustomer (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/customers/{customer_id}` (GetCustomer)\n */\n get(customerId: string, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}` }, options);\n }\n\n /**\n * billing.entitlement.v1.CustomerAccessService/GetCustomerAccess (32-billing-overview.md, API Surface,\n * Customer access; Data Model, Customer access; billing-svc docs/questions.md, P125). The Customer's\n * current access: its subject, the package it is on, every feature it resolves a value for by key ({\n * type, value } for a boolean or numeric feature, { type, allowance, per, limit, overage, exhausted }\n * for a metered one; billing-svc docs/questions.md, P107), seat_limit, suspended and suspension_cause,\n * with a version that increases on every change. A Customer with no access stored yet answers the\n * access computed now with version 0. A client that knows only a subject finds its Customer with GET\n * /v1/billing/customers?subject_type=&subject_id=; a subject with no Customer has no access, only the\n * defaults. Needs sys:billing:read on the root, and answers while billing is off (billing-svc\n * docs/questions.md, P41). An unknown Customer is customer_not_found. The RPC writes nothing, so\n * X-Idempotency-Key is not read.\n *\n * `GET /v1/billing/customers/{customer_id}/access` (GetCustomerAccess)\n */\n getAccess(customerId: string, options?: RequestOptions): APIPromise<T.CustomerAccess> {\n return this.core.request<T.CustomerAccess>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/access` }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/ListCustomers (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/customers` (ListCustomers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCustomersParams, options?: RequestOptions): PagePromise<T.Customer, T.CustomerList> {\n return this.core.page<T.Customer, T.CustomerList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/customers`, query: params }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/UnarchiveCustomer (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/unarchive` (UnarchiveCustomer)\n */\n unarchive(customerId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/UpdateCustomer (32-billing-overview.md, API Surface; Customer).\n * tax_status is auto, taxable, exempt or reverse_charge (billing-svc docs/questions.md, P105).\n *\n * `PATCH /v1/billing/customers/{customer_id}` (UpdateCustomer)\n */\n update(customerId: string, body?: T.UpdateCustomerRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/customers/${e(customerId)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.disputes` operations.\n */\nexport class BillingDisputes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.DisputeService/GetDispute (38-payments-and-tax.md, API Surface, Refunds and\n * disputes).\n *\n * `GET /v1/billing/disputes/{dispute_id}` (GetDispute)\n */\n get(disputeId: string, options?: RequestOptions): APIPromise<T.Dispute> {\n return this.core.request<T.Dispute>({ host: \"api\", method: \"GET\", path: `/v1/billing/disputes/${e(disputeId)}` }, options);\n }\n\n /**\n * billing.payment.v1.DisputeService/ListDisputes (38-payments-and-tax.md, API Surface, Refunds and\n * disputes). Newest first.\n *\n * `GET /v1/billing/disputes` (ListDisputes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListDisputesParams, options?: RequestOptions): PagePromise<T.Dispute, T.DisputeList> {\n return this.core.page<T.Dispute, T.DisputeList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/disputes`, query: params }, options);\n }\n}\n\n/**\n * The `billing.dunning` operations.\n */\nexport class BillingDunning {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.DunningService/GetCustomerDunning (38-payments-and-tax.md, API Surface, Dunning;\n * Customer dunning state). The same state the Customer object carries as dunning; a send_invoice\n * Customer is always none.\n *\n * `GET /v1/billing/customers/{customer_id}/dunning` (GetCustomerDunning)\n */\n getForCustomer(customerId: string, options?: RequestOptions): APIPromise<T.DunningState> {\n return this.core.request<T.DunningState>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/dunning` }, options);\n }\n\n /**\n * billing.payment.v1.DunningService/GetDunningPolicy (38-payments-and-tax.md, API Surface, Dunning;\n * Dunning policy). The instance's policy, with 38's defaults until it is changed.\n *\n * `GET /v1/billing/dunning-policy` (GetDunningPolicy)\n */\n getPolicy(options?: RequestOptions): APIPromise<T.DunningPolicy> {\n return this.core.request<T.DunningPolicy>({ host: \"api\", method: \"GET\", path: `/v1/billing/dunning-policy` }, options);\n }\n\n /**\n * billing.payment.v1.DunningService/RetryCustomerDunning (38-payments-and-tax.md, API Surface,\n * Dunning). Tries every overdue invoice at once, oldest first, as the client; the schedule does not\n * move.\n *\n * `POST /v1/billing/customers/{customer_id}/dunning/retry` (RetryCustomerDunning)\n */\n retryForCustomer(customerId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.DunningState> {\n return this.core.request<T.DunningState>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/dunning/retry`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.DunningService/UpdateDunningPolicy (38-payments-and-tax.md, API Surface, Dunning;\n * Dunning policy). A field left out keeps its value; retries and steps replace their lists;\n * send_invoice is merged field by field, and null turns a field off (null on send_invoice turns every\n * field in it off). More than 6 retries or 20 steps is field_too_long and changes nothing.\n *\n * `PATCH /v1/billing/dunning-policy` (UpdateDunningPolicy)\n */\n updatePolicy(body?: T.UpdateDunningPolicyRequest, params?: T.UpdateDunningPolicyParams, options?: RequestOptions): APIPromise<T.DunningPolicy> {\n const { if_match } = params ?? ({} as T.UpdateDunningPolicyParams);\n return this.core.request<T.DunningPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/dunning-policy`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.entitlements` operations.\n */\nexport class BillingEntitlements {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.entitlement.v1.EntitlementService/CheckEntitlement (39-entitlements-and-controls.md, API\n * Surface; Check, list, consume). No side effects. A denial is a 200 with allowed false and a reason\n * (not_entitled, allowance_exhausted, balance_exhausted, access_restricted), never an error (Error\n * Handling). value is the feature's value: true, a decimal string, or a metered feature's allowance;\n * when the Customer is not entitled to it, false for a boolean feature and null otherwise. limit is a\n * metered feature's state, null for other types. Only external subjects resolve until Phase 4. The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/entitlements/check` (CheckEntitlement)\n */\n check(body?: T.CheckEntitlementRequest, options?: RequestOptions): APIPromise<T.CheckEntitlementResponse> {\n return this.core.request<T.CheckEntitlementResponse>({ host: \"authz\", method: \"POST\", path: `/v1/entitlements/check`, body }, options);\n }\n\n /**\n * billing.entitlement.v1.EntitlementService/ConsumeEntitlement (39-entitlements-and-controls.md, API\n * Surface; Check, list, consume). Resolves, decides as a check would and, when allowed, records the\n * usage event, in one transaction. Idempotent on transaction_id, not on X-Idempotency-Key, which is\n * not read: a retry of an allowed consume answers the first decision with replayed true and consumes\n * nothing again; a denied consume records nothing and is decided again on retry (billing-svc\n * docs/questions.md, P9). A denial is a 200 with allowed false and a reason, never an error.\n * properties is a JSON object, kept as sent. The usage event is checked against its event type's\n * schema as ingest checks it: with validation warn, an allowed consume lists warnings, each { code,\n * property, expected }; with reject, one that does not fit is refused with 422 schema_mismatch and\n * records nothing: the error's details list each violation as { field: its property, message: its code\n * and what was expected } (billing-svc docs/questions.md, P99, P111).\n *\n * `POST /v1/entitlements/consume` (ConsumeEntitlement)\n */\n consume(body?: T.ConsumeEntitlementRequest, options?: RequestOptions): APIPromise<T.ConsumeEntitlementResponse> {\n return this.core.request<T.ConsumeEntitlementResponse>({ host: \"authz\", method: \"POST\", path: `/v1/entitlements/consume`, body }, options);\n }\n\n /**\n * billing.entitlement.v1.EntitlementService/ListEntitlements (39-entitlements-and-controls.md, API\n * Surface; Entitlement (resolved)). The resolved set for a subject (subject_type and subject_id) or a\n * Customer: every feature some source sets, by key, each with its via. A boolean or numeric feature is\n * { feature_id, key, type, value, via }; a metered one carries meter_id, allowance, limit, overage,\n * period_start, period_end, used, remaining and balance in place of value.\n *\n * `GET /v1/billing/entitlements` (GetEntitlements)\n */\n get(params?: T.GetEntitlementsParams, options?: RequestOptions): APIPromise<T.EntitlementSet> {\n return this.core.request<T.EntitlementSet>({ host: \"api\", method: \"GET\", path: `/v1/billing/entitlements`, query: params }, options);\n }\n}\n\n/**\n * The `billing.eventTypes` operations.\n */\nexport class BillingEventTypes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.metering.v1.EventTypeService/ArchiveEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Refused with\n * event_type_in_use while a meter's current or future version names it. Events of an archived type are\n * accepted with no check and no enrichment.\n *\n * `POST /v1/billing/event-types/{event_type}/archive` (ArchiveEventType)\n */\n archive(eventType: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types/${e(eventType)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/CreateEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Defines an event\n * type before any event of its key is sent: origin client, validation warn unless given (none, warn or\n * reject), auto_enrich true unless given. Each property is { key, type, required, description }, type\n * string, number or boolean, up to 100. A key already used, detected or defined, is\n * event_type_key_conflict; at the instance's limit of active event types, event_type_limit_reached.\n *\n * `POST /v1/billing/event-types` (CreateEventType)\n */\n create(body?: T.CreateEventTypeRequest, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/GetEventType (33-metering.md, API Surface, Event types; Event\n * types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types\n * is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). An event type by its etyp_ id or\n * its key. Each property carries its source, types_seen, first_seen_at and last_seen_at, read-only. An\n * unknown one is event_type_not_found.\n *\n * `GET /v1/billing/event-types/{event_type}` (GetEventType)\n */\n get(eventType: string, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"GET\", path: `/v1/billing/event-types/${e(eventType)}` }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/InferEventType (33-metering.md, API Surface, Event types; Event\n * types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types\n * is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Takes { event }, one sample event\n * as it would be sent, and answers a draft: the key, and one property per property of the sample with\n * its value's type, each required false. Nothing is saved, so the draft has an empty id, null\n * timestamps, and X-Idempotency-Key is not read; the client edits the draft and creates it.\n *\n * `POST /v1/billing/event-types/infer` (InferEventType)\n */\n infer(body?: T.InferEventTypeRequest, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types/infer`, body }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/ListEventTypes (33-metering.md, API Surface, Event types; Event\n * types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types\n * is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). The instance's event types,\n * newest first.\n *\n * `GET /v1/billing/event-types` (ListEventTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListEventTypesParams, options?: RequestOptions): PagePromise<T.MeteringEventType, T.EventTypeList> {\n return this.core.page<T.MeteringEventType, T.EventTypeList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/event-types`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/UnarchiveEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). At the instance's\n * limit of active event types, refused with event_type_limit_reached.\n *\n * `POST /v1/billing/event-types/{event_type}/unarchive` (UnarchiveEventType)\n */\n unarchive(eventType: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types/${e(eventType)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/UpdateEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). A field left out\n * keeps its value; the key does not change. properties replaces the whole list: a property left out is\n * removed, one set or changed becomes source client, and [] removes them all. properties, auto_enrich\n * and validation may not be null. Removing a property a meter names, or changing its type away from\n * number where a meter needs one, is event_type_property_in_use.\n *\n * `PATCH /v1/billing/event-types/{event_type}` (UpdateEventType)\n */\n update(eventType: string, body?: T.UpdateEventTypeRequest, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/event-types/${e(eventType)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.events` operations.\n */\nexport class BillingEvents {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.event.v1.EventService/GetEvent (32-billing-overview.md, API Surface, Events; billing-svc\n * docs/questions.md, P32).\n *\n * `GET /v1/billing/events/{event_id}` (GetEvent)\n */\n get(eventId: string, options?: RequestOptions): APIPromise<T.BillingEvent> {\n return this.core.request<T.BillingEvent>({ host: \"api\", method: \"GET\", path: `/v1/billing/events/${e(eventId)}` }, options);\n }\n\n /**\n * billing.event.v1.EventService/ListEvents (32-billing-overview.md, API Surface, Events; billing-svc\n * docs/questions.md, P32).\n *\n * `GET /v1/billing/events` (ListEvents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListEventsParams, options?: RequestOptions): PagePromise<T.BillingEvent, T.EventCursorList> {\n return this.core.page<T.BillingEvent, T.EventCursorList>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/billing/events`, query: params }, options);\n }\n}\n\n/**\n * The `billing.exchangeRates` operations.\n */\nexport class BillingExchangeRates {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.ExchangeRateService/GetExchangeRate (32-billing-overview.md, API Surface,\n * Exchange rates). The rate a line whose service period ends at at takes: the ECB's reference rate, or\n * a manual rate for a pair the ECB does not publish. exchange_rate_unavailable while there is none\n * yet.\n *\n * `GET /v1/billing/exchange-rates` (GetExchangeRate)\n */\n get(params: T.GetExchangeRateParams, options?: RequestOptions): APIPromise<T.ExchangeRate> {\n return this.core.request<T.ExchangeRate>({ host: \"api\", method: \"GET\", path: `/v1/billing/exchange-rates`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.ExchangeRateService/SetManualExchangeRate (32-billing-overview.md, API Surface,\n * Exchange rates). A manual rate for one day (UTC) of a pair the ECB does not publish: { rate, note }.\n * exchange_rate_published for a pair the ECB publishes; exchange_rate_in_use for a change to a rate a\n * finalized invoice used.\n *\n * `PUT /v1/billing/exchange-rates/{from}/{to}/{date}` (ReplaceExchangeRate)\n */\n replace(from: string, to: string, date: string, body?: T.SetManualExchangeRateRequest, options?: RequestOptions): APIPromise<T.ExchangeRate> {\n return this.core.request<T.ExchangeRate>({ host: \"api\", method: \"PUT\", path: `/v1/billing/exchange-rates/${e(from)}/${e(to)}/${e(date)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.features` operations.\n */\nexport class BillingFeatures {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.FeatureService/ArchiveFeature (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/features/{feature}/archive` (ArchiveFeature)\n */\n archive(feature: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"POST\", path: `/v1/billing/features/${e(feature)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/CreateFeature (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/features` (CreateFeature)\n */\n create(body?: T.CreateFeatureRequest, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"POST\", path: `/v1/billing/features`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/GetFeature (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/features/{feature}` (GetFeature)\n */\n get(feature: string, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"GET\", path: `/v1/billing/features/${e(feature)}` }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/ListFeatures (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/features` (ListFeatures)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListFeaturesParams, options?: RequestOptions): PagePromise<T.Feature, T.FeatureList> {\n return this.core.page<T.Feature, T.FeatureList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/features`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/UpdateFeature (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/features/{feature}` (UpdateFeature)\n */\n update(feature: string, body?: T.UpdateFeatureRequest, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/features/${e(feature)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.grants` operations.\n */\nexport class BillingGrants {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.ledger.v1.GrantService/CreateGrant (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/grants` (CreateGrant)\n */\n create(body?: T.CreateGrantRequest, options?: RequestOptions): APIPromise<T.Grant> {\n return this.core.request<T.Grant>({ host: \"api\", method: \"POST\", path: `/v1/billing/grants`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/GetGrant (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/grants/{grant_id}` (GetGrant)\n */\n get(grantId: string, options?: RequestOptions): APIPromise<T.Grant> {\n return this.core.request<T.Grant>({ host: \"api\", method: \"GET\", path: `/v1/billing/grants/${e(grantId)}` }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/ListGrants (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/grants` (ListGrants)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListGrantsParams, options?: RequestOptions): PagePromise<T.Grant, T.GrantList> {\n return this.core.page<T.Grant, T.GrantList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/grants`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/UpdateGrant (36-credits-ledger.md, API Surface).\n *\n * `PATCH /v1/billing/grants/{grant_id}` (UpdateGrant)\n */\n update(grantId: string, body?: T.UpdateGrantRequest, options?: RequestOptions): APIPromise<T.Grant> {\n return this.core.request<T.Grant>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/grants/${e(grantId)}`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/VoidGrant (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/grants/{grant_id}/void` (VoidGrant)\n */\n void(grantId: string, body?: T.VoidGrantRequest, options?: RequestOptions): APIPromise<T.VoidGrantResponse> {\n return this.core.request<T.VoidGrantResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/grants/${e(grantId)}/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.invoices` operations.\n */\nexport class BillingInvoices {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.invoice.v1.InvoiceService/CreateInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices` (CreateInvoice)\n */\n create(body?: T.CreateInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/FinalizeInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/finalize` (FinalizeInvoice)\n */\n finalize(invoiceId: string, body?: T.FinalizeInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/finalize`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetInvoice (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices/{invoice_id}` (GetInvoice)\n */\n get(invoiceId: string, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}` }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetInvoicePdf (37-invoicing.md, API Surface; The document). The\n * invoice's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition\n * attachment with the file name billing-svc gives, {number}.pdf. A voided invoice's is the VOID\n * rendition (billing-svc docs/questions.md, X158); a draft has none (not_found). locale is not read\n * until documents are localized.\n *\n * `GET /v1/billing/invoices/{invoice_id}/pdf` (GetInvoicePdf)\n */\n getPdf(invoiceId: string, params?: T.GetInvoicePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetUpcomingInvoice (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices/upcoming` (GetUpcomingInvoice)\n */\n getUpcoming(params?: T.GetUpcomingInvoiceParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/upcoming`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetInvoiceUsageCsv (37-invoicing.md, API Surface; The document).\n * One row per rated usage line (billing-svc docs/questions.md, X157), as a download, not an envelope:\n * Content-Type text/csv; charset=utf-8 and Content-Disposition attachment with the file name\n * billing-svc gives, {number}-usage-detail.csv.\n *\n * `GET /v1/billing/invoices/{invoice_id}/usage-detail` (GetInvoiceUsageCsv)\n */\n getUsageCsv(invoiceId: string, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}/usage-detail`, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/ListInvoices (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices` (ListInvoices)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListInvoicesParams, options?: RequestOptions): PagePromise<T.Invoice, T.InvoiceList> {\n return this.core.page<T.Invoice, T.InvoiceList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/invoices`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/ListInvoiceLines (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices/{invoice_id}/lines` (ListInvoiceLines)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listLines(invoiceId: string, params?: T.ListInvoiceLinesParams, options?: RequestOptions): PagePromise<T.Line, T.LineList> {\n return this.core.page<T.Line, T.LineList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}/lines`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/MarkInvoiceUncollectible (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/mark-uncollectible` (MarkInvoiceUncollectible)\n */\n markUncollectible(invoiceId: string, body?: T.MarkInvoiceUncollectibleRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/mark-uncollectible`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/PayInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/pay` (PayInvoice)\n */\n pay(invoiceId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/pay`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/RecomputeInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/recompute` (RecomputeInvoice)\n */\n recompute(invoiceId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/recompute`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/SendInvoice (37-invoicing.md, API Surface; Emails). Sends the\n * invoice issued email again, with its PDF, to the Customer's email as it is now, whatever the emails\n * toggles say. A draft, held or void invoice is invoice_not_open (billing-svc docs/questions.md,\n * X163). X-Idempotency-Key is passed through. The body takes no field.\n *\n * `POST /v1/billing/invoices/{invoice_id}/send` (SendInvoice)\n */\n send(invoiceId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/send`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/UpdateInvoice (37-invoicing.md, API Surface).\n *\n * `PATCH /v1/billing/invoices/{invoice_id}` (UpdateInvoice)\n */\n update(invoiceId: string, body?: T.UpdateInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/invoices/${e(invoiceId)}`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/VoidInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/void` (VoidInvoice)\n */\n void(invoiceId: string, body?: T.VoidInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.ledger` operations.\n */\nexport class BillingLedger {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.ledger.v1.LedgerService/CreateLedgerAdjustment (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/ledger-adjustments` (CreateLedgerAdjustment)\n */\n createAdjustment(customerId: string, body?: T.CreateLedgerAdjustmentRequest, options?: RequestOptions): APIPromise<T.LedgerEntry> {\n return this.core.request<T.LedgerEntry>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/ledger-adjustments`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/CreateTopUp (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/top-ups` (CreateTopUp)\n */\n createTopUp(customerId: string, body?: T.CreateTopUpRequest, options?: RequestOptions): APIPromise<T.CreateTopUpResponse> {\n return this.core.request<T.CreateTopUpResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/top-ups`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/GetWallet (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/customers/{customer_id}/wallets/{unit}` (GetWallet)\n */\n getWallet(customerId: string, unit: string, options?: RequestOptions): APIPromise<T.Wallet> {\n return this.core.request<T.Wallet>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/wallets/${e(unit)}` }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/ListBalances (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/customers/{customer_id}/balances` (ListBalances)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listBalances(customerId: string, params?: T.ListBalancesParams, options?: RequestOptions): PagePromise<T.Balance, T.BalanceList> {\n return this.core.page<T.Balance, T.BalanceList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/balances`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/ListLedgerEntries (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/ledger-entries` (ListLedgerEntries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEntries(params?: T.ListLedgerEntriesParams, options?: RequestOptions): PagePromise<T.LedgerEntry, T.LedgerEntryCursorList> {\n return this.core.page<T.LedgerEntry, T.LedgerEntryCursorList>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/billing/ledger-entries`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/RefundAccountCredit (36-credits-ledger.md, API Surface; Account\n * credit; 38-payments-and-tax.md, Refunds). Pays refundable account credit back to the provider\n * payment it came from, never more than what is left of that payment, as refunds with reason\n * account_credit_refund and no credit note (billing-svc docs/questions.md, P96). Credit added by hand,\n * an invoice's surplus or an external overpayment can only be spent. More than the balance is\n * balance_would_be_negative; more than the refundable part (the balances read's refundable) is\n * refund_exceeds_payment.\n *\n * `POST /v1/billing/customers/{customer_id}/account-credit/refund` (RefundAccountCredit)\n */\n refundAccountCredit(customerId: string, body?: T.RefundAccountCreditRequest, options?: RequestOptions): APIPromise<T.LedgerEntry> {\n return this.core.request<T.LedgerEntry>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/account-credit/refund`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/UpdateWalletSettings (36-credits-ledger.md, API Surface).\n *\n * `PUT /v1/billing/customers/{customer_id}/wallets/{unit}` (ReplaceWalletSettings)\n */\n replaceWalletSettings(customerId: string, unit: string, body?: T.UpdateWalletSettingsRequest, options?: RequestOptions): APIPromise<T.WalletSettings> {\n return this.core.request<T.WalletSettings>({ host: \"api\", method: \"PUT\", path: `/v1/billing/customers/${e(customerId)}/wallets/${e(unit)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.meters` operations.\n */\nexport class BillingMeters {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.metering.v1.MeterService/ArchiveMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters/{meter}/archive` (ArchiveMeter)\n */\n archive(meter: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters/${e(meter)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/CreateMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters` (CreateMeter)\n */\n create(body?: T.CreateMeterRequest, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/GetMeter (33-metering.md, API Surface).\n *\n * `GET /v1/billing/meters/{meter}` (GetMeter)\n */\n get(meter: string, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"GET\", path: `/v1/billing/meters/${e(meter)}` }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/ListMeters (33-metering.md, API Surface).\n *\n * `GET /v1/billing/meters` (ListMeters)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListMetersParams, options?: RequestOptions): PagePromise<T.Meter, T.MeterList> {\n return this.core.page<T.Meter, T.MeterList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/meters`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/PreviewMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters/preview` (PreviewMeter)\n */\n preview(body?: T.PreviewMeterRequest, options?: RequestOptions): APIPromise<T.MeterPreview> {\n return this.core.request<T.MeterPreview>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/ReplaceMeterDefinition (33-metering.md, API Surface).\n *\n * `PUT /v1/billing/meters/{meter}/definition` (ReplaceMeterDefinition)\n */\n replaceDefinition(meter: string, body?: T.ReplaceMeterDefinitionRequest, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"PUT\", path: `/v1/billing/meters/${e(meter)}/definition`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/UnarchiveMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters/{meter}/unarchive` (UnarchiveMeter)\n */\n unarchive(meter: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters/${e(meter)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/UpdateMeter (33-metering.md, API Surface).\n *\n * `PATCH /v1/billing/meters/{meter}` (UpdateMeter)\n */\n update(meter: string, body?: T.UpdateMeterRequest, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/meters/${e(meter)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.packages` operations.\n */\nexport class BillingPackages {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.PackageService/ArchivePackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/archive` (ArchivePackage)\n */\n archive(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/CreatePackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages` (CreatePackage)\n */\n create(body?: T.CreatePackageRequest, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/DiscardPackageDraft (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/discard-draft` (DiscardPackageDraft)\n */\n discardDraft(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/discard-draft`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/GetPackage (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/packages/{package}` (GetPackage)\n */\n get(package_: string, params?: T.GetPackageParams, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"GET\", path: `/v1/billing/packages/${e(package_)}`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/ListPackages (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/packages` (ListPackages)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPackagesParams, options?: RequestOptions): PagePromise<T.Package, T.PackageList> {\n return this.core.page<T.Package, T.PackageList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/packages`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/ListPackageVersions (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/packages/{package}/versions` (ListPackageVersions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listVersions(package_: string, params?: T.ListPackageVersionsParams, options?: RequestOptions): PagePromise<T.Package, T.PackageList> {\n return this.core.page<T.Package, T.PackageList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/packages/${e(package_)}/versions`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/PublishPackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/publish` (PublishPackage)\n */\n publish(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/publish`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/UnarchivePackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/unarchive` (UnarchivePackage)\n */\n unarchive(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/UpdatePackage (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/packages/{package}` (UpdatePackage)\n */\n update(package_: string, body?: T.UpdatePackageRequest, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/packages/${e(package_)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.paymentConnections` operations.\n */\nexport class BillingPaymentConnections {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentConnectionService/CreatePaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections).\n *\n * `POST /v1/billing/payment-connections` (CreatePaymentConnection)\n */\n create(body?: T.CreatePaymentConnectionRequest, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"POST\", path: `/v1/billing/payment-connections`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/GetPaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections). tax is the connected account's Stripe Tax read, read-only and null\n * until read: { status, head_office, registrations: [{ country, state, type }], warnings: [{ code,\n * message, country, tax_id_type }] } (38-payments-and-tax.md, The seller's tax identity; billing-svc\n * docs/questions.md, P104).\n *\n * `GET /v1/billing/payment-connections/{payment_connection_id}` (GetPaymentConnection)\n */\n get(paymentConnectionId: string, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"GET\", path: `/v1/billing/payment-connections/${e(paymentConnectionId)}` }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/ListPaymentConnections (32-billing-overview.md, API\n * Surface, Payment connections).\n *\n * `GET /v1/billing/payment-connections` (ListPaymentConnections)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPaymentConnectionsParams, options?: RequestOptions): PagePromise<T.PaymentConnection, T.PaymentConnectionList> {\n return this.core.page<T.PaymentConnection, T.PaymentConnectionList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/payment-connections`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/RefreshPaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections). tax is the connected account's Stripe Tax read, read-only and null\n * until read: { status, head_office, registrations: [{ country, state, type }], warnings: [{ code,\n * message, country, tax_id_type }] } (38-payments-and-tax.md, The seller's tax identity; billing-svc\n * docs/questions.md, P104).\n *\n * `POST /v1/billing/payment-connections/{payment_connection_id}/refresh` (RefreshPaymentConnection)\n */\n refresh(paymentConnectionId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"POST\", path: `/v1/billing/payment-connections/${e(paymentConnectionId)}/refresh`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/RevokePaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections). Revokes Pontive's access on the provider; the connection stays,\n * revoked, with revoked_at (api-route-review D8, D58).\n *\n * `POST /v1/billing/payment-connections/{payment_connection_id}/revoke` (RevokePaymentConnection)\n */\n revoke(paymentConnectionId: string, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"POST\", path: `/v1/billing/payment-connections/${e(paymentConnectionId)}/revoke`, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.paymentMethods` operations.\n */\nexport class BillingPaymentMethods {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentMethodService/CreatePaymentMethodSession (32-billing-overview.md, API\n * Surface, Customers; 38-payments-and-tax.md, API Surface, Payment methods).\n *\n * `POST /v1/billing/customers/{customer_id}/payment-method-session` (CreatePaymentMethodSession)\n */\n createSession(customerId: string, body?: T.CreatePaymentMethodSessionRequest, options?: RequestOptions): APIPromise<T.PaymentMethodSession> {\n return this.core.request<T.PaymentMethodSession>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/payment-method-session`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentMethodService/DetachPaymentMethod (38-payments-and-tax.md, API Surface,\n * Payment methods). A warning payment_method_required comes back when it was the last reusable method\n * (38-payments-and-tax.md, Payment methods, Removal).\n *\n * `DELETE /v1/billing/customers/{customer_id}/payment-methods/{payment_method_id}`\n * (DeleteCustomerPaymentMethod)\n */\n delete(customerId: string, paymentMethodId: string, options?: RequestOptions): APIPromise<T.DetachPaymentMethodResponse> {\n return this.core.request<T.DetachPaymentMethodResponse>({ host: \"api\", method: \"DELETE\", path: `/v1/billing/customers/${e(customerId)}/payment-methods/${e(paymentMethodId)}`, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentMethodService/ListPaymentMethods (38-payments-and-tax.md, API Surface,\n * Payment methods).\n *\n * `GET /v1/billing/customers/{customer_id}/payment-methods` (ListPaymentMethods)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(customerId: string, params?: T.ListPaymentMethodsParams, options?: RequestOptions): PagePromise<T.PaymentMethod, T.PaymentMethodList> {\n return this.core.page<T.PaymentMethod, T.PaymentMethodList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/payment-methods`, query: params }, options);\n }\n}\n\n/**\n * The `billing.payments` operations.\n */\nexport class BillingPayments {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentService/RecordExternalPayment (38-payments-and-tax.md, API Surface,\n * Payments; External payments). Records money received outside the provider as a succeeded payment\n * with external set. Partial amounts are allowed; more than is owed is external_payment_exceeds_due\n * unless allow_overpayment, which sends the excess to account credit. paid_at may not be in the\n * future.\n *\n * `POST /v1/billing/payments` (CreatePayment)\n */\n create(body?: T.RecordExternalPaymentRequest, options?: RequestOptions): APIPromise<T.Payment> {\n return this.core.request<T.Payment>({ host: \"api\", method: \"POST\", path: `/v1/billing/payments`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentService/GetPayment (38-payments-and-tax.md, API Surface, Payments).\n *\n * `GET /v1/billing/payments/{payment_id}` (GetPayment)\n */\n get(paymentId: string, options?: RequestOptions): APIPromise<T.Payment> {\n return this.core.request<T.Payment>({ host: \"api\", method: \"GET\", path: `/v1/billing/payments/${e(paymentId)}` }, options);\n }\n\n /**\n * billing.payment.v1.PaymentService/ListPayments (38-payments-and-tax.md, API Surface, Payments).\n *\n * `GET /v1/billing/payments` (ListPayments)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPaymentsParams, options?: RequestOptions): PagePromise<T.Payment, T.PaymentList> {\n return this.core.page<T.Payment, T.PaymentList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/payments`, query: params }, options);\n }\n}\n\n/**\n * The `billing.pricingUnits` operations.\n */\nexport class BillingPricingUnits {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.PricingUnitService/ArchivePricingUnit (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/pricing-units/{pricing_unit}/archive` (ArchivePricingUnit)\n */\n archive(pricingUnit: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"POST\", path: `/v1/billing/pricing-units/${e(pricingUnit)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/CreatePricingUnit (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/pricing-units` (CreatePricingUnit)\n */\n create(body?: T.CreatePricingUnitRequest, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"POST\", path: `/v1/billing/pricing-units`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/GetPricingUnit (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/pricing-units/{pricing_unit}` (GetPricingUnit)\n */\n get(pricingUnit: string, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"GET\", path: `/v1/billing/pricing-units/${e(pricingUnit)}` }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/ListPricingUnits (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/pricing-units` (ListPricingUnits)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPricingUnitsParams, options?: RequestOptions): PagePromise<T.PricingUnit, T.PricingUnitList> {\n return this.core.page<T.PricingUnit, T.PricingUnitList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/pricing-units`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/UpdatePricingUnit (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/pricing-units/{pricing_unit}` (UpdatePricingUnit)\n */\n update(pricingUnit: string, body?: T.UpdatePricingUnitRequest, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/pricing-units/${e(pricingUnit)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.products` operations.\n */\nexport class BillingProducts {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.ProductService/ArchiveProduct (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/products/{product}/archive` (ArchiveProduct)\n */\n archive(product: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"POST\", path: `/v1/billing/products/${e(product)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/CreateProduct (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/products` (CreateProduct)\n */\n create(body?: T.CreateProductRequest, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"POST\", path: `/v1/billing/products`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/GetProduct (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/products/{product}` (GetProduct)\n */\n get(product: string, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"GET\", path: `/v1/billing/products/${e(product)}` }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/ListProducts (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/products` (ListProducts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListProductsParams, options?: RequestOptions): PagePromise<T.Product, T.ProductList> {\n return this.core.page<T.Product, T.ProductList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/products`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/UnarchiveProduct (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/products/{product}/unarchive` (UnarchiveProduct)\n */\n unarchive(product: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"POST\", path: `/v1/billing/products/${e(product)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/UpdateProduct (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/products/{product}` (UpdateProduct)\n */\n update(product: string, body?: T.UpdateProductRequest, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/products/${e(product)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.rateCards` operations.\n */\nexport class BillingRateCards {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.RateCardService/ArchiveRateCard (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/rate-cards/{rate_card}/archive` (ArchiveRateCard)\n */\n archive(rateCard: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/CreateRateCard (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/rate-cards` (CreateRateCard)\n */\n create(body?: T.CreateRateCardRequest, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/CreateRates (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/rate-cards/{rate_card}/rates` (CreateRates)\n */\n createRates(rateCard: string, body?: T.CreateRatesRequest, options?: RequestOptions): APIPromise<T.RateUnpagedList> {\n return this.core.request<T.RateUnpagedList>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/DeleteRate (34-billing-catalog.md, API Surface).\n *\n * `DELETE /v1/billing/rate-cards/{rate_card}/rates/{rate_id}` (DeleteRate)\n */\n deleteRate(rateCard: string, rateId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates/${e(rateId)}` }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/GetRateCard (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/rate-cards/{rate_card}` (GetRateCard)\n */\n get(rateCard: string, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"GET\", path: `/v1/billing/rate-cards/${e(rateCard)}` }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/ListRateCards (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/rate-cards` (ListRateCards)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRateCardsParams, options?: RequestOptions): PagePromise<T.RateCard, T.RateCardList> {\n return this.core.page<T.RateCard, T.RateCardList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/rate-cards`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/ReplaceConversions (34-billing-catalog.md, API Surface).\n *\n * `PUT /v1/billing/rate-cards/{rate_card}/conversions` (ReplaceConversions)\n */\n replaceConversions(rateCard: string, body?: T.ReplaceConversionsRequest, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"PUT\", path: `/v1/billing/rate-cards/${e(rateCard)}/conversions`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/GetRateCardPrice (34-billing-catalog.md, API Surface). The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/billing/rate-cards/{rate_card}/price/search` (SearchRateCardPrices)\n */\n searchPrices(rateCard: string, body?: T.GetRateCardPriceRequest, options?: RequestOptions): APIPromise<T.PriceQuote> {\n return this.core.request<T.PriceQuote>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/price/search`, body }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/ListRates (34-billing-catalog.md, API Surface). The RPC writes\n * nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/billing/rate-cards/{rate_card}/rates/search` (SearchRates)\n */\n searchRates(rateCard: string, body?: T.ListRatesRequest, params?: T.SearchRatesParams, options?: RequestOptions): APIPromise<T.RateList> {\n return this.core.request<T.RateList>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates/search`, query: params, body }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/UpdateRateCard (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/rate-cards/{rate_card}` (UpdateRateCard)\n */\n update(rateCard: string, body?: T.UpdateRateCardRequest, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/rate-cards/${e(rateCard)}`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/UpdateRate (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/rate-cards/{rate_card}/rates/{rate_id}` (UpdateRate)\n */\n updateRate(rateCard: string, rateId: string, body?: T.UpdateRateRequest, options?: RequestOptions): APIPromise<T.Rate> {\n return this.core.request<T.Rate>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates/${e(rateId)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.refunds` operations.\n */\nexport class BillingRefunds {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentService/RefundPayment (38-payments-and-tax.md, API Surface, Payments;\n * Refunds). Refunds a succeeded provider payment and creates its credit note, lines spread in\n * proportion. amount is required; reason is duplicate, fraudulent or requested_by_customer (the\n * default). The refund is answered as it stands once sent to the provider, usually pending. More than\n * is left of the payment, an external or unsucceeded payment, or a payment with an open dispute is\n * refund_exceeds_payment.\n *\n * `POST /v1/billing/refunds` (CreateRefund)\n */\n create(body?: T.RefundPaymentRequest, options?: RequestOptions): APIPromise<T.Refund> {\n return this.core.request<T.Refund>({ host: \"api\", method: \"POST\", path: `/v1/billing/refunds`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.RefundService/GetRefund (38-payments-and-tax.md, API Surface, Refunds and\n * disputes).\n *\n * `GET /v1/billing/refunds/{refund_id}` (GetRefund)\n */\n get(refundId: string, options?: RequestOptions): APIPromise<T.Refund> {\n return this.core.request<T.Refund>({ host: \"api\", method: \"GET\", path: `/v1/billing/refunds/${e(refundId)}` }, options);\n }\n\n /**\n * billing.payment.v1.RefundService/ListRefunds (38-payments-and-tax.md, API Surface, Refunds and\n * disputes). Newest first.\n *\n * `GET /v1/billing/refunds` (ListRefunds)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRefundsParams, options?: RequestOptions): PagePromise<T.Refund, T.RefundList> {\n return this.core.page<T.Refund, T.RefundList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/refunds`, query: params }, options);\n }\n}\n\n/**\n * The `billing.settings` operations.\n */\nexport class BillingSettings {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.customer.v1.BillingSettingsService/GetBillingSettings (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/settings` (GetBillingSettings)\n */\n get(options?: RequestOptions): APIPromise<T.BillingSettings> {\n return this.core.request<T.BillingSettings>({ host: \"api\", method: \"GET\", path: `/v1/billing/settings` }, options);\n }\n\n /**\n * billing.customer.v1.BillingSettingsService/UpdateBillingSettings (32-billing-overview.md, API\n * Surface; 38-payments-and-tax.md, Tax settings). A field left out keeps its value. limits is\n * read-only here: a body that sets it is refused as a field the request does not take (PATCH\n * /v1/billing/settings/limits sets it). tax.mode, tax.missing_location and tax.validate_tax_ids are\n * replaced together. tax.manual_rates replaces the whole list: a rate with an id keeps that rate, one\n * without mints a new one, null or [] clears the list, more than 200 is field_too_long; left out, the\n * rates stay as they are.\n *\n * `PATCH /v1/billing/settings` (UpdateBillingSettings)\n */\n update(body?: T.UpdateBillingSettingsRequest, params?: T.UpdateBillingSettingsParams, options?: RequestOptions): APIPromise<T.BillingSettings> {\n const { if_match } = params ?? ({} as T.UpdateBillingSettingsParams);\n return this.core.request<T.BillingSettings>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/settings`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.BillingSettingsService/UpdateBillingLimits (32-billing-overview.md, API Surface,\n * Billing settings; Billing settings, limits; billing-svc docs/questions.md, P99). Pontive's own\n * route: needs instance:manage (production_instance:manage for a production instance), as the\n * capability does, so a client's billing keys cannot change the instance's limits. Body {\n * event_types?, meters? }, each a whole number from 0 to 10,000; only the fields given change, and\n * null is refused. Refused while billing is off. A limit lowered below the current count refuses\n * nothing that exists. Answers the billing settings.\n *\n * `PATCH /v1/billing/settings/limits` (UpdateBillingLimits)\n */\n updateLimits(body?: T.UpdateBillingLimitsRequest, options?: RequestOptions): APIPromise<T.BillingSettings> {\n return this.core.request<T.BillingSettings>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/settings/limits`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.tax` operations.\n */\nexport class BillingTax {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.TaxService/PreviewTax (38-payments-and-tax.md, API Surface, Tax). Calculated tax,\n * without recording: the calculation finalization uses. Give customer or address, not both; currency\n * is required with an address. The RPC writes nothing and takes no idempotency key, so\n * X-Idempotency-Key is not read. No location under missing_location hold is\n * customer_location_required.\n *\n * `POST /v1/billing/tax/preview` (PreviewTax)\n */\n preview(body?: T.PreviewTaxRequest, options?: RequestOptions): APIPromise<T.TaxPreview> {\n return this.core.request<T.TaxPreview>({ host: \"api\", method: \"POST\", path: `/v1/billing/tax/preview`, body }, options);\n }\n}\n\n/**\n * The `billing.timeMachines` operations.\n */\nexport class BillingTimeMachines {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.timemachine.v1.TimeMachineService/AdvanceTimeMachine (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/time-machines/{time_machine_id}/advance` (AdvanceTimeMachine)\n */\n advance(timeMachineId: string, body?: T.AdvanceTimeMachineRequest, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines/${e(timeMachineId)}/advance`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/CreateTimeMachine (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/time-machines` (CreateTimeMachine)\n */\n create(body?: T.CreateTimeMachineRequest, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/AddTimeMachineCustomer (32-billing-overview.md, API\n * Surface).\n *\n * `POST /v1/billing/time-machines/{time_machine_id}/customers` (CreateTimeMachineCustomer)\n */\n createCustomer(timeMachineId: string, body?: T.AddTimeMachineCustomerRequest, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines/${e(timeMachineId)}/customers`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/EndTimeMachine (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/time-machines/{time_machine_id}/end` (EndTimeMachine)\n */\n end(timeMachineId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines/${e(timeMachineId)}/end`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/GetTimeMachine (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/time-machines/{time_machine_id}` (GetTimeMachine)\n */\n get(timeMachineId: string, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"GET\", path: `/v1/billing/time-machines/${e(timeMachineId)}` }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/ListTimeMachines (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/time-machines` (ListTimeMachines)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListTimeMachinesParams, options?: RequestOptions): PagePromise<T.TimeMachine, T.TimeMachineList> {\n return this.core.page<T.TimeMachine, T.TimeMachineList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/time-machines`, query: params }, options);\n }\n}\n\n/**\n * The `billing.usage` operations.\n */\nexport class BillingUsage {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.metering.v1.UsageService/IngestUsageEvents (33-metering.md, API Surface; Ingestion; Event\n * types and schemas). The body is a JSON array of 1 to 500 events. Only non-accepted results are\n * listed, and accepted events with schema warnings: each result carries warnings (an accepted event\n * under the event type's validation warn) and violations (one rejected with schema_mismatch under\n * reject), each { code, property, expected }.\n *\n * `POST /v1/usage/events` (CreateUsageEvents)\n */\n createEvents(body: T.SentUsageEventInput[], options?: RequestOptions): APIPromise<T.IngestResult> {\n return this.core.request<T.IngestResult>({ host: \"ingest\", method: \"POST\", path: `/v1/usage/events`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/GetUsageDiagnostics (33-metering.md, API Surface, Usage). Counts\n * per meter: missing_property, non_numeric, missing_group_keys, late_duplicates, and not_entitled, the\n * events the meter counts from Customers with no feature and no product on it at the event's time,\n * accepted and billed as any other (billing-svc docs/questions.md, P109).\n *\n * `GET /v1/billing/usage/diagnostics` (GetUsageDiagnostics)\n */\n getDiagnostics(params: T.GetUsageDiagnosticsParams, options?: RequestOptions): APIPromise<T.UsageDiagnostics> {\n return this.core.request<T.UsageDiagnostics>({ host: \"api\", method: \"GET\", path: `/v1/billing/usage/diagnostics`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/GetLateUsage (33-metering.md, API Surface).\n *\n * `GET /v1/billing/usage/late` (GetLateUsage)\n */\n getLate(params?: T.GetLateUsageParams, options?: RequestOptions): APIPromise<T.LateUsage> {\n return this.core.request<T.LateUsage>({ host: \"api\", method: \"GET\", path: `/v1/billing/usage/late`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/ListUsageEvents (33-metering.md, API Surface).\n *\n * `GET /v1/billing/usage/events` (ListUsageEvents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEvents(params?: T.ListUsageEventsParams, options?: RequestOptions): PagePromise<T.UsageEvent, T.UsageEventCursorList> {\n return this.core.page<T.UsageEvent, T.UsageEventCursorList>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/billing/usage/events`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/GetUsage (33-metering.md, API Surface). The RPC writes nothing and\n * takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/billing/usage/search` (SearchUsage)\n */\n search(body?: T.GetUsageRequest, options?: RequestOptions): APIPromise<T.UsageSeries> {\n return this.core.request<T.UsageSeries>({ host: \"api\", method: \"POST\", path: `/v1/billing/usage/search`, body }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/VoidUsageEvents (33-metering.md, API Surface).\n *\n * `POST /v1/usage/events/void` (VoidUsageEvents)\n */\n voidEvents(body?: T.VoidUsageEventsRequest, options?: RequestOptions): APIPromise<T.VoidUsageEventsResponse> {\n return this.core.request<T.VoidUsageEventsResponse>({ host: \"ingest\", method: \"POST\", path: `/v1/usage/events/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The brand: its document, blueprints, localization and widgets.\n */\nexport class Branding {\n readonly blueprints: BrandingBlueprints;\n readonly localization: BrandingLocalization;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.blueprints = new BrandingBlueprints(core);\n this.localization = new BrandingLocalization(core);\n }\n\n /**\n * Export the branding document.\n *\n * The instance's branding as one branding/v1 document (api-route-review D47): the brand's published\n * tokens and theme, the localization settings, the instance's own published widget definitions, the\n * brand's per-widget layouts, styles and copy, the custom blueprints, and the files the brand\n * uploaded, inlined so the document works in another instance. Only the published state is exported;\n * drafts stay in the dashboard. Everything is named by a key, never an id, and the output is\n * deterministic: two exports of the same state are byte-identical, and the ETag is the hash of the\n * bytes. Send it as If-None-Match to get 304 when nothing changed. Import the document into another\n * instance with POST /v1/branding/document/import. Needs sys:brand:read and sys:widget:read.\n *\n * `GET /v1/branding/document` (GetBrandingDocument)\n */\n getDocument(options?: RequestOptions): APIPromise<T.BrandingDocument> {\n return this.core.request<T.BrandingDocument>({ host: \"api\", method: \"GET\", path: `/v1/branding/document` }, options);\n }\n\n /**\n * Get the pontkit release.\n *\n * The exact @pontive/pontkit-core release this instance loads: the deployment's, or the instance's\n * operator-set override. This is the ONLY source clients use to decide which CDN bundle to load —\n * resolving a version client-side would let a preview show a build production does not serve.\n * Short-lived cache: a promotion takes effect without a deploy.\n *\n * `GET /v1/branding/pontkit` (GetPontkit)\n */\n getPontkit(options?: RequestOptions): APIPromise<T.PontkitReleaseResponse> {\n return this.core.request<T.PontkitReleaseResponse>({ host: \"api\", method: \"GET\", path: `/v1/branding/pontkit` }, options);\n }\n\n /**\n * Import a branding document.\n *\n * Plans importing a branding/v1 document into this instance and, with dry_run false, applies the plan\n * (api-route-review D47). The brand is replaced: its tokens, theme, localization settings and every\n * per-widget customization take the document's values, and a customization the instance has and the\n * document lacks is reset and listed as changed. Widget definitions and blueprints are merged by key:\n * a new key is created, a differing one replaced (a published definition's markup never changes, so a\n * different one is a conflict), and one the document lacks is listed as absent and left alone. Nothing\n * is deleted. With publish true (the default) the import publishes one new branding version and the\n * theme; with publish false it writes drafts for review in the dashboard. Re-importing an instance's\n * own export plans every entry unchanged and writes nothing. The dry run's ETag fingerprints the\n * instance's branding: send it as If-Match on the apply to be refused 412 precondition_failed if\n * anything changed since. An apply with conflicts is 409 import_conflict, one detail per conflict,\n * field <kind>.<key>.<field>, and applies nothing. A document the format refuses (not JSON, a member\n * it does not define, a pontive_document it does not read) is 422 field_invalid_format; one over 5 MB\n * is 422 field_too_long. X-Idempotency-Key makes an apply safe to retry; the same key with another\n * request is 422 idempotency_key_reused. Needs sys:brand:manage and sys:widget:manage, and\n * sys:settings:manage when the localization settings change.\n *\n * `POST /v1/branding/document/import` (ImportBrandingDocument)\n */\n importDocument(body: T.ImportBrandingRequest, params?: T.ImportBrandingDocumentParams, options?: RequestOptions): APIPromise<T.BrandingImportPlan> {\n const { if_match } = params ?? ({} as T.ImportBrandingDocumentParams);\n return this.core.request<T.BrandingImportPlan>({ host: \"api\", method: \"POST\", path: `/v1/branding/document/import`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `branding.blueprints` operations.\n */\nexport class BrandingBlueprints {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delete blueprint.\n *\n * Delete a custom blueprint. Built-in blueprints cannot be deleted. Widgets already instantiated from\n * it are unaffected — they belong to their flows. Returns 204 No Content on success.\n *\n * `DELETE /v1/branding/blueprints/{blueprint_id}` (DeleteBlueprint)\n */\n delete(blueprintId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/branding/blueprints/${e(blueprintId)}` }, options);\n }\n}\n\n/**\n * The `branding.localization` operations.\n */\nexport class BrandingLocalization {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get localization settings.\n *\n * Returns the instance's locale configuration. An instance that has never configured localization gets\n * defaults rather than a 404. `enabled_locales` is what the OIDC discovery document advertises as\n * `ui_locales_supported`.\n *\n * `GET /v1/branding/localization` (GetLocalizationSettings)\n */\n get(options?: RequestOptions): APIPromise<T.LocalizationSettings> {\n return this.core.request<T.LocalizationSettings>({ host: \"api\", method: \"GET\", path: `/v1/branding/localization` }, options);\n }\n\n /**\n * Update localization settings.\n *\n * Partial update of the instance's locale configuration. Omitted fields are unchanged. The default\n * locale is implicitly enabled and is never stored in `enabled_locales`.\n *\n * `PATCH /v1/branding/localization` (UpdateLocalizationSettings)\n */\n update(body: T.UpdateLocalizationSettingsRequest, params?: T.UpdateLocalizationSettingsParams, options?: RequestOptions): APIPromise<T.LocalizationSettings> {\n const { if_match } = params ?? ({} as T.UpdateLocalizationSettingsParams);\n return this.core.request<T.LocalizationSettings>({ host: \"api\", method: \"PATCH\", path: `/v1/branding/localization`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * The instance's optional capabilities.\n */\nexport class Capabilities {\n readonly billing: CapabilitiesBilling;\n readonly fga: CapabilitiesFga;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.billing = new CapabilitiesBilling(core);\n this.fga = new CapabilitiesFga(core);\n }\n}\n\n/**\n * The `capabilities.billing` operations.\n */\nexport class CapabilitiesBilling {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.customer.v1.CapabilityService/DisableBillingCapability (32-billing-overview.md, API Surface,\n * Capability, Enabling and disabling the capability). Needs instance:manage. Refused with\n * capability_in_use while contracts, unsettled invoices or prepaid balances remain.\n *\n * `POST /v1/capabilities/billing/disable` (DisableBillingCapability)\n */\n disable(options?: RequestOptions): APIPromise<T.DisableBillingCapabilityResponse> {\n return this.core.request<T.DisableBillingCapabilityResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/billing/disable`, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CapabilityService/EnableBillingCapability (32-billing-overview.md, API Surface,\n * Capability; 02b-instance-management.md, Capability toggle). Needs instance:manage. Answers the\n * instance's capabilities after the change.\n *\n * `POST /v1/capabilities/billing/enable` (EnableBillingCapability)\n */\n enable(options?: RequestOptions): APIPromise<T.EnableBillingCapabilityResponse> {\n return this.core.request<T.EnableBillingCapabilityResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/billing/enable`, idempotent: true }, options);\n }\n}\n\n/**\n * The `capabilities.fga` operations.\n */\nexport class CapabilitiesFga {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Turn off Fine-Grained Authorization.\n *\n * Turn off the instance's Fine-Grained Authorization capability. Refused with capability_in_use (409)\n * while the instance has custom resource types.\n *\n * `POST /v1/capabilities/fga/disable` (DisableFGA)\n */\n disable(options?: RequestOptions): APIPromise<T.CapabilitiesResponse> {\n return this.core.request<T.CapabilitiesResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/fga/disable` }, options);\n }\n\n /**\n * Turn on Fine-Grained Authorization.\n *\n * Turn on the instance's Fine-Grained Authorization capability: custom resource types and everything\n * built on them. Needs a Pontive user who may manage the instance.\n *\n * `POST /v1/capabilities/fga/enable` (EnableFGA)\n */\n enable(options?: RequestOptions): APIPromise<T.CapabilitiesResponse> {\n return this.core.request<T.CapabilitiesResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/fga/enable` }, options);\n }\n}\n\n/**\n * Reference data.\n */\nexport class Countries {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * List countries.\n *\n * Every country Pontive accepts, for pickers: the ISO 3166-1 assigned codes and XK, each with its\n * English name and its E.164 calling code (digits only, \"49\"; empty for the seven uninhabited\n * territories that have none), sorted by name. Platform reference data from pontive-core's country\n * package, the same list every service validates against (billing-svc docs/questions.md, P101).\n * Static: cache it.\n *\n * `GET /v1/countries` (ListCountries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCountriesParams, options?: RequestOptions): PagePromise<T.Country, T.CountryList> {\n return this.core.page<T.Country, T.CountryList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/countries`, query: params }, options);\n }\n}\n\n/**\n * What agents may do for users.\n */\nexport class Delegations {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delegate to an agent.\n *\n * Authorize an agent to act for a user (pontive-spec 20 C4): in one organization, where both the user\n * is a member and the agent is installed, or with no organization_id at the instance root, which needs\n * a root installation. Creating a grant the (user, agent, organization) already has replaces its\n * scopes and expiry. The agent then exchanges the user's token, or this grant, for a token acting for\n * the user — allowed only what the user and the agent both are. Needs sys:delegation:manage on the\n * instance root. A token acting for its subject is refused (actor_refused): a delegation is an\n * authority grant, the user's own to give.\n *\n * `POST /v1/delegations` (CreateDelegation)\n */\n create(body: T.CreateDelegationRequest, options?: RequestOptions): APIPromise<T.Delegation> {\n return this.core.request<T.Delegation>({ host: \"api\", method: \"POST\", path: `/v1/delegations`, body }, options);\n }\n\n /**\n * Revoke a delegation.\n *\n * Delete a delegation grant: the agent's next exchange on it is refused, and a token it already\n * exchanged stops being answered on Pontive's checks and listings at once. Needs sys:delegation:manage\n * on the instance root.\n *\n * `DELETE /v1/delegations/{delegation_id}` (DeleteDelegation)\n */\n delete(delegationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * Get a delegation.\n *\n * One delegation grant. Needs sys:delegation:read on the instance root.\n *\n * `GET /v1/delegations/{delegation_id}` (GetDelegation)\n */\n get(delegationId: string, options?: RequestOptions): APIPromise<T.Delegation> {\n return this.core.request<T.Delegation>({ host: \"api\", method: \"GET\", path: `/v1/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * List delegations.\n *\n * Delegation grants, filtered by user, agent and organization (D23), each with its organization,\n * scopes and expiry. Needs sys:delegation:read on the instance root.\n *\n * `GET /v1/delegations` (ListDelegations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListDelegationsParams, options?: RequestOptions): PagePromise<T.Delegation, T.ListDelegationsResponse> {\n return this.core.page<T.Delegation, T.ListDelegationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/delegations`, query: params }, options);\n }\n}\n\n/**\n * Groups and the roles they grant.\n */\nexport class Groups {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create a group.\n *\n * Create a group, owned by the instance root, an organization or a resource (D5, D6, D44): owner_type\n * is root (the default), org or the owning resource's type key, owner_id its prefixed id (org_, res_;\n * for root the inst_ id or empty). An instance group (root) holds any of the instance's users and is\n * granted roles only on the instance root and resources in no organization; an organization's is a set\n * of its members granted on the organization or its resources; a resource's holds its organization's\n * members and is granted only on the resource and the resources beneath it.\n *\n * `POST /v1/groups` (CreateGroup)\n */\n create(body: T.CreateOwnedGroupRequest, options?: RequestOptions): APIPromise<T.Group> {\n return this.core.request<T.Group>({ host: \"api\", method: \"POST\", path: `/v1/groups`, body }, options);\n }\n\n /**\n * Add members to a group.\n *\n * Add users to a group. Each must be a member of the group's organization (user_not_in_organization);\n * one already in the group is left as they are.\n *\n * `POST /v1/groups/{group_id}/members` (CreateGroupMembers)\n */\n createMembers(groupId: string, body: T.AddGroupMembersRequest, options?: RequestOptions): APIPromise<T.AddGroupMembersResponse> {\n return this.core.request<T.AddGroupMembersResponse>({ host: \"api\", method: \"POST\", path: `/v1/groups/${e(groupId)}/members`, body }, options);\n }\n\n /**\n * Delete a group.\n *\n * Delete a group with its members and grants. Its members lose what the group gave them.\n *\n * `DELETE /v1/groups/{group_id}` (DeleteGroup)\n */\n delete(groupId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/groups/${e(groupId)}` }, options);\n }\n\n /**\n * Remove a member from a group.\n *\n * `DELETE /v1/groups/{group_id}/members/{user_id}` (DeleteGroupMember)\n */\n deleteMember(groupId: string, userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/groups/${e(groupId)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Get a group.\n *\n * `GET /v1/groups/{group_id}` (GetGroup)\n */\n get(groupId: string, options?: RequestOptions): APIPromise<T.Group> {\n return this.core.request<T.Group>({ host: \"api\", method: \"GET\", path: `/v1/groups/${e(groupId)}` }, options);\n }\n\n /**\n * List groups.\n *\n * List the instance's groups, filtered by owner (D6, D15, D44): owner_type root lists the instance's\n * own groups, org the organizations', a resource type key that type's resources'; owner_id narrows to\n * one owner's. Neither lists every group.\n *\n * `GET /v1/groups` (ListGroups)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListGroupsParams, options?: RequestOptions): PagePromise<T.Group, T.ListGroupsResponse> {\n return this.core.page<T.Group, T.ListGroupsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/groups`, query: params }, options);\n }\n\n /**\n * List a group's roles.\n *\n * List the roles a group holds, per resource.\n *\n * `GET /v1/groups/{group_id}/roles` (ListGroupGrants)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGrants(groupId: string, params?: T.ListGroupGrantsParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/groups/${e(groupId)}/roles`, query: params }, options);\n }\n\n /**\n * List a group's members.\n *\n * `GET /v1/groups/{group_id}/members` (ListGroupMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(groupId: string, params?: T.ListGroupMembersParams, options?: RequestOptions): PagePromise<T.GroupMember, T.ListGroupMembersResponse> {\n return this.core.page<T.GroupMember, T.ListGroupMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/groups/${e(groupId)}/members`, query: params }, options);\n }\n\n /**\n * Set a group's roles on a resource.\n *\n * Replace the roles a group holds on one resource — its organization, or a resource of it\n * (resource_not_in_organization) — with roles of that resource's type. No roles removes the grant.\n *\n * `PUT /v1/groups/{group_id}/roles` (ReplaceGroupRoles)\n */\n replaceRoles(groupId: string, body: T.SetGroupRolesRequest, options?: RequestOptions): APIPromise<T.GroupGrant> {\n return this.core.request<T.GroupGrant>({ host: \"api\", method: \"PUT\", path: `/v1/groups/${e(groupId)}/roles`, body }, options);\n }\n\n /**\n * Update a group.\n *\n * `PATCH /v1/groups/{group_id}` (UpdateGroup)\n */\n update(groupId: string, body: T.UpdateGroupRequest, options?: RequestOptions): APIPromise<T.Group> {\n return this.core.request<T.Group>({ host: \"api\", method: \"PATCH\", path: `/v1/groups/${e(groupId)}`, body }, options);\n }\n}\n\n/**\n * Audit and request logs.\n */\nexport class Logs {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get an audit log entry.\n *\n * One audit_log_entry (pontive-spec 43 §4.1).\n *\n * `GET /v1/logs/audit/{audit_log_entry_id}` (GetAuditLog)\n */\n getAuditLog(auditLogEntryId: string, options?: RequestOptions): APIPromise<T.AuditLogEntryDoc> {\n return this.core.request<T.AuditLogEntryDoc>({ host: \"api\", method: \"GET\", path: `/v1/logs/audit/${e(auditLogEntryId)}` }, options);\n }\n\n /**\n * Get a request log entry.\n *\n * One request_log_entry (pontive-spec 43 §4.6), by the request id returned in X-Request-ID.\n *\n * `GET /v1/logs/requests/{request_id}` (GetRequestLog)\n */\n getRequestLog(requestId: string, options?: RequestOptions): APIPromise<T.RequestLogEntryDoc> {\n return this.core.request<T.RequestLogEntryDoc>({ host: \"api\", method: \"GET\", path: `/v1/logs/requests/${e(requestId)}` }, options);\n }\n\n /**\n * List audit log entries.\n *\n * The instance's audit log, newest first. Pass next_cursor as before to page back, or as after to poll\n * for what committed since, oldest first. Needs sys:audit:read on the instance, or on the organization\n * named by organization_id.\n *\n * `GET /v1/logs/audit` (ListAuditLogs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAuditLogs(params?: T.ListAuditLogsParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/logs/audit`, query: params }, options);\n }\n\n /**\n * List request log entries.\n *\n * Every management-API call made against the instance, reads included, newest first. Needs\n * sys:audit:read on the instance.\n *\n * `GET /v1/logs/requests` (ListRequestLogs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listRequestLogs(params?: T.ListRequestLogsParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/logs/requests`, query: params }, options);\n }\n}\n\n/**\n * The signed-in user's own surface. Needs a user's me token, not a secret key.\n */\nexport class Me {\n readonly billing: MeBilling;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.billing = new MeBilling(core);\n }\n\n /**\n * Delete current user.\n *\n * Delete the currently authenticated user An instance user's token must be issued for the instance's\n * me audience, https://{auth domain}/me/, with pontive:me:manage; the app's own access token is\n * refused 403 (D48).\n *\n * `DELETE /v1/me` (DeleteCurrentUser)\n */\n delete(options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"auth\", method: \"DELETE\", path: `/v1/me` }, options);\n }\n\n /**\n * Revoke my delegation.\n *\n * The signed-in user revokes one of their own delegation grants (D31): the agent's next exchange on it\n * is refused, and a token it already exchanged stops being answered on Pontive's checks and listings\n * at once. Another user's grant is 404, the same as none. A token acting for the user (an agent's) is\n * refused (actor_refused): a delegation is the user's own to take back. An instance user's token must\n * be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the\n * app's own access token is refused 403 (D48).\n *\n * `DELETE /v1/me/delegations/{delegation_id}` (DeleteMyDelegation)\n */\n deleteDelegation(delegationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"auth\", method: \"DELETE\", path: `/v1/me/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * Get current user.\n *\n * Get the currently authenticated user's profile An instance user's token must be issued for the\n * instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's own access token\n * is refused 403 (D48).\n *\n * `GET /v1/me` (GetCurrentUser)\n */\n get(options?: RequestOptions): APIPromise<T.CurrentUser> {\n return this.core.request<T.CurrentUser>({ host: \"auth\", method: \"GET\", path: `/v1/me` }, options);\n }\n\n /**\n * Leave a membership.\n *\n * Remove the current (authenticated) user's own membership of a container (api-route-review D38): the\n * prefixed id names it — an organization (org_), or a resource (res_) whose type lets members leave.\n * Refused 403 leave_disabled when the organization's settings or the resource's type do not let\n * members leave. An instance user's token must be issued for the instance's me audience, https://{auth\n * domain}/me/, with pontive:me:manage; the app's own access token is refused 403 (D48).\n *\n * `POST /v1/me/memberships/{container_id}/leave` (LeaveMembership)\n */\n leaveMembership(containerId: string, options?: RequestOptions): APIPromise<Record<string, unknown>> {\n return this.core.request<Record<string, unknown>>({ host: \"auth\", method: \"POST\", path: `/v1/me/memberships/${e(containerId)}/leave` }, options);\n }\n\n /**\n * List my delegations.\n *\n * The signed-in user's own delegation grants (D31): which agents they let act for them, in which\n * organization, with which scopes and until when. Filter by agent_id or organization_id. Needs no\n * permission: identity-svc answers a user for their own grants. An instance user's token must be\n * issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's\n * own access token is refused 403 (D48).\n *\n * `GET /v1/me/delegations` (ListMyDelegations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listDelegations(params?: T.ListMyDelegationsParams, options?: RequestOptions): PagePromise<T.Delegation, T.ListDelegationsResponse> {\n return this.core.page<T.Delegation, T.ListDelegationsResponse>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/delegations`, query: params }, options);\n }\n\n /**\n * List my memberships.\n *\n * The signed-in user's own memberships across every container kind — the instance root,\n * organizations and resources (D4, D31) — each left with POST /me/memberships/{container_id}/leave.\n * resource_type narrows them to one kind of container (root, org or a custom type key, D44). Each\n * carries its container's name and, when the caller may read the container, its external_id. An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:me:read; the app's own access token is refused 403 (D48).\n *\n * `GET /v1/me/memberships` (ListMyMemberships)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMemberships(params?: T.ListMyMembershipsParams, options?: RequestOptions): PagePromise<T.UserMembership, T.ListUserMembershipsResponse> {\n return this.core.page<T.UserMembership, T.ListUserMembershipsResponse>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/memberships`, query: params }, options);\n }\n\n /**\n * Update current user.\n *\n * Update the currently authenticated user's profile (partial update) An instance user's token must be\n * issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the app's\n * own access token is refused 403 (D48).\n *\n * `PATCH /v1/me` (UpdateCurrentUser)\n */\n update(body: T.UpdateCurrentUserRequest, options?: RequestOptions): APIPromise<T.CurrentUser> {\n return this.core.request<T.CurrentUser>({ host: \"auth\", method: \"PATCH\", path: `/v1/me`, body }, options);\n }\n}\n\n/**\n * The `me.billing` operations.\n */\nexport class MeBilling {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.contract.v1.MeContractService/CancelMyContract (35-contracts.md, End-customer portal and API\n * Surface). The body is { reason? }. An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/contracts/{contract_id}/cancel` (CancelMyContract)\n */\n cancelContract(contractId: string, body?: T.CancelMyContractRequest, params?: T.CancelMyContractParams, options?: RequestOptions): APIPromise<T.MyContract> {\n return this.core.request<T.MyContract>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/cancel`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/ChangeMyContract (35-contracts.md, End-customer portal and API\n * Surface). The body is the preview's, with its preview_hash; preview_stale when the preview changed.\n * An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/,\n * with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/contracts/{contract_id}/change-package` (ChangeMyContractPackage)\n */\n changeContractPackage(contractId: string, body?: T.ChangeMyContractRequest, params?: T.ChangeMyContractPackageParams, options?: RequestOptions): APIPromise<T.MyContract> {\n return this.core.request<T.MyContract>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/change-package`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.entitlement.v1.MeEntitlementService/CheckMyEntitlement (39-entitlements-and-controls.md, API\n * Surface). The body is { feature, quantity? }. Under pontive:billing:read\n * (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for\n * the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/me/entitlements/check` (CheckMyEntitlement)\n */\n checkEntitlement(body?: T.CheckMyEntitlementRequest, params?: T.CheckMyEntitlementParams, options?: RequestOptions): APIPromise<T.CheckMyEntitlementResponse> {\n return this.core.request<T.CheckMyEntitlementResponse>({ host: \"authz\", method: \"POST\", path: `/v1/me/entitlements/check`, query: params, body }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/ConfirmMyCheckoutSession (35-contracts.md, End-customer portal\n * and API Surface). The body is { package, billing_frequency, billing_address?, tax_id?,\n * promotion_code? }, package a pkg_ id or the package's key (api-route-review D55). The answer carries\n * a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/checkout-sessions/{checkout_session_id}/confirm` (ConfirmMyCheckoutSession)\n */\n confirmCheckoutSession(checkoutSessionId: string, body?: T.ConfirmMyCheckoutSessionRequest, params?: T.ConfirmMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.ConfirmMyCheckoutSessionResponse> {\n return this.core.request<T.ConfirmMyCheckoutSessionResponse>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/checkout-sessions/${e(checkoutSessionId)}/confirm`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/CreateMyCheckoutSession (35-contracts.md, End-customer portal\n * and API Surface). The body is { subject?, packages, success_url, cancel_url }. billing-svc checks\n * both URLs against the browser's Origin, which the gateway passes in the request context, and refuses\n * a request without one (35-contracts.md, Checkout; billing-svc docs/questions.md, P71). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/checkout-sessions` (CreateMyCheckoutSession)\n */\n createCheckoutSession(body?: T.CreateMyCheckoutSessionRequest, params?: T.CreateMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.MyCheckoutSession> {\n return this.core.request<T.MyCheckoutSession>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/checkout-sessions`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/CreateMyPaymentMethodSession (38-payments-and-tax.md, API\n * Surface). The body is { mode?, return_url? }. The answer carries a client secret: no log or span\n * holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be\n * issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31,\n * D48).\n *\n * `POST /v1/me/billing/payment-method-session` (CreateMyPaymentMethodSession)\n */\n createPaymentMethodSession(body?: T.CreateMyPaymentMethodSessionRequest, params?: T.CreateMyPaymentMethodSessionParams, options?: RequestOptions): APIPromise<T.PaymentMethodSession> {\n return this.core.request<T.PaymentMethodSession>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/payment-method-session`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/DeleteMyContractEdit (35-contracts.md, Package changes and\n * End-customer portal; billing-svc P124). Cancels the contract's pending change, a scheduled\n * downgrade, by deleting its edit: edit_id is the contract's pending_change.edit_id, and any other\n * edit is not_found. Only a change the end customer asked for, pending_change.initiated_by customer,\n * may be cancelled here; one the client made is change_not_allowed. billing.contract.edit_canceled is\n * written as for DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}. An instance user's token\n * must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay\n * (D31, D48).\n *\n * `DELETE /v1/me/billing/contracts/{contract_id}/edits/{edit_id}` (DeleteMyContractEdit)\n */\n deleteContractEdit(contractId: string, editId: string, params?: T.DeleteMyContractEditParams, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"auth\", method: \"DELETE\", path: `/v1/me/billing/contracts/${e(contractId)}/edits/${e(editId)}`, query: params, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/RemoveMyPaymentMethod (38-payments-and-tax.md, API Surface).\n * {id} is the spec's {pm}. An instance user's token must be issued for the instance's me audience,\n * https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `DELETE /v1/me/billing/payment-methods/{payment_method_id}` (DeleteMyPaymentMethod)\n */\n deletePaymentMethod(paymentMethodId: string, params?: T.DeleteMyPaymentMethodParams, options?: RequestOptions): APIPromise<T.RemoveMyPaymentMethodResponse> {\n return this.core.request<T.RemoveMyPaymentMethodResponse>({ host: \"auth\", method: \"DELETE\", path: `/v1/me/billing/payment-methods/${e(paymentMethodId)}`, query: params, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/GetMyCheckoutSession (35-contracts.md, End-customer portal and\n * API Surface). Under pontive:billing:pay, the scope the checkout element holds\n * (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for\n * the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `GET /v1/me/billing/checkout-sessions/{checkout_session_id}` (GetMyCheckoutSession)\n */\n getCheckoutSession(checkoutSessionId: string, params?: T.GetMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.MyCheckoutSession> {\n return this.core.request<T.MyCheckoutSession>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/checkout-sessions/${e(checkoutSessionId)}`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyCreditNotePdf (37-invoicing.md, API Surface). The credit\n * note's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition\n * attachment with the file name billing-svc gives. A voided credit note's is the VOID rendition.\n * Another Customer's credit note is credit_note_not_found. Needs a token for the instance's me\n * audience with pontive:billing:read.\n *\n * `GET /v1/me/billing/credit-notes/{credit_note_id}/pdf` (GetMyCreditNotePdf)\n */\n getCreditNotePdf(creditNoteId: string, params?: T.GetMyCreditNotePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/credit-notes/${e(creditNoteId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.entitlement.v1.MeEntitlementService/ListMyEntitlements (39-entitlements-and-controls.md, API\n * Surface). An instance user's token must be issued for the instance's me audience, https://{auth\n * domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/entitlements` (GetMyEntitlements)\n */\n getEntitlements(params?: T.GetMyEntitlementsParams, options?: RequestOptions): APIPromise<T.EntitlementSet> {\n return this.core.request<T.EntitlementSet>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/entitlements`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyInvoice (37-invoicing.md, API Surface). An instance user's\n * token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices/{invoice_id}` (GetMyInvoice)\n */\n getInvoice(invoiceId: string, params?: T.GetMyInvoiceParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices/${e(invoiceId)}`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyInvoicePdf (37-invoicing.md, API Surface). The invoice's\n * PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment\n * with the file name billing-svc gives. An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices/{invoice_id}/pdf` (GetMyInvoicePdf)\n */\n getInvoicePdf(invoiceId: string, params?: T.GetMyInvoicePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices/${e(invoiceId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyUpcomingInvoice (37-invoicing.md, API Surface). The\n * upcoming invoice of the contract in force; invoice_not_found when there is none. An instance user's\n * token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices/upcoming` (GetMyUpcomingInvoice)\n */\n getUpcomingInvoice(params?: T.GetMyUpcomingInvoiceParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices/upcoming`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.MeUsageService/GetMyUsage (33-metering.md, API Surface). The same parameters as\n * GET /v1/usage, for the caller's Customer. An instance user's token must be issued for the instance's\n * me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/usage` (GetMyUsage)\n */\n getUsage(params?: T.GetMyUsageParams, options?: RequestOptions): APIPromise<T.UsageSeries> {\n return this.core.request<T.UsageSeries>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/usage`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.MeLedgerService/ListMyBalances (36-credits-ledger.md, API Surface). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/balances` (ListMyBalances)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listBalances(params?: T.ListMyBalancesParams, options?: RequestOptions): PagePromise<T.Balance, T.BalanceList> {\n return this.core.page<T.Balance, T.BalanceList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/balances`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/ListMyContracts (35-contracts.md, End-customer portal and API\n * Surface). An instance user's token must be issued for the instance's me audience, https://{auth\n * domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/contracts` (ListMyContracts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listContracts(params?: T.ListMyContractsParams, options?: RequestOptions): PagePromise<T.MyContract, T.MyContractList> {\n return this.core.page<T.MyContract, T.MyContractList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/contracts`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/ListMyCreditNotes (37-invoicing.md, API Surface). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/credit-notes` (ListMyCreditNotes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listCreditNotes(params?: T.ListMyCreditNotesParams, options?: RequestOptions): PagePromise<T.CreditNote, T.CreditNoteList> {\n return this.core.page<T.CreditNote, T.CreditNoteList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/credit-notes`, query: params }, options);\n }\n\n /**\n * billing.customer.v1.MeCustomerService/ListMyCustomers (32-billing-overview.md, End-customer\n * surface). The caller's own user Customer, the token's organization's where they hold a billing key,\n * and the suspended or closed organizations they own and may recover (P79, P122), each with what the\n * caller may do there: recovery marks those, and closed marks one its client closed, where only paying\n * and the payment method are open. An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/customers` (ListMyCustomers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listCustomers(params?: T.ListMyCustomersParams, options?: RequestOptions): PagePromise<T.MyCustomer, T.MyCustomerList> {\n return this.core.page<T.MyCustomer, T.MyCustomerList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/customers`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/ListMyInvoices (37-invoicing.md, API Surface). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices` (ListMyInvoices)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInvoices(params?: T.ListMyInvoicesParams, options?: RequestOptions): PagePromise<T.Invoice, T.InvoiceList> {\n return this.core.page<T.Invoice, T.InvoiceList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.MeLedgerService/ListMyLedgerEntries (36-credits-ledger.md, API Surface). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/ledger-entries` (ListMyLedgerEntries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listLedgerEntries(params?: T.ListMyLedgerEntriesParams, options?: RequestOptions): PagePromise<T.LedgerEntry, T.LedgerEntryCursorList> {\n return this.core.page<T.LedgerEntry, T.LedgerEntryCursorList>(\"cursor\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/ledger-entries`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/ListMyPaymentMethods (38-payments-and-tax.md, API Surface). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/payment-methods` (ListMyPaymentMethods)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listPaymentMethods(params?: T.ListMyPaymentMethodsParams, options?: RequestOptions): PagePromise<T.PaymentMethod, T.PaymentMethodList> {\n return this.core.page<T.PaymentMethod, T.PaymentMethodList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/payment-methods`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/ListMyPayments (38-payments-and-tax.md, API Surface). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/payments` (ListMyPayments)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listPayments(params?: T.ListMyPaymentsParams, options?: RequestOptions): PagePromise<T.Payment, T.PaymentList> {\n return this.core.page<T.Payment, T.PaymentList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/payments`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/PayMyInvoice (38-payments-and-tax.md, API Surface). The body is\n * { method }, saved or new. The answer carries a client secret: no log or span holds the response body\n * (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/invoices/{invoice_id}/pay` (PayMyInvoice)\n */\n payInvoice(invoiceId: string, body?: T.PayMyInvoiceRequest, params?: T.PayMyInvoiceParams, options?: RequestOptions): APIPromise<T.PayMyInvoiceResponse> {\n return this.core.request<T.PayMyInvoiceResponse>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/invoices/${e(invoiceId)}/pay`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/PreviewMyCheckoutSession (35-contracts.md, End-customer portal\n * and API Surface). The body is confirm's (P65). An instance user's token must be issued for the\n * instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/me/billing/checkout-sessions/{checkout_session_id}/preview` (PreviewMyCheckoutSession)\n */\n previewCheckoutSession(checkoutSessionId: string, body?: T.PreviewMyCheckoutSessionRequest, params?: T.PreviewMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/checkout-sessions/${e(checkoutSessionId)}/preview`, query: params, body }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/PreviewMyContractChange (35-contracts.md, End-customer portal\n * and API Surface). The body is { package, billing_frequency? } or { quantity, subscription_id? }. An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:pay (D31, D48). The RPC writes nothing and takes no idempotency key, so\n * X-Idempotency-Key is not read.\n *\n * `POST /v1/me/billing/contracts/{contract_id}/change-package/preview` (PreviewMyContractChange)\n */\n previewContractChange(contractId: string, body?: T.PreviewMyContractChangeRequest, params?: T.PreviewMyContractChangeParams, options?: RequestOptions): APIPromise<T.PreviewMyContractChangeResponse> {\n return this.core.request<T.PreviewMyContractChangeResponse>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/change-package/preview`, query: params, body }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/RevokeMyContractCancellation (35-contracts.md, End-customer\n * portal and API Surface). An instance user's token must be issued for the instance's me audience,\n * https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/contracts/{contract_id}/revoke-cancellation` (RevokeMyContractCancellation)\n */\n revokeContractCancellation(contractId: string, body?: Record<string, unknown>, params?: T.RevokeMyContractCancellationParams, options?: RequestOptions): APIPromise<T.MyContract> {\n return this.core.request<T.MyContract>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/revoke-cancellation`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/SetMyDefaultPaymentMethod (38-payments-and-tax.md, API Surface;\n * api-route-review D38). The caller's Customer, or the subject's it names: default_payment_method_id,\n * one of its payment methods, becomes its default. An instance user's token must be issued for the\n * instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `PATCH /v1/me/billing/customer` (UpdateMyCustomer)\n */\n updateCustomer(body?: T.SetMyDefaultPaymentMethodRequest, params?: T.UpdateMyCustomerParams, options?: RequestOptions): APIPromise<T.PaymentMethod> {\n return this.core.request<T.PaymentMethod>({ host: \"auth\", method: \"PATCH\", path: `/v1/me/billing/customer`, query: params, body, idempotent: true }, options);\n }\n}\n\n/**\n * Organizations, their members, invitations and settings.\n */\nexport class Organizations {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Allow a third-party app in the organization again.\n *\n * Let a CIMD or DCR app act in the organization again (pontive-spec 20 G2): every block-list entry\n * naming it exactly goes, and under allowlist mode its client_id joins the allow-list. 409\n * organization_client_blocked_by_pattern while an https://host/* entry on the block-list still names\n * it: remove that entry with PUT /client-policy. Needs sys:agent:install on the organization.\n *\n * `POST /v1/organizations/{organization}/third-party-clients/{app_id}/allow`\n * (AllowOrganizationThirdPartyClient)\n */\n allowThirdPartyClient(organization: string, appId: string, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/third-party-clients/${e(appId)}/allow` }, options);\n }\n\n /**\n * Approve an agent's requested roles on the organization.\n *\n * Approve the agent's requested roles up to version, after the installation's approved_version and at\n * most the agent's; roles are the approved roles from now on — typically what it holds plus\n * pending_roles (sys:agent:install on the organization, or on the root).\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/approve`\n * (ApproveOrganizationAgentInstallation)\n */\n approveAgentInstallation(organization: string, installationId: string, body: T.ApproveInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/approve`, body }, options);\n }\n\n /**\n * Block a third-party app for the organization.\n *\n * Block a CIMD or DCR app for the organization (pontive-spec 20 G2): its client_id — a CIMD app's\n * URL, which outlives the app's cleanup, or a DCR app's id — joins the block-list and leaves the\n * allow-list. Its users are refused in the organization from their next authorization, code exchange\n * or refresh. 404 for an app that is not a third-party app. Needs sys:agent:install on the\n * organization.\n *\n * `POST /v1/organizations/{organization}/third-party-clients/{app_id}/block`\n * (BlockOrganizationThirdPartyClient)\n */\n blockThirdPartyClient(organization: string, appId: string, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/third-party-clients/${e(appId)}/block` }, options);\n }\n\n /**\n * Create organization.\n *\n * Create a new organization. Organizations are the customer-facing tenant, and flat: structure below\n * one is modelled as resources that belong to it. The slug (supplied, or generated from the name) is\n * immutable once created; one another organization in the instance holds is refused with 409\n * slug_conflict, never suffixed.\n *\n * `POST /v1/organizations` (CreateOrganization)\n */\n create(body: T.CreateOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations`, body }, options);\n }\n\n /**\n * Install an agent on the organization.\n *\n * Install an agent in the organization — on the organization itself, or on the resource resource_id\n * names, which must be the organization's (D21) — with roles approved: any of those it requests for\n * the target's type, or none (sys:agent:install on the organization, or on the root). The roles are\n * also held to what the caller could grant there. With delegated_only true, the roles act only as the\n * agent's side of a delegation: a token the agent exchanged to act for a user is allowed what both\n * hold, while the agent's own token holds none of them.\n *\n * `POST /v1/organizations/{organization}/agent-installations` (CreateOrganizationAgentInstallation)\n */\n createAgentInstallation(organization: string, body: T.InstallRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations`, body }, options);\n }\n\n /**\n * Invite members.\n *\n * Invite multiple members to an organization, or to one of its resources (resource_id with\n * resource_roles). Invitees to a resource who are not organization members join the organization too.\n * Addresses are matched case-insensitively. An address that is already a member of the target is\n * skipped and listed in skipped rather than failing the request. An address that already holds a\n * pending, unexpired invitation to the target has that invitation reissued with this request's roles,\n * a fresh expiry and a new link, instead of a second one sent. Inviting someone as the organization's\n * owner needs sys:org:transfer, refused 403 owner_transfer_required. 200 when every address was\n * skipped, 201 when any invitation was sent.\n *\n * `POST /v1/organizations/{organization}/invitations` (CreateOrganizationInvitations)\n */\n createInvitations(organization: string, body: T.InviteMembersRequest, options?: RequestOptions): APIPromise<T.InvitationResult> {\n return this.core.request<T.InvitationResult>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/invitations`, body }, options);\n }\n\n /**\n * Add member to organization.\n *\n * Add a user as a member of an organization. Adding them as owner needs sys:org:transfer, refused 403\n * owner_transfer_required. Adding one past the organization's member limit is refused 409\n * seat_limit_reached, and nothing is written.\n *\n * `POST /v1/organizations/{organization}/members` (CreateOrganizationMember)\n */\n createMember(organization: string, body: T.AddOrganizationMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/members`, body }, options);\n }\n\n /**\n * Decline an agent's requested roles on the organization.\n *\n * Mark version seen without adding its roles; the installation keeps working with the roles it has.\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/decline`\n * (DeclineOrganizationAgentInstallation)\n */\n declineAgentInstallation(organization: string, installationId: string, body: T.DeclineInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/decline`, body }, options);\n }\n\n /**\n * Delete organization.\n *\n * Permanently delete an organization together with its memberships, invitations, owned service\n * accounts, instance-scoped roles and organization-scoped credentials (revoked), and the resources\n * that belong to it. There is no restore.\n *\n * `DELETE /v1/organizations/{organization}` (DeleteOrganization)\n */\n delete(organization: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}` }, options);\n }\n\n /**\n * Uninstall an agent from the organization.\n *\n * Delete the installation. The agent's next token request for the organization is refused; a token\n * already issued lives out its lifetime.\n *\n * `DELETE /v1/organizations/{organization}/agent-installations/{installation_id}`\n * (DeleteOrganizationAgentInstallation)\n */\n deleteAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Revoke a delegation in the organization.\n *\n * An organization administrator revokes a delegation grant in their organization (pontive-spec 20 G2,\n * C4): the agent's next exchange on it is refused, and a token it already exchanged stops being\n * answered on Pontive's checks and listings at once. 404 for a grant in another organization or in\n * none. Needs sys:agent:install on the organization.\n *\n * `DELETE /v1/organizations/{organization}/delegations/{delegation_id}` (DeleteOrganizationDelegation)\n */\n deleteDelegation(organization: string, delegationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * Delete invitation.\n *\n * Withdraw an invitation: it is deleted, and its link stops working. An invitation exists only while\n * it is open — accepting one deletes it too, and an expired one is purged.\n *\n * `DELETE /v1/organizations/{organization}/invitations/{invitation_id}` (DeleteOrganizationInvitation)\n */\n deleteInvitation(organization: string, invitationId: string, params?: T.DeleteOrganizationInvitationParams, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/invitations/${e(invitationId)}`, query: params }, options);\n }\n\n /**\n * Remove member from organization.\n *\n * Remove a user from an organization, which removes every role they hold there. Removing oneself is\n * leaving: when the organization settings do not let members leave (allow_members_to_leave off), it is\n * refused 403 leave_disabled, as leaving it with POST /me/memberships/{container_id}/leave is, before\n * any rule below; removing someone else is not affected. Removing a member who holds owner needs\n * sys:org:transfer, removing oneself included, refused 403 owner_transfer_required. A caller from the\n * instance itself (not the Pontive console) may remove only a member whose roles' permissions they\n * hold on the organization, or hold sys:root:grant, refused 403 role_ceiling. Roles that changed while\n * the removal was being decided are refused 409 member_roles_changed: read the member again and retry.\n *\n * `DELETE /v1/organizations/{organization}/members/{user_id}` (DeleteOrganizationMember)\n */\n deleteMember(organization: string, userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Remove a member limit.\n *\n * Remove one source's member limit from an organization. The lowest limit left, if any, is then in\n * force. Removing a limit that is not set changes nothing and succeeds. While the instance's billing\n * capability is on, the billing limit is managed by billing: removing it here is refused with 403, an\n * instance admin included. With the capability off, an instance admin may remove it. If the capability\n * cannot be read, a billing write is refused with 503.\n *\n * `DELETE /v1/organizations/{organization}/member-limits/{source}` (DeleteOrganizationMemberLimit)\n */\n deleteMemberLimit(organization: string, source: string, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/member-limits/${e(source)}` }, options);\n }\n\n /**\n * Get organization.\n *\n * Retrieve one organization by its id or its slug. A value in the id form (org_ and 26 base32\n * characters) is read as the id; anything else as the slug, which needs sys:org:read to resolve. Every\n * route under /organizations/{organization} takes either.\n *\n * `GET /v1/organizations/{organization}` (GetOrganization)\n */\n get(organization: string, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}` }, options);\n }\n\n /**\n * Get an agent's installation on the organization.\n *\n * One installation in the organization — on the organization or one of its resources — with its\n * pending approval (D21). 404 for an installation in another organization or in none.\n *\n * `GET /v1/organizations/{organization}/agent-installations/{installation_id}`\n * (GetOrganizationAgentInstallation)\n */\n getAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Get organization by external id.\n *\n * Retrieve the organization the caller gave this external id when creating or updating it: an exact\n * match on the instance-unique external_id. Answers the organization or 404. Percent-encode the value.\n *\n * `GET /v1/organizations/external_id/{external_id}` (GetOrganizationByExternalId)\n */\n getByExternalId(externalId: string, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"GET\", path: `/v1/organizations/external_id/${e(externalId)}` }, options);\n }\n\n /**\n * Get the organization's client policy.\n *\n * Which of the clients the instance admits may act in the organization (pontive-spec 20 G2). mode all\n * admits every client the instance admits but those the block-list names; allowlist admits only the\n * third-party apps the allow-list names. The block-list always wins, and governs agents too. The\n * instance's third-party client setting is the ceiling: third_party_in_organizations false means its\n * client profile gives third-party apps no organization context at all. An organization that never set\n * its policy reads the default, with updated_at null. Needs sys:agent:read on the organization.\n *\n * `GET /v1/organizations/{organization}/client-policy` (GetOrganizationClientPolicy)\n */\n getClientPolicy(organization: string, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/client-policy` }, options);\n }\n\n /**\n * Get invitation.\n *\n * Get invitation by ID.\n *\n * `GET /v1/organizations/{organization}/invitations/{invitation_id}` (GetOrganizationInvitation)\n */\n getInvitation(organization: string, invitationId: string, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/invitations/${e(invitationId)}` }, options);\n }\n\n /**\n * Get organization member.\n *\n * Get an organization member by user ID.\n *\n * `GET /v1/organizations/{organization}/members/{user_id}` (GetOrganizationMember)\n */\n getMember(organization: string, userId: string, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Get organization settings.\n *\n * The instance-wide policy that applies to every organization: whether members may leave, the roles\n * given on joining, and how long an invitation stays open.\n *\n * `GET /v1/organizations/settings` (GetOrganizationSettings)\n */\n getSettings(options?: RequestOptions): APIPromise<T.OrganizationSettingsResponse> {\n return this.core.request<T.OrganizationSettingsResponse>({ host: \"api\", method: \"GET\", path: `/v1/organizations/settings` }, options);\n }\n\n /**\n * Import organizations.\n *\n * Apply, or with dry_run (default true) plan, a batch of at most 100 organizations and 1,000 member\n * entries under an import run, after their users (pontive-spec 46 §5.3). external_id is each row's\n * key. A member names its user by exactly one of user_id, user_external_id or legacy_subject (the\n * run's source), with roles of the org type; one that names no user fails as a warning on the row, not\n * the organization. A new organization needs at least one resolved member with owner\n * (owners_required). An existing one (same external_id) takes new members and, with on_existing\n * update, its name, metadata and changed roles; its owners change by transfer, never by import\n * (owner_requires_transfer). An organization larger than one batch is sent again with its next\n * members. A b2c instance refuses the call (tenancy_mode_b2c). Needs sys:org:create on the instance\n * root, and sys:member:manage on each existing organization the batch changes.\n *\n * `POST /v1/organizations/import` (ImportOrganizations)\n */\n import(body: T.ImportOrganizationsRequest, options?: RequestOptions): APIPromise<T.UserImportBatch> {\n return this.core.request<T.UserImportBatch>({ host: \"api\", method: \"POST\", path: `/v1/organizations/import`, body }, options);\n }\n\n /**\n * List organizations.\n *\n * Retrieve a paginated list of organizations. Filter by status, external_id, and search query.\n *\n * `GET /v1/organizations` (ListOrganizations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListOrganizationsParams, options?: RequestOptions): PagePromise<T.Organization, T.ListOrganizationsResponse> {\n return this.core.page<T.Organization, T.ListOrganizationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations`, query: params }, options);\n }\n\n /**\n * List the agent activity in an organization.\n *\n * What agents did in the organization (pontive-spec 20 G2, G3): its audit entries whose actor is an\n * agent, on its own installation or acting for a member with a delegated token (on_behalf_of names the\n * member), newest first. Filter by actor_id (an agt_…) and on_behalf_of (a usr_…). The view an\n * organization's owners and admins read from the embedded agent-management element, with\n * pontive:org:agent:read; audit-svc decides it with sys:audit:read on the organization, which they\n * hold.\n *\n * `GET /v1/organizations/{organization}/agent-activity` (ListOrganizationAgentActivity)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentActivity(organization: string, params?: T.ListOrganizationAgentActivityParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agent-activity`, query: params }, options);\n }\n\n /**\n * List every agent installation in the organization.\n *\n * The agents installed on the organization and on each of its resources (pontive-spec 20 G2, D21),\n * with their approved roles, pending approvals and status; filterable by agent, resource and status.\n * Needs sys:agent:read on the organization; an organization's owners and admins hold it, and an end\n * user's token with pontive:org:agent:read reaches it for their own organization.\n *\n * `GET /v1/organizations/{organization}/agent-installations` (ListOrganizationAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentInstallations(organization: string, params?: T.ListOrganizationAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agent-installations`, query: params }, options);\n }\n\n /**\n * List an organization's agents.\n *\n * The organization's agents page (pontive-spec 45 §13; api-route-review D43): every agent installed\n * in it, offered to it, or its own, each with its installation there or null. relation narrows it,\n * repeated for any of several: installed (an installation here), offered (an instance agent offered to\n * the organization, installed or not), own (defined by the organization). Organization-scoped tokens\n * with pontive:org:agent:read reach it.\n *\n * `GET /v1/organizations/{organization}/agents` (ListOrganizationAgents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgents(organization: string, params?: T.ListOrganizationAgentsParams, options?: RequestOptions): PagePromise<T.OrganizationAgent, T.ListOrganizationAgentsResponse> {\n return this.core.page<T.OrganizationAgent, T.ListOrganizationAgentsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agents`, query: params }, options);\n }\n\n /**\n * List assignable roles.\n *\n * List the roles a member of the organization can be given, each marked with whether the caller may\n * grant or remove it on a member other than themselves (assignable_by_caller) and whether doing so\n * hands the organization over, which needs sys:org:transfer (requires_transfer). Decided on\n * sys:member:read on the organization, so an organization's own administrators can read it; the roles\n * of the org resource type, and the organization's own. Not paginated.\n *\n * `GET /v1/organizations/{organization}/assignable-roles` (ListAssignableRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAssignableRoles(organization: string, params?: T.ListAssignableRolesParams, options?: RequestOptions): PagePromise<T.AssignableRole, T.ListAssignableRolesResponse> {\n return this.core.page<T.AssignableRole, T.ListAssignableRolesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/assignable-roles`, query: params }, options);\n }\n\n /**\n * List an organization's audit log entries.\n *\n * The entries that belong to one organization: the view its admins read with sys:audit:read on the\n * organization. Same filters and cursors as GET /audit-logs.\n *\n * `GET /v1/organizations/{organization}/audit-logs` (ListOrganizationAuditLogs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAuditLogs(organization: string, params?: T.ListOrganizationAuditLogsParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/audit-logs`, query: params }, options);\n }\n\n /**\n * List an organization's delegations.\n *\n * The delegation grants in the organization: which users let which agents act for them there. Needs\n * sys:agent:read on the organization (pontive-spec 20 G2): its owners and admins hold it, an instance\n * administrator through inheritance, and an end user's token with pontive:org:agent:read reaches it\n * for their own organization.\n *\n * `GET /v1/organizations/{organization}/delegations` (ListOrganizationDelegations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listDelegations(organization: string, params?: T.ListOrganizationDelegationsParams, options?: RequestOptions): PagePromise<T.Delegation, T.ListDelegationsResponse> {\n return this.core.page<T.Delegation, T.ListDelegationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/delegations`, query: params }, options);\n }\n\n /**\n * List the groups holding roles on an organization.\n *\n * The groups holding roles on an organization itself, each with its roles there (api-route-review\n * D43). A group holding roles only on the organization's resources is not listed; the groups the\n * organization owns are GET /groups?owner_type=org&owner_id=….\n *\n * `GET /v1/organizations/{organization}/group-roles` (ListOrganizationGroupRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroupRoles(organization: string, params?: T.ListOrganizationGroupRolesParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/group-roles`, query: params }, options);\n }\n\n /**\n * List invitations.\n *\n * Get a list of invitations for an organization with pagination and filtering.\n *\n * `GET /v1/organizations/{organization}/invitations` (ListOrganizationInvitations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInvitations(organization: string, params?: T.ListOrganizationInvitationsParams, options?: RequestOptions): PagePromise<T.Invitation, T.ListInvitationsResponse> {\n return this.core.page<T.Invitation, T.ListInvitationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/invitations`, query: params }, options);\n }\n\n /**\n * List organization members.\n *\n * List members of an organization with pagination and filtering.\n *\n * `GET /v1/organizations/{organization}/members` (ListOrganizationMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(organization: string, params?: T.ListOrganizationMembersParams, options?: RequestOptions): PagePromise<T.Member, T.ListMembersResponse> {\n return this.core.page<T.Member, T.ListMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/members`, query: params }, options);\n }\n\n /**\n * List the third-party apps acting for the organization's members.\n *\n * The CIMD and DCR apps a member of the organization has consented to (pontive-spec 20 G2), the most\n * recently consented first: how many members did, the organization's policy on each (allowed, blocked,\n * not_allowed), and whether the instance still admits it. Needs sys:agent:read on the organization.\n *\n * `GET /v1/organizations/{organization}/third-party-clients` (ListOrganizationThirdPartyClients)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listThirdPartyClients(organization: string, params?: T.ListOrganizationThirdPartyClientsParams, options?: RequestOptions): PagePromise<T.OrganizationThirdPartyClient, T.ListOrganizationClientsResponse> {\n return this.core.page<T.OrganizationThirdPartyClient, T.ListOrganizationClientsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/third-party-clients`, query: params }, options);\n }\n\n /**\n * Set a member limit.\n *\n * Set one source's member limit on an organization, 0 or more. source is manual (an instance admin or\n * the client's backend) or billing (Pontive billing). While the instance's billing capability is on,\n * the billing limit is managed by billing: setting it here is refused with 403, an instance admin\n * included, and a manual limit may still be set, since the lowest limit wins. With the capability off,\n * an instance admin may set it. If the capability cannot be read, a billing write is refused with 503.\n * The lowest limit set is in force, as member_limit. A write that would add a member past it is\n * refused with 409 seat_limit_reached. Lowering a limit below the current number of members blocks new\n * members and removes no one. Pontive billing does not call this route: it writes its limit to\n * identity-svc over gRPC with its system credential.\n *\n * `PUT /v1/organizations/{organization}/member-limits/{source}` (ReplaceOrganizationMemberLimit)\n */\n replaceMemberLimit(organization: string, source: string, body: T.SetMemberLimitRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"PUT\", path: `/v1/organizations/${e(organization)}/member-limits/${e(source)}`, body }, options);\n }\n\n /**\n * Resend invitation.\n *\n * Resend an invitation.\n *\n * `POST /v1/organizations/{organization}/invitations/{invitation_id}/resend`\n * (ResendOrganizationInvitation)\n */\n resendInvitation(organization: string, invitationId: string, body: T.ResendInvitationRequest, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/invitations/${e(invitationId)}/resend`, body }, options);\n }\n\n /**\n * Reactivate organization.\n *\n * Remove one suspension reason from an organization, and no other. The reason is admin when the body\n * is absent or names none. The organization is active again, with access to the resources parented\n * under it, once it holds no reason; while it holds another it stays suspended. Removing a reason it\n * does not hold changes nothing and succeeds. A reactivate that names no reason removes admin only,\n * never billing. While the instance's billing capability is on, the billing reason is managed by\n * billing: adding or removing it here is refused with 403, an instance admin included, so only billing\n * lifts a billing suspension. With the capability off, an instance admin may add or remove it. If the\n * capability cannot be read, a billing write is refused with 503.\n *\n * `POST /v1/organizations/{organization}/resume` (ResumeOrganization)\n */\n resume(organization: string, body?: T.ReactivateOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/resume`, body }, options);\n }\n\n /**\n * Resume an agent on the organization.\n *\n * Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the\n * organization suspended or not offered) stays suspended until that ends.\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/resume`\n * (ResumeOrganizationAgentInstallation)\n */\n resumeAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/resume` }, options);\n }\n\n /**\n * Suspend organization.\n *\n * Add a suspension reason to an organization. It is suspended while it holds any reason, and access to\n * it and to every resource parented under it is denied. The reason is admin when the body is absent or\n * names none. billing is Pontive billing's own reason. closed says the organization's owners closed\n * their account and the client may reopen it: Pontive billing keeps its owner able to pay its invoices\n * and manage its payment method while it is held. While the instance's billing capability is on, the\n * billing reason is managed by billing: adding or removing it here is refused with 403, an instance\n * admin included, so only billing lifts a billing suspension. With the capability off, an instance\n * admin may add or remove it. If the capability cannot be read, a billing write is refused with 503.\n * Adding a reason the organization already holds changes nothing and succeeds. Pontive billing does\n * not call this route: it writes the billing reason to identity-svc over gRPC with its system\n * credential.\n *\n * `POST /v1/organizations/{organization}/suspend` (SuspendOrganization)\n */\n suspend(organization: string, body?: T.SuspendOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/suspend`, body }, options);\n }\n\n /**\n * Suspend an agent on the organization.\n *\n * Suspend the installation: its roles are withdrawn and the agent's tokens for the organization\n * refused until it is resumed.\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/suspend`\n * (SuspendOrganizationAgentInstallation)\n */\n suspendAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/suspend` }, options);\n }\n\n /**\n * Transfer organization ownership.\n *\n * Transfer ownership of an organization to another user.\n *\n * `POST /v1/organizations/{organization}/transfer-ownership` (TransferOwnership)\n */\n transferOwnership(organization: string, body: T.TransferOwnershipRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/transfer-ownership`, body }, options);\n }\n\n /**\n * Update organization.\n *\n * Partially update an organization. Only provided fields are changed. The slug is immutable after\n * creation and cannot be updated.\n *\n * `PATCH /v1/organizations/{organization}` (UpdateOrganization)\n */\n update(organization: string, body: T.UpdateOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}`, body }, options);\n }\n\n /**\n * Change an agent's roles on the organization.\n *\n * Replace the roles approved for the agent on the organization, within what it requests\n * (sys:agent:install on the organization, or on the root). delegated_only, when present, turns\n * delegation-only on or off.\n *\n * `PATCH /v1/organizations/{organization}/agent-installations/{installation_id}`\n * (UpdateOrganizationAgentInstallation)\n */\n updateAgentInstallation(organization: string, installationId: string, body: T.UpdateInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}`, body }, options);\n }\n\n /**\n * Set the organization's client policy.\n *\n * Replace the organization's client policy whole (pontive-spec 20 G2). An entry is an app id\n * (app_…), an agent id (agt_…), an exact CIMD client_id URL, or https://host/*, at most 100 per\n * list. A blocked or not-allowed third-party app is refused when the organization is chosen at\n * /authorize (an error page, never a redirect), when consent would be given for it, at code exchange\n * and at refresh; a blocked agent's token exchange in the organization is refused. The organization\n * can only narrow what the instance admits. Needs sys:agent:install on the organization.\n *\n * `PATCH /v1/organizations/{organization}/client-policy` (UpdateOrganizationClientPolicy)\n */\n updateClientPolicy(organization: string, body: T.SetOrganizationClientPolicyRequest, params?: T.UpdateOrganizationClientPolicyParams, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n const { if_match } = params ?? ({} as T.UpdateOrganizationClientPolicyParams);\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}/client-policy`, headers: { \"If-Match\": if_match }, body }, options);\n }\n\n /**\n * Update organization member roles.\n *\n * Replace an organization member's roles. Granting or removing owner needs sys:org:transfer, refused\n * 403 owner_transfer_required. A caller from the instance itself (not the Pontive console) may add or\n * remove only roles whose permissions they hold on the organization, or hold sys:root:grant, refused\n * 403 role_ceiling, and cannot change their own roles, refused 403 self_role_change. Roles that\n * changed while the change was being decided are refused 409 member_roles_changed: read the member\n * again and retry.\n *\n * `PATCH /v1/organizations/{organization}/members/{user_id}` (UpdateOrganizationMember)\n */\n updateMember(organization: string, userId: string, body: T.UpdateMemberRolesRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}/members/${e(userId)}`, body }, options);\n }\n\n /**\n * Update organization settings.\n *\n * Change the instance-wide organization policy. Omitted fields are left as they are.\n *\n * `PATCH /v1/organizations/settings` (UpdateOrganizationSettings)\n */\n updateSettings(body: T.UpdateOrganizationSettingsRequest, params?: T.UpdateOrganizationSettingsParams, options?: RequestOptions): APIPromise<T.OrganizationSettingsResponse> {\n const { if_match } = params ?? ({} as T.UpdateOrganizationSettingsParams);\n return this.core.request<T.OrganizationSettingsResponse>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/settings`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Personal access tokens.\n */\nexport class PersonalAccessTokens {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create personal access token.\n *\n * Mint a personal access token bound to a user. The token value is returned only here. Omit\n * organization_id for an all-orgs token.\n *\n * `POST /v1/personal-access-tokens` (CreatePAT)\n */\n create(body: T.CreatePATRequest, options?: RequestOptions): APIPromise<T.PATWithToken> {\n return this.core.request<T.PATWithToken>({ host: \"api\", method: \"POST\", path: `/v1/personal-access-tokens`, body }, options);\n }\n\n /**\n * Get personal access token.\n *\n * Get a personal access token by ID.\n *\n * `GET /v1/personal-access-tokens/{personal_access_token_id}` (GetPAT)\n */\n get(personalAccessTokenId: string, options?: RequestOptions): APIPromise<T.PAT> {\n return this.core.request<T.PAT>({ host: \"api\", method: \"GET\", path: `/v1/personal-access-tokens/${e(personalAccessTokenId)}` }, options);\n }\n\n /**\n * List personal access tokens.\n *\n * List personal access tokens with filtering and pagination.\n *\n * `GET /v1/personal-access-tokens` (ListPATs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPATsParams, options?: RequestOptions): PagePromise<T.PAT, T.ListPATsResponse> {\n return this.core.page<T.PAT, T.ListPATsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/personal-access-tokens`, query: params }, options);\n }\n\n /**\n * Revoke personal access token.\n *\n * Revoke a personal access token immediately and irreversibly.\n *\n * `POST /v1/personal-access-tokens/{personal_access_token_id}/revoke` (RevokePAT)\n */\n revoke(personalAccessTokenId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/personal-access-tokens/${e(personalAccessTokenId)}/revoke` }, options);\n }\n\n /**\n * Update personal access token.\n *\n * Update mutable fields (name, description, metadata).\n *\n * `PATCH /v1/personal-access-tokens/{personal_access_token_id}` (UpdatePAT)\n */\n update(personalAccessTokenId: string, body: T.UpdatePATRequest, options?: RequestOptions): APIPromise<T.PAT> {\n return this.core.request<T.PAT>({ host: \"api\", method: \"PATCH\", path: `/v1/personal-access-tokens/${e(personalAccessTokenId)}`, body }, options);\n }\n}\n\n/**\n * Resources, their members and their parent.\n */\nexport class Resources {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Approve an agent's requested roles on the resource.\n *\n * Approve the agent's requested roles up to version, after the installation's approved_version and at\n * most the agent's; roles are the approved roles from now on — typically what it holds plus\n * pending_roles (sys:agent:install on the resource's organization, or on the root for a resource in\n * none — never on the resource itself).\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/approve`\n * (ApproveResourceAgentInstallation)\n */\n approveAgentInstallation(resourceId: string, installationId: string, body: T.ApproveInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/approve`, body }, options);\n }\n\n /**\n * Create resource.\n *\n * Register an object another system owns, so members, roles and authorization can refer to it. It may\n * belong to an organization (and is then deleted with it), and may sit under one parent — the\n * organization it belongs to, or a resource belonging to it; for one in no organization, another such\n * resource or the instance root (its instance id, or root) — of one of the parent types its resource\n * type declares; roles held on the parent reach it by its type's inheritance rules. The parent is\n * required: no resource is under nothing.\n *\n * `POST /v1/resources` (CreateResource)\n */\n create(body: T.CreateResourceRequest, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"POST\", path: `/v1/resources`, body }, options);\n }\n\n /**\n * Install an agent on the resource.\n *\n * Install an agent on the resource with roles approved: any of those it requests for the resource's\n * type, or none (sys:agent:install on the resource's organization, or on the root for a resource in\n * none — never on the resource itself). The roles are also held to what the caller could grant\n * there. With delegated_only true, the roles act only as the agent's side of a delegation: a token the\n * agent exchanged to act for a user is allowed what both hold, while the agent's own token holds none\n * of them.\n *\n * `POST /v1/resources/{resource_id}/agent-installations` (CreateResourceAgentInstallation)\n */\n createAgentInstallation(resourceId: string, body: T.InstallRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations`, body }, options);\n }\n\n /**\n * Add a member to a resource.\n *\n * Add a user to a resource with roles of the resource's type. A user who is not a member of the\n * resource's organization joins it too, with the membership settings' roles_on_join (none by default).\n * A user who would take the organization past its member limit is refused 409 seat_limit_reached, and\n * nothing is written.\n *\n * `POST /v1/resources/{resource_id}/members` (CreateResourceMember)\n */\n createMember(resourceId: string, body: T.AddResourceMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/members`, body }, options);\n }\n\n /**\n * Decline an agent's requested roles on the resource.\n *\n * Mark version seen without adding its roles; the installation keeps working with the roles it has.\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/decline`\n * (DeclineResourceAgentInstallation)\n */\n declineAgentInstallation(resourceId: string, installationId: string, body: T.DeclineInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/decline`, body }, options);\n }\n\n /**\n * Delete resource.\n *\n * Deregister a resource. One that has children is refused with 409 unless cascade=true, which also\n * deregisters its whole subtree.\n *\n * `DELETE /v1/resources/{resource_id}` (DeleteResource)\n */\n delete(resourceId: string, params?: T.DeleteResourceParams, options?: RequestOptions): APIPromise<T.DeleteResourceResponse> {\n return this.core.request<T.DeleteResourceResponse>({ host: \"api\", method: \"DELETE\", path: `/v1/resources/${e(resourceId)}`, query: params }, options);\n }\n\n /**\n * Uninstall an agent from the resource.\n *\n * Delete the installation. The agent's next token request for the resource is refused; a token already\n * issued lives out its lifetime.\n *\n * `DELETE /v1/resources/{resource_id}/agent-installations/{installation_id}`\n * (DeleteResourceAgentInstallation)\n */\n deleteAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Remove a member from a resource.\n *\n * Remove a user from a resource. Their membership of the resource's organization stays.\n *\n * `DELETE /v1/resources/{resource_id}/members/{user_id}` (DeleteResourceMember)\n */\n deleteMember(resourceId: string, userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/resources/${e(resourceId)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Get resource.\n *\n * Retrieve a resource by its ID, with its parent.\n *\n * `GET /v1/resources/{resource_id}` (GetResource)\n */\n get(resourceId: string, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}` }, options);\n }\n\n /**\n * Get an agent's installation on the resource.\n *\n * One installation on the resource, a resource in no organization (D21), with its pending approval. An\n * installation in an organization is under /organizations/{organization}/agent-installations.\n *\n * `GET /v1/resources/{resource_id}/agent-installations/{installation_id}`\n * (GetResourceAgentInstallation)\n */\n getAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Get a resource member.\n *\n * Get one member of a resource by user ID.\n *\n * `GET /v1/resources/{resource_id}/members/{user_id}` (GetResourceMember)\n */\n getMember(resourceId: string, userId: string, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/members/${e(userId)}` }, options);\n }\n\n /**\n * List resources.\n *\n * Retrieve a paginated list of resources. Filter by resource_type, the organization they belong to (or\n * instance_level for those in none), a parent (its direct children), and external_id, or search the\n * name and external id by free text.\n *\n * `GET /v1/resources` (ListResources)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListResourcesParams, options?: RequestOptions): PagePromise<T.Resource, T.ListResourcesResponse> {\n return this.core.page<T.Resource, T.ListResourcesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources`, query: params }, options);\n }\n\n /**\n * List the resource's agent installations.\n *\n * The agents installed on the resource, with their approved roles, pending approvals and status;\n * filterable by agent and status (D21).\n *\n * `GET /v1/resources/{resource_id}/agent-installations` (ListResourceAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentInstallations(resourceId: string, params?: T.ListResourceAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/agent-installations`, query: params }, options);\n }\n\n /**\n * List the groups holding roles on a resource.\n *\n * The groups holding roles on a resource, whoever owns them, each with its roles there\n * (api-route-review D43). The groups the resource owns are GET /groups?owner_type=<its\n * type>&owner_id=….\n *\n * `GET /v1/resources/{resource_id}/group-roles` (ListResourceGroupRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroupRoles(resourceId: string, params?: T.ListResourceGroupRolesParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/group-roles`, query: params }, options);\n }\n\n /**\n * List resource members.\n *\n * List the users holding roles on a resource itself. Users who reach it only by inheritance from a\n * parent are not members and are not listed.\n *\n * `GET /v1/resources/{resource_id}/members` (ListResourceMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(resourceId: string, params?: T.ListResourceMembersParams, options?: RequestOptions): PagePromise<T.Member, T.ListMembersResponse> {\n return this.core.page<T.Member, T.ListMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/members`, query: params }, options);\n }\n\n /**\n * Move a resource under a parent.\n *\n * Set the resource's parent, replacing the one it had: a move, with its subtree. The parent is the\n * organization the resource belongs to, or a resource belonging to it; for a resource in no\n * organization, another such resource or the instance root, by its instance id or root — of one of\n * the parent types the resource's type declares. Roles held on the parent then reach the resource. A\n * move that would make the resource its own ancestor is refused with 409, one that would nest it more\n * than 8 levels deep with 400. Setting the parent it already has succeeds.\n *\n * `PUT /v1/resources/{resource_id}/parent` (ReplaceResourceParent)\n */\n replaceParent(resourceId: string, body: T.SetResourceParentRequest, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"PUT\", path: `/v1/resources/${e(resourceId)}/parent`, body }, options);\n }\n\n /**\n * Resume an agent on the resource.\n *\n * Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the\n * organization suspended or not offered) stays suspended until that ends.\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/resume`\n * (ResumeResourceAgentInstallation)\n */\n resumeAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/resume` }, options);\n }\n\n /**\n * Suspend an agent on the resource.\n *\n * Suspend the installation: its roles are withdrawn and the agent's tokens for the resource refused\n * until it is resumed.\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/suspend`\n * (SuspendResourceAgentInstallation)\n */\n suspendAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/suspend` }, options);\n }\n\n /**\n * Update resource.\n *\n * Change a resource's name or metadata. Its type, external id and organization never change; its\n * parent changes through the parent endpoints.\n *\n * `PATCH /v1/resources/{resource_id}` (UpdateResource)\n */\n update(resourceId: string, body: T.UpdateResourceRequest, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"PATCH\", path: `/v1/resources/${e(resourceId)}`, body }, options);\n }\n\n /**\n * Change an agent's roles on the resource.\n *\n * Replace the roles approved for the agent on the resource, within what it requests (sys:agent:install\n * on the resource's organization, or on the root for a resource in none — never on the resource\n * itself). delegated_only, when present, turns delegation-only on or off.\n *\n * `PATCH /v1/resources/{resource_id}/agent-installations/{installation_id}`\n * (UpdateResourceAgentInstallation)\n */\n updateAgentInstallation(resourceId: string, installationId: string, body: T.UpdateInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"PATCH\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}`, body }, options);\n }\n\n /**\n * Update a resource member's roles.\n *\n * Replace the roles a member holds on a resource.\n *\n * `PATCH /v1/resources/{resource_id}/members/{user_id}` (UpdateResourceMember)\n */\n updateMember(resourceId: string, userId: string, body: T.UpdateResourceMemberRolesRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"PATCH\", path: `/v1/resources/${e(resourceId)}/members/${e(userId)}`, body }, options);\n }\n}\n\n/**\n * The instance root: its members, invitations, installations and group roles.\n */\nexport class Root {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Approve an agent's requested roles on the instance root.\n *\n * Approve the agent's requested roles up to version, after the installation's approved_version and at\n * most the agent's; roles are the approved roles from now on — typically what it holds plus\n * pending_roles (sys:agent:install on the root).\n *\n * `POST /v1/root/agent-installations/{installation_id}/approve` (ApproveRootAgentInstallation)\n */\n approveAgentInstallation(installationId: string, body: T.ApproveInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/approve`, body }, options);\n }\n\n /**\n * Install an agent on the instance root.\n *\n * Install an agent in no organization — on the instance root, or on the resource resource_id names,\n * a resource in none (D21) — with roles approved: any of those it requests for the target's type, or\n * none (sys:agent:install on the root). The roles are also held to what the caller could grant there.\n * With delegated_only true, the roles act only as the agent's side of a delegation: a token the agent\n * exchanged to act for a user is allowed what both hold, while the agent's own token holds none of\n * them.\n *\n * `POST /v1/root/agent-installations` (CreateRootAgentInstallation)\n */\n createAgentInstallation(body: T.InstallRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations`, body }, options);\n }\n\n /**\n * Invite users to the instance.\n *\n * Invite people to the instance alone, with no organization: each gets an email whose link lets them\n * create their own account in the app (choosing their own password or sign-in method), and accepting\n * grants nothing else. For people who belong to no organization — in a b2c instance, everyone; in a\n * b2b one, for example the client's own staff. An address that already has an account is skipped\n * (already_registered); one with a pending invitation to the instance has it reissued with a new link.\n * The app must have org_access all. 200 when every address was skipped, 201 when any invitation was\n * sent.\n *\n * `POST /v1/root/invitations` (CreateRootInvitations)\n */\n createInvitations(body: T.InviteToInstanceRequest, options?: RequestOptions): APIPromise<T.InvitationResult> {\n return this.core.request<T.InvitationResult>({ host: \"api\", method: \"POST\", path: `/v1/root/invitations`, body }, options);\n }\n\n /**\n * Add a root member.\n *\n * Give a user roles on the instance root (api-route-review D4, D38): written from the root, like an\n * organization's or a resource's members. A root role is granted with sys:root:grant.\n *\n * `POST /v1/root/members` (CreateRootMember)\n */\n createMember(body: T.AddRootMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"POST\", path: `/v1/root/members`, body }, options);\n }\n\n /**\n * Decline an agent's requested roles on the instance root.\n *\n * Mark version seen without adding its roles; the installation keeps working with the roles it has.\n *\n * `POST /v1/root/agent-installations/{installation_id}/decline` (DeclineRootAgentInstallation)\n */\n declineAgentInstallation(installationId: string, body: T.DeclineInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/decline`, body }, options);\n }\n\n /**\n * Uninstall an agent from the instance root.\n *\n * Delete the installation. The agent's next token request for the instance root is refused; a token\n * already issued lives out its lifetime.\n *\n * `DELETE /v1/root/agent-installations/{installation_id}` (DeleteRootAgentInstallation)\n */\n deleteAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/root/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Withdraw an invitation to the instance.\n *\n * Withdraw an invitation to the instance: it is deleted, and its link stops working.\n *\n * `DELETE /v1/root/invitations/{invitation_id}` (DeleteRootInvitation)\n */\n deleteInvitation(invitationId: string, params?: T.DeleteRootInvitationParams, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/root/invitations/${e(invitationId)}`, query: params }, options);\n }\n\n /**\n * Remove a root member.\n *\n * Take every root role from a user. The instance's last owner cannot be removed.\n *\n * `DELETE /v1/root/members/{user_id}` (DeleteRootMember)\n */\n deleteMember(userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/root/members/${e(userId)}` }, options);\n }\n\n /**\n * Get an agent's installation on the instance root.\n *\n * One installation in no organization — on the instance root or on a resource in none (D21) — with\n * its pending approval.\n *\n * `GET /v1/root/agent-installations/{installation_id}` (GetRootAgentInstallation)\n */\n getAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"GET\", path: `/v1/root/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Get an invitation to the instance.\n *\n * One open invitation to the instance alone (no organization). An organization's invitation is not\n * found here.\n *\n * `GET /v1/root/invitations/{invitation_id}` (GetRootInvitation)\n */\n getInvitation(invitationId: string, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"GET\", path: `/v1/root/invitations/${e(invitationId)}` }, options);\n }\n\n /**\n * Get a root member.\n *\n * One user's roles on the instance root.\n *\n * `GET /v1/root/members/{user_id}` (GetRootMember)\n */\n getMember(userId: string, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"GET\", path: `/v1/root/members/${e(userId)}` }, options);\n }\n\n /**\n * List the installations in no organization.\n *\n * The installations in no organization (D21): on the instance root and on resources in none, with\n * their approved roles, pending approvals and status; filterable by agent, resource and status.\n *\n * `GET /v1/root/agent-installations` (ListRootAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentInstallations(params?: T.ListRootAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/agent-installations`, query: params }, options);\n }\n\n /**\n * List the groups holding roles on the instance root.\n *\n * The groups holding roles on the instance root, each with its roles there (api-route-review D43): the\n * read edge from the other side of GET /groups/{group_id}/roles. The groups the root owns are GET\n * /groups?owner_type=root.\n *\n * `GET /v1/root/group-roles` (ListRootGroupRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroupRoles(params?: T.ListRootGroupRolesParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/group-roles`, query: params }, options);\n }\n\n /**\n * List invitations to the instance.\n *\n * The open invitations to the instance alone (no organization). An expired invitation is not listed.\n *\n * `GET /v1/root/invitations` (ListRootInvitations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInvitations(params?: T.ListRootInvitationsParams, options?: RequestOptions): PagePromise<T.Invitation, T.ListInvitationsResponse> {\n return this.core.page<T.Invitation, T.ListInvitationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/invitations`, query: params }, options);\n }\n\n /**\n * List the instance root's members.\n *\n * List the users holding a role on the instance root — its owners and admins, and in the directory\n * Pontive's staff. The root is the request's own instance.\n *\n * `GET /v1/root/members` (ListRootMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(params?: T.ListRootMembersParams, options?: RequestOptions): PagePromise<T.Member, T.ListMembersResponse> {\n return this.core.page<T.Member, T.ListMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/members`, query: params }, options);\n }\n\n /**\n * Resend an invitation to the instance.\n *\n * Send an invitation to the instance again, with a new link; the earlier link stops working.\n *\n * `POST /v1/root/invitations/{invitation_id}/resend` (ResendRootInvitation)\n */\n resendInvitation(invitationId: string, body: T.ResendInvitationRequest, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"POST\", path: `/v1/root/invitations/${e(invitationId)}/resend`, body }, options);\n }\n\n /**\n * Resume an agent on the instance root.\n *\n * Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the\n * organization suspended or not offered) stays suspended until that ends.\n *\n * `POST /v1/root/agent-installations/{installation_id}/resume` (ResumeRootAgentInstallation)\n */\n resumeAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/resume` }, options);\n }\n\n /**\n * Suspend an agent on the instance root.\n *\n * Suspend the installation: its roles are withdrawn and the agent's tokens for the instance root\n * refused until it is resumed.\n *\n * `POST /v1/root/agent-installations/{installation_id}/suspend` (SuspendRootAgentInstallation)\n */\n suspendAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/suspend` }, options);\n }\n\n /**\n * Change an agent's roles on the instance root.\n *\n * Replace the roles approved for the agent on the instance root, within what it requests\n * (sys:agent:install on the root). delegated_only, when present, turns delegation-only on or off.\n *\n * `PATCH /v1/root/agent-installations/{installation_id}` (UpdateRootAgentInstallation)\n */\n updateAgentInstallation(installationId: string, body: T.UpdateInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"PATCH\", path: `/v1/root/agent-installations/${e(installationId)}`, body }, options);\n }\n\n /**\n * Update a root member.\n *\n * Replace a user's roles on the instance root.\n *\n * `PATCH /v1/root/members/{user_id}` (UpdateRootMember)\n */\n updateMember(userId: string, body: T.UpdateRootMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"PATCH\", path: `/v1/root/members/${e(userId)}`, body }, options);\n }\n}\n\n/**\n * Service accounts: machine identities, their credentials and roles.\n */\nexport class ServiceAccounts {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create service account.\n *\n * Create a service account, owned by the instance root, an organization or a resource (D5, D6, D44):\n * owner_type root (the default), org or the owning resource's type key, owner_id its prefixed id. The\n * account is created with no client secret (D45): mint one with POST\n * /service-accounts/{service_account_id}/client-secrets, which needs sys:sa:secret. A pontive: scope\n * in allowed_scopes is refused (400); to let the account reach the management API, grant it on the\n * management (system) API with PUT /apis/{api_id}/clients.\n *\n * `POST /v1/service-accounts` (CreateServiceAccount)\n */\n create(body: T.CreateServiceAccountRequest, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts`, body }, options);\n }\n\n /**\n * Create service account client secret.\n *\n * Mint a client secret (D19); needs sys:sa:secret. Creating the account mints none (D45). Its value is\n * returned here only. Without expire_others_in the others are kept, and the create is refused (409\n * client_secret_limit_reached) while two that do not expire are held; with it, every other secret\n * stops working that many seconds from now (0–604800; 0 at once), so a rotation is one call.\n *\n * `POST /v1/service-accounts/{service_account_id}/client-secrets` (CreateServiceAccountClientSecret)\n */\n createClientSecret(serviceAccountId: string, body?: T.ServiceaccountCreateClientSecretRequest, options?: RequestOptions): APIPromise<T.ServiceaccountClientSecretWithValue> {\n return this.core.request<T.ServiceaccountClientSecretWithValue>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-secrets`, body }, options);\n }\n\n /**\n * Create service account federated credential.\n *\n * Let the service account authenticate at the token endpoint with a token a trusted issuer signed,\n * with no secret or key of its own (workload identity federation, pontive-spec 20 B7). The workload\n * sends its token as client_assertion, with client_assertion_type\n * urn:ietf:params:oauth:client-assertion-type:jwt-bearer and client_id the service account's id; it is\n * accepted when its iss is the credential's trusted issuer (enabled), its aud one the issuer accepts,\n * exp at most the issuer's max_token_lifetime_seconds (default 3600) ahead and at most that long after\n * iat, its signature the issuer's, its jti unused (unless the issuer has allow_reuse, which accepts\n * the same token until it expires), its sub matches subject and every required claim is present with\n * exactly its value. subject is exact by default; a '*' matches one or more characters within one ':'\n * or '/' segment, and '**' or a '*' in the first segment is refused, so repo:acme/api:environment:*\n * matches every environment of acme/api and nothing else. At most 20 per service account, the name\n * once. Needs sys:sa:secret on its owner (the instance root, its organization, or its resource's\n * organization).\n *\n * `POST /v1/service-accounts/{service_account_id}/federated-credentials`\n * (CreateServiceAccountFederatedCredential)\n */\n createFederatedCredential(serviceAccountId: string, body: T.CreateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials`, body }, options);\n }\n\n /**\n * Add a service account public key.\n *\n * Add a public JWK to the account's inline keys, for private_key_jwt client authentication (RFC 7523).\n * The body is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256, with a\n * kid. At most three; refused while the account has a jwks_uri (409 key_source_conflict). Rotate by\n * overlap: add the new key, move over to it, then remove the old one.\n *\n * `POST /v1/service-accounts/{service_account_id}/public-keys` (CreateServiceAccountPublicKey)\n */\n createPublicKey(serviceAccountId: string, body: T.JWK, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/public-keys`, body }, options);\n }\n\n /**\n * Deactivate service account.\n *\n * Deactivate a service account.\n *\n * `POST /v1/service-accounts/{service_account_id}/deactivate` (DeactivateServiceAccount)\n */\n deactivate(serviceAccountId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/deactivate` }, options);\n }\n\n /**\n * Delete service account.\n *\n * Delete a service account.\n *\n * `DELETE /v1/service-accounts/{service_account_id}` (DeleteServiceAccount)\n */\n delete(serviceAccountId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}` }, options);\n }\n\n /**\n * Delete service account client secret.\n *\n * Remove one of the account's client secrets (D8, D19); it stops working at once.\n *\n * `DELETE /v1/service-accounts/{service_account_id}/client-secrets/{secret_id}`\n * (DeleteServiceAccountClientSecret)\n */\n deleteClientSecret(serviceAccountId: string, secretId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-secrets/${e(secretId)}` }, options);\n }\n\n /**\n * Delete service account federated credential.\n *\n * The credential stops authenticating at once; tokens already issued live out their lifetime. Needs\n * sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).\n *\n * `DELETE /v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}`\n * (DeleteServiceAccountFederatedCredential)\n */\n deleteFederatedCredential(serviceAccountId: string, credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Remove a service account public key.\n *\n * Remove one of the account's inline keys by kid. Assertions signed with it are refused from now on.\n *\n * `DELETE /v1/service-accounts/{service_account_id}/public-keys/{key_id}`\n * (DeleteServiceAccountPublicKey)\n */\n deletePublicKey(serviceAccountId: string, keyId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}/public-keys/${e(keyId)}` }, options);\n }\n\n /**\n * Get service account.\n *\n * Get a service account by ID.\n *\n * `GET /v1/service-accounts/{service_account_id}` (GetServiceAccount)\n */\n get(serviceAccountId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}` }, options);\n }\n\n /**\n * Get service account federated credential.\n *\n * Needs sys:sa:read on its owner (the instance root, its organization, or its resource's\n * organization).\n *\n * `GET /v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}`\n * (GetServiceAccountFederatedCredential)\n */\n getFederatedCredential(serviceAccountId: string, credentialId: string, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Get token configuration.\n *\n * Get token configuration for a service account.\n *\n * `GET /v1/service-accounts/{service_account_id}/token-config` (GetTokenConfig)\n */\n getTokenConfig(serviceAccountId: string, options?: RequestOptions): APIPromise<T.TokenConfiguration> {\n return this.core.request<T.TokenConfiguration>({ host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/token-config` }, options);\n }\n\n /**\n * List service accounts.\n *\n * List the instance's service accounts, filtered by owner (D6, D15, D44): owner_type root, org or a\n * resource type key lists one kind of owner's accounts, owner_id one owner's.\n *\n * `GET /v1/service-accounts` (ListServiceAccounts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListServiceAccountsParams, options?: RequestOptions): PagePromise<T.ServiceAccount, T.ListServiceAccountsResponse> {\n return this.core.page<T.ServiceAccount, T.ListServiceAccountsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts`, query: params }, options);\n }\n\n /**\n * List app scopes.\n *\n * List OAuth-style app scope configuration for a service account.\n *\n * `GET /v1/service-accounts/{service_account_id}/client-scopes` (ListClientScopes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientScopes(serviceAccountId: string, params?: T.ListClientScopesParams, options?: RequestOptions): PagePromise<T.AppScope, T.ListAppScopesResponse> {\n return this.core.page<T.AppScope, T.ListAppScopesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-scopes`, query: params }, options);\n }\n\n /**\n * List service account client secrets.\n *\n * The account's client secrets that still authenticate (D19), newest first: preview, label, status,\n * created and expiry, never the value. Needs sys:sa:secret on the account's owner.\n *\n * `GET /v1/service-accounts/{service_account_id}/client-secrets` (ListServiceAccountClientSecrets)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientSecrets(serviceAccountId: string, params?: T.ListServiceAccountClientSecretsParams, options?: RequestOptions): PagePromise<T.ServiceaccountClientSecret, T.ServiceaccountListClientSecretsResponse> {\n return this.core.page<T.ServiceaccountClientSecret, T.ServiceaccountListClientSecretsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-secrets`, query: params }, options);\n }\n\n /**\n * List service account federated credentials.\n *\n * Every federated credential of the service account (at most 20). Needs sys:sa:read on its owner (the\n * instance root, its organization, or its resource's organization).\n *\n * `GET /v1/service-accounts/{service_account_id}/federated-credentials`\n * (ListServiceAccountFederatedCredentials)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listFederatedCredentials(serviceAccountId: string, params?: T.ListServiceAccountFederatedCredentialsParams, options?: RequestOptions): PagePromise<T.FederatedCredential, T.ListFederatedCredentialsResponse> {\n return this.core.page<T.FederatedCredential, T.ListFederatedCredentialsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials`, query: params }, options);\n }\n\n /**\n * Reactivate service account.\n *\n * Reactivate a service account.\n *\n * `POST /v1/service-accounts/{service_account_id}/reactivate` (ReactivateServiceAccount)\n */\n reactivate(serviceAccountId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/reactivate` }, options);\n }\n\n /**\n * Update app scopes.\n *\n * Replace app scope configuration for a service account.\n *\n * `PUT /v1/service-accounts/{service_account_id}/client-scopes` (ReplaceClientScopes)\n */\n replaceClientScopes(serviceAccountId: string, body: T.UpdateAppScopesRequest, options?: RequestOptions): APIPromise<T.ListAppScopesResponse> {\n return this.core.request<T.ListAppScopesResponse>({ host: \"api\", method: \"PUT\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-scopes`, body }, options);\n }\n\n /**\n * Set a service account's roles.\n *\n * Replace the roles a service account holds on its owner — the instance root, its organization, or\n * its resource — with roles of the owner's type; no roles removes them all. What lies below the\n * owner is reached by inheritance. A service account never holds owner on an organization\n * (owner_not_grantable).\n *\n * `PUT /v1/service-accounts/{service_account_id}/roles` (ReplaceServiceAccountRoles)\n */\n replaceRoles(serviceAccountId: string, body: T.SetServiceAccountRolesRequest, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"PUT\", path: `/v1/service-accounts/${e(serviceAccountId)}/roles`, body }, options);\n }\n\n /**\n * Update service account.\n *\n * Update a service account.\n *\n * `PATCH /v1/service-accounts/{service_account_id}` (UpdateServiceAccount)\n */\n update(serviceAccountId: string, body: T.UpdateServiceAccountRequest, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"PATCH\", path: `/v1/service-accounts/${e(serviceAccountId)}`, body }, options);\n }\n\n /**\n * Update service account federated credential.\n *\n * Change the name, description, subject or required claims; an absent field is left as it is, and\n * required_claims, when present, replaces the map. The trusted issuer never changes. Needs\n * sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).\n *\n * `PATCH /v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}`\n * (UpdateServiceAccountFederatedCredential)\n */\n updateFederatedCredential(serviceAccountId: string, credentialId: string, body: T.UpdateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"PATCH\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials/${e(credentialId)}`, body }, options);\n }\n\n /**\n * Update token configuration.\n *\n * Update token configuration for a service account.\n *\n * `PATCH /v1/service-accounts/{service_account_id}/token-config` (UpdateTokenConfig)\n */\n updateTokenConfig(serviceAccountId: string, body: T.UpdateServiceAccountTokenConfigRequest, params?: T.UpdateTokenConfigParams, options?: RequestOptions): APIPromise<T.TokenConfiguration> {\n const { if_match } = params ?? ({} as T.UpdateTokenConfigParams);\n return this.core.request<T.TokenConfiguration>({ host: \"api\", method: \"PATCH\", path: `/v1/service-accounts/${e(serviceAccountId)}/token-config`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Bulk imports of users and organizations.\n */\nexport class UserImports {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create user import.\n *\n * Start an import run (pontive-spec 46 §5.1): a migration's batches of users and organizations, its\n * counters, a record per applied row, and revert. migration_source_id is optional; without one, rows\n * match existing users by external_id only and carry no legacy_subject or firebase_scrypt hash.\n * options are checked now and fixed: on_existing (skip, default, or update), password_policy_violation\n * (require_change, default, or allow), identity_connections (at most 20; each app must have that\n * connection, of that type), totp_app_ids (at most 20; each app must have TOTP on with an issuer) and\n * emit_events (default true: user.created for each user the run creates). Needs sys:user:manage on the\n * instance root.\n *\n * `POST /v1/user-imports` (CreateUserImport)\n */\n create(body: T.CreateUserImportRequest, options?: RequestOptions): APIPromise<T.UserImport> {\n return this.core.request<T.UserImport>({ host: \"api\", method: \"POST\", path: `/v1/user-imports`, body }, options);\n }\n\n /**\n * Get user import.\n *\n * The run with its options and counters. Needs sys:user:read on the instance root.\n *\n * `GET /v1/user-imports/{user_import_id}` (GetUserImport)\n */\n get(userImportId: string, options?: RequestOptions): APIPromise<T.UserImport> {\n return this.core.request<T.UserImport>({ host: \"api\", method: \"GET\", path: `/v1/user-imports/${e(userImportId)}` }, options);\n }\n\n /**\n * List user imports.\n *\n * The instance's import runs, newest first. Needs sys:user:read on the instance root.\n *\n * `GET /v1/user-imports` (ListUserImports)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListUserImportsParams, options?: RequestOptions): PagePromise<T.UserImport, T.ListUserImportsResponse> {\n return this.core.page<T.UserImport, T.ListUserImportsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/user-imports`, query: params }, options);\n }\n\n /**\n * List user import records.\n *\n * The run's records, one per applied row, in the order applied: what matched the row (key), what\n * happened (outcome) and why a row failed (errors, never a value from the row). Records are kept 90\n * days after the run's last batch. Needs sys:user:read on the instance root.\n *\n * `GET /v1/user-imports/{user_import_id}/records` (ListUserImportRecords)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listRecords(userImportId: string, params?: T.ListUserImportRecordsParams, options?: RequestOptions): PagePromise<T.UserImportRecord, T.ListUserImportRecordsResponse> {\n return this.core.page<T.UserImportRecord, T.ListUserImportRecordsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/user-imports/${e(userImportId)}/records`, query: params }, options);\n }\n\n /**\n * Revert user import.\n *\n * Undo, or with dry_run (default true) plan undoing, up to 1,000 of what the run created (pontive-spec\n * 46 §5.5): the organizations it created whose every member is a user it created who has not signed\n * in, then those users, deleted outright so their identifiers are free for a re-import, and the root\n * memberships it created for users it keeps (one who signed in, or one it matched rather than\n * created), counted in root_members_removed; a membership it only updated is kept. Users who signed\n * in, organizations with other members and everything the run updated are kept; kept lists them with\n * why. The run takes no more batches; call again while remaining is above 0, and the run is reverted\n * once a call finds nothing left. Needs sys:user:manage on the instance root, sys:org:delete on each\n * organization it deletes, and sys:root:grant to remove a root membership, else the user is kept as\n * forbidden.\n *\n * `POST /v1/user-imports/{user_import_id}/revert` (RevertUserImport)\n */\n revert(userImportId: string, body?: T.RevertUserImportRequest, options?: RequestOptions): APIPromise<T.UserImportRevert> {\n return this.core.request<T.UserImportRevert>({ host: \"api\", method: \"POST\", path: `/v1/user-imports/${e(userImportId)}/revert`, body }, options);\n }\n}\n\n/**\n * Users in the instance.\n */\nexport class Users {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create user.\n *\n * Create a new user.\n *\n * `POST /v1/users` (CreateUser)\n */\n create(body: T.CreateUserRequest, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"POST\", path: `/v1/users`, body }, options);\n }\n\n /**\n * Deactivate user.\n *\n * Deactivate a user.\n *\n * `POST /v1/users/{user}/deactivate` (DeactivateUser)\n */\n deactivate(user: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/deactivate` }, options);\n }\n\n /**\n * Delete user.\n *\n * Permanently delete a user.\n *\n * `DELETE /v1/users/{user}` (DeleteUser)\n */\n delete(user: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/users/${e(user)}` }, options);\n }\n\n /**\n * Revoke a user's authorized app.\n *\n * Withdraw a user's consent to an app: the grant and the user's refresh tokens at that app are\n * deleted, so the app must ask again. The user's session stays. An app the user has not authorized\n * reads as 404.\n *\n * `DELETE /v1/users/{user}/authorized-apps/{app_id}` (DeleteUserAuthorizedApp)\n */\n deleteAuthorizedApp(user: string, appId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/users/${e(user)}/authorized-apps/${e(appId)}` }, options);\n }\n\n /**\n * Get user.\n *\n * Retrieve one user by their id or their username. A value in the id form (usr_ and 26 base32\n * characters) is read as the id; anything else as the username. An email is never a path value: find a\n * user by email with GET /users?email=. Every route under /users/{user} takes either.\n *\n * `GET /v1/users/{user}` (GetUser)\n */\n get(user: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}` }, options);\n }\n\n /**\n * Get user by external id.\n *\n * Retrieve the user the caller gave this external id: an exact match on the instance-unique\n * external_id. Answers the user or 404. Percent-encode the value.\n *\n * `GET /v1/users/external_id/{external_id}` (GetUserByExternalId)\n */\n getByExternalId(externalId: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"GET\", path: `/v1/users/external_id/${e(externalId)}` }, options);\n }\n\n /**\n * Import users.\n *\n * Apply, or with dry_run (default true) plan, a batch of at most 100 users under an import run\n * (pontive-spec 46 §5.2). Each row is POST /v1/users's fields plus legacy_subject (the user's id in\n * the run's migration source), created_at (in the past), status (active or deactivated), and one of\n * password (plaintext, hashed now) or password_hash: bcrypt, argon2, scrypt, firebase_scrypt, pbkdf2,\n * django, werkzeug, aspnet_identity, wordpress, ldap or digest (§6.1). Hashes under OWASP's minimum\n * are wrapped in argon2id; every imported hash is replaced by a native one at the user's first\n * sign-in, when the password is also checked against the password policy (a change is required on\n * failure unless the run allows it). totp (base32 secret, SHA1, 6 digits, 30 seconds, with up to 16\n * recovery codes) is stored for the run's totp_app_ids; external_identities are written to the run's\n * identity_connections of their type (google, github, apple, oidc; microsoft and entra are\n * identity_not_portable). A row matches an existing user by its legacy subject, else external_id,\n * never by email: a match is skipped or, with on_existing update, updated; an email, phone or username\n * held by a user it does not match fails identifier_conflict. Each row stands alone and answers a\n * record: created, updated, skipped or failed with errors, never a value from the row. Nothing is sent\n * to the users. root_roles (at most 20 role keys of the root type, already mapped) makes the user a\n * root member with them, in the same batch and as POST /v1/root/members would: a created user, and a\n * matched one who is not a root member yet; a matched root member is skipped, or with on_existing\n * update given these roles. owner is never granted, nor a deactivated user. A root role problem fails\n * the membership, not the user: the record answers root_member with its outcome (created, updated,\n * skipped or failed) and a warning on users[i].root_roles (role_not_found, role_not_assignable,\n * owner_requires_transfer, user_not_active). Without user_import_id an applied batch starts a run with\n * the default options. The call answers 200 whatever its rows' outcomes. Needs sys:user:manage on the\n * instance root, sys:user:credentials when a row carries password, password_hash, totp or\n * external_identities (never a token acting for a user), and sys:root:grant when a row carries\n * root_roles.\n *\n * `POST /v1/users/import` (ImportUsers)\n */\n import(body: T.ImportUsersRequest, options?: RequestOptions): APIPromise<T.UserImportBatch> {\n return this.core.request<T.UserImportBatch>({ host: \"api\", method: \"POST\", path: `/v1/users/import`, body }, options);\n }\n\n /**\n * List users.\n *\n * Get a list of users with pagination and filtering.\n *\n * `GET /v1/users` (ListUsers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListUsersParams, options?: RequestOptions): PagePromise<T.User, T.ListUsersResponse> {\n return this.core.page<T.User, T.ListUsersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users`, query: params }, options);\n }\n\n /**\n * List a user's authorized apps.\n *\n * The apps a user has granted scopes to through the OAuth consent screen, with the scopes granted.\n * Unpaginated.\n *\n * `GET /v1/users/{user}/authorized-apps` (ListUserAuthorizedApps)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAuthorizedApps(user: string, params?: T.ListUserAuthorizedAppsParams, options?: RequestOptions): PagePromise<T.AuthorizedApp, T.ListAuthorizedAppsResponse> {\n return this.core.page<T.AuthorizedApp, T.ListAuthorizedAppsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/authorized-apps`, query: params }, options);\n }\n\n /**\n * List a user's groups.\n *\n * List the groups a user belongs to.\n *\n * `GET /v1/users/{user}/groups` (ListUserGroups)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroups(user: string, params?: T.ListUserGroupsParams, options?: RequestOptions): PagePromise<T.Group, T.ListGroupsResponse> {\n return this.core.page<T.Group, T.ListGroupsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/groups`, query: params }, options);\n }\n\n /**\n * List memberships for a user.\n *\n * List a user's memberships across every container kind — the instance root, organizations and\n * resources (D4) — read-only; memberships are written on their container. resource_type narrows them\n * to one kind of container by its registry key (root, org or a custom type key, D44). Each carries its\n * container's name and external_id.\n *\n * `GET /v1/users/{user}/memberships` (ListUserMemberships)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMemberships(user: string, params?: T.ListUserMembershipsParams, options?: RequestOptions): PagePromise<T.UserMembership, T.ListUserMembershipsResponse> {\n return this.core.page<T.UserMembership, T.ListUserMembershipsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/memberships`, query: params }, options);\n }\n\n /**\n * List user sessions.\n *\n * List the OP sessions belonging to a user — the records that a browser is signed in, independent of\n * any token issued. The response carries no session secret: the id is the public OIDC sid claim.\n *\n * `GET /v1/users/{user}/sessions` (ListUserSessions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listSessions(user: string, params?: T.ListUserSessionsParams, options?: RequestOptions): PagePromise<T.Session, T.ListUserSessionsResponse> {\n return this.core.page<T.Session, T.ListUserSessionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/sessions`, query: params }, options);\n }\n\n /**\n * Activate user.\n *\n * Activate a deactivated user.\n *\n * `POST /v1/users/{user}/reactivate` (ReactivateUser)\n */\n reactivate(user: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/reactivate` }, options);\n }\n\n /**\n * Revoke user session.\n *\n * End one of a user's sessions. Every grant consults the same flag afterwards, so no token has to be\n * found or enumerated. A session belonging to a different user reads as 404.\n *\n * `POST /v1/users/{user}/sessions/{session_id}/revoke` (RevokeUserSession)\n */\n revokeSession(user: string, sessionId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/sessions/${e(sessionId)}/revoke` }, options);\n }\n\n /**\n * Unlock a user's password sign-in.\n *\n * Lift every block and throttle brute-force protection holds on the user's password sign-in: each\n * address blocked for the user after too many wrong passwords, and the account-wide throttle at\n * addresses the user is not known at (pontive-spec 04 Brute-force protection). The addresses the user\n * is known at are kept. An address blocked across accounts, for guessing at many, is the address's and\n * stays blocked; allowlist it in the password policy instead. Idempotent: 204 whether or not anything\n * was blocked. Recorded as user.signin_unblocked. Needs sys:user:manage. Unpaired: nothing locks an\n * account (route review D59).\n *\n * `POST /v1/users/{user}/unlock` (UnlockUser)\n */\n unlock(user: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/unlock` }, options);\n }\n\n /**\n * Update user.\n *\n * Update an existing user (partial update)\n *\n * `PATCH /v1/users/{user}` (UpdateUser)\n */\n update(user: string, body: T.UpdateUserRequest, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"PATCH\", path: `/v1/users/${e(user)}`, body }, options);\n }\n}\n\n/**\n * Webhook subscriptions, their deliveries and the event types.\n */\nexport class Webhooks {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create webhook subscription.\n *\n * Register an endpoint for event delivery. The Standard Webhooks signing secret (\"whsec_…\") is\n * returned ONLY in this response — store it now. Omit scope, or pass \"instance\", for a client\n * subscription; scope \"organization\" with organization_id creates an organization self-service\n * subscription, and scope \"workspace\" with workspace_id one of a workspace's webhooks in the Platform\n * Plane instance, which platform-management-api creates.\n *\n * `POST /v1/webhooks/subscriptions` (CreateWebhookSubscription)\n */\n createSubscription(body: T.CreateSubscriptionRequest, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions`, body }, options);\n }\n\n /**\n * Delete webhook subscription.\n *\n * `DELETE /v1/webhooks/subscriptions/{subscription_id}` (DeleteWebhookSubscription)\n */\n deleteSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}` }, options);\n }\n\n /**\n * Get endpoint activity.\n *\n * A subscription's requests and failures per interval: one bucket per hour or UTC day of the window,\n * oldest first, empty ones included. The window ends with the interval that holds now.\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}/activity` (GetWebhookActivity)\n */\n getActivity(subscriptionId: string, params?: T.GetWebhookActivityParams, options?: RequestOptions): APIPromise<T.Activity> {\n return this.core.request<T.Activity>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/activity`, query: params }, options);\n }\n\n /**\n * Get delivery.\n *\n * A token acting for a user through an actor (RFC 8693 act) sees the recorded request and response\n * headers' names with the value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}/deliveries/{delivery_id}` (GetWebhookDelivery)\n */\n getDelivery(subscriptionId: string, deliveryId: string, options?: RequestOptions): APIPromise<T.Delivery> {\n return this.core.request<T.Delivery>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/deliveries/${e(deliveryId)}` }, options);\n }\n\n /**\n * Get event.\n *\n * `GET /v1/webhooks/events/{event_id}` (GetWebhookEvent)\n */\n getEvent(eventId: string, options?: RequestOptions): APIPromise<T.Event> {\n return this.core.request<T.Event>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/events/${e(eventId)}` }, options);\n }\n\n /**\n * Get event type.\n *\n * `GET /v1/webhooks/event-types/{event_type_name}` (GetWebhookEventType)\n */\n getEventType(eventTypeName: string, options?: RequestOptions): APIPromise<T.EventType> {\n return this.core.request<T.EventType>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/event-types/${e(eventTypeName)}` }, options);\n }\n\n /**\n * Get webhook subscription.\n *\n * A token acting for a user through an actor (RFC 8693 act) sees each custom header's name with the\n * value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}` (GetWebhookSubscription)\n */\n getSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}` }, options);\n }\n\n /**\n * Get webhook usage.\n *\n * Billing-relevant delivery counters for a period (YYYY-MM; defaults to the current month).\n *\n * `GET /v1/webhooks/usage` (GetWebhookUsage)\n */\n getUsage(params?: T.GetWebhookUsageParams, options?: RequestOptions): APIPromise<T.Usage> {\n return this.core.request<T.Usage>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/usage`, query: params }, options);\n }\n\n /**\n * List deliveries.\n *\n * List a subscription's delivery attempts (full request/response records), walked by cursor as the\n * events are (api-route-review D41). A token acting for a user through an actor (RFC 8693 act) sees\n * the recorded request and response headers' names with the value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}/deliveries` (ListWebhookDeliveries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listDeliveries(subscriptionId: string, params?: T.ListWebhookDeliveriesParams, options?: RequestOptions): PagePromise<T.Delivery, T.ListDeliveriesResponse> {\n return this.core.page<T.Delivery, T.ListDeliveriesResponse>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/deliveries`, query: params }, options);\n }\n\n /**\n * List event types.\n *\n * List system and custom event types.\n *\n * `GET /v1/webhooks/event-types` (ListWebhookEventTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEventTypes(params?: T.ListWebhookEventTypesParams, options?: RequestOptions): PagePromise<T.EventType, T.ListEventTypesResponse> {\n return this.core.page<T.EventType, T.ListEventTypesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/event-types`, query: params }, options);\n }\n\n /**\n * List events.\n *\n * Query events for inspection, walked by cursor (api-route-review D41): newest first, next_cursor\n * passed as before to page back (null at the end), or as after to poll for what was created since,\n * oldest first.\n *\n * `GET /v1/webhooks/events` (ListWebhookEvents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEvents(params?: T.ListWebhookEventsParams, options?: RequestOptions): PagePromise<T.Event, T.ListEventsResponse> {\n return this.core.page<T.Event, T.ListEventsResponse>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/events`, query: params }, options);\n }\n\n /**\n * List webhook subscriptions.\n *\n * List webhook subscriptions with filtering and pagination. A token acting for a user through an actor\n * (RFC 8693 act) sees each custom header's name with the value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions` (ListWebhookSubscriptions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listSubscriptions(params?: T.ListWebhookSubscriptionsParams, options?: RequestOptions): PagePromise<T.Subscription, T.ListSubscriptionsResponse> {\n return this.core.page<T.Subscription, T.ListSubscriptionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions`, query: params }, options);\n }\n\n /**\n * Pause webhook subscription.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/pause` (PauseWebhookSubscription)\n */\n pauseSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/pause` }, options);\n }\n\n /**\n * Resume webhook subscription.\n *\n * Reactivate a paused, failing, or disabled subscription.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/resume` (ResumeWebhookSubscription)\n */\n resumeSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/resume` }, options);\n }\n\n /**\n * Resend delivery.\n *\n * Resend the event, from its newest attempt. A failed, errored or succeeded attempt gets a fresh\n * attempt sent now, and its retried_by is set to it. A pending attempt, a scheduled retry, is sent now\n * instead of at its due time and keeps its place on the retry schedule. An attempt being sent, or one\n * that already has a successor, answers 409.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/deliveries/{delivery_id}/retry`\n * (RetryWebhookDelivery)\n */\n retryDelivery(subscriptionId: string, deliveryId: string, options?: RequestOptions): APIPromise<T.Delivery> {\n return this.core.request<T.Delivery>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/deliveries/${e(deliveryId)}/retry` }, options);\n }\n\n /**\n * Rotate webhook signing secret.\n *\n * Mint a new Standard Webhooks signing secret. The previous secret keeps signing beside the new one\n * for expire_previous_in seconds (0 to 604800, default 86400; 0 ends it now): during the overlap each\n * delivery's webhook-signature header carries one signature per secret, so subscribers rotate with\n * zero downtime. The NEW plaintext secret is returned only here.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/rotate-secret` (RotateWebhookSecret)\n */\n rotateSecret(subscriptionId: string, body?: T.RotateSecretRequest, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/rotate-secret`, body }, options);\n }\n\n /**\n * Update webhook subscription.\n *\n * Patch mutable fields (url, description, event_types, headers, metadata). A token acting for a user\n * through an actor (RFC 8693 act) may not set headers (403 actor_refused: custom headers can hold\n * credentials) and sees them masked (\"••••••\") in the response.\n *\n * `PATCH /v1/webhooks/subscriptions/{subscription_id}` (UpdateWebhookSubscription)\n */\n updateSubscription(subscriptionId: string, body: T.UpdateSubscriptionRequest, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"PATCH\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}`, body }, options);\n }\n}\n\n","import { managementAudience, managementBase } from \"../management-credential\";\nimport { processEnv, type Env } from \"../env\";\nimport { Core, tokenSource, type Host } from \"./core\";\nimport { PontiveNamespaces } from \"./generated/namespaces\";\n\n/**\n * How a {@link Pontive} client authenticates and where it sends its calls.\n * Every field is optional: one left out falls back to its environment\n * variable, so `new Pontive()` works with `PONTIVE_SECRET_KEY` set.\n */\nexport interface PontiveOptions {\n /** The instance's secret key, `pontive_sk_…`. Default: `PONTIVE_SECRET_KEY`. */\n secretKey?: string;\n /**\n * A bearer token, or a function returning one, for a caller that manages\n * its own: a management token, or a user's me token for `pontive.me`.\n */\n token?: string | (() => string | Promise<string>);\n /** A service account's client id; with `clientSecret`, exchanged at `issuer` for a management token. */\n clientId?: string;\n /** A service account's client secret. */\n clientSecret?: string;\n /**\n * The instance's issuer: where client credentials are exchanged, and the\n * auth domain that serves `pontive.me` (the signed-in user's own routes,\n * called with that user's me token). Default: `PONTIVE_ISSUER`.\n */\n issuer?: string;\n /**\n * The instance's region (`us`, `eu`, `au`): it picks `api.{region}.pontive.com`\n * and its `authz.` and `ingest.` hosts. Default: the region a secret key\n * names, then `PONTIVE_REGION`, then the region in the issuer's host.\n */\n region?: string;\n /** Overrides the management API's base, for a proxy or a non-production Pontive. Default: `PONTIVE_MANAGEMENT_URL`. */\n managementUrl?: string;\n /** Overrides the authorization host. Default: `managementUrl` with its `api.` label replaced by `authz.`. */\n authzUrl?: string;\n /** Overrides the usage ingestion host. Default: `managementUrl` with its `api.` label replaced by `ingest.`. */\n ingestUrl?: string;\n /** Sent as `X-Pontive-Instance-ID`; a secret key names its own instance and needs none. Default: `PONTIVE_INSTANCE_ID`. */\n instanceId?: string;\n /** How many times a failed call is retried: a 429, a 5xx or a network error, when it is safe to repeat. Default 2. */\n maxRetries?: number;\n /** Milliseconds each attempt may take. Default 60000. */\n timeout?: number;\n /** The `fetch` to send with. Default: the global one. */\n fetch?: typeof fetch;\n /** The environment to fall back to. Default: `process.env`. */\n env?: Env;\n}\n\n/** The region a secret key names: `pontive_sk_live_us_…` → `us`. */\nexport function secretKeyRegion(key: string): string | undefined {\n return /^pontive_sk_(?:test|live)_([a-z0-9]+)_/.exec(key.trim())?.[1];\n}\n\nfunction issuerRegion(issuer: string | undefined): string | undefined {\n if (!issuer) return undefined;\n try {\n return /(?:^|\\.)auth\\.([a-z0-9]+)\\./i.exec(new URL(issuer).hostname)?.[1]?.toLowerCase();\n } catch {\n return undefined;\n }\n}\n\n/** `base` with its leading `api.` label replaced: the authz and ingest hosts beside the management API. */\nfunction sibling(base: string, label: string): string {\n try {\n const url = new URL(base);\n if (!url.hostname.toLowerCase().startsWith(\"api.\")) return base;\n url.hostname = `${label}.${url.hostname.slice(4)}`;\n return url.origin;\n } catch {\n return base;\n }\n}\n\nfunction origin(url: string | undefined): string {\n if (!url) return \"\";\n try {\n return new URL(url).origin;\n } catch {\n return \"\";\n }\n}\n\nconst trim = (v: string | undefined): string | undefined => (v && v.trim() ? v.trim() : undefined);\nconst trimSlash = (v: string): string => v.replace(/\\/+$/, \"\");\n\nfunction inBrowser(): boolean {\n const g = globalThis as { window?: unknown; document?: unknown };\n return typeof g.window !== \"undefined\" && typeof g.document !== \"undefined\";\n}\n\n/**\n * A client for Pontive's management API, and its authorization and usage\n * ingestion hosts. Namespaces follow the API: `pontive.users`,\n * `pontive.organizations`, `pontive.billing.invoices`, …; method names follow\n * its operation ids.\n *\n * ```ts\n * const pontive = new Pontive({ secretKey: process.env.PONTIVE_SECRET_KEY });\n * const user = await pontive.users.get(\"usr_…\");\n * for await (const org of pontive.organizations.list()) console.log(org.name);\n * ```\n *\n * Server-side only: a secret key or client secret never belongs in a browser,\n * and the constructor refuses one there.\n */\nexport class Pontive extends PontiveNamespaces {\n constructor(options: PontiveOptions = {}) {\n const env = options.env ?? processEnv();\n const secretKey = options.secretKey ?? trim(env.PONTIVE_SECRET_KEY);\n const issuer = options.issuer ?? trim(env.PONTIVE_ISSUER);\n const hasClientCredentials = !!(options.clientId && options.clientSecret);\n if (!options.token && !secretKey && !hasClientCredentials) {\n throw new Error(\"pontive: no credential: pass secretKey, token, or clientId and clientSecret, or set PONTIVE_SECRET_KEY\");\n }\n if ((secretKey || options.clientSecret) && inBrowser()) {\n throw new Error(\"pontive: a secret key or client secret must never reach a browser; call the management API from your server\");\n }\n if (!options.token && !secretKey && !issuer) {\n throw new Error(\"pontive: client credentials need the issuer to exchange them at: pass issuer or set PONTIVE_ISSUER\");\n }\n\n let managementUrl = options.managementUrl ?? trim(env.PONTIVE_MANAGEMENT_URL);\n if (!managementUrl) {\n const region =\n options.region ??\n (secretKey && !options.token ? secretKeyRegion(secretKey) : undefined) ??\n trim(env.PONTIVE_REGION) ??\n issuerRegion(issuer);\n if (region) managementUrl = `https://api.${region}.pontive.com`;\n // A me token for pontive.me on a custom auth domain needs no region.\n else if (!(options.token && issuer)) {\n throw new Error(\"pontive: no region: pass region or managementUrl, or use a secret key, which names its region\");\n }\n }\n const base = managementUrl ? managementBase(managementUrl) : \"\";\n const hosts: Record<Host, string> = {\n api: base,\n authz: options.authzUrl ? trimSlash(options.authzUrl) : base && sibling(base, \"authz\"),\n ingest: options.ingestUrl ? trimSlash(options.ingestUrl) : base && sibling(base, \"ingest\"),\n auth: origin(issuer),\n };\n const fetchImpl = options.fetch ?? globalThis.fetch.bind(globalThis);\n const tokens = tokenSource({\n token: options.token ?? secretKey,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n issuer,\n audience: managementAudience(base),\n fetch: fetchImpl,\n });\n super(\n new Core({\n hosts,\n token: tokens.token,\n invalidate: tokens.invalidate,\n instanceId: options.instanceId ?? trim(env.PONTIVE_INSTANCE_ID),\n maxRetries: Math.max(options.maxRetries ?? 2, 0),\n timeout: options.timeout ?? 60_000,\n fetch: fetchImpl,\n }),\n );\n }\n}\n"],"names":["PONTIVE_ENV","processEnv","nonEmpty","value","withEnvFallback","config","env","isDevelopment","keylessApplies","PontiveAPIError","status","headers","body","str","v","code","requestId","message","Kind","STATUS","InternalServerError","BadRequestError","AuthenticationError","PermissionDeniedError","NotFoundError","ConflictError","PreconditionFailedError","UnprocessableEntityError","RateLimitError","PontiveConnectionError","options","VERSION","MAX_RETRY_WAIT_MS","Core","req","APIPromise","kind","load","query","data","response","Page","next","PagePromise","retries","idempotencyKey","repeatable","host","url","queryString","sleep","ms","r","reauthed","attempt","k","timeout","signal","res","err","backoff","decode","errBody","readBody","retryable","q","item","s","binary","text","ra","secs","at","result","onfulfilled","onrejected","onfinally","p","page","tokenSource","input","token","cached","pending","clientCredentialsToken","e","PontiveNamespaces","core","AccessKeys","Agents","Apis","Apps","Authn","Authz","Billing","Branding","Capabilities","Countries","Delegations","Groups","Logs","Me","Organizations","PersonalAccessTokens","Resources","Root","ServiceAccounts","UserImports","Users","Webhooks","accessKeyId","params","agentId","secretId","credentialId","organizationId","keyId","apiId","appId","if_match","AuthnAccountLinking","AuthnAuthflows","AuthnConnections","AuthnIdentityPolicy","AuthnMigrationSources","AuthnPasswordPolicy","AuthnSharedCredentials","AuthnTrustedIssuers","authflowId","connectionSlug","migrationSourceId","trustedIssuerId","AuthzModel","AuthzPermissions","AuthzResourceTypes","AuthzRoles","resourceType","permissionKey","roleKey","BillingCatalog","BillingCatalogRules","BillingCheckoutSessions","BillingContracts","BillingCreditNotes","BillingCurrencies","BillingCustomers","BillingDisputes","BillingDunning","BillingEntitlements","BillingEventTypes","BillingEvents","BillingExchangeRates","BillingFeatures","BillingGrants","BillingInvoices","BillingLedger","BillingMeters","BillingPackages","BillingPaymentConnections","BillingPaymentMethods","BillingPayments","BillingPricingUnits","BillingProducts","BillingRateCards","BillingRefunds","BillingSettings","BillingTax","BillingTimeMachines","BillingUsage","checkoutSessionId","contractId","editId","creditNoteId","customerId","disputeId","eventType","eventId","from","to","date","feature","grantId","invoiceId","unit","meter","package_","paymentConnectionId","paymentMethodId","paymentId","pricingUnit","product","rateCard","rateId","refundId","timeMachineId","BrandingBlueprints","BrandingLocalization","blueprintId","CapabilitiesBilling","CapabilitiesFga","delegationId","groupId","userId","auditLogEntryId","MeBilling","containerId","organization","installationId","invitationId","source","externalId","personalAccessTokenId","resourceId","serviceAccountId","userImportId","user","sessionId","subscriptionId","deliveryId","eventTypeName","secretKeyRegion","key","issuerRegion","issuer","sibling","base","label","origin","trim","trimSlash","inBrowser","g","Pontive","secretKey","hasClientCredentials","managementUrl","region","managementBase","hosts","fetchImpl","tokens","managementAudience"],"mappings":";AAqBO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACX;AAKO,SAASC,IAAkB;AAChC,MAAI;AACF,WAAQ,WAA2C,SAAS,OAAO,CAAA;AAAA,EACrE,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACF;AAEA,MAAMC,IAAW,CAACC,MAAmDA,KAASA,EAAM,SAASA,EAAM,KAAA,IAAS;AAGrG,SAASC,GAAgBC,GAA0BC,IAAWL,KAAgC;AACnG,SAAO;AAAA,IACL,GAAGI;AAAA,IACH,QAAQA,EAAO,UAAUH,EAASI,EAAIN,EAAY,MAAM,CAAC;AAAA,IACzD,UAAUK,EAAO,YAAYH,EAASI,EAAIN,EAAY,QAAQ,CA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B,cAAM,IAAI,MAAM,+FAA+F;AAAA,IAEnH;AACA,UAAME,IAAOU,IAAgBE,EAAeF,CAAa,IAAI,IACvDG,IAA8B;AAAA,MAClC,KAAKb;AAAA,MACL,OAAOnM,EAAQ,WAAWuM,EAAUvM,EAAQ,QAAQ,IAAImM,KAAQD,EAAQC,GAAM,OAAO;AAAA,MACrF,QAAQnM,EAAQ,YAAYuM,EAAUvM,EAAQ,SAAS,IAAImM,KAAQD,EAAQC,GAAM,QAAQ;AAAA,MACzF,MAAME,GAAOJ,CAAM;AAAA,IAAA,GAEfgB,IAAYjN,EAAQ,SAAS,WAAW,MAAM,KAAK,UAAU,GAC7DkN,IAASjK,GAAY;AAAA,MACzB,OAAOjD,EAAQ,SAAS2M;AAAA,MACxB,UAAU3M,EAAQ;AAAA,MAClB,cAAcA,EAAQ;AAAA,MACtB,QAAAiM;AAAA,MACA,UAAUkB,EAAmBhB,CAAI;AAAA,MACjC,OAAOc;AAAA,IAAA,CACR;AACD;AAAA,MACE,IAAI9M,EAAK;AAAA,QACP,OAAA6M;AAAA,QACA,OAAOE,EAAO;AAAA,QACd,YAAYA,EAAO;AAAA,QACnB,YAAYlN,EAAQ,cAAcsM,EAAK9N,EAAI,mBAAmB;AAAA,QAC9D,YAAY,KAAK,IAAIwB,EAAQ,cAAc,GAAG,CAAC;AAAA,QAC/C,SAASA,EAAQ,WAAW;AAAA,QAC5B,OAAOiN;AAAA,MAAA,CACR;AAAA,IAAA;AAAA,EAEL;AACF;"}
1
+ {"version":3,"file":"client-DhAfqKrD.js","sources":["../src/env.ts","../src/management/errors.ts","../src/management/core.ts","../src/management/generated/namespaces.ts","../src/management/client.ts"],"sourcesContent":["import type { ServerAuthConfig } from \"./config\";\n\n/**\n * The environment contract (pontive-spec 47 §6.1): the variables the SDK falls\n * back to when the app does not pass a field. Explicit config always wins.\n *\n * | Variable | Holds |\n * | ------------------------ | -------------------------------------------------- |\n * | `PONTIVE_ISSUER` | the instance's issuer (its auth domain origin) |\n * | `PONTIVE_CLIENT_ID` | the app's id |\n * | `PONTIVE_CLIENT_SECRET` | a confidential (`web`) app's client secret |\n * | `PONTIVE_SESSION_SECRET` | 32+ random characters, generated locally |\n * | `PONTIVE_SECRET_KEY` | the instance's secret key (management calls; not read here) |\n * | `PONTIVE_INSTANCE_ID` | the instance's id (not secret; not read here) |\n * | `PONTIVE_MANAGEMENT_URL` | overrides the management API's base (`Pontive`) |\n *\n * And for keyless mode (§6.2): `PONTIVE_KEYLESS` (`0` turns it off),\n * `PONTIVE_API_URL` (where the provisioning routes live, default\n * `https://api.pontive.com`) and `PONTIVE_REGION` (the region to provision in;\n * default: the one nearest the caller).\n */\nexport const PONTIVE_ENV = {\n issuer: \"PONTIVE_ISSUER\",\n clientId: \"PONTIVE_CLIENT_ID\",\n clientSecret: \"PONTIVE_CLIENT_SECRET\",\n sessionSecret: \"PONTIVE_SESSION_SECRET\",\n secretKey: \"PONTIVE_SECRET_KEY\",\n instanceId: \"PONTIVE_INSTANCE_ID\",\n managementUrl: \"PONTIVE_MANAGEMENT_URL\",\n apiUrl: \"PONTIVE_API_URL\",\n region: \"PONTIVE_REGION\",\n keyless: \"PONTIVE_KEYLESS\",\n} as const;\n\nexport type Env = Readonly<Record<string, string | undefined>>;\n\n/** `process.env`, or nothing where there is no `process` (a browser, some edge runtimes). */\nexport function processEnv(): Env {\n try {\n return (globalThis as { process?: { env?: Env } }).process?.env ?? {};\n } catch {\n return {};\n }\n}\n\nconst nonEmpty = (value: string | undefined): string | undefined => (value && value.trim() ? value.trim() : undefined);\n\n/** The config with every field the app left out taken from the environment. */\nexport function withEnvFallback(config: ServerAuthConfig, env: Env = processEnv()): ServerAuthConfig {\n return {\n ...config,\n issuer: config.issuer || nonEmpty(env[PONTIVE_ENV.issuer]),\n clientId: config.clientId || nonEmpty(env[PONTIVE_ENV.clientId]),\n clientSecret: config.clientSecret || nonEmpty(env[PONTIVE_ENV.clientSecret]),\n sessionSecret: config.sessionSecret || nonEmpty(env[PONTIVE_ENV.sessionSecret]),\n };\n}\n\n/** `NODE_ENV === \"development\"`: `next dev`, `vite`, and the like. Never a production build. */\nexport function isDevelopment(env: Env = processEnv()): boolean {\n return env.NODE_ENV === \"development\";\n}\n\n/**\n * Whether keyless mode applies (pontive-spec 47 §6.2, decision E3): in\n * development only, with no issuer passed or in `PONTIVE_ISSUER`, unless\n * `PONTIVE_KEYLESS=0`. Anywhere else a missing issuer is the usual\n * `issuer is required` error.\n */\nexport function keylessApplies(config: ServerAuthConfig, env: Env = processEnv()): boolean {\n return isDevelopment(env) && !config.issuer && env[PONTIVE_ENV.keyless]?.trim() !== \"0\";\n}\n","/** One per-field finding of a refusal. */\nexport interface ErrorDetail {\n field?: string;\n code?: string;\n message?: string;\n path?: string;\n [key: string]: unknown;\n}\n\n/**\n * A refusal from the management API: a non-2xx answer, with the API's error\n * envelope. Each status has its own subclass (`NotFoundError`,\n * `RateLimitError`, …); read `code` for the precise reason.\n *\n * ```ts\n * try {\n * await pontive.organizations.createMember(org, { user_id });\n * } catch (err) {\n * if (err instanceof PontiveAPIError && err.code === \"seat_limit_reached\") { … }\n * else throw err;\n * }\n * ```\n */\nexport class PontiveAPIError extends Error {\n /** The HTTP status. */\n readonly status: number;\n /** The category: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. */\n readonly type?: string;\n /** The machine-readable reason, such as `permission_denied` or `seat_limit_reached`. */\n readonly code?: string;\n /** The request parameter the error is about, when there is one. */\n readonly param?: string;\n /** Documentation about the error, when there is some. */\n readonly docUrl?: string;\n /** Per-field findings, on a refusal that has them. */\n readonly details: ErrorDetail[];\n /** The `X-Request-ID` the API answered with; quote it to support. */\n readonly requestId?: string;\n /** The response's headers. */\n readonly headers: Headers;\n /** The response body as it came (parsed JSON, or text). */\n readonly body: unknown;\n\n constructor(status: number, headers: Headers, body: unknown) {\n const env = (body as { error?: Record<string, unknown> } | undefined)?.error ?? {};\n const str = (v: unknown): string | undefined => (typeof v === \"string\" && v ? v : undefined);\n const code = str(env.code);\n const requestId = headers.get(\"x-request-id\") ?? undefined;\n const message = str(env.message) ?? `HTTP ${status}`;\n super(`pontive: ${status}${code ? ` ${code}` : \"\"}: ${message}${requestId ? ` (request ${requestId})` : \"\"}`);\n this.name = new.target.name;\n this.status = status;\n this.type = str(env.type);\n this.code = code;\n this.param = str(env.param);\n this.docUrl = str(env.doc_url);\n this.details = Array.isArray(env.details) ? (env.details as ErrorDetail[]) : [];\n this.requestId = requestId;\n this.headers = headers;\n this.body = body;\n }\n\n /** The error for a status: its subclass where it has one. */\n static from(status: number, headers: Headers, body: unknown): PontiveAPIError {\n const Kind = STATUS[status] ?? (status >= 500 ? InternalServerError : PontiveAPIError);\n return new Kind(status, headers, body);\n }\n}\n\n/** 400 */\nexport class BadRequestError extends PontiveAPIError {}\n/** 401: the credential is missing, wrong, expired or for another API. */\nexport class AuthenticationError extends PontiveAPIError {}\n/** 403: the credential may not do this. */\nexport class PermissionDeniedError extends PontiveAPIError {}\n/** 404 */\nexport class NotFoundError extends PontiveAPIError {}\n/** 409 */\nexport class ConflictError extends PontiveAPIError {}\n/** 412: an `If-Match` that no longer matches. */\nexport class PreconditionFailedError extends PontiveAPIError {}\n/** 422: the request is understood but invalid; `details` says where. */\nexport class UnprocessableEntityError extends PontiveAPIError {}\n/** 429: retried automatically first; this is what is left after the retries. */\nexport class RateLimitError extends PontiveAPIError {}\n/** 5xx */\nexport class InternalServerError extends PontiveAPIError {}\n\nconst STATUS: Record<number, new (status: number, headers: Headers, body: unknown) => PontiveAPIError> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 412: PreconditionFailedError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n};\n\n/** A call that got no answer: a network failure, a timeout or an abort. */\nexport class PontiveConnectionError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"PontiveConnectionError\";\n }\n}\n","import { clientCredentialsToken } from \"../oidc\";\nimport { PontiveAPIError, PontiveConnectionError } from \"./errors\";\n\n/** The host an operation is served on: api.{region}, authz.{region}, ingest.{region}, or the instance's auth domain (`/v1/me`). */\nexport type Host = \"api\" | \"authz\" | \"ingest\" | \"auth\";\n\n/** One call, as a generated method describes it. */\nexport interface APIRequest {\n host: Host;\n method: string;\n path: string;\n query?: object;\n headers?: Record<string, string | undefined>;\n body?: unknown;\n /** The operation takes `X-Idempotency-Key`. */\n idempotent?: boolean;\n /** The result is a file, not JSON. */\n binary?: boolean;\n}\n\n/** Options for one call. */\nexport interface RequestOptions {\n /**\n * The call's `X-Idempotency-Key`. Operations that take one get a random key\n * by default, the same across the call's retries; set your own to make a\n * call safe to repeat across processes.\n */\n idempotencyKey?: string;\n /** Extra headers. */\n headers?: Record<string, string>;\n /** How many times the call is retried; `0` turns retries off. */\n maxRetries?: number;\n /** Milliseconds each attempt may take. */\n timeout?: number;\n /** Aborts the call. */\n signal?: AbortSignal;\n}\n\nexport interface CoreConfig {\n hosts: Record<Host, string>;\n token: () => Promise<string>;\n /** Drops a cached token the API refused; true when a new one can be had. */\n invalidate: () => boolean;\n instanceId?: string;\n maxRetries: number;\n timeout: number;\n fetch: typeof fetch;\n /** Tests replace the waits between retries. */\n sleep?: (ms: number) => Promise<void>;\n}\n\ndeclare const __PONTIVE_SERVER_VERSION__: string;\nconst VERSION: string = typeof __PONTIVE_SERVER_VERSION__ === \"string\" ? __PONTIVE_SERVER_VERSION__ : \"0.0.0\";\n\nconst MAX_RETRY_WAIT_MS = 60_000;\n\n/** The request engine every generated method calls. */\nexport class Core {\n constructor(private readonly config: CoreConfig) {}\n\n request<T>(req: APIRequest, options?: RequestOptions): APIPromise<T> {\n return new APIPromise(this.send<T>(req, options));\n }\n\n page<Item, Body>(kind: \"page\" | \"cursor\", req: APIRequest, options?: RequestOptions): PagePromise<Item, Body> {\n const load = (query: object | undefined): Promise<{ data: Page<Item, Body>; response: Response }> =>\n this.send<Body>({ ...req, query }, options).then(({ data, response }) => ({\n data: new Page<Item, Body>(kind, data, query, (next) => new PagePromise(load(next))),\n response,\n }));\n return new PagePromise(load(req.query));\n }\n\n private async send<T>(req: APIRequest, options: RequestOptions = {}): Promise<{ data: T; response: Response }> {\n const { config } = this;\n const retries = options.maxRetries ?? config.maxRetries;\n const idempotencyKey = options.idempotencyKey ?? (req.idempotent ? crypto.randomUUID() : undefined);\n // Safe to repeat: the method is, or an idempotency key makes the API answer a repeat from its record.\n const repeatable = req.method !== \"POST\" || idempotencyKey !== undefined;\n const host = config.hosts[req.host];\n if (!host) {\n throw new Error(\n req.host === \"auth\"\n ? \"pontive: pontive.me is served on the instance's auth domain: pass issuer or set PONTIVE_ISSUER\"\n : \"pontive: no region: pass region or managementUrl\",\n );\n }\n const url = host + req.path + queryString(req.query);\n const body = req.body === undefined ? undefined : JSON.stringify(req.body);\n const sleep = config.sleep ?? ((ms: number) => new Promise<void>((r) => setTimeout(r, ms)));\n\n let reauthed = false;\n for (let attempt = 0; ; attempt++) {\n const headers = new Headers();\n for (const [k, v] of Object.entries(req.headers ?? {})) if (v !== undefined && v !== \"\") headers.set(k, v);\n for (const [k, v] of Object.entries(options.headers ?? {})) headers.set(k, v);\n headers.set(\"authorization\", `Bearer ${await config.token()}`);\n headers.set(\"accept\", req.binary ? \"*/*\" : \"application/json\");\n headers.set(\"user-agent\", `pontive-typescript/${VERSION}`);\n if (body !== undefined) headers.set(\"content-type\", \"application/json\");\n if (idempotencyKey) headers.set(\"x-idempotency-key\", idempotencyKey);\n if (config.instanceId) headers.set(\"x-pontive-instance-id\", config.instanceId);\n\n const timeout = AbortSignal.timeout(options.timeout ?? config.timeout);\n const signal = options.signal ? AbortSignal.any([options.signal, timeout]) : timeout;\n let res: Response;\n try {\n res = await config.fetch(url, { method: req.method, headers, body, signal });\n } catch (err) {\n if (options.signal?.aborted || !repeatable || attempt >= retries) {\n throw new PontiveConnectionError(`pontive: ${req.method} ${req.path}: ${(err as Error).message}`, { cause: err });\n }\n await sleep(backoff(attempt));\n continue;\n }\n\n if (res.ok) return { data: (await decode(res, req.binary)) as T, response: res };\n if (res.status === 401 && !reauthed && config.invalidate()) {\n // A cached client-credentials token the API no longer accepts: exchange again, once.\n reauthed = true;\n attempt--;\n continue;\n }\n const errBody = await readBody(res);\n if (attempt < retries && retryable(res.status, repeatable)) {\n await sleep(backoff(attempt, res.headers));\n continue;\n }\n throw PontiveAPIError.from(res.status, res.headers, errBody);\n }\n }\n}\n\nfunction queryString(query: object | undefined): string {\n if (!query) return \"\";\n const q = new URLSearchParams();\n for (const [k, v] of Object.entries(query)) {\n if (v === undefined || v === null) continue;\n if (Array.isArray(v)) for (const item of v) q.append(k, String(item));\n else q.append(k, String(v));\n }\n const s = q.toString();\n return s ? `?${s}` : \"\";\n}\n\nasync function decode(res: Response, binary?: boolean): Promise<unknown> {\n if (binary) return new Uint8Array(await res.arrayBuffer());\n const text = await res.text();\n if (res.status === 204 || text.trim() === \"\") return undefined;\n try {\n return JSON.parse(text);\n } catch {\n throw new PontiveConnectionError(`pontive: the ${res.status} response is not JSON`);\n }\n}\n\nasync function readBody(res: Response): Promise<unknown> {\n const text = await res.text().catch(() => \"\");\n try {\n return JSON.parse(text);\n } catch {\n return text;\n }\n}\n\n/** A 429 was not executed, so it is always retried; a 408 or 5xx only when the call is safe to repeat. */\nfunction retryable(status: number, repeatable: boolean): boolean {\n if (status === 429) return true;\n return repeatable && [408, 500, 502, 503, 504].includes(status);\n}\n\n/** Honours Retry-After (seconds or an HTTP date, at most a minute), else 0.5s doubling, at most 8s, with jitter. */\nexport function backoff(attempt: number, headers?: Headers): number {\n const ra = headers?.get(\"retry-after\")?.trim();\n if (ra) {\n const secs = Number(ra);\n if (Number.isFinite(secs) && secs >= 0) return Math.min(secs * 1000, MAX_RETRY_WAIT_MS);\n const at = Date.parse(ra);\n if (!Number.isNaN(at)) return Math.min(Math.max(at - Date.now(), 0), MAX_RETRY_WAIT_MS);\n }\n const base = Math.min(500 * 2 ** attempt, 8000);\n return base * (0.75 + Math.random() * 0.5);\n}\n\n/**\n * The result of a call: await it for the decoded body, or call\n * `withResponse()` for the body and the `Response`, to read a header such as\n * the `ETag` an `If-Match` update needs.\n */\nexport class APIPromise<T> implements PromiseLike<T> {\n constructor(private readonly result: Promise<{ data: T; response: Response }>) {\n // A rejection nobody awaits is the caller's to handle, not an unhandled one of ours.\n result.catch(() => {});\n }\n\n /** The decoded body and the HTTP response. */\n withResponse(): Promise<{ data: T; response: Response }> {\n return this.result;\n }\n\n then<A = T, B = never>(\n onfulfilled?: ((value: T) => A | PromiseLike<A>) | null,\n onrejected?: ((reason: unknown) => B | PromiseLike<B>) | null,\n ): Promise<A | B> {\n return this.result.then((r) => r.data).then(onfulfilled, onrejected);\n }\n\n catch<B = never>(onrejected?: ((reason: unknown) => B | PromiseLike<B>) | null): Promise<T | B> {\n return this.then(undefined, onrejected);\n }\n\n finally(onfinally?: (() => void) | null): Promise<T> {\n return this.then().finally(onfinally);\n }\n}\n\n/** A page of a list, and the way to the next one. */\nexport class Page<Item, Body> implements AsyncIterable<Item> {\n /** This page's items. */\n readonly data: Item[];\n\n constructor(\n private readonly kind: \"page\" | \"cursor\",\n /** The response body as the API sent it, with its pagination. */\n readonly body: Body,\n private readonly query: object | undefined,\n private readonly load: (query: object) => PagePromise<Item, Body>,\n ) {\n const data = (body as { data?: Item[] } | undefined)?.data;\n this.data = Array.isArray(data) ? data : [];\n }\n\n /** Whether there is a page after this one. */\n hasNextPage(): boolean {\n if (this.data.length === 0) return false;\n if (this.kind === \"cursor\") {\n const next = (this.body as { next_cursor?: string }).next_cursor;\n return !!next && next !== (this.query as { after?: string } | undefined)?.after;\n }\n const p = (this.body as { pagination?: { page?: number; total_pages?: number } }).pagination;\n return !!p && (p.page ?? 0) < (p.total_pages ?? 0);\n }\n\n /** The next page; call only when `hasNextPage()`. */\n nextPage(): PagePromise<Item, Body> {\n if (this.kind === \"cursor\") {\n return this.load({ ...this.query, after: (this.body as { next_cursor?: string }).next_cursor });\n }\n const p = (this.body as { pagination?: { page?: number } }).pagination;\n return this.load({ ...this.query, page: (p?.page ?? 1) + 1 });\n }\n\n /** Every item from this page on, fetching the next pages as it goes. */\n async *[Symbol.asyncIterator](): AsyncIterator<Item> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let page: Page<Item, Body> = this;\n for (;;) {\n yield* page.data;\n if (!page.hasNextPage()) return;\n page = await page.nextPage();\n }\n }\n}\n\n/**\n * A list call: await it for the first `Page`, or iterate it with\n * `for await (const item of …)` for every item across pages.\n */\nexport class PagePromise<Item, Body> extends APIPromise<Page<Item, Body>> implements AsyncIterable<Item> {\n async *[Symbol.asyncIterator](): AsyncIterator<Item> {\n yield* await this;\n }\n}\n\n/** A token for a credential: as it is, from the caller's function, or exchanged for client credentials. */\nexport function tokenSource(input: {\n token?: string | (() => string | Promise<string>);\n clientId?: string;\n clientSecret?: string;\n issuer?: string;\n audience: string;\n fetch: typeof fetch;\n}): { token: () => Promise<string>; invalidate: () => boolean } {\n const { token } = input;\n if (typeof token === \"string\") return { token: async () => token, invalidate: () => false };\n if (typeof token === \"function\") return { token: async () => token(), invalidate: () => false };\n\n let cached: { value: string; until: number } | undefined;\n let pending: Promise<string> | undefined;\n return {\n token: async () => {\n if (cached && Date.now() < cached.until) return cached.value;\n pending ??= clientCredentialsToken(\n { issuer: input.issuer!, clientId: input.clientId!, clientSecret: input.clientSecret },\n input.fetch,\n { resource: input.audience },\n )\n .then((res) => {\n cached = { value: res.access_token, until: Date.now() + ((res.expires_in ?? 300) - 60) * 1000 };\n return res.access_token;\n })\n .finally(() => {\n pending = undefined;\n });\n return pending;\n },\n invalidate: () => {\n cached = undefined;\n return true;\n },\n };\n}\n","// Code generated by pontive-sdk-gen 1 from management-api's OpenAPI documents. DO NOT EDIT.\n// Source fingerprint: 21ac762c6242a973df6e7eeb7628bf278ce69cedd53e7961c76cb7e8814bd3a8\n\nimport type { APIPromise, Core, PagePromise, RequestOptions } from \"../core\";\nimport type * as T from \"./types\";\n\nconst e = encodeURIComponent;\n\n/**\n * Every namespace of the management API.\n */\nexport class PontiveNamespaces {\n /**\n * Access keys: the customer's own API credentials, issued by the instance.\n */\n readonly accessKeys: AccessKeys;\n /**\n * Agents, their credentials, and where they are installed.\n */\n readonly agents: Agents;\n /**\n * Registered APIs: the customer's own APIs, their scopes and the clients allowed to call them.\n */\n readonly apis: Apis;\n /**\n * Apps: OAuth clients, their secrets and keys, and the organizations they may sign in.\n */\n readonly apps: Apps;\n /**\n * Authentication configuration.\n */\n readonly authn: Authn;\n /**\n * Authorization: AuthZEN access decisions and searches on the authz host, and the authorization model.\n */\n readonly authz: Authz;\n /**\n * Billing for the instance's own customers. Bodies and results are open objects: the OpenAPI document\n * does not type them yet.\n */\n readonly billing: Billing;\n /**\n * The brand: its document, blueprints, localization and widgets.\n */\n readonly branding: Branding;\n /**\n * The instance's optional capabilities.\n */\n readonly capabilities: Capabilities;\n /**\n * Reference data.\n */\n readonly countries: Countries;\n /**\n * What agents may do for users.\n */\n readonly delegations: Delegations;\n /**\n * Groups and the roles they grant.\n */\n readonly groups: Groups;\n /**\n * Audit and request logs.\n */\n readonly logs: Logs;\n /**\n * The signed-in user's own surface. Needs a user's me token, not a secret key.\n */\n readonly me: Me;\n /**\n * Organizations, their members, invitations and settings.\n */\n readonly organizations: Organizations;\n /**\n * Personal access tokens.\n */\n readonly personalAccessTokens: PersonalAccessTokens;\n /**\n * Resources, their members and their parent.\n */\n readonly resources: Resources;\n /**\n * The instance root: its members, invitations, installations and group roles.\n */\n readonly root: Root;\n /**\n * Service accounts: machine identities, their credentials and roles.\n */\n readonly serviceAccounts: ServiceAccounts;\n /**\n * Bulk imports of users and organizations.\n */\n readonly userImports: UserImports;\n /**\n * Users in the instance.\n */\n readonly users: Users;\n /**\n * Webhook subscriptions, their deliveries and the event types.\n */\n readonly webhooks: Webhooks;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.accessKeys = new AccessKeys(core);\n this.agents = new Agents(core);\n this.apis = new Apis(core);\n this.apps = new Apps(core);\n this.authn = new Authn(core);\n this.authz = new Authz(core);\n this.billing = new Billing(core);\n this.branding = new Branding(core);\n this.capabilities = new Capabilities(core);\n this.countries = new Countries(core);\n this.delegations = new Delegations(core);\n this.groups = new Groups(core);\n this.logs = new Logs(core);\n this.me = new Me(core);\n this.organizations = new Organizations(core);\n this.personalAccessTokens = new PersonalAccessTokens(core);\n this.resources = new Resources(core);\n this.root = new Root(core);\n this.serviceAccounts = new ServiceAccounts(core);\n this.userImports = new UserImports(core);\n this.users = new Users(core);\n this.webhooks = new Webhooks(core);\n }\n}\n\n/**\n * Access keys: the customer's own API credentials, issued by the instance.\n */\nexport class AccessKeys {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create access key.\n *\n * Mint an access key bound to a service account. The credential value is returned only here (and later\n * via reveal for revealable keys).\n *\n * `POST /v1/access-keys` (CreateAccessKey)\n */\n create(body: T.CreateAccessKeyRequest, options?: RequestOptions): APIPromise<T.AccessKeyWithSecret> {\n return this.core.request<T.AccessKeyWithSecret>({ host: \"api\", method: \"POST\", path: `/v1/access-keys`, body }, options);\n }\n\n /**\n * Get access key.\n *\n * Get an access key by ID.\n *\n * `GET /v1/access-keys/{access_key_id}` (GetAccessKey)\n */\n get(accessKeyId: string, options?: RequestOptions): APIPromise<T.AccessKey> {\n return this.core.request<T.AccessKey>({ host: \"api\", method: \"GET\", path: `/v1/access-keys/${e(accessKeyId)}` }, options);\n }\n\n /**\n * Reveal access key.\n *\n * Return the full plaintext credential value; only for a key minted revealable.\n *\n * `GET /v1/access-keys/{access_key_id}/key` (GetAccessKeyValue)\n */\n getValue(accessKeyId: string, options?: RequestOptions): APIPromise<T.RevealAccessKeyResponse> {\n return this.core.request<T.RevealAccessKeyResponse>({ host: \"api\", method: \"GET\", path: `/v1/access-keys/${e(accessKeyId)}/key` }, options);\n }\n\n /**\n * List access keys.\n *\n * List access keys with filtering and pagination.\n *\n * `GET /v1/access-keys` (ListAccessKeys)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListAccessKeysParams, options?: RequestOptions): PagePromise<T.AccessKey, T.ListAccessKeysResponse> {\n return this.core.page<T.AccessKey, T.ListAccessKeysResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/access-keys`, query: params }, options);\n }\n\n /**\n * Revoke access key.\n *\n * Revoke an access key immediately and irreversibly.\n *\n * `POST /v1/access-keys/{access_key_id}/revoke` (RevokeAccessKey)\n */\n revoke(accessKeyId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/access-keys/${e(accessKeyId)}/revoke` }, options);\n }\n\n /**\n * Update access key.\n *\n * Update mutable fields (name, description, metadata).\n *\n * `PATCH /v1/access-keys/{access_key_id}` (UpdateAccessKey)\n */\n update(accessKeyId: string, body: T.UpdateAccessKeyRequest, options?: RequestOptions): APIPromise<T.AccessKey> {\n return this.core.request<T.AccessKey>({ host: \"api\", method: \"PATCH\", path: `/v1/access-keys/${e(accessKeyId)}`, body }, options);\n }\n}\n\n/**\n * Agents, their credentials, and where they are installed.\n */\nexport class Agents {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create agent.\n *\n * Define an agent (pontive-spec 45 §4): an instance agent (owner_type root; sys:agent:manage on the\n * root) or an organization agent (owner_type org, owner_id its org_ id; sys:agent:manage on the\n * organization). owner_type is the definer's resource-type key (D6, D44). An organization agent is\n * installed in its organization at once, with its requested org roles approved by its creator.\n *\n * `POST /v1/agents` (CreateAgent)\n */\n create(body: T.CreateAgentRequest, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents`, body }, options);\n }\n\n /**\n * Create agent client secret.\n *\n * Mint a client secret (D19); needs sys:agent:secret. Creating the agent mints none (D45). Its value\n * is returned here only. Without expire_others_in the others are kept, and the create is refused (409\n * client_secret_limit_reached) while two that do not expire are held; with it, every other secret\n * stops working that many seconds from now (0–604800; 0 at once), so a rotation is one call.\n *\n * `POST /v1/agents/{agent_id}/client-secrets` (CreateAgentClientSecret)\n */\n createClientSecret(agentId: string, body?: T.AgentCreateClientSecretRequest, options?: RequestOptions): APIPromise<T.AgentClientSecretWithValue> {\n return this.core.request<T.AgentClientSecretWithValue>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/client-secrets`, body }, options);\n }\n\n /**\n * Create agent federated credential.\n *\n * Let the agent authenticate at the token endpoint with a token a trusted issuer signed, with no\n * secret or key of its own (workload identity federation, pontive-spec 20 B7). The workload sends its\n * token as client_assertion, with client_assertion_type\n * urn:ietf:params:oauth:client-assertion-type:jwt-bearer and client_id the agent's id; it is accepted\n * when its iss is the credential's trusted issuer (enabled), its aud one the issuer accepts, exp at\n * most the issuer's max_token_lifetime_seconds (default 3600) ahead and at most that long after iat,\n * its signature the issuer's, its jti unused (unless the issuer has allow_reuse, which accepts the\n * same token until it expires), its sub matches subject and every required claim is present with\n * exactly its value. subject is exact by default; a '*' matches one or more characters within one ':'\n * or '/' segment, and '**' or a '*' in the first segment is refused, so repo:acme/api:environment:*\n * matches every environment of acme/api and nothing else. At most 20 per agent, the name once. Needs\n * sys:agent:secret on its definer (the instance root or its organization).\n *\n * `POST /v1/agents/{agent_id}/federated-credentials` (CreateAgentFederatedCredential)\n */\n createFederatedCredential(agentId: string, body: T.CreateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/federated-credentials`, body }, options);\n }\n\n /**\n * Add organizations to an agent's offer.\n *\n * Add one or more organizations to an instance agent's selected offer (D22); one already offered is\n * not an error. With auto_install on, an organization added is installed.\n *\n * `POST /v1/agents/{agent_id}/organizations` (CreateAgentOrganizations)\n */\n createOrganizations(agentId: string, body: T.AddAgentOrganizationsRequest, options?: RequestOptions): APIPromise<T.Organizations> {\n return this.core.request<T.Organizations>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/organizations`, body }, options);\n }\n\n /**\n * Add agent public key.\n *\n * Add a public JWK to the agent's inline keys, for private_key_jwt (pontive-spec 45 §7.2). The body\n * is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256, with a kid. At\n * most three; refused while the agent has a jwks_uri (409 key_source_conflict). Rotate by overlap: add\n * the new key, move over to it, then remove the old one.\n *\n * `POST /v1/agents/{agent_id}/public-keys` (CreateAgentPublicKey)\n */\n createPublicKey(agentId: string, body: T.JWK, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/public-keys`, body }, options);\n }\n\n /**\n * Deactivate agent.\n *\n * Deactivate an agent: every installation is suspended and its token requests are refused\n * (invalid_client). Its credentials are kept.\n *\n * `POST /v1/agents/{agent_id}/deactivate` (DeactivateAgent)\n */\n deactivate(agentId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/deactivate` }, options);\n }\n\n /**\n * Delete agent.\n *\n * Delete the agent with its installations, offer, sponsors and client grants. Tokens already issued\n * live out their lifetime.\n *\n * `DELETE /v1/agents/{agent_id}` (DeleteAgent)\n */\n delete(agentId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}` }, options);\n }\n\n /**\n * Delete agent client secret.\n *\n * Remove one of the agent's client secrets (D8, D19); it stops working at once.\n *\n * `DELETE /v1/agents/{agent_id}/client-secrets/{secret_id}` (DeleteAgentClientSecret)\n */\n deleteClientSecret(agentId: string, secretId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/client-secrets/${e(secretId)}` }, options);\n }\n\n /**\n * Delete agent federated credential.\n *\n * The credential stops authenticating at once; tokens already issued live out their lifetime. Needs\n * sys:agent:secret on its definer (the instance root or its organization).\n *\n * `DELETE /v1/agents/{agent_id}/federated-credentials/{credential_id}`\n * (DeleteAgentFederatedCredential)\n */\n deleteFederatedCredential(agentId: string, credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Remove an organization from an agent's offer.\n *\n * Take one organization off an instance agent's selected offer (D22), which suspends its installations\n * there.\n *\n * `DELETE /v1/agents/{agent_id}/organizations/{organization_id}` (DeleteAgentOrganization)\n */\n deleteOrganization(agentId: string, organizationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/organizations/${e(organizationId)}` }, options);\n }\n\n /**\n * Remove agent public key.\n *\n * Remove one of the agent's inline keys by kid. Assertions signed with it are refused from now on.\n *\n * `DELETE /v1/agents/{agent_id}/public-keys/{key_id}` (DeleteAgentPublicKey)\n */\n deletePublicKey(agentId: string, keyId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"DELETE\", path: `/v1/agents/${e(agentId)}/public-keys/${e(keyId)}` }, options);\n }\n\n /**\n * Get agent.\n *\n * Get an agent: its definition, requested roles, offer, secrets (previews), keys and sponsors.\n *\n * `GET /v1/agents/{agent_id}` (GetAgent)\n */\n get(agentId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}` }, options);\n }\n\n /**\n * Get agent federated credential.\n *\n * Needs sys:agent:read on its definer (the instance root or its organization).\n *\n * `GET /v1/agents/{agent_id}/federated-credentials/{credential_id}` (GetAgentFederatedCredential)\n */\n getFederatedCredential(agentId: string, credentialId: string, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * List agents.\n *\n * List the instance agents and organization agents the caller may read. A caller holding\n * sys:agent:read only on some organizations lists those organizations' own agents.\n *\n * `GET /v1/agents` (ListAgents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListAgentsParams, options?: RequestOptions): PagePromise<T.Agent, T.ListAgentsResponse> {\n return this.core.page<T.Agent, T.ListAgentsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents`, query: params }, options);\n }\n\n /**\n * List agent client secrets.\n *\n * The agent's client secrets that still authenticate (D19), newest first: preview, label, status,\n * created and expiry, never the value.\n *\n * `GET /v1/agents/{agent_id}/client-secrets` (ListAgentClientSecrets)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientSecrets(agentId: string, params?: T.ListAgentClientSecretsParams, options?: RequestOptions): PagePromise<T.AgentClientSecret, T.AgentListClientSecretsResponse> {\n return this.core.page<T.AgentClientSecret, T.AgentListClientSecretsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/client-secrets`, query: params }, options);\n }\n\n /**\n * List agent federated credentials.\n *\n * Every federated credential of the agent (at most 20). Needs sys:agent:read on its definer (the\n * instance root or its organization).\n *\n * `GET /v1/agents/{agent_id}/federated-credentials` (ListAgentFederatedCredentials)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listFederatedCredentials(agentId: string, params?: T.ListAgentFederatedCredentialsParams, options?: RequestOptions): PagePromise<T.FederatedCredential, T.ListFederatedCredentialsResponse> {\n return this.core.page<T.FederatedCredential, T.ListFederatedCredentialsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/federated-credentials`, query: params }, options);\n }\n\n /**\n * List agent installations.\n *\n * Every installation of the agent — on the root, organizations and resources — with its approved\n * roles, pending approval and status. Each is managed by its id under its home (D21).\n *\n * `GET /v1/agents/{agent_id}/installations` (ListAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInstallations(agentId: string, params?: T.ListAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/installations`, query: params }, options);\n }\n\n /**\n * List an agent's offer.\n *\n * The organizations an instance agent's selected offer admits (pontive-spec 45 §5.1): its allow-list\n * edge (D22). org_access (all or selected) is a field of the agent.\n *\n * `GET /v1/agents/{agent_id}/organizations` (ListAgentOrganizations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listOrganizations(agentId: string, params?: T.ListAgentOrganizationsParams, options?: RequestOptions): PagePromise<T.AgentOrganization, T.ListAgentOrganizationsResponse> {\n return this.core.page<T.AgentOrganization, T.ListAgentOrganizationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/agents/${e(agentId)}/organizations`, query: params }, options);\n }\n\n /**\n * Reactivate agent.\n *\n * Reactivate a deactivated agent: its installations return to active.\n *\n * `POST /v1/agents/{agent_id}/reactivate` (ReactivateAgent)\n */\n reactivate(agentId: string, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"POST\", path: `/v1/agents/${e(agentId)}/reactivate` }, options);\n }\n\n /**\n * Update agent.\n *\n * Change an agent's definition; an omitted field is left as it is. sponsors, requested_roles and\n * org_access are fields of the agent (D22), each replaced whole when sent: adding a requested role\n * leaves every installation of its type with a pending approval, removing one takes it off every\n * installation at once. jwks_uri (D20) sets or, with null, clears where its keys are fetched from\n * (sys:agent:secret). Turning auto_install on installs the agent, once, in every organization it is\n * offered to.\n *\n * `PATCH /v1/agents/{agent_id}` (UpdateAgent)\n */\n update(agentId: string, body: T.UpdateAgentRequest, options?: RequestOptions): APIPromise<T.Agent> {\n return this.core.request<T.Agent>({ host: \"api\", method: \"PATCH\", path: `/v1/agents/${e(agentId)}`, body }, options);\n }\n\n /**\n * Update agent federated credential.\n *\n * Change the name, description, subject or required claims; an absent field is left as it is, and\n * required_claims, when present, replaces the map. The trusted issuer never changes. Needs\n * sys:agent:secret on its definer (the instance root or its organization).\n *\n * `PATCH /v1/agents/{agent_id}/federated-credentials/{credential_id}` (UpdateAgentFederatedCredential)\n */\n updateFederatedCredential(agentId: string, credentialId: string, body: T.UpdateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"PATCH\", path: `/v1/agents/${e(agentId)}/federated-credentials/${e(credentialId)}`, body }, options);\n }\n}\n\n/**\n * Registered APIs: the customer's own APIs, their scopes and the clients allowed to call them.\n */\nexport class Apis {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create API.\n *\n * Register a resource server: its identifier, the resource clients send (RFC 8707) and the aud of\n * every token issued for it, and the scopes clients may request for it. The identifier is any absolute\n * URI or opaque string, an https URL being the form MCP clients can discover; it cannot be changed\n * later.\n *\n * `POST /v1/apis` (CreateRegisteredAPI)\n */\n create(body: T.CreateRegisteredAPIRequest, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"POST\", path: `/v1/apis`, body }, options);\n }\n\n /**\n * Delete API.\n *\n * Delete an API with its client grants and consent grants. Refresh tokens issued for it fail at their\n * next use with invalid_target. A system API refuses it.\n *\n * `DELETE /v1/apis/{api_id}` (DeleteRegisteredAPI)\n */\n delete(apiId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apis/${e(apiId)}` }, options);\n }\n\n /**\n * Disable API.\n *\n * Refuse new token requests for the API (invalid_target). Tokens already issued for it live out their\n * lifetime. A system API refuses it.\n *\n * `POST /v1/apis/{api_id}/disable` (DisableRegisteredAPI)\n */\n disable(apiId: string, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"POST\", path: `/v1/apis/${e(apiId)}/disable` }, options);\n }\n\n /**\n * Enable API.\n *\n * Let clients request tokens for a disabled API again.\n *\n * `POST /v1/apis/{api_id}/enable` (EnableRegisteredAPI)\n */\n enable(apiId: string, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"POST\", path: `/v1/apis/${e(apiId)}/enable` }, options);\n }\n\n /**\n * Get API.\n *\n * Get a registered API by id.\n *\n * `GET /v1/apis/{api_id}` (GetRegisteredAPI)\n */\n get(apiId: string, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"GET\", path: `/v1/apis/${e(apiId)}` }, options);\n }\n\n /**\n * Get API resource metadata.\n *\n * The RFC 9728 protected resource metadata document for the API, which its resource server serves at\n * /.well-known/oauth-protected-resource (with the identifier's path appended). Only an API whose\n * identifier is an https URL has one.\n *\n * `GET /v1/apis/{api_id}/resource-metadata` (GetRegisteredAPIResourceMetadata)\n */\n getResourceMetadata(apiId: string, options?: RequestOptions): APIPromise<T.ResourceMetadataDocument> {\n return this.core.request<T.ResourceMetadataDocument>({ host: \"api\", method: \"GET\", path: `/v1/apis/${e(apiId)}/resource-metadata` }, options);\n }\n\n /**\n * Import API scopes from MCP tools.\n *\n * Propose the API's tool scopes from an MCP server's tools/list result, sent as the server returns it\n * ({tools, nextCursor?}) with the import's options beside it; Pontive never fetches from the server.\n * One scope per group, then one tool:<name> scope per tool in no group, with the tool's description,\n * its title as display_name and its read-only and destructive hints. The response is the diff against\n * the API's scopes: added, changed (with the fields that differ), removed (tool_import scopes no\n * longer proposed, with what still names each) and unchanged. dry_run absent or true writes nothing;\n * dry_run false writes the diff in one transaction. A removed scope is kept unless remove_missing;\n * with it, one a client grant, consent grant or third-party profile still names refuses the import\n * (api_scope_in_use) unless force. Manual scopes are never removed. At most 500 tools and 100 groups;\n * the result is held to 100 scopes per API. A system API refuses it.\n *\n * `POST /v1/apis/{api_id}/scopes/import` (ImportRegisteredAPIScopes)\n */\n importScopes(apiId: string, body: T.ImportScopesRequest, options?: RequestOptions): APIPromise<T.ImportScopesResponse> {\n return this.core.request<T.ImportScopesResponse>({ host: \"api\", method: \"POST\", path: `/v1/apis/${e(apiId)}/scopes/import`, body }, options);\n }\n\n /**\n * List APIs.\n *\n * List the instance's registered APIs, the system API (the management API, read-only) included unless\n * exclude_system.\n *\n * `GET /v1/apis` (ListRegisteredAPIs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRegisteredAPIsParams, options?: RequestOptions): PagePromise<T.RegisteredAPI, T.ListRegisteredAPIsResponse> {\n return this.core.page<T.RegisteredAPI, T.ListRegisteredAPIsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apis`, query: params }, options);\n }\n\n /**\n * List API client grants.\n *\n * The API's client grants: every service account and agent of the instance that may request it, and\n * the apps that may when client_access is selected. Each holds every scope of the API (all_scopes) or\n * the ones named.\n *\n * `GET /v1/apis/{api_id}/clients` (ListRegisteredAPIClients)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClients(apiId: string, params?: T.ListRegisteredAPIClientsParams, options?: RequestOptions): PagePromise<T.ClientGrant, T.ListClientGrantsResponse> {\n return this.core.page<T.ClientGrant, T.ListClientGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apis/${e(apiId)}/clients`, query: params }, options);\n }\n\n /**\n * Replace API client grants.\n *\n * Replace every client grant of the API with items; [] removes them all. Each names an app, service\n * account or agent of the instance (never a third-party app) and every scope of the API (all_scopes)\n * or a subset of its keys. The system API (the management API) takes client grants too, the only way a\n * service account or agent reaches the management API: each names a service account or agent (an app\n * is api_client_invalid) with scopes exactly [\"pontive:management\"] (all_scopes, no scopes or any\n * other scope is api_scope_invalid).\n *\n * `PUT /v1/apis/{api_id}/clients` (ReplaceAPIClients)\n */\n replaceClients(apiId: string, body: T.SetClientGrantsRequest, options?: RequestOptions): APIPromise<T.ListClientGrantsResponse> {\n return this.core.request<T.ListClientGrantsResponse>({ host: \"api\", method: \"PUT\", path: `/v1/apis/${e(apiId)}/clients`, body }, options);\n }\n\n /**\n * Update API.\n *\n * Change an API's name, description, scopes, token lifetime, client access, third-party switch or\n * resource metadata; an absent field is left as it is. Scopes and resource metadata, when present, are\n * replaced wholesale, and null clears them, as it does the description. The identifier cannot be\n * changed. A system API refuses it; only its client grants can be changed.\n *\n * `PATCH /v1/apis/{api_id}` (UpdateRegisteredAPI)\n */\n update(apiId: string, body: T.UpdateRegisteredAPIRequest, options?: RequestOptions): APIPromise<T.RegisteredAPI> {\n return this.core.request<T.RegisteredAPI>({ host: \"api\", method: \"PATCH\", path: `/v1/apis/${e(apiId)}`, body }, options);\n }\n}\n\n/**\n * Apps: OAuth clients, their secrets and keys, and the organizations they may sign in.\n */\nexport class Apps {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create app.\n *\n * Create a new application.\n *\n * `POST /v1/apps` (CreateApp)\n */\n create(body: T.CreateAppRequest, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps`, body }, options);\n }\n\n /**\n * Create app client secret.\n *\n * Mint a client secret for a confidential app (a web app in oauth mode; D19); needs sys:app:secret.\n * Creating the app mints none (D45). Its value is returned only in this response: only a hash is\n * stored, and reads show a preview. Without expire_others_in the others are kept, and the create is\n * refused (409 client_secret_limit_reached) while two that do not expire are held; with it, every\n * other secret stops working that many seconds from now (0–604800; 0 at once), so a rotation is one\n * call.\n *\n * `POST /v1/apps/{app_id}/client-secrets` (CreateAppClientSecret)\n */\n createClientSecret(appId: string, body?: T.CreateAppClientSecretRequest, options?: RequestOptions): APIPromise<T.AppClientSecretWithValue> {\n return this.core.request<T.AppClientSecretWithValue>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/client-secrets`, body }, options);\n }\n\n /**\n * Add app organizations.\n *\n * Admit organizations to an app (at most 100 per call). Adding one already admitted is not an error;\n * an unknown organization fails the whole call and nothing is added. The list is kept whatever the\n * app's org_access mode.\n *\n * `POST /v1/apps/{app_id}/organizations` (CreateAppOrganizations)\n */\n createOrganizations(appId: string, body: T.AddAppOrganizationsRequest, options?: RequestOptions): APIPromise<T.AppOrganizationsResponse> {\n return this.core.request<T.AppOrganizationsResponse>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/organizations`, body }, options);\n }\n\n /**\n * Add an app public key.\n *\n * Add a public JWK to a confidential app's inline keys, for private_key_jwt client authentication (RFC\n * 7523). The body is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256,\n * with a kid. At most three; refused while the app has a jwks_uri (409 key_source_conflict), and for a\n * public app (400 public_keys_require_confidential_app).\n *\n * `POST /v1/apps/{app_id}/public-keys` (CreateAppPublicKey)\n */\n createPublicKey(appId: string, body: T.JWK, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/public-keys`, body }, options);\n }\n\n /**\n * Deactivate app.\n *\n * Deactivate an application.\n *\n * `POST /v1/apps/{app_id}/deactivate` (DeactivateApp)\n */\n deactivate(appId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/deactivate` }, options);\n }\n\n /**\n * Delete app.\n *\n * Delete an application. A third-party (CIMD or DCR) app, which is otherwise read-only, is\n * hard-deleted with its consent grants and refresh tokens; the client is admitted again through the\n * normal flow.\n *\n * `DELETE /v1/apps/{app_id}` (DeleteApp)\n */\n delete(appId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}` }, options);\n }\n\n /**\n * Delete app client secret.\n *\n * Remove one of an app's client secrets (D8, D19). It stops working at once; deleting the last one\n * leaves the app unable to authenticate until a new one is created.\n *\n * `DELETE /v1/apps/{app_id}/client-secrets/{secret_id}` (DeleteAppClientSecret)\n */\n deleteClientSecret(appId: string, secretId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/client-secrets/${e(secretId)}` }, options);\n }\n\n /**\n * Remove an app organization.\n *\n * Stop admitting an organization. Sessions already in it end at their next refresh while the app's\n * org_access mode is selected. Removing one that is not admitted is not an error.\n *\n * `DELETE /v1/apps/{app_id}/organizations/{organization_id}` (DeleteAppOrganization)\n */\n deleteOrganization(appId: string, organizationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/organizations/${e(organizationId)}` }, options);\n }\n\n /**\n * Remove an app public key.\n *\n * Remove one of a confidential app's inline keys by kid. Assertions signed with it are refused from\n * now on.\n *\n * `DELETE /v1/apps/{app_id}/public-keys/{key_id}` (DeleteAppPublicKey)\n */\n deletePublicKey(appId: string, keyId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/public-keys/${e(keyId)}` }, options);\n }\n\n /**\n * Get app details.\n *\n * Get application details by ID.\n *\n * `GET /v1/apps/{app_id}` (GetApp)\n */\n get(appId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}` }, options);\n }\n\n /**\n * Get app security level.\n *\n * Get computed security level for an app.\n *\n * `GET /v1/apps/{app_id}/security-level` (GetAppSecurityLevel)\n */\n getSecurityLevel(appId: string, options?: RequestOptions): APIPromise<T.AppSecurityLevel> {\n return this.core.request<T.AppSecurityLevel>({ host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/security-level` }, options);\n }\n\n /**\n * Get third-party clients setting.\n *\n * When third-party OAuth clients — clients identified by a client ID metadata document (CIMD) or\n * registered dynamically (DCR), which the customer did not create — may connect, and the client\n * profile every admitted one is held to. An instance that never changed it reads the defaults:\n * everything off.\n *\n * `GET /v1/apps/settings` (GetAppSettings)\n */\n getSettings(options?: RequestOptions): APIPromise<T.ThirdPartyClients> {\n return this.core.request<T.ThirdPartyClients>({ host: \"api\", method: \"GET\", path: `/v1/apps/settings` }, options);\n }\n\n /**\n * List apps.\n *\n * Get a paginated list of apps.\n *\n * `GET /v1/apps` (ListApps)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListAppsParams, options?: RequestOptions): PagePromise<T.App, T.ListAppsResponse> {\n return this.core.page<T.App, T.ListAppsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps`, query: params }, options);\n }\n\n /**\n * List an app's client secrets.\n *\n * A confidential app's client secrets that still authenticate (D19), newest first: preview, label,\n * status, created and expiry, never the value, which only the create returns. Needs sys:app:secret.\n *\n * `GET /v1/apps/{app_id}/client-secrets` (ListAppClientSecrets)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientSecrets(appId: string, params?: T.ListAppClientSecretsParams, options?: RequestOptions): PagePromise<T.AppClientSecret, T.ListAppClientSecretsResponse> {\n return this.core.page<T.AppClientSecret, T.ListAppClientSecretsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/client-secrets`, query: params }, options);\n }\n\n /**\n * List app organizations.\n *\n * List the organizations an app admits. They take effect while the app's org_access mode is selected:\n * users then sign in only through one of them, and sign up only by accepting an invitation into one.\n *\n * `GET /v1/apps/{app_id}/organizations` (ListAppOrganizations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listOrganizations(appId: string, params?: T.ListAppOrganizationsParams, options?: RequestOptions): PagePromise<T.AppOrganization, T.ListAppOrganizationsResponse> {\n return this.core.page<T.AppOrganization, T.ListAppOrganizationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/organizations`, query: params }, options);\n }\n\n /**\n * List refused proxy bases.\n *\n * The link bases the app's pages named that the app does not accept, most recently seen first — only\n * those registering a proxy path would fix: on one of the app's allowed origins, with a valid path not\n * accepted yet. A flow's emailed links land on the page's bare origin instead, which a proxy mounted\n * under a path does not answer. Kept 30 days after last seen, at most 10.\n *\n * `GET /v1/apps/{app_id}/refused-proxy-bases` (ListRefusedProxyBases)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listRefusedProxyBases(appId: string, params?: T.ListRefusedProxyBasesParams, options?: RequestOptions): PagePromise<T.RefusedProxyBase, T.ListRefusedProxyBasesResponse> {\n return this.core.page<T.RefusedProxyBase, T.ListRefusedProxyBasesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/refused-proxy-bases`, query: params }, options);\n }\n\n /**\n * Preview an access-token claims template.\n *\n * Renders an access-token claims template for a user, and optionally an organization they belong to,\n * exactly as issuance would, without saving the template or issuing a token. Omit claims_template to\n * preview the app's saved one. A template the save would refuse fails here with the same message.\n *\n * `POST /v1/apps/{app_id}/claims-template/preview` (PreviewClaimsTemplate)\n */\n previewClaimsTemplate(appId: string, body: T.PreviewClaimsTemplateRequest, options?: RequestOptions): APIPromise<T.PreviewClaimsTemplateResponse> {\n return this.core.request<T.PreviewClaimsTemplateResponse>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/claims-template/preview`, body }, options);\n }\n\n /**\n * Reactivate app.\n *\n * Reactivate a previously deactivated application.\n *\n * `POST /v1/apps/{app_id}/reactivate` (ReactivateApp)\n */\n reactivate(appId: string, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"POST\", path: `/v1/apps/${e(appId)}/reactivate` }, options);\n }\n\n /**\n * Update app.\n *\n * Update an existing app.\n *\n * `PATCH /v1/apps/{app_id}` (UpdateApp)\n */\n update(appId: string, body?: T.UpdateAppRequest, options?: RequestOptions): APIPromise<T.App> {\n return this.core.request<T.App>({ host: \"api\", method: \"PATCH\", path: `/v1/apps/${e(appId)}`, body }, options);\n }\n\n /**\n * Update third-party clients setting.\n *\n * Change the admission policy (cimd, dcr, allowlist) or the client profile; an absent field is left as\n * it is. The allowlist and profile.apis, when present, replace the stored list wholesale, and null\n * empties it. An allow-list entry is an exact client_id URL or https://host/*, at most 100; a profile\n * API must be an API of the instance with third_party on, and scopes null covers all of its scopes.\n * The profile's authentication fields (authflow_bindings, signin_config, signup_config, mfa_config,\n * session_config) take the app routes' shapes and are every third-party app's, read when its user\n * signs in: a present one replaces the profile's wholesale, validated as the app routes validate it,\n * and null unsets it so third-party apps keep their own default.\n *\n * `PATCH /v1/apps/settings` (UpdateAppSettings)\n */\n updateSettings(body: T.UpdateThirdPartyClientsRequest, params?: T.UpdateAppSettingsParams, options?: RequestOptions): APIPromise<T.ThirdPartyClients> {\n const { if_match } = params ?? ({} as T.UpdateAppSettingsParams);\n return this.core.request<T.ThirdPartyClients>({ host: \"api\", method: \"PATCH\", path: `/v1/apps/settings`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Authentication configuration.\n */\nexport class Authn {\n /**\n * How sign-ins with the same email are linked to one user.\n */\n readonly accountLinking: AuthnAccountLinking;\n /**\n * Authentication flows, exported and imported as one document.\n */\n readonly authflows: AuthnAuthflows;\n /**\n * An app's sign-in connections (Google, Microsoft, SAML, …) and the connection types.\n */\n readonly connections: AuthnConnections;\n /**\n * The identity policy: which identifiers users have, and the email policy.\n */\n readonly identityPolicy: AuthnIdentityPolicy;\n /**\n * Systems users are migrated from, lazily or by import.\n */\n readonly migrationSources: AuthnMigrationSources;\n /**\n * The password policy, brute-force lockout included.\n */\n readonly passwordPolicy: AuthnPasswordPolicy;\n /**\n * Connection credentials shared by several apps.\n */\n readonly sharedCredentials: AuthnSharedCredentials;\n /**\n * External issuers whose tokens are accepted.\n */\n readonly trustedIssuers: AuthnTrustedIssuers;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.accountLinking = new AuthnAccountLinking(core);\n this.authflows = new AuthnAuthflows(core);\n this.connections = new AuthnConnections(core);\n this.identityPolicy = new AuthnIdentityPolicy(core);\n this.migrationSources = new AuthnMigrationSources(core);\n this.passwordPolicy = new AuthnPasswordPolicy(core);\n this.sharedCredentials = new AuthnSharedCredentials(core);\n this.trustedIssuers = new AuthnTrustedIssuers(core);\n }\n}\n\n/**\n * How sign-ins with the same email are linked to one user.\n */\nexport class AuthnAccountLinking {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get account-linking settings.\n *\n * Get the instance's account-linking settings: what a first sign-in through a social or enterprise\n * connection does when its email already belongs to an account. An instance that never saved them\n * links by the defaults, both settings on. Linking always needs the address verified on both sides, by\n * a provider trusted to vouch for it and on the account; no setting turns that off.\n *\n * `GET /v1/authn/account-linking-config` (GetAccountLinkingConfig)\n */\n get(options?: RequestOptions): APIPromise<T.AccountLinkingConfig> {\n return this.core.request<T.AccountLinkingConfig>({ host: \"api\", method: \"GET\", path: `/v1/authn/account-linking-config` }, options);\n }\n\n /**\n * Update account-linking settings.\n *\n * Patch the instance's account-linking settings. Omitted fields are left unchanged. auto_link_by_email\n * off refuses every first provider sign-in whose email belongs to an existing account with 409\n * auth_provider_link_required; allow_manual_linking off refuses a signed-in user starting a link\n * through POST /v1/me/external-identities.\n *\n * `PATCH /v1/authn/account-linking-config` (UpdateAccountLinkingConfig)\n */\n update(body: T.UpdateAccountLinkingConfigRequest, params?: T.UpdateAccountLinkingConfigParams, options?: RequestOptions): APIPromise<T.AccountLinkingConfig> {\n const { if_match } = params ?? ({} as T.UpdateAccountLinkingConfigParams);\n return this.core.request<T.AccountLinkingConfig>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/account-linking-config`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Authentication flows, exported and imported as one document.\n */\nexport class AuthnAuthflows {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delete authflow.\n *\n * Delete a custom auth flow. Builtin flows cannot be deleted. Returns 204 No Content on success; 409\n * when the flow is the project default or referenced by an app binding.\n *\n * `DELETE /v1/authn/authflows/{authflow_id}` (DeleteAuthflow)\n */\n delete(authflowId: string, params?: T.DeleteAuthflowParams, options?: RequestOptions): APIPromise<void> {\n const { if_match } = params ?? ({} as T.DeleteAuthflowParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/authflows/${e(authflowId)}`, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Export the authflows document.\n *\n * The instance's auth flows as one authflows/v1 document (api-route-review D47): its published custom\n * flows, each with its own widgets, and the custom widget definitions they show, so the document is\n * self-contained. Only the published state is exported; drafts stay in the dashboard. Built-in flows\n * and definitions are the same everywhere and never travel, and which app runs a flow is the app's\n * authflow_bindings, not part of the flow. Everything is named by a key, never an id: a view node's\n * widget is a definition's key or flow:<ref>, one of the flow's own widgets. authflow_id, repeatable,\n * exports just those flows and the definitions they show (a flow that is not a published custom flow\n * is 404); importing that document touches only them. The output is deterministic: two exports of the\n * same state are byte-identical, and the ETag is the hash of the bytes. Send it as If-None-Match to\n * get 304 when nothing changed. Import the document into another instance with POST\n * /v1/authn/authflows/document/import. Needs sys:flow:read and sys:widget:read.\n *\n * `GET /v1/authn/authflows/document` (GetAuthflowsDocument)\n */\n getDocument(params?: T.GetAuthflowsDocumentParams, options?: RequestOptions): APIPromise<T.AuthflowsDocument> {\n return this.core.request<T.AuthflowsDocument>({ host: \"api\", method: \"GET\", path: `/v1/authn/authflows/document`, query: params }, options);\n }\n\n /**\n * Import an authflows document.\n *\n * Plans importing an authflows/v1 document into this instance and, with dry_run false, applies the\n * plan (api-route-review D47). Flows and widget definitions are merged by key: a new key is created, a\n * differing flow replaced whole, and one the document lacks is listed as absent and left alone.\n * Nothing is deleted; delete a flow with DELETE /v1/authn/authflows/{authflow_id}. A definition the\n * instance lacks is created and published; identical markup is unchanged, and different markup is a\n * conflict, since a published definition never changes. A changed flow keeps each of its own widgets\n * whose content matches, and gets a new one where content changed. With publish true (the default)\n * each changed flow is published, its widgets first; with publish false it writes drafts for review in\n * the dashboard. Anything the flow's publish validator refuses, a reference to a key in neither the\n * document nor the instance, and a draft with unpublished changes the import would overwrite (unless\n * discard_unpublished) are conflicts. Re-importing an instance's own export plans every entry\n * unchanged and writes nothing. The dry run's ETag is the revision of the flows it read: send it as\n * If-Match on the apply to be refused 412 precondition_failed if anything changed since. An apply with\n * conflicts is 409 import_conflict, one detail per conflict, field <kind>.<key>.<field>, and applies\n * nothing. A document the format refuses (not JSON, a member it does not define, a pontive_document it\n * does not read) is 422 field_invalid_format; one over 5 MB is 422 field_too_long. X-Idempotency-Key\n * makes an apply safe to retry; the same key with another request is 422 idempotency_key_reused. Needs\n * sys:flow:manage, sys:widget:read and sys:widget:manage.\n *\n * `POST /v1/authn/authflows/document/import` (ImportAuthflowsDocument)\n */\n importDocument(body: T.ImportAuthflowsRequest, params?: T.ImportAuthflowsDocumentParams, options?: RequestOptions): APIPromise<T.AuthflowImportPlan> {\n const { if_match } = params ?? ({} as T.ImportAuthflowsDocumentParams);\n return this.core.request<T.AuthflowImportPlan>({ host: \"api\", method: \"POST\", path: `/v1/authn/authflows/document/import`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * An app's sign-in connections (Google, Microsoft, SAML, …) and the connection types.\n */\nexport class AuthnConnections {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delete OAuth connection.\n *\n * Delete an app's OAuth connection by provider slug. This also drops all stored user OAuth credentials\n * for that provider on this app; users must re-connect if it is recreated.\n *\n * `DELETE /v1/apps/{app_id}/auth-connections/{connection_slug}` (DeleteAuthConnection)\n */\n delete(appId: string, connectionSlug: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/apps/${e(appId)}/auth-connections/${e(connectionSlug)}` }, options);\n }\n\n /**\n * Get OAuth provider.\n *\n * Get an app's provider by slug. Returns the resolved view; an unconnected catalog provider is\n * returned with connected=false and no config.\n *\n * `GET /v1/apps/{app_id}/auth-connections/{connection_slug}` (GetAuthConnection)\n */\n get(appId: string, connectionSlug: string, options?: RequestOptions): APIPromise<T.OAuthProvider> {\n return this.core.request<T.OAuthProvider>({ host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/auth-connections/${e(connectionSlug)}` }, options);\n }\n\n /**\n * List OAuth providers.\n *\n * List an app's configured OAuth providers merged with the catalog. The pagination block counts\n * connected (stored) providers only; data additionally includes unconnected catalog entries, so the\n * number of items may exceed limit.\n *\n * `GET /v1/apps/{app_id}/auth-connections` (ListAuthConnections)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(appId: string, params?: T.ListAuthConnectionsParams, options?: RequestOptions): PagePromise<T.OAuthProviderListItem, T.ListOAuthProvidersResponse> {\n return this.core.page<T.OAuthProviderListItem, T.ListOAuthProvidersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/apps/${e(appId)}/auth-connections`, query: params }, options);\n }\n\n /**\n * List provider catalog.\n *\n * List the platform's supported OAuth provider types and their metadata (scopes, Pontive Credentials\n * availability, deprecation), independent of any app. Carries no credentials. The list is unpaginated.\n *\n * `GET /v1/authn/connection-types` (ListAuthConnectionTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listTypes(params?: T.ListAuthConnectionTypesParams, options?: RequestOptions): PagePromise<T.ProviderCatalogEntry, T.ListProviderCatalogResponse> {\n return this.core.page<T.ProviderCatalogEntry, T.ListProviderCatalogResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/connection-types`, query: params }, options);\n }\n\n /**\n * Upsert OAuth connection.\n *\n * Create or update an app's OAuth connection for the provider slug (unique per app). If no connection\n * exists yet it is created (201); otherwise it is updated (200). Omitted fields are left unchanged on\n * update, and an omitted secret leaves the stored secret intact. Secrets are accepted here but never\n * returned; responses expose only *_set booleans.\n *\n * `PUT /v1/apps/{app_id}/auth-connections/{connection_slug}` (ReplaceAuthConnection)\n */\n replace(appId: string, connectionSlug: string, body: T.CreateOAuthConnectionRequest, options?: RequestOptions): APIPromise<T.OAuthConnection> {\n return this.core.request<T.OAuthConnection>({ host: \"api\", method: \"PUT\", path: `/v1/apps/${e(appId)}/auth-connections/${e(connectionSlug)}`, body }, options);\n }\n}\n\n/**\n * The identity policy: which identifiers users have, and the email policy.\n */\nexport class AuthnIdentityPolicy {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get identity policy.\n *\n * Get the instance's identity policy (email, phone, and username rules). If none has been configured,\n * the default policy is returned.\n *\n * `GET /v1/authn/identity-policy` (GetIdentityPolicy)\n */\n get(options?: RequestOptions): APIPromise<T.IdentityPolicy> {\n return this.core.request<T.IdentityPolicy>({ host: \"api\", method: \"GET\", path: `/v1/authn/identity-policy` }, options);\n }\n\n /**\n * Preview email rules.\n *\n * Count the active users whose email the given rules would refuse at sign-in, were they enforced there\n * (email.enforce_at_signin), with a count per rule. Changes nothing. Ask before turning enforcement\n * on, or tightening a rule while it is on, to see who would be locked out.\n *\n * `POST /v1/authn/identity-policy/email/preview` (PreviewEmailPolicy)\n */\n previewEmailPolicy(body: T.PreviewEmailPolicyRequest, options?: RequestOptions): APIPromise<T.EmailPolicyPreview> {\n return this.core.request<T.EmailPolicyPreview>({ host: \"api\", method: \"POST\", path: `/v1/authn/identity-policy/email/preview`, body }, options);\n }\n\n /**\n * Update identity policy.\n *\n * Patch the instance's identity policy. Omitted sub-policies and fields are left unchanged.\n *\n * `PATCH /v1/authn/identity-policy` (UpdateIdentityPolicy)\n */\n update(body: T.UpdateIdentityPolicyRequest, params?: T.UpdateIdentityPolicyParams, options?: RequestOptions): APIPromise<T.IdentityPolicy> {\n const { if_match } = params ?? ({} as T.UpdateIdentityPolicyParams);\n return this.core.request<T.IdentityPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/identity-policy`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Systems users are migrated from, lazily or by import.\n */\nexport class AuthnMigrationSources {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create migration source.\n *\n * Register a system the instance's users are leaving (pontive-spec 46 §3): its name, its source_type\n * (which picks defaults and the guide, and decides nothing on its own), and the parameters its\n * password hashes need. A Firebase project's hashes need hash_config.firebase_scrypt: the signer key\n * (base64, write-only: answered as a four-character preview), the salt separator (base64), rounds and\n * mem_cost (1 to 16), from the Firebase console's password hash parameters. A source owns the legacy\n * identities its imports write, by which a re-sent row matches the user it created. lazy_migration (46\n * §24.1) has the old system asked, once, at the first password sign-in of a user imported without a\n * password (mode imported_users, the default) or, with all_users (one source at most), of an\n * identifier no user has, creating the user on a valid answer. Its verifier is http (a POST to url,\n * https and a hostname, signed with Standard Webhooks headers under a whsec_ secret answered once here\n * as signing_secret), cognito (region, user_pool_id, client_id, and client_secret when the app client\n * has one) or auth0 (domain, connection, client_id, client_secret); client secrets are write-only, and\n * auth0 without one is refused migration_source_client_secret_required. accept_until defaults to 90\n * days after enabling and is at most 365 days ahead; max_requests_per_second is 1 to 200, default 20.\n * At most 10 per instance. Needs sys:migration:manage on the instance root, held by the instance's\n * owners and admins only and never by a token acting for a user.\n *\n * `POST /v1/authn/migration-sources` (CreateMigrationSource)\n */\n create(body: T.CreateMigrationSourceRequest, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"POST\", path: `/v1/authn/migration-sources`, body }, options);\n }\n\n /**\n * Delete migration source.\n *\n * Delete the source with the legacy identities its imports wrote; runs keep their records. Refused\n * migration_source_in_use while imported hashes still need its parameters, or while users are still\n * pending_migration through it. Needs sys:migration:manage on the instance root.\n *\n * `DELETE /v1/authn/migration-sources/{migration_source_id}` (DeleteMigrationSource)\n */\n delete(migrationSourceId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}` }, options);\n }\n\n /**\n * Get migration source.\n *\n * The source, its signer key as a preview, and imported_passwords: how many users still sign in with a\n * hash that needs it. With lazy migration, its verifier (client and signing secrets as previews),\n * accept_until and pending_users: how many users' passwords the old system still has to confirm, so\n * the closing date can be announced or extended. Needs sys:migration:read on the instance root.\n *\n * `GET /v1/authn/migration-sources/{migration_source_id}` (GetMigrationSource)\n */\n get(migrationSourceId: string, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"GET\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}` }, options);\n }\n\n /**\n * List migration sources.\n *\n * The instance's migration sources, newest first. Needs sys:migration:read on the instance root, held\n * by the instance's owners and admins only.\n *\n * `GET /v1/authn/migration-sources` (ListMigrationSources)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListMigrationSourcesParams, options?: RequestOptions): PagePromise<T.MigrationSource, T.ListMigrationSourcesResponse> {\n return this.core.page<T.MigrationSource, T.ListMigrationSourcesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/migration-sources`, query: params }, options);\n }\n\n /**\n * Rotate migration source signing secret.\n *\n * Mint a new signing secret for the source's HTTP verifier (pontive-spec 46 §24.4). The previous\n * secret keeps signing beside the new one for expire_previous_in seconds (0 to 604800, default 86400;\n * 0 ends it now): during the overlap each request's webhook-signature header carries one signature per\n * secret, so the endpoint rotates without a refused check. The NEW secret is answered only here, as\n * signing_secret. Needs sys:migration:manage on the instance root.\n *\n * `POST /v1/authn/migration-sources/{migration_source_id}/rotate-secret` (RotateMigrationSourceSecret)\n */\n rotateSecret(migrationSourceId: string, body?: T.RotateMigrationSourceSecretRequest, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"POST\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}/rotate-secret`, body }, options);\n }\n\n /**\n * Update migration source.\n *\n * Change the name, or replace hash_config whole: an omitted signer_key keeps the stored one, and\n * {\"firebase_scrypt\": null} removes Firebase's parameters, refused migration_source_in_use while\n * imported hashes still need them. lazy_migration is replaced whole when present, and removed with\n * null. Within it, an omitted accept_until keeps the stored date, an extension included; the 90-day\n * default applies only when the section is first enabled or added again after its removal. A change of\n * accept_until, at most 365 days ahead of the change, is audited with its old and new dates.\n * verifier.client_secret omitted keeps the stored secret while the verifier's type stays the same, a\n * string replaces it, and null removes it: allowed for cognito, refused\n * migration_source_client_secret_required for auth0, which needs one. A verifier that becomes http\n * answers its new signing_secret, once. Needs sys:migration:manage on the instance root.\n *\n * `PATCH /v1/authn/migration-sources/{migration_source_id}` (UpdateMigrationSource)\n */\n update(migrationSourceId: string, body: T.UpdateMigrationSourceRequest, options?: RequestOptions): APIPromise<T.MigrationSource> {\n return this.core.request<T.MigrationSource>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}`, body }, options);\n }\n\n /**\n * Validate migration source.\n *\n * Report problems without changing anything: whether the source has the parameters its type needs and,\n * given firebase_scrypt_sample (a known Firebase user's password, password hash and salt), whether its\n * Firebase parameters verify that user. With lazy migration, the lazy_migration.verifier check asks\n * the verifier without a password: the HTTP verifier is sent a signed {\"type\": \"check\"} and must\n * answer 200 {\"result\": \"ok\"}; Cognito and Auth0 are asked for an identifier no one holds with a\n * random password and must answer as for a wrong password, which proves the client, its secret and the\n * grant; Auth0's Trust Token Endpoint IP Header cannot be checked. Needs sys:migration:manage on the\n * instance root.\n *\n * `POST /v1/authn/migration-sources/{migration_source_id}/validate` (ValidateMigrationSource)\n */\n validate(migrationSourceId: string, body?: T.ValidateMigrationSourceRequest, options?: RequestOptions): APIPromise<T.MigrationSourceValidation> {\n return this.core.request<T.MigrationSourceValidation>({ host: \"api\", method: \"POST\", path: `/v1/authn/migration-sources/${e(migrationSourceId)}/validate`, body }, options);\n }\n}\n\n/**\n * The password policy, brute-force lockout included.\n */\nexport class AuthnPasswordPolicy {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Reset password policy.\n *\n * Delete the stored password policy, resetting it to the default. A subsequent GET returns the default\n * policy.\n *\n * `DELETE /v1/authn/password-policy` (DeletePasswordPolicy)\n */\n delete(params?: T.DeletePasswordPolicyParams, options?: RequestOptions): APIPromise<void> {\n const { if_match } = params ?? ({} as T.DeletePasswordPolicyParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/password-policy`, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get password policy.\n *\n * Get the instance's password policy. If none has been configured, the default policy is returned.\n *\n * `GET /v1/authn/password-policy` (GetPasswordPolicy)\n */\n get(options?: RequestOptions): APIPromise<T.PasswordPolicy> {\n return this.core.request<T.PasswordPolicy>({ host: \"api\", method: \"GET\", path: `/v1/authn/password-policy` }, options);\n }\n\n /**\n * Update password policy.\n *\n * Patch the instance's password policy. Omitted fields are left unchanged. lockout patches brute-force\n * protection's settings member by member (pontive-spec 04 Brute-force protection): max_failures 3 to\n * 100, block_minutes 1 to 1440, account_max_failures 10 to 1000, address_max_failures 20 to 10000, and\n * allowed_addresses, up to 100 IPv4 or IPv6 addresses or CIDR ranges, which replaces the whole list\n * ([] or null clears it) and is stored canonical. A setting out of its range or an entry that is not\n * an address is 422 field_invalid_format, its message naming the setting; more than 100 entries is 422\n * field_too_long.\n *\n * `PATCH /v1/authn/password-policy` (UpdatePasswordPolicy)\n */\n update(body: T.UpdatePasswordPolicyRequest, params?: T.UpdatePasswordPolicyParams, options?: RequestOptions): APIPromise<T.PasswordPolicy> {\n const { if_match } = params ?? ({} as T.UpdatePasswordPolicyParams);\n return this.core.request<T.PasswordPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/password-policy`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Connection credentials shared by several apps.\n */\nexport class AuthnSharedCredentials {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create shared credential.\n *\n * Create a project-level shared OAuth provider credential. The config is flat (the adapter's own\n * fields directly under \"config\"), discriminated by provider_type. Secrets are accepted here but never\n * returned.\n *\n * `POST /v1/authn/connection-credentials` (CreateSharedCredential)\n */\n create(body: T.CreateSharedCredentialRequest, options?: RequestOptions): APIPromise<T.SharedCredential> {\n return this.core.request<T.SharedCredential>({ host: \"api\", method: \"POST\", path: `/v1/authn/connection-credentials`, body }, options);\n }\n\n /**\n * Delete shared credential.\n *\n * Delete a shared credential by id.\n *\n * `DELETE /v1/authn/connection-credentials/{credential_id}` (DeleteSharedCredential)\n */\n delete(credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/connection-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Get shared credential.\n *\n * Get a shared credential by id. Secrets are redacted; their presence is reported via *_set booleans.\n *\n * `GET /v1/authn/connection-credentials/{credential_id}` (GetSharedCredential)\n */\n get(credentialId: string, options?: RequestOptions): APIPromise<T.SharedCredential> {\n return this.core.request<T.SharedCredential>({ host: \"api\", method: \"GET\", path: `/v1/authn/connection-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * List shared credentials.\n *\n * List the instance's shared OAuth provider credentials. Secrets are never returned; responses expose\n * only *_set booleans. The list is unpaginated.\n *\n * `GET /v1/authn/connection-credentials` (ListSharedCredentials)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListSharedCredentialsParams, options?: RequestOptions): PagePromise<T.SharedCredential, T.ListSharedCredentialsResponse> {\n return this.core.page<T.SharedCredential, T.ListSharedCredentialsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/connection-credentials`, query: params }, options);\n }\n\n /**\n * Update shared credential.\n *\n * Patch a shared credential by id. Omitted fields are unchanged; an omitted secret leaves the stored\n * secret intact.\n *\n * `PATCH /v1/authn/connection-credentials/{credential_id}` (UpdateSharedCredential)\n */\n update(credentialId: string, body: T.UpdateSharedCredentialRequest, options?: RequestOptions): APIPromise<T.SharedCredential> {\n return this.core.request<T.SharedCredential>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/connection-credentials/${e(credentialId)}`, body }, options);\n }\n}\n\n/**\n * External issuers whose tokens are accepted.\n */\nexport class AuthnTrustedIssuers {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create trusted issuer.\n *\n * Trust an external issuer to sign client assertions for this instance's service accounts and agents\n * (workload identity federation, pontive-spec 20 B7): a CI provider's OIDC issuer such as GitHub\n * Actions (https://token.actions.githubusercontent.com) or GitLab, a SPIFFE trust domain's JWT issuer,\n * or a Kubernetes cluster's service account issuer. The issuer is an https URL, matched exactly\n * against an assertion's iss. Without a jwks_uri it is read from the issuer's OpenID discovery\n * document, which must name exactly this issuer. audiences (at most 10) are the aud values an\n * assertion may carry; omitted, this instance's issuer and token endpoint. max_token_lifetime_seconds\n * (default 3600, 60 to 86400) caps how far ahead an assertion's exp may be and how long after its iat.\n * allow_reuse (default false) accepts the same token again until it expires, for workloads that reuse\n * one token (Kubernetes projected tokens, cached SPIFFE JWT-SVIDs); false spends each jti, or a token\n * with no jti whole, once. Trusting an issuer authenticates nobody by itself: a federated credential\n * on a service account or agent does. cross_app_access makes the issuer an organization's enterprise\n * IdP (Cross-App Access, pontive-spec 20 C8): it may then sign ID-JAGs for the organization's members,\n * which an app presents with the urn:ietf:params:oauth:grant-type:jwt-bearer grant for a token to a\n * registered API; the ID-JAG's sub is mapped to a user through the named sign-in connection's external\n * identities (sso_app_id, sso_provider: an OpenID Connect sign-in connection whose discovery document\n * is this issuer's), and the user must be a member of the organization. With cross_app_access, issuer\n * may be omitted: it is the one that connection signs in with. At most 50 per instance. Needs\n * sys:settings:manage on the instance root.\n *\n * `POST /v1/authn/trusted-issuers` (CreateTrustedIssuer)\n */\n create(body: T.CreateTrustedIssuerRequest, options?: RequestOptions): APIPromise<T.TrustedIssuer> {\n return this.core.request<T.TrustedIssuer>({ host: \"api\", method: \"POST\", path: `/v1/authn/trusted-issuers`, body }, options);\n }\n\n /**\n * Delete trusted issuer.\n *\n * Stop trusting an issuer. Refused while federated credentials name it: delete them first, or disable\n * the issuer instead. Needs sys:settings:manage on the instance root.\n *\n * `DELETE /v1/authn/trusted-issuers/{trusted_issuer_id}` (DeleteTrustedIssuer)\n */\n delete(trustedIssuerId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authn/trusted-issuers/${e(trustedIssuerId)}` }, options);\n }\n\n /**\n * Get trusted issuer.\n *\n * Needs sys:settings:read on the instance root.\n *\n * `GET /v1/authn/trusted-issuers/{trusted_issuer_id}` (GetTrustedIssuer)\n */\n get(trustedIssuerId: string, options?: RequestOptions): APIPromise<T.TrustedIssuer> {\n return this.core.request<T.TrustedIssuer>({ host: \"api\", method: \"GET\", path: `/v1/authn/trusted-issuers/${e(trustedIssuerId)}` }, options);\n }\n\n /**\n * List trusted issuers.\n *\n * Every issuer the instance trusts (at most 50). Needs sys:settings:read on the instance root.\n *\n * `GET /v1/authn/trusted-issuers` (ListTrustedIssuers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListTrustedIssuersParams, options?: RequestOptions): PagePromise<T.TrustedIssuer, T.ListTrustedIssuersResponse> {\n return this.core.page<T.TrustedIssuer, T.ListTrustedIssuersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authn/trusted-issuers`, query: params }, options);\n }\n\n /**\n * Update trusted issuer.\n *\n * Change the name, jwks_uri, audiences, enabled, allow_reuse, max_token_lifetime_seconds or\n * cross_app_access; an absent field is left as it is. cross_app_access replaces the organization link\n * (Cross-App Access, pontive-spec 20 C8); {\"organization_id\":\"\"} removes it. jwks_uri \"\" reads it\n * again from the issuer's discovery document; audiences, when present, replaces the list ([] means\n * this instance's issuer and token endpoint). enabled false refuses every assertion the issuer signs\n * at once. The issuer URL never changes: trust a new one instead. Needs sys:settings:manage on the\n * instance root.\n *\n * `PATCH /v1/authn/trusted-issuers/{trusted_issuer_id}` (UpdateTrustedIssuer)\n */\n update(trustedIssuerId: string, body: T.UpdateTrustedIssuerRequest, options?: RequestOptions): APIPromise<T.TrustedIssuer> {\n return this.core.request<T.TrustedIssuer>({ host: \"api\", method: \"PATCH\", path: `/v1/authn/trusted-issuers/${e(trustedIssuerId)}`, body }, options);\n }\n}\n\n/**\n * Authorization: AuthZEN access decisions and searches on the authz host, and the authorization model.\n */\nexport class Authz {\n /**\n * The generated authorization model.\n */\n readonly model: AuthzModel;\n /**\n * Permissions of each resource type.\n */\n readonly permissions: AuthzPermissions;\n /**\n * Resource types.\n */\n readonly resourceTypes: AuthzResourceTypes;\n /**\n * Roles of each resource type.\n */\n readonly roles: AuthzRoles;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.model = new AuthzModel(core);\n this.permissions = new AuthzPermissions(core);\n this.resourceTypes = new AuthzResourceTypes(core);\n this.roles = new AuthzRoles(core);\n }\n\n /**\n * Evaluate access.\n *\n * AuthZEN Access Evaluation (OpenID AuthZEN Authorization API 1.0, §6): may the subject do the action\n * on the resource. The subject is a user (usr_), a service account (svc_), an agent (agt_), or a token\n * — an access token of this instance as subject.id: a token acting for a user through an agent is\n * answered for the (user, agent) pair, within its organization and while its delegation is live, and\n * the decision's context echoes the verified principal so the caller applies its own scope check.\n * context.actor names an agent acting for a user subject: only what both may do is allowed. A token\n * that does not verify is refused 400 invalid_token. Inherited roles are resolved through the resource\n * graph. Needs sys:authz:check. A check on a custom resource type bills as one authorization check.\n * Callers: a management credential asks about any subject; any other access token of the instance only\n * about itself, subject {\"type\": \"token\"} or its own subject by id, and is refused 403 for any other\n * (D24, D48).\n *\n * `POST /access/v1/evaluation` (EvaluateAccess)\n */\n evaluateAccess(body: T.AuthZENEvaluation, options?: RequestOptions): APIPromise<T.AuthZENDecision> {\n return this.core.request<T.AuthZENDecision>({ host: \"authz\", method: \"POST\", path: `/access/v1/evaluation`, body }, options);\n }\n\n /**\n * Evaluate access, many questions.\n *\n * AuthZEN Access Evaluations (OpenID AuthZEN Authorization API 1.0, §7): up to 100 questions,\n * answered in the order asked. The request's own subject, action, resource and context are the\n * defaults each evaluation's own keys override; with no evaluations it is a single evaluation,\n * answered as one. options.evaluations_semantic is execute_all (the default), deny_on_first_deny (stop\n * at the first denial) or permit_on_first_permit (stop at the first permit): the answer then ends with\n * the evaluation that stopped it. Subjects, tokens and context.actor are named as in an evaluation.\n * Needs sys:authz:check. Each check on a custom resource type bills as one authorization check.\n * Callers: a management credential asks about any subject; any other access token of the instance only\n * about itself, subject {\"type\": \"token\"} or its own subject by id, and is refused 403 for any other\n * (D24, D48).\n *\n * `POST /access/v1/evaluations` (EvaluateAccessBatch)\n */\n evaluateAccessBatch(body: T.AuthZENEvaluationsRequest, options?: RequestOptions): APIPromise<T.AuthZENEvaluationsResponse> {\n return this.core.request<T.AuthZENEvaluationsResponse>({ host: \"authz\", method: \"POST\", path: `/access/v1/evaluations`, body }, options);\n }\n\n /**\n * AuthZEN discovery.\n *\n * The decision point's metadata (OpenID AuthZEN Authorization API 1.0, §9): its identifier and the\n * endpoints it serves. Public.\n *\n * `GET /.well-known/authzen-configuration` (GetAuthZENConfiguration)\n */\n getConfiguration(options?: RequestOptions): APIPromise<T.AuthZENConfiguration> {\n return this.core.request<T.AuthZENConfiguration>({ host: \"authz\", method: \"GET\", path: `/.well-known/authzen-configuration` }, options);\n }\n\n /**\n * Search actions.\n *\n * AuthZEN Action Search (OpenID AuthZEN Authorization API 1.0, §8.6): the actions the subject may\n * take on the resource. For a subject named by id or by an access token, identity-svc checks every\n * permission of the resource's type on the object, as an evaluation is checked, and answers those held\n * in key order; context.actions narrows the answer to the ones asked about, and context.actor names an\n * agent acting for a user subject. For the caller itself — subject {\"type\": \"token\"} with no id —\n * context.actions names the catalog permissions (sys:<resource>:<action>, at most 32) to ask about on\n * the target instance (resource {\"type\": \"root\"}): what a client hides or disables by, never the\n * decision. Needs sys:authz:check; the caller's own question needs nothing. Callers: a management\n * credential asks about any subject; any other access token of the instance only about itself, subject\n * {\"type\": \"token\"} or its own subject by id, and is refused 403 for any other (D24, D48).\n *\n * `POST /access/v1/search/action` (SearchActions)\n */\n searchActions(body: T.AuthZENSearchRequest, options?: RequestOptions): APIPromise<T.AuthZENActionSearchResponse> {\n return this.core.request<T.AuthZENActionSearchResponse>({ host: \"authz\", method: \"POST\", path: `/access/v1/search/action`, body }, options);\n }\n\n /**\n * Search resources.\n *\n * AuthZEN Resource Search (OpenID AuthZEN Authorization API 1.0, §8.5): the resources of\n * resource.type the subject may do action.name on, directly or by inheritance, each with its name,\n * organization, parent and the roles held as properties. Subjects, tokens and context.actor are named\n * as in an evaluation; a delegated subject lists what the (user, agent) pair both reach. context takes\n * Pontive's filters: organization_id, parent_id, direct_only, include_ancestors. Pages by page.token\n * and page.limit (1 to 100); page.next_token is \"\" on the last page. Needs sys:authz:check for a token\n * or an actor; a subject alone needs what reading that principal does (sys:user:read, sys:sa:read or\n * sys:agent:read). Bills as one authorization check. Callers: a management credential asks about any\n * subject; any other access token of the instance only about itself, subject {\"type\": \"token\"} or its\n * own subject by id, and is refused 403 for any other (D24, D48).\n *\n * `POST /access/v1/search/resource` (SearchResources)\n */\n searchResources(body: T.AuthZENSearchRequest, options?: RequestOptions): APIPromise<T.AuthZENResourceSearchResponse> {\n return this.core.request<T.AuthZENResourceSearchResponse>({ host: \"authz\", method: \"POST\", path: `/access/v1/search/resource`, body }, options);\n }\n}\n\n/**\n * The generated authorization model.\n */\nexport class AuthzModel {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Preview authorization model.\n *\n * Generate a read-only preview of the instance's OpenFGA authorization (FGA) model from the current\n * registry (resource types, roles, permissions and inheritance), without writing it. Returns the\n * OpenFGA DSL and JSON.\n *\n * `GET /v1/authz/model/preview` (GetAuthorizationModelPreview)\n */\n getPreview(options?: RequestOptions): APIPromise<T.PreviewModelResponse> {\n return this.core.request<T.PreviewModelResponse>({ host: \"api\", method: \"GET\", path: `/v1/authz/model/preview` }, options);\n }\n\n /**\n * Regenerate authorization model.\n *\n * Regenerate the instance's OpenFGA authorization (FGA) model from the current registry and write it\n * to the instance's existing store; relationship tuples are kept. Registry changes do this\n * automatically — use it after a platform upgrade that changes how the model is generated.\n *\n * `POST /v1/authz/model/regenerate` (RegenerateAuthorizationModel)\n */\n regenerate(options?: RequestOptions): APIPromise<T.RegenerateModelResponse> {\n return this.core.request<T.RegenerateModelResponse>({ host: \"api\", method: \"POST\", path: `/v1/authz/model/regenerate` }, options);\n }\n}\n\n/**\n * Permissions of each resource type.\n */\nexport class AuthzPermissions {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create custom permission.\n *\n * Create a custom permission. Required: key, resource_type. Optional: description, name. Name format:\n * resource:action or resource:sub_resource:action.\n *\n * `POST /v1/authz/resource-types/{resource_type}/permissions` (CreatePermission)\n */\n create(resourceType: string, body: T.CreatePermissionRequest, options?: RequestOptions): APIPromise<T.Permission> {\n return this.core.request<T.Permission>({ host: \"api\", method: \"POST\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions`, body }, options);\n }\n\n /**\n * Delete custom permission.\n *\n * Delete a custom permission. System permissions cannot be deleted. Returns 204 No Content on success.\n *\n * `DELETE /v1/authz/resource-types/{resource_type}/permissions/{permission_key}` (DeletePermission)\n */\n delete(resourceType: string, permissionKey: string, params?: T.DeletePermissionParams, options?: RequestOptions): APIPromise<void> {\n const { if_match, ...query } = params ?? ({} as T.DeletePermissionParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions/${e(permissionKey)}`, query, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get permission details.\n *\n * Get a permission by name. Returns name, key, description, type, resource_type, created_at,\n * updated_at, used_in_roles. Works for both system and custom permissions.\n *\n * `GET /v1/authz/resource-types/{resource_type}/permissions/{permission_key}` (GetPermission)\n */\n get(resourceType: string, permissionKey: string, options?: RequestOptions): APIPromise<T.Permission> {\n return this.core.request<T.Permission>({ host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions/${e(permissionKey)}` }, options);\n }\n\n /**\n * List permissions.\n *\n * Get a paginated list of all permissions (system and custom) in the directory. Filter by type\n * (system/custom), resource_type, name (partial match).\n *\n * `GET /v1/authz/permissions` (ListPermissions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPermissionsParams, options?: RequestOptions): PagePromise<T.Permission, T.ListPermissionsResponse> {\n return this.core.page<T.Permission, T.ListPermissionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/permissions`, query: params }, options);\n }\n\n /**\n * List a resource type's permissions.\n *\n * The permissions of one resource type (D18), filtered as GET /authz/permissions is.\n *\n * `GET /v1/authz/resource-types/{resource_type}/permissions` (ListResourceTypePermissions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listResourceTypePermissions(resourceType: string, params?: T.ListResourceTypePermissionsParams, options?: RequestOptions): PagePromise<T.Permission, T.ListPermissionsResponse> {\n return this.core.page<T.Permission, T.ListPermissionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions`, query: params }, options);\n }\n\n /**\n * Update custom permission.\n *\n * Update a custom permission. Can update: description, name. Cannot update: key (immutable),\n * resource_type (immutable). System permissions cannot be updated.\n *\n * `PATCH /v1/authz/resource-types/{resource_type}/permissions/{permission_key}` (UpdatePermission)\n */\n update(resourceType: string, permissionKey: string, body?: T.UpdatePermissionRequest, params?: T.UpdatePermissionParams, options?: RequestOptions): APIPromise<T.Permission> {\n const { if_match } = params ?? ({} as T.UpdatePermissionParams);\n return this.core.request<T.Permission>({ host: \"api\", method: \"PATCH\", path: `/v1/authz/resource-types/${e(resourceType)}/permissions/${e(permissionKey)}`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Resource types.\n */\nexport class AuthzResourceTypes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create resource type.\n *\n * Register a resource type in the instance's registry. Only custom types can be created: root and org\n * are reserved and seeded.\n *\n * `POST /v1/authz/resource-types` (CreateResourceType)\n */\n create(body: T.CreateResourceTypeRequest, options?: RequestOptions): APIPromise<T.ResourceType> {\n return this.core.request<T.ResourceType>({ host: \"api\", method: \"POST\", path: `/v1/authz/resource-types`, body }, options);\n }\n\n /**\n * Delete resource type.\n *\n * Delete a resource type from the registry by its key. The reserved root and organization types cannot\n * be deleted.\n *\n * `DELETE /v1/authz/resource-types/{resource_type}` (DeleteResourceType)\n */\n delete(resourceType: string, params?: T.DeleteResourceTypeParams, options?: RequestOptions): APIPromise<void> {\n const { if_match } = params ?? ({} as T.DeleteResourceTypeParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authz/resource-types/${e(resourceType)}`, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get resource type.\n *\n * Get a resource type by its key.\n *\n * `GET /v1/authz/resource-types/{resource_type}` (GetResourceType)\n */\n get(resourceType: string, options?: RequestOptions): APIPromise<T.ResourceType> {\n return this.core.request<T.ResourceType>({ host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}` }, options);\n }\n\n /**\n * List resource types.\n *\n * List the instance's resource types: the reserved root and org types (org in b2b instances only), and\n * the custom types.\n *\n * `GET /v1/authz/resource-types` (ListResourceTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListResourceTypesParams, options?: RequestOptions): PagePromise<T.ResourceType, T.ListResourceTypesResponse> {\n return this.core.page<T.ResourceType, T.ListResourceTypesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/resource-types`, query: params }, options);\n }\n\n /**\n * Update resource type.\n *\n * Update a resource type. Cannot update: key (immutable). The reserved root and org types accept only\n * name and description.\n *\n * `PATCH /v1/authz/resource-types/{resource_type}` (UpdateResourceType)\n */\n update(resourceType: string, body: T.UpdateResourceTypeRequest, params?: T.UpdateResourceTypeParams, options?: RequestOptions): APIPromise<T.ResourceType> {\n const { if_match } = params ?? ({} as T.UpdateResourceTypeParams);\n return this.core.request<T.ResourceType>({ host: \"api\", method: \"PATCH\", path: `/v1/authz/resource-types/${e(resourceType)}`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Roles of each resource type.\n */\nexport class AuthzRoles {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create custom role.\n *\n * Create a custom role. Required: key, resource_type, permissions. Optional: description, name,\n * metadata, resource_id. Setting resource_id (an organization id) makes the role instance-scoped —\n * assignable only on that instance; it is immutable. Role keys are unique within a resource type and\n * cannot collide with system roles.\n *\n * `POST /v1/authz/resource-types/{resource_type}/roles` (CreateRole)\n */\n create(resourceType: string, body: T.CreateRoleRequest, options?: RequestOptions): APIPromise<T.Role> {\n return this.core.request<T.Role>({ host: \"api\", method: \"POST\", path: `/v1/authz/resource-types/${e(resourceType)}/roles`, body }, options);\n }\n\n /**\n * Delete custom role.\n *\n * Delete a custom role. System roles cannot be deleted. Returns 204 No Content on success.\n *\n * `DELETE /v1/authz/resource-types/{resource_type}/roles/{role_key}` (DeleteRole)\n */\n delete(resourceType: string, roleKey: string, params?: T.DeleteRoleParams, options?: RequestOptions): APIPromise<void> {\n const { if_match, ...query } = params ?? ({} as T.DeleteRoleParams);\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/authz/resource-types/${e(resourceType)}/roles/${e(roleKey)}`, query, headers: { \"If-Match\": if_match } }, options);\n }\n\n /**\n * Get role details.\n *\n * Get a role by key and resource_type. Returns name, description, resource_type, type, permissions,\n * metadata, created_at, updated_at, assignment_count, permission_count.\n *\n * `GET /v1/authz/resource-types/{resource_type}/roles/{role_key}` (GetRole)\n */\n get(resourceType: string, roleKey: string, options?: RequestOptions): APIPromise<T.Role> {\n return this.core.request<T.Role>({ host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/roles/${e(roleKey)}` }, options);\n }\n\n /**\n * List roles.\n *\n * Get a paginated list of roles (system and custom) in the directory. Filter by type (system/custom),\n * resource_type, name (partial match), permission. By default only type-scoped roles are returned.\n * Pass resource_id to also include that organization instance's own instance-scoped roles, or set\n * include_instance_scoped=true to include every instance-scoped role alongside the type-scoped ones\n * (ignored when resource_id is set).\n *\n * `GET /v1/authz/roles` (ListRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRolesParams, options?: RequestOptions): PagePromise<T.Role, T.ListRolesResponse> {\n return this.core.page<T.Role, T.ListRolesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/roles`, query: params }, options);\n }\n\n /**\n * List a resource type's roles.\n *\n * The roles of one resource type (D18), filtered as GET /authz/roles is. With inheritable_from, the\n * roles of that parent type a role on this type could inherit instead: each a valid parent_role_key\n * for a RoleInheritance rule on it.\n *\n * `GET /v1/authz/resource-types/{resource_type}/roles` (ListResourceTypeRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listResourceTypeRoles(resourceType: string, params?: T.ListResourceTypeRolesParams, options?: RequestOptions): PagePromise<T.Role, T.ListRolesResponse> {\n return this.core.page<T.Role, T.ListRolesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/authz/resource-types/${e(resourceType)}/roles`, query: params }, options);\n }\n\n /**\n * Update custom role.\n *\n * Update a custom role. Can update: description, name, permissions, metadata. Cannot update: key\n * (immutable), resource_type (immutable). System roles cannot be updated.\n *\n * `PATCH /v1/authz/resource-types/{resource_type}/roles/{role_key}` (UpdateRole)\n */\n update(resourceType: string, roleKey: string, body?: T.UpdateRoleRequest, params?: T.UpdateRoleParams, options?: RequestOptions): APIPromise<T.Role> {\n const { if_match } = params ?? ({} as T.UpdateRoleParams);\n return this.core.request<T.Role>({ host: \"api\", method: \"PATCH\", path: `/v1/authz/resource-types/${e(resourceType)}/roles/${e(roleKey)}`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Billing for the instance's own customers. Bodies and results are open objects: the OpenAPI document\n * does not type them yet.\n */\nexport class Billing {\n readonly catalog: BillingCatalog;\n readonly catalogRules: BillingCatalogRules;\n readonly checkoutSessions: BillingCheckoutSessions;\n readonly contracts: BillingContracts;\n readonly creditNotes: BillingCreditNotes;\n readonly currencies: BillingCurrencies;\n readonly customers: BillingCustomers;\n readonly disputes: BillingDisputes;\n readonly dunning: BillingDunning;\n readonly entitlements: BillingEntitlements;\n readonly eventTypes: BillingEventTypes;\n readonly events: BillingEvents;\n readonly exchangeRates: BillingExchangeRates;\n readonly features: BillingFeatures;\n readonly grants: BillingGrants;\n readonly invoices: BillingInvoices;\n readonly ledger: BillingLedger;\n readonly meters: BillingMeters;\n readonly packages: BillingPackages;\n readonly paymentConnections: BillingPaymentConnections;\n readonly paymentMethods: BillingPaymentMethods;\n readonly payments: BillingPayments;\n readonly pricingUnits: BillingPricingUnits;\n readonly products: BillingProducts;\n readonly rateCards: BillingRateCards;\n readonly refunds: BillingRefunds;\n readonly settings: BillingSettings;\n readonly tax: BillingTax;\n readonly timeMachines: BillingTimeMachines;\n readonly usage: BillingUsage;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.catalog = new BillingCatalog(core);\n this.catalogRules = new BillingCatalogRules(core);\n this.checkoutSessions = new BillingCheckoutSessions(core);\n this.contracts = new BillingContracts(core);\n this.creditNotes = new BillingCreditNotes(core);\n this.currencies = new BillingCurrencies(core);\n this.customers = new BillingCustomers(core);\n this.disputes = new BillingDisputes(core);\n this.dunning = new BillingDunning(core);\n this.entitlements = new BillingEntitlements(core);\n this.eventTypes = new BillingEventTypes(core);\n this.events = new BillingEvents(core);\n this.exchangeRates = new BillingExchangeRates(core);\n this.features = new BillingFeatures(core);\n this.grants = new BillingGrants(core);\n this.invoices = new BillingInvoices(core);\n this.ledger = new BillingLedger(core);\n this.meters = new BillingMeters(core);\n this.packages = new BillingPackages(core);\n this.paymentConnections = new BillingPaymentConnections(core);\n this.paymentMethods = new BillingPaymentMethods(core);\n this.payments = new BillingPayments(core);\n this.pricingUnits = new BillingPricingUnits(core);\n this.products = new BillingProducts(core);\n this.rateCards = new BillingRateCards(core);\n this.refunds = new BillingRefunds(core);\n this.settings = new BillingSettings(core);\n this.tax = new BillingTax(core);\n this.timeMachines = new BillingTimeMachines(core);\n this.usage = new BillingUsage(core);\n }\n}\n\n/**\n * The `billing.catalog` operations.\n */\nexport class BillingCatalog {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.CatalogPromotionService/ExportCatalog (34-billing-catalog.md, Promoting a catalog\n * between instances; API Surface; billing-svc docs/questions.md, P113). The whole catalog as one\n * document keyed by key, never by id: { pontive_document: \"billing-catalog/v1\", event_types, meters,\n * products, features, pricing_units, rate_cards, packages, catalog_rules } (api-route-review D47),\n * every list in key order, written as billing-svc wrote it. Needs sys:billing:read, and answers while\n * billing is off, as every read does.\n *\n * `GET /v1/billing/catalog` (GetCatalog)\n */\n get(options?: RequestOptions): APIPromise<Record<string, unknown>> {\n return this.core.request<Record<string, unknown>>({ host: \"api\", method: \"GET\", path: `/v1/billing/catalog` }, options);\n }\n\n /**\n * billing.catalog.v1.CatalogPromotionService/ImportCatalog (34-billing-catalog.md, Promoting a catalog\n * between instances; API Surface; billing-svc docs/questions.md, P113). Body { document, dry_run,\n * effective_at }: document is a billing-catalog/v1 document, passed to billing-svc byte for byte;\n * dry_run is true when omitted, and returns the plan without applying it; with dry_run false the plan\n * is applied in one transaction; effective_at (RFC 3339, default now) is when changed rates start.\n * Answers the catalog_import_plan: dry_run, effective_at, created, changed, unchanged, absent (each {\n * kind, key, fields }) and conflicts ({ kind, key, field, message }). An apply with conflicts is\n * import_conflict, 409, with one details entry per conflict (field <kind>.<key>.<field>), and applies\n * nothing. The body may be up to 6 MiB (an import document is at most 5 MB). Needs sys:billing:manage.\n *\n * `POST /v1/billing/catalog/import` (ImportCatalog)\n */\n import(body?: T.ImportCatalogRequest, options?: RequestOptions): APIPromise<T.CatalogImportPlan> {\n return this.core.request<T.CatalogImportPlan>({ host: \"api\", method: \"POST\", path: `/v1/billing/catalog/import`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.catalogRules` operations.\n */\nexport class BillingCatalogRules {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.CatalogRulesService/GetCatalogRules (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/catalog-rules` (GetCatalogRules)\n */\n get(options?: RequestOptions): APIPromise<T.CatalogRules> {\n return this.core.request<T.CatalogRules>({ host: \"api\", method: \"GET\", path: `/v1/billing/catalog-rules` }, options);\n }\n\n /**\n * billing.catalog.v1.CatalogRulesService/UpdateCatalogRules (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/catalog-rules` (UpdateCatalogRules)\n */\n update(body?: T.UpdateCatalogRulesRequest, params?: T.UpdateCatalogRulesParams, options?: RequestOptions): APIPromise<T.CatalogRules> {\n const { if_match } = params ?? ({} as T.UpdateCatalogRulesParams);\n return this.core.request<T.CatalogRules>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/catalog-rules`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.checkoutSessions` operations.\n */\nexport class BillingCheckoutSessions {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.contract.v1.CheckoutSessionService/CreateCheckoutSession (35-contracts.md, Checkout session\n * and API Surface). The client's server creates a session for a Customer or a subject; the checkout\n * element confirms it through /v1/me/billing. success_url and cancel_url must be on one of the\n * instance's app origins (billing-svc docs/questions.md, P71).\n *\n * `POST /v1/billing/checkout-sessions` (CreateCheckoutSession)\n */\n create(body?: T.CreateCheckoutSessionRequest, options?: RequestOptions): APIPromise<T.CheckoutSession> {\n return this.core.request<T.CheckoutSession>({ host: \"api\", method: \"POST\", path: `/v1/billing/checkout-sessions`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.CheckoutSessionService/ExpireCheckoutSession (35-contracts.md, Checkout session\n * and API Surface). An open session becomes expired.\n *\n * `POST /v1/billing/checkout-sessions/{checkout_session_id}/expire` (ExpireCheckoutSession)\n */\n expire(checkoutSessionId: string, options?: RequestOptions): APIPromise<T.CheckoutSession> {\n return this.core.request<T.CheckoutSession>({ host: \"api\", method: \"POST\", path: `/v1/billing/checkout-sessions/${e(checkoutSessionId)}/expire`, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.CheckoutSessionService/GetCheckoutSession (35-contracts.md, Checkout session and\n * API Surface).\n *\n * `GET /v1/billing/checkout-sessions/{checkout_session_id}` (GetCheckoutSession)\n */\n get(checkoutSessionId: string, options?: RequestOptions): APIPromise<T.CheckoutSession> {\n return this.core.request<T.CheckoutSession>({ host: \"api\", method: \"GET\", path: `/v1/billing/checkout-sessions/${e(checkoutSessionId)}` }, options);\n }\n}\n\n/**\n * The `billing.contracts` operations.\n */\nexport class BillingContracts {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.contract.v1.ContractService/CancelContract (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/cancel` (CancelContract)\n */\n cancel(contractId: string, body?: T.CancelContractRequest, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/cancel`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/ChangeContractPackage (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/change-package` (ChangeContractPackage)\n */\n changePackage(contractId: string, body?: T.ChangeContractPackageRequest, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/change-package`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/CreateContract (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts` (CreateContract)\n */\n create(body?: T.CreateContractRequest, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/CreateContractEdit (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/edits` (CreateContractEdit)\n */\n createEdit(contractId: string, body?: T.CreateContractEditRequest, options?: RequestOptions): APIPromise<T.Edit> {\n return this.core.request<T.Edit>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/edits`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/DeleteContractEdit (35-contracts.md, API Surface).\n *\n * `DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}` (DeleteContractEdit)\n */\n deleteEdit(contractId: string, editId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/billing/contracts/${e(contractId)}/edits/${e(editId)}` }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/GetContract (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}` (GetContract)\n */\n get(contractId: string, params?: T.GetContractParams, options?: RequestOptions): APIPromise<T.Contract> {\n return this.core.request<T.Contract>({ host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/GetContractHistory (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}/history` (GetContractHistory)\n */\n getHistory(contractId: string, options?: RequestOptions): APIPromise<T.ContractHistory> {\n return this.core.request<T.ContractHistory>({ host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}/history` }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/ListContracts (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts` (ListContracts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListContractsParams, options?: RequestOptions): PagePromise<T.Contract, T.ContractList> {\n return this.core.page<T.Contract, T.ContractList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/contracts`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/ListAllowanceSchedules (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}/allowance-schedules` (ListAllowanceSchedules)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAllowanceSchedules(contractId: string, params?: T.ListAllowanceSchedulesParams, options?: RequestOptions): PagePromise<T.AllowanceSchedule, T.AllowanceScheduleList> {\n return this.core.page<T.AllowanceSchedule, T.AllowanceScheduleList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}/allowance-schedules`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/ListContractEdits (35-contracts.md, API Surface).\n *\n * `GET /v1/billing/contracts/{contract_id}/edits` (ListContractEdits)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEdits(contractId: string, params?: T.ListContractEditsParams, options?: RequestOptions): PagePromise<T.Edit, T.EditList> {\n return this.core.page<T.Edit, T.EditList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/contracts/${e(contractId)}/edits`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/PreviewContract (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/preview` (PreviewContract)\n */\n preview(body?: T.PreviewContractRequest, options?: RequestOptions): APIPromise<T.PreviewContractResponse> {\n return this.core.request<T.PreviewContractResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/PreviewContractEdit (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/edits/preview` (PreviewContractEdit)\n */\n previewEdit(contractId: string, body?: T.PreviewContractEditRequest, options?: RequestOptions): APIPromise<T.PreviewContractEditResponse> {\n return this.core.request<T.PreviewContractEditResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/edits/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.ContractService/RevokeContractCancellation (35-contracts.md, API Surface).\n *\n * `POST /v1/billing/contracts/{contract_id}/revoke-cancellation` (RevokeContractCancellation)\n */\n revokeCancellation(contractId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.RevokeContractCancellationResponse> {\n return this.core.request<T.RevokeContractCancellationResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/contracts/${e(contractId)}/revoke-cancellation`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.creditNotes` operations.\n */\nexport class BillingCreditNotes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.invoice.v1.CreditNoteService/CreateCreditNote (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/credit-notes` (CreateCreditNote)\n */\n create(body?: T.CreateCreditNoteRequest, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"POST\", path: `/v1/billing/credit-notes`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/GetCreditNote (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/credit-notes/{credit_note_id}` (GetCreditNote)\n */\n get(creditNoteId: string, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"GET\", path: `/v1/billing/credit-notes/${e(creditNoteId)}` }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/GetCreditNotePdf (37-invoicing.md, API Surface; The document).\n * The credit note's PDF as a download, not an envelope: Content-Type application/pdf and\n * Content-Disposition attachment with the file name billing-svc gives, {number}.pdf. A voided credit\n * note's is the VOID rendition (billing-svc docs/questions.md, X158). locale is not read until\n * documents are localized.\n *\n * `GET /v1/billing/credit-notes/{credit_note_id}/pdf` (GetCreditNotePdf)\n */\n getPdf(creditNoteId: string, params?: T.GetCreditNotePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"api\", method: \"GET\", path: `/v1/billing/credit-notes/${e(creditNoteId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/ListCreditNotes (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/credit-notes` (ListCreditNotes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCreditNotesParams, options?: RequestOptions): PagePromise<T.CreditNote, T.CreditNoteList> {\n return this.core.page<T.CreditNote, T.CreditNoteList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/credit-notes`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/PreviewCreditNote (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/credit-notes/preview` (PreviewCreditNote)\n */\n preview(body?: T.PreviewCreditNoteRequest, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"POST\", path: `/v1/billing/credit-notes/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.CreditNoteService/VoidCreditNote (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/credit-notes/{credit_note_id}/void` (VoidCreditNote)\n */\n void(creditNoteId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.CreditNote> {\n return this.core.request<T.CreditNote>({ host: \"api\", method: \"POST\", path: `/v1/billing/credit-notes/${e(creditNoteId)}/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.currencies` operations.\n */\nexport class BillingCurrencies {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.CurrencyService/ListCurrencies (32-billing-overview.md, API Surface, Currencies).\n * Every currency billing accepts, sorted by code: its upper-case ISO 4217 code, English name, minor\n * units (exponent), whether Stripe can charge it (chargeable) and Stripe's minimum charge, or null.\n * chargeable=true lists only the chargeable ones. Paged like every list.\n *\n * `GET /v1/billing/currencies` (ListCurrencies)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCurrenciesParams, options?: RequestOptions): PagePromise<T.Currency, T.CurrencyList> {\n return this.core.page<T.Currency, T.CurrencyList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/currencies`, query: params }, options);\n }\n}\n\n/**\n * The `billing.customers` operations.\n */\nexport class BillingCustomers {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.customer.v1.CustomerService/AnonymizeCustomer (32-billing-overview.md, Customers,\n * Anonymizing). Removes a settled Customer's personal data for a GDPR erasure: its name becomes the\n * given one (default \"Deleted customer\"); its email, billing address, tax ids, locale, ingest aliases\n * and metadata are cleared; its payment methods are detached on the provider; it is archived and its\n * anonymized_at set. Its id, subject and history stay, and its issued invoices keep their documents,\n * the tax record. Refused with customer_in_use while a contract has not ended or an invoice is a\n * draft, held or open. Idempotent and irreversible: later writes are customer_anonymized.\n *\n * `POST /v1/billing/customers/{customer_id}/anonymize` (AnonymizeCustomer)\n */\n anonymize(customerId: string, body?: T.AnonymizeCustomerRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/anonymize`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/ArchiveCustomer (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/archive` (ArchiveCustomer)\n */\n archive(customerId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/ChangeCustomerSubject (32-billing-overview.md, Changing the\n * subject). Re-points the Customer from user to organization, or from external to user or\n * organization; the new subject must have no Customer of its own.\n *\n * `POST /v1/billing/customers/{customer_id}/change-subject` (ChangeCustomerSubject)\n */\n changeSubject(customerId: string, body?: T.ChangeCustomerSubjectRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/change-subject`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/CreateCustomer (32-billing-overview.md, API Surface; Customer).\n * tax_status is auto, taxable, exempt or reverse_charge; left out, it is auto: billing decides reverse\n * charge, and taxable forces tax (billing-svc docs/questions.md, P104, P105).\n *\n * `POST /v1/billing/customers` (CreateCustomer)\n */\n create(body?: T.CreateCustomerRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/GetCustomer (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/customers/{customer_id}` (GetCustomer)\n */\n get(customerId: string, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}` }, options);\n }\n\n /**\n * billing.entitlement.v1.CustomerAccessService/GetCustomerAccess (32-billing-overview.md, API Surface,\n * Customer access; Data Model, Customer access; billing-svc docs/questions.md, P125). The Customer's\n * current access: its subject, the package it is on, every feature it resolves a value for by key ({\n * type, value } for a boolean or numeric feature, { type, allowance, per, limit, overage, exhausted }\n * for a metered one; billing-svc docs/questions.md, P107), seat_limit, suspended and suspension_cause,\n * with a version that increases on every change. A Customer with no access stored yet answers the\n * access computed now with version 0. A client that knows only a subject finds its Customer with GET\n * /v1/billing/customers?subject_type=&subject_id=; a subject with no Customer has no access, only the\n * defaults. Needs sys:billing:read on the root, and answers while billing is off (billing-svc\n * docs/questions.md, P41). An unknown Customer is customer_not_found. The RPC writes nothing, so\n * X-Idempotency-Key is not read.\n *\n * `GET /v1/billing/customers/{customer_id}/access` (GetCustomerAccess)\n */\n getAccess(customerId: string, options?: RequestOptions): APIPromise<T.CustomerAccess> {\n return this.core.request<T.CustomerAccess>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/access` }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/ListCustomers (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/customers` (ListCustomers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCustomersParams, options?: RequestOptions): PagePromise<T.Customer, T.CustomerList> {\n return this.core.page<T.Customer, T.CustomerList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/customers`, query: params }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/UnarchiveCustomer (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/unarchive` (UnarchiveCustomer)\n */\n unarchive(customerId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CustomerService/UpdateCustomer (32-billing-overview.md, API Surface; Customer).\n * tax_status is auto, taxable, exempt or reverse_charge (billing-svc docs/questions.md, P105).\n *\n * `PATCH /v1/billing/customers/{customer_id}` (UpdateCustomer)\n */\n update(customerId: string, body?: T.UpdateCustomerRequest, options?: RequestOptions): APIPromise<T.Customer> {\n return this.core.request<T.Customer>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/customers/${e(customerId)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.disputes` operations.\n */\nexport class BillingDisputes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.DisputeService/GetDispute (38-payments-and-tax.md, API Surface, Refunds and\n * disputes).\n *\n * `GET /v1/billing/disputes/{dispute_id}` (GetDispute)\n */\n get(disputeId: string, options?: RequestOptions): APIPromise<T.Dispute> {\n return this.core.request<T.Dispute>({ host: \"api\", method: \"GET\", path: `/v1/billing/disputes/${e(disputeId)}` }, options);\n }\n\n /**\n * billing.payment.v1.DisputeService/ListDisputes (38-payments-and-tax.md, API Surface, Refunds and\n * disputes). Newest first.\n *\n * `GET /v1/billing/disputes` (ListDisputes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListDisputesParams, options?: RequestOptions): PagePromise<T.Dispute, T.DisputeList> {\n return this.core.page<T.Dispute, T.DisputeList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/disputes`, query: params }, options);\n }\n}\n\n/**\n * The `billing.dunning` operations.\n */\nexport class BillingDunning {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.DunningService/GetCustomerDunning (38-payments-and-tax.md, API Surface, Dunning;\n * Customer dunning state). The same state the Customer object carries as dunning; a send_invoice\n * Customer is always none.\n *\n * `GET /v1/billing/customers/{customer_id}/dunning` (GetCustomerDunning)\n */\n getForCustomer(customerId: string, options?: RequestOptions): APIPromise<T.DunningState> {\n return this.core.request<T.DunningState>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/dunning` }, options);\n }\n\n /**\n * billing.payment.v1.DunningService/GetDunningPolicy (38-payments-and-tax.md, API Surface, Dunning;\n * Dunning policy). The instance's policy, with 38's defaults until it is changed.\n *\n * `GET /v1/billing/dunning-policy` (GetDunningPolicy)\n */\n getPolicy(options?: RequestOptions): APIPromise<T.DunningPolicy> {\n return this.core.request<T.DunningPolicy>({ host: \"api\", method: \"GET\", path: `/v1/billing/dunning-policy` }, options);\n }\n\n /**\n * billing.payment.v1.DunningService/RetryCustomerDunning (38-payments-and-tax.md, API Surface,\n * Dunning). Tries every overdue invoice at once, oldest first, as the client; the schedule does not\n * move.\n *\n * `POST /v1/billing/customers/{customer_id}/dunning/retry` (RetryCustomerDunning)\n */\n retryForCustomer(customerId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.DunningState> {\n return this.core.request<T.DunningState>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/dunning/retry`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.DunningService/UpdateDunningPolicy (38-payments-and-tax.md, API Surface, Dunning;\n * Dunning policy). A field left out keeps its value; retries and steps replace their lists;\n * send_invoice is merged field by field, and null turns a field off (null on send_invoice turns every\n * field in it off). More than 6 retries or 20 steps is field_too_long and changes nothing.\n *\n * `PATCH /v1/billing/dunning-policy` (UpdateDunningPolicy)\n */\n updatePolicy(body?: T.UpdateDunningPolicyRequest, params?: T.UpdateDunningPolicyParams, options?: RequestOptions): APIPromise<T.DunningPolicy> {\n const { if_match } = params ?? ({} as T.UpdateDunningPolicyParams);\n return this.core.request<T.DunningPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/dunning-policy`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.entitlements` operations.\n */\nexport class BillingEntitlements {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.entitlement.v1.EntitlementService/CheckEntitlement (39-entitlements-and-controls.md, API\n * Surface; Check, list, consume). No side effects. A denial is a 200 with allowed false and a reason\n * (not_entitled, allowance_exhausted, balance_exhausted, access_restricted), never an error (Error\n * Handling). value is the feature's value: true, a decimal string, or a metered feature's allowance;\n * when the Customer is not entitled to it, false for a boolean feature and null otherwise. limit is a\n * metered feature's state, null for other types. Only external subjects resolve until Phase 4. The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/entitlements/check` (CheckEntitlement)\n */\n check(body?: T.CheckEntitlementRequest, options?: RequestOptions): APIPromise<T.CheckEntitlementResponse> {\n return this.core.request<T.CheckEntitlementResponse>({ host: \"authz\", method: \"POST\", path: `/v1/entitlements/check`, body }, options);\n }\n\n /**\n * billing.entitlement.v1.EntitlementService/ConsumeEntitlement (39-entitlements-and-controls.md, API\n * Surface; Check, list, consume). Resolves, decides as a check would and, when allowed, records the\n * usage event, in one transaction. Idempotent on transaction_id, not on X-Idempotency-Key, which is\n * not read: a retry of an allowed consume answers the first decision with replayed true and consumes\n * nothing again; a denied consume records nothing and is decided again on retry (billing-svc\n * docs/questions.md, P9). A denial is a 200 with allowed false and a reason, never an error.\n * properties is a JSON object, kept as sent. The usage event is checked against its event type's\n * schema as ingest checks it: with validation warn, an allowed consume lists warnings, each { code,\n * property, expected }; with reject, one that does not fit is refused with 422 schema_mismatch and\n * records nothing: the error's details list each violation as { field: its property, message: its code\n * and what was expected } (billing-svc docs/questions.md, P99, P111).\n *\n * `POST /v1/entitlements/consume` (ConsumeEntitlement)\n */\n consume(body?: T.ConsumeEntitlementRequest, options?: RequestOptions): APIPromise<T.ConsumeEntitlementResponse> {\n return this.core.request<T.ConsumeEntitlementResponse>({ host: \"authz\", method: \"POST\", path: `/v1/entitlements/consume`, body }, options);\n }\n\n /**\n * billing.entitlement.v1.EntitlementService/ListEntitlements (39-entitlements-and-controls.md, API\n * Surface; Entitlement (resolved)). The resolved set for a subject (subject_type and subject_id) or a\n * Customer: every feature some source sets, by key, each with its via. A boolean or numeric feature is\n * { feature_id, key, type, value, via }; a metered one carries meter_id, allowance, limit, overage,\n * period_start, period_end, used, remaining and balance in place of value.\n *\n * `GET /v1/billing/entitlements` (GetEntitlements)\n */\n get(params?: T.GetEntitlementsParams, options?: RequestOptions): APIPromise<T.EntitlementSet> {\n return this.core.request<T.EntitlementSet>({ host: \"api\", method: \"GET\", path: `/v1/billing/entitlements`, query: params }, options);\n }\n}\n\n/**\n * The `billing.eventTypes` operations.\n */\nexport class BillingEventTypes {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.metering.v1.EventTypeService/ArchiveEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Refused with\n * event_type_in_use while a meter's current or future version names it. Events of an archived type are\n * accepted with no check and no enrichment.\n *\n * `POST /v1/billing/event-types/{event_type}/archive` (ArchiveEventType)\n */\n archive(eventType: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types/${e(eventType)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/CreateEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Defines an event\n * type before any event of its key is sent: origin client, validation warn unless given (none, warn or\n * reject), auto_enrich true unless given. Each property is { key, type, required, description }, type\n * string, number or boolean, up to 100. A key already used, detected or defined, is\n * event_type_key_conflict; at the instance's limit of active event types, event_type_limit_reached.\n *\n * `POST /v1/billing/event-types` (CreateEventType)\n */\n create(body?: T.CreateEventTypeRequest, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/GetEventType (33-metering.md, API Surface, Event types; Event\n * types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types\n * is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). An event type by its etyp_ id or\n * its key. Each property carries its source, types_seen, first_seen_at and last_seen_at, read-only. An\n * unknown one is event_type_not_found.\n *\n * `GET /v1/billing/event-types/{event_type}` (GetEventType)\n */\n get(eventType: string, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"GET\", path: `/v1/billing/event-types/${e(eventType)}` }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/InferEventType (33-metering.md, API Surface, Event types; Event\n * types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types\n * is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Takes { event }, one sample event\n * as it would be sent, and answers a draft: the key, and one property per property of the sample with\n * its value's type, each required false. Nothing is saved, so the draft has an empty id, null\n * timestamps, and X-Idempotency-Key is not read; the client edits the draft and creates it.\n *\n * `POST /v1/billing/event-types/infer` (InferEventType)\n */\n infer(body?: T.InferEventTypeRequest, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types/infer`, body }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/ListEventTypes (33-metering.md, API Surface, Event types; Event\n * types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types\n * is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). The instance's event types,\n * newest first.\n *\n * `GET /v1/billing/event-types` (ListEventTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListEventTypesParams, options?: RequestOptions): PagePromise<T.MeteringEventType, T.EventTypeList> {\n return this.core.page<T.MeteringEventType, T.EventTypeList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/event-types`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/UnarchiveEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). At the instance's\n * limit of active event types, refused with event_type_limit_reached.\n *\n * `POST /v1/billing/event-types/{event_type}/unarchive` (UnarchiveEventType)\n */\n unarchive(eventType: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"POST\", path: `/v1/billing/event-types/${e(eventType)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.EventTypeService/UpdateEventType (33-metering.md, API Surface, Event types;\n * Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since\n * /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). A field left out\n * keeps its value; the key does not change. properties replaces the whole list: a property left out is\n * removed, one set or changed becomes source client, and [] removes them all. properties, auto_enrich\n * and validation may not be null. Removing a property a meter names, or changing its type away from\n * number where a meter needs one, is event_type_property_in_use.\n *\n * `PATCH /v1/billing/event-types/{event_type}` (UpdateEventType)\n */\n update(eventType: string, body?: T.UpdateEventTypeRequest, options?: RequestOptions): APIPromise<T.MeteringEventType> {\n return this.core.request<T.MeteringEventType>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/event-types/${e(eventType)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.events` operations.\n */\nexport class BillingEvents {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.event.v1.EventService/GetEvent (32-billing-overview.md, API Surface, Events; billing-svc\n * docs/questions.md, P32).\n *\n * `GET /v1/billing/events/{event_id}` (GetEvent)\n */\n get(eventId: string, options?: RequestOptions): APIPromise<T.BillingEvent> {\n return this.core.request<T.BillingEvent>({ host: \"api\", method: \"GET\", path: `/v1/billing/events/${e(eventId)}` }, options);\n }\n\n /**\n * billing.event.v1.EventService/ListEvents (32-billing-overview.md, API Surface, Events; billing-svc\n * docs/questions.md, P32).\n *\n * `GET /v1/billing/events` (ListEvents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListEventsParams, options?: RequestOptions): PagePromise<T.BillingEvent, T.EventCursorList> {\n return this.core.page<T.BillingEvent, T.EventCursorList>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/billing/events`, query: params }, options);\n }\n}\n\n/**\n * The `billing.exchangeRates` operations.\n */\nexport class BillingExchangeRates {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.ExchangeRateService/GetExchangeRate (32-billing-overview.md, API Surface,\n * Exchange rates). The rate a line whose service period ends at at takes: the ECB's reference rate, or\n * a manual rate for a pair the ECB does not publish. exchange_rate_unavailable while there is none\n * yet.\n *\n * `GET /v1/billing/exchange-rates` (GetExchangeRate)\n */\n get(params: T.GetExchangeRateParams, options?: RequestOptions): APIPromise<T.ExchangeRate> {\n return this.core.request<T.ExchangeRate>({ host: \"api\", method: \"GET\", path: `/v1/billing/exchange-rates`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.ExchangeRateService/SetManualExchangeRate (32-billing-overview.md, API Surface,\n * Exchange rates). A manual rate for one day (UTC) of a pair the ECB does not publish: { rate, note }.\n * exchange_rate_published for a pair the ECB publishes; exchange_rate_in_use for a change to a rate a\n * finalized invoice used.\n *\n * `PUT /v1/billing/exchange-rates/{from}/{to}/{date}` (ReplaceExchangeRate)\n */\n replace(from: string, to: string, date: string, body?: T.SetManualExchangeRateRequest, options?: RequestOptions): APIPromise<T.ExchangeRate> {\n return this.core.request<T.ExchangeRate>({ host: \"api\", method: \"PUT\", path: `/v1/billing/exchange-rates/${e(from)}/${e(to)}/${e(date)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.features` operations.\n */\nexport class BillingFeatures {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.FeatureService/ArchiveFeature (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/features/{feature}/archive` (ArchiveFeature)\n */\n archive(feature: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"POST\", path: `/v1/billing/features/${e(feature)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/CreateFeature (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/features` (CreateFeature)\n */\n create(body?: T.CreateFeatureRequest, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"POST\", path: `/v1/billing/features`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/GetFeature (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/features/{feature}` (GetFeature)\n */\n get(feature: string, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"GET\", path: `/v1/billing/features/${e(feature)}` }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/ListFeatures (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/features` (ListFeatures)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListFeaturesParams, options?: RequestOptions): PagePromise<T.Feature, T.FeatureList> {\n return this.core.page<T.Feature, T.FeatureList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/features`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.FeatureService/UpdateFeature (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/features/{feature}` (UpdateFeature)\n */\n update(feature: string, body?: T.UpdateFeatureRequest, options?: RequestOptions): APIPromise<T.Feature> {\n return this.core.request<T.Feature>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/features/${e(feature)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.grants` operations.\n */\nexport class BillingGrants {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.ledger.v1.GrantService/CreateGrant (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/grants` (CreateGrant)\n */\n create(body?: T.CreateGrantRequest, options?: RequestOptions): APIPromise<T.Grant> {\n return this.core.request<T.Grant>({ host: \"api\", method: \"POST\", path: `/v1/billing/grants`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/GetGrant (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/grants/{grant_id}` (GetGrant)\n */\n get(grantId: string, options?: RequestOptions): APIPromise<T.Grant> {\n return this.core.request<T.Grant>({ host: \"api\", method: \"GET\", path: `/v1/billing/grants/${e(grantId)}` }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/ListGrants (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/grants` (ListGrants)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListGrantsParams, options?: RequestOptions): PagePromise<T.Grant, T.GrantList> {\n return this.core.page<T.Grant, T.GrantList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/grants`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/UpdateGrant (36-credits-ledger.md, API Surface).\n *\n * `PATCH /v1/billing/grants/{grant_id}` (UpdateGrant)\n */\n update(grantId: string, body?: T.UpdateGrantRequest, options?: RequestOptions): APIPromise<T.Grant> {\n return this.core.request<T.Grant>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/grants/${e(grantId)}`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.GrantService/VoidGrant (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/grants/{grant_id}/void` (VoidGrant)\n */\n void(grantId: string, body?: T.VoidGrantRequest, options?: RequestOptions): APIPromise<T.VoidGrantResponse> {\n return this.core.request<T.VoidGrantResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/grants/${e(grantId)}/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.invoices` operations.\n */\nexport class BillingInvoices {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.invoice.v1.InvoiceService/CreateInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices` (CreateInvoice)\n */\n create(body?: T.CreateInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/FinalizeInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/finalize` (FinalizeInvoice)\n */\n finalize(invoiceId: string, body?: T.FinalizeInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/finalize`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetInvoice (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices/{invoice_id}` (GetInvoice)\n */\n get(invoiceId: string, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}` }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetInvoicePdf (37-invoicing.md, API Surface; The document). The\n * invoice's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition\n * attachment with the file name billing-svc gives, {number}.pdf. A voided invoice's is the VOID\n * rendition (billing-svc docs/questions.md, X158); a draft has none (not_found). locale is not read\n * until documents are localized.\n *\n * `GET /v1/billing/invoices/{invoice_id}/pdf` (GetInvoicePdf)\n */\n getPdf(invoiceId: string, params?: T.GetInvoicePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetUpcomingInvoice (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices/upcoming` (GetUpcomingInvoice)\n */\n getUpcoming(params?: T.GetUpcomingInvoiceParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/upcoming`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/GetInvoiceUsageCsv (37-invoicing.md, API Surface; The document).\n * One row per rated usage line (billing-svc docs/questions.md, X157), as a download, not an envelope:\n * Content-Type text/csv; charset=utf-8 and Content-Disposition attachment with the file name\n * billing-svc gives, {number}-usage-detail.csv.\n *\n * `GET /v1/billing/invoices/{invoice_id}/usage-detail` (GetInvoiceUsageCsv)\n */\n getUsageCsv(invoiceId: string, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}/usage-detail`, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/ListInvoices (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices` (ListInvoices)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListInvoicesParams, options?: RequestOptions): PagePromise<T.Invoice, T.InvoiceList> {\n return this.core.page<T.Invoice, T.InvoiceList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/invoices`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/ListInvoiceLines (37-invoicing.md, API Surface).\n *\n * `GET /v1/billing/invoices/{invoice_id}/lines` (ListInvoiceLines)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listLines(invoiceId: string, params?: T.ListInvoiceLinesParams, options?: RequestOptions): PagePromise<T.Line, T.LineList> {\n return this.core.page<T.Line, T.LineList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/invoices/${e(invoiceId)}/lines`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/MarkInvoiceUncollectible (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/mark-uncollectible` (MarkInvoiceUncollectible)\n */\n markUncollectible(invoiceId: string, body?: T.MarkInvoiceUncollectibleRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/mark-uncollectible`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/PayInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/pay` (PayInvoice)\n */\n pay(invoiceId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/pay`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/RecomputeInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/recompute` (RecomputeInvoice)\n */\n recompute(invoiceId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/recompute`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/SendInvoice (37-invoicing.md, API Surface; Emails). Sends the\n * invoice issued email again, with its PDF, to the Customer's email as it is now, whatever the emails\n * toggles say. A draft, held or void invoice is invoice_not_open (billing-svc docs/questions.md,\n * X163). X-Idempotency-Key is passed through. The body takes no field.\n *\n * `POST /v1/billing/invoices/{invoice_id}/send` (SendInvoice)\n */\n send(invoiceId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/send`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/UpdateInvoice (37-invoicing.md, API Surface).\n *\n * `PATCH /v1/billing/invoices/{invoice_id}` (UpdateInvoice)\n */\n update(invoiceId: string, body?: T.UpdateInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/invoices/${e(invoiceId)}`, body, idempotent: true }, options);\n }\n\n /**\n * billing.invoice.v1.InvoiceService/VoidInvoice (37-invoicing.md, API Surface).\n *\n * `POST /v1/billing/invoices/{invoice_id}/void` (VoidInvoice)\n */\n void(invoiceId: string, body?: T.VoidInvoiceRequest, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"api\", method: \"POST\", path: `/v1/billing/invoices/${e(invoiceId)}/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.ledger` operations.\n */\nexport class BillingLedger {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.ledger.v1.LedgerService/CreateLedgerAdjustment (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/ledger-adjustments` (CreateLedgerAdjustment)\n */\n createAdjustment(customerId: string, body?: T.CreateLedgerAdjustmentRequest, options?: RequestOptions): APIPromise<T.LedgerEntry> {\n return this.core.request<T.LedgerEntry>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/ledger-adjustments`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/CreateTopUp (36-credits-ledger.md, API Surface).\n *\n * `POST /v1/billing/customers/{customer_id}/top-ups` (CreateTopUp)\n */\n createTopUp(customerId: string, body?: T.CreateTopUpRequest, options?: RequestOptions): APIPromise<T.CreateTopUpResponse> {\n return this.core.request<T.CreateTopUpResponse>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/top-ups`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/GetWallet (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/customers/{customer_id}/wallets/{unit}` (GetWallet)\n */\n getWallet(customerId: string, unit: string, options?: RequestOptions): APIPromise<T.Wallet> {\n return this.core.request<T.Wallet>({ host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/wallets/${e(unit)}` }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/ListBalances (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/customers/{customer_id}/balances` (ListBalances)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listBalances(customerId: string, params?: T.ListBalancesParams, options?: RequestOptions): PagePromise<T.Balance, T.BalanceList> {\n return this.core.page<T.Balance, T.BalanceList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/balances`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/ListLedgerEntries (36-credits-ledger.md, API Surface).\n *\n * `GET /v1/billing/ledger-entries` (ListLedgerEntries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEntries(params?: T.ListLedgerEntriesParams, options?: RequestOptions): PagePromise<T.LedgerEntry, T.LedgerEntryCursorList> {\n return this.core.page<T.LedgerEntry, T.LedgerEntryCursorList>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/billing/ledger-entries`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/RefundAccountCredit (36-credits-ledger.md, API Surface; Account\n * credit; 38-payments-and-tax.md, Refunds). Pays refundable account credit back to the provider\n * payment it came from, never more than what is left of that payment, as refunds with reason\n * account_credit_refund and no credit note (billing-svc docs/questions.md, P96). Credit added by hand,\n * an invoice's surplus or an external overpayment can only be spent. More than the balance is\n * balance_would_be_negative; more than the refundable part (the balances read's refundable) is\n * refund_exceeds_payment.\n *\n * `POST /v1/billing/customers/{customer_id}/account-credit/refund` (RefundAccountCredit)\n */\n refundAccountCredit(customerId: string, body?: T.RefundAccountCreditRequest, options?: RequestOptions): APIPromise<T.LedgerEntry> {\n return this.core.request<T.LedgerEntry>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/account-credit/refund`, body, idempotent: true }, options);\n }\n\n /**\n * billing.ledger.v1.LedgerService/UpdateWalletSettings (36-credits-ledger.md, API Surface).\n *\n * `PUT /v1/billing/customers/{customer_id}/wallets/{unit}` (ReplaceWalletSettings)\n */\n replaceWalletSettings(customerId: string, unit: string, body?: T.UpdateWalletSettingsRequest, options?: RequestOptions): APIPromise<T.WalletSettings> {\n return this.core.request<T.WalletSettings>({ host: \"api\", method: \"PUT\", path: `/v1/billing/customers/${e(customerId)}/wallets/${e(unit)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.meters` operations.\n */\nexport class BillingMeters {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.metering.v1.MeterService/ArchiveMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters/{meter}/archive` (ArchiveMeter)\n */\n archive(meter: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters/${e(meter)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/CreateMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters` (CreateMeter)\n */\n create(body?: T.CreateMeterRequest, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/GetMeter (33-metering.md, API Surface).\n *\n * `GET /v1/billing/meters/{meter}` (GetMeter)\n */\n get(meter: string, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"GET\", path: `/v1/billing/meters/${e(meter)}` }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/ListMeters (33-metering.md, API Surface).\n *\n * `GET /v1/billing/meters` (ListMeters)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListMetersParams, options?: RequestOptions): PagePromise<T.Meter, T.MeterList> {\n return this.core.page<T.Meter, T.MeterList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/meters`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/PreviewMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters/preview` (PreviewMeter)\n */\n preview(body?: T.PreviewMeterRequest, options?: RequestOptions): APIPromise<T.MeterPreview> {\n return this.core.request<T.MeterPreview>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters/preview`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/ReplaceMeterDefinition (33-metering.md, API Surface).\n *\n * `PUT /v1/billing/meters/{meter}/definition` (ReplaceMeterDefinition)\n */\n replaceDefinition(meter: string, body?: T.ReplaceMeterDefinitionRequest, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"PUT\", path: `/v1/billing/meters/${e(meter)}/definition`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/UnarchiveMeter (33-metering.md, API Surface).\n *\n * `POST /v1/billing/meters/{meter}/unarchive` (UnarchiveMeter)\n */\n unarchive(meter: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"POST\", path: `/v1/billing/meters/${e(meter)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.MeterService/UpdateMeter (33-metering.md, API Surface).\n *\n * `PATCH /v1/billing/meters/{meter}` (UpdateMeter)\n */\n update(meter: string, body?: T.UpdateMeterRequest, options?: RequestOptions): APIPromise<T.Meter> {\n return this.core.request<T.Meter>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/meters/${e(meter)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.packages` operations.\n */\nexport class BillingPackages {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.PackageService/ArchivePackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/archive` (ArchivePackage)\n */\n archive(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/CreatePackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages` (CreatePackage)\n */\n create(body?: T.CreatePackageRequest, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/DiscardPackageDraft (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/discard-draft` (DiscardPackageDraft)\n */\n discardDraft(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/discard-draft`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/GetPackage (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/packages/{package}` (GetPackage)\n */\n get(package_: string, params?: T.GetPackageParams, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"GET\", path: `/v1/billing/packages/${e(package_)}`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/ListPackages (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/packages` (ListPackages)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPackagesParams, options?: RequestOptions): PagePromise<T.Package, T.PackageList> {\n return this.core.page<T.Package, T.PackageList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/packages`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/ListPackageVersions (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/packages/{package}/versions` (ListPackageVersions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listVersions(package_: string, params?: T.ListPackageVersionsParams, options?: RequestOptions): PagePromise<T.Package, T.PackageList> {\n return this.core.page<T.Package, T.PackageList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/packages/${e(package_)}/versions`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/PublishPackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/publish` (PublishPackage)\n */\n publish(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/publish`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/UnarchivePackage (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/packages/{package}/unarchive` (UnarchivePackage)\n */\n unarchive(package_: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"POST\", path: `/v1/billing/packages/${e(package_)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PackageService/UpdatePackage (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/packages/{package}` (UpdatePackage)\n */\n update(package_: string, body?: T.UpdatePackageRequest, options?: RequestOptions): APIPromise<T.Package> {\n return this.core.request<T.Package>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/packages/${e(package_)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.paymentConnections` operations.\n */\nexport class BillingPaymentConnections {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentConnectionService/CreatePaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections).\n *\n * `POST /v1/billing/payment-connections` (CreatePaymentConnection)\n */\n create(body?: T.CreatePaymentConnectionRequest, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"POST\", path: `/v1/billing/payment-connections`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/GetPaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections). tax is the connected account's Stripe Tax read, read-only and null\n * until read: { status, head_office, registrations: [{ country, state, type }], warnings: [{ code,\n * message, country, tax_id_type }] } (38-payments-and-tax.md, The seller's tax identity; billing-svc\n * docs/questions.md, P104).\n *\n * `GET /v1/billing/payment-connections/{payment_connection_id}` (GetPaymentConnection)\n */\n get(paymentConnectionId: string, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"GET\", path: `/v1/billing/payment-connections/${e(paymentConnectionId)}` }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/ListPaymentConnections (32-billing-overview.md, API\n * Surface, Payment connections).\n *\n * `GET /v1/billing/payment-connections` (ListPaymentConnections)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPaymentConnectionsParams, options?: RequestOptions): PagePromise<T.PaymentConnection, T.PaymentConnectionList> {\n return this.core.page<T.PaymentConnection, T.PaymentConnectionList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/payment-connections`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/RefreshPaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections). tax is the connected account's Stripe Tax read, read-only and null\n * until read: { status, head_office, registrations: [{ country, state, type }], warnings: [{ code,\n * message, country, tax_id_type }] } (38-payments-and-tax.md, The seller's tax identity; billing-svc\n * docs/questions.md, P104).\n *\n * `POST /v1/billing/payment-connections/{payment_connection_id}/refresh` (RefreshPaymentConnection)\n */\n refresh(paymentConnectionId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"POST\", path: `/v1/billing/payment-connections/${e(paymentConnectionId)}/refresh`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentConnectionService/RevokePaymentConnection (32-billing-overview.md, API\n * Surface, Payment connections). Revokes Pontive's access on the provider; the connection stays,\n * revoked, with revoked_at (api-route-review D8, D58).\n *\n * `POST /v1/billing/payment-connections/{payment_connection_id}/revoke` (RevokePaymentConnection)\n */\n revoke(paymentConnectionId: string, options?: RequestOptions): APIPromise<T.PaymentConnection> {\n return this.core.request<T.PaymentConnection>({ host: \"api\", method: \"POST\", path: `/v1/billing/payment-connections/${e(paymentConnectionId)}/revoke`, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.paymentMethods` operations.\n */\nexport class BillingPaymentMethods {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentMethodService/CreatePaymentMethodSession (32-billing-overview.md, API\n * Surface, Customers; 38-payments-and-tax.md, API Surface, Payment methods).\n *\n * `POST /v1/billing/customers/{customer_id}/payment-method-session` (CreatePaymentMethodSession)\n */\n createSession(customerId: string, body?: T.CreatePaymentMethodSessionRequest, options?: RequestOptions): APIPromise<T.PaymentMethodSession> {\n return this.core.request<T.PaymentMethodSession>({ host: \"api\", method: \"POST\", path: `/v1/billing/customers/${e(customerId)}/payment-method-session`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentMethodService/DetachPaymentMethod (38-payments-and-tax.md, API Surface,\n * Payment methods). A warning payment_method_required comes back when it was the last reusable method\n * (38-payments-and-tax.md, Payment methods, Removal).\n *\n * `DELETE /v1/billing/customers/{customer_id}/payment-methods/{payment_method_id}`\n * (DeleteCustomerPaymentMethod)\n */\n delete(customerId: string, paymentMethodId: string, options?: RequestOptions): APIPromise<T.DetachPaymentMethodResponse> {\n return this.core.request<T.DetachPaymentMethodResponse>({ host: \"api\", method: \"DELETE\", path: `/v1/billing/customers/${e(customerId)}/payment-methods/${e(paymentMethodId)}`, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentMethodService/ListPaymentMethods (38-payments-and-tax.md, API Surface,\n * Payment methods).\n *\n * `GET /v1/billing/customers/{customer_id}/payment-methods` (ListPaymentMethods)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(customerId: string, params?: T.ListPaymentMethodsParams, options?: RequestOptions): PagePromise<T.PaymentMethod, T.PaymentMethodList> {\n return this.core.page<T.PaymentMethod, T.PaymentMethodList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/customers/${e(customerId)}/payment-methods`, query: params }, options);\n }\n}\n\n/**\n * The `billing.payments` operations.\n */\nexport class BillingPayments {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentService/RecordExternalPayment (38-payments-and-tax.md, API Surface,\n * Payments; External payments). Records money received outside the provider as a succeeded payment\n * with external set. Partial amounts are allowed; more than is owed is external_payment_exceeds_due\n * unless allow_overpayment, which sends the excess to account credit. paid_at may not be in the\n * future.\n *\n * `POST /v1/billing/payments` (CreatePayment)\n */\n create(body?: T.RecordExternalPaymentRequest, options?: RequestOptions): APIPromise<T.Payment> {\n return this.core.request<T.Payment>({ host: \"api\", method: \"POST\", path: `/v1/billing/payments`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.PaymentService/GetPayment (38-payments-and-tax.md, API Surface, Payments).\n *\n * `GET /v1/billing/payments/{payment_id}` (GetPayment)\n */\n get(paymentId: string, options?: RequestOptions): APIPromise<T.Payment> {\n return this.core.request<T.Payment>({ host: \"api\", method: \"GET\", path: `/v1/billing/payments/${e(paymentId)}` }, options);\n }\n\n /**\n * billing.payment.v1.PaymentService/ListPayments (38-payments-and-tax.md, API Surface, Payments).\n *\n * `GET /v1/billing/payments` (ListPayments)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPaymentsParams, options?: RequestOptions): PagePromise<T.Payment, T.PaymentList> {\n return this.core.page<T.Payment, T.PaymentList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/payments`, query: params }, options);\n }\n}\n\n/**\n * The `billing.pricingUnits` operations.\n */\nexport class BillingPricingUnits {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.PricingUnitService/ArchivePricingUnit (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/pricing-units/{pricing_unit}/archive` (ArchivePricingUnit)\n */\n archive(pricingUnit: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"POST\", path: `/v1/billing/pricing-units/${e(pricingUnit)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/CreatePricingUnit (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/pricing-units` (CreatePricingUnit)\n */\n create(body?: T.CreatePricingUnitRequest, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"POST\", path: `/v1/billing/pricing-units`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/GetPricingUnit (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/pricing-units/{pricing_unit}` (GetPricingUnit)\n */\n get(pricingUnit: string, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"GET\", path: `/v1/billing/pricing-units/${e(pricingUnit)}` }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/ListPricingUnits (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/pricing-units` (ListPricingUnits)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPricingUnitsParams, options?: RequestOptions): PagePromise<T.PricingUnit, T.PricingUnitList> {\n return this.core.page<T.PricingUnit, T.PricingUnitList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/pricing-units`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.PricingUnitService/UpdatePricingUnit (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/pricing-units/{pricing_unit}` (UpdatePricingUnit)\n */\n update(pricingUnit: string, body?: T.UpdatePricingUnitRequest, options?: RequestOptions): APIPromise<T.PricingUnit> {\n return this.core.request<T.PricingUnit>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/pricing-units/${e(pricingUnit)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.products` operations.\n */\nexport class BillingProducts {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.ProductService/ArchiveProduct (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/products/{product}/archive` (ArchiveProduct)\n */\n archive(product: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"POST\", path: `/v1/billing/products/${e(product)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/CreateProduct (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/products` (CreateProduct)\n */\n create(body?: T.CreateProductRequest, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"POST\", path: `/v1/billing/products`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/GetProduct (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/products/{product}` (GetProduct)\n */\n get(product: string, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"GET\", path: `/v1/billing/products/${e(product)}` }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/ListProducts (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/products` (ListProducts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListProductsParams, options?: RequestOptions): PagePromise<T.Product, T.ProductList> {\n return this.core.page<T.Product, T.ProductList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/products`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/UnarchiveProduct (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/products/{product}/unarchive` (UnarchiveProduct)\n */\n unarchive(product: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"POST\", path: `/v1/billing/products/${e(product)}/unarchive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.ProductService/UpdateProduct (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/products/{product}` (UpdateProduct)\n */\n update(product: string, body?: T.UpdateProductRequest, options?: RequestOptions): APIPromise<T.Product> {\n return this.core.request<T.Product>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/products/${e(product)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.rateCards` operations.\n */\nexport class BillingRateCards {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.catalog.v1.RateCardService/ArchiveRateCard (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/rate-cards/{rate_card}/archive` (ArchiveRateCard)\n */\n archive(rateCard: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/archive`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/CreateRateCard (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/rate-cards` (CreateRateCard)\n */\n create(body?: T.CreateRateCardRequest, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/CreateRates (34-billing-catalog.md, API Surface).\n *\n * `POST /v1/billing/rate-cards/{rate_card}/rates` (CreateRates)\n */\n createRates(rateCard: string, body?: T.CreateRatesRequest, options?: RequestOptions): APIPromise<T.RateUnpagedList> {\n return this.core.request<T.RateUnpagedList>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/DeleteRate (34-billing-catalog.md, API Surface).\n *\n * `DELETE /v1/billing/rate-cards/{rate_card}/rates/{rate_id}` (DeleteRate)\n */\n deleteRate(rateCard: string, rateId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates/${e(rateId)}` }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/GetRateCard (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/rate-cards/{rate_card}` (GetRateCard)\n */\n get(rateCard: string, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"GET\", path: `/v1/billing/rate-cards/${e(rateCard)}` }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/ListRateCards (34-billing-catalog.md, API Surface).\n *\n * `GET /v1/billing/rate-cards` (ListRateCards)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRateCardsParams, options?: RequestOptions): PagePromise<T.RateCard, T.RateCardList> {\n return this.core.page<T.RateCard, T.RateCardList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/rate-cards`, query: params }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/ReplaceConversions (34-billing-catalog.md, API Surface).\n *\n * `PUT /v1/billing/rate-cards/{rate_card}/conversions` (ReplaceConversions)\n */\n replaceConversions(rateCard: string, body?: T.ReplaceConversionsRequest, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"PUT\", path: `/v1/billing/rate-cards/${e(rateCard)}/conversions`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/GetRateCardPrice (34-billing-catalog.md, API Surface). The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/billing/rate-cards/{rate_card}/price/search` (SearchRateCardPrices)\n */\n searchPrices(rateCard: string, body?: T.GetRateCardPriceRequest, options?: RequestOptions): APIPromise<T.PriceQuote> {\n return this.core.request<T.PriceQuote>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/price/search`, body }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/ListRates (34-billing-catalog.md, API Surface). The RPC writes\n * nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/billing/rate-cards/{rate_card}/rates/search` (SearchRates)\n */\n searchRates(rateCard: string, body?: T.ListRatesRequest, params?: T.SearchRatesParams, options?: RequestOptions): APIPromise<T.RateList> {\n return this.core.request<T.RateList>({ host: \"api\", method: \"POST\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates/search`, query: params, body }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/UpdateRateCard (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/rate-cards/{rate_card}` (UpdateRateCard)\n */\n update(rateCard: string, body?: T.UpdateRateCardRequest, options?: RequestOptions): APIPromise<T.RateCard> {\n return this.core.request<T.RateCard>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/rate-cards/${e(rateCard)}`, body, idempotent: true }, options);\n }\n\n /**\n * billing.catalog.v1.RateCardService/UpdateRate (34-billing-catalog.md, API Surface).\n *\n * `PATCH /v1/billing/rate-cards/{rate_card}/rates/{rate_id}` (UpdateRate)\n */\n updateRate(rateCard: string, rateId: string, body?: T.UpdateRateRequest, options?: RequestOptions): APIPromise<T.Rate> {\n return this.core.request<T.Rate>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/rate-cards/${e(rateCard)}/rates/${e(rateId)}`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.refunds` operations.\n */\nexport class BillingRefunds {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.PaymentService/RefundPayment (38-payments-and-tax.md, API Surface, Payments;\n * Refunds). Refunds a succeeded provider payment and creates its credit note, lines spread in\n * proportion. amount is required; reason is duplicate, fraudulent or requested_by_customer (the\n * default). The refund is answered as it stands once sent to the provider, usually pending. More than\n * is left of the payment, an external or unsucceeded payment, or a payment with an open dispute is\n * refund_exceeds_payment.\n *\n * `POST /v1/billing/refunds` (CreateRefund)\n */\n create(body?: T.RefundPaymentRequest, options?: RequestOptions): APIPromise<T.Refund> {\n return this.core.request<T.Refund>({ host: \"api\", method: \"POST\", path: `/v1/billing/refunds`, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.RefundService/GetRefund (38-payments-and-tax.md, API Surface, Refunds and\n * disputes).\n *\n * `GET /v1/billing/refunds/{refund_id}` (GetRefund)\n */\n get(refundId: string, options?: RequestOptions): APIPromise<T.Refund> {\n return this.core.request<T.Refund>({ host: \"api\", method: \"GET\", path: `/v1/billing/refunds/${e(refundId)}` }, options);\n }\n\n /**\n * billing.payment.v1.RefundService/ListRefunds (38-payments-and-tax.md, API Surface, Refunds and\n * disputes). Newest first.\n *\n * `GET /v1/billing/refunds` (ListRefunds)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListRefundsParams, options?: RequestOptions): PagePromise<T.Refund, T.RefundList> {\n return this.core.page<T.Refund, T.RefundList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/refunds`, query: params }, options);\n }\n}\n\n/**\n * The `billing.settings` operations.\n */\nexport class BillingSettings {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.customer.v1.BillingSettingsService/GetBillingSettings (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/settings` (GetBillingSettings)\n */\n get(options?: RequestOptions): APIPromise<T.BillingSettings> {\n return this.core.request<T.BillingSettings>({ host: \"api\", method: \"GET\", path: `/v1/billing/settings` }, options);\n }\n\n /**\n * billing.customer.v1.BillingSettingsService/UpdateBillingSettings (32-billing-overview.md, API\n * Surface; 38-payments-and-tax.md, Tax settings). A field left out keeps its value. limits is\n * read-only here: a body that sets it is refused as a field the request does not take (PATCH\n * /v1/billing/settings/limits sets it). tax.mode, tax.missing_location and tax.validate_tax_ids are\n * replaced together. tax.manual_rates replaces the whole list: a rate with an id keeps that rate, one\n * without mints a new one, null or [] clears the list, more than 200 is field_too_long; left out, the\n * rates stay as they are.\n *\n * `PATCH /v1/billing/settings` (UpdateBillingSettings)\n */\n update(body?: T.UpdateBillingSettingsRequest, params?: T.UpdateBillingSettingsParams, options?: RequestOptions): APIPromise<T.BillingSettings> {\n const { if_match } = params ?? ({} as T.UpdateBillingSettingsParams);\n return this.core.request<T.BillingSettings>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/settings`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.BillingSettingsService/UpdateBillingLimits (32-billing-overview.md, API Surface,\n * Billing settings; Billing settings, limits; billing-svc docs/questions.md, P99). Pontive's own\n * route: needs instance:manage (production_instance:manage for a production instance), as the\n * capability does, so a client's billing keys cannot change the instance's limits. Body {\n * event_types?, meters? }, each a whole number from 0 to 10,000; only the fields given change, and\n * null is refused. Refused while billing is off. A limit lowered below the current count refuses\n * nothing that exists. Answers the billing settings.\n *\n * `PATCH /v1/billing/settings/limits` (UpdateBillingLimits)\n */\n updateLimits(body?: T.UpdateBillingLimitsRequest, options?: RequestOptions): APIPromise<T.BillingSettings> {\n return this.core.request<T.BillingSettings>({ host: \"api\", method: \"PATCH\", path: `/v1/billing/settings/limits`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `billing.tax` operations.\n */\nexport class BillingTax {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.payment.v1.TaxService/PreviewTax (38-payments-and-tax.md, API Surface, Tax). Calculated tax,\n * without recording: the calculation finalization uses. Give customer or address, not both; currency\n * is required with an address. The RPC writes nothing and takes no idempotency key, so\n * X-Idempotency-Key is not read. No location under missing_location hold is\n * customer_location_required.\n *\n * `POST /v1/billing/tax/preview` (PreviewTax)\n */\n preview(body?: T.PreviewTaxRequest, options?: RequestOptions): APIPromise<T.TaxPreview> {\n return this.core.request<T.TaxPreview>({ host: \"api\", method: \"POST\", path: `/v1/billing/tax/preview`, body }, options);\n }\n}\n\n/**\n * The `billing.timeMachines` operations.\n */\nexport class BillingTimeMachines {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.timemachine.v1.TimeMachineService/AdvanceTimeMachine (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/time-machines/{time_machine_id}/advance` (AdvanceTimeMachine)\n */\n advance(timeMachineId: string, body?: T.AdvanceTimeMachineRequest, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines/${e(timeMachineId)}/advance`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/CreateTimeMachine (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/time-machines` (CreateTimeMachine)\n */\n create(body?: T.CreateTimeMachineRequest, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/AddTimeMachineCustomer (32-billing-overview.md, API\n * Surface).\n *\n * `POST /v1/billing/time-machines/{time_machine_id}/customers` (CreateTimeMachineCustomer)\n */\n createCustomer(timeMachineId: string, body?: T.AddTimeMachineCustomerRequest, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines/${e(timeMachineId)}/customers`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/EndTimeMachine (32-billing-overview.md, API Surface).\n *\n * `POST /v1/billing/time-machines/{time_machine_id}/end` (EndTimeMachine)\n */\n end(timeMachineId: string, body?: Record<string, unknown>, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"POST\", path: `/v1/billing/time-machines/${e(timeMachineId)}/end`, body, idempotent: true }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/GetTimeMachine (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/time-machines/{time_machine_id}` (GetTimeMachine)\n */\n get(timeMachineId: string, options?: RequestOptions): APIPromise<T.TimeMachine> {\n return this.core.request<T.TimeMachine>({ host: \"api\", method: \"GET\", path: `/v1/billing/time-machines/${e(timeMachineId)}` }, options);\n }\n\n /**\n * billing.timemachine.v1.TimeMachineService/ListTimeMachines (32-billing-overview.md, API Surface).\n *\n * `GET /v1/billing/time-machines` (ListTimeMachines)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListTimeMachinesParams, options?: RequestOptions): PagePromise<T.TimeMachine, T.TimeMachineList> {\n return this.core.page<T.TimeMachine, T.TimeMachineList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/billing/time-machines`, query: params }, options);\n }\n}\n\n/**\n * The `billing.usage` operations.\n */\nexport class BillingUsage {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.metering.v1.UsageService/IngestUsageEvents (33-metering.md, API Surface; Ingestion; Event\n * types and schemas). The body is a JSON array of 1 to 500 events. Only non-accepted results are\n * listed, and accepted events with schema warnings: each result carries warnings (an accepted event\n * under the event type's validation warn) and violations (one rejected with schema_mismatch under\n * reject), each { code, property, expected }.\n *\n * `POST /v1/usage/events` (CreateUsageEvents)\n */\n createEvents(body: T.SentUsageEventInput[], options?: RequestOptions): APIPromise<T.IngestResult> {\n return this.core.request<T.IngestResult>({ host: \"ingest\", method: \"POST\", path: `/v1/usage/events`, body, idempotent: true }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/GetUsageDiagnostics (33-metering.md, API Surface, Usage). Counts\n * per meter: missing_property, non_numeric, missing_group_keys, late_duplicates, and not_entitled, the\n * events the meter counts from Customers with no feature and no product on it at the event's time,\n * accepted and billed as any other (billing-svc docs/questions.md, P109).\n *\n * `GET /v1/billing/usage/diagnostics` (GetUsageDiagnostics)\n */\n getDiagnostics(params: T.GetUsageDiagnosticsParams, options?: RequestOptions): APIPromise<T.UsageDiagnostics> {\n return this.core.request<T.UsageDiagnostics>({ host: \"api\", method: \"GET\", path: `/v1/billing/usage/diagnostics`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/GetLateUsage (33-metering.md, API Surface).\n *\n * `GET /v1/billing/usage/late` (GetLateUsage)\n */\n getLate(params?: T.GetLateUsageParams, options?: RequestOptions): APIPromise<T.LateUsage> {\n return this.core.request<T.LateUsage>({ host: \"api\", method: \"GET\", path: `/v1/billing/usage/late`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/ListUsageEvents (33-metering.md, API Surface).\n *\n * `GET /v1/billing/usage/events` (ListUsageEvents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEvents(params?: T.ListUsageEventsParams, options?: RequestOptions): PagePromise<T.UsageEvent, T.UsageEventCursorList> {\n return this.core.page<T.UsageEvent, T.UsageEventCursorList>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/billing/usage/events`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/GetUsage (33-metering.md, API Surface). The RPC writes nothing and\n * takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/billing/usage/search` (SearchUsage)\n */\n search(body?: T.GetUsageRequest, options?: RequestOptions): APIPromise<T.UsageSeries> {\n return this.core.request<T.UsageSeries>({ host: \"api\", method: \"POST\", path: `/v1/billing/usage/search`, body }, options);\n }\n\n /**\n * billing.metering.v1.UsageService/VoidUsageEvents (33-metering.md, API Surface).\n *\n * `POST /v1/usage/events/void` (VoidUsageEvents)\n */\n voidEvents(body?: T.VoidUsageEventsRequest, options?: RequestOptions): APIPromise<T.VoidUsageEventsResponse> {\n return this.core.request<T.VoidUsageEventsResponse>({ host: \"ingest\", method: \"POST\", path: `/v1/usage/events/void`, body, idempotent: true }, options);\n }\n}\n\n/**\n * The brand: its document, blueprints, localization and widgets.\n */\nexport class Branding {\n readonly blueprints: BrandingBlueprints;\n readonly localization: BrandingLocalization;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.blueprints = new BrandingBlueprints(core);\n this.localization = new BrandingLocalization(core);\n }\n\n /**\n * Export the branding document.\n *\n * The instance's branding as one branding/v1 document (api-route-review D47): the brand's published\n * tokens and theme, the localization settings, the instance's own published widget definitions, the\n * brand's per-widget layouts, styles and copy, the custom blueprints, and the files the brand\n * uploaded, inlined so the document works in another instance. Only the published state is exported;\n * drafts stay in the dashboard. Everything is named by a key, never an id, and the output is\n * deterministic: two exports of the same state are byte-identical, and the ETag is the hash of the\n * bytes. Send it as If-None-Match to get 304 when nothing changed. Import the document into another\n * instance with POST /v1/branding/document/import. Needs sys:brand:read and sys:widget:read.\n *\n * `GET /v1/branding/document` (GetBrandingDocument)\n */\n getDocument(options?: RequestOptions): APIPromise<T.BrandingDocument> {\n return this.core.request<T.BrandingDocument>({ host: \"api\", method: \"GET\", path: `/v1/branding/document` }, options);\n }\n\n /**\n * Get the pontkit release.\n *\n * The exact @pontive/pontkit-core release this instance loads: the deployment's, or the instance's\n * operator-set override. This is the ONLY source clients use to decide which CDN bundle to load —\n * resolving a version client-side would let a preview show a build production does not serve.\n * Short-lived cache: a promotion takes effect without a deploy.\n *\n * `GET /v1/branding/pontkit` (GetPontkit)\n */\n getPontkit(options?: RequestOptions): APIPromise<T.PontkitReleaseResponse> {\n return this.core.request<T.PontkitReleaseResponse>({ host: \"api\", method: \"GET\", path: `/v1/branding/pontkit` }, options);\n }\n\n /**\n * Import a branding document.\n *\n * Plans importing a branding/v1 document into this instance and, with dry_run false, applies the plan\n * (api-route-review D47). The brand is replaced: its tokens, theme, localization settings and every\n * per-widget customization take the document's values, and a customization the instance has and the\n * document lacks is reset and listed as changed. Widget definitions and blueprints are merged by key:\n * a new key is created, a differing one replaced (a published definition's markup never changes, so a\n * different one is a conflict), and one the document lacks is listed as absent and left alone. Nothing\n * is deleted. With publish true (the default) the import publishes one new branding version and the\n * theme; with publish false it writes drafts for review in the dashboard. Re-importing an instance's\n * own export plans every entry unchanged and writes nothing. The dry run's ETag fingerprints the\n * instance's branding: send it as If-Match on the apply to be refused 412 precondition_failed if\n * anything changed since. An apply with conflicts is 409 import_conflict, one detail per conflict,\n * field <kind>.<key>.<field>, and applies nothing. A document the format refuses (not JSON, a member\n * it does not define, a pontive_document it does not read) is 422 field_invalid_format; one over 5 MB\n * is 422 field_too_long. X-Idempotency-Key makes an apply safe to retry; the same key with another\n * request is 422 idempotency_key_reused. Needs sys:brand:manage and sys:widget:manage, and\n * sys:settings:manage when the localization settings change.\n *\n * `POST /v1/branding/document/import` (ImportBrandingDocument)\n */\n importDocument(body: T.ImportBrandingRequest, params?: T.ImportBrandingDocumentParams, options?: RequestOptions): APIPromise<T.BrandingImportPlan> {\n const { if_match } = params ?? ({} as T.ImportBrandingDocumentParams);\n return this.core.request<T.BrandingImportPlan>({ host: \"api\", method: \"POST\", path: `/v1/branding/document/import`, headers: { \"If-Match\": if_match }, body, idempotent: true }, options);\n }\n}\n\n/**\n * The `branding.blueprints` operations.\n */\nexport class BrandingBlueprints {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delete blueprint.\n *\n * Delete a custom blueprint. Built-in blueprints cannot be deleted. Widgets already instantiated from\n * it are unaffected — they belong to their flows. Returns 204 No Content on success.\n *\n * `DELETE /v1/branding/blueprints/{blueprint_id}` (DeleteBlueprint)\n */\n delete(blueprintId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/branding/blueprints/${e(blueprintId)}` }, options);\n }\n}\n\n/**\n * The `branding.localization` operations.\n */\nexport class BrandingLocalization {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get localization settings.\n *\n * Returns the instance's locale configuration. An instance that has never configured localization gets\n * defaults rather than a 404. `enabled_locales` is what the OIDC discovery document advertises as\n * `ui_locales_supported`.\n *\n * `GET /v1/branding/localization` (GetLocalizationSettings)\n */\n get(options?: RequestOptions): APIPromise<T.LocalizationSettings> {\n return this.core.request<T.LocalizationSettings>({ host: \"api\", method: \"GET\", path: `/v1/branding/localization` }, options);\n }\n\n /**\n * Update localization settings.\n *\n * Partial update of the instance's locale configuration. Omitted fields are unchanged. The default\n * locale is implicitly enabled and is never stored in `enabled_locales`.\n *\n * `PATCH /v1/branding/localization` (UpdateLocalizationSettings)\n */\n update(body: T.UpdateLocalizationSettingsRequest, params?: T.UpdateLocalizationSettingsParams, options?: RequestOptions): APIPromise<T.LocalizationSettings> {\n const { if_match } = params ?? ({} as T.UpdateLocalizationSettingsParams);\n return this.core.request<T.LocalizationSettings>({ host: \"api\", method: \"PATCH\", path: `/v1/branding/localization`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * The instance's optional capabilities.\n */\nexport class Capabilities {\n readonly billing: CapabilitiesBilling;\n readonly fga: CapabilitiesFga;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.billing = new CapabilitiesBilling(core);\n this.fga = new CapabilitiesFga(core);\n }\n}\n\n/**\n * The `capabilities.billing` operations.\n */\nexport class CapabilitiesBilling {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.customer.v1.CapabilityService/DisableBillingCapability (32-billing-overview.md, API Surface,\n * Capability, Enabling and disabling the capability). Needs instance:manage. Refused with\n * capability_in_use while contracts, unsettled invoices or prepaid balances remain.\n *\n * `POST /v1/capabilities/billing/disable` (DisableBillingCapability)\n */\n disable(options?: RequestOptions): APIPromise<T.DisableBillingCapabilityResponse> {\n return this.core.request<T.DisableBillingCapabilityResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/billing/disable`, idempotent: true }, options);\n }\n\n /**\n * billing.customer.v1.CapabilityService/EnableBillingCapability (32-billing-overview.md, API Surface,\n * Capability; 02b-instance-management.md, Capability toggle). Needs instance:manage. Answers the\n * instance's capabilities after the change.\n *\n * `POST /v1/capabilities/billing/enable` (EnableBillingCapability)\n */\n enable(options?: RequestOptions): APIPromise<T.EnableBillingCapabilityResponse> {\n return this.core.request<T.EnableBillingCapabilityResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/billing/enable`, idempotent: true }, options);\n }\n}\n\n/**\n * The `capabilities.fga` operations.\n */\nexport class CapabilitiesFga {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Turn off Fine-Grained Authorization.\n *\n * Turn off the instance's Fine-Grained Authorization capability. Refused with capability_in_use (409)\n * while the instance has custom resource types.\n *\n * `POST /v1/capabilities/fga/disable` (DisableFGA)\n */\n disable(options?: RequestOptions): APIPromise<T.CapabilitiesResponse> {\n return this.core.request<T.CapabilitiesResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/fga/disable` }, options);\n }\n\n /**\n * Turn on Fine-Grained Authorization.\n *\n * Turn on the instance's Fine-Grained Authorization capability: custom resource types and everything\n * built on them. Needs a Pontive user who may manage the instance.\n *\n * `POST /v1/capabilities/fga/enable` (EnableFGA)\n */\n enable(options?: RequestOptions): APIPromise<T.CapabilitiesResponse> {\n return this.core.request<T.CapabilitiesResponse>({ host: \"api\", method: \"POST\", path: `/v1/capabilities/fga/enable` }, options);\n }\n}\n\n/**\n * Reference data.\n */\nexport class Countries {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * List countries.\n *\n * Every country Pontive accepts, for pickers: the ISO 3166-1 assigned codes and XK, each with its\n * English name and its E.164 calling code (digits only, \"49\"; empty for the seven uninhabited\n * territories that have none), sorted by name. Platform reference data from pontive-core's country\n * package, the same list every service validates against (billing-svc docs/questions.md, P101).\n * Static: cache it.\n *\n * `GET /v1/countries` (ListCountries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListCountriesParams, options?: RequestOptions): PagePromise<T.Country, T.CountryList> {\n return this.core.page<T.Country, T.CountryList>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/countries`, query: params }, options);\n }\n}\n\n/**\n * What agents may do for users.\n */\nexport class Delegations {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Delegate to an agent.\n *\n * Authorize an agent to act for a user (pontive-spec 20 C4): in one organization, where both the user\n * is a member and the agent is installed, or with no organization_id at the instance root, which needs\n * a root installation. Creating a grant the (user, agent, organization) already has replaces its\n * scopes and expiry. The agent then exchanges the user's token, or this grant, for a token acting for\n * the user — allowed only what the user and the agent both are. Needs sys:delegation:manage on the\n * instance root. A token acting for its subject is refused (actor_refused): a delegation is an\n * authority grant, the user's own to give.\n *\n * `POST /v1/delegations` (CreateDelegation)\n */\n create(body: T.CreateDelegationRequest, options?: RequestOptions): APIPromise<T.Delegation> {\n return this.core.request<T.Delegation>({ host: \"api\", method: \"POST\", path: `/v1/delegations`, body }, options);\n }\n\n /**\n * Revoke a delegation.\n *\n * Delete a delegation grant: the agent's next exchange on it is refused, and a token it already\n * exchanged stops being answered on Pontive's checks and listings at once. Needs sys:delegation:manage\n * on the instance root.\n *\n * `DELETE /v1/delegations/{delegation_id}` (DeleteDelegation)\n */\n delete(delegationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * Get a delegation.\n *\n * One delegation grant. Needs sys:delegation:read on the instance root.\n *\n * `GET /v1/delegations/{delegation_id}` (GetDelegation)\n */\n get(delegationId: string, options?: RequestOptions): APIPromise<T.Delegation> {\n return this.core.request<T.Delegation>({ host: \"api\", method: \"GET\", path: `/v1/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * List delegations.\n *\n * Delegation grants, filtered by user, agent and organization (D23), each with its organization,\n * scopes and expiry. Needs sys:delegation:read on the instance root.\n *\n * `GET /v1/delegations` (ListDelegations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListDelegationsParams, options?: RequestOptions): PagePromise<T.Delegation, T.ListDelegationsResponse> {\n return this.core.page<T.Delegation, T.ListDelegationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/delegations`, query: params }, options);\n }\n}\n\n/**\n * Groups and the roles they grant.\n */\nexport class Groups {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create a group.\n *\n * Create a group, owned by the instance root, an organization or a resource (D5, D6, D44): owner_type\n * is root (the default), org or the owning resource's type key, owner_id its prefixed id (org_, res_;\n * for root the inst_ id or empty). An instance group (root) holds any of the instance's users and is\n * granted roles only on the instance root and resources in no organization; an organization's is a set\n * of its members granted on the organization or its resources; a resource's holds its organization's\n * members and is granted only on the resource and the resources beneath it.\n *\n * `POST /v1/groups` (CreateGroup)\n */\n create(body: T.CreateOwnedGroupRequest, options?: RequestOptions): APIPromise<T.Group> {\n return this.core.request<T.Group>({ host: \"api\", method: \"POST\", path: `/v1/groups`, body }, options);\n }\n\n /**\n * Add members to a group.\n *\n * Add users to a group. Each must be a member of the group's organization (user_not_in_organization);\n * one already in the group is left as they are.\n *\n * `POST /v1/groups/{group_id}/members` (CreateGroupMembers)\n */\n createMembers(groupId: string, body: T.AddGroupMembersRequest, options?: RequestOptions): APIPromise<T.AddGroupMembersResponse> {\n return this.core.request<T.AddGroupMembersResponse>({ host: \"api\", method: \"POST\", path: `/v1/groups/${e(groupId)}/members`, body }, options);\n }\n\n /**\n * Delete a group.\n *\n * Delete a group with its members and grants. Its members lose what the group gave them.\n *\n * `DELETE /v1/groups/{group_id}` (DeleteGroup)\n */\n delete(groupId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/groups/${e(groupId)}` }, options);\n }\n\n /**\n * Remove a member from a group.\n *\n * `DELETE /v1/groups/{group_id}/members/{user_id}` (DeleteGroupMember)\n */\n deleteMember(groupId: string, userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/groups/${e(groupId)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Get a group.\n *\n * `GET /v1/groups/{group_id}` (GetGroup)\n */\n get(groupId: string, options?: RequestOptions): APIPromise<T.Group> {\n return this.core.request<T.Group>({ host: \"api\", method: \"GET\", path: `/v1/groups/${e(groupId)}` }, options);\n }\n\n /**\n * List groups.\n *\n * List the instance's groups, filtered by owner (D6, D15, D44): owner_type root lists the instance's\n * own groups, org the organizations', a resource type key that type's resources'; owner_id narrows to\n * one owner's. Neither lists every group.\n *\n * `GET /v1/groups` (ListGroups)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListGroupsParams, options?: RequestOptions): PagePromise<T.Group, T.ListGroupsResponse> {\n return this.core.page<T.Group, T.ListGroupsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/groups`, query: params }, options);\n }\n\n /**\n * List a group's roles.\n *\n * List the roles a group holds, per resource.\n *\n * `GET /v1/groups/{group_id}/roles` (ListGroupGrants)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGrants(groupId: string, params?: T.ListGroupGrantsParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/groups/${e(groupId)}/roles`, query: params }, options);\n }\n\n /**\n * List a group's members.\n *\n * `GET /v1/groups/{group_id}/members` (ListGroupMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(groupId: string, params?: T.ListGroupMembersParams, options?: RequestOptions): PagePromise<T.GroupMember, T.ListGroupMembersResponse> {\n return this.core.page<T.GroupMember, T.ListGroupMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/groups/${e(groupId)}/members`, query: params }, options);\n }\n\n /**\n * Set a group's roles on a resource.\n *\n * Replace the roles a group holds on one resource — its organization, or a resource of it\n * (resource_not_in_organization) — with roles of that resource's type. No roles removes the grant.\n *\n * `PUT /v1/groups/{group_id}/roles` (ReplaceGroupRoles)\n */\n replaceRoles(groupId: string, body: T.SetGroupRolesRequest, options?: RequestOptions): APIPromise<T.GroupGrant> {\n return this.core.request<T.GroupGrant>({ host: \"api\", method: \"PUT\", path: `/v1/groups/${e(groupId)}/roles`, body }, options);\n }\n\n /**\n * Update a group.\n *\n * `PATCH /v1/groups/{group_id}` (UpdateGroup)\n */\n update(groupId: string, body: T.UpdateGroupRequest, options?: RequestOptions): APIPromise<T.Group> {\n return this.core.request<T.Group>({ host: \"api\", method: \"PATCH\", path: `/v1/groups/${e(groupId)}`, body }, options);\n }\n}\n\n/**\n * Audit and request logs.\n */\nexport class Logs {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Get an audit log entry.\n *\n * One audit_log_entry (pontive-spec 43 §4.1).\n *\n * `GET /v1/logs/audit/{audit_log_entry_id}` (GetAuditLog)\n */\n getAuditLog(auditLogEntryId: string, options?: RequestOptions): APIPromise<T.AuditLogEntryDoc> {\n return this.core.request<T.AuditLogEntryDoc>({ host: \"api\", method: \"GET\", path: `/v1/logs/audit/${e(auditLogEntryId)}` }, options);\n }\n\n /**\n * Get a request log entry.\n *\n * One request_log_entry (pontive-spec 43 §4.6), by the request id returned in X-Request-ID.\n *\n * `GET /v1/logs/requests/{request_id}` (GetRequestLog)\n */\n getRequestLog(requestId: string, options?: RequestOptions): APIPromise<T.RequestLogEntryDoc> {\n return this.core.request<T.RequestLogEntryDoc>({ host: \"api\", method: \"GET\", path: `/v1/logs/requests/${e(requestId)}` }, options);\n }\n\n /**\n * List audit log entries.\n *\n * The instance's audit log, newest first. Pass next_cursor as before to page back, or as after to poll\n * for what committed since, oldest first. Needs sys:audit:read on the instance, or on the organization\n * named by organization_id.\n *\n * `GET /v1/logs/audit` (ListAuditLogs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAuditLogs(params?: T.ListAuditLogsParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/logs/audit`, query: params }, options);\n }\n\n /**\n * List request log entries.\n *\n * Every management-API call made against the instance, reads included, newest first. Needs\n * sys:audit:read on the instance.\n *\n * `GET /v1/logs/requests` (ListRequestLogs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listRequestLogs(params?: T.ListRequestLogsParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/logs/requests`, query: params }, options);\n }\n}\n\n/**\n * The signed-in user's own surface. Needs a user's me token, not a secret key.\n */\nexport class Me {\n readonly billing: MeBilling;\n\n /** @internal */\n constructor(protected readonly core: Core) {\n this.billing = new MeBilling(core);\n }\n\n /**\n * Delete current user.\n *\n * Delete the currently authenticated user An instance user's token must be issued for the instance's\n * me audience, https://{auth domain}/me/, with pontive:me:manage; the app's own access token is\n * refused 403 (D48).\n *\n * `DELETE /v1/me` (DeleteCurrentUser)\n */\n delete(options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"auth\", method: \"DELETE\", path: `/v1/me` }, options);\n }\n\n /**\n * Revoke my delegation.\n *\n * The signed-in user revokes one of their own delegation grants (D31): the agent's next exchange on it\n * is refused, and a token it already exchanged stops being answered on Pontive's checks and listings\n * at once. Another user's grant is 404, the same as none. A token acting for the user (an agent's) is\n * refused (actor_refused): a delegation is the user's own to take back. An instance user's token must\n * be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the\n * app's own access token is refused 403 (D48).\n *\n * `DELETE /v1/me/delegations/{delegation_id}` (DeleteMyDelegation)\n */\n deleteDelegation(delegationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"auth\", method: \"DELETE\", path: `/v1/me/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * Get current user.\n *\n * Get the currently authenticated user's profile An instance user's token must be issued for the\n * instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's own access token\n * is refused 403 (D48).\n *\n * `GET /v1/me` (GetCurrentUser)\n */\n get(options?: RequestOptions): APIPromise<T.CurrentUser> {\n return this.core.request<T.CurrentUser>({ host: \"auth\", method: \"GET\", path: `/v1/me` }, options);\n }\n\n /**\n * Leave a membership.\n *\n * Remove the current (authenticated) user's own membership of a container (api-route-review D38): the\n * prefixed id names it — an organization (org_), or a resource (res_) whose type lets members leave.\n * Refused 403 leave_disabled when the organization's settings or the resource's type do not let\n * members leave. An instance user's token must be issued for the instance's me audience, https://{auth\n * domain}/me/, with pontive:me:manage; the app's own access token is refused 403 (D48).\n *\n * `POST /v1/me/memberships/{container_id}/leave` (LeaveMembership)\n */\n leaveMembership(containerId: string, options?: RequestOptions): APIPromise<Record<string, unknown>> {\n return this.core.request<Record<string, unknown>>({ host: \"auth\", method: \"POST\", path: `/v1/me/memberships/${e(containerId)}/leave` }, options);\n }\n\n /**\n * List my delegations.\n *\n * The signed-in user's own delegation grants (D31): which agents they let act for them, in which\n * organization, with which scopes and until when. Filter by agent_id or organization_id. Needs no\n * permission: identity-svc answers a user for their own grants. An instance user's token must be\n * issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's\n * own access token is refused 403 (D48).\n *\n * `GET /v1/me/delegations` (ListMyDelegations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listDelegations(params?: T.ListMyDelegationsParams, options?: RequestOptions): PagePromise<T.Delegation, T.ListDelegationsResponse> {\n return this.core.page<T.Delegation, T.ListDelegationsResponse>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/delegations`, query: params }, options);\n }\n\n /**\n * List my memberships.\n *\n * The signed-in user's own memberships across every container kind — the instance root,\n * organizations and resources (D4, D31) — each left with POST /me/memberships/{container_id}/leave.\n * resource_type narrows them to one kind of container (root, org or a custom type key, D44). Each\n * carries its container's name and, when the caller may read the container, its external_id. An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:me:read; the app's own access token is refused 403 (D48).\n *\n * `GET /v1/me/memberships` (ListMyMemberships)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMemberships(params?: T.ListMyMembershipsParams, options?: RequestOptions): PagePromise<T.UserMembership, T.ListUserMembershipsResponse> {\n return this.core.page<T.UserMembership, T.ListUserMembershipsResponse>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/memberships`, query: params }, options);\n }\n\n /**\n * Update current user.\n *\n * Update the currently authenticated user's profile (partial update) An instance user's token must be\n * issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the app's\n * own access token is refused 403 (D48).\n *\n * `PATCH /v1/me` (UpdateCurrentUser)\n */\n update(body: T.UpdateCurrentUserRequest, options?: RequestOptions): APIPromise<T.CurrentUser> {\n return this.core.request<T.CurrentUser>({ host: \"auth\", method: \"PATCH\", path: `/v1/me`, body }, options);\n }\n}\n\n/**\n * The `me.billing` operations.\n */\nexport class MeBilling {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * billing.contract.v1.MeContractService/CancelMyContract (35-contracts.md, End-customer portal and API\n * Surface). The body is { reason? }. An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/contracts/{contract_id}/cancel` (CancelMyContract)\n */\n cancelContract(contractId: string, body?: T.CancelMyContractRequest, params?: T.CancelMyContractParams, options?: RequestOptions): APIPromise<T.MyContract> {\n return this.core.request<T.MyContract>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/cancel`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/ChangeMyContract (35-contracts.md, End-customer portal and API\n * Surface). The body is the preview's, with its preview_hash; preview_stale when the preview changed.\n * An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/,\n * with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/contracts/{contract_id}/change-package` (ChangeMyContractPackage)\n */\n changeContractPackage(contractId: string, body?: T.ChangeMyContractRequest, params?: T.ChangeMyContractPackageParams, options?: RequestOptions): APIPromise<T.MyContract> {\n return this.core.request<T.MyContract>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/change-package`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.entitlement.v1.MeEntitlementService/CheckMyEntitlement (39-entitlements-and-controls.md, API\n * Surface). The body is { feature, quantity? }. Under pontive:billing:read\n * (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for\n * the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/me/entitlements/check` (CheckMyEntitlement)\n */\n checkEntitlement(body?: T.CheckMyEntitlementRequest, params?: T.CheckMyEntitlementParams, options?: RequestOptions): APIPromise<T.CheckMyEntitlementResponse> {\n return this.core.request<T.CheckMyEntitlementResponse>({ host: \"authz\", method: \"POST\", path: `/v1/me/entitlements/check`, query: params, body }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/ConfirmMyCheckoutSession (35-contracts.md, End-customer portal\n * and API Surface). The body is { package, billing_frequency, billing_address?, tax_id?,\n * promotion_code? }, package a pkg_ id or the package's key (api-route-review D55). The answer carries\n * a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/checkout-sessions/{checkout_session_id}/confirm` (ConfirmMyCheckoutSession)\n */\n confirmCheckoutSession(checkoutSessionId: string, body?: T.ConfirmMyCheckoutSessionRequest, params?: T.ConfirmMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.ConfirmMyCheckoutSessionResponse> {\n return this.core.request<T.ConfirmMyCheckoutSessionResponse>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/checkout-sessions/${e(checkoutSessionId)}/confirm`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/CreateMyCheckoutSession (35-contracts.md, End-customer portal\n * and API Surface). The body is { subject?, packages, success_url, cancel_url }. billing-svc checks\n * both URLs against the browser's Origin, which the gateway passes in the request context, and refuses\n * a request without one (35-contracts.md, Checkout; billing-svc docs/questions.md, P71). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/checkout-sessions` (CreateMyCheckoutSession)\n */\n createCheckoutSession(body?: T.CreateMyCheckoutSessionRequest, params?: T.CreateMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.MyCheckoutSession> {\n return this.core.request<T.MyCheckoutSession>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/checkout-sessions`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/CreateMyPaymentMethodSession (38-payments-and-tax.md, API\n * Surface). The body is { mode?, return_url? }. The answer carries a client secret: no log or span\n * holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be\n * issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31,\n * D48).\n *\n * `POST /v1/me/billing/payment-method-session` (CreateMyPaymentMethodSession)\n */\n createPaymentMethodSession(body?: T.CreateMyPaymentMethodSessionRequest, params?: T.CreateMyPaymentMethodSessionParams, options?: RequestOptions): APIPromise<T.PaymentMethodSession> {\n return this.core.request<T.PaymentMethodSession>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/payment-method-session`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/DeleteMyContractEdit (35-contracts.md, Package changes and\n * End-customer portal; billing-svc P124). Cancels the contract's pending change, a scheduled\n * downgrade, by deleting its edit: edit_id is the contract's pending_change.edit_id, and any other\n * edit is not_found. Only a change the end customer asked for, pending_change.initiated_by customer,\n * may be cancelled here; one the client made is change_not_allowed. billing.contract.edit_canceled is\n * written as for DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}. An instance user's token\n * must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay\n * (D31, D48).\n *\n * `DELETE /v1/me/billing/contracts/{contract_id}/edits/{edit_id}` (DeleteMyContractEdit)\n */\n deleteContractEdit(contractId: string, editId: string, params?: T.DeleteMyContractEditParams, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"auth\", method: \"DELETE\", path: `/v1/me/billing/contracts/${e(contractId)}/edits/${e(editId)}`, query: params, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/RemoveMyPaymentMethod (38-payments-and-tax.md, API Surface).\n * {id} is the spec's {pm}. An instance user's token must be issued for the instance's me audience,\n * https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `DELETE /v1/me/billing/payment-methods/{payment_method_id}` (DeleteMyPaymentMethod)\n */\n deletePaymentMethod(paymentMethodId: string, params?: T.DeleteMyPaymentMethodParams, options?: RequestOptions): APIPromise<T.RemoveMyPaymentMethodResponse> {\n return this.core.request<T.RemoveMyPaymentMethodResponse>({ host: \"auth\", method: \"DELETE\", path: `/v1/me/billing/payment-methods/${e(paymentMethodId)}`, query: params, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/GetMyCheckoutSession (35-contracts.md, End-customer portal and\n * API Surface). Under pontive:billing:pay, the scope the checkout element holds\n * (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for\n * the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `GET /v1/me/billing/checkout-sessions/{checkout_session_id}` (GetMyCheckoutSession)\n */\n getCheckoutSession(checkoutSessionId: string, params?: T.GetMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.MyCheckoutSession> {\n return this.core.request<T.MyCheckoutSession>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/checkout-sessions/${e(checkoutSessionId)}`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyCreditNotePdf (37-invoicing.md, API Surface). The credit\n * note's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition\n * attachment with the file name billing-svc gives. A voided credit note's is the VOID rendition.\n * Another Customer's credit note is credit_note_not_found. Needs a token for the instance's me\n * audience with pontive:billing:read.\n *\n * `GET /v1/me/billing/credit-notes/{credit_note_id}/pdf` (GetMyCreditNotePdf)\n */\n getCreditNotePdf(creditNoteId: string, params?: T.GetMyCreditNotePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/credit-notes/${e(creditNoteId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.entitlement.v1.MeEntitlementService/ListMyEntitlements (39-entitlements-and-controls.md, API\n * Surface). An instance user's token must be issued for the instance's me audience, https://{auth\n * domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/entitlements` (GetMyEntitlements)\n */\n getEntitlements(params?: T.GetMyEntitlementsParams, options?: RequestOptions): APIPromise<T.EntitlementSet> {\n return this.core.request<T.EntitlementSet>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/entitlements`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyInvoice (37-invoicing.md, API Surface). An instance user's\n * token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices/{invoice_id}` (GetMyInvoice)\n */\n getInvoice(invoiceId: string, params?: T.GetMyInvoiceParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices/${e(invoiceId)}`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyInvoicePdf (37-invoicing.md, API Surface). The invoice's\n * PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment\n * with the file name billing-svc gives. An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices/{invoice_id}/pdf` (GetMyInvoicePdf)\n */\n getInvoicePdf(invoiceId: string, params?: T.GetMyInvoicePdfParams, options?: RequestOptions): APIPromise<Uint8Array> {\n return this.core.request<Uint8Array>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices/${e(invoiceId)}/pdf`, query: params, binary: true }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/GetMyUpcomingInvoice (37-invoicing.md, API Surface). The\n * upcoming invoice of the contract in force; invoice_not_found when there is none. An instance user's\n * token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices/upcoming` (GetMyUpcomingInvoice)\n */\n getUpcomingInvoice(params?: T.GetMyUpcomingInvoiceParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices/upcoming`, query: params }, options);\n }\n\n /**\n * billing.metering.v1.MeUsageService/GetMyUsage (33-metering.md, API Surface). The same parameters as\n * GET /v1/usage, for the caller's Customer. An instance user's token must be issued for the instance's\n * me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/usage` (GetMyUsage)\n */\n getUsage(params?: T.GetMyUsageParams, options?: RequestOptions): APIPromise<T.UsageSeries> {\n return this.core.request<T.UsageSeries>({ host: \"auth\", method: \"GET\", path: `/v1/me/billing/usage`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.MeLedgerService/ListMyBalances (36-credits-ledger.md, API Surface). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/balances` (ListMyBalances)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listBalances(params?: T.ListMyBalancesParams, options?: RequestOptions): PagePromise<T.Balance, T.BalanceList> {\n return this.core.page<T.Balance, T.BalanceList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/balances`, query: params }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/ListMyContracts (35-contracts.md, End-customer portal and API\n * Surface). An instance user's token must be issued for the instance's me audience, https://{auth\n * domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/contracts` (ListMyContracts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listContracts(params?: T.ListMyContractsParams, options?: RequestOptions): PagePromise<T.MyContract, T.MyContractList> {\n return this.core.page<T.MyContract, T.MyContractList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/contracts`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/ListMyCreditNotes (37-invoicing.md, API Surface). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/credit-notes` (ListMyCreditNotes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listCreditNotes(params?: T.ListMyCreditNotesParams, options?: RequestOptions): PagePromise<T.CreditNote, T.CreditNoteList> {\n return this.core.page<T.CreditNote, T.CreditNoteList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/credit-notes`, query: params }, options);\n }\n\n /**\n * billing.customer.v1.MeCustomerService/ListMyCustomers (32-billing-overview.md, End-customer\n * surface). The caller's own user Customer, the token's organization's where they hold a billing key,\n * and the suspended or closed organizations they own and may recover (P79, P122), each with what the\n * caller may do there: recovery marks those, and closed marks one its client closed, where only paying\n * and the payment method are open. An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/customers` (ListMyCustomers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listCustomers(params?: T.ListMyCustomersParams, options?: RequestOptions): PagePromise<T.MyCustomer, T.MyCustomerList> {\n return this.core.page<T.MyCustomer, T.MyCustomerList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/customers`, query: params }, options);\n }\n\n /**\n * billing.invoice.v1.MeInvoiceService/ListMyInvoices (37-invoicing.md, API Surface). An instance\n * user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/invoices` (ListMyInvoices)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInvoices(params?: T.ListMyInvoicesParams, options?: RequestOptions): PagePromise<T.Invoice, T.InvoiceList> {\n return this.core.page<T.Invoice, T.InvoiceList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/invoices`, query: params }, options);\n }\n\n /**\n * billing.ledger.v1.MeLedgerService/ListMyLedgerEntries (36-credits-ledger.md, API Surface). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/ledger-entries` (ListMyLedgerEntries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listLedgerEntries(params?: T.ListMyLedgerEntriesParams, options?: RequestOptions): PagePromise<T.LedgerEntry, T.LedgerEntryCursorList> {\n return this.core.page<T.LedgerEntry, T.LedgerEntryCursorList>(\"cursor\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/ledger-entries`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/ListMyPaymentMethods (38-payments-and-tax.md, API Surface). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/payment-methods` (ListMyPaymentMethods)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listPaymentMethods(params?: T.ListMyPaymentMethodsParams, options?: RequestOptions): PagePromise<T.PaymentMethod, T.PaymentMethodList> {\n return this.core.page<T.PaymentMethod, T.PaymentMethodList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/payment-methods`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/ListMyPayments (38-payments-and-tax.md, API Surface). An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:read (D31, D48).\n *\n * `GET /v1/me/billing/payments` (ListMyPayments)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listPayments(params?: T.ListMyPaymentsParams, options?: RequestOptions): PagePromise<T.Payment, T.PaymentList> {\n return this.core.page<T.Payment, T.PaymentList>(\"page\", { host: \"auth\", method: \"GET\", path: `/v1/me/billing/payments`, query: params }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/PayMyInvoice (38-payments-and-tax.md, API Surface). The body is\n * { method }, saved or new. The answer carries a client secret: no log or span holds the response body\n * (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me\n * audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/invoices/{invoice_id}/pay` (PayMyInvoice)\n */\n payInvoice(invoiceId: string, body?: T.PayMyInvoiceRequest, params?: T.PayMyInvoiceParams, options?: RequestOptions): APIPromise<T.PayMyInvoiceResponse> {\n return this.core.request<T.PayMyInvoiceResponse>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/invoices/${e(invoiceId)}/pay`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/PreviewMyCheckoutSession (35-contracts.md, End-customer portal\n * and API Surface). The body is confirm's (P65). An instance user's token must be issued for the\n * instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). The RPC\n * writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.\n *\n * `POST /v1/me/billing/checkout-sessions/{checkout_session_id}/preview` (PreviewMyCheckoutSession)\n */\n previewCheckoutSession(checkoutSessionId: string, body?: T.PreviewMyCheckoutSessionRequest, params?: T.PreviewMyCheckoutSessionParams, options?: RequestOptions): APIPromise<T.Invoice> {\n return this.core.request<T.Invoice>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/checkout-sessions/${e(checkoutSessionId)}/preview`, query: params, body }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/PreviewMyContractChange (35-contracts.md, End-customer portal\n * and API Surface). The body is { package, billing_frequency? } or { quantity, subscription_id? }. An\n * instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with\n * pontive:billing:pay (D31, D48). The RPC writes nothing and takes no idempotency key, so\n * X-Idempotency-Key is not read.\n *\n * `POST /v1/me/billing/contracts/{contract_id}/change-package/preview` (PreviewMyContractChange)\n */\n previewContractChange(contractId: string, body?: T.PreviewMyContractChangeRequest, params?: T.PreviewMyContractChangeParams, options?: RequestOptions): APIPromise<T.PreviewMyContractChangeResponse> {\n return this.core.request<T.PreviewMyContractChangeResponse>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/change-package/preview`, query: params, body }, options);\n }\n\n /**\n * billing.contract.v1.MeContractService/RevokeMyContractCancellation (35-contracts.md, End-customer\n * portal and API Surface). An instance user's token must be issued for the instance's me audience,\n * https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `POST /v1/me/billing/contracts/{contract_id}/revoke-cancellation` (RevokeMyContractCancellation)\n */\n revokeContractCancellation(contractId: string, body?: Record<string, unknown>, params?: T.RevokeMyContractCancellationParams, options?: RequestOptions): APIPromise<T.MyContract> {\n return this.core.request<T.MyContract>({ host: \"auth\", method: \"POST\", path: `/v1/me/billing/contracts/${e(contractId)}/revoke-cancellation`, query: params, body, idempotent: true }, options);\n }\n\n /**\n * billing.payment.v1.MePaymentService/SetMyDefaultPaymentMethod (38-payments-and-tax.md, API Surface;\n * api-route-review D38). The caller's Customer, or the subject's it names: default_payment_method_id,\n * one of its payment methods, becomes its default. An instance user's token must be issued for the\n * instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).\n *\n * `PATCH /v1/me/billing/customer` (UpdateMyCustomer)\n */\n updateCustomer(body?: T.SetMyDefaultPaymentMethodRequest, params?: T.UpdateMyCustomerParams, options?: RequestOptions): APIPromise<T.PaymentMethod> {\n return this.core.request<T.PaymentMethod>({ host: \"auth\", method: \"PATCH\", path: `/v1/me/billing/customer`, query: params, body, idempotent: true }, options);\n }\n}\n\n/**\n * Organizations, their members, invitations and settings.\n */\nexport class Organizations {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Allow a third-party app in the organization again.\n *\n * Let a CIMD or DCR app act in the organization again (pontive-spec 20 G2): every block-list entry\n * naming it exactly goes, and under allowlist mode its client_id joins the allow-list. 409\n * organization_client_blocked_by_pattern while an https://host/* entry on the block-list still names\n * it: remove that entry with PUT /client-policy. Needs sys:agent:install on the organization.\n *\n * `POST /v1/organizations/{organization}/third-party-clients/{app_id}/allow`\n * (AllowOrganizationThirdPartyClient)\n */\n allowThirdPartyClient(organization: string, appId: string, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/third-party-clients/${e(appId)}/allow` }, options);\n }\n\n /**\n * Approve an agent's requested roles on the organization.\n *\n * Approve the agent's requested roles up to version, after the installation's approved_version and at\n * most the agent's; roles are the approved roles from now on — typically what it holds plus\n * pending_roles (sys:agent:install on the organization, or on the root).\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/approve`\n * (ApproveOrganizationAgentInstallation)\n */\n approveAgentInstallation(organization: string, installationId: string, body: T.ApproveInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/approve`, body }, options);\n }\n\n /**\n * Block a third-party app for the organization.\n *\n * Block a CIMD or DCR app for the organization (pontive-spec 20 G2): its client_id — a CIMD app's\n * URL, which outlives the app's cleanup, or a DCR app's id — joins the block-list and leaves the\n * allow-list. Its users are refused in the organization from their next authorization, code exchange\n * or refresh. 404 for an app that is not a third-party app. Needs sys:agent:install on the\n * organization.\n *\n * `POST /v1/organizations/{organization}/third-party-clients/{app_id}/block`\n * (BlockOrganizationThirdPartyClient)\n */\n blockThirdPartyClient(organization: string, appId: string, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/third-party-clients/${e(appId)}/block` }, options);\n }\n\n /**\n * Create organization.\n *\n * Create a new organization. Organizations are the customer-facing tenant, and flat: structure below\n * one is modelled as resources that belong to it. The slug (supplied, or generated from the name) is\n * immutable once created; one another organization in the instance holds is refused with 409\n * slug_conflict, never suffixed.\n *\n * `POST /v1/organizations` (CreateOrganization)\n */\n create(body: T.CreateOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations`, body }, options);\n }\n\n /**\n * Install an agent on the organization.\n *\n * Install an agent in the organization — on the organization itself, or on the resource resource_id\n * names, which must be the organization's (D21) — with roles approved: any of those it requests for\n * the target's type, or none (sys:agent:install on the organization, or on the root). The roles are\n * also held to what the caller could grant there. With delegated_only true, the roles act only as the\n * agent's side of a delegation: a token the agent exchanged to act for a user is allowed what both\n * hold, while the agent's own token holds none of them.\n *\n * `POST /v1/organizations/{organization}/agent-installations` (CreateOrganizationAgentInstallation)\n */\n createAgentInstallation(organization: string, body: T.InstallRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations`, body }, options);\n }\n\n /**\n * Invite members.\n *\n * Invite multiple members to an organization, or to one of its resources (resource_id with\n * resource_roles). Invitees to a resource who are not organization members join the organization too.\n * Addresses are matched case-insensitively. An address that is already a member of the target is\n * skipped and listed in skipped rather than failing the request. An address that already holds a\n * pending, unexpired invitation to the target has that invitation reissued with this request's roles,\n * a fresh expiry and a new link, instead of a second one sent. Inviting someone as the organization's\n * owner needs sys:org:transfer, refused 403 owner_transfer_required. 200 when every address was\n * skipped, 201 when any invitation was sent.\n *\n * `POST /v1/organizations/{organization}/invitations` (CreateOrganizationInvitations)\n */\n createInvitations(organization: string, body: T.InviteMembersRequest, options?: RequestOptions): APIPromise<T.InvitationResult> {\n return this.core.request<T.InvitationResult>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/invitations`, body }, options);\n }\n\n /**\n * Add member to organization.\n *\n * Add a user as a member of an organization. Adding them as owner needs sys:org:transfer, refused 403\n * owner_transfer_required. Adding one past the organization's member limit is refused 409\n * seat_limit_reached, and nothing is written.\n *\n * `POST /v1/organizations/{organization}/members` (CreateOrganizationMember)\n */\n createMember(organization: string, body: T.AddOrganizationMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/members`, body }, options);\n }\n\n /**\n * Decline an agent's requested roles on the organization.\n *\n * Mark version seen without adding its roles; the installation keeps working with the roles it has.\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/decline`\n * (DeclineOrganizationAgentInstallation)\n */\n declineAgentInstallation(organization: string, installationId: string, body: T.DeclineInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/decline`, body }, options);\n }\n\n /**\n * Delete organization.\n *\n * Permanently delete an organization together with its memberships, invitations, owned service\n * accounts, instance-scoped roles and organization-scoped credentials (revoked), and the resources\n * that belong to it. There is no restore.\n *\n * `DELETE /v1/organizations/{organization}` (DeleteOrganization)\n */\n delete(organization: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}` }, options);\n }\n\n /**\n * Uninstall an agent from the organization.\n *\n * Delete the installation. The agent's next token request for the organization is refused; a token\n * already issued lives out its lifetime.\n *\n * `DELETE /v1/organizations/{organization}/agent-installations/{installation_id}`\n * (DeleteOrganizationAgentInstallation)\n */\n deleteAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Revoke a delegation in the organization.\n *\n * An organization administrator revokes a delegation grant in their organization (pontive-spec 20 G2,\n * C4): the agent's next exchange on it is refused, and a token it already exchanged stops being\n * answered on Pontive's checks and listings at once. 404 for a grant in another organization or in\n * none. Needs sys:agent:install on the organization.\n *\n * `DELETE /v1/organizations/{organization}/delegations/{delegation_id}` (DeleteOrganizationDelegation)\n */\n deleteDelegation(organization: string, delegationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/delegations/${e(delegationId)}` }, options);\n }\n\n /**\n * Delete invitation.\n *\n * Withdraw an invitation: it is deleted, and its link stops working. An invitation exists only while\n * it is open — accepting one deletes it too, and an expired one is purged.\n *\n * `DELETE /v1/organizations/{organization}/invitations/{invitation_id}` (DeleteOrganizationInvitation)\n */\n deleteInvitation(organization: string, invitationId: string, params?: T.DeleteOrganizationInvitationParams, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/invitations/${e(invitationId)}`, query: params }, options);\n }\n\n /**\n * Remove member from organization.\n *\n * Remove a user from an organization, which removes every role they hold there. Removing oneself is\n * leaving: when the organization settings do not let members leave (allow_members_to_leave off), it is\n * refused 403 leave_disabled, as leaving it with POST /me/memberships/{container_id}/leave is, before\n * any rule below; removing someone else is not affected. Removing a member who holds owner needs\n * sys:org:transfer, removing oneself included, refused 403 owner_transfer_required. A caller from the\n * instance itself (not the Pontive console) may remove only a member whose roles' permissions they\n * hold on the organization, or hold sys:root:grant, refused 403 role_ceiling. Roles that changed while\n * the removal was being decided are refused 409 member_roles_changed: read the member again and retry.\n *\n * `DELETE /v1/organizations/{organization}/members/{user_id}` (DeleteOrganizationMember)\n */\n deleteMember(organization: string, userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Remove a member limit.\n *\n * Remove one source's member limit from an organization. The lowest limit left, if any, is then in\n * force. Removing a limit that is not set changes nothing and succeeds. While the instance's billing\n * capability is on, the billing limit is managed by billing: removing it here is refused with 403, an\n * instance admin included. With the capability off, an instance admin may remove it. If the capability\n * cannot be read, a billing write is refused with 503.\n *\n * `DELETE /v1/organizations/{organization}/member-limits/{source}` (DeleteOrganizationMemberLimit)\n */\n deleteMemberLimit(organization: string, source: string, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"DELETE\", path: `/v1/organizations/${e(organization)}/member-limits/${e(source)}` }, options);\n }\n\n /**\n * Get organization.\n *\n * Retrieve one organization by its id or its slug. A value in the id form (org_ and 26 base32\n * characters) is read as the id; anything else as the slug, which needs sys:org:read to resolve. Every\n * route under /organizations/{organization} takes either.\n *\n * `GET /v1/organizations/{organization}` (GetOrganization)\n */\n get(organization: string, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}` }, options);\n }\n\n /**\n * Get an agent's installation on the organization.\n *\n * One installation in the organization — on the organization or one of its resources — with its\n * pending approval (D21). 404 for an installation in another organization or in none.\n *\n * `GET /v1/organizations/{organization}/agent-installations/{installation_id}`\n * (GetOrganizationAgentInstallation)\n */\n getAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Get organization by external id.\n *\n * Retrieve the organization the caller gave this external id when creating or updating it: an exact\n * match on the instance-unique external_id. Answers the organization or 404. Percent-encode the value.\n *\n * `GET /v1/organizations/external_id/{external_id}` (GetOrganizationByExternalId)\n */\n getByExternalId(externalId: string, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"GET\", path: `/v1/organizations/external_id/${e(externalId)}` }, options);\n }\n\n /**\n * Get the organization's client policy.\n *\n * Which of the clients the instance admits may act in the organization (pontive-spec 20 G2). mode all\n * admits every client the instance admits but those the block-list names; allowlist admits only the\n * third-party apps the allow-list names. The block-list always wins, and governs agents too. The\n * instance's third-party client setting is the ceiling: third_party_in_organizations false means its\n * client profile gives third-party apps no organization context at all. An organization that never set\n * its policy reads the default, with updated_at null. Needs sys:agent:read on the organization.\n *\n * `GET /v1/organizations/{organization}/client-policy` (GetOrganizationClientPolicy)\n */\n getClientPolicy(organization: string, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/client-policy` }, options);\n }\n\n /**\n * Get invitation.\n *\n * Get invitation by ID.\n *\n * `GET /v1/organizations/{organization}/invitations/{invitation_id}` (GetOrganizationInvitation)\n */\n getInvitation(organization: string, invitationId: string, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/invitations/${e(invitationId)}` }, options);\n }\n\n /**\n * Get organization member.\n *\n * Get an organization member by user ID.\n *\n * `GET /v1/organizations/{organization}/members/{user_id}` (GetOrganizationMember)\n */\n getMember(organization: string, userId: string, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Get organization settings.\n *\n * The instance-wide policy that applies to every organization: whether members may leave, the roles\n * given on joining, and how long an invitation stays open.\n *\n * `GET /v1/organizations/settings` (GetOrganizationSettings)\n */\n getSettings(options?: RequestOptions): APIPromise<T.OrganizationSettingsResponse> {\n return this.core.request<T.OrganizationSettingsResponse>({ host: \"api\", method: \"GET\", path: `/v1/organizations/settings` }, options);\n }\n\n /**\n * Import organizations.\n *\n * Apply, or with dry_run (default true) plan, a batch of at most 100 organizations and 1,000 member\n * entries under an import run, after their users (pontive-spec 46 §5.3). external_id is each row's\n * key. A member names its user by exactly one of user_id, user_external_id or legacy_subject (the\n * run's source), with roles of the org type; one that names no user fails as a warning on the row, not\n * the organization. A new organization needs at least one resolved member with owner\n * (owners_required). An existing one (same external_id) takes new members and, with on_existing\n * update, its name, metadata and changed roles; its owners change by transfer, never by import\n * (owner_requires_transfer). An organization larger than one batch is sent again with its next\n * members. A b2c instance refuses the call (tenancy_mode_b2c). Needs sys:org:create on the instance\n * root, and sys:member:manage on each existing organization the batch changes.\n *\n * `POST /v1/organizations/import` (ImportOrganizations)\n */\n import(body: T.ImportOrganizationsRequest, options?: RequestOptions): APIPromise<T.UserImportBatch> {\n return this.core.request<T.UserImportBatch>({ host: \"api\", method: \"POST\", path: `/v1/organizations/import`, body }, options);\n }\n\n /**\n * List organizations.\n *\n * Retrieve a paginated list of organizations. Filter by status, external_id, and search query.\n *\n * `GET /v1/organizations` (ListOrganizations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListOrganizationsParams, options?: RequestOptions): PagePromise<T.Organization, T.ListOrganizationsResponse> {\n return this.core.page<T.Organization, T.ListOrganizationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations`, query: params }, options);\n }\n\n /**\n * List the agent activity in an organization.\n *\n * What agents did in the organization (pontive-spec 20 G2, G3): its audit entries whose actor is an\n * agent, on its own installation or acting for a member with a delegated token (on_behalf_of names the\n * member), newest first. Filter by actor_id (an agt_…) and on_behalf_of (a usr_…). The view an\n * organization's owners and admins read from the embedded agent-management element, with\n * pontive:org:agent:read; audit-svc decides it with sys:audit:read on the organization, which they\n * hold.\n *\n * `GET /v1/organizations/{organization}/agent-activity` (ListOrganizationAgentActivity)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentActivity(organization: string, params?: T.ListOrganizationAgentActivityParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agent-activity`, query: params }, options);\n }\n\n /**\n * List every agent installation in the organization.\n *\n * The agents installed on the organization and on each of its resources (pontive-spec 20 G2, D21),\n * with their approved roles, pending approvals and status; filterable by agent, resource and status.\n * Needs sys:agent:read on the organization; an organization's owners and admins hold it, and an end\n * user's token with pontive:org:agent:read reaches it for their own organization.\n *\n * `GET /v1/organizations/{organization}/agent-installations` (ListOrganizationAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentInstallations(organization: string, params?: T.ListOrganizationAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agent-installations`, query: params }, options);\n }\n\n /**\n * List an organization's agents.\n *\n * The organization's agents page (pontive-spec 45 §13; api-route-review D43): every agent installed\n * in it, offered to it, or its own, each with its installation there or null. relation narrows it,\n * repeated for any of several: installed (an installation here), offered (an instance agent offered to\n * the organization, installed or not), own (defined by the organization). Organization-scoped tokens\n * with pontive:org:agent:read reach it.\n *\n * `GET /v1/organizations/{organization}/agents` (ListOrganizationAgents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgents(organization: string, params?: T.ListOrganizationAgentsParams, options?: RequestOptions): PagePromise<T.OrganizationAgent, T.ListOrganizationAgentsResponse> {\n return this.core.page<T.OrganizationAgent, T.ListOrganizationAgentsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/agents`, query: params }, options);\n }\n\n /**\n * List assignable roles.\n *\n * List the roles a member of the organization can be given, each marked with whether the caller may\n * grant or remove it on a member other than themselves (assignable_by_caller) and whether doing so\n * hands the organization over, which needs sys:org:transfer (requires_transfer). Decided on\n * sys:member:read on the organization, so an organization's own administrators can read it; the roles\n * of the org resource type, and the organization's own. Not paginated.\n *\n * `GET /v1/organizations/{organization}/assignable-roles` (ListAssignableRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAssignableRoles(organization: string, params?: T.ListAssignableRolesParams, options?: RequestOptions): PagePromise<T.AssignableRole, T.ListAssignableRolesResponse> {\n return this.core.page<T.AssignableRole, T.ListAssignableRolesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/assignable-roles`, query: params }, options);\n }\n\n /**\n * List an organization's audit log entries.\n *\n * The entries that belong to one organization: the view its admins read with sys:audit:read on the\n * organization. Same filters and cursors as GET /audit-logs.\n *\n * `GET /v1/organizations/{organization}/audit-logs` (ListOrganizationAuditLogs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAuditLogs(organization: string, params?: T.ListOrganizationAuditLogsParams, options?: RequestOptions): PagePromise<Record<string, unknown>, T.ListResponseDoc> {\n return this.core.page<Record<string, unknown>, T.ListResponseDoc>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/audit-logs`, query: params }, options);\n }\n\n /**\n * List an organization's delegations.\n *\n * The delegation grants in the organization: which users let which agents act for them there. Needs\n * sys:agent:read on the organization (pontive-spec 20 G2): its owners and admins hold it, an instance\n * administrator through inheritance, and an end user's token with pontive:org:agent:read reaches it\n * for their own organization.\n *\n * `GET /v1/organizations/{organization}/delegations` (ListOrganizationDelegations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listDelegations(organization: string, params?: T.ListOrganizationDelegationsParams, options?: RequestOptions): PagePromise<T.Delegation, T.ListDelegationsResponse> {\n return this.core.page<T.Delegation, T.ListDelegationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/delegations`, query: params }, options);\n }\n\n /**\n * List the groups holding roles on an organization.\n *\n * The groups holding roles on an organization itself, each with its roles there (api-route-review\n * D43). A group holding roles only on the organization's resources is not listed; the groups the\n * organization owns are GET /groups?owner_type=org&owner_id=….\n *\n * `GET /v1/organizations/{organization}/group-roles` (ListOrganizationGroupRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroupRoles(organization: string, params?: T.ListOrganizationGroupRolesParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/group-roles`, query: params }, options);\n }\n\n /**\n * List invitations.\n *\n * Get a list of invitations for an organization with pagination and filtering.\n *\n * `GET /v1/organizations/{organization}/invitations` (ListOrganizationInvitations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInvitations(organization: string, params?: T.ListOrganizationInvitationsParams, options?: RequestOptions): PagePromise<T.Invitation, T.ListInvitationsResponse> {\n return this.core.page<T.Invitation, T.ListInvitationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/invitations`, query: params }, options);\n }\n\n /**\n * List organization members.\n *\n * List members of an organization with pagination and filtering.\n *\n * `GET /v1/organizations/{organization}/members` (ListOrganizationMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(organization: string, params?: T.ListOrganizationMembersParams, options?: RequestOptions): PagePromise<T.Member, T.ListMembersResponse> {\n return this.core.page<T.Member, T.ListMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/members`, query: params }, options);\n }\n\n /**\n * List the third-party apps acting for the organization's members.\n *\n * The CIMD and DCR apps a member of the organization has consented to (pontive-spec 20 G2), the most\n * recently consented first: how many members did, the organization's policy on each (allowed, blocked,\n * not_allowed), and whether the instance still admits it. Needs sys:agent:read on the organization.\n *\n * `GET /v1/organizations/{organization}/third-party-clients` (ListOrganizationThirdPartyClients)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listThirdPartyClients(organization: string, params?: T.ListOrganizationThirdPartyClientsParams, options?: RequestOptions): PagePromise<T.OrganizationThirdPartyClient, T.ListOrganizationClientsResponse> {\n return this.core.page<T.OrganizationThirdPartyClient, T.ListOrganizationClientsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/organizations/${e(organization)}/third-party-clients`, query: params }, options);\n }\n\n /**\n * Set a member limit.\n *\n * Set one source's member limit on an organization, 0 or more. source is manual (an instance admin or\n * the client's backend) or billing (Pontive billing). While the instance's billing capability is on,\n * the billing limit is managed by billing: setting it here is refused with 403, an instance admin\n * included, and a manual limit may still be set, since the lowest limit wins. With the capability off,\n * an instance admin may set it. If the capability cannot be read, a billing write is refused with 503.\n * The lowest limit set is in force, as member_limit. A write that would add a member past it is\n * refused with 409 seat_limit_reached. Lowering a limit below the current number of members blocks new\n * members and removes no one. Pontive billing does not call this route: it writes its limit to\n * identity-svc over gRPC with its system credential.\n *\n * `PUT /v1/organizations/{organization}/member-limits/{source}` (ReplaceOrganizationMemberLimit)\n */\n replaceMemberLimit(organization: string, source: string, body: T.SetMemberLimitRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"PUT\", path: `/v1/organizations/${e(organization)}/member-limits/${e(source)}`, body }, options);\n }\n\n /**\n * Resend invitation.\n *\n * Resend an invitation.\n *\n * `POST /v1/organizations/{organization}/invitations/{invitation_id}/resend`\n * (ResendOrganizationInvitation)\n */\n resendInvitation(organization: string, invitationId: string, body: T.ResendInvitationRequest, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/invitations/${e(invitationId)}/resend`, body }, options);\n }\n\n /**\n * Reactivate organization.\n *\n * Remove one suspension reason from an organization, and no other. The reason is admin when the body\n * is absent or names none. The organization is active again, with access to the resources parented\n * under it, once it holds no reason; while it holds another it stays suspended. Removing a reason it\n * does not hold changes nothing and succeeds. A reactivate that names no reason removes admin only,\n * never billing. While the instance's billing capability is on, the billing reason is managed by\n * billing: adding or removing it here is refused with 403, an instance admin included, so only billing\n * lifts a billing suspension. With the capability off, an instance admin may add or remove it. If the\n * capability cannot be read, a billing write is refused with 503.\n *\n * `POST /v1/organizations/{organization}/resume` (ResumeOrganization)\n */\n resume(organization: string, body?: T.ReactivateOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/resume`, body }, options);\n }\n\n /**\n * Resume an agent on the organization.\n *\n * Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the\n * organization suspended or not offered) stays suspended until that ends.\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/resume`\n * (ResumeOrganizationAgentInstallation)\n */\n resumeAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/resume` }, options);\n }\n\n /**\n * Suspend organization.\n *\n * Add a suspension reason to an organization. It is suspended while it holds any reason, and access to\n * it and to every resource parented under it is denied. The reason is admin when the body is absent or\n * names none. billing is Pontive billing's own reason. closed says the organization's owners closed\n * their account and the client may reopen it: Pontive billing keeps its owner able to pay its invoices\n * and manage its payment method while it is held. While the instance's billing capability is on, the\n * billing reason is managed by billing: adding or removing it here is refused with 403, an instance\n * admin included, so only billing lifts a billing suspension. With the capability off, an instance\n * admin may add or remove it. If the capability cannot be read, a billing write is refused with 503.\n * Adding a reason the organization already holds changes nothing and succeeds. Pontive billing does\n * not call this route: it writes the billing reason to identity-svc over gRPC with its system\n * credential.\n *\n * `POST /v1/organizations/{organization}/suspend` (SuspendOrganization)\n */\n suspend(organization: string, body?: T.SuspendOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/suspend`, body }, options);\n }\n\n /**\n * Suspend an agent on the organization.\n *\n * Suspend the installation: its roles are withdrawn and the agent's tokens for the organization\n * refused until it is resumed.\n *\n * `POST /v1/organizations/{organization}/agent-installations/{installation_id}/suspend`\n * (SuspendOrganizationAgentInstallation)\n */\n suspendAgentInstallation(organization: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}/suspend` }, options);\n }\n\n /**\n * Transfer organization ownership.\n *\n * Transfer ownership of an organization to another user.\n *\n * `POST /v1/organizations/{organization}/transfer-ownership` (TransferOwnership)\n */\n transferOwnership(organization: string, body: T.TransferOwnershipRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"POST\", path: `/v1/organizations/${e(organization)}/transfer-ownership`, body }, options);\n }\n\n /**\n * Update organization.\n *\n * Partially update an organization. Only provided fields are changed. The slug is immutable after\n * creation and cannot be updated.\n *\n * `PATCH /v1/organizations/{organization}` (UpdateOrganization)\n */\n update(organization: string, body: T.UpdateOrganizationRequest, options?: RequestOptions): APIPromise<T.Organization> {\n return this.core.request<T.Organization>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}`, body }, options);\n }\n\n /**\n * Change an agent's roles on the organization.\n *\n * Replace the roles approved for the agent on the organization, within what it requests\n * (sys:agent:install on the organization, or on the root). delegated_only, when present, turns\n * delegation-only on or off.\n *\n * `PATCH /v1/organizations/{organization}/agent-installations/{installation_id}`\n * (UpdateOrganizationAgentInstallation)\n */\n updateAgentInstallation(organization: string, installationId: string, body: T.UpdateInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}/agent-installations/${e(installationId)}`, body }, options);\n }\n\n /**\n * Set the organization's client policy.\n *\n * Replace the organization's client policy whole (pontive-spec 20 G2). An entry is an app id\n * (app_…), an agent id (agt_…), an exact CIMD client_id URL, or https://host/*, at most 100 per\n * list. A blocked or not-allowed third-party app is refused when the organization is chosen at\n * /authorize (an error page, never a redirect), when consent would be given for it, at code exchange\n * and at refresh; a blocked agent's token exchange in the organization is refused. The organization\n * can only narrow what the instance admits. Needs sys:agent:install on the organization.\n *\n * `PATCH /v1/organizations/{organization}/client-policy` (UpdateOrganizationClientPolicy)\n */\n updateClientPolicy(organization: string, body: T.SetOrganizationClientPolicyRequest, params?: T.UpdateOrganizationClientPolicyParams, options?: RequestOptions): APIPromise<T.OrganizationClientPolicy> {\n const { if_match } = params ?? ({} as T.UpdateOrganizationClientPolicyParams);\n return this.core.request<T.OrganizationClientPolicy>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}/client-policy`, headers: { \"If-Match\": if_match }, body }, options);\n }\n\n /**\n * Update organization member roles.\n *\n * Replace an organization member's roles. Granting or removing owner needs sys:org:transfer, refused\n * 403 owner_transfer_required. A caller from the instance itself (not the Pontive console) may add or\n * remove only roles whose permissions they hold on the organization, or hold sys:root:grant, refused\n * 403 role_ceiling, and cannot change their own roles, refused 403 self_role_change. Roles that\n * changed while the change was being decided are refused 409 member_roles_changed: read the member\n * again and retry.\n *\n * `PATCH /v1/organizations/{organization}/members/{user_id}` (UpdateOrganizationMember)\n */\n updateMember(organization: string, userId: string, body: T.UpdateMemberRolesRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/${e(organization)}/members/${e(userId)}`, body }, options);\n }\n\n /**\n * Update organization settings.\n *\n * Change the instance-wide organization policy. Omitted fields are left as they are.\n *\n * `PATCH /v1/organizations/settings` (UpdateOrganizationSettings)\n */\n updateSettings(body: T.UpdateOrganizationSettingsRequest, params?: T.UpdateOrganizationSettingsParams, options?: RequestOptions): APIPromise<T.OrganizationSettingsResponse> {\n const { if_match } = params ?? ({} as T.UpdateOrganizationSettingsParams);\n return this.core.request<T.OrganizationSettingsResponse>({ host: \"api\", method: \"PATCH\", path: `/v1/organizations/settings`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Personal access tokens.\n */\nexport class PersonalAccessTokens {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create personal access token.\n *\n * Mint a personal access token bound to a user. The token value is returned only here. Omit\n * organization_id for an all-orgs token.\n *\n * `POST /v1/personal-access-tokens` (CreatePAT)\n */\n create(body: T.CreatePATRequest, options?: RequestOptions): APIPromise<T.PATWithToken> {\n return this.core.request<T.PATWithToken>({ host: \"api\", method: \"POST\", path: `/v1/personal-access-tokens`, body }, options);\n }\n\n /**\n * Get personal access token.\n *\n * Get a personal access token by ID.\n *\n * `GET /v1/personal-access-tokens/{personal_access_token_id}` (GetPAT)\n */\n get(personalAccessTokenId: string, options?: RequestOptions): APIPromise<T.PAT> {\n return this.core.request<T.PAT>({ host: \"api\", method: \"GET\", path: `/v1/personal-access-tokens/${e(personalAccessTokenId)}` }, options);\n }\n\n /**\n * List personal access tokens.\n *\n * List personal access tokens with filtering and pagination.\n *\n * `GET /v1/personal-access-tokens` (ListPATs)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListPATsParams, options?: RequestOptions): PagePromise<T.PAT, T.ListPATsResponse> {\n return this.core.page<T.PAT, T.ListPATsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/personal-access-tokens`, query: params }, options);\n }\n\n /**\n * Revoke personal access token.\n *\n * Revoke a personal access token immediately and irreversibly.\n *\n * `POST /v1/personal-access-tokens/{personal_access_token_id}/revoke` (RevokePAT)\n */\n revoke(personalAccessTokenId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/personal-access-tokens/${e(personalAccessTokenId)}/revoke` }, options);\n }\n\n /**\n * Update personal access token.\n *\n * Update mutable fields (name, description, metadata).\n *\n * `PATCH /v1/personal-access-tokens/{personal_access_token_id}` (UpdatePAT)\n */\n update(personalAccessTokenId: string, body: T.UpdatePATRequest, options?: RequestOptions): APIPromise<T.PAT> {\n return this.core.request<T.PAT>({ host: \"api\", method: \"PATCH\", path: `/v1/personal-access-tokens/${e(personalAccessTokenId)}`, body }, options);\n }\n}\n\n/**\n * Resources, their members and their parent.\n */\nexport class Resources {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Approve an agent's requested roles on the resource.\n *\n * Approve the agent's requested roles up to version, after the installation's approved_version and at\n * most the agent's; roles are the approved roles from now on — typically what it holds plus\n * pending_roles (sys:agent:install on the resource's organization, or on the root for a resource in\n * none — never on the resource itself).\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/approve`\n * (ApproveResourceAgentInstallation)\n */\n approveAgentInstallation(resourceId: string, installationId: string, body: T.ApproveInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/approve`, body }, options);\n }\n\n /**\n * Create resource.\n *\n * Register an object another system owns, so members, roles and authorization can refer to it. It may\n * belong to an organization (and is then deleted with it), and may sit under one parent — the\n * organization it belongs to, or a resource belonging to it; for one in no organization, another such\n * resource or the instance root (its instance id, or root) — of one of the parent types its resource\n * type declares; roles held on the parent reach it by its type's inheritance rules. The parent is\n * required: no resource is under nothing.\n *\n * `POST /v1/resources` (CreateResource)\n */\n create(body: T.CreateResourceRequest, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"POST\", path: `/v1/resources`, body }, options);\n }\n\n /**\n * Install an agent on the resource.\n *\n * Install an agent on the resource with roles approved: any of those it requests for the resource's\n * type, or none (sys:agent:install on the resource's organization, or on the root for a resource in\n * none — never on the resource itself). The roles are also held to what the caller could grant\n * there. With delegated_only true, the roles act only as the agent's side of a delegation: a token the\n * agent exchanged to act for a user is allowed what both hold, while the agent's own token holds none\n * of them.\n *\n * `POST /v1/resources/{resource_id}/agent-installations` (CreateResourceAgentInstallation)\n */\n createAgentInstallation(resourceId: string, body: T.InstallRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations`, body }, options);\n }\n\n /**\n * Add a member to a resource.\n *\n * Add a user to a resource with roles of the resource's type. A user who is not a member of the\n * resource's organization joins it too, with the membership settings' roles_on_join (none by default).\n * A user who would take the organization past its member limit is refused 409 seat_limit_reached, and\n * nothing is written.\n *\n * `POST /v1/resources/{resource_id}/members` (CreateResourceMember)\n */\n createMember(resourceId: string, body: T.AddResourceMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/members`, body }, options);\n }\n\n /**\n * Decline an agent's requested roles on the resource.\n *\n * Mark version seen without adding its roles; the installation keeps working with the roles it has.\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/decline`\n * (DeclineResourceAgentInstallation)\n */\n declineAgentInstallation(resourceId: string, installationId: string, body: T.DeclineInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/decline`, body }, options);\n }\n\n /**\n * Delete resource.\n *\n * Deregister a resource. One that has children is refused with 409 unless cascade=true, which also\n * deregisters its whole subtree.\n *\n * `DELETE /v1/resources/{resource_id}` (DeleteResource)\n */\n delete(resourceId: string, params?: T.DeleteResourceParams, options?: RequestOptions): APIPromise<T.DeleteResourceResponse> {\n return this.core.request<T.DeleteResourceResponse>({ host: \"api\", method: \"DELETE\", path: `/v1/resources/${e(resourceId)}`, query: params }, options);\n }\n\n /**\n * Uninstall an agent from the resource.\n *\n * Delete the installation. The agent's next token request for the resource is refused; a token already\n * issued lives out its lifetime.\n *\n * `DELETE /v1/resources/{resource_id}/agent-installations/{installation_id}`\n * (DeleteResourceAgentInstallation)\n */\n deleteAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Remove a member from a resource.\n *\n * Remove a user from a resource. Their membership of the resource's organization stays.\n *\n * `DELETE /v1/resources/{resource_id}/members/{user_id}` (DeleteResourceMember)\n */\n deleteMember(resourceId: string, userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/resources/${e(resourceId)}/members/${e(userId)}` }, options);\n }\n\n /**\n * Get resource.\n *\n * Retrieve a resource by its ID, with its parent.\n *\n * `GET /v1/resources/{resource_id}` (GetResource)\n */\n get(resourceId: string, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}` }, options);\n }\n\n /**\n * Get an agent's installation on the resource.\n *\n * One installation on the resource, a resource in no organization (D21), with its pending approval. An\n * installation in an organization is under /organizations/{organization}/agent-installations.\n *\n * `GET /v1/resources/{resource_id}/agent-installations/{installation_id}`\n * (GetResourceAgentInstallation)\n */\n getAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Get a resource member.\n *\n * Get one member of a resource by user ID.\n *\n * `GET /v1/resources/{resource_id}/members/{user_id}` (GetResourceMember)\n */\n getMember(resourceId: string, userId: string, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/members/${e(userId)}` }, options);\n }\n\n /**\n * List resources.\n *\n * Retrieve a paginated list of resources. Filter by resource_type, the organization they belong to (or\n * instance_level for those in none), a parent (its direct children), and external_id, or search the\n * name and external id by free text.\n *\n * `GET /v1/resources` (ListResources)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListResourcesParams, options?: RequestOptions): PagePromise<T.Resource, T.ListResourcesResponse> {\n return this.core.page<T.Resource, T.ListResourcesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources`, query: params }, options);\n }\n\n /**\n * List the resource's agent installations.\n *\n * The agents installed on the resource, with their approved roles, pending approvals and status;\n * filterable by agent and status (D21).\n *\n * `GET /v1/resources/{resource_id}/agent-installations` (ListResourceAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentInstallations(resourceId: string, params?: T.ListResourceAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/agent-installations`, query: params }, options);\n }\n\n /**\n * List the groups holding roles on a resource.\n *\n * The groups holding roles on a resource, whoever owns them, each with its roles there\n * (api-route-review D43). The groups the resource owns are GET /groups?owner_type=<its\n * type>&owner_id=….\n *\n * `GET /v1/resources/{resource_id}/group-roles` (ListResourceGroupRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroupRoles(resourceId: string, params?: T.ListResourceGroupRolesParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/group-roles`, query: params }, options);\n }\n\n /**\n * List resource members.\n *\n * List the users holding roles on a resource itself. Users who reach it only by inheritance from a\n * parent are not members and are not listed.\n *\n * `GET /v1/resources/{resource_id}/members` (ListResourceMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(resourceId: string, params?: T.ListResourceMembersParams, options?: RequestOptions): PagePromise<T.Member, T.ListMembersResponse> {\n return this.core.page<T.Member, T.ListMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/resources/${e(resourceId)}/members`, query: params }, options);\n }\n\n /**\n * Move a resource under a parent.\n *\n * Set the resource's parent, replacing the one it had: a move, with its subtree. The parent is the\n * organization the resource belongs to, or a resource belonging to it; for a resource in no\n * organization, another such resource or the instance root, by its instance id or root — of one of\n * the parent types the resource's type declares. Roles held on the parent then reach the resource. A\n * move that would make the resource its own ancestor is refused with 409, one that would nest it more\n * than 8 levels deep with 400. Setting the parent it already has succeeds.\n *\n * `PUT /v1/resources/{resource_id}/parent` (ReplaceResourceParent)\n */\n replaceParent(resourceId: string, body: T.SetResourceParentRequest, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"PUT\", path: `/v1/resources/${e(resourceId)}/parent`, body }, options);\n }\n\n /**\n * Resume an agent on the resource.\n *\n * Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the\n * organization suspended or not offered) stays suspended until that ends.\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/resume`\n * (ResumeResourceAgentInstallation)\n */\n resumeAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/resume` }, options);\n }\n\n /**\n * Suspend an agent on the resource.\n *\n * Suspend the installation: its roles are withdrawn and the agent's tokens for the resource refused\n * until it is resumed.\n *\n * `POST /v1/resources/{resource_id}/agent-installations/{installation_id}/suspend`\n * (SuspendResourceAgentInstallation)\n */\n suspendAgentInstallation(resourceId: string, installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}/suspend` }, options);\n }\n\n /**\n * Update resource.\n *\n * Change a resource's name or metadata. Its type, external id and organization never change; its\n * parent changes through the parent endpoints.\n *\n * `PATCH /v1/resources/{resource_id}` (UpdateResource)\n */\n update(resourceId: string, body: T.UpdateResourceRequest, options?: RequestOptions): APIPromise<T.Resource> {\n return this.core.request<T.Resource>({ host: \"api\", method: \"PATCH\", path: `/v1/resources/${e(resourceId)}`, body }, options);\n }\n\n /**\n * Change an agent's roles on the resource.\n *\n * Replace the roles approved for the agent on the resource, within what it requests (sys:agent:install\n * on the resource's organization, or on the root for a resource in none — never on the resource\n * itself). delegated_only, when present, turns delegation-only on or off.\n *\n * `PATCH /v1/resources/{resource_id}/agent-installations/{installation_id}`\n * (UpdateResourceAgentInstallation)\n */\n updateAgentInstallation(resourceId: string, installationId: string, body: T.UpdateInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"PATCH\", path: `/v1/resources/${e(resourceId)}/agent-installations/${e(installationId)}`, body }, options);\n }\n\n /**\n * Update a resource member's roles.\n *\n * Replace the roles a member holds on a resource.\n *\n * `PATCH /v1/resources/{resource_id}/members/{user_id}` (UpdateResourceMember)\n */\n updateMember(resourceId: string, userId: string, body: T.UpdateResourceMemberRolesRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"PATCH\", path: `/v1/resources/${e(resourceId)}/members/${e(userId)}`, body }, options);\n }\n}\n\n/**\n * The instance root: its members, invitations, installations and group roles.\n */\nexport class Root {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Approve an agent's requested roles on the instance root.\n *\n * Approve the agent's requested roles up to version, after the installation's approved_version and at\n * most the agent's; roles are the approved roles from now on — typically what it holds plus\n * pending_roles (sys:agent:install on the root).\n *\n * `POST /v1/root/agent-installations/{installation_id}/approve` (ApproveRootAgentInstallation)\n */\n approveAgentInstallation(installationId: string, body: T.ApproveInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/approve`, body }, options);\n }\n\n /**\n * Install an agent on the instance root.\n *\n * Install an agent in no organization — on the instance root, or on the resource resource_id names,\n * a resource in none (D21) — with roles approved: any of those it requests for the target's type, or\n * none (sys:agent:install on the root). The roles are also held to what the caller could grant there.\n * With delegated_only true, the roles act only as the agent's side of a delegation: a token the agent\n * exchanged to act for a user is allowed what both hold, while the agent's own token holds none of\n * them.\n *\n * `POST /v1/root/agent-installations` (CreateRootAgentInstallation)\n */\n createAgentInstallation(body: T.InstallRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations`, body }, options);\n }\n\n /**\n * Invite users to the instance.\n *\n * Invite people to the instance alone, with no organization: each gets an email whose link lets them\n * create their own account in the app (choosing their own password or sign-in method), and accepting\n * grants nothing else. For people who belong to no organization — in a b2c instance, everyone; in a\n * b2b one, for example the client's own staff. An address that already has an account is skipped\n * (already_registered); one with a pending invitation to the instance has it reissued with a new link.\n * The app must have org_access all. 200 when every address was skipped, 201 when any invitation was\n * sent.\n *\n * `POST /v1/root/invitations` (CreateRootInvitations)\n */\n createInvitations(body: T.InviteToInstanceRequest, options?: RequestOptions): APIPromise<T.InvitationResult> {\n return this.core.request<T.InvitationResult>({ host: \"api\", method: \"POST\", path: `/v1/root/invitations`, body }, options);\n }\n\n /**\n * Add a root member.\n *\n * Give a user roles on the instance root (api-route-review D4, D38): written from the root, like an\n * organization's or a resource's members. A root role is granted with sys:root:grant.\n *\n * `POST /v1/root/members` (CreateRootMember)\n */\n createMember(body: T.AddRootMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"POST\", path: `/v1/root/members`, body }, options);\n }\n\n /**\n * Decline an agent's requested roles on the instance root.\n *\n * Mark version seen without adding its roles; the installation keeps working with the roles it has.\n *\n * `POST /v1/root/agent-installations/{installation_id}/decline` (DeclineRootAgentInstallation)\n */\n declineAgentInstallation(installationId: string, body: T.DeclineInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/decline`, body }, options);\n }\n\n /**\n * Uninstall an agent from the instance root.\n *\n * Delete the installation. The agent's next token request for the instance root is refused; a token\n * already issued lives out its lifetime.\n *\n * `DELETE /v1/root/agent-installations/{installation_id}` (DeleteRootAgentInstallation)\n */\n deleteAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/root/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Withdraw an invitation to the instance.\n *\n * Withdraw an invitation to the instance: it is deleted, and its link stops working.\n *\n * `DELETE /v1/root/invitations/{invitation_id}` (DeleteRootInvitation)\n */\n deleteInvitation(invitationId: string, params?: T.DeleteRootInvitationParams, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/root/invitations/${e(invitationId)}`, query: params }, options);\n }\n\n /**\n * Remove a root member.\n *\n * Take every root role from a user. The instance's last owner cannot be removed.\n *\n * `DELETE /v1/root/members/{user_id}` (DeleteRootMember)\n */\n deleteMember(userId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/root/members/${e(userId)}` }, options);\n }\n\n /**\n * Get an agent's installation on the instance root.\n *\n * One installation in no organization — on the instance root or on a resource in none (D21) — with\n * its pending approval.\n *\n * `GET /v1/root/agent-installations/{installation_id}` (GetRootAgentInstallation)\n */\n getAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"GET\", path: `/v1/root/agent-installations/${e(installationId)}` }, options);\n }\n\n /**\n * Get an invitation to the instance.\n *\n * One open invitation to the instance alone (no organization). An organization's invitation is not\n * found here.\n *\n * `GET /v1/root/invitations/{invitation_id}` (GetRootInvitation)\n */\n getInvitation(invitationId: string, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"GET\", path: `/v1/root/invitations/${e(invitationId)}` }, options);\n }\n\n /**\n * Get a root member.\n *\n * One user's roles on the instance root.\n *\n * `GET /v1/root/members/{user_id}` (GetRootMember)\n */\n getMember(userId: string, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"GET\", path: `/v1/root/members/${e(userId)}` }, options);\n }\n\n /**\n * List the installations in no organization.\n *\n * The installations in no organization (D21): on the instance root and on resources in none, with\n * their approved roles, pending approvals and status; filterable by agent, resource and status.\n *\n * `GET /v1/root/agent-installations` (ListRootAgentInstallations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAgentInstallations(params?: T.ListRootAgentInstallationsParams, options?: RequestOptions): PagePromise<T.Installation, T.ListInstallationsResponse> {\n return this.core.page<T.Installation, T.ListInstallationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/agent-installations`, query: params }, options);\n }\n\n /**\n * List the groups holding roles on the instance root.\n *\n * The groups holding roles on the instance root, each with its roles there (api-route-review D43): the\n * read edge from the other side of GET /groups/{group_id}/roles. The groups the root owns are GET\n * /groups?owner_type=root.\n *\n * `GET /v1/root/group-roles` (ListRootGroupRoles)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroupRoles(params?: T.ListRootGroupRolesParams, options?: RequestOptions): PagePromise<T.GroupGrant, T.ListGroupGrantsResponse> {\n return this.core.page<T.GroupGrant, T.ListGroupGrantsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/group-roles`, query: params }, options);\n }\n\n /**\n * List invitations to the instance.\n *\n * The open invitations to the instance alone (no organization). An expired invitation is not listed.\n *\n * `GET /v1/root/invitations` (ListRootInvitations)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listInvitations(params?: T.ListRootInvitationsParams, options?: RequestOptions): PagePromise<T.Invitation, T.ListInvitationsResponse> {\n return this.core.page<T.Invitation, T.ListInvitationsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/invitations`, query: params }, options);\n }\n\n /**\n * List the instance root's members.\n *\n * List the users holding a role on the instance root — its owners and admins, and in the directory\n * Pontive's staff. The root is the request's own instance.\n *\n * `GET /v1/root/members` (ListRootMembers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMembers(params?: T.ListRootMembersParams, options?: RequestOptions): PagePromise<T.Member, T.ListMembersResponse> {\n return this.core.page<T.Member, T.ListMembersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/root/members`, query: params }, options);\n }\n\n /**\n * Resend an invitation to the instance.\n *\n * Send an invitation to the instance again, with a new link; the earlier link stops working.\n *\n * `POST /v1/root/invitations/{invitation_id}/resend` (ResendRootInvitation)\n */\n resendInvitation(invitationId: string, body: T.ResendInvitationRequest, options?: RequestOptions): APIPromise<T.Invitation> {\n return this.core.request<T.Invitation>({ host: \"api\", method: \"POST\", path: `/v1/root/invitations/${e(invitationId)}/resend`, body }, options);\n }\n\n /**\n * Resume an agent on the instance root.\n *\n * Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the\n * organization suspended or not offered) stays suspended until that ends.\n *\n * `POST /v1/root/agent-installations/{installation_id}/resume` (ResumeRootAgentInstallation)\n */\n resumeAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/resume` }, options);\n }\n\n /**\n * Suspend an agent on the instance root.\n *\n * Suspend the installation: its roles are withdrawn and the agent's tokens for the instance root\n * refused until it is resumed.\n *\n * `POST /v1/root/agent-installations/{installation_id}/suspend` (SuspendRootAgentInstallation)\n */\n suspendAgentInstallation(installationId: string, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"POST\", path: `/v1/root/agent-installations/${e(installationId)}/suspend` }, options);\n }\n\n /**\n * Change an agent's roles on the instance root.\n *\n * Replace the roles approved for the agent on the instance root, within what it requests\n * (sys:agent:install on the root). delegated_only, when present, turns delegation-only on or off.\n *\n * `PATCH /v1/root/agent-installations/{installation_id}` (UpdateRootAgentInstallation)\n */\n updateAgentInstallation(installationId: string, body: T.UpdateInstallationRequest, options?: RequestOptions): APIPromise<T.Installation> {\n return this.core.request<T.Installation>({ host: \"api\", method: \"PATCH\", path: `/v1/root/agent-installations/${e(installationId)}`, body }, options);\n }\n\n /**\n * Update a root member.\n *\n * Replace a user's roles on the instance root.\n *\n * `PATCH /v1/root/members/{user_id}` (UpdateRootMember)\n */\n updateMember(userId: string, body: T.UpdateRootMemberRequest, options?: RequestOptions): APIPromise<T.Member> {\n return this.core.request<T.Member>({ host: \"api\", method: \"PATCH\", path: `/v1/root/members/${e(userId)}`, body }, options);\n }\n}\n\n/**\n * Service accounts: machine identities, their credentials and roles.\n */\nexport class ServiceAccounts {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create service account.\n *\n * Create a service account, owned by the instance root, an organization or a resource (D5, D6, D44):\n * owner_type root (the default), org or the owning resource's type key, owner_id its prefixed id. The\n * account is created with no client secret (D45): mint one with POST\n * /service-accounts/{service_account_id}/client-secrets, which needs sys:sa:secret. A pontive: scope\n * in allowed_scopes is refused (400); to let the account reach the management API, grant it on the\n * management (system) API with PUT /apis/{api_id}/clients.\n *\n * `POST /v1/service-accounts` (CreateServiceAccount)\n */\n create(body: T.CreateServiceAccountRequest, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts`, body }, options);\n }\n\n /**\n * Create service account client secret.\n *\n * Mint a client secret (D19); needs sys:sa:secret. Creating the account mints none (D45). Its value is\n * returned here only. Without expire_others_in the others are kept, and the create is refused (409\n * client_secret_limit_reached) while two that do not expire are held; with it, every other secret\n * stops working that many seconds from now (0–604800; 0 at once), so a rotation is one call.\n *\n * `POST /v1/service-accounts/{service_account_id}/client-secrets` (CreateServiceAccountClientSecret)\n */\n createClientSecret(serviceAccountId: string, body?: T.ServiceaccountCreateClientSecretRequest, options?: RequestOptions): APIPromise<T.ServiceaccountClientSecretWithValue> {\n return this.core.request<T.ServiceaccountClientSecretWithValue>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-secrets`, body }, options);\n }\n\n /**\n * Create service account federated credential.\n *\n * Let the service account authenticate at the token endpoint with a token a trusted issuer signed,\n * with no secret or key of its own (workload identity federation, pontive-spec 20 B7). The workload\n * sends its token as client_assertion, with client_assertion_type\n * urn:ietf:params:oauth:client-assertion-type:jwt-bearer and client_id the service account's id; it is\n * accepted when its iss is the credential's trusted issuer (enabled), its aud one the issuer accepts,\n * exp at most the issuer's max_token_lifetime_seconds (default 3600) ahead and at most that long after\n * iat, its signature the issuer's, its jti unused (unless the issuer has allow_reuse, which accepts\n * the same token until it expires), its sub matches subject and every required claim is present with\n * exactly its value. subject is exact by default; a '*' matches one or more characters within one ':'\n * or '/' segment, and '**' or a '*' in the first segment is refused, so repo:acme/api:environment:*\n * matches every environment of acme/api and nothing else. At most 20 per service account, the name\n * once. Needs sys:sa:secret on its owner (the instance root, its organization, or its resource's\n * organization).\n *\n * `POST /v1/service-accounts/{service_account_id}/federated-credentials`\n * (CreateServiceAccountFederatedCredential)\n */\n createFederatedCredential(serviceAccountId: string, body: T.CreateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials`, body }, options);\n }\n\n /**\n * Add a service account public key.\n *\n * Add a public JWK to the account's inline keys, for private_key_jwt client authentication (RFC 7523).\n * The body is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256, with a\n * kid. At most three; refused while the account has a jwks_uri (409 key_source_conflict). Rotate by\n * overlap: add the new key, move over to it, then remove the old one.\n *\n * `POST /v1/service-accounts/{service_account_id}/public-keys` (CreateServiceAccountPublicKey)\n */\n createPublicKey(serviceAccountId: string, body: T.JWK, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/public-keys`, body }, options);\n }\n\n /**\n * Deactivate service account.\n *\n * Deactivate a service account.\n *\n * `POST /v1/service-accounts/{service_account_id}/deactivate` (DeactivateServiceAccount)\n */\n deactivate(serviceAccountId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/deactivate` }, options);\n }\n\n /**\n * Delete service account.\n *\n * Delete a service account.\n *\n * `DELETE /v1/service-accounts/{service_account_id}` (DeleteServiceAccount)\n */\n delete(serviceAccountId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}` }, options);\n }\n\n /**\n * Delete service account client secret.\n *\n * Remove one of the account's client secrets (D8, D19); it stops working at once.\n *\n * `DELETE /v1/service-accounts/{service_account_id}/client-secrets/{secret_id}`\n * (DeleteServiceAccountClientSecret)\n */\n deleteClientSecret(serviceAccountId: string, secretId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-secrets/${e(secretId)}` }, options);\n }\n\n /**\n * Delete service account federated credential.\n *\n * The credential stops authenticating at once; tokens already issued live out their lifetime. Needs\n * sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).\n *\n * `DELETE /v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}`\n * (DeleteServiceAccountFederatedCredential)\n */\n deleteFederatedCredential(serviceAccountId: string, credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Remove a service account public key.\n *\n * Remove one of the account's inline keys by kid. Assertions signed with it are refused from now on.\n *\n * `DELETE /v1/service-accounts/{service_account_id}/public-keys/{key_id}`\n * (DeleteServiceAccountPublicKey)\n */\n deletePublicKey(serviceAccountId: string, keyId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"DELETE\", path: `/v1/service-accounts/${e(serviceAccountId)}/public-keys/${e(keyId)}` }, options);\n }\n\n /**\n * Get service account.\n *\n * Get a service account by ID.\n *\n * `GET /v1/service-accounts/{service_account_id}` (GetServiceAccount)\n */\n get(serviceAccountId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}` }, options);\n }\n\n /**\n * Get service account federated credential.\n *\n * Needs sys:sa:read on its owner (the instance root, its organization, or its resource's\n * organization).\n *\n * `GET /v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}`\n * (GetServiceAccountFederatedCredential)\n */\n getFederatedCredential(serviceAccountId: string, credentialId: string, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials/${e(credentialId)}` }, options);\n }\n\n /**\n * Get token configuration.\n *\n * Get token configuration for a service account.\n *\n * `GET /v1/service-accounts/{service_account_id}/token-config` (GetTokenConfig)\n */\n getTokenConfig(serviceAccountId: string, options?: RequestOptions): APIPromise<T.TokenConfiguration> {\n return this.core.request<T.TokenConfiguration>({ host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/token-config` }, options);\n }\n\n /**\n * List service accounts.\n *\n * List the instance's service accounts, filtered by owner (D6, D15, D44): owner_type root, org or a\n * resource type key lists one kind of owner's accounts, owner_id one owner's.\n *\n * `GET /v1/service-accounts` (ListServiceAccounts)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListServiceAccountsParams, options?: RequestOptions): PagePromise<T.ServiceAccount, T.ListServiceAccountsResponse> {\n return this.core.page<T.ServiceAccount, T.ListServiceAccountsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts`, query: params }, options);\n }\n\n /**\n * List app scopes.\n *\n * List OAuth-style app scope configuration for a service account.\n *\n * `GET /v1/service-accounts/{service_account_id}/client-scopes` (ListClientScopes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientScopes(serviceAccountId: string, params?: T.ListClientScopesParams, options?: RequestOptions): PagePromise<T.AppScope, T.ListAppScopesResponse> {\n return this.core.page<T.AppScope, T.ListAppScopesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-scopes`, query: params }, options);\n }\n\n /**\n * List service account client secrets.\n *\n * The account's client secrets that still authenticate (D19), newest first: preview, label, status,\n * created and expiry, never the value. Needs sys:sa:secret on the account's owner.\n *\n * `GET /v1/service-accounts/{service_account_id}/client-secrets` (ListServiceAccountClientSecrets)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listClientSecrets(serviceAccountId: string, params?: T.ListServiceAccountClientSecretsParams, options?: RequestOptions): PagePromise<T.ServiceaccountClientSecret, T.ServiceaccountListClientSecretsResponse> {\n return this.core.page<T.ServiceaccountClientSecret, T.ServiceaccountListClientSecretsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-secrets`, query: params }, options);\n }\n\n /**\n * List service account federated credentials.\n *\n * Every federated credential of the service account (at most 20). Needs sys:sa:read on its owner (the\n * instance root, its organization, or its resource's organization).\n *\n * `GET /v1/service-accounts/{service_account_id}/federated-credentials`\n * (ListServiceAccountFederatedCredentials)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listFederatedCredentials(serviceAccountId: string, params?: T.ListServiceAccountFederatedCredentialsParams, options?: RequestOptions): PagePromise<T.FederatedCredential, T.ListFederatedCredentialsResponse> {\n return this.core.page<T.FederatedCredential, T.ListFederatedCredentialsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials`, query: params }, options);\n }\n\n /**\n * Reactivate service account.\n *\n * Reactivate a service account.\n *\n * `POST /v1/service-accounts/{service_account_id}/reactivate` (ReactivateServiceAccount)\n */\n reactivate(serviceAccountId: string, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"POST\", path: `/v1/service-accounts/${e(serviceAccountId)}/reactivate` }, options);\n }\n\n /**\n * Update app scopes.\n *\n * Replace app scope configuration for a service account.\n *\n * `PUT /v1/service-accounts/{service_account_id}/client-scopes` (ReplaceClientScopes)\n */\n replaceClientScopes(serviceAccountId: string, body: T.UpdateAppScopesRequest, options?: RequestOptions): APIPromise<T.ListAppScopesResponse> {\n return this.core.request<T.ListAppScopesResponse>({ host: \"api\", method: \"PUT\", path: `/v1/service-accounts/${e(serviceAccountId)}/client-scopes`, body }, options);\n }\n\n /**\n * Set a service account's roles.\n *\n * Replace the roles a service account holds on its owner — the instance root, its organization, or\n * its resource — with roles of the owner's type; no roles removes them all. What lies below the\n * owner is reached by inheritance. A service account never holds owner on an organization\n * (owner_not_grantable).\n *\n * `PUT /v1/service-accounts/{service_account_id}/roles` (ReplaceServiceAccountRoles)\n */\n replaceRoles(serviceAccountId: string, body: T.SetServiceAccountRolesRequest, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"PUT\", path: `/v1/service-accounts/${e(serviceAccountId)}/roles`, body }, options);\n }\n\n /**\n * Update service account.\n *\n * Update a service account.\n *\n * `PATCH /v1/service-accounts/{service_account_id}` (UpdateServiceAccount)\n */\n update(serviceAccountId: string, body: T.UpdateServiceAccountRequest, options?: RequestOptions): APIPromise<T.ServiceAccount> {\n return this.core.request<T.ServiceAccount>({ host: \"api\", method: \"PATCH\", path: `/v1/service-accounts/${e(serviceAccountId)}`, body }, options);\n }\n\n /**\n * Update service account federated credential.\n *\n * Change the name, description, subject or required claims; an absent field is left as it is, and\n * required_claims, when present, replaces the map. The trusted issuer never changes. Needs\n * sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).\n *\n * `PATCH /v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}`\n * (UpdateServiceAccountFederatedCredential)\n */\n updateFederatedCredential(serviceAccountId: string, credentialId: string, body: T.UpdateFederatedCredentialRequest, options?: RequestOptions): APIPromise<T.FederatedCredential> {\n return this.core.request<T.FederatedCredential>({ host: \"api\", method: \"PATCH\", path: `/v1/service-accounts/${e(serviceAccountId)}/federated-credentials/${e(credentialId)}`, body }, options);\n }\n\n /**\n * Update token configuration.\n *\n * Update token configuration for a service account.\n *\n * `PATCH /v1/service-accounts/{service_account_id}/token-config` (UpdateTokenConfig)\n */\n updateTokenConfig(serviceAccountId: string, body: T.UpdateServiceAccountTokenConfigRequest, params?: T.UpdateTokenConfigParams, options?: RequestOptions): APIPromise<T.TokenConfiguration> {\n const { if_match } = params ?? ({} as T.UpdateTokenConfigParams);\n return this.core.request<T.TokenConfiguration>({ host: \"api\", method: \"PATCH\", path: `/v1/service-accounts/${e(serviceAccountId)}/token-config`, headers: { \"If-Match\": if_match }, body }, options);\n }\n}\n\n/**\n * Bulk imports of users and organizations.\n */\nexport class UserImports {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create user import.\n *\n * Start an import run (pontive-spec 46 §5.1): a migration's batches of users and organizations, its\n * counters, a record per applied row, and revert. migration_source_id is optional; without one, rows\n * match existing users by external_id only and carry no legacy_subject or firebase_scrypt hash.\n * options are checked now and fixed: on_existing (skip, default, or update), password_policy_violation\n * (require_change, default, or allow), identity_connections (at most 20; each app must have that\n * connection, of that type), totp_app_ids (at most 20; each app must have TOTP on with an issuer) and\n * emit_events (default true: user.created for each user the run creates). Needs sys:user:manage on the\n * instance root.\n *\n * `POST /v1/user-imports` (CreateUserImport)\n */\n create(body: T.CreateUserImportRequest, options?: RequestOptions): APIPromise<T.UserImport> {\n return this.core.request<T.UserImport>({ host: \"api\", method: \"POST\", path: `/v1/user-imports`, body }, options);\n }\n\n /**\n * Get user import.\n *\n * The run with its options and counters. Needs sys:user:read on the instance root.\n *\n * `GET /v1/user-imports/{user_import_id}` (GetUserImport)\n */\n get(userImportId: string, options?: RequestOptions): APIPromise<T.UserImport> {\n return this.core.request<T.UserImport>({ host: \"api\", method: \"GET\", path: `/v1/user-imports/${e(userImportId)}` }, options);\n }\n\n /**\n * List user imports.\n *\n * The instance's import runs, newest first. Needs sys:user:read on the instance root.\n *\n * `GET /v1/user-imports` (ListUserImports)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListUserImportsParams, options?: RequestOptions): PagePromise<T.UserImport, T.ListUserImportsResponse> {\n return this.core.page<T.UserImport, T.ListUserImportsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/user-imports`, query: params }, options);\n }\n\n /**\n * List user import records.\n *\n * The run's records, one per applied row, in the order applied: what matched the row (key), what\n * happened (outcome) and why a row failed (errors, never a value from the row). Records are kept 90\n * days after the run's last batch. Needs sys:user:read on the instance root.\n *\n * `GET /v1/user-imports/{user_import_id}/records` (ListUserImportRecords)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listRecords(userImportId: string, params?: T.ListUserImportRecordsParams, options?: RequestOptions): PagePromise<T.UserImportRecord, T.ListUserImportRecordsResponse> {\n return this.core.page<T.UserImportRecord, T.ListUserImportRecordsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/user-imports/${e(userImportId)}/records`, query: params }, options);\n }\n\n /**\n * Revert user import.\n *\n * Undo, or with dry_run (default true) plan undoing, up to 1,000 of what the run created (pontive-spec\n * 46 §5.5): the organizations it created whose every member is a user it created who has not signed\n * in, then those users, deleted outright so their identifiers are free for a re-import, and the root\n * memberships it created for users it keeps (one who signed in, or one it matched rather than\n * created), counted in root_members_removed; a membership it only updated is kept. Users who signed\n * in, organizations with other members and everything the run updated are kept; kept lists them with\n * why. The run takes no more batches; call again while remaining is above 0, and the run is reverted\n * once a call finds nothing left. Needs sys:user:manage on the instance root, sys:org:delete on each\n * organization it deletes, and sys:root:grant to remove a root membership, else the user is kept as\n * forbidden.\n *\n * `POST /v1/user-imports/{user_import_id}/revert` (RevertUserImport)\n */\n revert(userImportId: string, body?: T.RevertUserImportRequest, options?: RequestOptions): APIPromise<T.UserImportRevert> {\n return this.core.request<T.UserImportRevert>({ host: \"api\", method: \"POST\", path: `/v1/user-imports/${e(userImportId)}/revert`, body }, options);\n }\n}\n\n/**\n * Users in the instance.\n */\nexport class Users {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create user.\n *\n * Create a new user.\n *\n * `POST /v1/users` (CreateUser)\n */\n create(body: T.CreateUserRequest, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"POST\", path: `/v1/users`, body }, options);\n }\n\n /**\n * Deactivate user.\n *\n * Deactivate a user.\n *\n * `POST /v1/users/{user}/deactivate` (DeactivateUser)\n */\n deactivate(user: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/deactivate` }, options);\n }\n\n /**\n * Delete user.\n *\n * Permanently delete a user.\n *\n * `DELETE /v1/users/{user}` (DeleteUser)\n */\n delete(user: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/users/${e(user)}` }, options);\n }\n\n /**\n * Revoke a user's authorized app.\n *\n * Withdraw a user's consent to an app: the grant and the user's refresh tokens at that app are\n * deleted, so the app must ask again. The user's session stays. An app the user has not authorized\n * reads as 404.\n *\n * `DELETE /v1/users/{user}/authorized-apps/{app_id}` (DeleteUserAuthorizedApp)\n */\n deleteAuthorizedApp(user: string, appId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/users/${e(user)}/authorized-apps/${e(appId)}` }, options);\n }\n\n /**\n * Get user.\n *\n * Retrieve one user by their id or their username. A value in the id form (usr_ and 26 base32\n * characters) is read as the id; anything else as the username. An email is never a path value: find a\n * user by email with GET /users?email=. Every route under /users/{user} takes either.\n *\n * `GET /v1/users/{user}` (GetUser)\n */\n get(user: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}` }, options);\n }\n\n /**\n * Get user by external id.\n *\n * Retrieve the user the caller gave this external id: an exact match on the instance-unique\n * external_id. Answers the user or 404. Percent-encode the value.\n *\n * `GET /v1/users/external_id/{external_id}` (GetUserByExternalId)\n */\n getByExternalId(externalId: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"GET\", path: `/v1/users/external_id/${e(externalId)}` }, options);\n }\n\n /**\n * Import users.\n *\n * Apply, or with dry_run (default true) plan, a batch of at most 100 users under an import run\n * (pontive-spec 46 §5.2). Each row is POST /v1/users's fields plus legacy_subject (the user's id in\n * the run's migration source), created_at (in the past), status (active or deactivated), and one of\n * password (plaintext, hashed now) or password_hash: bcrypt, argon2, scrypt, firebase_scrypt, pbkdf2,\n * django, werkzeug, aspnet_identity, wordpress, ldap or digest (§6.1). Hashes under OWASP's minimum\n * are wrapped in argon2id; every imported hash is replaced by a native one at the user's first\n * sign-in, when the password is also checked against the password policy (a change is required on\n * failure unless the run allows it). totp (base32 secret, SHA1, 6 digits, 30 seconds, with up to 16\n * recovery codes) is stored for the run's totp_app_ids; external_identities are written to the run's\n * identity_connections of their type (google, github, apple, oidc; microsoft and entra are\n * identity_not_portable). A row matches an existing user by its legacy subject, else external_id,\n * never by email: a match is skipped or, with on_existing update, updated; an email, phone or username\n * held by a user it does not match fails identifier_conflict. Each row stands alone and answers a\n * record: created, updated, skipped or failed with errors, never a value from the row. Nothing is sent\n * to the users. root_roles (at most 20 role keys of the root type, already mapped) makes the user a\n * root member with them, in the same batch and as POST /v1/root/members would: a created user, and a\n * matched one who is not a root member yet; a matched root member is skipped, or with on_existing\n * update given these roles. owner is never granted, nor a deactivated user. A root role problem fails\n * the membership, not the user: the record answers root_member with its outcome (created, updated,\n * skipped or failed) and a warning on users[i].root_roles (role_not_found, role_not_assignable,\n * owner_requires_transfer, user_not_active). Without user_import_id an applied batch starts a run with\n * the default options. The call answers 200 whatever its rows' outcomes. Needs sys:user:manage on the\n * instance root, sys:user:credentials when a row carries password, password_hash, totp or\n * external_identities (never a token acting for a user), and sys:root:grant when a row carries\n * root_roles.\n *\n * `POST /v1/users/import` (ImportUsers)\n */\n import(body: T.ImportUsersRequest, options?: RequestOptions): APIPromise<T.UserImportBatch> {\n return this.core.request<T.UserImportBatch>({ host: \"api\", method: \"POST\", path: `/v1/users/import`, body }, options);\n }\n\n /**\n * List users.\n *\n * Get a list of users with pagination and filtering.\n *\n * `GET /v1/users` (ListUsers)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n list(params?: T.ListUsersParams, options?: RequestOptions): PagePromise<T.User, T.ListUsersResponse> {\n return this.core.page<T.User, T.ListUsersResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users`, query: params }, options);\n }\n\n /**\n * List a user's authorized apps.\n *\n * The apps a user has granted scopes to through the OAuth consent screen, with the scopes granted.\n * Unpaginated.\n *\n * `GET /v1/users/{user}/authorized-apps` (ListUserAuthorizedApps)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listAuthorizedApps(user: string, params?: T.ListUserAuthorizedAppsParams, options?: RequestOptions): PagePromise<T.AuthorizedApp, T.ListAuthorizedAppsResponse> {\n return this.core.page<T.AuthorizedApp, T.ListAuthorizedAppsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/authorized-apps`, query: params }, options);\n }\n\n /**\n * List a user's groups.\n *\n * List the groups a user belongs to.\n *\n * `GET /v1/users/{user}/groups` (ListUserGroups)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listGroups(user: string, params?: T.ListUserGroupsParams, options?: RequestOptions): PagePromise<T.Group, T.ListGroupsResponse> {\n return this.core.page<T.Group, T.ListGroupsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/groups`, query: params }, options);\n }\n\n /**\n * List memberships for a user.\n *\n * List a user's memberships across every container kind — the instance root, organizations and\n * resources (D4) — read-only; memberships are written on their container. resource_type narrows them\n * to one kind of container by its registry key (root, org or a custom type key, D44). Each carries its\n * container's name and external_id.\n *\n * `GET /v1/users/{user}/memberships` (ListUserMemberships)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listMemberships(user: string, params?: T.ListUserMembershipsParams, options?: RequestOptions): PagePromise<T.UserMembership, T.ListUserMembershipsResponse> {\n return this.core.page<T.UserMembership, T.ListUserMembershipsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/memberships`, query: params }, options);\n }\n\n /**\n * List user sessions.\n *\n * List the OP sessions belonging to a user — the records that a browser is signed in, independent of\n * any token issued. The response carries no session secret: the id is the public OIDC sid claim.\n *\n * `GET /v1/users/{user}/sessions` (ListUserSessions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listSessions(user: string, params?: T.ListUserSessionsParams, options?: RequestOptions): PagePromise<T.Session, T.ListUserSessionsResponse> {\n return this.core.page<T.Session, T.ListUserSessionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/users/${e(user)}/sessions`, query: params }, options);\n }\n\n /**\n * Activate user.\n *\n * Activate a deactivated user.\n *\n * `POST /v1/users/{user}/reactivate` (ReactivateUser)\n */\n reactivate(user: string, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/reactivate` }, options);\n }\n\n /**\n * Revoke user session.\n *\n * End one of a user's sessions. Every grant consults the same flag afterwards, so no token has to be\n * found or enumerated. A session belonging to a different user reads as 404.\n *\n * `POST /v1/users/{user}/sessions/{session_id}/revoke` (RevokeUserSession)\n */\n revokeSession(user: string, sessionId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/sessions/${e(sessionId)}/revoke` }, options);\n }\n\n /**\n * Unlock a user's password sign-in.\n *\n * Lift every block and throttle brute-force protection holds on the user's password sign-in: each\n * address blocked for the user after too many wrong passwords, and the account-wide throttle at\n * addresses the user is not known at (pontive-spec 04 Brute-force protection). The addresses the user\n * is known at are kept. An address blocked across accounts, for guessing at many, is the address's and\n * stays blocked; allowlist it in the password policy instead. Idempotent: 204 whether or not anything\n * was blocked. Recorded as user.signin_unblocked. Needs sys:user:manage. Unpaired: nothing locks an\n * account (route review D59).\n *\n * `POST /v1/users/{user}/unlock` (UnlockUser)\n */\n unlock(user: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"POST\", path: `/v1/users/${e(user)}/unlock` }, options);\n }\n\n /**\n * Update user.\n *\n * Update an existing user (partial update)\n *\n * `PATCH /v1/users/{user}` (UpdateUser)\n */\n update(user: string, body: T.UpdateUserRequest, options?: RequestOptions): APIPromise<T.User> {\n return this.core.request<T.User>({ host: \"api\", method: \"PATCH\", path: `/v1/users/${e(user)}`, body }, options);\n }\n}\n\n/**\n * Webhook subscriptions, their deliveries and the event types.\n */\nexport class Webhooks {\n /** @internal */\n constructor(protected readonly core: Core) {}\n\n /**\n * Create webhook subscription.\n *\n * Register an endpoint for event delivery. The Standard Webhooks signing secret (\"whsec_…\") is\n * returned ONLY in this response — store it now. Omit scope, or pass \"instance\", for a client\n * subscription; scope \"organization\" with organization_id creates an organization self-service\n * subscription, and scope \"workspace\" with workspace_id one of a workspace's webhooks in the Platform\n * Plane instance, which platform-management-api creates.\n *\n * `POST /v1/webhooks/subscriptions` (CreateWebhookSubscription)\n */\n createSubscription(body: T.CreateSubscriptionRequest, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions`, body }, options);\n }\n\n /**\n * Delete webhook subscription.\n *\n * `DELETE /v1/webhooks/subscriptions/{subscription_id}` (DeleteWebhookSubscription)\n */\n deleteSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<void> {\n return this.core.request<void>({ host: \"api\", method: \"DELETE\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}` }, options);\n }\n\n /**\n * Get endpoint activity.\n *\n * A subscription's requests and failures per interval: one bucket per hour or UTC day of the window,\n * oldest first, empty ones included. The window ends with the interval that holds now.\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}/activity` (GetWebhookActivity)\n */\n getActivity(subscriptionId: string, params?: T.GetWebhookActivityParams, options?: RequestOptions): APIPromise<T.Activity> {\n return this.core.request<T.Activity>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/activity`, query: params }, options);\n }\n\n /**\n * Get delivery.\n *\n * A token acting for a user through an actor (RFC 8693 act) sees the recorded request and response\n * headers' names with the value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}/deliveries/{delivery_id}` (GetWebhookDelivery)\n */\n getDelivery(subscriptionId: string, deliveryId: string, options?: RequestOptions): APIPromise<T.Delivery> {\n return this.core.request<T.Delivery>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/deliveries/${e(deliveryId)}` }, options);\n }\n\n /**\n * Get event.\n *\n * `GET /v1/webhooks/events/{event_id}` (GetWebhookEvent)\n */\n getEvent(eventId: string, options?: RequestOptions): APIPromise<T.Event> {\n return this.core.request<T.Event>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/events/${e(eventId)}` }, options);\n }\n\n /**\n * Get event type.\n *\n * `GET /v1/webhooks/event-types/{event_type_name}` (GetWebhookEventType)\n */\n getEventType(eventTypeName: string, options?: RequestOptions): APIPromise<T.EventType> {\n return this.core.request<T.EventType>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/event-types/${e(eventTypeName)}` }, options);\n }\n\n /**\n * Get webhook subscription.\n *\n * A token acting for a user through an actor (RFC 8693 act) sees each custom header's name with the\n * value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}` (GetWebhookSubscription)\n */\n getSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}` }, options);\n }\n\n /**\n * Get webhook usage.\n *\n * Billing-relevant delivery counters for a period (YYYY-MM; defaults to the current month).\n *\n * `GET /v1/webhooks/usage` (GetWebhookUsage)\n */\n getUsage(params?: T.GetWebhookUsageParams, options?: RequestOptions): APIPromise<T.Usage> {\n return this.core.request<T.Usage>({ host: \"api\", method: \"GET\", path: `/v1/webhooks/usage`, query: params }, options);\n }\n\n /**\n * List deliveries.\n *\n * List a subscription's delivery attempts (full request/response records), walked by cursor as the\n * events are (api-route-review D41). A token acting for a user through an actor (RFC 8693 act) sees\n * the recorded request and response headers' names with the value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions/{subscription_id}/deliveries` (ListWebhookDeliveries)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listDeliveries(subscriptionId: string, params?: T.ListWebhookDeliveriesParams, options?: RequestOptions): PagePromise<T.Delivery, T.ListDeliveriesResponse> {\n return this.core.page<T.Delivery, T.ListDeliveriesResponse>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/deliveries`, query: params }, options);\n }\n\n /**\n * List event types.\n *\n * List system and custom event types.\n *\n * `GET /v1/webhooks/event-types` (ListWebhookEventTypes)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEventTypes(params?: T.ListWebhookEventTypesParams, options?: RequestOptions): PagePromise<T.EventType, T.ListEventTypesResponse> {\n return this.core.page<T.EventType, T.ListEventTypesResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/event-types`, query: params }, options);\n }\n\n /**\n * List events.\n *\n * Query events for inspection, walked by cursor (api-route-review D41): newest first, next_cursor\n * passed as before to page back (null at the end), or as after to poll for what was created since,\n * oldest first.\n *\n * `GET /v1/webhooks/events` (ListWebhookEvents)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listEvents(params?: T.ListWebhookEventsParams, options?: RequestOptions): PagePromise<T.Event, T.ListEventsResponse> {\n return this.core.page<T.Event, T.ListEventsResponse>(\"cursor\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/events`, query: params }, options);\n }\n\n /**\n * List webhook subscriptions.\n *\n * List webhook subscriptions with filtering and pagination. A token acting for a user through an actor\n * (RFC 8693 act) sees each custom header's name with the value \"••••••\".\n *\n * `GET /v1/webhooks/subscriptions` (ListWebhookSubscriptions)\n *\n * Await it for the first page, or iterate it with `for await` for every item across pages.\n */\n listSubscriptions(params?: T.ListWebhookSubscriptionsParams, options?: RequestOptions): PagePromise<T.Subscription, T.ListSubscriptionsResponse> {\n return this.core.page<T.Subscription, T.ListSubscriptionsResponse>(\"page\", { host: \"api\", method: \"GET\", path: `/v1/webhooks/subscriptions`, query: params }, options);\n }\n\n /**\n * Pause webhook subscription.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/pause` (PauseWebhookSubscription)\n */\n pauseSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/pause` }, options);\n }\n\n /**\n * Resume webhook subscription.\n *\n * Reactivate a paused, failing, or disabled subscription.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/resume` (ResumeWebhookSubscription)\n */\n resumeSubscription(subscriptionId: string, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/resume` }, options);\n }\n\n /**\n * Resend delivery.\n *\n * Resend the event, from its newest attempt. A failed, errored or succeeded attempt gets a fresh\n * attempt sent now, and its retried_by is set to it. A pending attempt, a scheduled retry, is sent now\n * instead of at its due time and keeps its place on the retry schedule. An attempt being sent, or one\n * that already has a successor, answers 409.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/deliveries/{delivery_id}/retry`\n * (RetryWebhookDelivery)\n */\n retryDelivery(subscriptionId: string, deliveryId: string, options?: RequestOptions): APIPromise<T.Delivery> {\n return this.core.request<T.Delivery>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/deliveries/${e(deliveryId)}/retry` }, options);\n }\n\n /**\n * Rotate webhook signing secret.\n *\n * Mint a new Standard Webhooks signing secret. The previous secret keeps signing beside the new one\n * for expire_previous_in seconds (0 to 604800, default 86400; 0 ends it now): during the overlap each\n * delivery's webhook-signature header carries one signature per secret, so subscribers rotate with\n * zero downtime. The NEW plaintext secret is returned only here.\n *\n * `POST /v1/webhooks/subscriptions/{subscription_id}/rotate-secret` (RotateWebhookSecret)\n */\n rotateSecret(subscriptionId: string, body?: T.RotateSecretRequest, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"POST\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}/rotate-secret`, body }, options);\n }\n\n /**\n * Update webhook subscription.\n *\n * Patch mutable fields (url, description, event_types, headers, metadata). A token acting for a user\n * through an actor (RFC 8693 act) may not set headers (403 actor_refused: custom headers can hold\n * credentials) and sees them masked (\"••••••\") in the response.\n *\n * `PATCH /v1/webhooks/subscriptions/{subscription_id}` (UpdateWebhookSubscription)\n */\n updateSubscription(subscriptionId: string, body: T.UpdateSubscriptionRequest, options?: RequestOptions): APIPromise<T.Subscription> {\n return this.core.request<T.Subscription>({ host: \"api\", method: \"PATCH\", path: `/v1/webhooks/subscriptions/${e(subscriptionId)}`, body }, options);\n }\n}\n\n","import { managementAudience, managementBase } from \"../management-credential\";\nimport { processEnv, type Env } from \"../env\";\nimport { Core, tokenSource, type Host } from \"./core\";\nimport { PontiveNamespaces } from \"./generated/namespaces\";\n\n/**\n * How a {@link Pontive} client authenticates and where it sends its calls.\n * Every field is optional: one left out falls back to its environment\n * variable, so `new Pontive()` works with `PONTIVE_SECRET_KEY` set.\n */\nexport interface PontiveOptions {\n /** The instance's secret key, `pontive_sk_…`. Default: `PONTIVE_SECRET_KEY`. */\n secretKey?: string;\n /**\n * A bearer token, or a function returning one, for a caller that manages\n * its own: a management token, or a user's me token for `pontive.me`.\n */\n token?: string | (() => string | Promise<string>);\n /** A service account's client id; with `clientSecret`, exchanged at `issuer` for a management token. */\n clientId?: string;\n /** A service account's client secret. */\n clientSecret?: string;\n /**\n * The instance's issuer: where client credentials are exchanged, and the\n * auth domain that serves `pontive.me` (the signed-in user's own routes,\n * called with that user's me token). Default: `PONTIVE_ISSUER`.\n */\n issuer?: string;\n /**\n * The instance's region (`us`, `eu`, `au`): it picks `api.{region}.pontive.com`\n * and its `authz.` and `ingest.` hosts. Default: the region a secret key\n * names, then `PONTIVE_REGION`, then the region in the issuer's host.\n */\n region?: string;\n /** Overrides the management API's base, for a proxy or a non-production Pontive. Default: `PONTIVE_MANAGEMENT_URL`. */\n managementUrl?: string;\n /** Overrides the authorization host. Default: `managementUrl` with its `api.` label replaced by `authz.`. */\n authzUrl?: string;\n /** Overrides the usage ingestion host. Default: `managementUrl` with its `api.` label replaced by `ingest.`. */\n ingestUrl?: string;\n /** Sent as `X-Pontive-Instance-ID`; a secret key names its own instance and needs none. Default: `PONTIVE_INSTANCE_ID`. */\n instanceId?: string;\n /** How many times a failed call is retried: a 429, a 5xx or a network error, when it is safe to repeat. Default 2. */\n maxRetries?: number;\n /** Milliseconds each attempt may take. Default 60000. */\n timeout?: number;\n /** The `fetch` to send with. Default: the global one. */\n fetch?: typeof fetch;\n /** The environment to fall back to. Default: `process.env`. */\n env?: Env;\n}\n\n/** The region a secret key names: `pontive_sk_live_us_…` → `us`. */\nexport function secretKeyRegion(key: string): string | undefined {\n return /^pontive_sk_(?:test|live)_([a-z0-9]+)_/.exec(key.trim())?.[1];\n}\n\nfunction issuerRegion(issuer: string | undefined): string | undefined {\n if (!issuer) return undefined;\n try {\n return /(?:^|\\.)auth\\.([a-z0-9]+)\\./i.exec(new URL(issuer).hostname)?.[1]?.toLowerCase();\n } catch {\n return undefined;\n }\n}\n\n/** `base` with its leading `api.` label replaced: the authz and ingest hosts beside the management API. */\nfunction sibling(base: string, label: string): string {\n try {\n const url = new URL(base);\n if (!url.hostname.toLowerCase().startsWith(\"api.\")) return base;\n url.hostname = `${label}.${url.hostname.slice(4)}`;\n return url.origin;\n } catch {\n return base;\n }\n}\n\nfunction origin(url: string | undefined): string {\n if (!url) return \"\";\n try {\n return new URL(url).origin;\n } catch {\n return \"\";\n }\n}\n\nconst trim = (v: string | undefined): string | undefined => (v && v.trim() ? v.trim() : undefined);\nconst trimSlash = (v: string): string => v.replace(/\\/+$/, \"\");\n\nfunction inBrowser(): boolean {\n const g = globalThis as { window?: unknown; document?: unknown };\n return typeof g.window !== \"undefined\" && typeof g.document !== \"undefined\";\n}\n\n/**\n * A client for Pontive's management API, and its authorization and usage\n * ingestion hosts. Namespaces follow the API: `pontive.users`,\n * `pontive.organizations`, `pontive.billing.invoices`, …; method names follow\n * its operation ids.\n *\n * ```ts\n * const pontive = new Pontive({ secretKey: process.env.PONTIVE_SECRET_KEY });\n * const user = await pontive.users.get(\"usr_…\");\n * for await (const org of pontive.organizations.list()) console.log(org.name);\n * ```\n *\n * Server-side only: a secret key or client secret never belongs in a browser,\n * and the constructor refuses one there.\n */\nexport class Pontive extends PontiveNamespaces {\n constructor(options: PontiveOptions = {}) {\n const env = options.env ?? processEnv();\n const secretKey = options.secretKey ?? trim(env.PONTIVE_SECRET_KEY);\n const issuer = options.issuer ?? trim(env.PONTIVE_ISSUER);\n const hasClientCredentials = !!(options.clientId && options.clientSecret);\n if (!options.token && !secretKey && !hasClientCredentials) {\n throw new Error(\"pontive: no credential: pass secretKey, token, or clientId and clientSecret, or set PONTIVE_SECRET_KEY\");\n }\n if ((secretKey || options.clientSecret) && inBrowser()) {\n throw new Error(\"pontive: a secret key or client secret must never reach a browser; call the management API from your server\");\n }\n if (!options.token && !secretKey && !issuer) {\n throw new Error(\"pontive: client credentials need the issuer to exchange them at: pass issuer or set PONTIVE_ISSUER\");\n }\n\n let managementUrl = options.managementUrl ?? trim(env.PONTIVE_MANAGEMENT_URL);\n if (!managementUrl) {\n const region =\n options.region ??\n (secretKey && !options.token ? secretKeyRegion(secretKey) : undefined) ??\n trim(env.PONTIVE_REGION) ??\n issuerRegion(issuer);\n if (region) managementUrl = `https://api.${region}.pontive.com`;\n // A me token for pontive.me on a custom auth domain needs no region.\n else if (!(options.token && issuer)) {\n throw new Error(\"pontive: no region: pass region or managementUrl, or use a secret key, which names its region\");\n }\n }\n const base = managementUrl ? managementBase(managementUrl) : \"\";\n const hosts: Record<Host, string> = {\n api: base,\n authz: options.authzUrl ? trimSlash(options.authzUrl) : base && sibling(base, \"authz\"),\n ingest: options.ingestUrl ? trimSlash(options.ingestUrl) : base && sibling(base, \"ingest\"),\n auth: origin(issuer),\n };\n const fetchImpl = options.fetch ?? globalThis.fetch.bind(globalThis);\n const tokens = tokenSource({\n token: options.token ?? secretKey,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n issuer,\n audience: managementAudience(base),\n fetch: fetchImpl,\n });\n super(\n new Core({\n hosts,\n token: tokens.token,\n invalidate: tokens.invalidate,\n instanceId: options.instanceId ?? trim(env.PONTIVE_INSTANCE_ID),\n maxRetries: Math.max(options.maxRetries ?? 2, 0),\n timeout: options.timeout ?? 60_000,\n fetch: fetchImpl,\n }),\n );\n }\n}\n"],"names":["PONTIVE_ENV","processEnv","nonEmpty","value","withEnvFallback","config","env","isDevelopment","keylessApplies","PontiveAPIError","status","headers","body","str","v","code","requestId","message","Kind","STATUS","InternalServerError","BadRequestError","AuthenticationError","PermissionDeniedError","NotFoundError","ConflictError","PreconditionFailedError","UnprocessableEntityError","RateLimitError","PontiveConnectionError","options","VERSION","MAX_RETRY_WAIT_MS","Core","req","APIPromise","kind","load","query","data","response","Page","next","PagePromise","retries","idempotencyKey","repeatable","host","url","queryString","sleep","ms","r","reauthed","attempt","k","timeout","signal","res","err","backoff","decode","errBody","readBody","retryable","q","item","s","binary","text","ra","secs","at","result","onfulfilled","onrejected","onfinally","p","page","tokenSource","input","token","cached","pending","clientCredentialsToken","e","PontiveNamespaces","core","AccessKeys","Agents","Apis","Apps","Authn","Authz","Billing","Branding","Capabilities","Countries","Delegations","Groups","Logs","Me","Organizations","PersonalAccessTokens","Resources","Root","ServiceAccounts","UserImports","Users","Webhooks","accessKeyId","params","agentId","secretId","credentialId","organizationId","keyId","apiId","appId","if_match","AuthnAccountLinking","AuthnAuthflows","AuthnConnections","AuthnIdentityPolicy","AuthnMigrationSources","AuthnPasswordPolicy","AuthnSharedCredentials","AuthnTrustedIssuers","authflowId","connectionSlug","migrationSourceId","trustedIssuerId","AuthzModel","AuthzPermissions","AuthzResourceTypes","AuthzRoles","resourceType","permissionKey","roleKey","BillingCatalog","BillingCatalogRules","BillingCheckoutSessions","BillingContracts","BillingCreditNotes","BillingCurrencies","BillingCustomers","BillingDisputes","BillingDunning","BillingEntitlements","BillingEventTypes","BillingEvents","BillingExchangeRates","BillingFeatures","BillingGrants","BillingInvoices","BillingLedger","BillingMeters","BillingPackages","BillingPaymentConnections","BillingPaymentMethods","BillingPayments","BillingPricingUnits","BillingProducts","BillingRateCards","BillingRefunds","BillingSettings","BillingTax","BillingTimeMachines","BillingUsage","checkoutSessionId","contractId","editId","creditNoteId","customerId","disputeId","eventType","eventId","from","to","date","feature","grantId","invoiceId","unit","meter","package_","paymentConnectionId","paymentMethodId","paymentId","pricingUnit","product","rateCard","rateId","refundId","timeMachineId","BrandingBlueprints","BrandingLocalization","blueprintId","CapabilitiesBilling","CapabilitiesFga","delegationId","groupId","userId","auditLogEntryId","MeBilling","containerId","organization","installationId","invitationId","source","externalId","personalAccessTokenId","resourceId","serviceAccountId","userImportId","user","sessionId","subscriptionId","deliveryId","eventTypeName","secretKeyRegion","key","issuerRegion","issuer","sibling","base","label","origin","trim","trimSlash","inBrowser","g","Pontive","secretKey","hasClientCredentials","managementUrl","region","managementBase","hosts","fetchImpl","tokens","managementAudience"],"mappings":";AAqBO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACX;AAKO,SAASC,IAAkB;AAChC,MAAI;AACF,WAAQ,WAA2C,SAAS,OAAO,CAAA;AAAA,EACrE,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACF;AAEA,MAAMC,IAAW,CAACC,MAAmDA,KAASA,EAAM,SAASA,EAAM,KAAA,IAAS;AAGrG,SAASC,GAAgBC,GAA0BC,IAAWL,KAAgC;AACnG,SAAO;AAAA,IACL,GAAGI;AAAA,IACH,QAAQA,EAAO,UAAUH,EAASI,EAAIN,EAAY,MAAM,CAAC;AAAA,IACzD,UAAUK,EAAO,YAAYH,EAASI,EAAIN,EAAY,QAAQ,CAAC;AAAA,IAC/D,cAAcK,EAAO,gBAAgBH,EAASI,EAAIN,EAAY,YAAY,CAAC;AAAA,IAC3E,eAAeK,EAAO,iBAAiBH,EAASI,EAAIN,EAAY,aAAa,CAAC;AAAA,EAAA;AAElF;AAGO,SAASO,EAAcD,IAAWL,KAAuB;AAC9D,SAAOK,EAAI,aAAa;AAC1B;AAQO,SAASE,GAAeH,GAA0BC,IAAWL,KAAuB;AACzF,SAAOM,EAAcD,CAAG,KAAK,CAACD,EAAO,UAAUC,EAAIN,EAAY,OAAO,GAAG,KAAA,MAAW;AACtF;AChDO,MAAMS,UAAwB,MAAM;AAAA;AAAA,EAEhC;AAAA;AAAA,EAEA;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