@didit-protocol/sdk-node 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/errors.ts","../src/core/api-promise.ts","../src/core/dates.ts","../src/core/version.ts","../src/core/runtime.ts","../src/core/logger.ts","../src/core/pagination.ts","../src/core/uploads.ts","../src/core/api-client.ts","../src/resources/date-plans.ts","../src/core/resource.ts","../src/resources/account.ts","../src/resources/address-validation.ts","../src/resources/age-estimation.ts","../src/resources/aml.ts","../src/resources/aml-monitoring.ts","../src/resources/analytics.ts","../src/resources/bank.ts","../src/resources/billing.ts","../src/resources/biometric-templates.ts","../src/resources/blocklist.ts","../src/resources/business-sessions.ts","../src/resources/businesses.ts","../src/resources/cases.ts","../src/resources/customization.ts","../src/resources/database-validation.ts","../src/resources/document-ai.ts","../src/resources/email.ts","../src/resources/face-match.ts","../src/resources/face-search.ts","../src/resources/fraud-checks.ts","../src/resources/id-verification.ts","../src/resources/id-wallets.ts","../src/resources/investigator.ts","../src/resources/ip.ts","../src/resources/kyb.ts","../src/resources/lists.ts","../src/resources/monitoring-events.ts","../src/resources/networks.ts","../src/resources/passive-liveness.ts","../src/resources/phone.ts","../src/resources/pricing.ts","../src/resources/proof-of-address.ts","../src/resources/questionnaires.ts","../src/resources/regulatory-reports.ts","../src/resources/report-templates.ts","../src/resources/sessions.ts","../src/resources/transactions.ts","../src/resources/travel-rule.ts","../src/resources/users.ts","../src/resources/wallet-screening.ts","../src/webhooks/json.ts","../src/webhooks/canonical.ts","../src/webhooks/events.ts","../src/webhooks/verify.ts","../src/webhooks/resource.ts","../src/resources/webhooks.ts","../src/resources/workflows.ts","../src/resources/index.ts","../src/client.ts","../src/webhooks/index.ts","../src/authentication/encoding.ts","../src/authentication/jwt.ts","../src/authentication/cache.ts","../src/authentication/http.ts","../src/authentication/issuer.ts","../src/authentication/client.ts","../src/authentication/pkce.ts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eAAA,CAAgB,IAAI,UAAA,CAAW,MAAM,CAAC,CAAA;AAC/C;AAGA,eAAsB,UAAA,GAAgC;AACpD,EAAA,MAAM,YAAA,GAAe,MAAM,WAAA,EAAY;AACvC,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA,aAAA,EAAe,MAAM,aAAA,CAAc,YAAY,CAAA;AAAA,IAC/C,mBAAA,EAAqB;AAAA,GACvB;AACF;AAOO,SAAS,WAAA,GAA+B;AAC7C,EAAA,OAAO,WAAA,EAAY;AACrB;AAOO,SAAS,WAAA,GAA+B;AAC7C,EAAA,OAAO,WAAA,EAAY;AACrB;;;ACnDA,IAAO,aAAA,GAAQ","file":"index.cjs","sourcesContent":["// The errors the SDK throws (docs/DESIGN.md section 7). Every one extends\n// DiditError, so `err instanceof DiditError` catches all of them.\n\n/** Base class of every error this SDK throws. */\nexport class DiditError extends Error {\n override name = \"DiditError\";\n}\n\n/**\n * The SDK is configured wrongly: no API key, no organization or application id\n * for an application-scoped method, an empty webhook secret, an invalid option.\n * Thrown before any request is sent.\n */\nexport class ConfigurationError extends DiditError {\n override name = \"ConfigurationError\";\n}\n\n/** No response arrived: DNS, TCP, TLS or the connection broke. */\nexport class APIConnectionError extends DiditError {\n override name = \"APIConnectionError\";\n\n constructor(message = \"Connection error.\", options?: { cause?: unknown }) {\n super(message, options);\n }\n}\n\n/** The request took longer than the timeout. */\nexport class APITimeoutError extends APIConnectionError {\n override name = \"APITimeoutError\";\n\n constructor(message = \"Request timed out.\", options?: { cause?: unknown }) {\n super(message, options);\n }\n}\n\n/**\n * A 2xx response the SDK cannot use: a body that is not the JSON the API\n * promises, or a pagination link to another origin.\n */\nexport class APIResponseValidationError extends DiditError {\n override name = \"APIResponseValidationError\";\n /** The HTTP status code. */\n readonly status: number;\n /** The response headers. */\n readonly headers: Headers;\n /** The request id the API returned, when it returned one. */\n readonly requestId: string | null;\n\n constructor(message: string, status: number, headers: Headers, options?: { cause?: unknown }) {\n super(message, options);\n this.status = status;\n this.headers = headers;\n this.requestId = requestIdOf(headers);\n }\n}\n\n/** The API answered with a status outside 2xx. */\nexport class APIStatusError extends DiditError {\n override name = \"APIStatusError\";\n /** The HTTP status code. */\n readonly status: number;\n /** The parsed JSON body when the response was JSON, else its text, else `null`. */\n readonly body: unknown;\n /** The response headers. */\n readonly headers: Headers;\n /**\n * The request id the API returned (a request id header, else the body's\n * `request_id`), when it returned one. Quote it to support.\n */\n readonly requestId: string | null;\n\n constructor(message: string, status: number, body: unknown, headers: Headers) {\n const requestId = requestIdOf(headers) ?? bodyRequestId(body);\n super(requestId ? `${message} (request id ${requestId})` : message);\n this.status = status;\n this.body = body;\n this.headers = headers;\n this.requestId = requestId;\n }\n}\n\n/** HTTP 400. */\nexport class BadRequestError extends APIStatusError {\n override name = \"BadRequestError\";\n}\n\n/** HTTP 401: the API key is missing, wrong, revoked or expired. */\nexport class AuthenticationError extends APIStatusError {\n override name = \"AuthenticationError\";\n}\n\n/** HTTP 403: the key has no access to this resource or action. */\nexport class PermissionDeniedError extends APIStatusError {\n override name = \"PermissionDeniedError\";\n}\n\n/** HTTP 404. */\nexport class NotFoundError extends APIStatusError {\n override name = \"NotFoundError\";\n}\n\n/** HTTP 409. */\nexport class ConflictError extends APIStatusError {\n override name = \"ConflictError\";\n}\n\n/** HTTP 422. */\nexport class UnprocessableEntityError extends APIStatusError {\n override name = \"UnprocessableEntityError\";\n}\n\n/** HTTP 429. */\nexport class RateLimitError extends APIStatusError {\n override name = \"RateLimitError\";\n}\n\n/** HTTP 5xx. */\nexport class InternalServerError extends APIStatusError {\n override name = \"InternalServerError\";\n}\n\n/** Why a webhook delivery failed verification (docs/DESIGN.md section 9.3). */\nexport type WebhookVerificationReason =\n | \"missing_signature\"\n | \"invalid_signature\"\n | \"missing_timestamp\"\n | \"timestamp_mismatch\"\n | \"timestamp_out_of_tolerance\"\n | \"invalid_payload\";\n\n/**\n * A webhook delivery failed verification. Do not act on it. `reason` is machine\n * readable.\n */\nexport class WebhookVerificationError extends DiditError {\n override name = \"WebhookVerificationError\";\n readonly reason: WebhookVerificationReason;\n\n constructor(reason: WebhookVerificationReason, message: string) {\n super(message);\n this.reason = reason;\n }\n}\n\n/** Why an Authentication token failed verification (docs/DESIGN.md section 10). */\nexport type TokenVerificationReason =\n | \"malformed\"\n | \"unsupported_algorithm\"\n | \"invalid_type\"\n | \"unknown_key\"\n | \"invalid_signature\"\n | \"invalid_issuer\"\n | \"invalid_audience\"\n | \"expired\"\n | \"not_yet_valid\"\n | \"invalid_issued_at\"\n | \"invalid_nonce\"\n | \"missing_claim\";\n\n/**\n * An access token or ID token failed verification: do not trust any of its\n * claims. `reason` is machine readable. The message never contains the token.\n */\nexport class TokenVerificationError extends DiditError {\n override name = \"TokenVerificationError\";\n readonly reason: TokenVerificationReason;\n\n constructor(reason: TokenVerificationReason, message: string) {\n super(message);\n this.reason = reason;\n }\n}\n\nconst REQUEST_ID_HEADERS = [\"x-request-id\", \"request-id\", \"x-amzn-requestid\", \"x-correlation-id\"];\n\n/** The request id from the first of the usual request id headers that is set. */\nexport function requestIdOf(headers: Headers): string | null {\n for (const name of REQUEST_ID_HEADERS) {\n const value = headers.get(name);\n if (value) return value;\n }\n return null;\n}\n\n/** The `request_id` many API error bodies carry, when there is no request id header. */\nfunction bodyRequestId(body: unknown): string | null {\n const value = isRecord(body) ? body.request_id : undefined;\n return typeof value === \"string\" && value ? value : null;\n}\n\ntype StatusErrorClass = new (\n message: string,\n status: number,\n body: unknown,\n headers: Headers,\n) => APIStatusError;\n\nconst STATUS_ERRORS: Record<number, StatusErrorClass> = {\n 400: BadRequestError,\n 401: AuthenticationError,\n 403: PermissionDeniedError,\n 404: NotFoundError,\n 409: ConflictError,\n 422: UnprocessableEntityError,\n 429: RateLimitError,\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction fieldErrors(body: Record<string, unknown>): string[] {\n const parts: string[] = [];\n for (const [key, value] of Object.entries(body).slice(0, 5)) {\n if (Array.isArray(value) && typeof value[0] === \"string\") parts.push(`${key}: ${value[0]}`);\n else if (typeof value === \"string\") parts.push(`${key}: ${value}`);\n }\n return parts;\n}\n\nfunction errorDetail(body: unknown): string | null {\n if (isRecord(body)) {\n const { error, error_description: description } = body;\n if (typeof error === \"string\" && error && typeof description === \"string\" && description) {\n // OAuth 2.0 errors (RFC 6749 section 5.2): the code and what it means.\n return `${error}: ${description}`;\n }\n for (const key of [\"detail\", \"message\", \"error\", \"error_description\"]) {\n const value = body[key];\n if (typeof value === \"string\" && value) return value;\n }\n const parts = fieldErrors(body);\n return parts.length ? parts.join(\"; \") : null;\n }\n if (Array.isArray(body) && body.length && body.every((x) => typeof x === \"string\")) {\n return body.join(\"; \");\n }\n if (typeof body === \"string\" && body.trim() && body.length <= 500) return body.trim();\n return null;\n}\n\n/** A secret as it may be echoed back: as sent, percent-encoded, or form-encoded. */\nfunction spellings(secret: string): string[] {\n const out = new Set([secret]);\n try {\n out.add(encodeURIComponent(secret));\n out.add(new URLSearchParams({ s: secret }).toString().slice(2));\n } catch {\n // A lone surrogate has no encoded form.\n }\n return [...out];\n}\n\n/** Replace every occurrence of a secret in the strings and keys of `value`. */\nexport function redact<T>(value: T, secrets: readonly string[]): T {\n // Longest first, so a secret is never left half replaced by a shorter spelling.\n const active = secrets\n .filter((s) => s.length > 0)\n .flatMap(spellings)\n .sort((a, b) => b.length - a.length);\n if (!active.length) return value;\n const text = (input: string): string => {\n let out = input;\n for (const secret of active) out = out.split(secret).join(\"[redacted]\");\n return out;\n };\n const scrub = (input: unknown): unknown => {\n if (typeof input === \"string\") return text(input);\n if (Array.isArray(input)) return input.map(scrub);\n if (isRecord(input)) {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(input)) out[text(k)] = scrub(v);\n return out;\n }\n return input;\n };\n return scrub(value) as T;\n}\n\n/** A copy of `headers` with every secret replaced (a server may echo a credential in a header). */\nexport function redactHeaders(headers: Headers, secrets: readonly string[]): Headers {\n const out = new Headers();\n headers.forEach((value, name) => {\n out.append(name, redact(value, secrets));\n });\n return out;\n}\n\n/**\n * The right APIStatusError subclass for a non-2xx response. Secrets (the API key,\n * tokens) are removed from the message, the body and the headers.\n */\nexport function makeStatusError(\n status: number,\n body: unknown,\n headers: Headers,\n secrets: readonly string[] = [],\n): APIStatusError {\n const cleanBody = redact(body, secrets);\n const detail = errorDetail(cleanBody);\n const message = detail ? `HTTP ${status}: ${detail}` : `HTTP ${status}`;\n const ErrorClass =\n STATUS_ERRORS[status] ?? (status >= 500 ? InternalServerError : APIStatusError);\n return new ErrorClass(message, status, cleanBody, redactHeaders(headers, secrets));\n}\n","import { requestIdOf } from \"./errors.js\";\n\n/** A response that arrived and is not yet read. */\nexport interface RawResponse {\n response: Response;\n /** Stop the request timeout; called once the body is read. */\n done(): void;\n /** Whether the request timeout fired (it also covers reading the body). */\n timedOut(): boolean;\n}\n\n/** The parsed value together with the HTTP response it came from. */\nexport interface WithResponse<T> {\n data: T;\n /** The HTTP response (status, headers). Its body has been read. */\n response: Response;\n /** The request id the API returned, when it returned one. Quote it to support. */\n requestId: string | null;\n}\n\n/**\n * The result of every API method: a Promise of the parsed response, with access\n * to the raw HTTP response (docs/DESIGN.md section 7).\n *\n * ```ts\n * const session = await didit.sessions.create({ workflow_id });\n * const { data, response, requestId } = await didit.sessions.create({ workflow_id }).withResponse();\n * const raw = await didit.sessions.create({ workflow_id }).asResponse();\n * ```\n */\nexport class APIPromise<T> extends Promise<T> {\n readonly #raw: Promise<RawResponse>;\n readonly #parse: (raw: RawResponse) => Promise<T>;\n #parsed: Promise<WithResponse<T>> | undefined;\n\n constructor(raw: Promise<RawResponse>, parse: (raw: RawResponse) => Promise<T>) {\n super((resolve) => {\n // The base promise is never observed: then/catch/finally use the parsed one.\n resolve(undefined as T);\n });\n this.#raw = raw;\n this.#parse = parse;\n // The request may fail before anyone awaits it; that is reported when they do.\n raw.catch(() => undefined);\n }\n\n // Promise methods that build a new promise use the plain Promise class.\n static override get [Symbol.species](): PromiseConstructor {\n return Promise;\n }\n\n /** The raw HTTP response, unread: for streaming a body or reading headers only. */\n asResponse(): Promise<Response> {\n return this.#raw.then((raw) => {\n raw.done();\n return raw.response;\n });\n }\n\n /** The parsed value, the HTTP response and its request id. */\n withResponse(): Promise<WithResponse<T>> {\n this.#parsed ??= this.#raw.then(async (raw) => {\n const data = await this.#parse(raw);\n return { data, response: raw.response, requestId: requestIdOf(raw.response.headers) };\n });\n return this.#parsed;\n }\n\n override then<R1 = T, R2 = never>(\n onfulfilled?: ((value: T) => R1 | PromiseLike<R1>) | null,\n onrejected?: ((reason: unknown) => R2 | PromiseLike<R2>) | null,\n ): Promise<R1 | R2> {\n return this.withResponse()\n .then((r) => r.data)\n .then(onfulfilled, onrejected);\n }\n\n override catch<R = never>(\n onrejected?: ((reason: unknown) => R | PromiseLike<R>) | null,\n ): Promise<T | R> {\n return this.then(undefined, onrejected);\n }\n\n override finally(onfinally?: (() => void) | null): Promise<T> {\n return this.then().finally(onfinally);\n }\n}\n","// Date-time strings in responses become `Date` objects (docs/DESIGN.md section\n// 5.1). The generator records where a response has date-times as a small plan,\n// so nothing else in the response is touched.\n\n/**\n * `1` this value is a date-time; a string, the plan of that named type; `s` this\n * value is one when it is a string; `p` object properties; `i` array items; `a`\n * the values of a map.\n */\nexport type DatePlan =\n 1 | string | { s?: 1; p?: Record<string, DatePlan>; i?: DatePlan; a?: DatePlan };\n\n// RFC 3339 / ISO 8601 date-time, as the API writes them: mostly with a time\n// zone, but some fields (AML hit dates, NFC certificate dates) come without one.\nconst DATE_TIME =\n /^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?([Zz]|[+-]\\d{2}:?\\d{2})?$/;\n\nfunction toDate(value: string): Date | string {\n const match = DATE_TIME.exec(value);\n if (!match) return value;\n // A date-time without a zone is read as UTC, the zone the API works in\n // (JavaScript would otherwise read it in the host's local time zone).\n const date = new Date(value.replace(\" \", \"T\") + (match[1] ? \"\" : \"Z\"));\n return Number.isNaN(date.getTime()) ? value : date;\n}\n\n/**\n * A copy-free conversion: date-time strings named by `plan` are replaced in\n * place by `Date` objects. A value that is not a valid date-time is left as it is.\n */\nexport function decodeDates(\n value: unknown,\n plan: DatePlan | undefined,\n named: Readonly<Record<string, DatePlan>>,\n depth = 0,\n): unknown {\n if (plan === undefined || value === null || value === undefined || depth > 64) return value;\n let node = plan;\n // A chain of names resolves to its plan; an unknown name means nothing to decode.\n for (let hops = 0; typeof node === \"string\"; hops++) {\n const next: DatePlan | undefined = named[node];\n if (next === undefined || hops > 16) return value;\n node = next;\n }\n if (typeof value === \"string\") {\n return node === 1 || node.s === 1 ? toDate(value) : value;\n }\n if (node === 1) return value;\n if (Array.isArray(value)) {\n if (node.i !== undefined) {\n for (let i = 0; i < value.length; i++)\n value[i] = decodeDates(value[i], node.i, named, depth + 1);\n }\n return value;\n }\n if (typeof value === \"object\") {\n const record = value as Record<string, unknown>;\n if (node.p) {\n for (const [key, child] of Object.entries(node.p)) {\n if (Object.prototype.hasOwnProperty.call(record, key)) {\n record[key] = decodeDates(record[key], child, named, depth + 1);\n }\n }\n }\n if (node.a !== undefined) {\n for (const key of Object.keys(record)) {\n record[key] = decodeDates(record[key], node.a, named, depth + 1);\n }\n }\n }\n return value;\n}\n","// Updated by release-please (release-please-config.json, extra-files).\nexport const VERSION = \"1.0.0\"; // x-release-please-version\n","// What the SDK needs from the JavaScript runtime it runs on: environment\n// variables, the runtime's name for the User-Agent header, and Web Crypto.\n// Only web platform APIs are used, so the same code runs on Node.js, Bun, Deno\n// and edge runtimes (Cloudflare Workers, Vercel Edge).\n\nimport { DiditError } from \"./errors.js\";\nimport { VERSION } from \"./version.js\";\n\ninterface ProcessLike {\n env?: Record<string, string | undefined>;\n versions?: Record<string, string | undefined>;\n version?: string;\n platform?: string;\n}\n\ninterface DenoLike {\n env?: { get?: (name: string) => string | undefined };\n version?: { deno?: string };\n build?: { os?: string };\n}\n\nfunction processLike(): ProcessLike | undefined {\n const value = (globalThis as { process?: unknown }).process;\n return typeof value === \"object\" && value !== null ? value : undefined;\n}\n\nfunction denoLike(): DenoLike | undefined {\n const value = (globalThis as { Deno?: unknown }).Deno;\n return typeof value === \"object\" && value !== null ? value : undefined;\n}\n\n/**\n * An environment variable, trimmed, or `undefined` when it is not set, empty,\n * or the runtime has no environment (or denies access to it).\n */\nexport function readEnv(name: string): string | undefined {\n let value: string | undefined;\n try {\n value = processLike()?.env?.[name] ?? denoLike()?.env?.get?.(name);\n } catch {\n // Deno without --allow-env throws; treat it as unset.\n return undefined;\n }\n // An empty value counts as unset.\n return value?.trim() || undefined;\n}\n\nexport interface RuntimeInfo {\n /** `node`, `bun`, `deno`, `workerd`, `edge-runtime` or `unknown`. */\n name: string;\n version: string;\n os: string;\n}\n\nlet cachedRuntime: RuntimeInfo | undefined;\n\n/** The runtime this code is running on, for the User-Agent header. */\nexport function runtimeInfo(): RuntimeInfo {\n if (cachedRuntime) return cachedRuntime;\n const proc = processLike();\n const deno = denoLike();\n const nav = (globalThis as { navigator?: { userAgent?: unknown } }).navigator;\n let info: RuntimeInfo;\n if (proc?.versions?.bun) {\n info = { name: \"bun\", version: proc.versions.bun, os: proc.platform ?? \"unknown\" };\n } else if (deno?.version?.deno) {\n info = { name: \"deno\", version: deno.version.deno, os: deno.build?.os ?? \"unknown\" };\n } else if (typeof (globalThis as { EdgeRuntime?: unknown }).EdgeRuntime === \"string\") {\n info = { name: \"edge-runtime\", version: \"unknown\", os: \"unknown\" };\n } else if (nav?.userAgent === \"Cloudflare-Workers\") {\n info = { name: \"workerd\", version: \"unknown\", os: \"unknown\" };\n } else if (proc?.versions?.node) {\n info = { name: \"node\", version: proc.versions.node, os: proc.platform ?? \"unknown\" };\n } else {\n info = { name: \"unknown\", version: \"unknown\", os: \"unknown\" };\n }\n cachedRuntime = info;\n return info;\n}\n\n/** `didit-node/<version> (<runtime> <version>; <os>)` (docs/DESIGN.md section 6). */\nexport function userAgent(): string {\n const { name, version, os } = runtimeInfo();\n return `didit-node/${VERSION} (${name} ${version}; ${os})`;\n}\n\n/** `node/<version>`, the value of the X-Didit-Client header. */\nexport function clientHeader(): string {\n return `node/${VERSION}`;\n}\n\nlet cachedCrypto: Promise<Crypto> | undefined;\n\n/**\n * Web Crypto. It is a global on every supported runtime except Node.js 18,\n * where it comes from `node:crypto`. The module name is computed so that\n * bundlers for edge runtimes do not try to resolve it.\n */\nexport function webCrypto(): Promise<Crypto> {\n if (cachedCrypto) return cachedCrypto;\n const global = (globalThis as { crypto?: Crypto }).crypto;\n if (global?.subtle) {\n cachedCrypto = Promise.resolve(global);\n return cachedCrypto;\n }\n const specifier = [\"node\", \"crypto\"].join(\":\");\n const loaded = (async () => {\n let mod: { webcrypto?: Crypto } | undefined;\n try {\n mod = (await import(/* webpackIgnore: true */ /* @vite-ignore */ specifier)) as {\n webcrypto?: Crypto;\n };\n } catch {\n mod = undefined;\n }\n if (!mod?.webcrypto?.subtle) {\n cachedCrypto = undefined;\n throw new DiditError(\n \"This runtime has no Web Crypto (globalThis.crypto.subtle); the Didit SDK needs it for webhooks and Authentication.\",\n );\n }\n return mod.webcrypto;\n })();\n cachedCrypto = loaded;\n return cachedCrypto;\n}\n","// Optional debug logging (docs/DESIGN.md section 6). Each line names the method,\n// the path, the status, the duration and the request id; never bodies, headers,\n// query strings or credentials.\n\nimport { readEnv } from \"./runtime.js\";\n\n/** Where the SDK writes its debug lines. `console` fits. */\nexport interface Logger {\n debug(message: string): void;\n}\n\n/** `debug` logs one line per HTTP request; `off` (the default) logs nothing. */\nexport type LogLevel = \"debug\" | \"off\";\n\n/** The log level from the `DIDIT_LOG` environment variable. */\nexport function envLogLevel(): LogLevel {\n return readEnv(\"DIDIT_LOG\")?.toLowerCase() === \"debug\" ? \"debug\" : \"off\";\n}\n\nexport interface RequestLogLine {\n method: string;\n url: string;\n status: number | null;\n durationMs: number;\n requestId: string | null;\n attempt: number;\n error?: string;\n}\n\n/** `didit: GET /v3/sessions/ 200 123ms request_id=abc`. Only the path, never the query. */\nexport function formatLogLine(line: RequestLogLine): string {\n let path = line.url;\n try {\n path = new URL(line.url).pathname;\n } catch {\n // Keep the raw value; it never carries a query in practice.\n }\n const status = line.status === null ? (line.error ?? \"error\") : String(line.status);\n const retry = line.attempt > 0 ? ` retry=${line.attempt}` : \"\";\n const id = line.requestId ? ` request_id=${line.requestId}` : \"\";\n return `didit: ${line.method} ${path} ${status} ${Math.round(line.durationMs)}ms${retry}${id}`;\n}\n","// Lists (docs/DESIGN.md section 8): `limit` and `offset` in, `{count, next,\n// previous, results}` out. A page carries every field of the list response plus\n// helpers; `for await` walks every item of every page by following `next`.\n\nimport { APIPromise, type RawResponse } from \"./api-promise.js\";\nimport { DiditError } from \"./errors.js\";\n\n/** The fields every list response has. */\nexport interface PageResponse<Item> {\n count?: number | null;\n next?: string | null;\n previous?: string | null;\n results?: Item[] | null;\n}\n\n/**\n * Fetches the page a `next` link points to. `seen` holds the absolute URLs\n * already visited in this walk; a link back to one of them is refused.\n */\nexport type PageFetcher<R, Item> = (next: string, seen: Set<string>) => Promise<Page<R, Item>>;\n\n/** The helpers on every page. */\nexport interface PageMethods<R, Item> extends AsyncIterable<Item> {\n /** Whether the API returned a `next` link. */\n hasNextPage(): boolean;\n /** The page `next` points to. Throws when there is none. */\n getNextPage(): Promise<Page<R, Item>>;\n /** This page and every following page. */\n iterPages(): AsyncGenerator<Page<R, Item>, void, undefined>;\n /** Every item of this page and the following pages. */\n [Symbol.asyncIterator](): AsyncGenerator<Item, void, undefined>;\n}\n\n/** One page of a list: the list response's fields plus the page helpers. */\nexport type Page<R, Item> = R & PageMethods<R, Item>;\n\nclass PageImpl<R, Item> implements PageMethods<R, Item> {\n readonly #fetchNext: PageFetcher<R, Item>;\n readonly #url: string;\n\n constructor(body: R, url: string, fetchNext: PageFetcher<R, Item>) {\n Object.assign(this, body);\n this.#url = url;\n this.#fetchNext = fetchNext;\n }\n\n #next(): string | null {\n const next = (this as unknown as PageResponse<Item>).next;\n return typeof next === \"string\" && next !== \"\" ? next : null;\n }\n\n hasNextPage(): boolean {\n return this.#next() !== null;\n }\n\n getNextPage(): Promise<Page<R, Item>> {\n return this.#nextPage(new Set([this.#url]));\n }\n\n #nextPage(seen: Set<string>): Promise<Page<R, Item>> {\n const next = this.#next();\n if (next === null) {\n return Promise.reject(new DiditError(\"This is the last page: there is no next link.\"));\n }\n return this.#fetchNext(next, seen);\n }\n\n async *iterPages(): AsyncGenerator<Page<R, Item>, void, undefined> {\n // One set per walk, so a cycle of next links ends it instead of looping forever.\n const seen = new Set([this.#url]);\n yield this as unknown as Page<R, Item>;\n let page: PageImpl<R, Item> | undefined = this.hasNextPage()\n ? ((await this.#nextPage(seen)) as unknown as PageImpl<R, Item>)\n : undefined;\n while (page) {\n yield page as unknown as Page<R, Item>;\n page = page.hasNextPage()\n ? ((await page.#nextPage(seen)) as unknown as PageImpl<R, Item>)\n : undefined;\n }\n }\n\n async *[Symbol.asyncIterator](): AsyncGenerator<Item, void, undefined> {\n for await (const page of this.iterPages()) {\n const results = (page as PageResponse<Item>).results;\n if (Array.isArray(results)) yield* results;\n }\n }\n}\n\n/** Build a page from a list response body fetched from `url`. */\nexport function makePage<R, Item>(\n body: R,\n url: string,\n fetchNext: PageFetcher<R, Item>,\n): Page<R, Item> {\n return new PageImpl<R, Item>(body, url, fetchNext) as unknown as Page<R, Item>;\n}\n\n/**\n * The result of a list method: await it for the first page, or iterate it with\n * `for await` for every item of every page.\n *\n * ```ts\n * const page = await didit.sessions.list({ limit: 50 });\n * for await (const session of didit.sessions.list()) console.log(session.session_id);\n * ```\n */\nexport class PagePromise<R, Item> extends APIPromise<Page<R, Item>> implements AsyncIterable<Item> {\n async *[Symbol.asyncIterator](): AsyncGenerator<Item, void, undefined> {\n const page = await this;\n yield* page;\n }\n}\n\nexport type { RawResponse };\n","// File inputs for multipart uploads (docs/DESIGN.md section 8).\n\nimport { ConfigurationError } from \"./errors.js\";\n\n/** The bytes of a file: a Blob or File, a byte array, a web stream or a Node.js stream. */\nexport type FileData =\n Blob | ArrayBuffer | ArrayBufferView | ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>;\n\n/** File bytes with the file name and content type to send. */\nexport interface FileUpload {\n data: FileData;\n /**\n * Sent as the part's file name. Default: the File's or stream's name, else\n * `file` with the extension of the content type or of the bytes (`file.jpg`).\n */\n filename?: string;\n /** Default: guessed from the file name. */\n contentType?: string;\n}\n\n/**\n * What a file parameter accepts: a Blob or File, bytes, a stream (for example\n * `fs.createReadStream(\"id.jpg\")`), or a {@link FileUpload} with its name and\n * content type. {@link fileFromPath} reads a file on Node.js, Bun and Deno.\n */\nexport type Uploadable = FileData | FileUpload;\n\n// The upload types the API accepts, so the content type never depends on the host.\nconst CONTENT_TYPES: Record<string, string> = {\n jpg: \"image/jpeg\",\n jpeg: \"image/jpeg\",\n png: \"image/png\",\n webp: \"image/webp\",\n tif: \"image/tiff\",\n tiff: \"image/tiff\",\n heic: \"image/heic\",\n heif: \"image/heif\",\n gif: \"image/gif\",\n bmp: \"image/bmp\",\n pdf: \"application/pdf\",\n zip: \"application/zip\",\n csv: \"text/csv\",\n ndjson: \"application/x-ndjson\",\n json: \"application/json\",\n mp4: \"video/mp4\",\n webm: \"video/webm\",\n mov: \"video/quicktime\",\n};\n\n/** The content type for a file name, from its extension. */\nexport function guessContentType(filename: string): string {\n const dot = filename.lastIndexOf(\".\");\n const ext = dot >= 0 ? filename.slice(dot + 1).toLowerCase() : \"\";\n return CONTENT_TYPES[ext] ?? \"application/octet-stream\";\n}\n\nfunction baseName(path: string): string {\n const parts = path.split(/[\\\\/]/);\n return parts[parts.length - 1] ?? path;\n}\n\n/** Wrap file bytes with a file name and content type. */\nexport function toFile(data: FileData, filename?: string, contentType?: string): FileUpload {\n const out: FileUpload = { data };\n if (filename !== undefined) out.filename = filename;\n if (contentType !== undefined) out.contentType = contentType;\n return out;\n}\n\n/**\n * Read a file from disk (Node.js, Bun, Deno). The name defaults to the file's\n * base name and the content type to one guessed from it.\n */\nexport async function fileFromPath(\n path: string,\n options: { filename?: string; contentType?: string } = {},\n): Promise<FileUpload> {\n // Computed so that bundlers for edge runtimes do not try to resolve it.\n const specifier = [\"node\", \"fs/promises\"].join(\":\");\n let readFile: (path: string) => Promise<Uint8Array>;\n try {\n const fs = (await import(/* webpackIgnore: true */ /* @vite-ignore */ specifier)) as {\n readFile: (path: string) => Promise<Uint8Array>;\n };\n readFile = fs.readFile;\n } catch {\n throw new ConfigurationError(\n \"fileFromPath needs a runtime with a file system (Node.js, Bun or Deno); pass the bytes instead.\",\n );\n }\n const data = await readFile(path);\n const filename = options.filename ?? baseName(path);\n return { data, filename, contentType: options.contentType ?? guessContentType(filename) };\n}\n\nfunction isStream(value: object): boolean {\n return Symbol.asyncIterator in value || typeof (value as ReadableStream).getReader === \"function\";\n}\n\nfunction isFileData(value: unknown): value is FileData {\n if (value instanceof Blob || value instanceof ArrayBuffer || ArrayBuffer.isView(value))\n return true;\n return typeof value === \"object\" && value !== null && isStream(value);\n}\n\n/** `{ data, filename?, contentType? }` whose `data` is file bytes (so `{ data: \"text\" }` is not a file). */\nfunction isFileUpload(value: unknown): value is FileUpload {\n return (\n typeof value === \"object\" &&\n value !== null &&\n !isFileData(value) &&\n \"data\" in value &&\n isFileData(value.data)\n );\n}\n\nfunction nameOf(data: unknown): string | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n // A File has `name`; a Node.js fs.ReadStream has `path`.\n const named = data as { name?: unknown; path?: unknown };\n if (typeof named.name === \"string\" && named.name) return baseName(named.name);\n if (typeof named.path === \"string\" && named.path) return baseName(named.path);\n return undefined;\n}\n\n// The Blob constructor copies its parts, so a view on a shared or pooled buffer is fine.\nfunction part(bytes: Uint8Array): BlobPart {\n return bytes as Uint8Array<ArrayBuffer>;\n}\n\nasync function collect(\n stream: AsyncIterable<Uint8Array> | ReadableStream<Uint8Array>,\n): Promise<Blob> {\n const chunks: BlobPart[] = [];\n if (typeof (stream as ReadableStream<Uint8Array>).getReader === \"function\") {\n const reader = (stream as ReadableStream<Uint8Array>).getReader();\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n chunks.push(part(value));\n }\n } else {\n for await (const chunk of stream as AsyncIterable<Uint8Array>) {\n chunks.push(part(typeof chunk === \"string\" ? new TextEncoder().encode(chunk) : chunk));\n }\n }\n return new Blob(chunks);\n}\n\n// Signatures of the file types the API takes, for uploads that come without a name.\nconst SIGNATURES: readonly (readonly [string, (b: Uint8Array) => boolean])[] = [\n [\"jpg\", (b) => b[0] === 0xff && b[1] === 0xd8 && b[2] === 0xff],\n [\"png\", (b) => ascii(b, 1, 4) === \"PNG\" && b[0] === 0x89],\n [\"gif\", (b) => ascii(b, 0, 4) === \"GIF8\"],\n [\"webp\", (b) => ascii(b, 0, 4) === \"RIFF\" && ascii(b, 8, 12) === \"WEBP\"],\n [\"pdf\", (b) => ascii(b, 0, 5) === \"%PDF-\"],\n [\n \"heic\",\n (b) => ascii(b, 4, 8) === \"ftyp\" && /^(heic|heix|heim|heis|mif1|msf1)$/.test(ascii(b, 8, 12)),\n ],\n [\"mov\", (b) => ascii(b, 4, 8) === \"ftyp\" && ascii(b, 8, 12) === \"qt \"],\n [\"mp4\", (b) => ascii(b, 4, 8) === \"ftyp\"],\n [\"webm\", (b) => b[0] === 0x1a && b[1] === 0x45 && b[2] === 0xdf && b[3] === 0xa3],\n [\"tiff\", (b) => ascii(b, 0, 4) === \"II*\\0\" || ascii(b, 0, 4) === \"MM\\0*\"],\n [\"bmp\", (b) => ascii(b, 0, 2) === \"BM\"],\n [\"zip\", (b) => ascii(b, 0, 4) === \"PK\\x03\\x04\"],\n];\n\nfunction ascii(bytes: Uint8Array, start: number, end: number): string {\n return String.fromCharCode(...bytes.subarray(start, end));\n}\n\n/**\n * A file name for an upload that has none: `file` plus the extension its\n * content type or first bytes give (`file.jpg`), since upload endpoints may\n * check the extension of an image.\n */\nasync function defaultFilename(blob: Blob, contentType: string | undefined): Promise<string> {\n const type = (contentType ?? blob.type).split(\";\")[0]?.trim().toLowerCase();\n const fromType = Object.keys(CONTENT_TYPES).find((ext) => CONTENT_TYPES[ext] === type);\n if (fromType) return `file.${fromType}`;\n const head = new Uint8Array(await blob.slice(0, 16).arrayBuffer());\n const match = SIGNATURES.find(([, test]) => test(head));\n return match ? `file.${match[0]}` : \"file\";\n}\n\n/** A file part ready for FormData. Streams are read once, so a retry sends the same bytes. */\nexport interface PreparedFile {\n blob: Blob;\n filename: string;\n}\n\n/** Read an upload into memory with its name and content type. */\nexport async function prepareFile(value: Uploadable): Promise<PreparedFile> {\n const upload: FileUpload = isFileUpload(value) ? value : { data: value };\n const data = upload.data;\n let blob: Blob;\n if (data instanceof Blob) {\n blob = data;\n } else if (data instanceof ArrayBuffer) {\n blob = new Blob([data]);\n } else if (ArrayBuffer.isView(data)) {\n blob = new Blob([part(new Uint8Array(data.buffer, data.byteOffset, data.byteLength))]);\n } else if (typeof data === \"object\" && isStream(data)) {\n blob = await collect(data);\n } else {\n throw new ConfigurationError(\n \"A file must be a Blob, a File, an ArrayBuffer, a typed array, a stream or { data, filename, contentType }.\",\n );\n }\n const filename =\n upload.filename ?? nameOf(data) ?? (await defaultFilename(blob, upload.contentType));\n const type = upload.contentType ?? (blob.type || guessContentType(filename));\n if (blob.type !== type) blob = new Blob([blob], { type });\n return { blob, filename };\n}\n\n/** Whether a params value is (or holds) a file. */\nexport function isUploadable(value: unknown): boolean {\n return isFileData(value) || isFileUpload(value);\n}\n","// The HTTP transport shared by every resource (docs/DESIGN.md sections 6 to 8):\n// configuration, headers, credentials, retries, timeouts, errors, pagination,\n// multipart bodies and binary responses.\n\nimport { APIPromise, type RawResponse } from \"./api-promise.js\";\nimport { decodeDates, type DatePlan } from \"./dates.js\";\nimport {\n APIConnectionError,\n APIResponseValidationError,\n APITimeoutError,\n ConfigurationError,\n DiditError,\n makeStatusError,\n requestIdOf,\n} from \"./errors.js\";\nimport { envLogLevel, formatLogLine, type Logger, type LogLevel } from \"./logger.js\";\nimport type { OperationSpec } from \"./operation.js\";\nimport { makePage, PagePromise, type Page } from \"./pagination.js\";\nimport type { RequestOptions } from \"./request-options.js\";\nimport { clientHeader, readEnv, userAgent } from \"./runtime.js\";\nimport { isUploadable, prepareFile, type Uploadable } from \"./uploads.js\";\n\nexport const DEFAULT_BASE_URL = \"https://verification.didit.me\";\nexport const DEFAULT_ACCOUNT_BASE_URL = \"https://apx.didit.me/auth/v2\";\n/** Milliseconds. */\nexport const DEFAULT_TIMEOUT = 60_000;\nexport const DEFAULT_MAX_RETRIES = 2;\nconst INITIAL_RETRY_DELAY = 500;\nconst MAX_RETRY_DELAY = 8_000;\nconst MAX_RETRY_AFTER = 60_000;\nconst MAX_REDIRECTS = 5;\n\n/** A `fetch` implementation. */\nexport type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n\n/** Options of the {@link Didit} client (docs/DESIGN.md section 6). */\nexport interface ClientOptions {\n /** The application's API key (header `x-api-key`). Default: `DIDIT_API_KEY`. */\n apiKey?: string | undefined;\n /** Default: `https://verification.didit.me`. */\n baseURL?: string | undefined;\n /** Needed by application-scoped methods (cases, networks, regulatory reports). Default: `DIDIT_ORGANIZATION_ID`. */\n organizationId?: string | undefined;\n /** Needed by application-scoped methods. Default: `DIDIT_APPLICATION_ID`. */\n applicationId?: string | undefined;\n /** Base URL of the account management API. Default: `https://apx.didit.me/auth/v2`. */\n accountBaseURL?: string | undefined;\n /** The `access_token` from `didit.account.login(...)`, for the account methods that need it. */\n accountToken?: string | undefined;\n /** Milliseconds per attempt. Default: 60 000. */\n timeout?: number | undefined;\n /** Retries of failed requests that are safe to retry. Default: 2. */\n maxRetries?: number | undefined;\n /** Headers to add to every request (not the credentials: use `apiKey` and `accountToken`). */\n defaultHeaders?: Record<string, string> | undefined;\n /** Your own `fetch` (proxies, instrumentation, mocks). Default: the global `fetch`. */\n fetch?: Fetch | undefined;\n /** Extra `fetch` options for every request (for example a proxy `dispatcher` on Node.js); a `signal` here cancels every request. */\n fetchOptions?: RequestInit | undefined;\n /** `debug` logs one line per request. Default: `DIDIT_LOG`, else `off`. */\n logLevel?: LogLevel | undefined;\n /** Where debug lines go. Default: `console`. */\n logger?: Logger | undefined;\n}\n\ninterface PreparedRequest {\n method: string;\n url: string;\n /** The origin credentials may be sent to. */\n origin: string;\n headers: Headers;\n body: string | FormData | undefined;\n timeout: number;\n maxRetries: number;\n /** The `signal` option and any `fetchOptions.signal`: the first to abort cancels the request. */\n signals: readonly AbortSignal[];\n fetchOptions: RequestInit | undefined;\n}\n\nconst IDEMPOTENT = new Set([\"GET\", \"HEAD\", \"PUT\", \"DELETE\", \"OPTIONS\"]);\n\n// Errors raised before any byte of the request left this process (undici, Bun).\nconst NOT_SENT = new Set([\n \"ECONNREFUSED\",\n \"ENOTFOUND\",\n \"EAI_AGAIN\",\n \"EHOSTUNREACH\",\n \"ENETUNREACH\",\n \"EADDRNOTAVAIL\",\n \"UND_ERR_CONNECT_TIMEOUT\",\n \"ConnectionRefused\",\n \"FailedToOpenSocket\",\n]);\n\nfunction errorCodes(error: unknown, depth = 0): string[] {\n if (typeof error !== \"object\" || error === null || depth > 4) return [];\n const out: string[] = [];\n const { code, cause, errors } = error as { code?: unknown; cause?: unknown; errors?: unknown };\n if (typeof code === \"string\") out.push(code);\n out.push(...errorCodes(cause, depth + 1));\n if (Array.isArray(errors)) for (const e of errors) out.push(...errorCodes(e, depth + 1));\n return out;\n}\n\n/** Whether a fetch error proves the request never reached the server. */\nexport function failedBeforeSending(error: unknown): boolean {\n const codes = errorCodes(error);\n return codes.length > 0 && codes.every((c) => NOT_SENT.has(c));\n}\n\n/** Whether a response status may be retried (docs/DESIGN.md section 7). */\nexport function shouldRetryStatus(method: string, status: number): boolean {\n // 429 guarantees the request was not processed, so even POST and PATCH retry.\n if (status === 429) return true;\n if (!IDEMPOTENT.has(method)) return false;\n return status === 408 || status >= 500;\n}\n\n/** Milliseconds to wait from a `Retry-After` header (seconds or HTTP date), capped at 60 s. */\nexport function parseRetryAfter(value: string | null, now = Date.now()): number | undefined {\n if (!value) return undefined;\n const text = value.trim();\n let ms: number;\n if (/^[+-]?\\d+(\\.\\d+)?$/.test(text)) ms = Number(text) * 1000;\n else {\n const date = Date.parse(text);\n if (Number.isNaN(date)) return undefined;\n ms = date - now;\n }\n return Math.max(0, Math.min(ms, MAX_RETRY_AFTER));\n}\n\n/** Exponential backoff from 0.5 s with full jitter, capped at 8 s. */\nexport function retryDelay(retriesTaken: number, random: () => number = Math.random): number {\n const ceiling = Math.min(MAX_RETRY_DELAY, INITIAL_RETRY_DELAY * 2 ** retriesTaken);\n return random() * ceiling;\n}\n\n/**\n * Call `onAbort` once when the first of `signals` aborts; returns the function\n * that removes the listeners. (`AbortSignal.any` needs Node.js 20.3.)\n */\nfunction onAnyAbort(\n signals: readonly AbortSignal[],\n onAbort: (signal: AbortSignal) => void,\n): () => void {\n const listeners = signals.map((signal) => {\n const listener = (): void => {\n unlink();\n onAbort(signal);\n };\n signal.addEventListener(\"abort\", listener, { once: true });\n return { signal, listener };\n });\n const unlink = (): void => {\n for (const { signal, listener } of listeners) signal.removeEventListener(\"abort\", listener);\n };\n return unlink;\n}\n\nfunction sleep(ms: number, signals: readonly AbortSignal[]): Promise<void> {\n return new Promise((resolve, reject) => {\n const aborted = signals.find((s) => s.aborted);\n if (aborted) {\n reject(abortError(aborted));\n return;\n }\n const timer = setTimeout(() => {\n unlink();\n resolve();\n }, ms);\n const unlink = onAnyAbort(signals, (signal) => {\n clearTimeout(timer);\n reject(abortError(signal));\n });\n });\n}\n\nfunction abortError(signal: AbortSignal): APIConnectionError {\n return new APIConnectionError(\"Request was aborted.\", { cause: signal.reason });\n}\n\nfunction validateBaseURL(name: string, value: string): { url: string; origin: string } {\n // The value is never quoted: an API key passed in the wrong option must not reach the logs.\n let parsed: URL;\n try {\n parsed = new URL(value);\n } catch {\n throw new ConfigurationError(`${name} must be an absolute http(s) URL.`);\n }\n if (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") {\n throw new ConfigurationError(`${name} must be an absolute http(s) URL.`);\n }\n if (parsed.username || parsed.password) {\n throw new ConfigurationError(`${name} must not contain credentials.`);\n }\n if (parsed.search || parsed.hash) {\n throw new ConfigurationError(`${name} must not have a query string or fragment.`);\n }\n return { url: parsed.href.replace(/\\/+$/, \"\"), origin: parsed.origin };\n}\n\nfunction scalarText(value: unknown): string {\n if (value instanceof Date) return value.toISOString();\n if (typeof value === \"boolean\") return value ? \"true\" : \"false\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"bigint\") return String(value);\n return JSON.stringify(value);\n}\n\n/** Fill `{name}` placeholders. Empty ids and the dot segments are refused so an id can never change the endpoint. */\nexport function encodePath(template: string, values: Record<string, unknown>): string {\n return template.replace(/\\{([^}]+)\\}/g, (_, name: string) => {\n const value = values[name];\n if (value === undefined || value === null) {\n throw new ConfigurationError(`The path parameter ${name} is required.`);\n }\n const text = scalarText(value);\n if (text === \"\" || text === \".\" || text === \"..\") {\n throw new ConfigurationError(\n `The path parameter ${name} must be a non-empty id, got ${JSON.stringify(text)}.`,\n );\n }\n try {\n return encodeURIComponent(text);\n } catch {\n // A lone surrogate has no UTF-8 form.\n throw new ConfigurationError(`The path parameter ${name} is not valid Unicode text.`);\n }\n });\n}\n\n// Visible ASCII: what an API key or token can be without breaking the header it goes in.\nconst HEADER_TOKEN = /^[\\x21-\\x7e]+$/;\nconst CREDENTIAL_HEADERS = [\"x-api-key\", \"authorization\"];\n\n/** `headers.set`, with an error that names the header but never echoes its value. */\nfunction setHeader(headers: Headers, name: string, value: string): void {\n try {\n headers.set(name, value);\n } catch {\n // Not chained: the runtime's error quotes the value, which may be a secret.\n throw new ConfigurationError(\n `The header ${JSON.stringify(name)} cannot be sent: its name or value has characters HTTP headers do not allow.`,\n );\n }\n}\n\nfunction jsonBody(value: unknown): string {\n try {\n return JSON.stringify(value, (_key, v: unknown) => {\n if (typeof v === \"number\" && !Number.isFinite(v)) {\n throw new TypeError(`${v} cannot be sent as JSON`);\n }\n if (typeof v === \"bigint\") throw new TypeError(\"a BigInt cannot be sent as JSON\");\n return v;\n });\n } catch (error) {\n throw new DiditError(`The request body cannot be sent as JSON: ${(error as Error).message}`, {\n cause: error,\n });\n }\n}\n\nasync function multipartBody(\n fields: Record<string, unknown>,\n fileFields: ReadonlySet<string>,\n): Promise<FormData> {\n const form = new FormData();\n for (const [key, value] of Object.entries(fields)) {\n if (value === undefined || value === null) continue;\n // Only the operation's file fields carry files (a Blob is a file anywhere):\n // a metadata object that happens to have a `data` key stays JSON text.\n const isFile = fileFields.has(key) || value instanceof Blob;\n if (isFile) {\n const files = Array.isArray(value) ? (value as Uploadable[]) : [value as Uploadable];\n for (const file of files) {\n const prepared = await prepareFile(file);\n form.append(key, prepared.blob, prepared.filename);\n }\n } else if (value instanceof Date) {\n form.append(key, value.toISOString());\n } else if (typeof value === \"object\") {\n // The API reads structured values in multipart requests as JSON text.\n form.append(key, jsonBody(value));\n } else {\n form.append(key, scalarText(value));\n }\n }\n return form;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction queryKeys(op: OperationSpec): [string, string][] {\n return (op.query ?? []).map((q) => (typeof q === \"string\" ? [q, q] : [q[0], q[1]]));\n}\n\n/**\n * Sends the requests of every generated resource method. Use {@link Didit},\n * which adds the resources.\n */\nexport class APIClient {\n /** Base URL of the verification API. */\n readonly baseURL: string;\n /** Base URL of the account management API. */\n readonly accountBaseURL: string;\n readonly organizationId: string | undefined;\n readonly applicationId: string | undefined;\n /** Milliseconds per attempt. */\n readonly timeout: number;\n readonly maxRetries: number;\n /** Date-time decoding plans of the named response types; set by the generated resources. */\n protected readonly datePlans: Readonly<Record<string, DatePlan>> = {};\n\n // Private fields: never enumerable, so logging the client never shows the key.\n readonly #options: ClientOptions;\n readonly #apiKey: string | undefined;\n readonly #accountToken: string | undefined;\n readonly #origin: string;\n readonly #accountOrigin: string;\n readonly #fetch: Fetch;\n readonly #logLevel: LogLevel;\n readonly #logger: Logger;\n\n constructor(options: ClientOptions = {}) {\n this.#options = { ...options };\n this.#apiKey = options.apiKey ?? readEnv(\"DIDIT_API_KEY\");\n // An empty token counts as none.\n this.#accountToken = options.accountToken || undefined;\n this.organizationId = options.organizationId ?? readEnv(\"DIDIT_ORGANIZATION_ID\");\n this.applicationId = options.applicationId ?? readEnv(\"DIDIT_APPLICATION_ID\");\n const base = validateBaseURL(\"baseURL\", options.baseURL ?? DEFAULT_BASE_URL);\n const account = validateBaseURL(\n \"accountBaseURL\",\n options.accountBaseURL ?? DEFAULT_ACCOUNT_BASE_URL,\n );\n this.baseURL = base.url;\n this.#origin = base.origin;\n this.accountBaseURL = account.url;\n this.#accountOrigin = account.origin;\n const timeout = options.timeout ?? DEFAULT_TIMEOUT;\n if (!Number.isFinite(timeout) || timeout <= 0) {\n throw new ConfigurationError(\"timeout must be a positive number of milliseconds.\");\n }\n this.timeout = timeout;\n const maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;\n if (!Number.isInteger(maxRetries) || maxRetries < 0) {\n throw new ConfigurationError(\"maxRetries must be an integer, 0 or more.\");\n }\n this.maxRetries = maxRetries;\n const fetchImpl = options.fetch ?? (globalThis as { fetch?: Fetch }).fetch;\n if (typeof fetchImpl !== \"function\") {\n throw new ConfigurationError(\"No fetch implementation: pass one as the fetch option.\");\n }\n this.#fetch = fetchImpl;\n this.#logLevel = options.logLevel ?? envLogLevel();\n this.#logger = options.logger ?? {\n debug: (message: string) => {\n console.debug(message);\n },\n };\n }\n\n /** The options this client was created with, merged with `overrides` (for `withOptions`). */\n protected mergedOptions(overrides: ClientOptions): ClientOptions {\n return { ...this.#options, ...overrides };\n }\n\n // Requests -------------------------------------------------------------------\n\n /** Send one operation and parse its response. Used by the generated resources. */\n request<T>(\n op: OperationSpec,\n pathArgs: readonly string[],\n params: unknown,\n options?: RequestOptions,\n ): APIPromise<T> {\n const raw = this.#prepare(op, pathArgs, params, options).then((prepared) =>\n this.#send(prepared),\n );\n return new APIPromise<T>(raw, (r) => this.#parse<T>(op, r));\n }\n\n /** Send a list operation; the result can be awaited or iterated with `for await`. */\n requestPage<R, Item>(\n op: OperationSpec,\n pathArgs: readonly string[],\n params: unknown,\n options?: RequestOptions,\n ): PagePromise<R, Item> {\n const prepared = this.#prepare(op, pathArgs, params, options);\n const raw = prepared.then((p) => this.#send(p));\n return new PagePromise<R, Item>(raw, async (r) => this.#page<R, Item>(op, await prepared, r));\n }\n\n async #page<R, Item>(\n op: OperationSpec,\n prepared: PreparedRequest,\n raw: RawResponse,\n ): Promise<Page<R, Item>> {\n const invalid = (message: string, response: Response): APIResponseValidationError =>\n new APIResponseValidationError(message, response.status, response.headers);\n const build = async (current: string, response: RawResponse): Promise<Page<R, Item>> => {\n const body = await this.#parse<R>(op, response);\n if (!isRecord(body)) {\n throw invalid(\"The API returned a list response that is not an object.\", response.response);\n }\n const fetchNext = async (next: string, seen: Set<string>): Promise<Page<R, Item>> => {\n let target: URL;\n try {\n target = new URL(next, current);\n } catch {\n throw invalid(\"The API returned an invalid pagination link.\", response.response);\n }\n if (\n (target.protocol !== \"https:\" && target.protocol !== \"http:\") ||\n target.origin !== prepared.origin\n ) {\n throw invalid(\n `Refusing to follow a pagination link to another origin (${target.origin}); ` +\n `the credentials are only sent to ${prepared.origin}.`,\n response.response,\n );\n }\n // The fragment never reaches the server, so it cannot make a page new.\n target.hash = \"\";\n if (seen.has(target.href)) {\n throw invalid(\n \"The API returned a pagination link that repeats an earlier page.\",\n response.response,\n );\n }\n seen.add(target.href);\n const nextRaw = await this.#send({\n ...prepared,\n method: \"GET\",\n url: target.href,\n body: undefined,\n });\n return build(target.href, nextRaw);\n };\n return makePage<R, Item>(body, current, fetchNext);\n };\n return build(prepared.url, raw);\n }\n\n async #prepare(\n op: OperationSpec,\n pathArgs: readonly string[],\n params: unknown,\n options: RequestOptions = {},\n ): Promise<PreparedRequest> {\n const account = op.api === \"account\";\n const base = account ? this.accountBaseURL : this.baseURL;\n const origin = account ? this.#accountOrigin : this.#origin;\n\n // Path: application scope first, then the positional ids in template order.\n const values: Record<string, unknown> = {};\n const names = [...op.path.matchAll(/\\{([^}]+)\\}/g)].map((m) => m[1] ?? \"\");\n let positional = names;\n if (op.scope === \"application\") {\n if (!this.organizationId || !this.applicationId) {\n throw new ConfigurationError(\n \"This method is application scoped: pass organizationId and applicationId to the client \" +\n \"(or set DIDIT_ORGANIZATION_ID and DIDIT_APPLICATION_ID).\",\n );\n }\n values.organization_id = this.organizationId;\n values.application_id = this.applicationId;\n positional = names.filter((n) => n !== \"organization_id\" && n !== \"application_id\");\n }\n positional.forEach((name, i) => {\n values[name] = pathArgs[i];\n });\n const url = new URL(base + encodePath(op.path, values));\n\n // Credentials, checked before anything is sent.\n const auth = op.auth ?? \"api_key\";\n const apiKey = this.#apiKey;\n const accountToken = this.#accountToken;\n if (auth === \"api_key\" && !apiKey) {\n throw new ConfigurationError(\n \"No API key: pass apiKey to the client or set the DIDIT_API_KEY environment variable.\",\n );\n }\n if (auth === \"account_token\" && !accountToken) {\n throw new ConfigurationError(\n \"This account method needs an account token: call didit.account.login(...) and pass its \" +\n \"access_token as accountToken (didit.withOptions({ accountToken })).\",\n );\n }\n if (auth === \"api_key\" && !HEADER_TOKEN.test(apiKey ?? \"\")) {\n throw new ConfigurationError(\n \"The API key has characters an API key cannot have (spaces, line breaks or non-ASCII); copy it again from the console.\",\n );\n }\n if (auth === \"account_token\" && !HEADER_TOKEN.test(accountToken ?? \"\")) {\n throw new ConfigurationError(\n \"The account token has characters a token cannot have (spaces, line breaks or non-ASCII).\",\n );\n }\n\n // Query string and body fields.\n const fields: Record<string, unknown> =\n isRecord(params) && op.body !== \"whole\" ? { ...params } : {};\n for (const [key, wire] of queryKeys(op)) {\n const value = fields[key];\n Reflect.deleteProperty(fields, key);\n if (value === undefined || value === null) continue;\n for (const item of Array.isArray(value) ? (value as unknown[]) : [value]) {\n url.searchParams.append(wire, scalarText(item));\n }\n }\n for (const [key, value] of Object.entries(options.query ?? {})) {\n if (value !== undefined && value !== null) url.searchParams.append(key, scalarText(value));\n }\n\n const headers = new Headers();\n headers.set(\"Accept\", op.accept ?? \"application/json\");\n headers.set(\"User-Agent\", userAgent());\n headers.set(\"X-Didit-Client\", clientHeader());\n for (const [name, value] of Object.entries(this.#options.defaultHeaders ?? {}))\n setHeader(headers, name, value);\n\n let body: string | FormData | undefined;\n if (op.body === \"whole\") {\n if (params !== undefined) {\n body = jsonBody(params);\n headers.set(\"Content-Type\", \"application/json\");\n }\n } else if (op.body !== undefined) {\n Object.assign(fields, options.body ?? {});\n const files = new Set(op.files ?? []);\n const multipart =\n op.body === \"multipart\" ||\n (op.body === \"auto\" && [...files].some((name) => isUploadable(fields[name])));\n if (multipart) {\n body = await multipartBody(fields, files);\n } else {\n body = jsonBody(fields);\n headers.set(\"Content-Type\", \"application/json\");\n }\n }\n if (options.idempotencyKey !== undefined)\n setHeader(headers, \"Idempotency-Key\", options.idempotencyKey);\n for (const [name, value] of Object.entries(options.headers ?? {})) {\n if (value === null) headers.delete(name);\n else if (value !== undefined) setHeader(headers, name, value);\n }\n // Credentials last, so no default or per-request header can replace, remove\n // or redirect them: each only ever goes to the origin of the API it belongs to.\n for (const name of CREDENTIAL_HEADERS) headers.delete(name);\n if (auth === \"api_key\") headers.set(\"x-api-key\", apiKey ?? \"\");\n else if (auth === \"account_token\") headers.set(\"Authorization\", `Bearer ${accountToken ?? \"\"}`);\n\n const timeout = options.timeout ?? this.timeout;\n if (!Number.isFinite(timeout) || timeout <= 0) {\n throw new ConfigurationError(\"timeout must be a positive number of milliseconds.\");\n }\n const maxRetries = options.maxRetries ?? this.maxRetries;\n if (!Number.isInteger(maxRetries) || maxRetries < 0) {\n throw new ConfigurationError(\"maxRetries must be an integer, 0 or more.\");\n }\n const clientFetchOptions = this.#options.fetchOptions;\n const fetchOptions =\n clientFetchOptions || options.fetchOptions\n ? { ...clientFetchOptions, ...options.fetchOptions }\n : undefined;\n // The fetch gets its own signal (timeouts), so each of these is listened to instead.\n const signals = [options.signal, clientFetchOptions?.signal, options.fetchOptions?.signal]\n .filter((s): s is AbortSignal => s !== undefined && s !== null)\n .filter((s, i, all) => all.indexOf(s) === i);\n return {\n method: op.method,\n url: url.href,\n origin,\n headers,\n body,\n timeout,\n maxRetries,\n signals,\n fetchOptions,\n };\n }\n\n #secrets(): string[] {\n return [this.#apiKey, this.#accountToken].filter(\n (s): s is string => typeof s === \"string\" && s !== \"\",\n );\n }\n\n #log(\n method: string,\n url: string,\n started: number,\n attempt: number,\n response?: Response,\n error?: string,\n ): void {\n if (this.#logLevel !== \"debug\") return;\n const line: Parameters<typeof formatLogLine>[0] = {\n method,\n url,\n status: response ? response.status : null,\n durationMs: Date.now() - started,\n requestId: response ? requestIdOf(response.headers) : null,\n attempt,\n };\n if (error !== undefined) line.error = error;\n this.#logger.debug(formatLogLine(line));\n }\n\n /** Send with retries; resolves with a 2xx response whose body is not read yet. */\n async #send(prepared: PreparedRequest): Promise<RawResponse> {\n const { method, signals } = prepared;\n const aborted = (): AbortSignal | undefined => signals.find((s) => s.aborted);\n for (let attempt = 0; ; attempt++) {\n const before = aborted();\n if (before) throw abortError(before);\n const controller = new AbortController();\n const timedOut = { value: false };\n const timer = setTimeout(() => {\n timedOut.value = true;\n controller.abort();\n }, prepared.timeout);\n const unlink = onAnyAbort(signals, () => {\n controller.abort();\n });\n const done = (): void => {\n clearTimeout(timer);\n unlink();\n };\n const started = Date.now();\n let response: Response;\n try {\n response = await this.#fetchFollowingRedirects(prepared, controller.signal);\n } catch (error) {\n done();\n const cancelled = aborted();\n if (cancelled) throw abortError(cancelled);\n const label = timedOut.value ? \"timeout\" : \"connection error\";\n this.#log(method, prepared.url, started, attempt, undefined, label);\n const retry = timedOut.value\n ? IDEMPOTENT.has(method)\n : IDEMPOTENT.has(method) || failedBeforeSending(error);\n if (retry && attempt < prepared.maxRetries) {\n await sleep(retryDelay(attempt), signals);\n continue;\n }\n if (timedOut.value) throw new APITimeoutError(undefined, { cause: error });\n if (error instanceof DiditError) throw error;\n throw new APIConnectionError(undefined, { cause: error });\n }\n this.#log(method, prepared.url, started, attempt, response);\n if (response.status >= 200 && response.status < 300) {\n return { response, done, timedOut: () => timedOut.value };\n }\n\n // An error status: read the body (still under the timeout) for the error.\n let text = \"\";\n try {\n text = await response.text();\n } catch {\n // Keep what we have; the status says enough.\n } finally {\n done();\n }\n if (shouldRetryStatus(method, response.status) && attempt < prepared.maxRetries) {\n const wait = parseRetryAfter(response.headers.get(\"retry-after\")) ?? retryDelay(attempt);\n await sleep(wait, signals);\n continue;\n }\n let body: unknown = text === \"\" ? null : text;\n try {\n if (text) body = JSON.parse(text);\n } catch {\n // Not JSON: keep the text.\n }\n throw makeStatusError(response.status, body, response.headers, this.#secrets());\n }\n }\n\n /**\n * fetch with `redirect: \"manual\"`: the API key must never follow a redirect to\n * another origin, so only same-origin redirects of GET and HEAD are followed.\n */\n async #fetchFollowingRedirects(\n prepared: PreparedRequest,\n signal: AbortSignal,\n ): Promise<Response> {\n let url = prepared.url;\n for (let hop = 0; ; hop++) {\n const init: RequestInit = {\n ...prepared.fetchOptions,\n method: prepared.method,\n headers: prepared.headers,\n signal,\n redirect: \"manual\",\n };\n if (prepared.body !== undefined) init.body = prepared.body;\n const response = await this.#fetch(url, init);\n const location = response.headers.get(\"location\");\n const redirect = [301, 302, 303, 307, 308].includes(response.status) && location !== null;\n if (\n !redirect ||\n hop >= MAX_REDIRECTS ||\n (prepared.method !== \"GET\" && prepared.method !== \"HEAD\")\n ) {\n return response;\n }\n const target = new URL(location, url);\n if (target.origin !== prepared.origin) return response;\n await response.body?.cancel();\n url = target.href;\n }\n }\n\n async #parse<T>(op: OperationSpec, raw: RawResponse): Promise<T> {\n const { response } = raw;\n try {\n if (op.response === \"none\") {\n await response.body?.cancel();\n return undefined as T;\n }\n if (op.response === \"binary\") {\n const blob = await response.blob();\n const type = response.headers.get(\"content-type\");\n return (type && blob.type !== type ? new Blob([blob], { type }) : blob) as T;\n }\n const text = await response.text();\n if (response.status === 204 || text.trim() === \"\") return null as T;\n let data: unknown;\n try {\n data = JSON.parse(text);\n } catch (error) {\n throw new APIResponseValidationError(\n `The API returned a ${response.status} response that is not JSON.`,\n response.status,\n response.headers,\n { cause: error },\n );\n }\n return decodeDates(data, op.dates, this.datePlans) as T;\n } catch (error) {\n if (error instanceof DiditError) throw error;\n if (raw.timedOut()) throw new APITimeoutError(undefined, { cause: error });\n // Reading the body failed: the connection broke.\n throw new APIConnectionError(\"The connection failed while reading the response.\", {\n cause: error,\n });\n } finally {\n raw.done();\n }\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { DatePlan } from \"../core/dates.js\";\n\n/** Date-time decoding plans of the named response types (see core/dates.ts). */\nexport const DATE_PLANS: Readonly<Record<string, DatePlan>> = {\n AMLDatasetFreshness: {\n p: {\n captured_at: 1,\n sources: {\n p: {\n sanctions: \"AMLDatasetSourceFreshness\",\n pep: \"AMLDatasetSourceFreshness\",\n warnings: \"AMLDatasetSourceFreshness\",\n adverse_media: \"AMLDatasetSourceFreshness\",\n },\n },\n },\n },\n AMLDatasetSourceFreshness: { p: { last_updated_at: 1, oldest_updated_at: 1 } },\n AMLMonitoringJob: { p: { created_at: 1, completed_at: 1 } },\n AMLMonitoringToggleResult: { p: { created_at: 1, completed_at: 1 } },\n AMLScreening: {\n p: {\n hits: {\n i: {\n p: {\n last_seen: 1,\n first_seen: 1,\n adverse_media_matches: { i: { p: { publication_date: 1 } } },\n },\n },\n },\n last_ongoing_screening_at: 1,\n last_ongoing_screening_datasets_updated_at: 1,\n },\n },\n AMLScreeningRun: {\n p: { completed_at: 1, started_at: 1, dataset_freshness: \"AMLDatasetFreshness\" },\n },\n AddressValidationResponse: { p: { created_at: 1 } },\n AgeEstimationEstimateResponse: { p: { created_at: 1 } },\n AmlMonitoringRetrieveJobResponse: { p: { created_at: 1, completed_at: 1 } },\n AmlRetrieveDatasetFreshnessResponse: { p: { dataset_freshness: \"AMLDatasetFreshness\" } },\n AmlScreenResponse: {\n p: { aml: { p: { hits: { i: { p: { first_seen: 1, last_seen: 1 } } } } }, created_at: 1 },\n },\n Application: { p: { created_at: 1 } },\n BankAccountCheckResponse: { p: { created_at: 1 } },\n BankVerificationResult: {\n p: {\n connection: { p: { connected_at: 1, consent_expires_at: 1, last_refreshed_at: 1 } },\n ownership: { p: { evaluated_at: 1 } },\n continuation: { p: { continued_at: 1 } },\n evidence_purged_at: 1,\n created_at: 1,\n updated_at: 1,\n },\n },\n BiometricTemplatesListResponse: {\n p: { results: { i: { p: { retained_at: 1, expires_at: 1, purged_at: 1 } } } },\n },\n BiometricTemplatesRetrieveResponse: { p: { retained_at: 1, expires_at: 1, purged_at: 1 } },\n BlocklistListResponse: { p: { results: { i: \"BlocklistedItem\" } } },\n BlocklistedItem: { p: { blocklisted_at: 1 } },\n BusinessDetailItem: {\n p: {\n last_session_at: 1,\n first_session_at: 1,\n last_activity_at: 1,\n created_at: 1,\n updated_at: 1,\n },\n },\n BusinessListItem: {\n p: { last_session_at: 1, first_session_at: 1, last_activity_at: 1, created_at: 1 },\n },\n BusinessSessionListItem: { p: { created_at: 1 } },\n BusinessesListResponse: { p: { results: { i: \"BusinessListItem\" } } },\n CaseActionCaseActionReceipt: { p: { created_at: 1, updated_at: 1 } },\n CaseActionCaseActionReceiptPage: { p: { results: { i: \"CaseActionCaseActionReceipt\" } } },\n CaseActionCaseEntityActionResult: { p: { receipt: \"CaseActionCaseActionReceipt\" } },\n CaseBlueprintDetail: { p: { created_at: 1, updated_at: 1 } },\n CaseBlueprintListItem: { p: { created_at: 1 } },\n CaseChecklistItem: { p: { completed_at: 1 } },\n CaseCollaborationCaseNote: { p: { created_at: 1 } },\n CaseCollaborationPaginatedCaseNoteList: { p: { results: { i: \"CaseCollaborationCaseNote\" } } },\n CaseDetail: {\n p: {\n assigned_at: 1,\n due_at: 1,\n resolved_at: 1,\n pending_resolution: { p: { staged_at: 1 } },\n blueprint: \"CaseBlueprintDetail\",\n notes: { i: \"CaseNote\" },\n events: { i: \"CaseEvent\" },\n links: { i: \"CaseLink\" },\n checklist_items: { i: \"CaseChecklistItem\" },\n created_at: 1,\n updated_at: 1,\n },\n },\n CaseDuplicateCaseDuplicate: { p: { created_at: 1 } },\n CaseDuplicateCaseDuplicatePage: { p: { results: { i: \"CaseDuplicateCaseDuplicate\" } } },\n CaseEvent: { p: { created_at: 1 } },\n CaseLink: { p: { created_at: 1 } },\n CaseListItem: {\n p: {\n pending_resolution: { p: { staged_at: 1 } },\n assigned_at: 1,\n due_at: 1,\n resolved_at: 1,\n created_at: 1,\n updated_at: 1,\n },\n },\n CaseNote: { p: { created_at: 1 } },\n CasePublicationCaseBlueprint: { p: { created_at: 1, updated_at: 1 } },\n CasePublicationPaginatedPolicyRevisionList: {\n p: { results: { i: \"CasePublicationPolicyRevision\" } },\n },\n CasePublicationPolicyDraft: { p: { updated_at: 1 } },\n CasePublicationPolicyDraftResponse: { p: { draft: \"CasePublicationPolicyDraft\" } },\n CasePublicationPolicyRevision: { p: { published_at: 1 } },\n CaseReviewTeam: { p: { members: { i: \"CaseReviewTeamMember\" }, created_at: 1, updated_at: 1 } },\n CaseReviewTeamMember: { p: { available_from: 1, available_until: 1 } },\n CaseRoutingRule: { p: { created_at: 1, updated_at: 1 } },\n CasesBlueprintsListResponse: { p: { results: { i: \"CaseBlueprintListItem\" } } },\n CasesListEventsResponse: { p: { results: { i: \"CaseEvent\" } } },\n CasesListResponse: { p: { results: { i: \"CaseListItem\" } } },\n CasesRequestsRemindResponse: {\n p: { request: \"CustomerMessagingCaseRequest\", reminded_at: 1, next_reminder_at: 1 },\n },\n CasesRoutingRulesListResponse: { p: { results: { i: \"CaseRoutingRule\" } } },\n CasesTeamsListResponse: { p: { results: { i: \"CaseReviewTeam\" } } },\n ComplianceList: { p: { last_entry_added_at: 1, created_at: 1, updated_at: 1 } },\n ComplianceListEntry: { p: { created_at: 1 } },\n CustomerMessagingCaseRequest: {\n p: { expires_at: 1, delivered_at: 1, cancelled_at: 1, responded_at: 1, created_at: 1 },\n },\n CustomerMessagingCaseRequestContact: { p: { verified_at: 1 } },\n CustomerMessagingCaseRequestOptions: {\n p: { contacts: { i: \"CustomerMessagingCaseRequestContact\" } },\n },\n CustomerMessagingCaseRequestPreviewResponse: { p: { expires_at: 1 } },\n CustomerMessagingPaginatedCaseRequestList: {\n p: { results: { i: \"CustomerMessagingCaseRequest\" } },\n },\n DatabaseValidationValidateResponse: { p: { created_at: 1 } },\n DigitalIdWalletApiWalletVerificationResponse: {\n p: { wallet_verification: \"DigitalIdWalletApiWalletVerificationResult\", created_at: 1 },\n },\n DigitalIdWalletApiWalletVerificationResult: { p: { expires_at: 1, verified_at: 1 } },\n DocumentAiAnalyzeResponse: { p: { created_at: 1 } },\n EmailRiskResponse: {\n p: { created_at: 1, email: { p: { verified_at: 1, lifecycle: { i: \"RiskLifecycleEvent\" } } } },\n },\n EmailVerificationCheckResponse: {\n p: {\n email: { p: { verified_at: 1, lifecycle: { i: { p: { timestamp: 1 } } } } },\n created_at: 1,\n },\n },\n EntityNetworkMembership: { p: { network: \"NetworkListItem\", joined_at: 1, last_seen_at: 1 } },\n EntityNetworkMembershipList: { p: { results: { i: \"EntityNetworkMembership\" } } },\n FaceMatchCompareResponse: { p: { created_at: 1 } },\n FaceSearchSearchResponse: {\n p: { face_search: { p: { matches: { i: { p: { verification_date: 1 } } } } }, created_at: 1 },\n },\n FeatureStatusOverride: { p: { requested_at: 1, applied_at: 1, cancelled_at: 1 } },\n FraudCheckResponse: { p: { created_at: 1, completed_at: 1 } },\n IPRiskResponse: { p: { created_at: 1 } },\n IdVerificationVerifyResponse: { p: { created_at: 1 } },\n ImportJobSummary: { p: { resumes_at: 1, created_at: 1, started_at: 1, completed_at: 1 } },\n InvestigatorBlock: { p: { prepared_at: 1, decision: \"InvestigatorDecision\" } },\n InvestigatorDecision: {\n p: {\n decided_at: 1,\n original_outcome: { p: { decided_at: 1 } },\n overrides: { i: { p: { overridden_at: 1 } } },\n },\n },\n InvestigatorListQueueResponse: { p: { results: { i: \"InvestigatorQueueRow\" } } },\n InvestigatorQueueRow: { p: { waiting_since: 1, due_at: 1, prepared_at: 1 } },\n InvestigatorRetrieveSummaryResponse: { p: { last_report_at: 1 } },\n InvestigatorRetrieveTransactionResponse: { p: { investigator: \"InvestigatorBlock\" } },\n InvestigatorRunDetail: {\n p: { waiting_since: 1, due_at: 1, prepared_at: 1, decision: \"InvestigatorDecision\" },\n },\n InvestigatorSettings: { p: { stage_changed_at: 1 } },\n KybListShareholdersResponse: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n KybListShareholdersResponse202: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n KybListUbosResponse: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n KybListUbosResponse202: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n KybSearchResponse: { p: { created_at: 1 } },\n KybSelectResponse: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n ListsEntriesListResponse: { p: { results: { i: \"ComplianceListEntry\" } } },\n ListsListResponse: { p: { results: { i: \"ComplianceList\" } } },\n MonitoringEvent: { p: { occurred_at: 1, received_at: 1 } },\n MonitoringEventDetail: {\n p: {\n occurred_at: 1,\n received_at: 1,\n expires_at: 1,\n rule_runs: { i: \"MonitoringEventRuleRun\" },\n ip_enrichment: { p: { last_enriched_at: 1 } },\n subject_profile: { p: { last_enriched_at: 1 } },\n },\n },\n MonitoringEventIngestResult: { p: { expires_at: 1 } },\n MonitoringEventPage: { p: { results: { i: \"MonitoringEvent\" } } },\n MonitoringEventRuleRun: { p: { created_at: 1 } },\n MonitoringEventsCreateBatchResponse: { p: { results: { i: { p: { expires_at: 1 } } } } },\n MonitoringEventsCreateSdkTokenResponse: { p: { expires_at: 1 } },\n NetworkDetail: { p: { first_activity_at: 1, last_activity_at: 1, reviewed_at: 1 } },\n NetworkDetailResponse: {\n p: {\n first_activity_at: 1,\n last_activity_at: 1,\n reviewed_at: 1,\n tags: { i: \"NetworkTag\" },\n patterns: { i: \"NetworkPatternScore\" },\n },\n },\n NetworkGraph: { p: { network: \"NetworkDetail\", edges: { i: \"NetworkGraphEdge\" } } },\n NetworkGraphEdge: { p: { first_seen_at: 1, last_seen_at: 1 } },\n NetworkListItem: { p: { first_activity_at: 1, last_activity_at: 1 } },\n NetworkMap: { p: { network: \"NetworkDetail\", points: { i: { p: { observed_at: 1 } } } } },\n NetworkMember: { p: { joined_at: 1, last_seen_at: 1 } },\n NetworkNote: { p: { created_at: 1 } },\n NetworkPatternScore: { p: { computed_at: 1 } },\n NetworkSignal: { p: { first_seen_at: 1, last_seen_at: 1 } },\n NetworkTag: { p: { added_at: 1 } },\n NetworkTimeline: { p: { results: { i: \"NetworkTimelineEvent\" } } },\n NetworkTimelineAttempt: { p: { status_changed_at: 1 } },\n NetworkTimelineEvent: { p: { occurred_at: 1 } },\n NetworkTimelinePage: { p: { results: { i: \"NetworkTypedTimelineEvent\" } } },\n NetworkTypedTimelineEvent: {\n p: { occurred_at: 1, ingested_at: 1, verification_attempt: \"NetworkTimelineAttempt\" },\n },\n NetworksListMembersResponse: { p: { results: { i: \"NetworkMember\" } } },\n NetworksListResponse: { p: { results: { i: \"NetworkListItem\" } } },\n NetworksListSignalsResponse: { p: { results: { i: \"NetworkSignal\" } } },\n NetworksNotesListResponse: { p: { results: { i: \"NetworkNote\" } } },\n Organization: { p: { created_at: 1 } },\n PaginatedApplicationList: { p: { results: { i: \"Application\" } } },\n PaginatedOrganizationList: { p: { results: { i: \"Organization\" } } },\n PassiveLivenessCheckResponse: { p: { created_at: 1 } },\n PhoneRiskResponse: {\n p: { created_at: 1, phone: { p: { verified_at: 1, lifecycle: { i: \"RiskLifecycleEvent\" } } } },\n },\n PhoneVerificationCheckResponse: {\n p: {\n phone: { p: { verified_at: 1, lifecycle: { i: { p: { timestamp: 1 } } } } },\n created_at: 1,\n },\n },\n ProofOfAddressVerifyResponse: { p: { created_at: 1 } },\n QuestionnaireDetail: { p: { published_at: 1 } },\n QuestionnaireListItem: { p: { created_at: 1, updated_at: 1, published_at: 1 } },\n QuestionnairesListResponse: { p: { results: { i: \"QuestionnaireListItem\" } } },\n RegulatoryReportDetail: {\n p: { submission_date: 1, validated_at: 1, finalized_at: 1, created_at: 1, updated_at: 1 },\n },\n RegulatoryReportList: { p: { results: { i: \"RegulatoryReportDetail\" } } },\n ReportTemplateDetail: { p: { created_at: 1, updated_at: 1 } },\n ReportTemplatesListResponse: { p: { results: { i: \"ReportTemplateDetail\" } } },\n ReviewItem: { p: { created_at: 1 } },\n RiskLifecycleEvent: { p: { timestamp: 1 } },\n RoutingPublicationCaseRoutingRule: { p: { created_at: 1, updated_at: 1 } },\n RoutingPublicationPaginatedPolicyRevisionList: {\n p: { results: { i: \"RoutingPublicationPolicyRevision\" } },\n },\n RoutingPublicationPolicyDraft: { p: { updated_at: 1 } },\n RoutingPublicationPolicyDraftResponse: { p: { draft: \"RoutingPublicationPolicyDraft\" } },\n RoutingPublicationPolicyRevision: { p: { published_at: 1 } },\n SessionDecision: {\n p: {\n id_verifications: {\n i: {\n p: {\n id_lookup: { p: { checked_at: 1 } },\n wallet_verification: { p: { verified_at: 1 } },\n document_selfie_face_matches: { i: { p: { verification_date: 1 } } },\n matches: { i: { p: { verification_date: 1 } } },\n },\n },\n },\n nfc_verifications: {\n i: {\n p: {\n jpki: {\n p: {\n certificate_expires_at: 1,\n certificates: { i: { p: { not_valid_before: 1, not_valid_after: 1 } } },\n },\n },\n certificate_summary: { p: { not_valid_after: 1, not_valid_before: 1 } },\n },\n },\n },\n liveness_checks: { i: { p: { matches: { i: { p: { verification_date: 1 } } } } } },\n phone_verifications: {\n i: {\n p: {\n verified_at: 1,\n lifecycle: { i: { p: { timestamp: 1 } } },\n matches: { i: { p: { verification_date: 1 } } },\n },\n },\n },\n email_verifications: {\n i: {\n p: {\n verified_at: 1,\n lifecycle: { i: { p: { timestamp: 1 } } },\n matches: { i: { p: { verification_date: 1 } } },\n },\n },\n },\n document_ai_documents: { i: { p: { items: { i: { p: { created_at: 1 } } } } } },\n questionnaire_responses: { i: { p: { published_at: 1 } } },\n bank_verifications: { i: \"BankVerificationResult\" },\n signatures: { i: \"SignatureResult\" },\n aml_screenings: { i: \"AMLScreening\" },\n ip_analyses: { i: { p: { matches: { i: { p: { verification_date: 1 } } } } } },\n reviews: { i: { p: { created_at: 1 } } },\n created_at: 1,\n expires_at: 1,\n registry_checks: {\n i: {\n p: {\n company: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n },\n },\n },\n key_people_checks: {\n i: {\n p: {\n registry: {\n p: {\n officers: { i: { p: { kyc_verified_at: 1 } } },\n beneficial_owners: { i: { p: { kyc_verified_at: 1 } } },\n },\n },\n },\n },\n },\n document_verifications: { i: { p: { items: { i: { p: { created_at: 1 } } } } } },\n resubmissions: { i: { p: { created_at: 1 } } },\n biometric_consent: { p: { given_at: 1, declined_at: 1, face_data_deleted_at: 1 } },\n investigator: \"InvestigatorBlock\",\n },\n },\n SessionDeletionJob: { p: { created_at: 1, completed_at: 1 } },\n SessionEvent: { p: { created_at: 1 } },\n SessionImportError: { p: { created_at: 1 } },\n SessionImportJob: {\n p: {\n created_at: 1,\n updated_at: 1,\n started_at: 1,\n completed_at: 1,\n credentials_expires_at: 1,\n resumes_at: 1,\n lawful_basis_confirmed_at: 1,\n },\n },\n SessionWebhookDelivery: { p: { created_at: 1 } },\n SessionsBatchDeleteResponse: {\n p: { results: { i: { p: { biometric_template_expires_at: 1 } } } },\n },\n SessionsDeleteResponse: { p: { biometric_template_expires_at: 1 } },\n SessionsImportsListActiveJobsResponse: { p: { results: { i: \"ImportJobSummary\" } } },\n SessionsImportsListErrorsResponse: { p: { results: { i: \"SessionImportError\" } } },\n SessionsImportsListJobsResponse: { p: { results: { i: \"ImportJobSummary\" } } },\n SessionsListAmlScreeningHistoryResponse: { p: { results: { i: \"AMLScreeningRun\" } } },\n SessionsListEventsResponse: { p: { results: { i: \"SessionEvent\" } } },\n SessionsListFeatureOverridesResponse: {\n p: { flow_finished_at: 1, overrides: { i: \"FeatureStatusOverride\" } },\n },\n SessionsListResponse: { p: { results: { i: { p: { created_at: 1 } } } } },\n SessionsReviewsCreateResponse: { p: { created_at: 1 } },\n SessionsReviewsListResponse: { p: { results: { i: \"ReviewItem\" } } },\n SessionsSignaturesValidateResponse: { p: { signatures: { i: \"SignatureResult\" } } },\n SessionsUpdateFeatureStatusResponse: { p: { override: \"FeatureStatusOverride\" } },\n SessionsUpdateKybCompanyDataResponse: {\n p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 },\n },\n SignatureFieldResult: { p: { filled_at: 1 } },\n SignatureResult: {\n p: {\n certificate: { p: { valid_from: 1, valid_until: 1 } },\n confirmation: { p: { confirmed_at: 1 } },\n timestamp: { p: { time: 1 } },\n documents: {\n i: {\n p: { opened_at: 1, read_at: 1, consented_at: 1, fields: { i: \"SignatureFieldResult\" } },\n },\n },\n adopted_signature: { p: { adopted_at: 1 } },\n electronic_signature_consent_at: 1,\n validation: {\n p: {\n checked_at: 1,\n documents: {\n i: {\n p: {\n checked_at: 1,\n certificate: { p: { valid_from: 1, valid_until: 1 } },\n timestamp: { p: { time: 1 } },\n },\n },\n },\n },\n },\n declined_at: 1,\n signed_at: 1,\n expires_at: 1,\n email_sent_at: 1,\n },\n },\n TransactionDetail: {\n p: {\n txn_date: 1,\n documents: { i: { p: { created_at: 1 } } },\n activities: { i: { p: { occurred_at: 1 } } },\n alerts: { i: { p: { created_at: 1, due_at: 1 } } },\n rule_runs: { i: { p: { created_at: 1 } } },\n provider_results: { i: { p: { created_at: 1 } } },\n travel_rule: \"TransactionTravelRule\",\n action_required: \"TransactionWalletOwnershipAction\",\n },\n },\n TransactionNote: { p: { created_at: 1 } },\n TransactionRuleDetail: { p: { latest_triggered_at: 1, created_at: 1, updated_at: 1 } },\n TransactionSummary: { p: { txn_date: 1, created_at: 1 } },\n TransactionTravelRule: {\n p: {\n data_unmasked: \"TravelRuleDataUnmasked\",\n counterparty_vasp: { p: { dd_assessed_at: 1 } },\n delivery: \"TravelRuleDelivery\",\n discovery: { i: \"TravelRuleDiscoveryStep\" },\n },\n },\n TransactionWalletOwnershipAction: { p: { expires_at: 1 } },\n TransactionsCreateSdkTokenResponse: { p: { expires_at: 1 } },\n TransactionsListRelatedResponse: { p: { results: { i: \"TransactionSummary\" } } },\n TransactionsListResponse: {\n p: {\n results: { i: { p: { txn_date: 1, created_at: 1, travel_rule: \"TransactionTravelRule\" } } },\n },\n },\n TransactionsNotesListResponse: { p: { results: { i: \"TransactionNote\" } } },\n TransactionsRulesListResponse: { p: { results: { i: \"TransactionRuleDetail\" } } },\n TravelRuleCounterpartyContact: { p: { verified_at: 1, invalid_at: 1, created_at: 1 } },\n TravelRuleCounterpartyContactsListResponse: {\n p: { results: { i: \"TravelRuleCounterpartyContact\" } },\n },\n TravelRuleCounterpartyDecision: { p: { updated_at: 1 } },\n TravelRuleCounterpartyDecisionResponse: { p: { decision: \"TravelRuleCounterpartyDecision\" } },\n TravelRuleCounterpartyQuestionnaire: {\n p: { sent_at: 1, expires_at: 1, answered_at: 1, valid_until: 1 },\n },\n TravelRuleCounterpartyQuestionnaireList: {\n p: { questionnaires: { i: \"TravelRuleCounterpartyQuestionnaire\" } },\n },\n TravelRuleCounterpartyScreening: { p: { screened_at: 1 } },\n TravelRuleCounterpartyScreeningResult: { p: { screening: \"TravelRuleCounterpartyScreening\" } },\n TravelRuleCounterpartyScreeningStatus: { p: { screening: \"TravelRuleCounterpartyScreening\" } },\n TravelRuleDataUnmasked: { p: { at: 1 } },\n TravelRuleDelivery: { p: { next_attempt_at: 1, delivered_at: 1 } },\n TravelRuleDiscoveryStep: { p: { at: 1 } },\n TravelRuleInboundResponse: { p: { travel_rule: \"TravelRuleTransferDetail\" } },\n TravelRuleListVaspsResponse: { p: { results: { i: \"VaspDirectoryEntry\" } } },\n TravelRuleMessage: {\n p: { fulfilled_at: 1, attachment: \"TravelRuleMessageAttachment\", created_at: 1 },\n },\n TravelRuleMessageAttachment: { p: { created_at: 1 } },\n TravelRuleNetworkParticipant: {\n p: {\n requested_at: 1,\n submitted_at: 1,\n activated_at: 1,\n suspended_at: 1,\n history: { i: { p: { at: 1 } } },\n },\n },\n TravelRuleNetworkParticipantSummary: { p: { requested_at: 1, activated_at: 1 } },\n TravelRuleNetworkQuestionnaire: {\n p: { submitted_at: 1, reviewed_at: 1, history: { i: { p: { at: 1 } } }, updated_at: 1 },\n },\n TravelRuleNetworkState: { p: { participant: \"TravelRuleNetworkParticipantSummary\" } },\n TravelRuleNetworksOverview: {\n p: {\n questionnaire: \"TravelRuleNetworkQuestionnaire\",\n participants: { i: \"TravelRuleNetworkParticipant\" },\n networks: {\n p: {\n gtr: \"TravelRuleNetworkState\",\n trust: \"TravelRuleNetworkState\",\n verifyvasp: \"TravelRuleNetworkState\",\n sygna: \"TravelRuleNetworkState\",\n },\n },\n },\n },\n TravelRuleSettingsDetail: {\n p: {\n networks: {\n p: {\n gtr: \"TravelRuleNetworkState\",\n trust: \"TravelRuleNetworkState\",\n verifyvasp: \"TravelRuleNetworkState\",\n sygna: \"TravelRuleNetworkState\",\n },\n },\n },\n },\n TravelRuleTestVaspInboundResponse: { p: { travel_rule: \"TravelRuleTransferDetail\" } },\n TravelRuleTransferDetail: {\n p: {\n deadline_at: 1,\n timeline: { i: { p: { at: 1 } } },\n counterparty_vasp: { p: { dd_assessed_at: 1 } },\n data_unmasked: \"TravelRuleDataUnmasked\",\n created_at: 1,\n delivery: \"TravelRuleDelivery\",\n discovery: { i: \"TravelRuleDiscoveryStep\" },\n },\n },\n TravelRuleTransferRow: { p: { txn_date: 1, deadline_at: 1, created_at: 1 } },\n TravelRuleTransfersListResponse: { p: { results: { i: \"TravelRuleTransferRow\" } } },\n TravelRuleWalletAddressesListResponse: { p: { results: { i: \"WalletAddressEntry\" } } },\n TravelRuleWalletProofReview: { p: { method_chosen_at: 1, decided_at: 1, created_at: 1 } },\n TravelRuleWalletProofsListResponse: { p: { results: { i: \"TravelRuleWalletProofReview\" } } },\n TravelRuleWidgetSessionResponse: { p: { expires_at: 1 } },\n TravelRuleWorkspace: {\n p: {\n joined_at: 1,\n claim: { p: { claimed_at: 1, reviewed_at: 1 } },\n domain: { p: { verified_at: 1 } },\n billing_enabled_at: 1,\n settings: \"TravelRuleSettingsDetail\",\n },\n },\n UserDetailItem: {\n p: {\n last_session_at: 1,\n first_session_at: 1,\n last_activity_at: 1,\n tags: { i: { p: { tag: { p: { created_at: 1, updated_at: 1 } }, created_at: 1 } } },\n created_at: 1,\n comments: { i: { p: { created_at: 1 } } },\n updated_at: 1,\n },\n },\n UserListItem: {\n p: { last_session_at: 1, first_session_at: 1, last_activity_at: 1, created_at: 1 },\n },\n UserSessionListItem: { p: { created_at: 1 } },\n UsersCreateResponse: {\n p: {\n last_session_at: 1,\n first_session_at: 1,\n last_activity_at: 1,\n tags: { i: { p: { tag: { p: { created_at: 1, updated_at: 1 } }, created_at: 1 } } },\n created_at: 1,\n comments: { i: { p: { created_at: 1 } } },\n updated_at: 1,\n },\n },\n UsersListResponse: { p: { results: { i: \"UserListItem\" } } },\n UsersUploadFaceResponse: { p: { created_at: 1 } },\n VaspDirectoryEntry: {\n p: {\n networks: { i: { p: { verified_at: 1, last_seen_at: 1 } } },\n contacts: { i: { p: { verified_at: 1 } } },\n dd_assessed_at: 1,\n responsiveness: { p: { computed_at: 1 } },\n essential_checks: { p: { checked_at: 1 } },\n decision: \"TravelRuleCounterpartyDecision\",\n entity_screening: \"TravelRuleCounterpartyScreening\",\n questionnaires: { i: \"TravelRuleCounterpartyQuestionnaire\" },\n },\n },\n WalletAddressEntry: { p: { created_at: 1 } },\n WebhookConfig: { p: { endpoints: { i: \"WebhookConfigDestination\" } } },\n WebhookConfigDestination: { p: { created_at: 1, updated_at: 1 } },\n WebhookDestinationDelivery: { p: { created_at: 1 } },\n WebhookDestinationDeliveryDetail: { p: { created_at: 1 } },\n WebhooksDestinationsCreateResponse: {\n p: {\n previous_secret_expires_at: 1,\n created_at: 1,\n updated_at: 1,\n failing_since: 1,\n last_success_at: 1,\n summary: { p: { last_delivery_at: 1 } },\n },\n },\n WebhooksDestinationsListDeliveriesResponse: {\n p: { results: { i: \"WebhookDestinationDelivery\" } },\n },\n WebhooksDestinationsRetrieveResponse: {\n p: {\n previous_secret_expires_at: 1,\n created_at: 1,\n updated_at: 1,\n failing_since: 1,\n last_success_at: 1,\n summary: { p: { last_delivery_at: 1 } },\n },\n },\n WebhooksDestinationsUpdateResponse: {\n p: {\n previous_secret_expires_at: 1,\n created_at: 1,\n updated_at: 1,\n failing_since: 1,\n last_success_at: 1,\n summary: { p: { last_delivery_at: 1 } },\n },\n },\n WorkflowDetail: { p: { published_at: 1, created_at: 1, updated_at: 1 } },\n WorkflowListItem: { p: { updated_at: 1 } },\n WorkflowsListResponse: { p: { results: { i: \"WorkflowListItem\" } } },\n};\n","import type { APIClient } from \"./api-client.js\";\n\n/** Base of every resource class: holds the client that sends its requests. */\nexport abstract class APIResource {\n protected readonly _client: APIClient;\n\n constructor(client: APIClient) {\n this._client = client;\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n AccountApplicationsCreateParams,\n AccountApplicationsListParams,\n AccountApplicationsUpdateParams,\n AccountLoginParams,\n AccountOrganizationsListParams,\n AccountRegisterParams,\n AccountResendOtpParams,\n AccountResendOtpResponse,\n AccountVerifyEmailParams,\n} from \"../types/account.js\";\nimport type {\n Application,\n LoginResponse,\n Organization,\n PaginatedApplicationList,\n PaginatedOrganizationList,\n RegisterResponse,\n VerifyEmailResponse,\n} from \"../types/components.js\";\n\nconst ACCOUNT_APPLICATIONS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/organizations/me/{org_id}/applications/\",\n api: \"account\",\n auth: \"account_token\",\n body: \"json\",\n dates: \"Application\",\n};\nconst ACCOUNT_APPLICATIONS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/organizations/me/{org_id}/applications/\",\n api: \"account\",\n auth: \"account_token\",\n query: [\"limit\", \"offset\"],\n dates: \"PaginatedApplicationList\",\n};\nconst ACCOUNT_APPLICATIONS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/organizations/me/{org_id}/applications/{app_id}/\",\n api: \"account\",\n auth: \"account_token\",\n dates: \"Application\",\n};\nconst ACCOUNT_APPLICATIONS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/organizations/me/{org_id}/applications/{app_id}/\",\n api: \"account\",\n auth: \"account_token\",\n body: \"json\",\n dates: \"Application\",\n};\nconst ACCOUNT_ORGANIZATIONS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/organizations/me/\",\n api: \"account\",\n auth: \"account_token\",\n query: [\"limit\", \"offset\"],\n dates: \"PaginatedOrganizationList\",\n};\nconst ACCOUNT_LOGIN: OperationSpec = {\n method: \"POST\",\n path: \"/programmatic/login/\",\n api: \"account\",\n auth: \"none\",\n body: \"json\",\n};\nconst ACCOUNT_REGISTER: OperationSpec = {\n method: \"POST\",\n path: \"/programmatic/register/\",\n api: \"account\",\n auth: \"none\",\n body: \"json\",\n};\nconst ACCOUNT_RESEND_OTP: OperationSpec = {\n method: \"POST\",\n path: \"/programmatic/resend-otp/\",\n api: \"account\",\n auth: \"none\",\n body: \"json\",\n};\nconst ACCOUNT_VERIFY_EMAIL: OperationSpec = {\n method: \"POST\",\n path: \"/programmatic/verify-email/\",\n api: \"account\",\n auth: \"none\",\n body: \"json\",\n};\n\n/** `account.applications` */\nexport class AccountApplications extends APIResource {\n /**\n * Create Application\n *\n * Create an application inside an organization. The response includes `api_key`; persist it now (recoverable via GET). Requires owner/admin JWT.\n *\n * `POST /organizations/me/{org_id}/applications/`\n *\n * @param orgId UUID of the organization. Look it up with `GET /organizations/me/`.\n */\n create(\n orgId: string,\n params: AccountApplicationsCreateParams = {},\n options?: RequestOptions,\n ): APIPromise<Application> {\n return this._client.request(ACCOUNT_APPLICATIONS_CREATE, [orgId], params, options);\n }\n\n /**\n * List the organization's applications\n *\n * List the organization's applications, 50 per page by default. Use this to discover `app_id` values when recovering credentials from a new machine, then call `GET /organizations/me/{org_id}/applications/{app_id}/` for the API key. Requires an owner or admin Bearer token.\n *\n * `GET /organizations/me/{org_id}/applications/`\n *\n * @param orgId UUID of the organization. Look it up with `GET /organizations/me/`.\n */\n list(\n orgId: string,\n params: AccountApplicationsListParams = {},\n options?: RequestOptions,\n ): PagePromise<PaginatedApplicationList, Application> {\n return this._client.requestPage(ACCOUNT_APPLICATIONS_LIST, [orgId], params, options);\n }\n\n /**\n * Get Application Credentials\n *\n * Read one application's full record including `client_id` and `api_key`. Use this to recover a lost `api_key`.\n *\n * `GET /organizations/me/{org_id}/applications/{app_id}/`\n *\n * @param orgId UUID of the organization that owns the application.\n * @param appId UUID of the application whose credentials you want to read.\n */\n retrieve(orgId: string, appId: string, options?: RequestOptions): APIPromise<Application> {\n return this._client.request(ACCOUNT_APPLICATIONS_RETRIEVE, [orgId, appId], undefined, options);\n }\n\n /**\n * Update Application\n *\n * Update application metadata (name, URLs, redirect URIs). `api_key` and `client_id` are never rotated. `products` is read-only: a `products` key in the body is ignored. Requires owner/admin JWT.\n *\n * `PATCH /organizations/me/{org_id}/applications/{app_id}/`\n *\n * @param orgId UUID of the organization that owns the application.\n * @param appId UUID of the application to update.\n */\n update(\n orgId: string,\n appId: string,\n params: AccountApplicationsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<Application> {\n return this._client.request(ACCOUNT_APPLICATIONS_UPDATE, [orgId, appId], params, options);\n }\n}\n\n/** `account.organizations` */\nexport class AccountOrganizations extends APIResource {\n /**\n * List My Organizations\n *\n * List organizations the authenticated user belongs to. Each entry's `uuid` is the `org_id` used on the application endpoints.\n *\n * `GET /organizations/me/`\n */\n list(\n params: AccountOrganizationsListParams = {},\n options?: RequestOptions,\n ): PagePromise<PaginatedOrganizationList, Organization> {\n return this._client.requestPage(ACCOUNT_ORGANIZATIONS_LIST, [], params, options);\n }\n}\n\n/** `account` */\nexport class Account extends APIResource {\n readonly applications: AccountApplications = new AccountApplications(this._client);\n readonly organizations: AccountOrganizations = new AccountOrganizations(this._client);\n\n /**\n * Programmatic Login\n *\n * Authenticate any verified email/password Didit account and receive an RS256 JWT pair (default lifetime 86400s). Console-created email/password accounts can use this endpoint; OAuth-only console accounts must set a password first.\n *\n * `POST /programmatic/login/`\n */\n login(params: AccountLoginParams, options?: RequestOptions): APIPromise<LoginResponse> {\n return this._client.request(ACCOUNT_LOGIN, [], params, options);\n }\n\n /**\n * Register Account\n *\n * Step 1 of programmatic onboarding. Creates a pending account and emails a 6-char code (10 min TTL). The address is checked before any account is created: one that cannot receive the code returns 400 `email_undeliverable`. Rate limits: 5/IP/hour, plus a shared hourly budget per network (/24 for IPv4, /64 for IPv6).\n *\n * `POST /programmatic/register/`\n */\n register(params: AccountRegisterParams, options?: RequestOptions): APIPromise<RegisterResponse> {\n return this._client.request(ACCOUNT_REGISTER, [], params, options);\n }\n\n /**\n * Resend the email verification code\n *\n * Resend the 6-character verification code for an unverified programmatic account. Requires the account's email and password so only the owner can trigger a new code (no console Basic Auth). A fresh code replaces the previous one and is valid for 10 minutes.\n *\n * Rate limits: a per-email cooldown of 60 seconds between resends (HTTP 429 with `Retry-After`), and the same 5-per-IP-per-hour and per-network hourly budgets as registration.\n *\n * `POST /programmatic/resend-otp/`\n */\n resendOtp(\n params: AccountResendOtpParams,\n options?: RequestOptions,\n ): APIPromise<AccountResendOtpResponse> {\n return this._client.request(ACCOUNT_RESEND_OTP, [], params, options);\n }\n\n /**\n * Verify Email and Issue Credentials\n *\n * Step 2 of onboarding. Exchanges the 6-char code for a verified account, a default org+app, and a JWT pair. Persist the returned `api_key`.\n *\n * `POST /programmatic/verify-email/`\n */\n verifyEmail(\n params: AccountVerifyEmailParams,\n options?: RequestOptions,\n ): APIPromise<VerifyEmailResponse> {\n return this._client.request(ACCOUNT_VERIFY_EMAIL, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { AddressValidationValidateParams } from \"../types/address-validation.js\";\nimport type { AddressValidationResponse } from \"../types/components.js\";\n\nconst ADDRESS_VALIDATION_VALIDATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/address-validation/\",\n body: \"json\",\n dates: \"AddressValidationResponse\",\n};\n\n/** `address_validation` */\nexport class AddressValidation extends APIResource {\n /**\n * Validate an address\n *\n * Confirm that an address exists and get it back normalised: its delivery lines, components and coordinates. It confirms the address only; it never links the address to a person.\n *\n * **Request.** Send the address on one line (`address`) or as structured fields (`address_line_1` and, optionally, `address_line_2`, `city`, `region`, `postal_code`), never both, and always its `country` (ISO 3166-1 alpha-2 or alpha-3).\n *\n * **Result.** `address_validation.status` is `verified` (confirmed to the building), `partially_verified` (confirmed only to the street or above), `not_verified` (only the region or city matched, or nothing did) or `unavailable` (the validation could not run). HTTP is `200` for every completed request, `unavailable` included; retry an `unavailable` result later.\n *\n * **Billing.** A live call costs $0.10 per validated address. An `unavailable` result is not charged. Nothing is stored apart from the usage record: no session is created and the result is returned only in this response.\n *\n * **Sandbox.** Sandbox keys validate the request and always return a deterministic `verified` result that echoes the address sent, without consuming credits.\n *\n * **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests per minute per API key across all POST/PATCH/DELETE endpoints.\n *\n * `POST /v3/address-validation/`\n */\n validate(\n params: AddressValidationValidateParams,\n options?: RequestOptions,\n ): APIPromise<AddressValidationResponse> {\n return this._client.request(ADDRESS_VALIDATION_VALIDATE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n AgeEstimationEstimateParams,\n AgeEstimationEstimateResponse,\n} from \"../types/age-estimation.js\";\n\nconst AGE_ESTIMATION_ESTIMATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/age-estimation/\",\n body: \"multipart\",\n files: [\"user_image\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `age_estimation` */\nexport class AgeEstimation extends APIResource {\n /**\n * Age Estimation (face age + passive liveness)\n *\n * Estimate a person's age from a single face photo and run a passive liveness check in the same call - returns the model-predicted `age_estimation` (in years), a liveness `score` (0–100), and an `Approved`/`Declined` `status`. The age is **model-predicted from the face, not verified against a document** - use it for age gates and low-friction checks, not as legal proof of age.\n *\n * **How it works.** The image is analyzed for faces (set `rotate_image=true` if captures may be sideways or upside down); each detected face gets an estimated age, and the largest face in the frame drives `age_estimation`. In parallel, a passive liveness model scores whether the photo shows a live person (no user challenge required) and detects presentation attacks (photos of photos, screens, masks). Submit one clear, front-facing, well-lit face per image for best results.\n *\n * **Decision logic.** Any warning declines: `status` is `Approved` only when the `warnings` array is empty. A liveness `score` at or below `face_liveness_score_decline_threshold` (default `30`) adds `LOW_LIVENESS_SCORE`; a detected attack adds `LIVENESS_FACE_ATTACK`; no face found by the liveness model adds `NO_FACE_DETECTED`; no estimable face age adds `AGE_NOT_DETECTED` (`age_estimation` is `null`); an estimated age below `age_estimation_decline_threshold` (default `18`) adds `AGE_BELOW_MINIMUM`. Borderline ages near your threshold deserve a fallback to document-based verification - the model's error grows for faces close to the limit.\n *\n * **Billing.** Each `200` response consumes one Age Estimation API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the not-enough-credits error before any image processing.\n *\n * **Session persistence (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session: it appears in the Business Console, the returned `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/` (the result is exposed there in `liveness_checks[]`, with `features: [\"AGE_ESTIMATION\"]`), the face crop and reference image are stored, the face embedding is added to your application's face index (used by face search and duplicate detection), and a `status.updated` webhook is emitted. When `false`, nothing is stored and `request_id` is a one-off correlation UUID that cannot be looked up later.\n *\n * **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload (`age_estimation: 30`, no warnings), no session is persisted, and no credits are consumed.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * `POST /v3/age-estimation/`\n */\n estimate(\n params: AgeEstimationEstimateParams,\n options?: RequestOptions,\n ): APIPromise<AgeEstimationEstimateResponse> {\n return this._client.request(AGE_ESTIMATION_ESTIMATE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n AmlRetrieveDatasetFreshnessResponse,\n AmlScreenParams,\n AmlScreenResponse,\n} from \"../types/aml.js\";\n\nconst AML_RETRIEVE_DATASET_FRESHNESS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/aml/dataset-freshness/\",\n dates: { p: { dataset_freshness: \"AMLDatasetFreshness\" } },\n};\nconst AML_SCREEN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/aml/\",\n body: \"json\",\n dates: {\n p: { aml: { p: { hits: { i: { p: { first_seen: 1, last_seen: 1 } } } } }, created_at: 1 },\n },\n};\n\n/** `aml` */\nexport class Aml extends APIResource {\n /**\n * Get AML dataset freshness\n *\n * Report how current the datasets behind AML screening are, per source family (`sanctions`, `pep`, `warnings`, `adverse_media`), as audit evidence for [ongoing AML monitoring](https://docs.didit.me/core-technology/aml-screening/continuous-monitoring-aml-screening#proving-that-monitoring-ran). The answer is platform-wide: no session in the path, no customer data in the body, the same answer for every application.\n *\n * Always `200` for an accepted key. Check `availability` first: when it is not `available`, `dataset_freshness` is `null`. Dates are never estimated: a family whose datasets reported no date is absent from `sources`, and a family where only some datasets reported one has `oldest_updated_at: null`. Readings are taken while ongoing monitoring runs, not on each call; `captured_at` says when.\n *\n * A scoped API key needs `sessions: read`; a key limited to some workflows or to approved sessions cannot call this endpoint. Nothing is billed.\n *\n * `GET /v3/aml/dataset-freshness/`\n */\n retrieveDatasetFreshness(\n options?: RequestOptions,\n ): APIPromise<AmlRetrieveDatasetFreshnessResponse> {\n return this._client.request(AML_RETRIEVE_DATASET_FRESHNESS, [], undefined, options);\n }\n\n /**\n * AML screening (standalone)\n *\n * Screen a person or company against PEP, sanctions, warning/watchlist, and adverse-media datasets in one call.\n *\n * **Two-score model.** Each hit carries a `match_score` (0–100, identity confidence) and a `risk_score` (0–100, entity risk). Hits whose `match_score` is below `aml_match_score_threshold` (default **93**) are tagged `review_status: \"False Positive\"` and ignored for risk purposes; the highest `risk_score` among the remaining hits becomes `aml.score`. The final `aml.status` follows your thresholds: `score` > `aml_score_review_threshold` (default **100**) → `Declined`; `score` > `aml_score_approve_threshold` (default **80**) → `In Review`; otherwise `Approved`. Whenever `score` is non-zero and ≥ the approve threshold a `POSSIBLE_MATCH_FOUND` warning is added (a score of exactly 0 never warns).\n *\n * **Match-score weights.** `aml_name_weight` + `aml_dob_weight` + `aml_country_weight` must sum to exactly 100 (defaults 60/25/15). Components missing from the request are re-normalized away; a matching `document_number` acts as a golden key that overrides `match_score` to 100.\n *\n * **Latency.** Plain screenings typically complete in a few seconds. With `include_adverse_media=true` the API waits for adverse-media enrichment (an initial ~5 s pause plus up to ~25 s of polling) - configure a client timeout of **at least 60 seconds**.\n *\n * **Persistence.** `save_api_request` defaults to **true**: the screening is stored as a session (`request_id` works with `GET /v3/session/{sessionId}/decision/`), it appears in the console, a `status.updated` webhook fires, and hit review statuses can be updated later. With `save_api_request=false` nothing is stored and `request_id` is a transient correlation id. `include_ongoing_monitoring=true` keeps re-screening the profile and requires `save_api_request=true` (enforced with a `400`).\n *\n * **Idempotency.** Send an `Idempotency-Key` header when retrying after a timeout or transient error. The key is scoped to your application and the exact request body. The first completed request stores its response; later identical retries return that same response and do not run or bill another AML screening. If the original request is still running, retry later with the same key. If the same key is reused with a different body, the API returns `409`.\n *\n * **Billing.** One AML API credit is charged after the first successful screening. Replayed idempotent responses are not charged again; an insufficient balance returns `403` before any new screening happens.\n *\n * **Sandbox.** Keys from sandbox applications skip screening and billing entirely and return a mocked result - `Approved` with zero hits unless you pass `sandbox_scenario`. `save_api_request` works the same as on live keys, so a saved sandbox screening is retrievable through `GET /v3/session/{sessionId}/decision/` and `GET /v3/session/{sessionId}/generate-pdf/`.\n *\n * `POST /v3/aml/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n screen(params: AmlScreenParams, options?: RequestOptions): APIPromise<AmlScreenResponse> {\n return this._client.request(AML_SCREEN, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { AmlMonitoringRetrieveJobResponse } from \"../types/aml-monitoring.js\";\n\nconst AML_MONITORING_RETRIEVE_JOB: OperationSpec = {\n method: \"GET\",\n path: \"/v3/aml-monitoring/jobs/{job_id}/\",\n dates: { p: { created_at: 1, completed_at: 1 } },\n};\n\n/** `aml_monitoring` */\nexport class AmlMonitoring extends APIResource {\n /**\n * Get AML ongoing monitoring job\n *\n * Status, outcome counters and per-record results of a monitoring toggle job started from `POST /v3/users/aml-monitoring/` or `POST /v3/businesses/aml-monitoring/`. Poll every couple of seconds while `status` is `PENDING` or `PROCESSING`; `results` is complete once it is `COMPLETED`.\n *\n * `GET /v3/aml-monitoring/jobs/{job_id}/`\n *\n * @param jobId The `job_id` returned by the toggle endpoint.\n */\n retrieveJob(\n jobId: string,\n options?: RequestOptions,\n ): APIPromise<AmlMonitoringRetrieveJobResponse> {\n return this._client.request(AML_MONITORING_RETRIEVE_JOB, [jobId], undefined, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { AnalyticsRetrieveParams } from \"../types/analytics.js\";\nimport type {\n ApplicationAnalyticsSummary,\n ApplicationAnalyticsWidgetResponse,\n} from \"../types/components.js\";\n\nconst ANALYTICS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/analytics/\",\n scope: \"application\",\n query: [\n \"start_date\",\n \"end_date\",\n \"scope\",\n \"widget_keys\",\n \"workflow_ids\",\n \"versions\",\n \"branch_path_ids\",\n \"tag\",\n \"transaction_type\",\n \"action_type\",\n ],\n};\n\n/** `analytics` */\nexport class Analytics extends APIResource {\n /**\n * Get application analytics\n *\n * Read the numbers behind the Business Console [analytics dashboard](https://docs.didit.me/console/analytics) for a date range. Without `scope` and `widget_keys` the response is the user verification (KYC) summary (`ApplicationAnalyticsSummary`): daily session counts, status totals, conversion rate, the same figures for the preceding period of equal length, locations, demographics, devices, workflow funnels, active verification time, resubmissions, warnings and time series. With `scope` or `widget_keys` it is the widgets of one dashboard tab (`ApplicationAnalyticsWidgetResponse`): `kyc`, `kyb`, `transactions` or `home`.\n *\n * Session counts are by session creation date (UTC) and reflect each session's current status. They come from daily rollups refreshed in the background, so the newest activity can take a short while to appear. Invalid workflow IDs and versions are ignored rather than rejected. Nothing is billed.\n *\n * Only a full-access API key can call this endpoint: every scoped key gets `403`, whatever access it holds, and so does a key of another application. See [API keys](https://docs.didit.me/console/api-keys).\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/analytics/`\n */\n retrieve(\n params: AnalyticsRetrieveParams = {},\n options?: RequestOptions,\n ): APIPromise<ApplicationAnalyticsSummary | ApplicationAnalyticsWidgetResponse> {\n return this._client.request(ANALYTICS_RETRIEVE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { BankAccountCheckParams } from \"../types/bank.js\";\nimport type { BankAccountCheckResponse } from \"../types/components.js\";\n\nconst BANK_ACCOUNT_CHECK: OperationSpec = {\n method: \"POST\",\n path: \"/v3/bank/account-check/\",\n body: \"json\",\n dates: \"BankAccountCheckResponse\",\n};\n\n/** `bank` */\nexport class Bank extends APIResource {\n /**\n * Check a bank account\n *\n * Check that a bank account belongs to the person or company you name, before you send money to it. No session and no sign-in: send the name and the account, read the result. It is the [account check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.\n *\n * **What you send.** The account's `country` (ISO 3166-1 alpha-3), the `account` the way that country writes it, and the `holder` name: `full_name` for a person or `business_name` for a company. A business name checks a business account.\n *\n * **What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `account` comes back masked to its last 4 characters.\n *\n * **Billing.** Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a `no_match`, an account that does not exist and a `cannot_verify` are billed too. A request answered with an error is never billed.\n *\n * **Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response.\n *\n * **Sandbox.** A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`, `0005` a `503` and `0009` a `400`. Any other ending is a `match`.\n *\n * **API keys.** A scoped API key needs write access to sessions.\n *\n * `POST /v3/bank/account-check/`\n */\n accountCheck(\n params: BankAccountCheckParams,\n options?: RequestOptions,\n ): APIPromise<BankAccountCheckResponse> {\n return this._client.request(BANK_ACCOUNT_CHECK, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n BillingRetrieveBalanceResponse,\n BillingTopUpParams,\n BillingTopUpResponse,\n} from \"../types/billing.js\";\n\nconst BILLING_RETRIEVE_BALANCE: OperationSpec = { method: \"GET\", path: \"/v3/billing/balance/\" };\nconst BILLING_TOP_UP: OperationSpec = { method: \"POST\", path: \"/v3/billing/top-up/\", body: \"json\" };\n\n/** `billing` */\nexport class Billing extends APIResource {\n /**\n * Get credit balance\n *\n * Get current pre-paid credit balance in USD (organization-wide) plus auto-refill config. Amounts are decimal strings - parse with a decimal library.\n *\n * `GET /v3/billing/balance/`\n */\n retrieveBalance(options?: RequestOptions): APIPromise<BillingRetrieveBalanceResponse> {\n return this._client.request(BILLING_RETRIEVE_BALANCE, [], undefined, options);\n }\n\n /**\n * Top up credits\n *\n * Add credits via a hosted Stripe Checkout session (**\\$50 to \\$10,000** per top-up). Top-ups are available on the Free, Growth and Scale plans, added at face value with no discount or bonus, and last 12 months; Enterprise annual contracts cannot top up. Redirect the customer to the returned `checkout_session_url`.\n *\n * `POST /v3/billing/top-up/`\n */\n topUp(params: BillingTopUpParams, options?: RequestOptions): APIPromise<BillingTopUpResponse> {\n return this._client.request(BILLING_TOP_UP, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n BiometricTemplatesBatchDeleteParams,\n BiometricTemplatesBatchDeleteResponse,\n BiometricTemplatesCountParams,\n BiometricTemplatesCountResponse,\n BiometricTemplatesDeleteResponse,\n BiometricTemplatesListParams,\n BiometricTemplatesListResponse,\n BiometricTemplatesListResponseResults,\n BiometricTemplatesRetrieveResponse,\n} from \"../types/biometric-templates.js\";\n\nconst BIOMETRIC_TEMPLATES_BATCH_DELETE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/biometric-templates/delete/\",\n body: \"json\",\n};\nconst BIOMETRIC_TEMPLATES_COUNT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/biometric-templates/count/\",\n query: [\n \"vendor_data\",\n \"vendor_user_uuid\",\n \"status\",\n \"source_type\",\n \"retained_from\",\n \"retained_to\",\n ],\n};\nconst BIOMETRIC_TEMPLATES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/biometric-templates/{template_uuid}/\",\n};\nconst BIOMETRIC_TEMPLATES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/biometric-templates/\",\n query: [\n \"vendor_data\",\n \"vendor_user_uuid\",\n \"status\",\n \"source_type\",\n \"retained_from\",\n \"retained_to\",\n \"ordering\",\n \"limit\",\n \"offset\",\n ],\n dates: { p: { results: { i: { p: { retained_at: 1, expires_at: 1, purged_at: 1 } } } } },\n};\nconst BIOMETRIC_TEMPLATES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/biometric-templates/{template_uuid}/\",\n dates: { p: { retained_at: 1, expires_at: 1, purged_at: 1 } },\n};\n\n/** `biometric_templates` */\nexport class BiometricTemplates extends APIResource {\n /**\n * Bulk purge retained biometric templates\n *\n * An opted-in application keeps one separately managed, image-free face biometric template anchored to the User when a session is deleted (see `DELETE /v3/session/{sessionId}/delete/`). Templates are biometric data with a finite `expires_at`; they never contain images, session data, or identity fields, and they are purged on User deletion, privacy erasure, expiry, or an explicit purge. These endpoints accept application API keys (`x-api-key`) only; Business Console user tokens are rejected with `403`.\n *\n * Purges many templates in one call, by explicit id list or with `delete_all: true` optionally narrowed by the same filters as the list endpoint. Templates are purged one by one and each result reports `purged` or `already_purged`. If a biometric store is unavailable the call returns `503` at the first failing template: templates purged earlier in the request stay purged, the failing one moves to `purge_failed` (already excluded from matching), and repeating the request finishes the job.\n *\n * **`delete_all: true` without filters purges every biometric template in the application and cannot be undone.** Run the count endpoint with the same filters first.\n *\n * `POST /v3/biometric-templates/delete/`\n */\n batchDelete(\n params: BiometricTemplatesBatchDeleteParams = {},\n options?: RequestOptions,\n ): APIPromise<BiometricTemplatesBatchDeleteResponse> {\n return this._client.request(BIOMETRIC_TEMPLATES_BATCH_DELETE, [], params, options);\n }\n\n /**\n * Count retained biometric templates\n *\n * An opted-in application keeps one separately managed, image-free face biometric template anchored to the User when a session is deleted (see `DELETE /v3/session/{sessionId}/delete/`). Templates are biometric data with a finite `expires_at`; they never contain images, session data, or identity fields, and they are purged on User deletion, privacy erasure, expiry, or an explicit purge. These endpoints accept application API keys (`x-api-key`) only; Business Console user tokens are rejected with `403`.\n *\n * Returns the number of templates matching the same filters as the list endpoint. Use it to check what a filtered bulk purge with `delete_all: true` would touch.\n *\n * `GET /v3/biometric-templates/count/`\n */\n count(\n params: BiometricTemplatesCountParams = {},\n options?: RequestOptions,\n ): APIPromise<BiometricTemplatesCountResponse> {\n return this._client.request(BIOMETRIC_TEMPLATES_COUNT, [], params, options);\n }\n\n /**\n * Purge a retained biometric template\n *\n * An opted-in application keeps one separately managed, image-free face biometric template anchored to the User when a session is deleted (see `DELETE /v3/session/{sessionId}/delete/`). Templates are biometric data with a finite `expires_at`; they never contain images, session data, or identity fields, and they are purged on User deletion, privacy erasure, expiry, or an explicit purge. These endpoints accept application API keys (`x-api-key`) only; Business Console user tokens are rejected with `403`.\n *\n * Purges one template: it is removed from every kind of matching and the stored template is deleted. Irreversible and recorded on the audit trail with the acting principal.\n *\n * **Retry semantics:** Didit deletes the stored template first and only then marks the template purged. If a biometric store is unavailable the call returns `503`, the template moves to `status: purge_failed` and is already excluded from matching; repeat the same call to finish. Repeating a purge of an already purged template returns `already_purged`.\n *\n * Templates are also purged by `POST /v3/users/delete/` for the owning User, by any deletion of that User's sessions with `deletion_instruction: privacy_erasure`, and automatically at `expires_at`.\n *\n * `DELETE /v3/biometric-templates/{template_uuid}/`\n *\n * @param templateUuid Template id, as returned in `biometric_template_uuid` by the session deletion endpoints, `biometric_template_id` on a Face Search match, or the list endpoint.\n */\n delete(\n templateUuid: string,\n options?: RequestOptions,\n ): APIPromise<BiometricTemplatesDeleteResponse> {\n return this._client.request(BIOMETRIC_TEMPLATES_DELETE, [templateUuid], undefined, options);\n }\n\n /**\n * List retained biometric templates\n *\n * An opted-in application keeps one separately managed, image-free face biometric template anchored to the User when a session is deleted (see `DELETE /v3/session/{sessionId}/delete/`). Templates are biometric data with a finite `expires_at`; they never contain images, session data, or identity fields, and they are purged on User deletion, privacy erasure, expiry, or an explicit purge. These endpoints accept application API keys (`x-api-key`) only; Business Console user tokens are rejected with `403`.\n *\n * Returns a paginated list of the templates the application currently holds. Purged templates are not listed.\n *\n * `GET /v3/biometric-templates/`\n */\n list(\n params: BiometricTemplatesListParams = {},\n options?: RequestOptions,\n ): PagePromise<BiometricTemplatesListResponse, BiometricTemplatesListResponseResults> {\n return this._client.requestPage(BIOMETRIC_TEMPLATES_LIST, [], params, options);\n }\n\n /**\n * Get a retained biometric template\n *\n * An opted-in application keeps one separately managed, image-free face biometric template anchored to the User when a session is deleted (see `DELETE /v3/session/{sessionId}/delete/`). Templates are biometric data with a finite `expires_at`; they never contain images, session data, or identity fields, and they are purged on User deletion, privacy erasure, expiry, or an explicit purge. These endpoints accept application API keys (`x-api-key`) only; Business Console user tokens are rejected with `403`.\n *\n * Returns one template. The response never includes an image, a vector, the deleted session's id, or identity data.\n *\n * `GET /v3/biometric-templates/{template_uuid}/`\n *\n * @param templateUuid Template id, as returned in `biometric_template_uuid` by the session deletion endpoints, `biometric_template_id` on a Face Search match, or the list endpoint.\n */\n retrieve(\n templateUuid: string,\n options?: RequestOptions,\n ): APIPromise<BiometricTemplatesRetrieveResponse> {\n return this._client.request(BIOMETRIC_TEMPLATES_RETRIEVE, [templateUuid], undefined, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n BlocklistAddParams,\n BlocklistAddResponse,\n BlocklistListParams,\n BlocklistListResponse,\n BlocklistRemoveParams,\n BlocklistRemoveResponse,\n} from \"../types/blocklist.js\";\nimport type { BlocklistedItem } from \"../types/components.js\";\n\nconst BLOCKLIST_ADD: OperationSpec = { method: \"POST\", path: \"/v3/blocklist/add/\", body: \"json\" };\nconst BLOCKLIST_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/blocklist/\",\n query: [\"item_type\", \"limit\", \"offset\"],\n dates: { p: { results: { i: \"BlocklistedItem\" } } },\n};\nconst BLOCKLIST_REMOVE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/blocklist/remove/\",\n body: \"json\",\n};\n\n/** `blocklist` */\nexport class Blocklist extends APIResource {\n /**\n * Add session items to the blocklist\n *\n * Blocklists the face, identity document, phone number or email address of one person verification session of the application. For each selected type, Didit takes the session's most recent record, flags it as blocklisted and adds an entry linked to the session to the matching system blocklist (`added_by: \"api\"`), so new sessions with a matching face, document number, phone number or email address are declined. Every selected item is checked first, so if one is missing nothing is blocklisted; repeating the call for an item already listed keeps its single entry and refreshes `blocklisted_at`. The session itself and sessions that already finished are not changed. A scoped API key needs `workflows: write`.\n *\n * `POST /v3/blocklist/add/`\n */\n add(params: BlocklistAddParams, options?: RequestOptions): APIPromise<BlocklistAddResponse> {\n return this._client.request(BLOCKLIST_ADD, [], params, options);\n }\n\n /**\n * List blocklisted items\n *\n * Returns one paginated feed of the faces, identity documents, phone numbers and email addresses of the application's verification sessions that are currently blocklisted, newest `blocklisted_at` first; filter with `item_type`. Items of deleted sessions are not included. The feed covers records blocklisted from a session (with [Add session items to the blocklist](https://docs.didit.me/management-api/blocklist/add), from the console, or by a list entry created from a session); values added to a list by hand, uploaded faces, faces from a document-capture selfie and the other entry types are read with [List list entries](https://docs.didit.me/management-api/lists/list-entries). `face_image` and `front_image` are short-lived signed URLs, and a scoped API key without `media: read` receives `null`. A scoped API key needs `workflows: read`.\n *\n * `GET /v3/blocklist/`\n */\n list(\n params: BlocklistListParams = {},\n options?: RequestOptions,\n ): PagePromise<BlocklistListResponse, BlocklistedItem> {\n return this._client.requestPage(BLOCKLIST_LIST, [], params, options);\n }\n\n /**\n * Remove session items from the blocklist\n *\n * Lifts the block on the face, identity document, phone number or email address of one person verification session of the application. For each selected type, Didit takes the session's most recent record, clears its blocklisted flag and deletes the system blocklist entries created from that record, so it no longer declines new sessions. Entries added to a list by value are not touched: find them with [List list entries](https://docs.didit.me/management-api/lists/list-entries) and delete them with [Delete a list entry](https://docs.didit.me/management-api/lists/delete-entry). Unblocking a record that is not blocklisted succeeds and changes nothing, and sessions that already finished are not changed. A scoped API key needs `workflows: write`.\n *\n * `POST /v3/blocklist/remove/`\n */\n remove(\n params: BlocklistRemoveParams,\n options?: RequestOptions,\n ): APIPromise<BlocklistRemoveResponse> {\n return this._client.request(BLOCKLIST_REMOVE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { EntityNetworkMembershipList } from \"../types/components.js\";\n\nconst BUSINESS_SESSIONS_LIST_NETWORKS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/business-sessions/{business_session_id}/networks/\",\n scope: \"application\",\n dates: \"EntityNetworkMembershipList\",\n};\n\n/** `business_sessions` */\nexport class BusinessSessions extends APIResource {\n /**\n * List networks for a business session\n *\n * List the networks the business session's vendor business belongs to.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/business-sessions/{business_session_id}/networks/`\n *\n * @param businessSessionId Business session UUID.\n */\n listNetworks(\n businessSessionId: string,\n options?: RequestOptions,\n ): APIPromise<EntityNetworkMembershipList> {\n return this._client.request(\n BUSINESS_SESSIONS_LIST_NETWORKS,\n [businessSessionId],\n undefined,\n options,\n );\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n BusinessesBatchDeleteParams,\n BusinessesBatchDeleteResponse,\n BusinessesCreateParams,\n BusinessesListParams,\n BusinessesListResponse,\n BusinessesSetAmlMonitoringParams,\n BusinessesSetOngoingMonitoringParams,\n BusinessesSetSessionOngoingMonitoringParams,\n BusinessesUpdateParams,\n BusinessesUpdateStatusParams,\n} from \"../types/businesses.js\";\nimport type {\n AMLMonitoringJob,\n AMLMonitoringToggleResult,\n BusinessDetailItem,\n BusinessListItem,\n EntityNetworkMembershipList,\n OngoingMonitoringJob,\n OngoingMonitoringToggleResult,\n} from \"../types/components.js\";\n\nconst BUSINESSES_BATCH_DELETE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/businesses/delete/\",\n body: \"json\",\n};\nconst BUSINESSES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/businesses/create/\",\n body: \"json\",\n dates: \"BusinessDetailItem\",\n};\nconst BUSINESSES_GENERATE_SESSION_PDF: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/businesses/{business_session_id}/pdf/\",\n scope: \"application\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst BUSINESSES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/businesses/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"BusinessListItem\" } } },\n};\nconst BUSINESSES_LIST_NETWORKS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/businesses/{vendor_business_uuid}/networks/\",\n scope: \"application\",\n dates: \"EntityNetworkMembershipList\",\n};\nconst BUSINESSES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/businesses/{vendor_data}/\",\n dates: \"BusinessDetailItem\",\n};\nconst BUSINESSES_RETRIEVE_ONGOING_MONITORING_JOB: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/vendor-businesses/toggle-ongoing-monitoring/{job_id}/\",\n scope: \"application\",\n};\nconst BUSINESSES_RETRIEVE_SESSION_ONGOING_MONITORING_JOB: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/businesses/toggle-ongoing-monitoring/{job_id}/\",\n scope: \"application\",\n};\nconst BUSINESSES_SET_AML_MONITORING: OperationSpec = {\n method: \"POST\",\n path: \"/v3/businesses/aml-monitoring/\",\n body: \"json\",\n dates: \"AMLMonitoringToggleResult\",\n};\nconst BUSINESSES_SET_ONGOING_MONITORING: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/vendor-businesses/toggle-ongoing-monitoring/\",\n scope: \"application\",\n body: \"json\",\n};\nconst BUSINESSES_SET_SESSION_ONGOING_MONITORING: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/businesses/toggle-ongoing-monitoring/\",\n scope: \"application\",\n body: \"json\",\n};\nconst BUSINESSES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/businesses/{vendor_data}/\",\n body: \"json\",\n dates: \"BusinessDetailItem\",\n};\nconst BUSINESSES_UPDATE_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/businesses/{vendor_data}/update-status/\",\n body: \"json\",\n dates: \"BusinessDetailItem\",\n};\n\n/** `businesses` */\nexport class Businesses extends APIResource {\n /**\n * Batch delete businesses\n *\n * **Permanently delete** businesses - this cannot be undone. For blocking prefer [Update Business Status](#patch-/v3/businesses/-vendor_data-/update-status/) with `BLOCKED`.\n *\n * **Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.\n *\n * `POST /v3/businesses/delete/`\n */\n batchDelete(\n params: BusinessesBatchDeleteParams = {},\n options?: RequestOptions,\n ): APIPromise<BusinessesBatchDeleteResponse> {\n return this._client.request(BUSINESSES_BATCH_DELETE, [], params, options);\n }\n\n /**\n * Create business\n *\n * Pre-create a [business](/entities/businesses) *without* a KYB session. All fields are optional, but you should always send `vendor_data` - without it the record cannot be linked to sessions or transactions. When provided, `vendor_data` must be unique among non-deleted businesses (exact match; conflicts return 400). Not idempotent.\n *\n * `POST /v3/businesses/create/`\n */\n create(\n params: BusinessesCreateParams = {},\n options?: RequestOptions,\n ): APIPromise<BusinessDetailItem> {\n return this._client.request(BUSINESSES_CREATE, [], params, options);\n }\n\n /**\n * Download a business session PDF report\n *\n * Render the PDF report of one Business Verification (KYB) session: company registry data, key people and beneficial owners, documents, AML results and the other workflow features, plus the session's tags and review activity. With white-label customization on, the report carries your logo and privacy policy URL. The body is the PDF itself (`application/pdf`), not JSON.\n *\n * The session must be `Approved`, `Declined` or `In Review`; any other status returns `403`, so wait for the `status.updated` [webhook](https://docs.didit.me/integration/webhooks) first. The report is rendered on every call and nothing is billed, so store the file instead of fetching it repeatedly. `GET /v3/session/{sessionId}/generate-pdf/` renders the same kind of report by session ID alone.\n *\n * A PDF report counts as media: a scoped API key needs `businesses: read` and `media: read`, and a key limited to some workflows or to approved sessions cannot call it.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/businesses/{business_session_id}/pdf/`\n *\n * @param businessSessionId `session_id` of the Business Verification (KYB) session, as returned when the session was created. A session of another application returns `404`.\n */\n generateSessionPdf(businessSessionId: string, options?: RequestOptions): APIPromise<Blob> {\n return this._client.request(\n BUSINESSES_GENERATE_SESSION_PDF,\n [businessSessionId],\n undefined,\n options,\n );\n }\n\n /**\n * List businesses\n *\n * List [businesses](/entities/businesses) Didit assembles from KYB sessions sharing the same `vendor_data` (free-form string, NOT a UUID), plus businesses created via the API. Paginated, ordered by `last_session_at` desc. This endpoint does not support filtering or search parameters - fetch pages and filter client-side.\n *\n * `GET /v3/businesses/`\n */\n list(\n params: BusinessesListParams = {},\n options?: RequestOptions,\n ): PagePromise<BusinessesListResponse, BusinessListItem> {\n return this._client.requestPage(BUSINESSES_LIST, [], params, options);\n }\n\n /**\n * List networks for a business\n *\n * List the networks a vendor business belongs to.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/businesses/{vendor_business_uuid}/networks/`\n *\n * @param vendorBusinessUuid Vendor business UUID.\n */\n listNetworks(\n vendorBusinessUuid: string,\n options?: RequestOptions,\n ): APIPromise<EntityNetworkMembershipList> {\n return this._client.request(BUSINESSES_LIST_NETWORKS, [vendorBusinessUuid], undefined, options);\n }\n\n /**\n * Get business\n *\n * Fetch one [business](/entities/businesses) by `vendor_data` (exact match). Adds `metadata` and `updated_at` to the list view. Deleted businesses return 404.\n *\n * `GET /v3/businesses/{vendor_data}/`\n *\n * @param vendorData Your unique identifier for the business - a free-form string (NOT a UUID), matched exactly as sent.\n */\n retrieve(vendorData: string, options?: RequestOptions): APIPromise<BusinessDetailItem> {\n return this._client.request(BUSINESSES_RETRIEVE, [vendorData], undefined, options);\n }\n\n /**\n * Get AML ongoing monitoring job\n *\n * Progress and per-outcome counters of a monitoring toggle job. Poll every couple of seconds while status is PENDING or PROCESSING.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/vendor-businesses/toggle-ongoing-monitoring/{job_id}/`\n *\n * @param jobId Monitoring job UUID returned by the toggle endpoint.\n */\n retrieveOngoingMonitoringJob(\n jobId: string,\n options?: RequestOptions,\n ): APIPromise<OngoingMonitoringJob> {\n return this._client.request(\n BUSINESSES_RETRIEVE_ONGOING_MONITORING_JOB,\n [jobId],\n undefined,\n options,\n );\n }\n\n /**\n * Get AML ongoing monitoring job\n *\n * Progress and per-outcome counters of a monitoring toggle job. Poll every couple of seconds while status is PENDING or PROCESSING.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/businesses/toggle-ongoing-monitoring/{job_id}/`\n *\n * @param jobId Monitoring job UUID returned by the toggle endpoint.\n */\n retrieveSessionOngoingMonitoringJob(\n jobId: string,\n options?: RequestOptions,\n ): APIPromise<OngoingMonitoringJob> {\n return this._client.request(\n BUSINESSES_RETRIEVE_SESSION_ONGOING_MONITORING_JOB,\n [jobId],\n undefined,\n options,\n );\n }\n\n /**\n * Enable or disable AML ongoing monitoring for businesses\n *\n * Turns AML ongoing monitoring on or off for the selected businesses, with the same semantics as the Business Console. Exactly one monitored AML screening is kept per business, so a profile that verified several times is monitored and billed once; disabling turns monitoring off across all of the profile's screenings. Businesses without any AML screening are screened first (billed as a regular AML screening) when they have the legal or display name needed; otherwise they are reported as `skipped_no_identity_data`.\n *\n * Set `estimate_only: true` to preview counts and costs without writing anything. Selections of 20 profiles or fewer resolve inline and return `200` with the completed job; larger selections return `202` and run in the background - poll [Get AML monitoring job](#get-/v3/aml-monitoring/jobs/-job_id-/) with the returned `job_id`. Enabling is refused with `403` when the organization balance does not cover the estimate. Identifiers that match nothing are listed in `unmatched` and never fail the request: a selection that matches nothing completes as an empty job (`total` 0), the same convention as the batch delete endpoints.\n *\n * `POST /v3/businesses/aml-monitoring/`\n */\n setAmlMonitoring(\n params: BusinessesSetAmlMonitoringParams,\n options?: RequestOptions,\n ): APIPromise<AMLMonitoringToggleResult | AMLMonitoringJob> {\n return this._client.request(BUSINESSES_SET_AML_MONITORING, [], params, options);\n }\n\n /**\n * Toggle AML ongoing monitoring for businesses\n *\n * Business-level equivalent of the user toggle: one monitored AML screening per business, with businesses lacking any AML screening screened first (company entity). Same estimate_only, inline fast-path and async job contract.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/vendor-businesses/toggle-ongoing-monitoring/`\n */\n setOngoingMonitoring(\n params: BusinessesSetOngoingMonitoringParams,\n options?: RequestOptions,\n ): APIPromise<OngoingMonitoringToggleResult | OngoingMonitoringJob> {\n return this._client.request(BUSINESSES_SET_ONGOING_MONITORING, [], params, options);\n }\n\n /**\n * Toggle AML ongoing monitoring for business sessions\n *\n * Session-level toggle for KYB verifications, addressed by session number. Sessions without an AML screening get one created and attached to the session itself. Same estimate_only, inline fast-path and async job contract as the user-level endpoints. Replaces the legacy synchronous behavior that skipped sessions without an AML screening.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/businesses/toggle-ongoing-monitoring/`\n */\n setSessionOngoingMonitoring(\n params: BusinessesSetSessionOngoingMonitoringParams,\n options?: RequestOptions,\n ): APIPromise<OngoingMonitoringToggleResult | OngoingMonitoringJob> {\n return this._client.request(BUSINESSES_SET_SESSION_ONGOING_MONITORING, [], params, options);\n }\n\n /**\n * Update business\n *\n * Partial update of a business: `display_name`, `legal_name`, `registration_number`, `country_code`, `status`, `metadata`. `metadata` fully replaces. Setting `status` to `BLOCKED` adds the `vendor_data` to the system blocklist; moving away from `BLOCKED` removes that entry. Every edit is recorded in the company's activity: a status change with the optional `reason`, and a change to `display_name`, `legal_name`, `registration_number`, `country_code` or `metadata` as a profile update.\n *\n * `PATCH /v3/businesses/{vendor_data}/`\n *\n * @param vendorData Your unique identifier for the business (free-form string, NOT a UUID).\n */\n update(\n vendorData: string,\n params: BusinessesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<BusinessDetailItem> {\n return this._client.request(BUSINESSES_UPDATE, [vendorData], params, options);\n }\n\n /**\n * Update business status\n *\n * Flip only the lifecycle `status` of a business: `ACTIVE`, `FLAGGED` or `BLOCKED` (not session statuses). `BLOCKED` adds the `vendor_data` to the system blocklist; moving away from `BLOCKED` removes that entry. Each change is recorded in the company's activity, with the optional `reason`. Sending the current status changes nothing and records no `reason`. The `business.status.updated` webhook does not carry `reason`.\n *\n * `PATCH /v3/businesses/{vendor_data}/update-status/`\n *\n * @param vendorData Your unique identifier for the business (free-form string, NOT a UUID).\n */\n updateStatus(\n vendorData: string,\n params: BusinessesUpdateStatusParams,\n options?: RequestOptions,\n ): APIPromise<BusinessDetailItem> {\n return this._client.request(BUSINESSES_UPDATE_STATUS, [vendorData], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n CasesApplyEntityActionParams,\n CasesAssignParams,\n CasesBlueprintsCreateParams,\n CasesBlueprintsDiscardDraftParams,\n CasesBlueprintsInstallPresetsParams,\n CasesBlueprintsListHistoryParams,\n CasesBlueprintsListParams,\n CasesBlueprintsListPresetsResponse,\n CasesBlueprintsListResponse,\n CasesBlueprintsPublishParams,\n CasesBlueprintsSaveDraftParams,\n CasesBlueprintsUpdateParams,\n CasesBulkAssignParams,\n CasesBulkUpdateStatusParams,\n CasesChecklistToggleItemParams,\n CasesCreateParams,\n CasesFindDuplicatesParams,\n CasesLinksCreateParams,\n CasesListActionReceiptsParams,\n CasesListEventsParams,\n CasesListEventsResponse,\n CasesListParams,\n CasesListResponse,\n CasesListReviewersResponse,\n CasesNotesCreateAttachmentUploadParams,\n CasesNotesCreateAttachmentUploadResponse,\n CasesNotesCreateParams,\n CasesNotesListParams,\n CasesNotesRetrieveAttachmentUrlParams,\n CasesNotesRetrieveAttachmentUrlResponse,\n CasesNotesUpdateParams,\n CasesPrintResponse,\n CasesRegulatoryReportsCreateParams,\n CasesRegulatoryReportsListParams,\n CasesRejectResolutionParams,\n CasesRequestsCreateParams,\n CasesRequestsListParams,\n CasesRequestsPreviewParams,\n CasesRequestsRemindResponse,\n CasesResolveParams,\n CasesRetrieveStatisticsParams,\n CasesRetrieveStatisticsResponse,\n CasesRoutingRulesCreateParams,\n CasesRoutingRulesDiscardDraftParams,\n CasesRoutingRulesListHistoryParams,\n CasesRoutingRulesListParams,\n CasesRoutingRulesListResponse,\n CasesRoutingRulesPreviewParams,\n CasesRoutingRulesPublishParams,\n CasesRoutingRulesSaveDraftParams,\n CasesRoutingRulesUpdateParams,\n CasesTeamsCreateParams,\n CasesTeamsListParams,\n CasesTeamsListResponse,\n CasesTeamsUpdateParams,\n CasesTransferParams,\n CasesUpdateParams,\n} from \"../types/cases.js\";\nimport type {\n AMLScreening,\n CaseActionCaseActionReceipt,\n CaseActionCaseActionReceiptPage,\n CaseActionCaseEntityActionResult,\n CaseBlueprintDetail,\n CaseBlueprintListItem,\n CaseBlueprintPresetInstallResult,\n CaseBulkUpdateResult,\n CaseChecklistItem,\n CaseCollaborationCaseNote,\n CaseCollaborationPaginatedCaseNoteList,\n CaseDetail,\n CaseDuplicateCaseDuplicatePage,\n CaseEvent,\n CaseLink,\n CaseListItem,\n CasePublicationCaseBlueprint,\n CasePublicationPaginatedPolicyRevisionList,\n CasePublicationPolicyDraft,\n CasePublicationPolicyDraftResponse,\n CasePublicationPolicyRevision,\n CaseReviewTeam,\n CaseRoutingPreview,\n CaseRoutingRule,\n CustomerMessagingCaseRequest,\n CustomerMessagingCaseRequestOptions,\n CustomerMessagingCaseRequestPreviewResponse,\n CustomerMessagingPaginatedCaseRequestList,\n RegulatoryReportDetail,\n RegulatoryReportList,\n RoutingPublicationCaseRoutingRule,\n RoutingPublicationPaginatedPolicyRevisionList,\n RoutingPublicationPolicyDraft,\n RoutingPublicationPolicyDraftResponse,\n RoutingPublicationPolicyRevision,\n} from \"../types/components.js\";\n\nconst CASES_BLUEPRINTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseBlueprintDetail\",\n};\nconst CASES_BLUEPRINTS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/\",\n scope: \"application\",\n response: \"none\",\n};\nconst CASES_BLUEPRINTS_DISCARD_DRAFT: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/\",\n scope: \"application\",\n body: \"json\",\n response: \"none\",\n};\nconst CASES_BLUEPRINTS_INSTALL_PRESETS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/presets/install/\",\n scope: \"application\",\n body: \"json\",\n};\nconst CASES_BLUEPRINTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"CaseBlueprintListItem\" } } },\n};\nconst CASES_BLUEPRINTS_LIST_HISTORY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/history/\",\n scope: \"application\",\n query: [\"ordering\", \"limit\", \"offset\"],\n dates: \"CasePublicationPaginatedPolicyRevisionList\",\n};\nconst CASES_BLUEPRINTS_LIST_PRESETS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/presets/\",\n scope: \"application\",\n};\nconst CASES_BLUEPRINTS_PUBLISH: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/publish/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CasePublicationCaseBlueprint\",\n};\nconst CASES_BLUEPRINTS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/\",\n scope: \"application\",\n dates: \"CaseBlueprintDetail\",\n};\nconst CASES_BLUEPRINTS_RETRIEVE_DRAFT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/\",\n scope: \"application\",\n dates: \"CasePublicationPolicyDraftResponse\",\n};\nconst CASES_BLUEPRINTS_SAVE_DRAFT: OperationSpec = {\n method: \"PUT\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CasePublicationPolicyDraft\",\n};\nconst CASES_BLUEPRINTS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseBlueprintDetail\",\n};\nconst CASES_CHECKLIST_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/checklist/\",\n scope: \"application\",\n dates: { i: \"CaseChecklistItem\" },\n};\nconst CASES_CHECKLIST_TOGGLE_ITEM: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/checklist/{item_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseChecklistItem\",\n};\nconst CASES_LINKS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseLink\",\n};\nconst CASES_LINKS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/{link_uuid}/\",\n scope: \"application\",\n response: \"none\",\n};\nconst CASES_LINKS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/\",\n scope: \"application\",\n dates: { i: \"CaseLink\" },\n};\nconst CASES_NOTES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseCollaborationCaseNote\",\n};\nconst CASES_NOTES_CREATE_ATTACHMENT_UPLOAD: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/presign/\",\n scope: \"application\",\n body: \"multipart\",\n files: [\"file\"],\n};\nconst CASES_NOTES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/{note_uuid}/\",\n scope: \"application\",\n response: \"none\",\n};\nconst CASES_NOTES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/\",\n scope: \"application\",\n query: [\"ordering\", \"limit\", \"offset\"],\n dates: \"CaseCollaborationPaginatedCaseNoteList\",\n};\nconst CASES_NOTES_RETRIEVE_ATTACHMENT_URL: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/presign/\",\n scope: \"application\",\n query: [\"s3_key\"],\n};\nconst CASES_NOTES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/{note_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseCollaborationCaseNote\",\n};\nconst CASES_REGULATORY_REPORTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/\",\n scope: \"application\",\n body: \"json\",\n dates: \"RegulatoryReportDetail\",\n};\nconst CASES_REGULATORY_REPORTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: \"RegulatoryReportList\",\n};\nconst CASES_REQUESTS_CANCEL: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/cancel/\",\n scope: \"application\",\n dates: \"CustomerMessagingCaseRequest\",\n};\nconst CASES_REQUESTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CustomerMessagingCaseRequest\",\n};\nconst CASES_REQUESTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/\",\n scope: \"application\",\n query: [\"ordering\", \"limit\", \"offset\"],\n dates: \"CustomerMessagingPaginatedCaseRequestList\",\n};\nconst CASES_REQUESTS_PREVIEW: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/preview/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CustomerMessagingCaseRequestPreviewResponse\",\n};\nconst CASES_REQUESTS_REMIND: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/remind/\",\n scope: \"application\",\n dates: { p: { request: \"CustomerMessagingCaseRequest\", reminded_at: 1, next_reminder_at: 1 } },\n};\nconst CASES_REQUESTS_RETRIEVE_ATTACHMENT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/attachment/\",\n scope: \"application\",\n response: \"binary\",\n accept: \"image/jpeg\",\n};\nconst CASES_REQUESTS_RETRIEVE_OPTIONS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/options/\",\n scope: \"application\",\n dates: \"CustomerMessagingCaseRequestOptions\",\n};\nconst CASES_ROUTING_RULES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseRoutingRule\",\n};\nconst CASES_ROUTING_RULES_DISCARD_DRAFT: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/\",\n scope: \"application\",\n body: \"json\",\n response: \"none\",\n};\nconst CASES_ROUTING_RULES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"CaseRoutingRule\" } } },\n};\nconst CASES_ROUTING_RULES_LIST_HISTORY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/history/\",\n scope: \"application\",\n query: [\"ordering\", \"limit\", \"offset\"],\n dates: \"RoutingPublicationPaginatedPolicyRevisionList\",\n};\nconst CASES_ROUTING_RULES_PREVIEW: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/preview/\",\n scope: \"application\",\n body: \"json\",\n};\nconst CASES_ROUTING_RULES_PUBLISH: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/publish/\",\n scope: \"application\",\n body: \"json\",\n dates: \"RoutingPublicationCaseRoutingRule\",\n};\nconst CASES_ROUTING_RULES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/\",\n scope: \"application\",\n dates: \"CaseRoutingRule\",\n};\nconst CASES_ROUTING_RULES_RETRIEVE_DRAFT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/\",\n scope: \"application\",\n dates: \"RoutingPublicationPolicyDraftResponse\",\n};\nconst CASES_ROUTING_RULES_SAVE_DRAFT: OperationSpec = {\n method: \"PUT\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/\",\n scope: \"application\",\n body: \"json\",\n dates: \"RoutingPublicationPolicyDraft\",\n};\nconst CASES_ROUTING_RULES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseRoutingRule\",\n};\nconst CASES_TEAMS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/teams/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseReviewTeam\",\n};\nconst CASES_TEAMS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/teams/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"CaseReviewTeam\" } } },\n};\nconst CASES_TEAMS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/teams/{record_uuid}/\",\n scope: \"application\",\n dates: \"CaseReviewTeam\",\n};\nconst CASES_TEAMS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/teams/{record_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseReviewTeam\",\n};\nconst CASES_APPLY_ENTITY_ACTION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/entity-actions/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseActionCaseEntityActionResult\",\n};\nconst CASES_APPROVE_RESOLUTION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/approve/\",\n scope: \"application\",\n dates: \"CaseDetail\",\n};\nconst CASES_ASSIGN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/assign/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDetail\",\n};\nconst CASES_BULK_ASSIGN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/bulk/assign/\",\n scope: \"application\",\n body: \"json\",\n};\nconst CASES_BULK_UPDATE_STATUS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/bulk/status/\",\n scope: \"application\",\n body: \"json\",\n};\nconst CASES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDetail\",\n};\nconst CASES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/\",\n scope: \"application\",\n response: \"none\",\n};\nconst CASES_ESCALATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/escalate/\",\n scope: \"application\",\n dates: \"CaseDetail\",\n};\nconst CASES_FIND_DUPLICATES: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/duplicates/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDuplicateCaseDuplicatePage\",\n};\nconst CASES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/\",\n scope: \"application\",\n query: [\n \"limit\",\n \"offset\",\n \"status__in\",\n \"priority\",\n \"source__in\",\n \"blueprint\",\n \"assigned_to\",\n \"unassigned\",\n \"tag\",\n \"search\",\n \"date_from\",\n \"date_to\",\n \"due_before\",\n \"overdue\",\n \"ordering\",\n ],\n dates: { p: { results: { i: \"CaseListItem\" } } },\n};\nconst CASES_LIST_ACTION_RECEIPTS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/\",\n scope: \"application\",\n query: [\"offset\"],\n dates: \"CaseActionCaseActionReceiptPage\",\n};\nconst CASES_LIST_AML_HITS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/aml/\",\n scope: \"application\",\n dates: { i: \"AMLScreening\" },\n};\nconst CASES_LIST_EVENTS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/events/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"CaseEvent\" } } },\n};\nconst CASES_LIST_REVIEWERS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/reviewers/\",\n scope: \"application\",\n};\nconst CASES_PRINT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/print/\",\n scope: \"application\",\n};\nconst CASES_REJECT_RESOLUTION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/reject-approval/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDetail\",\n};\nconst CASES_REOPEN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/reopen/\",\n scope: \"application\",\n dates: \"CaseDetail\",\n};\nconst CASES_REQUEST_INFO: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/request-info/\",\n scope: \"application\",\n dates: \"CaseDetail\",\n};\nconst CASES_RESOLVE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/resolve/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDetail\",\n};\nconst CASES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/\",\n scope: \"application\",\n dates: \"CaseDetail\",\n};\nconst CASES_RETRIEVE_STATISTICS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/statistics/\",\n scope: \"application\",\n query: [\"date_from\", \"date_to\", \"blueprint\", \"assigned_to\", \"priority\", \"source\", \"status\"],\n};\nconst CASES_RETRY_ACTION_RECEIPT: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/{receipt_uuid}/retry/\",\n scope: \"application\",\n dates: \"CaseActionCaseActionReceipt\",\n};\nconst CASES_TRANSFER: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/transfer/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDetail\",\n};\nconst CASES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"CaseDetail\",\n};\n\n/** `cases.blueprints` */\nexport class CasesBlueprints extends APIResource {\n /**\n * Create blueprint\n *\n * Create a case blueprint: general settings (assignment, escalation, transfer, 4-eyes pairing) plus content_config, the six sections that drive the case page. Set publish=false to create an unpublished draft; Publish creates its first live version. Discarding a never-published draft deletes it.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/`\n */\n create(\n params: CasesBlueprintsCreateParams,\n options?: RequestOptions,\n ): APIPromise<CaseBlueprintDetail> {\n return this._client.request(CASES_BLUEPRINTS_CREATE, [], params, options);\n }\n\n /**\n * Delete blueprint\n *\n * Delete a blueprint. Deletion always succeeds and does not touch the blueprint's cases: existing cases keep their blueprint reference and its settings continue to apply to them. A deleted blueprint no longer appears in blueprint lists and can no longer be chosen as a transfer target; if a maker blueprint is deleted while a resolution is pending 4-eyes approval, a rejected resolution leaves the case on the checker blueprint.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/`\n *\n * @param blueprintUuid Blueprint UUID.\n */\n delete(blueprintUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(CASES_BLUEPRINTS_DELETE, [blueprintUuid], undefined, options);\n }\n\n /**\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/`\n *\n * @param blueprintUuid blueprint_uuid\n */\n discardDraft(\n blueprintUuid: string,\n params: CasesBlueprintsDiscardDraftParams,\n options?: RequestOptions,\n ): APIPromise<void> {\n return this._client.request(CASES_BLUEPRINTS_DISCARD_DRAFT, [blueprintUuid], params, options);\n }\n\n /**\n * Install blueprint presets\n *\n * Copy one or more presets into the application as editable blueprints. Idempotent per preset_key; omit preset_keys to install every preset not yet installed.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/presets/install/`\n */\n installPresets(\n params: CasesBlueprintsInstallPresetsParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseBlueprintPresetInstallResult> {\n return this._client.request(CASES_BLUEPRINTS_INSTALL_PRESETS, [], params, options);\n }\n\n /**\n * List blueprints\n *\n * List case blueprints for the application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/`\n */\n list(\n params: CasesBlueprintsListParams = {},\n options?: RequestOptions,\n ): PagePromise<CasesBlueprintsListResponse, CaseBlueprintListItem> {\n return this._client.requestPage(CASES_BLUEPRINTS_LIST, [], params, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/history/`\n *\n * @param blueprintUuid blueprint_uuid\n */\n listHistory(\n blueprintUuid: string,\n params: CasesBlueprintsListHistoryParams = {},\n options?: RequestOptions,\n ): PagePromise<CasePublicationPaginatedPolicyRevisionList, CasePublicationPolicyRevision> {\n return this._client.requestPage(\n CASES_BLUEPRINTS_LIST_HISTORY,\n [blueprintUuid],\n params,\n options,\n );\n }\n\n /**\n * List blueprint presets\n *\n * List the four built-in presets (Screening hit, AML investigation, Suspicious activity, KYC review) with their content_config and whether each is already installed on this application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/presets/`\n */\n listPresets(options?: RequestOptions): APIPromise<CasesBlueprintsListPresetsResponse> {\n return this._client.request(CASES_BLUEPRINTS_LIST_PRESETS, [], undefined, options);\n }\n\n /**\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/publish/`\n *\n * @param blueprintUuid blueprint_uuid\n */\n publish(\n blueprintUuid: string,\n params: CasesBlueprintsPublishParams,\n options?: RequestOptions,\n ): APIPromise<CasePublicationCaseBlueprint> {\n return this._client.request(CASES_BLUEPRINTS_PUBLISH, [blueprintUuid], params, options);\n }\n\n /**\n * Get blueprint\n *\n * Retrieve a blueprint, including its connected creation sources (AML config, transaction rules, workflow nodes) and which blueprints escalate to it.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/`\n *\n * @param blueprintUuid Blueprint UUID.\n */\n retrieve(blueprintUuid: string, options?: RequestOptions): APIPromise<CaseBlueprintDetail> {\n return this._client.request(CASES_BLUEPRINTS_RETRIEVE, [blueprintUuid], undefined, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/`\n *\n * @param blueprintUuid blueprint_uuid\n */\n retrieveDraft(\n blueprintUuid: string,\n options?: RequestOptions,\n ): APIPromise<CasePublicationPolicyDraftResponse> {\n return this._client.request(\n CASES_BLUEPRINTS_RETRIEVE_DRAFT,\n [blueprintUuid],\n undefined,\n options,\n );\n }\n\n /**\n * `PUT /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/`\n *\n * @param blueprintUuid blueprint_uuid\n */\n saveDraft(\n blueprintUuid: string,\n params: CasesBlueprintsSaveDraftParams,\n options?: RequestOptions,\n ): APIPromise<CasePublicationPolicyDraft> {\n return this._client.request(CASES_BLUEPRINTS_SAVE_DRAFT, [blueprintUuid], params, options);\n }\n\n /**\n * Update blueprint\n *\n * Partially update a blueprint's general settings or content_config.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/`\n *\n * @param blueprintUuid Blueprint UUID.\n */\n update(\n blueprintUuid: string,\n params: CasesBlueprintsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseBlueprintDetail> {\n return this._client.request(CASES_BLUEPRINTS_UPDATE, [blueprintUuid], params, options);\n }\n}\n\n/** `cases.checklist` */\nexport class CasesChecklist extends APIResource {\n /**\n * List case checklist\n *\n * List the case's checklist items, copied from the blueprint's content_config.checklist.items at creation, ordered.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/checklist/`\n *\n * @param caseUuid Case UUID.\n */\n list(caseUuid: string, options?: RequestOptions): APIPromise<CaseChecklistItem[]> {\n return this._client.request(CASES_CHECKLIST_LIST, [caseUuid], undefined, options);\n }\n\n /**\n * Toggle checklist item\n *\n * Mark a checklist item complete or incomplete. Resolution is blocked while any item is incomplete, unless the blueprint marks the checklist optional.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/checklist/{item_uuid}/`\n *\n * @param caseUuid Case UUID.\n * @param itemUuid Checklist item UUID.\n */\n toggleItem(\n caseUuid: string,\n itemUuid: string,\n params: CasesChecklistToggleItemParams,\n options?: RequestOptions,\n ): APIPromise<CaseChecklistItem> {\n return this._client.request(CASES_CHECKLIST_TOGGLE_ITEM, [caseUuid, itemUuid], params, options);\n }\n}\n\n/** `cases.links` */\nexport class CasesLinks extends APIResource {\n /**\n * Add case link\n *\n * Attach a session, business session, or transaction to the case. Rejected with 400 if the entity belongs to a different subject than the case.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/`\n *\n * @param caseUuid Case UUID.\n */\n create(\n caseUuid: string,\n params: CasesLinksCreateParams,\n options?: RequestOptions,\n ): APIPromise<CaseLink> {\n return this._client.request(CASES_LINKS_CREATE, [caseUuid], params, options);\n }\n\n /**\n * Remove case link\n *\n * Detach a linked session, business session, or transaction from the case.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/{link_uuid}/`\n *\n * @param caseUuid Case UUID.\n * @param linkUuid Link UUID.\n */\n delete(caseUuid: string, linkUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(CASES_LINKS_DELETE, [caseUuid, linkUuid], undefined, options);\n }\n\n /**\n * List case links\n *\n * List sessions, business sessions, and transactions attached to the case.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/links/`\n *\n * @param caseUuid Case UUID.\n */\n list(caseUuid: string, options?: RequestOptions): APIPromise<CaseLink[]> {\n return this._client.request(CASES_LINKS_LIST, [caseUuid], undefined, options);\n }\n}\n\n/** `cases.notes` */\nexport class CasesNotes extends APIResource {\n /**\n * Add a case-scoped note. An optional client_reference makes an unchanged retry return the same note without duplicate activity or notifications. reply_to must identify a live note in this case. The response includes a bounded parent excerpt without copying that excerpt into the saved reply.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/`\n *\n * @param caseUuid case_uuid\n */\n create(\n caseUuid: string,\n params: CasesNotesCreateParams,\n options?: RequestOptions,\n ): APIPromise<CaseCollaborationCaseNote> {\n return this._client.request(CASES_NOTES_CREATE, [caseUuid], params, options);\n }\n\n /**\n * Upload note attachment\n *\n * Upload a file (JPEG, PNG, WebP, PDF, plain text, or CSV; max 5 MB) to attach to a note. Returns the s3_key to pass in the note's attachments array.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/presign/`\n *\n * @param caseUuid Case UUID.\n */\n createAttachmentUpload(\n caseUuid: string,\n params: CasesNotesCreateAttachmentUploadParams,\n options?: RequestOptions,\n ): APIPromise<CasesNotesCreateAttachmentUploadResponse> {\n return this._client.request(CASES_NOTES_CREATE_ATTACHMENT_UPLOAD, [caseUuid], params, options);\n }\n\n /**\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/{note_uuid}/`\n *\n * @param caseUuid case_uuid\n * @param noteUuid note_uuid\n */\n delete(caseUuid: string, noteUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(CASES_NOTES_DELETE, [caseUuid, noteUuid], undefined, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/`\n *\n * @param caseUuid case_uuid\n */\n list(\n caseUuid: string,\n params: CasesNotesListParams = {},\n options?: RequestOptions,\n ): PagePromise<CaseCollaborationPaginatedCaseNoteList, CaseCollaborationCaseNote> {\n return this._client.requestPage(CASES_NOTES_LIST, [caseUuid], params, options);\n }\n\n /**\n * Get note attachment URL\n *\n * Mint a fresh presigned download URL for an attachment already stored on one of the case's notes.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/presign/`\n *\n * @param caseUuid Case UUID.\n */\n retrieveAttachmentUrl(\n caseUuid: string,\n params: CasesNotesRetrieveAttachmentUrlParams,\n options?: RequestOptions,\n ): APIPromise<CasesNotesRetrieveAttachmentUrlResponse> {\n return this._client.request(CASES_NOTES_RETRIEVE_ATTACHMENT_URL, [caseUuid], params, options);\n }\n\n /**\n * Pin or unpin an existing note. Pinned notes appear first. Pin changes are recorded in case activity and do not change evidence or source decisions.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/{note_uuid}/`\n *\n * @param caseUuid case_uuid\n * @param noteUuid note_uuid\n */\n update(\n caseUuid: string,\n noteUuid: string,\n params: CasesNotesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseCollaborationCaseNote> {\n return this._client.request(CASES_NOTES_UPDATE, [caseUuid, noteUuid], params, options);\n }\n}\n\n/** `cases.regulatory_reports` */\nexport class CasesRegulatoryReports extends APIResource {\n /**\n * Create report from case\n *\n * Create a draft FIU report for the case: DRAFT status, auto-populated from the optional template plus the case's subject, linked transactions, and narrative. Validate then finalize to produce the goAML XML and PDF.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/`\n *\n * @param caseUuid Case UUID.\n */\n create(\n caseUuid: string,\n params: CasesRegulatoryReportsCreateParams = {},\n options?: RequestOptions,\n ): APIPromise<RegulatoryReportDetail> {\n return this._client.request(CASES_REGULATORY_REPORTS_CREATE, [caseUuid], params, options);\n }\n\n /**\n * List reports for case\n *\n * List FIU reports generated for the case.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/`\n *\n * @param caseUuid Case UUID.\n */\n list(\n caseUuid: string,\n params: CasesRegulatoryReportsListParams = {},\n options?: RequestOptions,\n ): PagePromise<RegulatoryReportList, RegulatoryReportDetail> {\n return this._client.requestPage(CASES_REGULATORY_REPORTS_LIST, [caseUuid], params, options);\n }\n}\n\n/** `cases.requests` */\nexport class CasesRequests extends APIResource {\n /**\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/cancel/`\n *\n * @param caseUuid case_uuid\n * @param requestUuid request_uuid\n */\n cancel(\n caseUuid: string,\n requestUuid: string,\n options?: RequestOptions,\n ): APIPromise<CustomerMessagingCaseRequest> {\n return this._client.request(CASES_REQUESTS_CANCEL, [caseUuid, requestUuid], undefined, options);\n }\n\n /**\n * Confirm the exact signed preview within 15 minutes. Only fixed templates and an OTP-verified contact belonging to the case subject are accepted. The request ID makes retries idempotent. Delivery is queued; SENT, SIMULATED and UNKNOWN are distinct outcomes. An actionable request sets the case to Awaiting user. A review update leaves its status unchanged.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/`\n *\n * @param caseUuid case_uuid\n */\n create(\n caseUuid: string,\n params: CasesRequestsCreateParams,\n options?: RequestOptions,\n ): APIPromise<CustomerMessagingCaseRequest> {\n return this._client.request(CASES_REQUESTS_CREATE, [caseUuid], params, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/`\n *\n * @param caseUuid case_uuid\n */\n list(\n caseUuid: string,\n params: CasesRequestsListParams = {},\n options?: RequestOptions,\n ): PagePromise<CustomerMessagingPaginatedCaseRequestList, CustomerMessagingCaseRequest> {\n return this._client.requestPage(CASES_REQUESTS_LIST, [caseUuid], params, options);\n }\n\n /**\n * Render the production email without sending or changing the case. Returns the exact recipient, sender, subject, body and a signed preview_token. Send the same contact_id, purpose, language, request_id, expires_at and preview_token to confirm within 15 minutes.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/preview/`\n *\n * @param caseUuid case_uuid\n */\n preview(\n caseUuid: string,\n params: CasesRequestsPreviewParams,\n options?: RequestOptions,\n ): APIPromise<CustomerMessagingCaseRequestPreviewResponse> {\n return this._client.request(CASES_REQUESTS_PREVIEW, [caseUuid], params, options);\n }\n\n /**\n * Remind the customer of a request\n *\n * Send a waiting customer request's email again, to the same verified recipient, with the same content. You can remind a request at most once every 24 hours. A reminder changes nothing else: the request keeps its deadline and the case keeps its status. Each reminder is logged on the case as a CUSTOMER_REQUEST event with action `reminded`. The response's `delivery_status` is how this reminder's delivery ended: SENT, SIMULATED (the email was not sent), or UNKNOWN (the email might have been accepted; it is not sent again automatically). `next_reminder_at` is when you can remind this request again. Returns 409 with a `reason` when the customer no longer has the request to answer, and 429 with `retry_at` and a `Retry-After` header when the request was reminded in the last 24 hours. Requires `write:cases`.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/remind/`\n *\n * @param caseUuid Case UUID.\n * @param requestUuid Customer request UUID, from the case's request list.\n */\n remind(\n caseUuid: string,\n requestUuid: string,\n options?: RequestOptions,\n ): APIPromise<CasesRequestsRemindResponse> {\n return this._client.request(CASES_REQUESTS_REMIND, [caseUuid, requestUuid], undefined, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/{request_uuid}/attachment/`\n *\n * @param caseUuid case_uuid\n * @param requestUuid request_uuid\n */\n retrieveAttachment(\n caseUuid: string,\n requestUuid: string,\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(\n CASES_REQUESTS_RETRIEVE_ATTACHMENT,\n [caseUuid, requestUuid],\n undefined,\n options,\n );\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/requests/options/`\n *\n * @param caseUuid case_uuid\n */\n retrieveOptions(\n caseUuid: string,\n options?: RequestOptions,\n ): APIPromise<CustomerMessagingCaseRequestOptions> {\n return this._client.request(CASES_REQUESTS_RETRIEVE_OPTIONS, [caseUuid], undefined, options);\n }\n}\n\n/** `cases.routing_rules` */\nexport class CasesRoutingRules extends APIResource {\n /**\n * Create routing rule\n *\n * Requires `write:cases` for the requested application. Set publish=false to create an unpublished draft; Publish creates its first live version. Discarding a never-published draft deletes it.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/`\n */\n create(\n params: CasesRoutingRulesCreateParams,\n options?: RequestOptions,\n ): APIPromise<CaseRoutingRule> {\n return this._client.request(CASES_ROUTING_RULES_CREATE, [], params, options);\n }\n\n /**\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/`\n *\n * @param recordUuid record_uuid\n */\n discardDraft(\n recordUuid: string,\n params: CasesRoutingRulesDiscardDraftParams,\n options?: RequestOptions,\n ): APIPromise<void> {\n return this._client.request(CASES_ROUTING_RULES_DISCARD_DRAFT, [recordUuid], params, options);\n }\n\n /**\n * List routing rules\n *\n * Requires `list:cases` for the requested application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/`\n */\n list(\n params: CasesRoutingRulesListParams = {},\n options?: RequestOptions,\n ): PagePromise<CasesRoutingRulesListResponse, CaseRoutingRule> {\n return this._client.requestPage(CASES_ROUTING_RULES_LIST, [], params, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/history/`\n *\n * @param recordUuid record_uuid\n */\n listHistory(\n recordUuid: string,\n params: CasesRoutingRulesListHistoryParams = {},\n options?: RequestOptions,\n ): PagePromise<RoutingPublicationPaginatedPolicyRevisionList, RoutingPublicationPolicyRevision> {\n return this._client.requestPage(\n CASES_ROUTING_RULES_LIST_HISTORY,\n [recordUuid],\n params,\n options,\n );\n }\n\n /**\n * Test case routing\n *\n * Requires `read:cases` for the requested application. Evaluates current rules or a supplied draft against current reviewer access, availability, skills and capacity. It does not save the draft or reserve reviewer capacity.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/preview/`\n */\n preview(\n params: CasesRoutingRulesPreviewParams,\n options?: RequestOptions,\n ): APIPromise<CaseRoutingPreview> {\n return this._client.request(CASES_ROUTING_RULES_PREVIEW, [], params, options);\n }\n\n /**\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/publish/`\n *\n * @param recordUuid record_uuid\n */\n publish(\n recordUuid: string,\n params: CasesRoutingRulesPublishParams,\n options?: RequestOptions,\n ): APIPromise<RoutingPublicationCaseRoutingRule> {\n return this._client.request(CASES_ROUTING_RULES_PUBLISH, [recordUuid], params, options);\n }\n\n /**\n * Retrieve routing rule\n *\n * Requires `read:cases` for the requested application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/`\n *\n * @param recordUuid record_uuid\n */\n retrieve(recordUuid: string, options?: RequestOptions): APIPromise<CaseRoutingRule> {\n return this._client.request(CASES_ROUTING_RULES_RETRIEVE, [recordUuid], undefined, options);\n }\n\n /**\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/`\n *\n * @param recordUuid record_uuid\n */\n retrieveDraft(\n recordUuid: string,\n options?: RequestOptions,\n ): APIPromise<RoutingPublicationPolicyDraftResponse> {\n return this._client.request(\n CASES_ROUTING_RULES_RETRIEVE_DRAFT,\n [recordUuid],\n undefined,\n options,\n );\n }\n\n /**\n * `PUT /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/draft/`\n *\n * @param recordUuid record_uuid\n */\n saveDraft(\n recordUuid: string,\n params: CasesRoutingRulesSaveDraftParams,\n options?: RequestOptions,\n ): APIPromise<RoutingPublicationPolicyDraft> {\n return this._client.request(CASES_ROUTING_RULES_SAVE_DRAFT, [recordUuid], params, options);\n }\n\n /**\n * Update routing rule\n *\n * Requires `write:cases` for the requested application.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/`\n *\n * @param recordUuid record_uuid\n */\n update(\n recordUuid: string,\n params: CasesRoutingRulesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseRoutingRule> {\n return this._client.request(CASES_ROUTING_RULES_UPDATE, [recordUuid], params, options);\n }\n}\n\n/** `cases.teams` */\nexport class CasesTeams extends APIResource {\n /**\n * Create review team\n *\n * Requires `write:cases` for the requested application.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/teams/`\n */\n create(params: CasesTeamsCreateParams, options?: RequestOptions): APIPromise<CaseReviewTeam> {\n return this._client.request(CASES_TEAMS_CREATE, [], params, options);\n }\n\n /**\n * List review teams\n *\n * Requires `list:cases` for the requested application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/teams/`\n */\n list(\n params: CasesTeamsListParams = {},\n options?: RequestOptions,\n ): PagePromise<CasesTeamsListResponse, CaseReviewTeam> {\n return this._client.requestPage(CASES_TEAMS_LIST, [], params, options);\n }\n\n /**\n * Retrieve review team\n *\n * Requires `read:cases` for the requested application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/teams/{record_uuid}/`\n *\n * @param recordUuid record_uuid\n */\n retrieve(recordUuid: string, options?: RequestOptions): APIPromise<CaseReviewTeam> {\n return this._client.request(CASES_TEAMS_RETRIEVE, [recordUuid], undefined, options);\n }\n\n /**\n * Update review team\n *\n * Requires `write:cases` for the requested application.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/teams/{record_uuid}/`\n *\n * @param recordUuid record_uuid\n */\n update(\n recordUuid: string,\n params: CasesTeamsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseReviewTeam> {\n return this._client.request(CASES_TEAMS_UPDATE, [recordUuid], params, options);\n }\n}\n\n/** `cases` */\nexport class Cases extends APIResource {\n readonly blueprints: CasesBlueprints = new CasesBlueprints(this._client);\n readonly checklist: CasesChecklist = new CasesChecklist(this._client);\n readonly links: CasesLinks = new CasesLinks(this._client);\n readonly notes: CasesNotes = new CasesNotes(this._client);\n readonly regulatoryReports: CasesRegulatoryReports = new CasesRegulatoryReports(this._client);\n readonly requests: CasesRequests = new CasesRequests(this._client);\n readonly routingRules: CasesRoutingRules = new CasesRoutingRules(this._client);\n readonly teams: CasesTeams = new CasesTeams(this._client);\n\n /**\n * Apply one explicit action to the case subject. Supply a unique client_reference to obtain an action receipt and make retries idempotent. Reusing that reference with a different payload returns 409. With a reference, inspect receipt.status even when HTTP status is 200: FAILED means no action was applied. Repeating a failed request does not execute it again unless retry is true. Omitting client_reference preserves the legacy response.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/entity-actions/`\n *\n * @param caseUuid case_uuid\n */\n applyEntityAction(\n caseUuid: string,\n params: CasesApplyEntityActionParams,\n options?: RequestOptions,\n ): APIPromise<CaseActionCaseEntityActionResult> {\n return this._client.request(CASES_APPLY_ENTITY_ACTION, [caseUuid], params, options);\n }\n\n /**\n * Approve staged resolution (4-eyes)\n *\n * Apply a resolution staged by resolve on a four-eyes blueprint. The caller must be a different officer than the one who submitted it, otherwise 403. When the resolution names a checker (the case's `checker`), only that member can approve it: any other caller, including an API key, gets 403.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/approve/`\n *\n * @param caseUuid Case UUID.\n */\n approveResolution(caseUuid: string, options?: RequestOptions): APIPromise<CaseDetail> {\n return this._client.request(CASES_APPROVE_RESOLUTION, [caseUuid], undefined, options);\n }\n\n /**\n * Assign or unassign case\n *\n * Assign the case to a user, or unassign it by sending assignee_user_id: null. assignee_email/assignee_name auto-provision a User row when the assignee does not exist yet.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/assign/`\n *\n * @param caseUuid Case UUID.\n */\n assign(\n caseUuid: string,\n params: CasesAssignParams,\n options?: RequestOptions,\n ): APIPromise<CaseDetail> {\n return this._client.request(CASES_ASSIGN, [caseUuid], params, options);\n }\n\n /**\n * Bulk assign cases\n *\n * Assign (or unassign, with assignee_user_id: null) several cases at once. All cases must share the same blueprint; mismatches are reported per case without aborting the batch.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/bulk/assign/`\n */\n bulkAssign(\n params: CasesBulkAssignParams,\n options?: RequestOptions,\n ): APIPromise<CaseBulkUpdateResult> {\n return this._client.request(CASES_BULK_ASSIGN, [], params, options);\n }\n\n /**\n * Bulk update case status\n *\n * Apply the same status transition to several cases in one call: OPEN reopens, AWAITING_USER requests info, RESOLVED resolves (resolution required). Each case is evaluated independently; gate failures (incomplete checklist, missing required note) are reported per case without aborting the batch.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/bulk/status/`\n */\n bulkUpdateStatus(\n params: CasesBulkUpdateStatusParams,\n options?: RequestOptions,\n ): APIPromise<CaseBulkUpdateResult> {\n return this._client.request(CASES_BULK_UPDATE_STATUS, [], params, options);\n }\n\n /**\n * Create case\n *\n * Create a case anchored to exactly one subject (a user or a business), directly or by deriving the subject from an attached session/transaction link. Source is always `MANUAL` for API-created cases.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/`\n */\n create(params: CasesCreateParams, options?: RequestOptions): APIPromise<CaseDetail> {\n return this._client.request(CASES_CREATE, [], params, options);\n }\n\n /**\n * Delete case\n *\n * Delete a case permanently. Its draft regulatory reports are deleted with it. Linked verifications, people, companies and transactions are not deleted. There is no undelete endpoint.\n *\n * If the case has a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/`\n *\n * @param caseUuid Case UUID.\n */\n delete(caseUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(CASES_DELETE, [caseUuid], undefined, options);\n }\n\n /**\n * Escalate case\n *\n * Move the case to its blueprint's configured escalation_blueprint. Requires the current blueprint to have escalation_enabled and an escalation_blueprint set, otherwise 400.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/escalate/`\n *\n * @param caseUuid Case UUID.\n */\n escalate(caseUuid: string, options?: RequestOptions): APIPromise<CaseDetail> {\n return this._client.request(CASES_ESCALATE, [caseUuid], undefined, options);\n }\n\n /**\n * Review existing cases for a subject or owned source record before manual case creation. Both open and resolved investigations are returned. Each page contains at most 20 cases; use next_offset to request another page.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/duplicates/`\n */\n findDuplicates(\n params: CasesFindDuplicatesParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseDuplicateCaseDuplicatePage> {\n return this._client.request(CASES_FIND_DUPLICATES, [], params, options);\n }\n\n /**\n * List cases\n *\n * List cases for the application, newest first. Supports filtering, search, and sorting; see query parameters. Paginated with `limit`/`offset`.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/`\n */\n list(\n params: CasesListParams = {},\n options?: RequestOptions,\n ): PagePromise<CasesListResponse, CaseListItem> {\n return this._client.requestPage(CASES_LIST, [], params, options);\n }\n\n /**\n * List subject-action receipts, newest first, with at most 20 results per page. Use next_offset for the next page. Input note text is not exposed in the history.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/`\n *\n * @param caseUuid case_uuid\n */\n listActionReceipts(\n caseUuid: string,\n params: CasesListActionReceiptsParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseActionCaseActionReceiptPage> {\n return this._client.request(CASES_LIST_ACTION_RECEIPTS, [caseUuid], params, options);\n }\n\n /**\n * List case AML hits\n *\n * List AML screening hits for the case's subject. Same shape as the hits returned by POST /v3/aml/.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/aml/`\n *\n * @param caseUuid Case UUID.\n */\n listAmlHits(caseUuid: string, options?: RequestOptions): APIPromise<AMLScreening[]> {\n return this._client.request(CASES_LIST_AML_HITS, [caseUuid], undefined, options);\n }\n\n /**\n * List case events\n *\n * Read-only audit timeline of the case (created, status changes, assignment, resolution, escalation, transfers, tag/priority/due-date changes, entity actions, and more).\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/events/`\n *\n * @param caseUuid Case UUID.\n */\n listEvents(\n caseUuid: string,\n params: CasesListEventsParams = {},\n options?: RequestOptions,\n ): PagePromise<CasesListEventsResponse, CaseEvent> {\n return this._client.requestPage(CASES_LIST_EVENTS, [caseUuid], params, options);\n }\n\n /**\n * List eligible case reviewers\n *\n * Requires `list:cases` for the requested application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/reviewers/`\n */\n listReviewers(options?: RequestOptions): APIPromise<CasesListReviewersResponse> {\n return this._client.request(CASES_LIST_REVIEWERS, [], undefined, options);\n }\n\n /**\n * Print case (PDF)\n *\n * Render the full case (summary, subject, checklist state, notes, attached sessions/transactions, events, FIU report list) as a PDF and return a presigned download URL.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/print/`\n *\n * @param caseUuid Case UUID.\n */\n print(caseUuid: string, options?: RequestOptions): APIPromise<CasesPrintResponse> {\n return this._client.request(CASES_PRINT, [caseUuid], undefined, options);\n }\n\n /**\n * Reject staged resolution (4-eyes)\n *\n * Reject a resolution staged by resolve and return the case to its maker blueprint. The caller must be a different officer than the one who submitted it, otherwise 403. When the resolution names a checker (the case's `checker`), only that member can reject it: any other caller, including an API key, gets 403.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/reject-approval/`\n *\n * @param caseUuid Case UUID.\n */\n rejectResolution(\n caseUuid: string,\n params: CasesRejectResolutionParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseDetail> {\n return this._client.request(CASES_REJECT_RESOLUTION, [caseUuid], params, options);\n }\n\n /**\n * Reopen case\n *\n * Move an awaiting-user or resolved case back to open, clearing resolution, resolution_notes, resolved_at, and resolved_by_email.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/reopen/`\n *\n * @param caseUuid Case UUID.\n */\n reopen(caseUuid: string, options?: RequestOptions): APIPromise<CaseDetail> {\n return this._client.request(CASES_REOPEN, [caseUuid], undefined, options);\n }\n\n /**\n * Request info (awaiting user)\n *\n * Move an open case to awaiting_user while more information is collected from the verified user. Fails with 400 if a resolution is currently pending 4-eyes approval.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/request-info/`\n *\n * @param caseUuid Case UUID.\n */\n requestInfo(caseUuid: string, options?: RequestOptions): APIPromise<CaseDetail> {\n return this._client.request(CASES_REQUEST_INFO, [caseUuid], undefined, options);\n }\n\n /**\n * Resolve case\n *\n * Resolve the case with one of five resolutions: FALSE_POSITIVE (no concern found), VALID_THREAT (concern confirmed), INCONCLUSIVE, REQUIREMENTS_NOT_MET or REQUIREMENTS_SATISFIED. Blocked with 400 if the blueprint's checklist is not optional and items remain incomplete, or if the blueprint requires a resolution note and none is given. When the case's blueprint has a four-eyes checker step (four_eyes_checker_blueprint), the resolution is staged (case.pending_resolution) and the case moves to the checker blueprint instead of resolving immediately; a different officer must call approve or reject-approval. Submit a four-eyes resolution as a console member: a resolution an API key submits has no recorded maker, so approve and reject-approval return 403 for every caller. On a four-eyes blueprint you can name the member who must approve with `checker`: then only that member can approve or reject the resolution, and the response's `checker` names them. Without `checker`, the resolution waits on the checker blueprint's queue. Sending `checker` for a blueprint without a checker step returns 400.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/resolve/`\n *\n * @param caseUuid Case UUID.\n */\n resolve(\n caseUuid: string,\n params: CasesResolveParams,\n options?: RequestOptions,\n ): APIPromise<CaseDetail> {\n return this._client.request(CASES_RESOLVE, [caseUuid], params, options);\n }\n\n /**\n * Get case\n *\n * Retrieve a case with its subject, blueprint, notes, events, links, and checklist.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/`\n *\n * @param caseUuid Case UUID.\n */\n retrieve(caseUuid: string, options?: RequestOptions): APIPromise<CaseDetail> {\n return this._client.request(CASES_RETRIEVE, [caseUuid], undefined, options);\n }\n\n /**\n * Case analytics\n *\n * Aggregate case analytics for the date range (defaults to the last 30 days; max 731 days). Charts, tables, totals, assignment events, and current queue counts use the same application-scoped filters. Filters use current case values. Dates apply to each metric event, so older cases assigned or resolved during the period remain included. Queue depth is independent of the date range. Invalid filters return 400; an unknown blueprint or assignee returns an empty result.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/cases/statistics/`\n */\n retrieveStatistics(\n params: CasesRetrieveStatisticsParams = {},\n options?: RequestOptions,\n ): APIPromise<CasesRetrieveStatisticsResponse> {\n return this._client.request(CASES_RETRIEVE_STATISTICS, [], params, options);\n }\n\n /**\n * Retry only this failed subject action using its saved inputs. Current write permission is checked. Applied actions return their receipt without executing again. Case closure is independent.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/{receipt_uuid}/retry/`\n *\n * @param caseUuid case_uuid\n * @param receiptUuid receipt_uuid\n */\n retryActionReceipt(\n caseUuid: string,\n receiptUuid: string,\n options?: RequestOptions,\n ): APIPromise<CaseActionCaseActionReceipt> {\n return this._client.request(\n CASES_RETRY_ACTION_RECEIPT,\n [caseUuid, receiptUuid],\n undefined,\n options,\n );\n }\n\n /**\n * Transfer case\n *\n * Move the case to a different, active blueprint of the same application. Requires the current blueprint to have transfer_enabled, otherwise 400.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/transfer/`\n *\n * @param caseUuid Case UUID.\n */\n transfer(\n caseUuid: string,\n params: CasesTransferParams,\n options?: RequestOptions,\n ): APIPromise<CaseDetail> {\n return this._client.request(CASES_TRANSFER, [caseUuid], params, options);\n }\n\n /**\n * Update case\n *\n * Update the case's title, priority, due date, tags, or owning review team. Send only the fields you want to change; fields you omit keep their value. `tags` replaces the whole tag list. `team` takes the uuid of an active review team of this application (list them with `GET .../cases/teams/`), or null to clear the team. Requires a full-access API key, or `write:cases` for a console member: a key with restricted access gets 403. Logs PRIORITY_CHANGED, DUE_DATE_CHANGED, TAG_ADDED, TAG_REMOVED and TEAM_CHANGED events as applicable; a title change is saved without a timeline event. Returns the updated case.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/`\n *\n * @param caseUuid Case UUID.\n */\n update(\n caseUuid: string,\n params: CasesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<CaseDetail> {\n return this._client.request(CASES_UPDATE, [caseUuid], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { BrandingCustomization } from \"../types/components.js\";\nimport type { CustomizationUpdateParams } from \"../types/customization.js\";\n\nconst CUSTOMIZATION_RETRIEVE: OperationSpec = { method: \"GET\", path: \"/v3/customization/\" };\nconst CUSTOMIZATION_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/customization/\",\n body: \"auto\",\n files: [\"image_favicon\", \"image_rectangular\", \"image_rectangular_dark\", \"image_square\"],\n};\n\n/** `customization` */\nexport class Customization extends APIResource {\n /**\n * Get branding customization\n *\n * Returns the white-label branding for the application resolved from the API key: colors, fonts, border radii, logo URLs and UI/UX options. Custom domain and white-label email settings are managed only in the Business Console and are not part of this response.\n *\n * `GET /v3/customization/`\n */\n retrieve(options?: RequestOptions): APIPromise<BrandingCustomization> {\n return this._client.request(CUSTOMIZATION_RETRIEVE, [], undefined, options);\n }\n\n /**\n * Update branding customization\n *\n * Partial update of the application's white-label branding. Send `application/json` to change colors, fonts, radii and UI options, or `multipart/form-data` to upload logo images. Only the fields you include are changed. Custom domain and white-label email cannot be set through this endpoint - use the Business Console for those.\n *\n * `PATCH /v3/customization/`\n */\n update(\n params: CustomizationUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<BrandingCustomization> {\n return this._client.request(CUSTOMIZATION_UPDATE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n DatabaseValidationValidateParams,\n DatabaseValidationValidateResponse,\n} from \"../types/database-validation.js\";\n\nconst DATABASE_VALIDATION_VALIDATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/database-validation/\",\n body: \"auto\",\n files: [\"selfie\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `database_validation` */\nexport class DatabaseValidation extends APIResource {\n /**\n * Database Validation (standalone)\n *\n * Validate a person's identity data against official government and registry sources - CPF in Brazil, RENAPER in Argentina, DNI registries in Spain and Peru, INE in Mexico, and 100+ more services across 60+ countries.\n *\n * **Service selection.** Each country exposes one or more catalog services identified by a `service_id` (e.g. `bra_cpf`, `arg_renaper`, `pan_cedula_sib`). Pin the services you want with the `services` array - if you omit it, exactly **one** default service runs (the longest-established live service for the country). Sending `services` also switches the response to the extended shape with `services_used` and `match_score`. Discover services, their required fields, and prices via `GET /v1/organization/database-validation-countries/` (a catalog endpoint not documented in this spec) or the Business Console workflow editor. Some services are flagged `requires_consent=true` in the catalog and demand `consent=true`; others require onboarding for your organization before they can be called.\n *\n * **Input fields.** `identification_number` is a universal field that maps to the right country-specific field automatically (see its description). Country format rules are enforced before any provider is called (e.g. BRA CPF must be exactly 11 digits) and format failures are never billed. Biometric services need a `selfie` upload (multipart only); Argentina RENAPER additionally requires `gender`.\n *\n * **Results.** Each service returns a field-by-field `validation` map plus a vendor-neutral `outcome_code` (`MATCH`, `PARTIAL_MATCH`, `NO_MATCH`, `DOCUMENT_NOT_FOUND`, `INVALID_DOCUMENT_FORMAT`, `INVALID_INPUT`, `MINOR_BLOCKED`, `DECEASED`, `BIOMETRIC_NO_MATCH`, `BIOMETRIC_IMAGE_UNUSABLE`, `INCONCLUSIVE`, `DOCUMENT_SUPERSEDED`, `REGISTRY_UNAVAILABLE`, `REGISTRY_ERROR`). Note the distinctions: `NO_MATCH` is a definitive mismatch, `INCONCLUSIVE` means the registry could not confirm either way (review, not decline), and `BIOMETRIC_IMAGE_UNUSABLE` is a technical selfie problem (retake), unlike the definitive `BIOMETRIC_NO_MATCH`. The overall `match_type` aggregates across services (any full → `full_match`, else any partial → `partial_match`, else `no_match`) and `no_match_action`/`partial_match_action` translate it into the final `status`. `validation_type` is derived: `two_by_two` when two or more distinct services produced a full match (on the identification number, on full name + date of birth together, or on the address without contradictions), else `one_by_one`.\n *\n * **Persistence.** `save_api_request` defaults to **true**: the result is stored as a session (`request_id` works with `GET /v3/session/{sessionId}/decision/`), appears in the console, and fires a `status.updated` webhook. It also controls the `validations` shape - per-service objects when saved, a merged `{field: match}` map when not.\n *\n * **Billing.** Per-service: each service that returns a billable result is charged its own catalog price. Failed or skipped services are not billed, and requests rejected with `400` cost nothing. The pre-flight balance check covers the sum of the selected services' prices (`403` when short).\n *\n * **Failures.** When no selected service returns a usable result, the API returns `400` with `validation_errors` if every unanswered attempt explicitly refused the input (`provider_rejected_input`, `retryable: false`). Correct the input before trying again. Otherwise it returns `502` with `validation_errors` (`empty_provider_response`, `retryable: true`), including mixed input rejection and unavailable fallback attempts; nothing is billed (a session is still recorded with status `Not Finished` when `save_api_request=true`). When only some services fail, the `200` response carries their failures in `database_validation.errors`.\n *\n * **Sandbox.** Keys from sandbox applications skip the registry calls and billing and return a static `full_match` response - the sandbox payload always includes `services_used` and `match_score: 100` regardless of how `services` was sent, so don't validate the live extended-shape gating or the 0.0–1.0 `match_score` fraction against sandbox responses.\n *\n * Send the request as `application/json`, or as `multipart/form-data` when uploading a `selfie`.\n *\n * `POST /v3/database-validation/`\n */\n validate(\n params: DatabaseValidationValidateParams,\n options?: RequestOptions,\n ): APIPromise<DatabaseValidationValidateResponse> {\n return this._client.request(DATABASE_VALIDATION_VALIDATE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { DocumentAiAnalyzeParams, DocumentAiAnalyzeResponse } from \"../types/document-ai.js\";\n\nconst DOCUMENT_AI_ANALYZE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/document-ai/\",\n body: \"multipart\",\n files: [\"document\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `document_ai` */\nexport class DocumentAi extends APIResource {\n /**\n * Document AI (custom field extraction + tamper checks)\n *\n * Extract the fields **you** define from any supporting document - payslips, proof of funds, source-of-wealth letters, tax statements, contracts, invoices - in one call. Send the file plus a `fields` definition (key, name, extraction instruction, type) and get back typed values (`text`, `number`, `date` as `YYYY-MM-DD`), an optional name-match score against the expected person or company, PDF/EXIF tamper signals, an `Approved`/`Declined`/`In Review` `status`, and a `warnings` list explaining every issue found. This is the server-to-server counterpart of the hosted Document AI workflow step (see `/core-technology/document-ai/overview`); it uses Didit's default extraction model and does not expose provider selection.\n *\n * **Latency.** Extraction is LLM-based: typical calls take **5–15 seconds**, multi-page PDFs up to **~30 seconds**. Configure a client timeout of **at least 45 seconds** and do not retry before the call completes.\n *\n * **Request format.** `multipart/form-data` only. `fields` is **one JSON-encoded array string** (1–30 items, at most 16 KB); bracket-style form arrays are rejected with `400`. Each item is `{key, name, instruction, type, required, is_full_name}` - `key` is the JSON key you get back (`^[a-z0-9_]{1,64}$`, unique), `instruction` tells the model what to read, `type` is `text` (default) | `number` | `date`, `required` raises `DOCUMENT_AI_MISSING_REQUIRED_FIELDS` when the value cannot be read, and at most one field may set `is_full_name: true` to mark the value compared against the expected name.\n *\n * **Name matching.** Pass `expected_first_name` + `expected_last_name` (person) **or** `expected_company_name` (+ optional `expected_company_country`) - not both. The value of the `is_full_name` field (or, when none is marked, the first text field whose key looks like a name) is compared fuzzily; `name_match_score` (0–100) and `name_on_document` are always returned when both sides exist, and a score below `document_ai_name_match_score_threshold` (default 80) adds `DOCUMENT_AI_NAME_MISMATCH`, governed by `document_ai_name_mismatch_action`.\n *\n * **Decision logic.** Each risk maps to a configurable action: `DECLINE` → `status: \"Declined\"`, `REVIEW` → `status: \"In Review\"`, `NO_ACTION` → informational only. Defaults mirror the workflow step: unreadable document `REVIEW`, missing required fields `REVIEW`, suspected manipulation `DECLINE`, name mismatch `NO_ACTION`, unsupported file `REVIEW`. A document that cannot be processed at all returns `400`; a readable but problematic document returns `200` with `Declined`/`In Review` - always inspect `document_ai.status` and `document_ai.warnings`, not just the HTTP code.\n *\n * **Billing.** Each `200` response consumes one Document AI API credit - **$0.20 per document** at list, paid from your plan credit or top-up balance. When the organization's balance cannot cover the call, the endpoint returns `403` before any processing. Sandbox API keys return a deterministic mock response and are not charged.\n *\n * **Persistence.** With `save_api_request=true` (default) the call is stored as an API-type session: the document, the extracted values, the field definitions and the name-match snapshot are kept, the session shows up in the Business Console, and `request_id` works with `GET /v3/session/{sessionId}/decision/`.\n *\n * `POST /v3/document-ai/`\n */\n analyze(\n params: DocumentAiAnalyzeParams,\n options?: RequestOptions,\n ): APIPromise<DocumentAiAnalyzeResponse> {\n return this._client.request(DOCUMENT_AI_ANALYZE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n EmailRiskResponse,\n EmailVerificationCheckResponse,\n EmailVerificationSendResponse,\n} from \"../types/components.js\";\nimport type {\n EmailAssessRiskParams,\n EmailCheckCodeParams,\n EmailSendCodeParams,\n} from \"../types/email.js\";\n\nconst EMAIL_ASSESS_RISK: OperationSpec = {\n method: \"POST\",\n path: \"/v3/email/risk/\",\n body: \"json\",\n dates: \"EmailRiskResponse\",\n};\nconst EMAIL_CHECK_CODE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/email/check/\",\n body: \"json\",\n dates: \"EmailVerificationCheckResponse\",\n};\nconst EMAIL_SEND_CODE: OperationSpec = { method: \"POST\", path: \"/v3/email/send/\", body: \"json\" };\n\n/** `email` */\nexport class Email extends APIResource {\n /**\n * Risk-score an email address\n *\n * Return deliverability, disposable-address, breach, cross-session match, and normalized risk-intelligence signals without sending an OTP. The endpoint creates an API session and returns its id as `request_id`.\n *\n * **Decision.** The top-level `status` mirrors `email.status`. It is normally `Approved`; the risk evaluation can produce `In Review` or `Declined`.\n *\n * **Compatibility aliases.** Live responses expose the normalized intelligence object as both `email.email_intelligence` and `email.enrichment`. The values are identical. New integrations can read `email.enrichment`. Both keys are absent when no usable intelligence data was returned.\n *\n * **Billing.** Live calls use Email Risk API pricing. The request is billable once the lookup starts, even when some best-effort fields are unavailable.\n *\n * **Sandbox.** Sandbox keys validate the request and return deterministic approved data without sending an email, consuming credits, creating a session, or contributing to Networks.\n *\n * **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests per minute per API key across all POST/PATCH/DELETE endpoints.\n *\n * **Social footprint.** Set `enable_social` to `true` to add a `email_social` block: the online platforms this address is registered on, with per-category counts and any profile details available. `profiles_registered: 0` means the platforms were checked and the address was found on none of them - a valid, billable answer. The block is absent when the add-on was not requested or the check could not be completed, and it is not billed in that case. Billing adds one `email_social` unit per request on top of this endpoint's own price.\n *\n * `POST /v3/email/risk/`\n */\n assessRisk(\n params: EmailAssessRiskParams,\n options?: RequestOptions,\n ): APIPromise<EmailRiskResponse> {\n return this._client.request(EMAIL_ASSESS_RISK, [], params, options);\n }\n\n /**\n * Check Email Code\n *\n * Verify the OTP delivered by [`POST /v3/email/send/`](/standalone-apis/email-send) and get the final verification result plus email intelligence: deliverability, breach exposure (`is_breached` and the `breaches` list from a breach-intelligence database), disposable-provider detection, and duplicate usage of the address across your sessions.\n *\n * **How the check finds the verification.** Matching is by your application plus the `email` address - `request_id` is not an input. The most recent pending verification created within the last **5 minutes** is checked. If there is none (never sent, already finalized, undeliverable at send time, or older than 5 minutes) the endpoint returns `200` with `status: \"Expired or Not Found\"`.\n *\n * **Attempt budget.** Each verification allows **3 code attempts**. The first two wrong codes return `status: \"Failed\"` with the attempts remaining and `email: null`; the third wrong code finalizes the verification as `Declined` with an `EMAIL_CODE_ATTEMPTS_EXCEEDED` warning and returns the full email report. Codes are compared case-insensitively (relevant for `alphanumeric_code` sends); only the most recently sent code is valid.\n *\n * **Outcomes.** `Approved` - correct code and no declining risk. `Declined` - terminal: the code was correct but a declining risk matched (a `DECLINE` action below, a blocklisted address, or the address found undeliverable at finalization), or the attempt budget was exhausted. `Failed` - wrong code, attempts remaining. `Expired or Not Found` - nothing to check. On `Approved`/`Declined` the `request_id` equals the send's `request_id` (the session id) and `email` carries the full report (`is_breached`, `breaches`, `is_disposable`, `is_undeliverable`, `warnings`, `lifecycle`, `matches`); on `Failed` and `Expired or Not Found` the `request_id` is a one-off random UUID.\n *\n * **Risk actions.** `duplicated_email_action`, `breached_email_action`, and `disposable_email_action` decide what happens when the corresponding risk is detected on a correct code: `DECLINE` flips the final status to `Declined`; `NO_ACTION` (default) records the risk in `email.warnings` without affecting the status.\n *\n * **Billing.** Checks are free - the credit is consumed by the successful send.\n *\n * **Session persistence.** A finalized check updates the session created by the send (visible in the Business Console, queryable via `GET /v3/session/{sessionId}/decision/`) and fires a `status.updated` webhook.\n *\n * **Sandbox.** Sandbox API keys skip all processing: any well-formed code (`123456` included) returns a static `Approved` payload with a simplified `email` object (`status`, `email`, `is_breached`, `is_disposable`, `is_undeliverable`); malformed input still returns `400`. Nothing is persisted.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * **Social footprint.** Set `enable_social` to `true` to add a `email_social` block: the online platforms this address is registered on, with per-category counts and any profile details available. `profiles_registered: 0` means the platforms were checked and the address was found on none of them - a valid, billable answer. The block is absent when the add-on was not requested or the check could not be completed, and it is not billed in that case. Billing adds one `email_social` unit per request on top of this endpoint's own price.\n *\n * `POST /v3/email/check/`\n */\n checkCode(\n params: EmailCheckCodeParams,\n options?: RequestOptions,\n ): APIPromise<EmailVerificationCheckResponse> {\n return this._client.request(EMAIL_CHECK_CODE, [], params, options);\n }\n\n /**\n * Send Email Code\n *\n * Send a one-time passcode (OTP) to an email address, then verify it with [`POST /v3/email/check/`](/standalone-apis/email-check).\n *\n * **How send and check pair up.** Verification state is keyed by your application plus the `email` address - the check call does not take `request_id`. Each new send creates a pending verification that lives for **5 minutes**: call the check with the same address and the code the user received before the window closes. Calling send again for the same address while a verification is pending generates a fresh code for that same verification (`status: \"Retry\"`, same `request_id`); the previous code stops working. At most one retry is attached this way (two sends total); a further send starts a fresh verification with a new `request_id`. The 5-minute window is measured from the first send and is not extended by retries.\n *\n * **Deliverability pre-check.** Before anything is sent, the address goes through syntax and DNS/MX validation. Addresses that cannot receive mail return `200` with `status: \"Undeliverable\"` and `reason: \"email_can_not_be_delivered\"` - no email is sent, nothing is billed, and the verification is immediately finalized as `Declined` (a follow-up check returns `Expired or Not Found`). A downstream send failure reports the same way.\n *\n * **Code format and branding.** Codes are 4–8 characters (`options.code_size`, default 6), numeric by default; set `options.alphanumeric_code: true` for uppercase letters and digits (the check comparison is case-insensitive). The email template is localized via `options.locale` (54 supported languages) and can use your application's white-label branding via `options.use_white_label_customization`.\n *\n * **Billing.** One Email Verification API credit per successful send (`status: \"Success\"`), charged at send time. `Retry` and `Undeliverable` sends are free, and checks are free.\n *\n * **Session persistence.** Every new verification is persisted as an API-type session: `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/`, the verification appears in the Business Console, and `status.updated` webhooks fire as it progresses.\n *\n * **Sandbox.** Sandbox API keys skip delivery and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Success` payload with a random `request_id`; no email is sent and nothing is persisted. Use code `123456` on the sandbox check.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * `POST /v3/email/send/`\n */\n sendCode(\n params: EmailSendCodeParams,\n options?: RequestOptions,\n ): APIPromise<EmailVerificationSendResponse> {\n return this._client.request(EMAIL_SEND_CODE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { FaceMatchCompareParams, FaceMatchCompareResponse } from \"../types/face-match.js\";\n\nconst FACE_MATCH_COMPARE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/face-match/\",\n body: \"multipart\",\n files: [\"ref_image\", \"user_image\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `face_match` */\nexport class FaceMatch extends APIResource {\n /**\n * Face Match\n *\n * Compare two face images (1:1) and get back a similarity `score` (0–100) plus an `Approved`/`Declined` `status`.\n *\n * **How it works.** Both images are decoded and analyzed by a biometric model (set `rotate_image=true` if captures may be sideways or upside down), then a similarity score between the two faces is computed. A score **strictly above** `face_match_score_decline_threshold` (default `30`) returns `status: \"Approved\"`; a score at or below it returns `Declined` with a `LOW_FACE_MATCH_SIMILARITY` warning. If no face pair can be scored at all, the call still returns `200` with `status: \"Declined\"` and a `NO_REFERENCE_IMAGE` warning - `score` is `null` on the default save path, or `0` with `save_api_request=false`. Submit one clear, front-facing face per image for best results.\n *\n * **Billing.** Each `200` response consumes one Face Match API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the not-enough-credits error before any image processing.\n *\n * **Session persistence (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session: it appears in the Business Console, the returned `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/`, both images are stored as the session's face-match source/target images, and a `status.updated` webhook is emitted to your configured webhook endpoints. When `false`, nothing is stored and `request_id` is a one-off correlation UUID that cannot be looked up later.\n *\n * **Face search index.** This endpoint never enrolls faces into your face search index and never runs blocklist or duplicate screening - use `POST /v3/passive-liveness/` or `POST /v3/face-search/` for those.\n *\n * **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload, no session is persisted, and no credits are consumed.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * `POST /v3/face-match/`\n */\n compare(\n params: FaceMatchCompareParams,\n options?: RequestOptions,\n ): APIPromise<FaceMatchCompareResponse> {\n return this._client.request(FACE_MATCH_COMPARE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { FaceSearchSearchParams, FaceSearchSearchResponse } from \"../types/face-search.js\";\n\nconst FACE_SEARCH_SEARCH: OperationSpec = {\n method: \"POST\",\n path: \"/v3/face-search/\",\n body: \"multipart\",\n files: [\"user_image\"],\n dates: {\n p: { face_search: { p: { matches: { i: { p: { verification_date: 1 } } } } }, created_at: 1 },\n },\n};\n\n/** `face_search` */\nexport class FaceSearch extends APIResource {\n /**\n * Face Search\n *\n * Search a face image (1:N) against your application's face search index - faces enrolled from verification sessions, saved standalone API calls, direct user-profile face uploads, and your block/allow lists - and get back ranked similarity matches plus blocklist and duplicate warnings.\n *\n * **How it works.** The largest detected face in `user_image` is embedded and searched against the index, scoped to your application. Up to **5 matches** above the similarity floor are returned in `matches`, each with `similarity_percentage`, the originating session (`session_id`, `session_number`, `status`, `vendor_data`), `user_details` extracted during that session's document verification, `is_blocklisted` / `is_allowlisted` flags, and a `source` discriminator (`session`, `imported`, or `list_entry`).\n *\n * - `search_type=most_similar` (default) ranks every enrolled face by similarity - use it for deduplication and fraud-ring investigation.\n * - `search_type=blocklisted_or_approved` restricts candidates to blocklisted faces, allowlisted faces, faces from approved sessions, and imported user-profile faces, ranking blocklisted entries first - use it when the primary goal is blocklist screening.\n *\n * `status` is `Declined` only when a `FACE_IN_BLOCKLIST` or `POSSIBLE_FACE_IN_BLOCKLIST` warning fires; `DUPLICATED_FACE` / `POSSIBLE_DUPLICATED_FACE` (`information`) and `MULTIPLE_FACES_DETECTED` (`warning`) never decline. Unlike Passive Liveness, this endpoint does **not** exclude prior sessions with the same `vendor_data` from matching. A passive-liveness analysis also runs internally and is stored with the persisted session, but its result is not part of this response.\n *\n * **Billing.** Each `200` response consumes one Face Search API credit (paid from your plan credit or top-up balance). Insufficient balance returns `403` before any image processing.\n *\n * **Session persistence and face enrollment (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session (Business Console, `GET /v3/session/{sessionId}/decision/` via the returned `request_id`, `status.updated` webhook) and the searched face is enrolled into your face search index. Faces enrolled by Face Search calls are excluded from future Face Search results, so repeated searches never match each other. When `false`, the call is one-shot: nothing is stored, the face is not enrolled, and `match_image_url` values are internal storage paths rather than downloadable URLs.\n *\n * **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload, no session is persisted, and no credits are consumed.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * `POST /v3/face-search/`\n */\n search(\n params: FaceSearchSearchParams,\n options?: RequestOptions,\n ): APIPromise<FaceSearchSearchResponse> {\n return this._client.request(FACE_SEARCH_SEARCH, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { FraudCheckPlan, FraudCheckResponse } from \"../types/components.js\";\nimport type { FraudChecksCreateParams, FraudChecksPlanParams } from \"../types/fraud-checks.js\";\n\nconst FRAUD_CHECKS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/fraud/checks/\",\n body: \"json\",\n dates: \"FraudCheckResponse\",\n};\nconst FRAUD_CHECKS_PLAN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/fraud/checks/plan/\",\n body: \"json\",\n};\nconst FRAUD_CHECKS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/fraud/checks/{check_id}/\",\n dates: \"FraudCheckResponse\",\n};\n\n/** `fraud_checks` */\nexport class FraudChecks extends APIResource {\n /**\n * Run a Fraud Check\n *\n * Submit one or more typed identifiers and receive normalization, fresh enrichment, authoritative validation where the country and identifier type are covered, independent risk dimensions and a recommendation in one response.\n *\n * These profiles support identifier checks. Selfie-based identity binding (`biometric_identity`) requires profile version `2026-09-14.2` and a Brazilian CPF; it runs only with the user's consent and when your organization is entitled to it. Earlier versions report it as `not_available_in_profile_version`. Modules that cannot run are reported as skipped with a deterministic reason; a source that could not answer is never reported as an identity mismatch.\n *\n * `POST /v3/fraud/checks/`\n */\n create(\n params: FraudChecksCreateParams,\n options?: RequestOptions,\n ): APIPromise<FraudCheckResponse> {\n return this._client.request(FRAUD_CHECKS_CREATE, [], params, options);\n }\n\n /**\n * Plan a Fraud Check\n *\n * Validate selected checks and estimate their price without executing, creating a session or billing.\n *\n * `POST /v3/fraud/checks/plan/`\n */\n plan(params: FraudChecksPlanParams, options?: RequestOptions): APIPromise<FraudCheckPlan> {\n return this._client.request(FRAUD_CHECKS_PLAN, [], params, options);\n }\n\n /**\n * Retrieve a Fraud Check\n *\n * Fetch a previously created check by its `check_id`.\n *\n * `GET /v3/fraud/checks/{check_id}/`\n *\n * @param checkId check_id\n */\n retrieve(checkId: string, options?: RequestOptions): APIPromise<FraudCheckResponse> {\n return this._client.request(FRAUD_CHECKS_RETRIEVE, [checkId], undefined, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n IdVerificationVerifyParams,\n IdVerificationVerifyResponse,\n} from \"../types/id-verification.js\";\n\nconst ID_VERIFICATION_VERIFY: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/\",\n body: \"multipart\",\n files: [\"back_image\", \"front_image\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `id_verification` */\nexport class IdVerification extends APIResource {\n /**\n * ID Verification (document OCR + fraud checks)\n *\n * OCR an identity document and run document fraud checks in one call - returns the extracted holder fields, the parsed MRZ, an `Approved`/`Declined`/`In Review` `status`, and a `warnings` list explaining every issue found. Supports 14,000+ document types from 220+ countries and territories.\n *\n * **How it works.** Send the document's `front_image` (required) and, for two-sided documents, the `back_image`. Upload uncropped photos with all four corners of the document visible - the service detects, aligns, and crops the document itself, so do not pre-crop. The document is classified automatically (you never declare the country or document type), the visual zone is read with OCR, and the MRZ and any barcodes are decoded. Cross-checks then validate dates, number formats, and MRZ check digits, and compare the visual zone against the MRZ. With `perform_document_liveness=true`, the images are additionally screened for screen replays, printed copies, and portrait manipulation.\n *\n * **Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Fraud and hard-failure risks always decline: `DOCUMENT_EXPIRED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`, `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, plus extraction failures (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`). (`PORTRAIT_IMAGE_NOT_DETECTED`, `COULD_NOT_DETECT_DOCUMENT_TYPE`, `INVALID_DATE`, and `MRZ_NOT_DETECTED` exist in workflow sessions but are never produced by this standalone endpoint.) Three risk groups are configurable per request via `invalid_mrz_action`, `inconsistent_data_action`, and `expiration_date_not_detected_action` (`DECLINE` or `NO_ACTION`). All other warnings (e.g. `POSSIBLE_DUPLICATED_USER`) are informational and never decline on their own. When `perform_document_liveness=true` (the default) and the forgery check returns no usable score - the provider failed, answered non-200, or answered HTTP 200 with `status=\"ERR\"` - the call returns `200` with `status: \"In Review\"` and a `DOCUMENT_LIVENESS_NOT_COMPUTED` warning (`log_type: \"warning\"`) instead of `Approved`: a check that did not run is not evidence that the document is genuine. This escalation is not configurable and never overrides a `Declined`; with `perform_document_liveness=false` the check is skipped and the status follows the remaining warnings as before. A document that cannot be processed at all returns `400` with `{\"error\": \"COULD_NOT_RECOGNIZE_DOCUMENT\"}`; a readable but problematic document returns `200` with `status: \"Declined\"` - always inspect `id_verification.status` and `id_verification.warnings`, not just the HTTP code.\n *\n * **Billing.** Each `200` response consumes one ID Verification API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the not-enough-credits error before any image processing.\n *\n * **Session persistence (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session: it appears in the Business Console, the returned `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/`, the cropped document/portrait images are stored and returned as short-lived media URLs (`https://<media-host>/ocr/...`), and a `status.updated` webhook is emitted to your configured webhook endpoints. When `false`, nothing is stored, `request_id` is a one-off correlation UUID, and `portrait_image`/`front_image`/`back_image` are returned inline as base64-encoded JPEG strings.\n *\n * **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload (a fictional \"Sandbox User\" USA identity card), no session is persisted, and no credits are consumed.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * `POST /v3/id-verification/`\n */\n verify(\n params: IdVerificationVerifyParams,\n options?: RequestOptions,\n ): APIPromise<IdVerificationVerifyResponse> {\n return this._client.request(ID_VERIFICATION_VERIFY, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n DigitalIdWalletApiWalletCatalogResponse,\n DigitalIdWalletApiWalletVerificationResponse,\n} from \"../types/components.js\";\nimport type {\n IdWalletsStartAudkenniParams,\n IdWalletsStartBankidCzParams,\n IdWalletsStartBankidNoParams,\n IdWalletsStartBankidSeParams,\n IdWalletsStartBuypassParams,\n IdWalletsStartConnectidParams,\n IdWalletsStartDiiaParams,\n IdWalletsStartEparakstsMobileParams,\n IdWalletsStartEudiParams,\n IdWalletsStartFranceconnectParams,\n IdWalletsStartFrejaidParams,\n IdWalletsStartFtnParams,\n IdWalletsStartGovbrParams,\n IdWalletsStartGovukWalletParams,\n IdWalletsStartIdcardEeParams,\n IdWalletsStartIdinParams,\n IdWalletsStartItsmeParams,\n IdWalletsStartMitidParams,\n IdWalletsStartMobileIdParams,\n IdWalletsStartMojeidParams,\n IdWalletsStartOneidParams,\n IdWalletsStartPersonalausweisParams,\n IdWalletsStartSmartIdParams,\n IdWalletsStartUaePassParams,\n IdWalletsStartVippsParams,\n} from \"../types/id-wallets.js\";\n\nconst ID_WALLETS_CANCEL_VERIFICATION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/verifications/{request_id}/cancel/\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_LIST: OperationSpec = { method: \"GET\", path: \"/v3/id-verification/wallets/\" };\nconst ID_WALLETS_POLL_VERIFICATION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/verifications/{request_id}/poll/\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_RETRIEVE_VERIFICATION: OperationSpec = {\n method: \"GET\",\n path: \"/v3/id-verification/wallets/verifications/{request_id}/\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_AUDKENNI: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/audkenni/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_BANKID_CZ: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/bankid-cz/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_BANKID_NO: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/bankid-no/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_BANKID_SE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/bankid-se/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_BUYPASS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/buypass/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_CONNECTID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/connectid/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_DIIA: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/diia/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_EPARAKSTS_MOBILE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/eparaksts-mobile/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_EUDI: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/eudi/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_FRANCECONNECT: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/franceconnect/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_FREJAID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/frejaid/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_FTN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/ftn/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_GOVBR: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/govbr/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_GOVUK_WALLET: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/govuk-wallet/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_IDCARD_EE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/idcard-ee/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_IDIN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/idin/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_ITSME: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/itsme/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_MITID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/mitid/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_MOBILE_ID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/mobile-id/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_MOJEID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/mojeid/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_ONEID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/oneid/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_PERSONALAUSWEIS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/personalausweis/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_SMART_ID: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/smart-id/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_UAE_PASS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/uae-pass/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\nconst ID_WALLETS_START_VIPPS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/id-verification/wallets/vipps/\",\n body: \"json\",\n dates: \"DigitalIdWalletApiWalletVerificationResponse\",\n};\n\n/** `id_wallets` */\nexport class IdWallets extends APIResource {\n /**\n * Cancel a wallet verification\n *\n * Withdraw a pending verification: it is declined as cancelled and never billed. A decided one is returned unchanged. Smart-ID and Mobile-ID: a cancel that arrives while a poll is checking the sign-in waits a few seconds for that poll, then declines it, or returns it verified if the user had already confirmed. A verification the user is completing right now cannot be cancelled (409 verification_in_progress with Retry-After): retry after that many seconds to read its outcome.\n *\n * `POST /v3/id-verification/wallets/verifications/{request_id}/cancel/`\n *\n * @param requestId The request_id the start endpoint returned.\n */\n cancelVerification(\n requestId: string,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_CANCEL_VERIFICATION, [requestId], undefined, options);\n }\n\n /**\n * List Digital ID wallets\n *\n * Every Digital ID wallet with its start endpoint, countries, required fields and whether this application can start it in this environment now. Listed does not mean live.\n *\n * `GET /v3/id-verification/wallets/`\n */\n list(options?: RequestOptions): APIPromise<DigitalIdWalletApiWalletCatalogResponse> {\n return this._client.request(ID_WALLETS_LIST, [], undefined, options);\n }\n\n /**\n * Poll a wallet verification\n *\n * Smart-ID and Mobile-ID: ask the provider whether the user confirmed, refused or let the prompt lapse, and verify the signed identity when they confirmed. Redirect wallets complete through the user's browser, so for them this only reads the verification back. Answers the verification as it is afterwards.\n *\n * `POST /v3/id-verification/wallets/verifications/{request_id}/poll/`\n *\n * @param requestId The request_id the start endpoint returned.\n */\n pollVerification(\n requestId: string,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_POLL_VERIFICATION, [requestId], undefined, options);\n }\n\n /**\n * Get a wallet verification\n *\n * Status and result of a wallet verification: the normalized identity and the wallet's own attributes once verified, the error code once declined, the next action while pending. A verification past expires_at is decided timeout.\n *\n * `GET /v3/id-verification/wallets/verifications/{request_id}/`\n *\n * @param requestId The request_id the start endpoint returned.\n */\n retrieveVerification(\n requestId: string,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_RETRIEVE_VERIFICATION, [requestId], undefined, options);\n }\n\n /**\n * Start Auðkenni verification\n *\n * Start a Auðkenni sign-in (Auðkenni (Icelandic electronic ID); ISL) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/audkenni/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startAudkenni(\n params: IdWalletsStartAudkenniParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_AUDKENNI, [], params, options);\n }\n\n /**\n * Start Bank iD verification\n *\n * Start a Bank iD sign-in (Bankovní identita, a.s.; CZE) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/bankid-cz/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startBankidCz(\n params: IdWalletsStartBankidCzParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_BANKID_CZ, [], params, options);\n }\n\n /**\n * Start BankID (NOR) verification\n *\n * Start a BankID (NOR) sign-in (BankID BankAxept AS; NOR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/bankid-no/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startBankidNo(\n params: IdWalletsStartBankidNoParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_BANKID_NO, [], params, options);\n }\n\n /**\n * Start BankID (SWE) verification\n *\n * Start a BankID (SWE) sign-in (Finansiell ID-Teknik / bank consortium; SWE) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/bankid-se/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startBankidSe(\n params: IdWalletsStartBankidSeParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_BANKID_SE, [], params, options);\n }\n\n /**\n * Start Buypass ID verification\n *\n * Start a Buypass ID sign-in (Buypass AS; NOR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/buypass/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startBuypass(\n params: IdWalletsStartBuypassParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_BUYPASS, [], params, options);\n }\n\n /**\n * Start ConnectID verification\n *\n * Start a ConnectID sign-in (Australian Payments Plus; AUS) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/connectid/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startConnectid(\n params: IdWalletsStartConnectidParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_CONNECTID, [], params, options);\n }\n\n /**\n * Start Diia verification\n *\n * Start a Diia sign-in (Ministry of Digital Transformation of Ukraine; UKR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/diia/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startDiia(\n params: IdWalletsStartDiiaParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_DIIA, [], params, options);\n }\n\n /**\n * Start eParaksts mobile verification\n *\n * Start a eParaksts mobile sign-in (LVRTC (Latvian State Radio and Television Centre); LVA) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/eparaksts-mobile/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startEparakstsMobile(\n params: IdWalletsStartEparakstsMobileParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_EPARAKSTS_MOBILE, [], params, options);\n }\n\n /**\n * Start EUDI Wallet verification\n *\n * Start a EUDI Wallet sign-in (The user's own member state; the issuer differs per country; AUT, BEL, BGR, HRV, CYP, CZE, DNK, EST, FIN, FRA, DEU, GRC, HUN, IRL, ITA, LVA, LTU, LUX, MLT, NLD, POL, PRT, ROU, SVK, SVN, ESP, SWE, ISL, LIE, NOR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/eudi/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startEudi(\n params: IdWalletsStartEudiParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_EUDI, [], params, options);\n }\n\n /**\n * Start FranceConnect verification\n *\n * Start a FranceConnect sign-in (DINUM (French state); FRA) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/franceconnect/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startFranceconnect(\n params: IdWalletsStartFranceconnectParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_FRANCECONNECT, [], params, options);\n }\n\n /**\n * Start Freja eID verification\n *\n * Start a Freja eID sign-in (Freja eID Group; SWE) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/frejaid/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startFrejaid(\n params: IdWalletsStartFrejaidParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_FREJAID, [], params, options);\n }\n\n /**\n * Start Finnish Trust Network verification\n *\n * Start a Finnish Trust Network sign-in (Finnish banks and mobile operators (FTN); FIN) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/ftn/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startFtn(\n params: IdWalletsStartFtnParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_FTN, [], params, options);\n }\n\n /**\n * Start gov.br verification\n *\n * Start a gov.br sign-in (Governo Federal do Brasil; BRA) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/govbr/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startGovbr(\n params: IdWalletsStartGovbrParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_GOVBR, [], params, options);\n }\n\n /**\n * Start GOV.UK Wallet verification\n *\n * Start a GOV.UK Wallet sign-in (UK Government Digital Service; GBR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/govuk-wallet/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startGovukWallet(\n params: IdWalletsStartGovukWalletParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_GOVUK_WALLET, [], params, options);\n }\n\n /**\n * Start Estonian ID-card verification\n *\n * Start a Estonian ID-card sign-in (Police and Border Guard Board (Estonia); EST) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/idcard-ee/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startIdcardEe(\n params: IdWalletsStartIdcardEeParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_IDCARD_EE, [], params, options);\n }\n\n /**\n * Start iDIN verification\n *\n * Start a iDIN sign-in (Dutch banks (Currence iDIN); NLD) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/idin/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startIdin(\n params: IdWalletsStartIdinParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_IDIN, [], params, options);\n }\n\n /**\n * Start itsme verification\n *\n * Start a itsme sign-in (Belgian Mobile ID; BEL, LUX, NLD) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/itsme/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startItsme(\n params: IdWalletsStartItsmeParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_ITSME, [], params, options);\n }\n\n /**\n * Start MitID verification\n *\n * Start a MitID sign-in (Danish Agency for Digital Government; DNK) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/mitid/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startMitid(\n params: IdWalletsStartMitidParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_MITID, [], params, options);\n }\n\n /**\n * Start Mobile-ID verification\n *\n * Start a Mobile-ID sign-in (SK ID Solutions with the national mobile operators; EST, LTU) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=confirm_in_app with the comparison code to show the user; the user confirms it and enters their PIN in the app (never collect the PIN). Poll POST /v3/id-verification/wallets/verifications/{request_id}/poll/ every poll_interval_seconds, or rely on the webhook: Didit polls in the background too. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/mobile-id/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startMobileId(\n params: IdWalletsStartMobileIdParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_MOBILE_ID, [], params, options);\n }\n\n /**\n * Start MojeID verification\n *\n * Start a MojeID sign-in (CZ.NIC; CZE) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/mojeid/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startMojeid(\n params: IdWalletsStartMojeidParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_MOJEID, [], params, options);\n }\n\n /**\n * Start OneID verification\n *\n * Start a OneID sign-in (OneID (UK bank-verified identity); GBR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/oneid/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startOneid(\n params: IdWalletsStartOneidParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_ONEID, [], params, options);\n }\n\n /**\n * Start Personalausweis verification\n *\n * Start a Personalausweis sign-in (Bundesministerium des Innern (eID); DEU) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/personalausweis/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startPersonalausweis(\n params: IdWalletsStartPersonalausweisParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_PERSONALAUSWEIS, [], params, options);\n }\n\n /**\n * Start Smart-ID verification\n *\n * Start a Smart-ID sign-in (SK ID Solutions; EST, LVA, LTU, BEL) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=confirm_in_app with the comparison code to show the user; the user confirms it and enters their PIN in the app (never collect the PIN). Poll POST /v3/id-verification/wallets/verifications/{request_id}/poll/ every poll_interval_seconds, or rely on the webhook: Didit polls in the background too. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/smart-id/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startSmartId(\n params: IdWalletsStartSmartIdParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_SMART_ID, [], params, options);\n }\n\n /**\n * Start UAE PASS verification\n *\n * Start a UAE PASS sign-in (UAE Digital Government Authority; ARE) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/uae-pass/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startUaePass(\n params: IdWalletsStartUaePassParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_UAE_PASS, [], params, options);\n }\n\n /**\n * Start Vipps verification\n *\n * Start a Vipps sign-in (Vipps MobilePay / BankID NO; NOR) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=redirect with the URL to send the user's browser to; the user returns to return_url with request_id and result appended. Read the outcome with GET /v3/id-verification/wallets/verifications/{request_id}/ or from the webhook, never from the URL. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.\n *\n * `POST /v3/id-verification/wallets/vipps/`\n *\n * Accepts `options.idempotencyKey` (header `Idempotency-Key`).\n */\n startVipps(\n params: IdWalletsStartVippsParams,\n options?: RequestOptions,\n ): APIPromise<DigitalIdWalletApiWalletVerificationResponse> {\n return this._client.request(ID_WALLETS_START_VIPPS, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n InvestigatorBatchAcceptResponse,\n InvestigatorDecision,\n InvestigatorQueueRow,\n InvestigatorRunDetail,\n InvestigatorSettings,\n} from \"../types/components.js\";\nimport type {\n InvestigatorAcceptRunParams,\n InvestigatorBatchAcceptRunsParams,\n InvestigatorExportActivityParams,\n InvestigatorListActivityParams,\n InvestigatorListActivityResponse,\n InvestigatorListGuardrailsResponse,\n InvestigatorListQueueParams,\n InvestigatorListQueueResponse,\n InvestigatorOverrideRunParams,\n InvestigatorRetrieveDashboardParams,\n InvestigatorRetrieveDashboardResponse,\n InvestigatorRetrievePerformanceParams,\n InvestigatorRetrievePerformanceResponse,\n InvestigatorRetrieveSummaryParams,\n InvestigatorRetrieveSummaryResponse,\n InvestigatorRetrieveTransactionResponse,\n InvestigatorUpdateSettingsParams,\n} from \"../types/investigator.js\";\n\nconst INVESTIGATOR_ACCEPT_RUN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/investigator/runs/{run_id}/accept/\",\n body: \"json\",\n dates: \"InvestigatorDecision\",\n};\nconst INVESTIGATOR_BATCH_ACCEPT_RUNS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/investigator/runs/batch-accept/\",\n body: \"json\",\n};\nconst INVESTIGATOR_EXPORT_ACTIVITY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/activity/export/\",\n query: [\"scope\", \"group\", \"actor\", \"since\", \"until\"],\n response: \"binary\",\n accept: \"text/csv\",\n};\nconst INVESTIGATOR_LIST_ACTIVITY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/activity/\",\n query: [\"scope\", \"group\", \"actor\", \"since\", \"until\", \"limit\", \"offset\"],\n};\nconst INVESTIGATOR_LIST_GUARDRAILS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/guardrails/\",\n};\nconst INVESTIGATOR_LIST_QUEUE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/queue/\",\n query: [\n \"scope\",\n \"kind\",\n \"queue\",\n \"recommendation\",\n \"confidence\",\n \"ready\",\n \"search\",\n \"limit\",\n \"offset\",\n ],\n dates: { p: { results: { i: \"InvestigatorQueueRow\" } } },\n};\nconst INVESTIGATOR_OVERRIDE_RUN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/investigator/runs/{run_id}/override/\",\n body: \"json\",\n dates: \"InvestigatorDecision\",\n};\nconst INVESTIGATOR_RETRIEVE_DASHBOARD: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/dashboard/\",\n query: [\"scope\"],\n};\nconst INVESTIGATOR_RETRIEVE_PERFORMANCE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/performance/\",\n query: [\"scope\", \"period\"],\n};\nconst INVESTIGATOR_RETRIEVE_RUN: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/runs/{run_id}/\",\n dates: \"InvestigatorRunDetail\",\n};\nconst INVESTIGATOR_RETRIEVE_SETTINGS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/settings/\",\n dates: \"InvestigatorSettings\",\n};\nconst INVESTIGATOR_RETRIEVE_SUMMARY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/summary/\",\n query: [\"scope\", \"timezone\"],\n dates: { p: { last_report_at: 1 } },\n};\nconst INVESTIGATOR_RETRIEVE_TRANSACTION: OperationSpec = {\n method: \"GET\",\n path: \"/v3/investigator/transactions/{transaction_id}/\",\n dates: { p: { investigator: \"InvestigatorBlock\" } },\n};\nconst INVESTIGATOR_UPDATE_SETTINGS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/investigator/settings/\",\n body: \"json\",\n dates: \"InvestigatorSettings\",\n};\n\n/** `investigator` */\nexport class Investigator extends APIResource {\n /**\n * Accept a recommendation\n *\n * Applies the recommended action through the item's normal path, so your usual webhooks fire. A `narrative` makes it edited and accepted. Restricted keys need the `decisions` scope (write); transaction alerts also need `transactions` (write). Escalating a verification or transaction opens a case.\n *\n * `POST /v3/investigator/runs/{run_id}/accept/`\n *\n * @param runId run_id\n */\n acceptRun(\n runId: string,\n params: InvestigatorAcceptRunParams = {},\n options?: RequestOptions,\n ): APIPromise<InvestigatorDecision> {\n return this._client.request(INVESTIGATOR_ACCEPT_RUN, [runId], params, options);\n }\n\n /**\n * Batch accept recommendations\n *\n * Accepts up to 50 reports marked Ready to accept. Each is its own decision: one that cannot be accepted is skipped with its reason. Restricted keys need the `decisions` scope (write); transaction alerts also need `transactions` (write). Escalating a verification or transaction opens a case.\n *\n * `POST /v3/investigator/runs/batch-accept/`\n */\n batchAcceptRuns(\n params: InvestigatorBatchAcceptRunsParams,\n options?: RequestOptions,\n ): APIPromise<InvestigatorBatchAcceptResponse> {\n return this._client.request(INVESTIGATOR_BATCH_ACCEPT_RUNS, [], params, options);\n }\n\n /**\n * Export Investigator activity\n *\n * The same entries as CSV, one row per decision, newest first, up to 10,000 entries. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/activity/export/`\n */\n exportActivity(\n params: InvestigatorExportActivityParams = {},\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(INVESTIGATOR_EXPORT_ACTIVITY, [], params, options);\n }\n\n /**\n * List Investigator activity\n *\n * The append-only audit trail, newest first. A batch accept is one entry. Adds `counts` per group and `actors`. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/activity/`\n */\n listActivity(\n params: InvestigatorListActivityParams = {},\n options?: RequestOptions,\n ): PagePromise<InvestigatorListActivityResponse, Record<string, unknown>> {\n return this._client.requestPage(INVESTIGATOR_LIST_ACTIVITY, [], params, options);\n }\n\n /**\n * List the locked guardrails\n *\n * The five guardrails that apply to every queue. They cannot be switched off. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/guardrails/`\n */\n listGuardrails(options?: RequestOptions): APIPromise<InvestigatorListGuardrailsResponse> {\n return this._client.request(INVESTIGATOR_LIST_GUARDRAILS, [], undefined, options);\n }\n\n /**\n * List the Investigator queue\n *\n * Open reports, **Ready to accept** first, then by deadline, risk and wait. `counts` covers every kind in scope. `count` is capped at 100. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/queue/`\n */\n listQueue(\n params: InvestigatorListQueueParams = {},\n options?: RequestOptions,\n ): PagePromise<InvestigatorListQueueResponse, InvestigatorQueueRow> {\n return this._client.requestPage(INVESTIGATOR_LIST_QUEUE, [], params, options);\n }\n\n /**\n * Override a recommendation\n *\n * Takes another action with a category and a reason. Also overrides a decision the Investigator took on its own while it still stands. Restricted keys need the `decisions` scope (write); transaction alerts also need `transactions` (write). Escalating a verification or transaction opens a case.\n *\n * `POST /v3/investigator/runs/{run_id}/override/`\n *\n * @param runId run_id\n */\n overrideRun(\n runId: string,\n params: InvestigatorOverrideRunParams,\n options?: RequestOptions,\n ): APIPromise<InvestigatorDecision> {\n return this._client.request(INVESTIGATOR_OVERRIDE_RUN, [runId], params, options);\n }\n\n /**\n * Investigator dashboard\n *\n * The last 30 days: reviews, decisions, automation rate, hours saved, spend, overrides, quality samples since go-live, per-queue and weekly figures. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/dashboard/`\n */\n retrieveDashboard(\n params: InvestigatorRetrieveDashboardParams = {},\n options?: RequestOptions,\n ): APIPromise<InvestigatorRetrieveDashboardResponse> {\n return this._client.request(INVESTIGATOR_RETRIEVE_DASHBOARD, [], params, options);\n }\n\n /**\n * Investigator performance\n *\n * Agreement with your team, volume, time saved, confidence calibration, per-queue results, override reasons and disagreements for a period. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/performance/`\n */\n retrievePerformance(\n params: InvestigatorRetrievePerformanceParams = {},\n options?: RequestOptions,\n ): APIPromise<InvestigatorRetrievePerformanceResponse> {\n return this._client.request(INVESTIGATOR_RETRIEVE_PERFORMANCE, [], params, options);\n }\n\n /**\n * Get an Investigator report\n *\n * The full report of one run. 404 when the run has no completed report, or its item was deleted. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/runs/{run_id}/`\n *\n * @param runId run_id\n */\n retrieveRun(runId: string, options?: RequestOptions): APIPromise<InvestigatorRunDetail> {\n return this._client.request(INVESTIGATOR_RETRIEVE_RUN, [runId], undefined, options);\n }\n\n /**\n * Get Investigator settings\n *\n * The stage (`none`, `shadow` or `live`) and the monthly spend limit with this month's spend. Restricted keys need the `applications` scope (read).\n *\n * `GET /v3/investigator/settings/`\n */\n retrieveSettings(options?: RequestOptions): APIPromise<InvestigatorSettings> {\n return this._client.request(INVESTIGATOR_RETRIEVE_SETTINGS, [], undefined, options);\n }\n\n /**\n * Investigator summary\n *\n * Stage, queue counts, reports prepared and decided today, 30-day agreement, prices and the autonomy level of each queue. Restricted keys need the `decisions` scope (read); transaction alerts also need `transactions`.\n *\n * `GET /v3/investigator/summary/`\n */\n retrieveSummary(\n params: InvestigatorRetrieveSummaryParams = {},\n options?: RequestOptions,\n ): APIPromise<InvestigatorRetrieveSummaryResponse> {\n return this._client.request(INVESTIGATOR_RETRIEVE_SUMMARY, [], params, options);\n }\n\n /**\n * Get a transaction's Investigator review\n *\n * The transaction's latest review, or `investigator: null` when it never had one. Restricted keys need the `decisions` and `transactions` scopes (read).\n *\n * `GET /v3/investigator/transactions/{transaction_id}/`\n *\n * @param transactionId transaction_id\n */\n retrieveTransaction(\n transactionId: string,\n options?: RequestOptions,\n ): APIPromise<InvestigatorRetrieveTransactionResponse> {\n return this._client.request(\n INVESTIGATOR_RETRIEVE_TRANSACTION,\n [transactionId],\n undefined,\n options,\n );\n }\n\n /**\n * Update Investigator settings\n *\n * Change the stage, the monthly spend limit, or both. Moving past `none` needs a plan that includes the Investigator (Growth or higher); `live` also needs a contract that prices it, if you have one. Restricted keys need the `applications` scope (write).\n *\n * `PATCH /v3/investigator/settings/`\n */\n updateSettings(\n params: InvestigatorUpdateSettingsParams = {},\n options?: RequestOptions,\n ): APIPromise<InvestigatorSettings> {\n return this._client.request(INVESTIGATOR_UPDATE_SETTINGS, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { IPRiskResponse } from \"../types/components.js\";\nimport type { IpAssessRiskParams } from \"../types/ip.js\";\n\nconst IP_ASSESS_RISK: OperationSpec = {\n method: \"POST\",\n path: \"/v3/ip/risk/\",\n body: \"json\",\n dates: \"IPRiskResponse\",\n};\n\n/** `ip` */\nexport class Ip extends APIResource {\n /**\n * Risk-score an IP address\n *\n * Return geolocation, network ownership, VPN/Tor and data-center flags, threat data, and `country_mismatch` for a supplied IP address. The endpoint creates an API session and returns its id as `request_id`.\n *\n * **Decision.** `status` is `In Review` when the resolved country conflicts with `claimed_country`, or when the address is associated with VPN, Tor, or data-center infrastructure. Otherwise it is `Approved`.\n *\n * **Best effort.** IP enrichment is best effort. If no enrichment source returns usable data, the endpoint returns an approved response with `ip.ip_address: null`, `ip.country_mismatch: null`, and an empty `ip.threat` object.\n *\n * **Billing.** Live calls use IP Risk API pricing. The request is billable once the lookup starts.\n *\n * **Sandbox.** Sandbox keys validate the request and return deterministic approved data without consuming credits, creating a session, or contributing to Networks.\n *\n * **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests per minute per API key across all POST/PATCH/DELETE endpoints.\n *\n * `POST /v3/ip/risk/`\n */\n assessRisk(params: IpAssessRiskParams, options?: RequestOptions): APIPromise<IPRiskResponse> {\n return this._client.request(IP_ASSESS_RISK, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n KybListShareholdersParams,\n KybListShareholdersResponse,\n KybListShareholdersResponse202,\n KybListUbosParams,\n KybListUbosResponse,\n KybListUbosResponse202,\n KybSearchParams,\n KybSearchResponse,\n KybSelectParams,\n KybSelectResponse,\n} from \"../types/kyb.js\";\n\nconst KYB_LIST_SHAREHOLDERS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/kyb/shareholders/\",\n body: \"json\",\n dates: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n};\nconst KYB_LIST_UBOS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/kyb/ubo/\",\n body: \"json\",\n dates: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n};\nconst KYB_SEARCH: OperationSpec = {\n method: \"POST\",\n path: \"/v3/kyb/search/\",\n body: \"json\",\n dates: { p: { created_at: 1 } },\n};\nconst KYB_SELECT: OperationSpec = {\n method: \"POST\",\n path: \"/v3/kyb/select/\",\n body: \"json\",\n dates: {\n p: {\n kyb_registry: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n created_at: 1,\n },\n },\n};\n\n/** `kyb` */\nexport class Kyb extends APIResource {\n /**\n * KYB registry company with shareholders (standalone)\n *\n * Retrieve the Lite profile **plus the direct shareholders** (natural persons and corporate entities, with their ownership bands) of one candidate returned by `POST /v3/kyb/search/`.\n *\n * **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. The search runs on the Lite registry chain; when the country's ownership data lives at another registry Didit re-finds the company there by registration number, at no extra cost.\n *\n * **Billing.** Billed at the country's Shareholders price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). When the registry holds no shareholder record for the company (or the country offers no ownership data at all) the Lite profile is delivered and billed instead: read `registry_tier_delivered` and `registry_ownership_status`. The balance is checked against the Shareholders price before any registry call (`403` when short).\n *\n * **Availability.** v3 only. Every call creates a business session (its id is the `request_id`).\n *\n * **Pending reports.** When a report is still being prepared, or the ownership section has not been retrieved from the registry yet, the endpoint returns 202 Accepted, kyb_registry.fetch_status=pending, kyb_registry.registry_ownership_status=pending, and registry_tier_delivered=null. Keep request_id and retrieve GET /v3/session/{request_id}/decision/ until registry_checks[0].company.fetch_status is resolved. Didit completes the report automatically and charges the delivered tier once it is ready. Do not repeat the purchase while it is pending; every new POST creates a separate request.\n *\n * `POST /v3/kyb/shareholders/`\n */\n listShareholders(\n params: KybListShareholdersParams,\n options?: RequestOptions,\n ): APIPromise<KybListShareholdersResponse | KybListShareholdersResponse202> {\n return this._client.request(KYB_LIST_SHAREHOLDERS, [], params, options);\n }\n\n /**\n * KYB registry company with ultimate beneficial owners (standalone)\n *\n * Retrieve the Lite profile, the direct shareholders **and the ultimate beneficial owners** resolved through the ownership chain (`registry_data.ubo_resolution` carries the corporate parent chain) of one candidate returned by `POST /v3/kyb/search/`.\n *\n * **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. The search runs on the Lite registry chain; when the country's ownership data lives at another registry Didit re-finds the company there by registration number, at no extra cost.\n *\n * **Billing.** Billed at the country's UBO price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). The tier delivered is the highest the country and the registry can serve: Shareholders when the resolved report names no natural person as a beneficial owner, Lite when there is no ownership record at all; `registry_tier_delivered` names what was billed. The balance is checked against the UBO price before any registry call (`403` when short).\n *\n * **Availability.** v3 only. Every call creates a business session (its id is the `request_id`).\n *\n * **Pending reports.** When a report is still being prepared, or the ownership section has not been retrieved from the registry yet, the endpoint returns 202 Accepted, kyb_registry.fetch_status=pending, kyb_registry.registry_ownership_status=pending, and registry_tier_delivered=null. Keep request_id and retrieve GET /v3/session/{request_id}/decision/ until registry_checks[0].company.fetch_status is resolved. Didit completes the report automatically and charges the delivered tier once it is ready. Do not repeat the purchase while it is pending; every new POST creates a separate request.\n *\n * `POST /v3/kyb/ubo/`\n */\n listUbos(\n params: KybListUbosParams,\n options?: RequestOptions,\n ): APIPromise<KybListUbosResponse | KybListUbosResponse202> {\n return this._client.request(KYB_LIST_UBOS, [], params, options);\n }\n\n /**\n * KYB registry company search (standalone)\n *\n * Search official company registries for candidate companies by name and/or registration number. This is step 1 of the two-step registry flow: **search** returns lightweight candidates, then `POST /v3/kyb/select/` retrieves the full profile of one candidate.\n *\n * **Search billing.** Successful searches using a paid company-data source cost USD 0.50 per request, regardless of candidate count. Empty results, failures and results served only by other sources are not charged. The applicable price is reserved before searching; insufficient balance returns 403 with code `insufficient_credits`. Contract rates apply where agreed, and an unconfigured contract search rate returns 403. Sandbox searches are free. Repeating a successful search can incur another charge; callback delivery does not add a charge. Profile retrieval is billed separately. This search fee also applies to v2. Candidates always come back with `fetch_status: \"pending\"`: the full company data is only fetched (and billed) on select.\n *\n * **`kyb_response_id` is ephemeral.** It is a per-search handle, not a stable company id. Select promptly after searching and re-search to get a fresh handle instead of storing it.\n *\n * **`tier` picks the provider chain.** `tier` names the registry tier the search runs on: `basic` (the default, the Lite chain), `shareholders` or `ubo`. The search uses the provider chain that serves that tier, and it is not always the same chain the Lite search reads, so an empty Lite search is not proof that the registry does not hold the company - search again at the tier you need. A country that does not offer the tier you name is searched at the highest tier it offers up to that one. Retrieve the candidate from the endpoint that sells that tier: `POST /v3/kyb/select/` (Lite), `POST /v3/kyb/shareholders/` or `POST /v3/kyb/ubo/`.\n *\n * **Authentication.** `POST /v3/kyb/search/` (and `/v2/`) takes your application's API key in the `x-api-key` header. The hosted `POST /v1/kyb/search/` is the session-authenticated route a hosted verification flow calls: it answers `403` to an API key and takes no `tier` - the workflow's KYB registry configuration picks the chain.\n *\n * **Two modes.**\n * - *Synchronous (default):* the API polls the registry until the search resolves and returns the final candidate list (`search_resolved: true`).\n * - *Asynchronous:* pass `webhook_url` and the API returns immediately - usually with `search_status: \"pending\"` and an empty candidate list - then POSTs a `kyb.registry_search.resolved` callback to your URL when the registry finishes. The callback body is `{\"event_id\", \"event_type\": \"kyb.registry_search.resolved\", \"request_id\", \"vendor_data\", \"metadata\", \"search_status\", \"search_resolved\", \"kyb_registry\", \"timestamp\", \"created_at\"}` - note `timestamp` and `created_at` in the callback are epoch integers, unlike this endpoint's ISO `created_at` - and is sent **unsigned** (header `X-Didit-Unsigned-Callback: true`, no `X-Signature`).\n *\n * **Country codes.** ISO 3166-1 alpha-2 (`GB`, `DE`), plus `XX-YY` subdivision codes where registries are regional - e.g. `US-CA` for California.\n *\n * **Sandbox.** Keys from sandbox applications return one static candidate without contacting any registry.\n *\n * `POST /v3/kyb/search/`\n */\n search(params: KybSearchParams, options?: RequestOptions): APIPromise<KybSearchResponse> {\n return this._client.request(KYB_SEARCH, [], params, options);\n }\n\n /**\n * KYB registry company select - Lite tier (standalone)\n *\n * Retrieve the **Lite** registry profile of one candidate returned by `POST /v3/kyb/search/` - company details, registered address, identifiers, status, activity and the officers, plus the raw registry payload. Shareholders and ultimate beneficial owners are sold by `POST /v3/kyb/shareholders/` and `POST /v3/kyb/ubo/`.\n *\n * **Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. The handle is ephemeral and scoped to that search - select promptly, and re-search for a fresh handle rather than storing it.\n *\n * **Billing.** Each select is billed at the country's Lite price (any search fee is separate); see [KYB registry pricing](/getting-started/kyb-registry-pricing). The balance is checked before any registry call (`403` when short) and the charge is recorded against the created business session.\n *\n * **Persistence is mandatory.** Every select creates a business session (its id is the `request_id`) so billing and retrieval can be tracked; it appears in the console. `save_api_request` is accepted for symmetry but must be `true` (the default) - sending `false` returns `400`.\n *\n * `POST /v3/kyb/select/`\n */\n select(params: KybSelectParams, options?: RequestOptions): APIPromise<KybSelectResponse> {\n return this._client.request(KYB_SELECT, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { ComplianceList, ComplianceListEntry } from \"../types/components.js\";\nimport type {\n ListsCreateParams,\n ListsEntriesCreateParams,\n ListsEntriesListParams,\n ListsEntriesListResponse,\n ListsEntriesUploadFaceParams,\n ListsListParams,\n ListsListResponse,\n ListsUpdateParams,\n ListsUpdateResponse,\n} from \"../types/lists.js\";\n\nconst LISTS_ENTRIES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/lists/{list_uuid}/entries/\",\n body: \"json\",\n dates: \"ComplianceListEntry\",\n};\nconst LISTS_ENTRIES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/lists/{list_uuid}/entries/{entry_uuid}/\",\n response: \"none\",\n};\nconst LISTS_ENTRIES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/lists/{list_uuid}/entries/\",\n query: [\"search\", \"reference_session_id\", \"limit\", \"offset\"],\n dates: { p: { results: { i: \"ComplianceListEntry\" } } },\n};\nconst LISTS_ENTRIES_UPLOAD_FACE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/lists/{list_uuid}/entries/face-upload/\",\n body: \"json\",\n dates: \"ComplianceListEntry\",\n};\nconst LISTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/lists/\",\n body: \"json\",\n dates: \"ComplianceList\",\n};\nconst LISTS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/lists/{list_uuid}/\",\n response: \"none\",\n};\nconst LISTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/lists/\",\n query: [\"list_type\", \"entry_type\", \"ordering\", \"limit\", \"offset\"],\n dates: { p: { results: { i: \"ComplianceList\" } } },\n};\nconst LISTS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/lists/{list_uuid}/\",\n dates: \"ComplianceList\",\n};\nconst LISTS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/lists/{list_uuid}/\",\n body: \"json\",\n};\n\n/** `lists.entries` */\nexport class ListsEntries extends APIResource {\n /**\n * Create a list entry\n *\n * Adds one entry to a list, in one of three ways: by `value`; from a verification session with `reference_session_id`, where Didit reads the value from the session's most recent record of the list's entry type and links the entry to it; or by `value` with a `reference_object_uuid` and `metadata.reference_type` pointing back to a transaction, user or business. On the system face, document, phone and email blocklists, the record read from the session is also flagged as blocklisted, so new matching sessions are declined; on the system user and business blocklists, matching users or businesses are set to `BLOCKED`. Sessions and transactions that already finished are not changed. A scoped API key needs `workflows: write`. See [Create a list entry](https://docs.didit.me/management-api/lists/create-entry) for each mode.\n *\n * `POST /v3/lists/{list_uuid}/entries/`\n *\n * @param listUuid UUID of the list to add to. For a face you only have as an image, use Upload a face to a list instead.\n */\n create(\n listUuid: string,\n params: ListsEntriesCreateParams = {},\n options?: RequestOptions,\n ): APIPromise<ComplianceListEntry> {\n return this._client.request(LISTS_ENTRIES_CREATE, [listUuid], params, options);\n }\n\n /**\n * Delete a list entry\n *\n * Deletes one entry from a list, system lists included. The entry stops matching at once, and deletion is irreversible: to list the value again, create a new entry. On a system face, document, phone or email blocklist, the record the entry stands for is no longer flagged as blocklisted; on the system user or business blocklist, users or businesses of the application whose `vendor_data` equals the entry's value (or whose `didit_internal_id` equals its `reference_object_uuid`) and that are `BLOCKED` return to `ACTIVE`. Sessions and transactions that already finished keep their status. A scoped API key needs `workflows: write`.\n *\n * `DELETE /v3/lists/{list_uuid}/entries/{entry_uuid}/`\n *\n * @param listUuid UUID of the list that holds the entry.\n * @param entryUuid UUID of the entry, as returned by List list entries or Create a list entry.\n */\n delete(listUuid: string, entryUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(LISTS_ENTRIES_DELETE, [listUuid, entryUuid], undefined, options);\n }\n\n /**\n * List list entries\n *\n * Returns the current entries of one list, newest first. `search` matches part of an entry's `value` or `display_label` without regard to case, and `reference_session_id` narrows the results to the entries taken from one person verification session. Image URLs in `metadata` are short-lived signed URLs issued again on every call; a scoped API key without `media: read` receives `null` in their place. A scoped API key needs `workflows: read`.\n *\n * `GET /v3/lists/{list_uuid}/entries/`\n *\n * @param listUuid UUID of the list, as returned by List lists or Create a list.\n */\n list(\n listUuid: string,\n params: ListsEntriesListParams = {},\n options?: RequestOptions,\n ): PagePromise<ListsEntriesListResponse, ComplianceListEntry> {\n return this._client.requestPage(LISTS_ENTRIES_LIST, [listUuid], params, options);\n }\n\n /**\n * Upload a face to a list\n *\n * Adds a face to a face blocklist or face allowlist from a base64-encoded JPEG or PNG image, for when you have no verification session to reference. Didit detects the faces in the image, uses the largest one, and creates an entry whose `value` and `reference_object_uuid` are the UUID of the new face. A blocklisted face declines new sessions whose face matches; an allowlisted face skips the duplicated-face action and never overrides a blocklist match. In a sandbox application the image is not analyzed and the entry matches nothing. A scoped API key needs `workflows: write`. To list a face from an existing session, use [Create a list entry](https://docs.didit.me/management-api/lists/create-entry) with `reference_session_id` instead.\n *\n * `POST /v3/lists/{list_uuid}/entries/face-upload/`\n *\n * @param listUuid UUID of a list with `entry_type: face` and `list_type: blocklist` or `allowlist`.\n */\n uploadFace(\n listUuid: string,\n params: ListsEntriesUploadFaceParams,\n options?: RequestOptions,\n ): APIPromise<ComplianceListEntry> {\n return this._client.request(LISTS_ENTRIES_UPLOAD_FACE, [listUuid], params, options);\n }\n}\n\n/** `lists` */\nexport class Lists extends APIResource {\n readonly entries: ListsEntries = new ListsEntries(this._client);\n\n /**\n * Create a list\n *\n * Creates an allowlist or a custom list in the application the API key belongs to. Blocklists cannot be created: Didit provisions one system blocklist per entry type, and you add to it with [Create a list entry](https://docs.didit.me/management-api/lists/create-entry). `entry_type` cannot change after creation and decides how entry values are validated and matched. Allowlist entries mark matching items as trusted (for example, a face allowlist skips the duplicated-face action) and never override a blocklist match; reference any list from a workflow or transaction rule condition with `value_type: \"list\"`. A scoped API key needs `workflows: write`.\n *\n * `POST /v3/lists/`\n */\n create(params: ListsCreateParams, options?: RequestOptions): APIPromise<ComplianceList> {\n return this._client.request(LISTS_CREATE, [], params, options);\n }\n\n /**\n * Delete a list\n *\n * Deletes an allowlist or custom list together with its entries. Deletion is irreversible: the list and its entries no longer appear in any read, and workflow and transaction rule conditions that reference the list evaluate it as an empty list from then on. Sessions and transactions already evaluated keep their results, and the name can be reused for a new list. System lists cannot be deleted and return `400`; to empty one, [delete its entries](https://docs.didit.me/management-api/lists/delete-entry). A scoped API key needs `workflows: write`.\n *\n * `DELETE /v3/lists/{list_uuid}/`\n *\n * @param listUuid UUID of the list, as returned by List lists or Create a list.\n */\n delete(listUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(LISTS_DELETE, [listUuid], undefined, options);\n }\n\n /**\n * List lists\n *\n * Returns the application's lists, newest first: the system lists Didit provisions (one blocklist per entry type, the **High Risk Countries** custom list, and any system allowlist) and the allowlists and custom lists you created. Filter with `list_type` and `entry_type`; deleted lists never appear. Results are paginated with `limit` and `offset`. A scoped API key needs `workflows: read`. See [Lists](https://docs.didit.me/management-api/lists/overview) for what each list type does.\n *\n * `GET /v3/lists/`\n */\n list(\n params: ListsListParams = {},\n options?: RequestOptions,\n ): PagePromise<ListsListResponse, ComplianceList> {\n return this._client.requestPage(LISTS_LIST, [], params, options);\n }\n\n /**\n * Get a list\n *\n * Returns one list of the application with its entry count and when its newest entry was added. A list of another application, or one that was deleted, returns `404`. This returns the list only: read its values with [List list entries](https://docs.didit.me/management-api/lists/list-entries). A scoped API key needs `workflows: read`.\n *\n * `GET /v3/lists/{list_uuid}/`\n *\n * @param listUuid UUID of the list, as returned by List lists or Create a list.\n */\n retrieve(listUuid: string, options?: RequestOptions): APIPromise<ComplianceList> {\n return this._client.request(LISTS_RETRIEVE, [listUuid], undefined, options);\n }\n\n /**\n * Update a list\n *\n * Renames a list or changes its description. Only `name` and `description` are read; any other field is ignored, so `list_type` and `entry_type` keep the values they were created with. System lists cannot be modified and return `400`. The response contains only `name` and `description`: call [Get a list](https://docs.didit.me/management-api/lists/get) for the full list. A scoped API key needs `workflows: write`.\n *\n * `PATCH /v3/lists/{list_uuid}/`\n *\n * @param listUuid UUID of the list, as returned by List lists or Create a list.\n */\n update(\n listUuid: string,\n params: ListsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<ListsUpdateResponse> {\n return this._client.request(LISTS_UPDATE, [listUuid], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n MonitoringEvent,\n MonitoringEventDetail,\n MonitoringEventIngestResult,\n MonitoringEventPage,\n} from \"../types/components.js\";\nimport type {\n MonitoringEventsCreateBatchParams,\n MonitoringEventsCreateBatchResponse,\n MonitoringEventsCreateParams,\n MonitoringEventsCreateSdkTokenParams,\n MonitoringEventsCreateSdkTokenResponse,\n MonitoringEventsListParams,\n MonitoringEventsRetrieveEnrichmentMetricsParams,\n MonitoringEventsRetrieveEnrichmentMetricsResponse,\n MonitoringEventsRetrieveSubjectTimelineParams,\n} from \"../types/monitoring-events.js\";\n\nconst MONITORING_EVENTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/events/\",\n body: \"json\",\n dates: \"MonitoringEventIngestResult\",\n};\nconst MONITORING_EVENTS_CREATE_BATCH: OperationSpec = {\n method: \"POST\",\n path: \"/v3/events/batch/\",\n body: \"json\",\n dates: { p: { results: { i: { p: { expires_at: 1 } } } } },\n};\nconst MONITORING_EVENTS_CREATE_SDK_TOKEN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/events/sdk-token/\",\n body: \"json\",\n dates: { p: { expires_at: 1 } },\n};\nconst MONITORING_EVENTS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/events/{event_uuid}/delete/\",\n response: \"none\",\n};\nconst MONITORING_EVENTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/events/\",\n query: [\n \"limit\",\n \"offset\",\n \"event_category\",\n \"action_type\",\n \"status\",\n \"retention_class\",\n \"subject_vendor_data\",\n \"subject_entity_type\",\n \"business_vendor_data\",\n \"session_id\",\n \"device_fingerprint\",\n \"ip_address\",\n \"game_id\",\n \"round_id\",\n \"affiliate_code\",\n \"payment_reference_id\",\n \"counterparty_vendor_data\",\n \"matched_only\",\n \"occurred_from\",\n \"occurred_to\",\n \"search\",\n ],\n dates: \"MonitoringEventPage\",\n};\nconst MONITORING_EVENTS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/events/{event_uuid}/\",\n dates: \"MonitoringEventDetail\",\n};\nconst MONITORING_EVENTS_RETRIEVE_ENRICHMENT_METRICS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/events/enrichment-metrics/\",\n query: [\"days\"],\n};\nconst MONITORING_EVENTS_RETRIEVE_SUBJECT_TIMELINE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/events/subjects/{vendor_data}/\",\n query: [\n \"entity_type\",\n \"limit\",\n \"offset\",\n \"event_category\",\n \"action_type\",\n \"status\",\n \"retention_class\",\n \"business_vendor_data\",\n \"session_id\",\n \"device_fingerprint\",\n \"ip_address\",\n \"game_id\",\n \"round_id\",\n \"affiliate_code\",\n \"payment_reference_id\",\n \"counterparty_vendor_data\",\n \"matched_only\",\n \"occurred_from\",\n \"occurred_to\",\n \"search\",\n ],\n dates: \"MonitoringEventPage\",\n};\n\n/** `monitoring_events` */\nexport class MonitoringEvents extends APIResource {\n /**\n * Create monitoring event\n *\n * Send one non-monetary event (login, session, gameplay, bonus, affiliate, payment, dispute, security, responsible gambling or custom) from your backend. The event is validated against its category contract, stored, IP-enriched once per unique public address, and evaluated by your real-time event rules before the response returns; cross-subject and long-window rules run asynchronously (`correlation_pending: true`), and in a sandbox application no rules run. `event_id` is the idempotency key: the same `event_id` with the same `event_category`, `action_type`, `occurred_at`, `subject.vendor_data` and `payload` returns `200` with `idempotent_replay: true` and the stored outcome (other envelope fields are not compared), while different values return `409`. Event ingestion is opt-in per application: until it is switched on this endpoint returns `403` with `code: event_monitoring_disabled` and stores nothing. A scoped API key needs `transactions: write`. See [Event ingestion](https://docs.didit.me/transaction-monitoring/events) and [Rules on events](https://docs.didit.me/transaction-monitoring/event-rules); to send events from a browser or app, use [SDK event submission](https://docs.didit.me/transaction-monitoring/sdk-event-submission).\n *\n * `POST /v3/events/`\n */\n create(\n params: MonitoringEventsCreateParams,\n options?: RequestOptions,\n ): APIPromise<MonitoringEventIngestResult> {\n return this._client.request(MONITORING_EVENTS_CREATE, [], params, options);\n }\n\n /**\n * Create monitoring events in batch\n *\n * Submit 1 to 500 events in one request, each in the same envelope as `POST /v3/events/`. Every item is validated, stored and evaluated on its own and gets its own outcome (`accepted`, `replayed` or `rejected`), so one malformed event never rolls back the others: the response is `201` when no item was rejected and `207` when at least one was, and both mean the request was processed. Send `{\"events\": [...]}`; a bare JSON array of events is also accepted. Event ingestion must be switched on for the application, otherwise the whole request returns `403` with `code: event_monitoring_disabled` and nothing is stored. A scoped API key needs `transactions: write`. See [Batches](https://docs.didit.me/transaction-monitoring/events#batches).\n *\n * `POST /v3/events/batch/`\n */\n createBatch(\n params: MonitoringEventsCreateBatchParams,\n options?: RequestOptions,\n ): APIPromise<MonitoringEventsCreateBatchResponse> {\n return this._client.request(MONITORING_EVENTS_CREATE_BATCH, [], params, options);\n }\n\n /**\n * Mint monitoring SDK token\n *\n * Mint a short-lived device credential bound to one subject, so your web or mobile app can send that user's events straight to Didit without an API key. The app sends the returned `monitoring_token` in the `X-Monitoring-Token` header to the device lane (`POST /v1/events/` and `POST /v1/events/batch/`), where the subject is always overwritten with this `vendor_data`, events outside `allowed_event_categories` are rejected, each submitted event spends one use, and a request whose `Origin` does not equal `bind_to_origin` is refused. Call it from your backend only; minting creates the credential and nothing else (no user is created). Event ingestion must be switched on for the application, otherwise this endpoint returns `403` with `code: event_monitoring_disabled` instead of minting a credential that could never write. A scoped API key needs `transactions: write`. See [SDK event submission](https://docs.didit.me/transaction-monitoring/sdk-event-submission).\n *\n * `POST /v3/events/sdk-token/`\n */\n createSdkToken(\n params: MonitoringEventsCreateSdkTokenParams,\n options?: RequestOptions,\n ): APIPromise<MonitoringEventsCreateSdkTokenResponse> {\n return this._client.request(MONITORING_EVENTS_CREATE_SDK_TOKEN, [], params, options);\n }\n\n /**\n * Delete monitoring event\n *\n * Permanently delete one monitoring event together with its rule runs, notes and tag links, for example an event sent by mistake. After the `204` the event is gone from every read (retrieve returns `404`, and it no longer appears in the list or the subject timeline), the deletion is irreversible, and its `event_id` is free to be used for a new event. Not affected: the user or company the event resolved to, cases a rule opened, list entries a rule added, and the scores and statuses already applied to other events. To erase everything about a person or a company, delete the user or the company instead, which also deletes their events. A scoped API key needs `transactions: write`.\n *\n * `DELETE /v3/events/{event_uuid}/delete/`\n *\n * @param eventUuid Didit identifier of the event (`event_uuid` from the create, batch, list or timeline response), not your own `event_id`.\n */\n delete(eventUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(MONITORING_EVENTS_DELETE, [eventUuid], undefined, options);\n }\n\n /**\n * List monitoring events\n *\n * List the monitoring events stored for your application, newest `occurred_at` first, with optional filters that combine with AND. Multi-value filters (`event_category`, `action_type`, `status`, `retention_class`) repeat the parameter and match any of the values; the other filters are exact matches, and unknown values simply return no events. Each result is a summary: call `GET /v3/events/{event_uuid}/` for the payload, device context, IP enrichment and rule evidence, and prefer `GET /v3/events/subjects/{vendor_data}/` for one subject's history. Reads work whether or not event ingestion is switched on. A scoped API key needs `transactions: read`. See [Event ingestion](https://docs.didit.me/transaction-monitoring/events).\n *\n * `GET /v3/events/`\n */\n list(\n params: MonitoringEventsListParams = {},\n options?: RequestOptions,\n ): PagePromise<MonitoringEventPage, MonitoringEvent> {\n return this._client.requestPage(MONITORING_EVENTS_LIST, [], params, options);\n }\n\n /**\n * Get monitoring event\n *\n * Retrieve one monitoring event with everything the list returns plus the payload, custom values, device context, field provenance (`field_sources`), the promoted domain fields, `expires_at`, every matching rule run with its evidence, the IP enrichment and the tags rules attached. While `correlation_pending` is `true` an asynchronous rule still has to run; read the event again a few minutes later for the final `status`, `score` and `rule_runs`. Reads work whether or not event ingestion is switched on. A scoped API key needs `transactions: read`. See [Evidence](https://docs.didit.me/transaction-monitoring/event-rules#evidence) and [IP enrichment](https://docs.didit.me/transaction-monitoring/ip-enrichment).\n *\n * `GET /v3/events/{event_uuid}/`\n *\n * @param eventUuid Didit identifier of the event (`event_uuid` from the create, batch, list or timeline response), not your own `event_id`.\n */\n retrieve(eventUuid: string, options?: RequestOptions): APIPromise<MonitoringEventDetail> {\n return this._client.request(MONITORING_EVENTS_RETRIEVE, [eventUuid], undefined, options);\n }\n\n /**\n * Get event enrichment metrics\n *\n * Return the event ingestion and IP-enrichment counters of your application for a period, summed over every lane (server, batch and device), so you can watch event volume and confirm that enrichment is resolved once per unique address rather than once per event. The period covers today plus the previous `days` days, counted by UTC calendar date. The three ratios are null when their denominator is zero. A scoped API key needs `transactions: read`. See [IP enrichment](https://docs.didit.me/transaction-monitoring/events#ip-enrichment).\n *\n * `GET /v3/events/enrichment-metrics/`\n */\n retrieveEnrichmentMetrics(\n params: MonitoringEventsRetrieveEnrichmentMetricsParams = {},\n options?: RequestOptions,\n ): APIPromise<MonitoringEventsRetrieveEnrichmentMetricsResponse> {\n return this._client.request(MONITORING_EVENTS_RETRIEVE_ENRICHMENT_METRICS, [], params, options);\n }\n\n /**\n * Get subject event timeline\n *\n * List every monitoring event of one subject, newest `occurred_at` first. A `vendor_data` is unique only within an entity type, so the same id can name an individual and a company: `entity_type` picks which timeline you get, and it defaults to `individual`, so a company's events need `entity_type=company`. The filters of `GET /v3/events/` apply on top, and a `vendor_data` with no events returns an empty page rather than `404`. A scoped API key needs `transactions: read`. See [Reading events back](https://docs.didit.me/transaction-monitoring/events#reading-events-back).\n *\n * `GET /v3/events/subjects/{vendor_data}/`\n *\n * @param vendorData Your id for the subject (`subject.vendor_data` of its events). URL-encode it; a value containing `/` cannot be addressed by this endpoint.\n */\n retrieveSubjectTimeline(\n vendorData: string,\n params: MonitoringEventsRetrieveSubjectTimelineParams = {},\n options?: RequestOptions,\n ): PagePromise<MonitoringEventPage, MonitoringEvent> {\n return this._client.requestPage(\n MONITORING_EVENTS_RETRIEVE_SUBJECT_TIMELINE,\n [vendorData],\n params,\n options,\n );\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n NetworkDetailResponse,\n NetworkGraph,\n NetworkListItem,\n NetworkMap,\n NetworkNote,\n NetworkTimeline,\n NetworkTimelinePage,\n} from \"../types/components.js\";\nimport type {\n NetworksAddTagParams,\n NetworksListMembersResponse,\n NetworksListParams,\n NetworksListResponse,\n NetworksListSignalsResponse,\n NetworksNotesCreateParams,\n NetworksNotesListParams,\n NetworksNotesListResponse,\n NetworksRemoveTagParams,\n NetworksRetrieveGraphParams,\n NetworksRetrieveTimelineParams,\n} from \"../types/networks.js\";\n\nconst NETWORKS_NOTES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/\",\n scope: \"application\",\n body: \"json\",\n dates: \"NetworkNote\",\n};\nconst NETWORKS_NOTES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/{note_uuid}/\",\n scope: \"application\",\n response: \"none\",\n};\nconst NETWORKS_NOTES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"NetworkNote\" } } },\n};\nconst NETWORKS_ADD_TAG: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/add/\",\n scope: \"application\",\n body: \"json\",\n dates: \"NetworkDetailResponse\",\n};\nconst NETWORKS_DOWNLOAD_REPORT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/report/\",\n scope: \"application\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst NETWORKS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/\",\n scope: \"application\",\n query: [\n \"status\",\n \"scope\",\n \"signal_type\",\n \"pattern_type\",\n \"risk_band\",\n \"min_size\",\n \"max_size\",\n \"assignee\",\n \"priority\",\n \"risk_min\",\n \"has_case\",\n \"date_from\",\n \"date_to\",\n \"q\",\n \"ordering\",\n \"limit\",\n \"offset\",\n \"summary\",\n ],\n dates: { p: { results: { i: \"NetworkListItem\" } } },\n};\nconst NETWORKS_LIST_MEMBERS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/members/\",\n scope: \"application\",\n dates: { p: { results: { i: \"NetworkMember\" } } },\n};\nconst NETWORKS_LIST_SIGNALS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/\",\n scope: \"application\",\n dates: { p: { results: { i: \"NetworkSignal\" } } },\n};\nconst NETWORKS_REMOVE_TAG: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/remove/\",\n scope: \"application\",\n body: \"json\",\n dates: \"NetworkDetailResponse\",\n};\nconst NETWORKS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/\",\n scope: \"application\",\n dates: \"NetworkDetailResponse\",\n};\nconst NETWORKS_RETRIEVE_GRAPH: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/\",\n scope: \"application\",\n query: [\"depth\", \"focus_kind\", \"focus_id\"],\n dates: \"NetworkGraph\",\n};\nconst NETWORKS_RETRIEVE_MAP: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/map/\",\n scope: \"application\",\n dates: \"NetworkMap\",\n};\nconst NETWORKS_RETRIEVE_TIMELINE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/\",\n scope: \"application\",\n query: [\"contract\", \"limit\", \"cursor\", \"event_type\"],\n dates: { p: { results: { i: \"NetworkTimelineEvent\" } } },\n};\n\n/** `networks.notes` */\nexport class NetworksNotes extends APIResource {\n /**\n * Add a private network note\n *\n * Requires a console user with write:networks. The author is assigned from the authenticated user. Supply a new random UUID client_reference for each note; retry the same body and reference after an uncertain response to avoid duplicates. Reusing a reference for another body, author or network returns 409. Notes follow the surviving investigation when networks merge.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/`\n *\n * @param networkUuid Network UUID.\n */\n create(\n networkUuid: string,\n params: NetworksNotesCreateParams,\n options?: RequestOptions,\n ): APIPromise<NetworkNote> {\n return this._client.request(NETWORKS_NOTES_CREATE, [networkUuid], params, options);\n }\n\n /**\n * Delete your network note\n *\n * Requires write:networks and the authenticated author of the note. Deletion is irreversible. Connected account and verification data are unaffected.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/{note_uuid}/`\n *\n * @param networkUuid Network UUID.\n * @param noteUuid note_uuid\n */\n delete(networkUuid: string, noteUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(NETWORKS_NOTES_DELETE, [networkUuid, noteUuid], undefined, options);\n }\n\n /**\n * List private network notes\n *\n * Console users with read:networks can read notes on a network visible to the application. Notes stay within the organization and are not contributed to shared intelligence. Newest notes appear first.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/`\n *\n * @param networkUuid Network UUID.\n */\n list(\n networkUuid: string,\n params: NetworksNotesListParams = {},\n options?: RequestOptions,\n ): PagePromise<NetworksNotesListResponse, NetworkNote> {\n return this._client.requestPage(NETWORKS_NOTES_LIST, [networkUuid], params, options);\n }\n}\n\n/** `networks` */\nexport class Networks extends APIResource {\n readonly notes: NetworksNotes = new NetworksNotes(this._client);\n\n /**\n * Add a tag to a network\n *\n * Put one of your application's tags on the network. Returns the network detail, whose `tags` lists your application's tags on the network, with `201` when the tag was added and `200` when it was already on the network. A tag that belongs to another application, or does not exist, returns 404 `Tag not found.`. Requires a full-access API key, or `write:networks` for a console member.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/add/`\n *\n * @param networkUuid Network UUID.\n */\n addTag(\n networkUuid: string,\n params: NetworksAddTagParams,\n options?: RequestOptions,\n ): APIPromise<NetworkDetailResponse> {\n return this._client.request(NETWORKS_ADD_TAG, [networkUuid], params, options);\n }\n\n /**\n * Download a network evidence report\n *\n * Download a PDF of the current organization network, its observed account connections, signal references and review status. Requires read:networks. Global intelligence and private analyst notes are not included. Each account and signal list is capped at 500 entries and the report states when it is incomplete. The request does not change network status. Errors are returned as JSON.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/report/`\n *\n * @param networkUuid Network UUID.\n */\n downloadReport(networkUuid: string, options?: RequestOptions): APIPromise<Blob> {\n return this._client.request(NETWORKS_DOWNLOAD_REPORT, [networkUuid], undefined, options);\n }\n\n /**\n * List networks\n *\n * List fraud networks detected within this application's organization, highest risk first by default. By default dismissed networks are excluded; pass status to include them. Sandbox applications never have networks: clustering excludes sandbox data entirely. Every response carries the organization's `sharing_mode` and whether cross-organization signals apply to it (`cross_org_available`, `cross_org_unavailable_reason`). `kpis` aggregate the networks that match your filters and `counts` aggregate every network the application can see; pass `summary=false` to skip both when you only need the page. Requires a full-access API key, or `list:networks` for a console member.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/`\n */\n list(\n params: NetworksListParams = {},\n options?: RequestOptions,\n ): PagePromise<NetworksListResponse, NetworkListItem> {\n return this._client.requestPage(NETWORKS_LIST, [], params, options);\n }\n\n /**\n * List network members\n *\n * List the subjects (vendor users, vendor businesses, or transaction parties) that belong to this network.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/members/`\n *\n * @param networkUuid Network UUID.\n */\n listMembers(\n networkUuid: string,\n options?: RequestOptions,\n ): APIPromise<NetworksListMembersResponse> {\n return this._client.request(NETWORKS_LIST_MEMBERS, [networkUuid], undefined, options);\n }\n\n /**\n * List network signals\n *\n * List the signals (shared device, IP, face, document number, phone, email, or address values) that link this network's members.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/`\n *\n * @param networkUuid Network UUID.\n */\n listSignals(\n networkUuid: string,\n options?: RequestOptions,\n ): APIPromise<NetworksListSignalsResponse> {\n return this._client.request(NETWORKS_LIST_SIGNALS, [networkUuid], undefined, options);\n }\n\n /**\n * Remove a tag from a network\n *\n * Remove one of your application's tags from the network. Returns the network detail. 404 when the tag is not on the network, or does not belong to your application. Requires a full-access API key, or `write:networks` for a console member.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/remove/`\n *\n * @param networkUuid Network UUID.\n */\n removeTag(\n networkUuid: string,\n params: NetworksRemoveTagParams,\n options?: RequestOptions,\n ): APIPromise<NetworkDetailResponse> {\n return this._client.request(NETWORKS_REMOVE_TAG, [networkUuid], params, options);\n }\n\n /**\n * Get network\n *\n * Retrieve a single network's full detail: stats, fraud tags and risk signals, plus the organization's `sharing_mode` and cross-organization availability, your application's `tags` on the network, member `outcomes` and pattern scores (`patterns`). Requires a full-access API key, or `read:networks` for a console member.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/`\n *\n * @param networkUuid Network UUID.\n */\n retrieve(networkUuid: string, options?: RequestOptions): APIPromise<NetworkDetailResponse> {\n return this._client.request(NETWORKS_RETRIEVE, [networkUuid], undefined, options);\n }\n\n /**\n * Get network graph\n *\n * Retrieve the network as a graph of subject nodes (vendor users, vendor businesses, transaction parties) and signal nodes (the shared device/IP/face/document/phone/email/address values linking them), with edges representing memberships.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/`\n *\n * @param networkUuid Network UUID.\n */\n retrieveGraph(\n networkUuid: string,\n params: NetworksRetrieveGraphParams = {},\n options?: RequestOptions,\n ): APIPromise<NetworkGraph> {\n return this._client.request(NETWORKS_RETRIEVE_GRAPH, [networkUuid], params, options);\n }\n\n /**\n * Get network map\n *\n * Geographic points where this network's members' addresses/locations converge, sourced from the sessions, business sessions, and transactions backing its memberships.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/map/`\n *\n * @param networkUuid Network UUID.\n */\n retrieveMap(networkUuid: string, options?: RequestOptions): APIPromise<NetworkMap> {\n return this._client.request(NETWORKS_RETRIEVE_MAP, [networkUuid], undefined, options);\n }\n\n /**\n * Get network timeline\n *\n * Without `contract`: the network's own events (detection, each signal's latest observation and its review), oldest first and not paginated. `limit`, `cursor` and `event_type` are ignored. With `contract=2`: the typed timeline, newest first and paginated by cursor. It adds what the member accounts did (verification attempts, transactions, sign-ins you post through the events API and the live rules they hit) and the cases opened for the network. `note_added` events are returned to console members only, never to an API key. Requires a full-access API key, or `read:networks` for a console member.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/`\n *\n * @param networkUuid Network UUID.\n */\n retrieveTimeline(\n networkUuid: string,\n params: NetworksRetrieveTimelineParams = {},\n options?: RequestOptions,\n ): APIPromise<NetworkTimeline | NetworkTimelinePage> {\n return this._client.request(NETWORKS_RETRIEVE_TIMELINE, [networkUuid], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n PassiveLivenessCheckParams,\n PassiveLivenessCheckResponse,\n} from \"../types/passive-liveness.js\";\n\nconst PASSIVE_LIVENESS_CHECK: OperationSpec = {\n method: \"POST\",\n path: \"/v3/passive-liveness/\",\n body: \"multipart\",\n files: [\"user_image\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `passive_liveness` */\nexport class PassiveLiveness extends APIResource {\n /**\n * Passive Liveness\n *\n * Detect presentation attacks - printed photos, screen replays, masks, deepfakes - from a single face image. No video, motion, or user interaction required.\n *\n * **How it works.** The image is analyzed by a biometric model; the largest detected face is evaluated and a liveness `score` (0–100) is computed. `status` is `Declined` when any `error`-severity warning fires:\n * - `NO_FACE_DETECTED` - the liveness model found no face,\n * - `LOW_LIVENESS_SCORE` - score at or below `face_liveness_score_decline_threshold` (default `30`),\n * - `LIVENESS_FACE_ATTACK` - the model detected a presentation attack,\n * - `FACE_IN_BLOCKLIST` / `POSSIBLE_FACE_IN_BLOCKLIST` - the face matches an entry on your face blocklist.\n *\n * `MULTIPLE_FACES_DETECTED` is a `warning`-severity signal (does not decline), and `DUPLICATED_FACE` / `POSSIBLE_DUPLICATED_FACE` are `information`-severity signals that the same face already appeared in another approved session (they never decline). `face_quality` and `face_luminance` (0–100, nullable) describe capture quality.\n *\n * **Blocklist and duplicate screening.** Runs on **every** call - with or without `save_api_request` - by matching the detected face against your application's face search index. Prior faces with the same `vendor_data` are excluded from the entire index search - so re-running liveness for the same user does not trigger `DUPLICATED_FACE`, and a blocklisted face originating from a session with the caller's own `vendor_data` is also NOT flagged (`FACE_IN_BLOCKLIST` screening is bypassed for same-`vendor_data` faces).\n *\n * **Billing.** Each `200` response consumes one Passive Liveness API credit (paid from your plan credit or top-up balance). Insufficient balance returns `403` before any image processing.\n *\n * **Session persistence and face enrollment (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session (Business Console, `GET /v3/session/{sessionId}/decision/` via the returned `request_id`, `status.updated` webhook), the reference image and face crop are stored, and the detected face is **enrolled into your face search index** so later Face Search calls and duplicate checks can match it. When `false`, the call is one-shot: nothing is stored and the face is not enrolled (blocklist/duplicate screening still runs).\n *\n * **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload, no session is persisted, and no credits are consumed.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * `POST /v3/passive-liveness/`\n */\n check(\n params: PassiveLivenessCheckParams,\n options?: RequestOptions,\n ): APIPromise<PassiveLivenessCheckResponse> {\n return this._client.request(PASSIVE_LIVENESS_CHECK, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n PhoneRiskResponse,\n PhoneVerificationCheckResponse,\n PhoneVerificationSendResponse,\n} from \"../types/components.js\";\nimport type {\n PhoneAssessRiskParams,\n PhoneCheckCodeParams,\n PhoneSendCodeParams,\n} from \"../types/phone.js\";\n\nconst PHONE_ASSESS_RISK: OperationSpec = {\n method: \"POST\",\n path: \"/v3/phone/risk/\",\n body: \"json\",\n dates: \"PhoneRiskResponse\",\n};\nconst PHONE_CHECK_CODE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/phone/check/\",\n body: \"json\",\n dates: \"PhoneVerificationCheckResponse\",\n};\nconst PHONE_SEND_CODE: OperationSpec = { method: \"POST\", path: \"/v3/phone/send/\", body: \"json\" };\n\n/** `phone` */\nexport class Phone extends APIResource {\n /**\n * Risk-score a phone number\n *\n * Resolve a phone number and return carrier, line-type, porting, disposable-number, cross-session match, and normalized risk-intelligence signals without sending an OTP. The endpoint creates an API session and returns its id as `request_id`.\n *\n * **Decision.** The top-level `status` mirrors `phone.status`. It is normally `Approved`; the risk evaluation can produce `In Review` or `Declined`.\n *\n * **Compatibility aliases.** Live responses expose the normalized intelligence object as both `phone.phone_intelligence` and `phone.enrichment`. The values are identical. New integrations can read `phone.enrichment`. Both keys are absent when no usable intelligence data was returned.\n *\n * **Billing.** Live calls use Phone Risk API pricing. The request is billable once the lookup starts, even when some best-effort fields are unavailable.\n *\n * **Sandbox.** Sandbox keys validate the request and return deterministic approved data without sending an OTP, consuming credits, creating a session, or contributing to Networks.\n *\n * **Authentication.** Send your application's API key in `x-api-key`. Missing or invalid credentials return `403` - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests per minute per API key across all POST/PATCH/DELETE endpoints.\n *\n * **Social footprint.** Set `enable_social` to `true` to add a `phone_social` block: the online platforms this number is registered on, with per-category counts and any profile details available. `profiles_registered: 0` means the platforms were checked and the number was found on none of them - a valid, billable answer. The block is absent when the add-on was not requested or the check could not be completed, and it is not billed in that case. Billing adds one `phone_social` unit per request on top of this endpoint's own price.\n *\n * `POST /v3/phone/risk/`\n */\n assessRisk(\n params: PhoneAssessRiskParams,\n options?: RequestOptions,\n ): APIPromise<PhoneRiskResponse> {\n return this._client.request(PHONE_ASSESS_RISK, [], params, options);\n }\n\n /**\n * Check Phone Code\n *\n * Verify the OTP delivered by [`POST /v3/phone/send/`](/standalone-apis/phone-send) and get the final verification result plus phone intelligence: carrier name and line type, virtual (VoIP) and disposable flags, and duplicate usage of the number across your sessions.\n *\n * **How the check finds the verification.** Matching is by your application plus the E.164 `phone_number` - `request_id` is not an input. The most recent pending verification created within the last **5 minutes** is checked. If there is none (never sent, already finalized, or older than 5 minutes) the endpoint returns `200` with `status: \"Expired or Not Found\"`.\n *\n * **Attempt budget.** Each verification allows **3 code attempts**. The first two wrong codes return `status: \"Failed\"` with the attempts remaining and `phone: null`; the third wrong code finalizes the verification as `Declined` with a `VERIFICATION_CODE_ATTEMPTS_EXCEEDED` warning and returns the full phone report.\n *\n * **Outcomes.** `Approved` - correct code and no declining risk. `Declined` - terminal: the code was correct but a declining risk matched (a `DECLINE` action below, a blocklisted or high-risk number), or the attempt budget was exhausted. `Failed` - wrong code, attempts remaining. `Expired or Not Found` - nothing to check. On `Approved`/`Declined` the `request_id` equals the send's `request_id` (the session id) and `phone` carries the full report (`carrier`, `is_virtual`, `is_disposable`, `warnings`, `lifecycle`, `matches`); on `Failed` and `Expired or Not Found` the `request_id` is a one-off random UUID.\n *\n * **Risk actions.** `duplicated_phone_number_action`, `disposable_number_action`, and `voip_number_action` decide what happens when the corresponding risk is detected on a correct code: `DECLINE` flips the final status to `Declined`; `NO_ACTION` (default) records the risk in `phone.warnings` without affecting the status.\n *\n * **Billing.** Checks are free - delivery is billed on the send side (see [Phone Verification Pricing](/getting-started/phone-verification-pricing)).\n *\n * **Session persistence.** A finalized check updates the session created by the send (visible in the Business Console, queryable via `GET /v3/session/{sessionId}/decision/`) and fires a `status.updated` webhook.\n *\n * **Sandbox.** Sandbox API keys skip all processing: any well-formed code (4–8 digits, `123456` included) returns a static `Approved` payload with a simplified flat `phone` object (`status`, `phone_number`, `country_code`, `carrier_name`, `line_type`, `flags`); malformed input still returns `400`. Nothing is persisted.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limits.** Shared write budget of 300 requests/min per API key, plus the upstream anti-abuse cap of 4 attempts per number per hour; exceeding either returns `429`.\n *\n * **Social footprint.** Set `enable_social` to `true` to add a `phone_social` block: the online platforms this number is registered on, with per-category counts and any profile details available. `profiles_registered: 0` means the platforms were checked and the number was found on none of them - a valid, billable answer. The block is absent when the add-on was not requested or the check could not be completed, and it is not billed in that case. Billing adds one `phone_social` unit per request on top of this endpoint's own price.\n *\n * `POST /v3/phone/check/`\n */\n checkCode(\n params: PhoneCheckCodeParams,\n options?: RequestOptions,\n ): APIPromise<PhoneVerificationCheckResponse> {\n return this._client.request(PHONE_CHECK_CODE, [], params, options);\n }\n\n /**\n * Send Phone Code\n *\n * Send a one-time passcode (OTP) to a phone number over WhatsApp, SMS, or another supported channel, then verify it with [`POST /v3/phone/check/`](/standalone-apis/phone-check).\n *\n * **How send and check pair up.** Verification state is keyed by your application plus the E.164 `phone_number` - the check call does not take `request_id`. Each new send creates a pending verification that lives for **5 minutes**: call the check with the same number and the code the user received before the window closes. Calling send again for the same number while a verification is pending re-sends a code for that same verification (`status: \"Retry\"`, same `request_id`). At most one retry is attached this way (two sends total); a further send starts a fresh verification with a new `request_id`. The 5-minute window is measured from the first send and is not extended by retries.\n *\n * **Delivery channels.** `options.preferred_channel` selects the channel (`whatsapp` by default; `sms`, `telegram`, `voice`, `rcs`, `viber`, and `zalo` are also supported). When the preferred channel is unavailable for the destination country or number, delivery automatically falls back to SMS - the send still reports `Success`, and the channel actually used is reported by the check response (`phone.verification_method` and the `lifecycle` events).\n *\n * **Branding.** SMS codes carry your application's SMS sender name, set in the Business Console, at no extra cost. Pass `options.sms_sender_name` to sign one code with another name, or `options.use_white_label_customization: true` to fall back to your white-label public name when no sender name is set. WhatsApp codes use a fixed message; connect your own WhatsApp Business number in the Business Console to send them from your business name and number, billed at the Didit fee only.\n *\n * **Send statuses.** `Success` - OTP sent for a new verification; `Retry` - OTP re-sent for the pending verification; `Blocked` - the anti-fraud layer refused to send (see `reason`, e.g. `repeated_attempts`, `suspicious`, `spam`). A `Blocked` send immediately finalizes the verification as `Declined` with a high-risk warning, so a follow-up check returns `Expired or Not Found`.\n *\n * **Billing.** The price depends on the destination country and the channel that actually delivers the message - see [Phone Verification Pricing](/getting-started/phone-verification-pricing). Only `Blocked` sends are guaranteed free: any other unbilled send attempt is charged at verification finalization or expiration, even if delivery was never confirmed or the delivery provider reported the message undeliverable. Checks are always free. As an anti-abuse measure, phone verification is disabled until your organization's first top-up (`403`).\n *\n * **Session persistence.** Every new verification is persisted as an API-type session: `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/`, the verification appears in the Business Console, and `status.updated` webhooks fire as it progresses.\n *\n * **Sandbox.** Sandbox API keys skip delivery and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Success` payload with a random `request_id`; no message is sent and nothing is persisted. Use code `123456` on the sandbox check.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limits.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints, plus an anti-abuse cap of 4 send attempts per phone number per hour; exceeding either returns `429`.\n *\n * `POST /v3/phone/send/`\n */\n sendCode(\n params: PhoneSendCodeParams,\n options?: RequestOptions,\n ): APIPromise<PhoneVerificationSendResponse> {\n return this._client.request(PHONE_SEND_CODE, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { BankVerificationPricing } from \"../types/components.js\";\n\nconst PRICING_BANK_VERIFICATION: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/bank-verification-pricing/\",\n auth: \"none\",\n};\n\n/** `pricing` */\nexport class Pricing extends APIResource {\n /**\n * Get bank verification prices (public, unauthenticated)\n *\n * Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product.\n *\n * Public: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified` when nothing changed.\n *\n * A method is `available` only where Didit serves it in production today, and its `price_usd` is `null` everywhere else, so the feed never shows a price you cannot buy. `available: false` covers a country with no approved price, a method the country does not support, and a route that is not switched on yet.\n *\n * These are list prices before your plan discount. Your plan discount applies to the whole bank price, and a negotiated or contract price replaces the list price for your organization.\n *\n * `GET /v3/organization/bank-verification-pricing/`\n */\n bankVerification(options?: RequestOptions): APIPromise<BankVerificationPricing> {\n return this._client.request(PRICING_BANK_VERIFICATION, [], undefined, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n ProofOfAddressVerifyParams,\n ProofOfAddressVerifyResponse,\n} from \"../types/proof-of-address.js\";\n\nconst PROOF_OF_ADDRESS_VERIFY: OperationSpec = {\n method: \"POST\",\n path: \"/v3/poa/\",\n body: \"multipart\",\n files: [\"document\"],\n dates: { p: { created_at: 1 } },\n};\n\n/** `proof_of_address` */\nexport class ProofOfAddress extends APIResource {\n /**\n * Proof of Address (document OCR + address checks)\n *\n * Extract and validate a Proof of Address document - utility bills, bank statements, and government-issued documents - in one call. Returns the issuer, issue/expiry dates, the holder name, the raw and parsed/geocoded address, an `Approved`/`Declined` `status`, and a `warnings` list explaining every issue found.\n *\n * **Latency.** Extraction is LLM-based: typical calls take **5–15 seconds**, multi-page PDFs up to **~30 seconds**. Configure a client timeout of **at least 45 seconds** and do not retry before the call completes.\n *\n * **How it works.** The document (image or PDF, up to 15 MB; encrypted PDFs require `document_password`) is classified into a document type and subtype (e.g. `UTILITY_BILL` / `WATER_BILL`), and the issuer, dates, holder name, and address are extracted with LLM-based extraction. The address is parsed and geocoded into `poa_parsed_address`. PDF/EXIF forensics screen for tampering - modification after digital signing, known PDF editors, overlay-text manipulation, suspicious re-exports - surfacing `SUSPECTED_DOCUMENT_MANIPULATION` or `DOCUMENT_METADATA_MISMATCH`. Document age is validated against `poa_document_age_months`, and the language against `poa_languages_allowed`. If you pass `expected_address`, `expected_country`, or `expected_first_name`/`expected_last_name`, the extracted values are cross-checked and mismatches are flagged.\n *\n * **Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Hard failures always decline: `MISSING_ADDRESS_INFORMATION`, `POA_DOCUMENT_EXPIRED`, `INVALID_DOCUMENT_TYPE`, `UNABLE_TO_VALIDATE_DOCUMENT_AGE`, plus `UNABLE_TO_EXTRACT_ISSUE_DATE` and `POA_NAME_NOT_DETECTED` (not configurable on this endpoint). Five risk groups are configurable per request via the `poa_*_action` options (`DECLINE` or `NO_ACTION`, all defaulting to `DECLINE`). `POA_DOCUMENT_NOT_SUPPORTED_FOR_APPLICATION` and `UNPARSABLE_OR_INVALID_ADDRESS` are informational on this endpoint and never decline. A document that cannot be processed at all returns `400`; a readable but problematic document returns `200` with `status: \"Declined\"` - always inspect `poa.status` and `poa.warnings`, not just the HTTP code.\n *\n * **Billing.** Each `200` response consumes one Proof of Address API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the not-enough-credits error before any document processing.\n *\n * **Session persistence (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session: it appears in the Business Console, the uploaded document is stored, the returned `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/` (the decision additionally exposes `document_file` and the `document_metadata` forensics, which this response omits), and a `status.updated` webhook is emitted. When `false`, nothing is stored and `request_id` is a one-off correlation UUID that cannot be looked up later.\n *\n * **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload (a fictional \"Sandbox Power Co.\" electricity bill), no session is persisted, and no credits are consumed.\n *\n * **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) - this API never returns `401`.\n *\n * **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * Note: `FUTURE_ISSUE_DATE` and `POOR_DOCUMENT_QUALITY` exist in workflow sessions but are never produced by this standalone endpoint - a future-dated document is not auto-declined here.\n *\n * `POST /v3/poa/`\n */\n verify(\n params: ProofOfAddressVerifyParams,\n options?: RequestOptions,\n ): APIPromise<ProofOfAddressVerifyResponse> {\n return this._client.request(PROOF_OF_ADDRESS_VERIFY, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { QuestionnaireDetail, QuestionnaireListItem } from \"../types/components.js\";\nimport type {\n QuestionnairesCreateParams,\n QuestionnairesListParams,\n QuestionnairesListResponse,\n QuestionnairesUpdateParams,\n} from \"../types/questionnaires.js\";\n\nconst QUESTIONNAIRES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/questionnaires/\",\n body: \"json\",\n dates: \"QuestionnaireDetail\",\n};\nconst QUESTIONNAIRES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/questionnaires/{questionnaire_uuid}/\",\n response: \"none\",\n};\nconst QUESTIONNAIRES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/questionnaires/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"QuestionnaireListItem\" } } },\n};\nconst QUESTIONNAIRES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/questionnaires/{questionnaire_uuid}/\",\n dates: \"QuestionnaireDetail\",\n};\nconst QUESTIONNAIRES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/questionnaires/{questionnaire_uuid}/\",\n body: \"json\",\n dates: \"QuestionnaireDetail\",\n};\n\n/** `questionnaires` */\nexport class Questionnaires extends APIResource {\n /**\n * Create questionnaire\n *\n * Create a simple linear questionnaire. Send `form_elements` in display order; branching and repeatable groups require the Console. Defaults to `published` v1.\n *\n * `POST /v3/questionnaires/`\n */\n create(\n params: QuestionnairesCreateParams,\n options?: RequestOptions,\n ): APIPromise<QuestionnaireDetail> {\n return this._client.request(QUESTIONNAIRES_CREATE, [], params, options);\n }\n\n /**\n * Delete questionnaire\n *\n * Permanently delete one questionnaire version (no undo). Stored questionnaire responses linked to this version are deleted with it, and sessions referencing it lose the link; other versions in the same group are not deleted. Workflows that referenced it keep running but the questionnaire step can no longer load it.\n *\n * `DELETE /v3/questionnaires/{questionnaire_uuid}/`\n *\n * @param questionnaireUuid Per-version UUID of the questionnaire to delete.\n */\n delete(questionnaireUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(QUESTIONNAIRES_DELETE, [questionnaireUuid], undefined, options);\n }\n\n /**\n * List questionnaires\n *\n * List your questionnaires, newest first, in a limit/offset pagination envelope (`{count, next, previous, results}`, default page size 50). Each row is one version; `questionnaire_group_id` is the stable group ID resolved to the latest `published` version.\n *\n * `GET /v3/questionnaires/`\n */\n list(\n params: QuestionnairesListParams = {},\n options?: RequestOptions,\n ): PagePromise<QuestionnairesListResponse, QuestionnaireListItem> {\n return this._client.requestPage(QUESTIONNAIRES_LIST, [], params, options);\n }\n\n /**\n * Get questionnaire\n *\n * Fetch full questionnaire detail for one version by `questionnaire_uuid`: title, `languages`, canonical `graph`, derived `sections`, and version metadata.\n *\n * `GET /v3/questionnaires/{questionnaire_uuid}/`\n *\n * @param questionnaireUuid Per-version UUID of the questionnaire (the `uuid` value returned by the list endpoint, also returned as `questionnaire_id` on detail endpoints).\n */\n retrieve(questionnaireUuid: string, options?: RequestOptions): APIPromise<QuestionnaireDetail> {\n return this._client.request(QUESTIONNAIRES_RETRIEVE, [questionnaireUuid], undefined, options);\n }\n\n /**\n * Update questionnaire\n *\n * Update a questionnaire. Versioning depends on the `status` field you send and the current state of the version: (1) no `status` on a **published** version → the published version is updated in place (same `questionnaire_id`, same `version`); (2) no `status` on a **draft** → the draft is updated and immediately published; (3) `status: \"published\"` on a **published** version → a NEW published version is created under the same `questionnaire_group_id` (new `questionnaire_id`, `version` + 1) and returned, and any existing draft in the group is deleted; (4) `status: \"draft\"` keeps a draft as a draft (autosave) but is rejected with 400 on a published version (`\"Cannot revert a published version to draft.\"`).\n *\n * `PATCH /v3/questionnaires/{questionnaire_uuid}/`\n *\n * @param questionnaireUuid Per-version UUID of the questionnaire to update.\n */\n update(\n questionnaireUuid: string,\n params: QuestionnairesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<QuestionnaireDetail> {\n return this._client.request(QUESTIONNAIRES_UPDATE, [questionnaireUuid], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { RegulatoryReportDetail, RegulatoryReportList } from \"../types/components.js\";\nimport type {\n RegulatoryReportsCreateParams,\n RegulatoryReportsDeleteParams,\n RegulatoryReportsListParams,\n RegulatoryReportsRetrieveDownloadUrlParams,\n RegulatoryReportsRetrieveDownloadUrlResponse,\n RegulatoryReportsUpdateParams,\n RegulatoryReportsValidateResponse,\n} from \"../types/regulatory-reports.js\";\n\nconst REGULATORY_REPORTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/\",\n scope: \"application\",\n body: \"json\",\n dates: \"RegulatoryReportDetail\",\n};\nconst REGULATORY_REPORTS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/\",\n scope: \"application\",\n body: \"json\",\n response: \"none\",\n};\nconst REGULATORY_REPORTS_FINALIZE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/finalize/\",\n scope: \"application\",\n dates: \"RegulatoryReportDetail\",\n};\nconst REGULATORY_REPORTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/\",\n scope: \"application\",\n query: [\"limit\", \"offset\", \"status\", \"report_type\", \"case\"],\n dates: \"RegulatoryReportList\",\n};\nconst REGULATORY_REPORTS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/\",\n scope: \"application\",\n dates: \"RegulatoryReportDetail\",\n};\nconst REGULATORY_REPORTS_RETRIEVE_DOWNLOAD_URL: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/download-url/\",\n scope: \"application\",\n query: [\"file\"],\n};\nconst REGULATORY_REPORTS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"RegulatoryReportDetail\",\n};\nconst REGULATORY_REPORTS_VALIDATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/validate/\",\n scope: \"application\",\n};\n\n/** `regulatory_reports` */\nexport class RegulatoryReports extends APIResource {\n /**\n * Create standalone report\n *\n * Create a draft FIU report from the standalone Reports page: both case and template are required (unlike the case-scoped create, which can omit template).\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/`\n */\n create(\n params: RegulatoryReportsCreateParams,\n options?: RequestOptions,\n ): APIPromise<RegulatoryReportDetail> {\n return this._client.request(REGULATORY_REPORTS_CREATE, [], params, options);\n }\n\n /**\n * Delete report\n *\n * Delete a regulatory report permanently. The report, its copied narrative and reasons, its transaction links, and its generated goAML XML and PDF are erased, including every stored version of those files. The report disappears from lists and download URLs stop working. Other records, including the case, transactions, people and companies, are not deleted. There is no undo.\n *\n * A draft or validated report can be deleted without a request body. Deleting a finalized report requires `confirm_delete: true` in the request body. If the report is missing, the request returns `404`; if a finalized report is sent without confirmation, it returns `400` and nothing is deleted.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/`\n *\n * @param reportUuid Report UUID.\n */\n delete(\n reportUuid: string,\n params: RegulatoryReportsDeleteParams = {},\n options?: RequestOptions,\n ): APIPromise<void> {\n return this._client.request(REGULATORY_REPORTS_DELETE, [reportUuid], params, options);\n }\n\n /**\n * Finalize report\n *\n * Re-validate, then render the goAML XML and PDF and upload both to S3. On SAR/STR/TFR reports, this also moves the case's transaction alerts from Pending SAR to SAR filed.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/finalize/`\n *\n * @param reportUuid Report UUID.\n */\n finalize(reportUuid: string, options?: RequestOptions): APIPromise<RegulatoryReportDetail> {\n return this._client.request(REGULATORY_REPORTS_FINALIZE, [reportUuid], undefined, options);\n }\n\n /**\n * List reports\n *\n * Application-wide FIU report list, optionally filtered by status, report_type, or case.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/`\n */\n list(\n params: RegulatoryReportsListParams = {},\n options?: RequestOptions,\n ): PagePromise<RegulatoryReportList, RegulatoryReportDetail> {\n return this._client.requestPage(REGULATORY_REPORTS_LIST, [], params, options);\n }\n\n /**\n * Get report\n *\n * Retrieve a regulatory report.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/`\n *\n * @param reportUuid Report UUID.\n */\n retrieve(reportUuid: string, options?: RequestOptions): APIPromise<RegulatoryReportDetail> {\n return this._client.request(REGULATORY_REPORTS_RETRIEVE, [reportUuid], undefined, options);\n }\n\n /**\n * Get report download URL\n *\n * Mint a presigned URL for a finalized report's goAML XML or PDF.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/download-url/`\n *\n * @param reportUuid Report UUID.\n */\n retrieveDownloadUrl(\n reportUuid: string,\n params: RegulatoryReportsRetrieveDownloadUrlParams = {},\n options?: RequestOptions,\n ): APIPromise<RegulatoryReportsRetrieveDownloadUrlResponse> {\n return this._client.request(\n REGULATORY_REPORTS_RETRIEVE_DOWNLOAD_URL,\n [reportUuid],\n params,\n options,\n );\n }\n\n /**\n * Update report\n *\n * Edit a draft or validated report's fields. Finalized reports cannot be edited (409).\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/`\n *\n * @param reportUuid Report UUID.\n */\n update(\n reportUuid: string,\n params: RegulatoryReportsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<RegulatoryReportDetail> {\n return this._client.request(REGULATORY_REPORTS_UPDATE, [reportUuid], params, options);\n }\n\n /**\n * Validate report\n *\n * Check the report against the obligatory goAML header fields (reporting entity ID, submission code, local currency, action taken, submission date), plus at least one attached transaction and a 2-letter jurisdiction, without generating any files. Also stores the result on the report: validation_errors and validated_at are updated, and a non-finalized report's status moves to VALIDATED (no errors) or back to DRAFT (errors).\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/validate/`\n *\n * @param reportUuid Report UUID.\n */\n validate(\n reportUuid: string,\n options?: RequestOptions,\n ): APIPromise<RegulatoryReportsValidateResponse> {\n return this._client.request(REGULATORY_REPORTS_VALIDATE, [reportUuid], undefined, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { ReportTemplateDetail } from \"../types/components.js\";\nimport type {\n ReportTemplatesCreateParams,\n ReportTemplatesListParams,\n ReportTemplatesListResponse,\n ReportTemplatesUpdateParams,\n} from \"../types/report-templates.js\";\n\nconst REPORT_TEMPLATES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/report-templates/\",\n scope: \"application\",\n body: \"json\",\n dates: \"ReportTemplateDetail\",\n};\nconst REPORT_TEMPLATES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/\",\n scope: \"application\",\n response: \"none\",\n};\nconst REPORT_TEMPLATES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/report-templates/\",\n scope: \"application\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"ReportTemplateDetail\" } } },\n};\nconst REPORT_TEMPLATES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/\",\n scope: \"application\",\n dates: \"ReportTemplateDetail\",\n};\nconst REPORT_TEMPLATES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/\",\n scope: \"application\",\n body: \"json\",\n dates: \"ReportTemplateDetail\",\n};\n\n/** `report_templates` */\nexport class ReportTemplates extends APIResource {\n /**\n * Create report template\n *\n * Create a reusable per-jurisdiction, per-report-type goAML header template. Rejected with 400 if any of the template-level obligatory fields (rentity_id, submission_code, currency_code_local) is missing from field_config; an invalid template cannot be saved or used to create a report. Per-filing header fields (action, submission_date, transactions) are enforced at report validate/finalize time instead.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/report-templates/`\n */\n create(\n params: ReportTemplatesCreateParams,\n options?: RequestOptions,\n ): APIPromise<ReportTemplateDetail> {\n return this._client.request(REPORT_TEMPLATES_CREATE, [], params, options);\n }\n\n /**\n * Delete report template\n *\n * Delete a report template. Reports already created from it are unaffected.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/`\n *\n * @param templateUuid Report template UUID.\n */\n delete(templateUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(REPORT_TEMPLATES_DELETE, [templateUuid], undefined, options);\n }\n\n /**\n * List report templates\n *\n * List FIU report templates for the application.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/report-templates/`\n */\n list(\n params: ReportTemplatesListParams = {},\n options?: RequestOptions,\n ): PagePromise<ReportTemplatesListResponse, ReportTemplateDetail> {\n return this._client.requestPage(REPORT_TEMPLATES_LIST, [], params, options);\n }\n\n /**\n * Get report template\n *\n * Retrieve a report template.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/`\n *\n * @param templateUuid Report template UUID.\n */\n retrieve(templateUuid: string, options?: RequestOptions): APIPromise<ReportTemplateDetail> {\n return this._client.request(REPORT_TEMPLATES_RETRIEVE, [templateUuid], undefined, options);\n }\n\n /**\n * Update report template\n *\n * Partially update a report template. Re-validates obligatory goAML fields on save.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/report-templates/{template_uuid}/`\n *\n * @param templateUuid Report template UUID.\n */\n update(\n templateUuid: string,\n params: ReportTemplatesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<ReportTemplateDetail> {\n return this._client.request(REPORT_TEMPLATES_UPDATE, [templateUuid], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n AMLScreeningRun,\n BusinessSessionListItem,\n EntityNetworkMembershipList,\n FeatureStatusOverride,\n KYBKeyPeopleParty,\n ReviewItem,\n SandboxSimulateResponse,\n SessionDecision,\n SessionDeletionJob,\n SessionEvent,\n SessionImportError,\n SessionImportJob,\n SessionWebhookDelivery,\n UserSessionListItem,\n} from \"../types/components.js\";\nimport type {\n SessionsAddImagesParams,\n SessionsAddImagesResponse,\n SessionsBatchDeleteParams,\n SessionsBatchDeleteResponse,\n SessionsBulkUpdateAmlHitStatusParams,\n SessionsBulkUpdateAmlHitStatusResponse,\n SessionsCreateParams,\n SessionsCreateResponse,\n SessionsDeleteParams,\n SessionsDeleteResponse,\n SessionsExportAmlScreeningHistoryParams,\n SessionsImportSharedParams,\n SessionsImportsCheckProviderParams,\n SessionsImportsCheckProviderResponse,\n SessionsImportsCreateParams,\n SessionsImportsListActiveJobsResponse,\n SessionsImportsListErrorsParams,\n SessionsImportsListErrorsResponse,\n SessionsImportsListJobsParams,\n SessionsImportsListJobsResponse,\n SessionsImportsListProvidersResponse,\n SessionsImportsRetrieveTemplateParams,\n SessionsImportsRetryParams,\n SessionsImportsStartParams,\n SessionsListAmlScreeningHistoryParams,\n SessionsListAmlScreeningHistoryResponse,\n SessionsListEventsParams,\n SessionsListEventsResponse,\n SessionsListFeatureOverridesResponse,\n SessionsListParams,\n SessionsListResponse,\n SessionsPreviewDecisionEmailParams,\n SessionsPreviewDecisionEmailResponse,\n SessionsPreviewResubmissionParams,\n SessionsPreviewResubmissionResponse,\n SessionsRetrieveDecisionParams,\n SessionsReviewsCreateParams,\n SessionsReviewsCreateResponse,\n SessionsReviewsListParams,\n SessionsReviewsListResponse,\n SessionsShareParams,\n SessionsShareResponse,\n SessionsSignaturesDownloadEvidenceParams,\n SessionsSignaturesValidateParams,\n SessionsSignaturesValidateResponse,\n SessionsSimulateParams,\n SessionsUpdateAmlHitStatusParams,\n SessionsUpdateAmlHitStatusResponse,\n SessionsUpdateAmlStatusParams,\n SessionsUpdateAmlStatusResponse,\n SessionsUpdateDataParams,\n SessionsUpdateDataResponse,\n SessionsUpdateDocumentAiDataParams,\n SessionsUpdateDocumentAiDataResponse,\n SessionsUpdateFeatureStatusParams,\n SessionsUpdateFeatureStatusResponse,\n SessionsUpdateKybCompanyDataParams,\n SessionsUpdateKybCompanyDataResponse,\n SessionsUpdateKybPartyParams,\n SessionsUpdateKybPartyResponse,\n SessionsUpdatePoaDataParams,\n SessionsUpdatePoaDataResponse,\n SessionsUpdateStatusParams,\n SessionsUpdateStatusResponse,\n} from \"../types/sessions.js\";\n\nconst SESSIONS_IMPORTS_CANCEL: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/{importId}/cancel/\",\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_IMPORTS_CHECK_PROVIDER: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/providers/check/\",\n body: \"json\",\n};\nconst SESSIONS_IMPORTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/\",\n body: \"auto\",\n files: [\"file\"],\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_IMPORTS_LIST_ACTIVE_JOBS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/import-jobs/active/\",\n dates: { p: { results: { i: \"ImportJobSummary\" } } },\n};\nconst SESSIONS_IMPORTS_LIST_ERRORS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/imports/{importId}/errors/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"SessionImportError\" } } },\n};\nconst SESSIONS_IMPORTS_LIST_JOBS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/import-jobs/\",\n query: [\"scope\", \"limit\"],\n dates: { p: { results: { i: \"ImportJobSummary\" } } },\n};\nconst SESSIONS_IMPORTS_LIST_PROVIDERS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/imports/providers/\",\n};\nconst SESSIONS_IMPORTS_PAUSE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/{importId}/pause/\",\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_IMPORTS_RESUME: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/{importId}/resume/\",\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_IMPORTS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/imports/{importId}/\",\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_IMPORTS_RETRIEVE_TEMPLATE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/imports/template/\",\n query: [\"import_type\"],\n response: \"binary\",\n accept: \"text/csv\",\n};\nconst SESSIONS_IMPORTS_RETRY: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/{importId}/retry/\",\n body: \"multipart\",\n files: [\"file\"],\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_IMPORTS_START: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/imports/{importId}/start/\",\n body: \"json\",\n dates: \"SessionImportJob\",\n};\nconst SESSIONS_REVIEWS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/sessions/{session_id}/reviews/\",\n body: \"json\",\n dates: { p: { created_at: 1 } },\n};\nconst SESSIONS_REVIEWS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/sessions/{session_id}/reviews/\",\n query: [\"limit\", \"offset\", \"ordering\"],\n dates: { p: { results: { i: \"ReviewItem\" } } },\n};\nconst SESSIONS_SIGNATURES_DOWNLOAD_DOCUMENT: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst SESSIONS_SIGNATURES_DOWNLOAD_EVIDENCE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/signatures/{nodeId}/evidence/\",\n query: [\"signature_id\"],\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst SESSIONS_SIGNATURES_DOWNLOAD_FIELD_IMAGE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/signatures/{nodeId}/fields/{fieldId}/image/\",\n response: \"binary\",\n accept: \"image/png\",\n};\nconst SESSIONS_SIGNATURES_VALIDATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/signatures/{nodeId}/validate/\",\n body: \"json\",\n dates: { p: { signatures: { i: \"SignatureResult\" } } },\n};\nconst SESSIONS_WEBHOOKS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/webhooks/\",\n dates: { i: \"SessionWebhookDelivery\" },\n};\nconst SESSIONS_WEBHOOKS_RESEND: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/webhook/{webhook_uuid}/resend\",\n dates: \"SessionWebhookDelivery\",\n};\nconst SESSIONS_WEBHOOKS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/webhook/{webhook_uuid}\",\n dates: \"SessionWebhookDelivery\",\n};\nconst SESSIONS_ADD_IMAGES: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/add-images/\",\n body: \"multipart\",\n files: [\"file\"],\n};\nconst SESSIONS_BATCH_DELETE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/sessions/delete/\",\n body: \"json\",\n dates: { p: { results: { i: { p: { biometric_template_expires_at: 1 } } } } },\n};\nconst SESSIONS_BULK_UPDATE_AML_HIT_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/bulk-update-aml-hit-status/\",\n query: [[\"node_id_query\", \"node_id\"]],\n body: \"json\",\n};\nconst SESSIONS_CANCEL_FEATURE_OVERRIDE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/\",\n dates: \"FeatureStatusOverride\",\n};\nconst SESSIONS_CREATE: OperationSpec = { method: \"POST\", path: \"/v3/session/\", body: \"json\" };\nconst SESSIONS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/session/{sessionId}/delete/\",\n body: \"json\",\n dates: { p: { biometric_template_expires_at: 1 } },\n};\nconst SESSIONS_EXPORT_AML_SCREENING_HISTORY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/aml-screening-history/export/\",\n query: [\"node_id\"],\n response: \"binary\",\n accept: \"text/csv\",\n};\nconst SESSIONS_GENERATE_PDF: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/generate-pdf/\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst SESSIONS_IMPORT_SHARED: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/import-shared/\",\n body: \"json\",\n dates: \"SessionDecision\",\n};\nconst SESSIONS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/sessions/\",\n query: [\n \"session_kind\",\n \"limit\",\n \"offset\",\n \"status\",\n \"vendor_data\",\n \"search\",\n \"workflow_id\",\n \"date_from\",\n \"date_to\",\n \"country\",\n \"document_type\",\n \"document_name\",\n \"region\",\n \"didit_internal_id\",\n \"session_type\",\n \"api_service\",\n \"screened_full_name\",\n \"warning\",\n \"status_initialized_as_in_review\",\n \"is_kyc_to_be_reviewed\",\n \"euuid\",\n \"organization_name\",\n ],\n dates: { p: { results: { i: { p: { created_at: 1 } } } } },\n};\nconst SESSIONS_LIST_AML_SCREENING_HISTORY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/aml-screening-history/\",\n query: [\"node_id\", \"limit\", \"offset\", \"ordering\"],\n dates: { p: { results: { i: \"AMLScreeningRun\" } } },\n};\nconst SESSIONS_LIST_EVENTS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/events/\",\n query: [\"limit\", \"offset\", \"ordering\"],\n dates: { p: { results: { i: \"SessionEvent\" } } },\n};\nconst SESSIONS_LIST_FEATURE_OVERRIDES: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/features/overrides/\",\n dates: { p: { flow_finished_at: 1, overrides: { i: \"FeatureStatusOverride\" } } },\n};\nconst SESSIONS_LIST_NETWORKS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/sessions/{session_id}/networks/\",\n scope: \"application\",\n dates: \"EntityNetworkMembershipList\",\n};\nconst SESSIONS_PREVIEW_DECISION_EMAIL: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/decision-email-preview/\",\n body: \"json\",\n};\nconst SESSIONS_PREVIEW_RESUBMISSION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/resubmission-preview/\",\n body: \"json\",\n};\nconst SESSIONS_REGENERATE_KYB_PARTY: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/\",\n};\nconst SESSIONS_RETRIEVE_DECISION: OperationSpec = {\n method: \"GET\",\n path: \"/v3/session/{sessionId}/decision/\",\n query: [\"include\"],\n dates: \"SessionDecision\",\n};\nconst SESSIONS_RETRIEVE_DELETION_JOB: OperationSpec = {\n method: \"GET\",\n path: \"/v3/sessions/delete/{job_id}/\",\n dates: \"SessionDeletionJob\",\n};\nconst SESSIONS_SHARE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/share/\",\n body: \"json\",\n};\nconst SESSIONS_SIMULATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/session/{sessionId}/simulate/\",\n body: \"json\",\n};\nconst SESSIONS_UPDATE_AML_HIT_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/update-aml-hit-status/\",\n query: [[\"node_id_query\", \"node_id\"]],\n body: \"json\",\n};\nconst SESSIONS_UPDATE_AML_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/update-aml-status/\",\n query: [[\"node_id_query\", \"node_id\"]],\n body: \"json\",\n};\nconst SESSIONS_UPDATE_DATA: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/update-data/\",\n query: [\"node_id\"],\n body: \"json\",\n};\nconst SESSIONS_UPDATE_DOCUMENT_AI_DATA: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/document-ai/{sessionId}/documents/{documentUuid}/\",\n body: \"json\",\n};\nconst SESSIONS_UPDATE_FEATURE_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/features/{nodeId}/update-status/\",\n body: \"json\",\n dates: { p: { override: \"FeatureStatusOverride\" } },\n};\nconst SESSIONS_UPDATE_KYB_COMPANY_DATA: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/kyb/{companyUuid}/update-data/\",\n body: \"json\",\n dates: { p: { vat_checked_at: 1, confirmed_by_user_at: 1, last_console_edit_at: 1 } },\n};\nconst SESSIONS_UPDATE_KYB_PARTY: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/kyb/parties/{partyUuid}/\",\n body: \"json\",\n};\nconst SESSIONS_UPDATE_POA_DATA: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/update-poa-data/\",\n query: [\"node_id\"],\n body: \"json\",\n};\nconst SESSIONS_UPDATE_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/session/{sessionId}/update-status/\",\n body: \"json\",\n};\n\n/** `sessions.imports` */\nexport class SessionsImports extends APIResource {\n /**\n * Cancel an import job\n *\n * Cancel an import. What was imported stays; the uploaded file and the key are erased.\n *\n * `POST /v3/session/imports/{importId}/cancel/`\n *\n * @param importId importId\n */\n cancel(importId: string, options?: RequestOptions): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_CANCEL, [importId], undefined, options);\n }\n\n /**\n * Check a provider key\n *\n * Read the provider with your key before creating a migration. Nothing is stored.\n *\n * `POST /v3/session/imports/providers/check/`\n */\n checkProvider(\n params: SessionsImportsCheckProviderParams,\n options?: RequestOptions,\n ): APIPromise<SessionsImportsCheckProviderResponse> {\n return this._client.request(SESSIONS_IMPORTS_CHECK_PROVIDER, [], params, options);\n }\n\n /**\n * Create a verification import job\n *\n * Create an asynchronous import job for historical User Verification sessions, Business Verification sessions, transaction monitoring records, or workflow custom status rules. Set `source=provider` to migrate from another provider: Didit reads Sumsub, Onfido, Persona and ComplyCube with your read-only key, reads Veriff, iDenfy and MetaMap records by the IDs you upload in `file`, and imports an export file in Didit's format for the other providers. Record IDs are namespaced by provider (`sumsub:<id>`) so a re-run skips everything already in Didit. Imports are disabled by default and must be enabled per organization by Didit.\n *\n * `POST /v3/session/imports/`\n */\n create(\n params: SessionsImportsCreateParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_CREATE, [], params, options);\n }\n\n /**\n * List active import jobs\n *\n * What is running or waiting, plus what just ended, for a progress indicator.\n *\n * `GET /v3/import-jobs/active/`\n */\n listActiveJobs(options?: RequestOptions): APIPromise<SessionsImportsListActiveJobsResponse> {\n return this._client.request(SESSIONS_IMPORTS_LIST_ACTIVE_JOBS, [], undefined, options);\n }\n\n /**\n * List verification import row errors\n *\n * List row-level errors for a verification import job, ordered by `row_number`. Use this endpoint to produce a corrected retry file containing only failed rows.\n *\n * `GET /v3/session/imports/{importId}/errors/`\n *\n * @param importId importId\n */\n listErrors(\n importId: string,\n params: SessionsImportsListErrorsParams = {},\n options?: RequestOptions,\n ): PagePromise<SessionsImportsListErrorsResponse, SessionImportError> {\n return this._client.requestPage(SESSIONS_IMPORTS_LIST_ERRORS, [importId], params, options);\n }\n\n /**\n * List import jobs\n *\n * Every import of the application in one shape: verification imports and migrations, people and businesses.\n *\n * `GET /v3/import-jobs/`\n */\n listJobs(\n params: SessionsImportsListJobsParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsImportsListJobsResponse> {\n return this._client.request(SESSIONS_IMPORTS_LIST_JOBS, [], params, options);\n }\n\n /**\n * List migration providers\n *\n * The 15 providers you can migrate verifications from: what each needs to connect, whether its API can list records, the permissions its key needs and its default status mapping.\n *\n * `GET /v3/session/imports/providers/`\n */\n listProviders(options?: RequestOptions): APIPromise<SessionsImportsListProvidersResponse> {\n return this._client.request(SESSIONS_IMPORTS_LIST_PROVIDERS, [], undefined, options);\n }\n\n /**\n * Pause an import job\n *\n * Pause a queued or running import.\n *\n * `POST /v3/session/imports/{importId}/pause/`\n *\n * @param importId importId\n */\n pause(importId: string, options?: RequestOptions): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_PAUSE, [importId], undefined, options);\n }\n\n /**\n * Resume an import job\n *\n * Resume an import you paused. A job paused by the provider's rate limit resumes by itself.\n *\n * `POST /v3/session/imports/{importId}/resume/`\n *\n * @param importId importId\n */\n resume(importId: string, options?: RequestOptions): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_RESUME, [importId], undefined, options);\n }\n\n /**\n * Retrieve a verification import job\n *\n * Retrieve import progress counters and terminal status for one job. Poll until `status` is `COMPLETED` or `FAILED`; `failed_count` > 0 means some rows were rejected - list them via the errors endpoint.\n *\n * `GET /v3/session/imports/{importId}/`\n *\n * @param importId importId\n */\n retrieve(importId: string, options?: RequestOptions): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_RETRIEVE, [importId], undefined, options);\n }\n\n /**\n * Download verification import template\n *\n * Download the canonical CSV header for verification imports. The column set is determined by `import_type`. The first column of session templates is the idempotency key `external_id`.\n *\n * `GET /v3/session/imports/template/`\n */\n retrieveTemplate(\n params: SessionsImportsRetrieveTemplateParams = {},\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(SESSIONS_IMPORTS_RETRIEVE_TEMPLATE, [], params, options);\n }\n\n /**\n * Retry a migration\n *\n * Run a migration that ended again as a new job, with a new key (the old one was erased). It keeps the provider, workflow, region, status mapping and face templates choice; everything already in Didit is skipped.\n *\n * `POST /v3/session/imports/{importId}/retry/`\n *\n * @param importId importId\n */\n retry(\n importId: string,\n params: SessionsImportsRetryParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_RETRY, [importId], params, options);\n }\n\n /**\n * Start a dry run\n *\n * Start a migration whose dry run finished (`READY`): the same job imports for real, with the status mapping and face templates choice as sent now.\n *\n * `POST /v3/session/imports/{importId}/start/`\n *\n * @param importId importId\n */\n start(\n importId: string,\n params: SessionsImportsStartParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionImportJob> {\n return this._client.request(SESSIONS_IMPORTS_START, [importId], params, options);\n }\n}\n\n/** `sessions.reviews` */\nexport class SessionsReviews extends APIResource {\n /**\n * Add a review note to a session's audit trail\n *\n * Append a note to a User Verification (KYC) session's review / activity feed. **This endpoint only records an entry - it never changes the session.** The session's `status` is left untouched, no status-transition validation runs, and no webhook fires. To actually approve, decline, or re-open a session (which also writes a fully-attributed `STATUS_UPDATED` entry to this feed), use `PATCH /v3/session/{session_id}/update-status/` instead.\n *\n * Both body fields are optional and an empty JSON object is accepted. `new_status` is stored purely as a label on the entry and accepts any of the ten session status values (case-sensitive). `@email` mentions inside `comment` are stored as plain text only - they trigger no notifications on this endpoint, and the entry's `mentioned_emails` stays empty.\n *\n * Note on attribution: entries created here carry no actor information. In the feed they show `actor_display: \"Unknown\"`, `actor_type: \"CONSOLE_USER\"`, and `activity_type: \"STATUS_UPDATED\"` (storage defaults), and the `201` body's `user` field is `\"Unknown\"`.\n *\n * `POST /v3/sessions/{session_id}/reviews/`\n *\n * @param sessionId UUID of the User Verification (KYC) session. Must belong to the same application as the API key - cross-application UUIDs, deleted sessions, and Business Verification (KYB) session IDs all return `404`.\n */\n create(\n sessionId: string,\n params: SessionsReviewsCreateParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsReviewsCreateResponse> {\n return this._client.request(SESSIONS_REVIEWS_CREATE, [sessionId], params, options);\n }\n\n /**\n * List session reviews and activity log\n *\n * Return the audit trail / activity feed for a User Verification (KYC) session, newest first, in a paginated envelope (`count` / `next` / `previous` / `results`, 50 entries per page by default).\n *\n * Feed entries are written by every actor that touches the session: manual decisions made through `PATCH /v3/session/{session_id}/update-status/` (which records `previous_status` → `new_status`), Console reviewer activity (comments with `@email` mentions, KYC/POA data edits, file uploads/removals, tag changes, detail-page views), AML ongoing-monitoring matches, and notes appended via `POST` on this same path. Reading this feed is the API-side equivalent of the **Activity** panel in the Didit Console session view.\n *\n * Only User Verification (KYC) sessions are addressable here; Business Verification (KYB) session IDs return `404`.\n *\n * `GET /v3/sessions/{session_id}/reviews/`\n *\n * @param sessionId UUID of the User Verification (KYC) session. Must belong to the same application as the API key - cross-application UUIDs, deleted sessions, and Business Verification (KYB) session IDs all return `404`.\n */\n list(\n sessionId: string,\n params: SessionsReviewsListParams = {},\n options?: RequestOptions,\n ): PagePromise<SessionsReviewsListResponse, ReviewItem> {\n return this._client.requestPage(SESSIONS_REVIEWS_LIST, [sessionId], params, options);\n }\n}\n\n/** `sessions.signatures` */\nexport class SessionsSignatures extends APIResource {\n /**\n * Download a signed document\n *\n * Download the signed PDF of one document of an Electronic Signature step. Use the `signed_file` path of `signatures[].documents[]` in the decision. The PDF holds the document the signer was shown with their field values stamped, the evidence page (unless `signature_evidence_page` is off) and the PAdES signature with its timestamp. Didit checks the file against `sha256_signed` before returning it.\n *\n * Works for User Verification (KYC) and Business Verification (KYB) sessions. Needs `read:sessions`; your API key works. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature#download-the-signed-documents).\n *\n * `GET /v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/`\n *\n * @param sessionId The User Verification (KYC) or Business Verification (KYB) session.\n * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`.\n * @param documentId `id` of the document in `signatures[].documents[]`.\n */\n downloadDocument(\n sessionId: string,\n nodeId: string,\n documentId: string,\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(\n SESSIONS_SIGNATURES_DOWNLOAD_DOCUMENT,\n [sessionId, nodeId, documentId],\n undefined,\n options,\n );\n }\n\n /**\n * Download the signature evidence\n *\n * Download a signer's evidence PDF: the level and format, the signer and their verified identity session, the code confirmation, the IP address, each document with its original SHA-256 and field values, the certificate, the timestamp and the SHA-256 of every signed file. Use the `evidence_file` path of the signer's item in `signatures[]`.\n *\n * Always pass `signature_id` when a Business Verification step has several signers: without it, the route picks one of the step's signers. Needs `read:sessions`; your API key works.\n *\n * `GET /v3/session/{sessionId}/signatures/{nodeId}/evidence/`\n *\n * @param sessionId The User Verification (KYC) or Business Verification (KYB) session.\n * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`.\n */\n downloadEvidence(\n sessionId: string,\n nodeId: string,\n params: SessionsSignaturesDownloadEvidenceParams = {},\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(\n SESSIONS_SIGNATURES_DOWNLOAD_EVIDENCE,\n [sessionId, nodeId],\n params,\n options,\n );\n }\n\n /**\n * Download a signature image\n *\n * Download the signature or initials a signer applied to a field, as PNG. Use the `image_url` of the field in `signatures[].documents[].fields[]`. Needs `read:sessions`; your API key works.\n *\n * `GET /v3/session/{sessionId}/signatures/{nodeId}/fields/{fieldId}/image/`\n *\n * @param sessionId The User Verification (KYC) or Business Verification (KYB) session.\n * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`.\n * @param fieldId The field on this signer's copy, as in the field's `image_url`.\n */\n downloadFieldImage(\n sessionId: string,\n nodeId: string,\n fieldId: string,\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(\n SESSIONS_SIGNATURES_DOWNLOAD_FIELD_IMAGE,\n [sessionId, nodeId, fieldId],\n undefined,\n options,\n );\n }\n\n /**\n * Validate signatures again\n *\n * Re-check the signed documents of an Electronic Signature step. Didit re-reads every signed PDF, checks its SHA-256 and validates the PAdES signature, the certificate, the revocation data and the timestamp, then saves the result in each signer's `validation` and returns the updated items. Nothing is signed again. Send `signature_id` to check one signer; without it, every signer of the step is checked, and the call fails if any of them hasn't signed.\n *\n * Needs `write:sessions`; your API key works. In the console it's the **Validate again** button.\n *\n * `POST /v3/session/{sessionId}/signatures/{nodeId}/validate/`\n *\n * @param sessionId The User Verification (KYC) or Business Verification (KYB) session.\n * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`.\n */\n validate(\n sessionId: string,\n nodeId: string,\n params: SessionsSignaturesValidateParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsSignaturesValidateResponse> {\n return this._client.request(SESSIONS_SIGNATURES_VALIDATE, [sessionId, nodeId], params, options);\n }\n}\n\n/** `sessions.webhooks` */\nexport class SessionsWebhooks extends APIResource {\n /**\n * List session webhook deliveries\n *\n * List every webhook delivery Didit recorded for one verification session, user (KYC) or business (KYB), newest first, as a plain JSON array (not paginated). Each entry is one attempt to one destination: the first send, each automatic [retry](https://docs.didit.me/integration/webhooks#retry-policy) and each resend are separate entries with their own `uuid`, and retries and resends keep the payload's `event_id`. `request_header` and `request_body` are JSON text; parse them to read the signatures and the payload. Delivery records are available for about 30 days, so an empty array means no webhook has been sent for the session yet or every delivery is older than that. A scoped API key needs `sessions: read` and `decisions: read`.\n *\n * `GET /v3/session/{sessionId}/webhooks/`\n *\n * @param sessionId UUID of the verification session, user (KYC) or business (KYB): the `session_id` returned by `POST /v3/session/`. The server resolves it against both session types. **Must be a valid UUID.** The route only matches well-formed UUIDs, so a malformed value is rejected by the URL router before any application code runs and the response is a `404` **HTML** page rather than the JSON `{\"detail\": ...}` envelope shown below.\n */\n list(sessionId: string, options?: RequestOptions): APIPromise<SessionWebhookDelivery[]> {\n return this._client.request(SESSIONS_WEBHOOKS_LIST, [sessionId], undefined, options);\n }\n\n /**\n * Resend session webhook delivery\n *\n * Send a recorded session webhook again to the URL it first went to, with the same payload and `event_id` and a fresh `timestamp`, `X-Timestamp` header and signatures. Didit signs it with the current secret of the destination the delivery belongs to (or the application-level secret for a delivery to the legacy webhook URL), waits up to 5 seconds for your endpoint, records the attempt as a new delivery and returns it with `200` whatever your endpoint answered: read `response_status`. A resend is not retried automatically, and every call sends again, so make your endpoint idempotent on `event_id`. The path has no trailing slash and the request has no body. A scoped API key needs `webhooks: write` and `decisions: read`.\n *\n * `POST /v3/session/{sessionId}/webhook/{webhook_uuid}/resend`\n *\n * @param sessionId UUID of the verification session, user (KYC) or business (KYB): the `session_id` returned by `POST /v3/session/`. The server resolves it against both session types. **Must be a valid UUID.** The route only matches well-formed UUIDs, so a malformed value is rejected by the URL router before any application code runs and the response is a `404` **HTML** page rather than the JSON `{\"detail\": ...}` envelope shown below.\n * @param webhookUuid UUID of the delivery to resend: the `uuid` of an entry returned by `GET /v3/session/{sessionId}/webhooks/`. It must belong to the session in the path.\n */\n resend(\n sessionId: string,\n webhookUuid: string,\n options?: RequestOptions,\n ): APIPromise<SessionWebhookDelivery> {\n return this._client.request(\n SESSIONS_WEBHOOKS_RESEND,\n [sessionId, webhookUuid],\n undefined,\n options,\n );\n }\n\n /**\n * Get session webhook delivery\n *\n * Retrieve one webhook delivery of a verification session: the URL it went to, the HTTP status your endpoint returned, and the exact headers and JSON body Didit sent. `request_header` and `request_body` are JSON text; to check your [signature verification](https://docs.didit.me/integration/webhooks#signature-verification), recompute `X-Signature-V2` from the parsed body with the secret of the destination it was sent to (or the application-level secret for a delivery to the legacy webhook URL). The path has no trailing slash: with one it returns `404`. A scoped API key needs `sessions: read` and `decisions: read`.\n *\n * `GET /v3/session/{sessionId}/webhook/{webhook_uuid}`\n *\n * @param sessionId UUID of the verification session, user (KYC) or business (KYB): the `session_id` returned by `POST /v3/session/`. The server resolves it against both session types. **Must be a valid UUID.** The route only matches well-formed UUIDs, so a malformed value is rejected by the URL router before any application code runs and the response is a `404` **HTML** page rather than the JSON `{\"detail\": ...}` envelope shown below.\n * @param webhookUuid UUID of the delivery: the `uuid` of an entry returned by `GET /v3/session/{sessionId}/webhooks/`. It must belong to the session in the path.\n */\n retrieve(\n sessionId: string,\n webhookUuid: string,\n options?: RequestOptions,\n ): APIPromise<SessionWebhookDelivery> {\n return this._client.request(\n SESSIONS_WEBHOOKS_RETRIEVE,\n [sessionId, webhookUuid],\n undefined,\n options,\n );\n }\n}\n\n/** `sessions` */\nexport class Sessions extends APIResource {\n readonly imports: SessionsImports = new SessionsImports(this._client);\n readonly reviews: SessionsReviews = new SessionsReviews(this._client);\n readonly signatures: SessionsSignatures = new SessionsSignatures(this._client);\n readonly webhooks: SessionsWebhooks = new SessionsWebhooks(this._client);\n\n /**\n * Add an image to a session\n *\n * Attach one extra image or PDF to the ID verification (`model_type=kyc`) or Proof of Address (`model_type=poa`) result of a finished User Verification (KYC) session, for example evidence collected outside the flow. The session must be `Approved`, `Declined`, `In Review` or `Kyc Expired` and carry the result named by `model_type`; Business Verification (KYB) sessions are not supported. Each call appends one file (to the most recent result when the step ran more than once), keeps the existing files and records a `FILE_ADDED` entry in the session activity log; the upload sends no webhook and does not change the session status. The file is compressed on upload and is returned in `extra_files` of the session decision. This endpoint is limited to 10 requests per minute per API key. A scoped API key needs `sessions: write`, and without `media: read` it receives the `extra_files` links as `null`.\n *\n * `PATCH /v3/session/{sessionId}/add-images/`\n *\n * @param sessionId UUID of the User Verification (KYC) session to add the file to (the `session_id` returned by `POST /v3/session/`). A Business Verification (KYB) session ID returns `404`.\n */\n addImages(\n sessionId: string,\n params: SessionsAddImagesParams,\n options?: RequestOptions,\n ): APIPromise<SessionsAddImagesResponse> {\n return this._client.request(SESSIONS_ADD_IMAGES, [sessionId], params, options);\n }\n\n /**\n * Bulk delete KYC sessions by session_number\n *\n * Bulk delete User Verification (KYC) sessions by their numeric `session_number`, or every KYC session in your application with `delete_all: true`.\n *\n * `session_number` is the human-friendly incrementing counter shown in the Console session list and returned as `session_number` by the create-session and decision endpoints; it is **not** the `session_id` UUID. To delete a session by UUID, or to delete a Business Verification (KYB) session, which this endpoint never touches, use `DELETE /v3/session/{sessionId}/delete/` instead.\n *\n * **Up to 20 sessions are deleted in the request, more run as a job.** The number of matching sessions decides, whether they are selected by `session_numbers` or with `delete_all`:\n * - Up to 20 matching sessions: they are deleted before the response, which is `200` with one entry per session in `results[]`.\n * - More than 20: the response is `202` with a deletion job, and the sessions are deleted in the background. Poll `GET /v3/sessions/delete/{job_id}/` until `status` is `COMPLETED` or `FAILED`. A job reports counts per outcome, never which sessions it deleted. A `delete_all` job deletes only the sessions created before the request; sessions started while it runs are not deleted.\n *\n * Each deleted session gets exactly the same treatment as the single-session delete endpoint: the session, every verification attempt it holds, its decision and extracted data, its related feature records (ID verification, face, liveness, face match, and so on) and all of its stored files are deleted, it disappears from every read endpoint, and previously issued media URLs stop resolving. Webhook deliveries still queued for a deleted session, and their retries, are dropped; webhooks already delivered are not affected. Blocklist entries are **not** removed, credits already consumed are **not** refunded, and the parent User entities are **not** deleted (use `POST /v3/users/delete/` for those); no webhook is emitted for the deletion. Deletion is permanent and irreversible.\n *\n * **Selection semantics:**\n * - With `delete_all: true` you can narrow the selection with the filters of `GET /v3/sessions/`, each prefixed with `filter_` (for example `filter_status`, `filter_workflow_id`, `filter_date_from`). Filters that take several values in List Sessions (`status`, `workflow_id`, `country`, `region`, `document_type`, `document_name`, `session_type`, `warning`, `organization_name`) accept a comma-separated string or an array; the others take one value. An empty value is ignored. Filters apply only together with `delete_all`, and a deletion job applies the same filters.\n * - An unknown `filter_*` key, or a filter value that cannot be read, rejects the whole request with `400` before anything is deleted, so a mistyped filter never widens the deletion to every session.\n * - Entries in `session_numbers` that do not match a live KYC session in your application (unknown numbers, already-deleted sessions, or sessions owned by another application) are **silently skipped**: they do not appear in `results` and are not counted in a job's `total`.\n * - Validation failures (a non-numeric entry, an empty list, neither `session_numbers` nor `delete_all` provided, or a template retention the application cannot honour) reject the **whole request** with `400` and delete nothing.\n * - Sessions are deleted in groups. If a group cannot be deleted (for example because a storage service is unavailable), every session in that group is reported as `face_retention_outcome: failed_retryable` and stays in place; the other groups are unaffected. Repeat the request for those sessions. A job retries such a group by itself.\n * - There is no documented cap on the list length; the shared write rate limit (below) is the practical bound.\n *\n * **Face biometric data:** the optional `retain_face_embeddings`, `face_retention_days`, `face_retention_deadline`, `deletion_instruction`, and `instruction_id` fields have the same meaning as on `DELETE /v3/session/{sessionId}/delete/` and apply to every matched session. Each result reports its own `face_retention_outcome`.\n *\n * **Response:** `200 OK` with `results[]` for up to 20 matching sessions, or `202 Accepted` with a deletion job for more. Every result confirms deletion except `face_retention_outcome: failed_retryable`, which reports a session that was NOT deleted and should be retried. Earlier versions of this endpoint returned `204 No Content`; update clients that assert on `204`.\n *\n * **Idempotency:** repeating the same request deletes nothing more: numbers that no longer match a session are skipped.\n *\n * **`delete_all: true` (destructive):** deletes **every** remaining KYC session in the application; `session_numbers` is ignored when set. There is no confirmation step and no undo.\n *\n * **Authentication:** API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`); this API never returns `401`.\n *\n * **Rate limit:** shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * This endpoint accepts API keys only. Business Console user Bearer tokens are rejected with `403` (unlike the single-session delete, which accepts both).\n *\n * **Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.\n *\n * `POST /v3/sessions/delete/`\n */\n batchDelete(\n params: SessionsBatchDeleteParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsBatchDeleteResponse | SessionDeletionJob> {\n return this._client.request(SESSIONS_BATCH_DELETE, [], params, options);\n }\n\n /**\n * Bulk update AML hit review statuses\n *\n * Update the review status of **multiple AML hits** in one call. Provide `hit_updates`, a list of `{ hit_id, review_status }` pairs. `review_status` is one of `Unreviewed`, `Confirmed Match`, `False Positive`, or `Inconclusive`.\n *\n * The update is all-or-nothing: if any `hit_id` is not found in the AML check, the request returns `404` and no hit is changed. A successful call fires a single `data.updated` webhook and records one activity entry covering all changes. For graph workflows with multiple AML checks, pass `node_id` to target a specific check.\n *\n * Authenticate with your API key (`x-api-key`) or a user authorization header - either must carry the `write:sessions` privilege.\n *\n * `PATCH /v3/session/{sessionId}/bulk-update-aml-hit-status/`\n *\n * @param sessionId UUID of the verification session. Accepts both user (KYC) and business (KYB) session IDs - the service resolves the ID across both session types.\n */\n bulkUpdateAmlHitStatus(\n sessionId: string,\n params: SessionsBulkUpdateAmlHitStatusParams,\n options?: RequestOptions,\n ): APIPromise<SessionsBulkUpdateAmlHitStatusResponse> {\n return this._client.request(SESSIONS_BULK_UPDATE_AML_HIT_STATUS, [sessionId], params, options);\n }\n\n /**\n * Cancel a check override that waits for the flow to finish\n *\n * Cancel an override of a feature (step) status that is still `pending_until_flow_finishes`, so it never applies. The check keeps its status, the cancellation is recorded in the session's activity as `FEATURE_OVERRIDE_CANCELLED`, and no webhook is sent. The response is the override with `state: cancelled` and `cancel_reason: cancelled_by_reviewer`.\n *\n * An override that already applied or was cancelled returns `409` with the code `feature_override_not_pending`. Find override IDs with `GET /v3/session/{sessionId}/features/overrides/` or in the `override` returned by the feature status update.\n *\n * Requires the `write:sessions` privilege; a scoped API key needs write access to decisions.\n *\n * `POST /v3/session/{sessionId}/features/overrides/{overrideId}/cancel/`\n *\n * @param sessionId UUID of the verification session. Accepts both user (KYC) and business (KYB) session IDs.\n * @param overrideId The `id` of the override to cancel.\n */\n cancelFeatureOverride(\n sessionId: string,\n overrideId: string,\n options?: RequestOptions,\n ): APIPromise<FeatureStatusOverride> {\n return this._client.request(\n SESSIONS_CANCEL_FEATURE_OVERRIDE,\n [sessionId, overrideId],\n undefined,\n options,\n );\n }\n\n /**\n * Create a verification session\n *\n * Create a User Verification (KYC) or Business Verification (KYB) session and receive a hosted verification `url` plus a `session_token` to redirect or embed for your end user. The `workflow_id` selects which verification steps run and whether the session is KYC or KYB.\n *\n * Call this from your backend (never the browser - the API key is a secret) whenever a user or business needs to be verified: at signup, before a sensitive action, or when re-verification is required. Prerequisites: a published workflow (created in the Console [Workflows](https://docs.didit.me/console/workflows) page) and an application API key with available credits. Sandbox applications bypass the credit check.\n *\n * **Idempotency:** when `vendor_data` is provided and an unfinished session (`Not Started`, `In Progress`, `Resubmitted`, or `Awaiting User`) with the same `vendor_data` already exists on the workflow's **current latest published version** (and that session already has a hosted verification URL), the existing session is returned (still `201`) instead of creating a duplicate - with its `callback` and `metadata` updated to the newly provided values. An unfinished session created on an older version of the workflow (one that has since been republished) is **not** reused; a new session pinned to the latest published version is created instead. Sessions in `Approved`, `Declined`, `In Review`, `Expired`, `Abandoned`, or `Kyc Expired` are never reused.\n *\n * **Side effects:** the hosted verification URL is generated and stored; if `contact_details.send_notification_emails` is `true` and an email is provided, a verification invite email is sent. The session expires after the workflow's configured session expiration time. For KYB workflows, `contact_details.phone` and `expected_details` are ignored.\n *\n * `POST /v3/session/`\n */\n create(\n params: SessionsCreateParams,\n options?: RequestOptions,\n ): APIPromise<SessionsCreateResponse> {\n return this._client.request(SESSIONS_CREATE, [], params, options);\n }\n\n /**\n * Delete a verification session (KYC or KYB)\n *\n * Delete a single verification session, User Verification (KYC) or Business Verification (KYB), by its `session_id`. The id is resolved against KYC sessions first, then KYB sessions, so both kinds are deleted through this one URL.\n *\n * **What is deleted:**\n * - The session and every verification attempt it holds, including results that a resubmission replaced: the decision, extracted data, all related feature records (ID verification, face, liveness, face match, AML, registry checks, IP analysis, and so on), its reviews and its activity log.\n * - All stored files owned by the session: document front/back photos (full, cropped, and privacy-blurred variants), document-capture videos, portrait crops, NFC chip portrait and signature images, face reference images, liveness videos, face-match source/target images, Proof of Address documents, and any extra uploaded files (KYC); uploaded company documents and extra files (KYB). Electronic Signature documents, signed PDFs, evidence PDFs and signature images (KYC and KYB): their download paths stop working. Previously issued media URLs (`https://<media-host>/...`) stop resolving.\n * - The session's face data. Its face embedding is deleted too, unless you choose to keep an image-free template (see **Face biometric data**).\n * - Webhook deliveries still queued for the session, and their retries. Webhooks already delivered are not affected.\n * - For a Business Verification (KYB) session: the verifications it created for its key people (KYC) and its corporate owners (KYB), recursively, reported as `deleted_child_verifications`. A verification it only links to, such as an existing approved KYC it reused, is not deleted.\n *\n * The session disappears from every read endpoint immediately: `GET /v3/session/{sessionId}/decision/` returns `404` and `GET /v3/sessions/` stops listing it. Ongoing AML monitoring and KYB registry monitoring started by the deleted verifications stop.\n *\n * **What is not affected:** blocklist entries created from this session (face or document) are **not** removed; manage those with the blocklist endpoints. Share tokens issued for the session are not revoked, but there is nothing left for them to import: an import with one returns `400` with `{\"share_token\": [\"Original session does not exist.\"]}`. Credits already consumed are **not** refunded. The parent User or Business entity is **not** deleted; use `POST /v3/users/delete/` or `POST /v3/businesses/delete/` for those. If the User's profile portrait came from this session, the portrait is removed with it.\n *\n * **Face biometric data:** by default the session's face embedding is deleted with the session (`face_retention_outcome: deleted`). An application that opted in to biometric-template retention (`face_retention_policy: retain_until_user_deleted` on `PATCH /v3/webhook/`), or a request with `retain_face_embeddings: true`, keeps one separately managed, image-free face biometric template anchored to the session's User (`retained_with_user`) so that duplicate detection, Face Search, and biometric authentication keep working. The template never contains the face image, media, identity fields, the decision, or the deleted session's id; it is biometric data deleted at `biometric_template_expires_at`, or earlier on User deletion, privacy erasure, or an explicit purge through `/v3/biometric-templates/`. A session without a linked User cannot retain a template (`ineligible_no_vendor_user`). Send `deletion_instruction: privacy_erasure` for data-subject requests: it purges every retained template for that User and never retains a new one.\n *\n * **Irreversible:** deletion is permanent and there is no restore endpoint. Export anything you need (for example a decision PDF) before you call it.\n *\n * **Side effects:** no webhook is emitted for deletions.\n *\n * **Response:** `200 OK` once the deletion has completed, with a JSON body reporting the `face_retention_outcome`, the retained template's expiry and, for a KYB session, `deleted_child_verifications`. Earlier versions of this endpoint returned `204 No Content`; update clients that assert on `204`. Keep your `instruction_id` in your own erasure log.\n *\n * **Idempotency:** not idempotent at the HTTP level: the first call returns `200`; repeating it returns `404` because the session no longer resolves. After a `503` the session is still in place; repeat the same request to finish deleting it.\n *\n * **Authentication:** send your application's API key in the `x-api-key` header; the session must belong to that application. Console user access tokens (`Authorization: Bearer ...`) may also call this endpoint when they carry the `delete:sessions` permission. Authentication and permission failures both return `403`; this API never returns `401`.\n *\n * **Rate limit:** shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n *\n * To bulk-delete KYC sessions by their numeric `session_number`, use `POST /v3/sessions/delete/` instead.\n *\n * **Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.\n *\n * `DELETE /v3/session/{sessionId}/delete/`\n *\n * @param sessionId UUID (`session_id`) of the User Verification (KYC) or Business Verification (KYB) session to delete, as returned when the session was created. Must be a canonical hyphenated UUID - a non-UUID value does not match the route and returns `404`.\n */\n delete(\n sessionId: string,\n params: SessionsDeleteParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsDeleteResponse> {\n return this._client.request(SESSIONS_DELETE, [sessionId], params, options);\n }\n\n /**\n * Export AML screening history as CSV\n *\n * Download the same ongoing-monitoring history as `GET /v3/session/{sessionId}/aml-screening-history/` as a CSV file, one line per completed re-screen, newest first, ready to hand to an auditor. The file is streamed whole (no pagination) and starts with a header line; an empty cell means unknown, dataset dates are never estimated, and a value that would start a spreadsheet formula is prefixed with an apostrophe. Works for KYC and KYB session IDs; pass `node_id` when the session ran more than one AML step. Errors are returned as JSON, not CSV. A scoped API key needs `decisions: read` and `media: read`: the response is a file, so a key without `media: read` gets `403`.\n *\n * `GET /v3/session/{sessionId}/aml-screening-history/export/`\n *\n * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs: the server resolves the ID across both session types. Must be a well-formed UUID; a malformed value does not match the route and returns an HTML `404`.\n */\n exportAmlScreeningHistory(\n sessionId: string,\n params: SessionsExportAmlScreeningHistoryParams = {},\n options?: RequestOptions,\n ): APIPromise<Blob> {\n return this._client.request(\n SESSIONS_EXPORT_AML_SCREENING_HISTORY,\n [sessionId],\n params,\n options,\n );\n }\n\n /**\n * Download a PDF report for a verification session\n *\n * Render and download a compliance-ready PDF report for a finished verification session. The same path serves both User Verification (KYC) and Business Verification (KYB) sessions - the server resolves the `sessionId` against both session types and picks the matching report template.\n *\n * **Eligible statuses.** The session must already carry a final or reviewable status:\n *\n * - KYC sessions: `Approved`, `Declined`, `In Review`, or `Kyc Expired`.\n * - KYB sessions: `Approved`, `Declined`, or `In Review`.\n *\n * Any other status (`Not Started`, `In Progress`, `Expired`, `Abandoned`, …) returns `403` with an explanatory `detail` string - see the `403` response below.\n *\n * **What the report contains.** The PDF mirrors the console session view at the moment of the request:\n *\n * - **KYC** - rolled-up session status, the warnings list, and one section per executed feature: ID Verification (document images plus extracted fields), NFC, Liveness, Face Match, Email Verification, Phone Verification, Proof of Address, Questionnaire answers, Database Validation, AML Screening, and IP Analysis - followed by session tags, console review activity (comments and status changes), and the session event timeline.\n * - **KYB** - registry checks (company data), AML screenings, business document verifications, key-people checks, questionnaire responses, phone/email verifications, IP analyses, and the session event timeline, followed by tags and review activity.\n *\n * **Branding.** If your application has white-label customization, the report is rendered with your logo and links to your privacy-policy URL; otherwise it carries Didit branding. Reports are rendered in English - there is no language parameter.\n *\n * **No caching.** Every call re-renders the PDF from the current session data, so a report generated after a manual review reflects the reviewer’s decision. Two calls for the same session can produce byte-different files - archive the downloaded file if you need an immutable copy.\n *\n * **Latency.** Rendering downloads every stored image (document sides, selfies, extra files) before composing the PDF, so media-heavy sessions can take several seconds. Use a generous client read timeout (60 s recommended) and stream the body to disk.\n *\n * **Trailing slash.** The canonical route ends with a trailing slash (`…/generate-pdf/`). A request without it is served directly with the same response - there is no `301` redirect, so no client has to follow redirects and `curl` does not need `-L`. Use the slashed URL as in the samples.\n *\n * If you need the underlying data as JSON instead of a rendered report, use `GET /v3/session/{sessionId}/decision/`. For every reportable session of one user in a single document, use `GET /v3/users/{vendor_data}/generate-pdf/`.\n *\n * `GET /v3/session/{sessionId}/generate-pdf/`\n *\n * @param sessionId UUID of the User Verification (KYC) or Business Verification (KYB) session to render - the `session_id` returned by `POST /v3/session/`. The same path works for both session kinds; use the `Content-Disposition` filename on the response to tell which report type you received. **Must be a well-formed, lowercase UUID.** The route only matches valid UUIDs, so a malformed value is rejected by the URL router before any application code runs and the response is a `404` **HTML** page rather than the JSON `{\"detail\": ...}` envelope shown below. The route's UUID converter only matches the canonical lowercase form - uppercase-hex UUIDs are rejected with the HTML 404.\n */\n generatePdf(sessionId: string, options?: RequestOptions): APIPromise<Blob> {\n return this._client.request(SESSIONS_GENERATE_PDF, [sessionId], undefined, options);\n }\n\n /**\n * Redeem a share token to clone a verification session into your application\n *\n * Redeem a share token to clone a KYC or KYB session into the calling application with a fresh `session_id`. Not idempotent - a token redeems once per receiver.\n *\n * `POST /v3/session/import-shared/`\n */\n importShared(\n params: SessionsImportSharedParams,\n options?: RequestOptions,\n ): APIPromise<SessionDecision> {\n return this._client.request(SESSIONS_IMPORT_SHARED, [], params, options);\n }\n\n /**\n * List verification sessions (KYC and/or KYB) with filters and pagination\n *\n * Returns a paginated list of verification sessions for the application identified by your API key, newest first (descending `session_number`).\n *\n * **Canonical URL:** the route is `/v3/sessions/` (trailing slash). Requests to `/v3/sessions` without the slash receive a `301` redirect to the slashed URL with the query string preserved; most HTTP clients follow it transparently on GET.\n *\n * **When to use this endpoint vs webhooks.** Use this endpoint for dashboards, back-office search, reconciliation, and batch exports. Do not poll it to track the progress of individual verifications - configure [webhooks](/integration/webhooks) instead, which push `status.updated` events the moment a session changes. For one session's full result, call `GET /v3/session/{sessionId}/decision/`.\n *\n * **KYC and KYB sessions.** `session_kind` selects which kinds are listed:\n * - `user` (default) - User Verification (KYC) sessions only. Backward-compatible behavior.\n * - `business` - Business Verification (KYB) sessions only. Rows have a different, smaller shape (see the response schema).\n * - `all` - both kinds in one response: the KYC page and the KYB page for the same `limit`/`offset` are concatenated in `results` (KYC rows first), so a page can contain up to `2 x limit` rows. `count` is the sum of both kinds and `next`/`previous` reflect the KYC-side pagination. For strict pagination of mixed data, call `user` and `business` separately.\n *\n * Every row carries a `session_kind` discriminator (`\"user\"` or `\"business\"`).\n *\n * **Pagination.** Standard limit/offset: `limit` (default 50) and `offset` (default 0), with `next`/`previous` ready-made page URLs. For KYC rows `count` is exact. For KYB rows `count` is computed with a bounded scan and is capped at 100 - when there are more than 100 matches it stays at 100, so iterate using `next` (or by checking whether a full page came back) rather than computing total pages from `count`.\n *\n * **Filter semantics.** All filters combine with AND and apply to KYC rows. When `session_kind` is `business` or `all`, the KYB side honors the shared parameters `vendor_data`, `status`, `workflow_id`, `country` (registry-company country code), `date_from`, `date_to`, `search` (company name, registration number - type registration numbers without separators, e.g. `DPC001` not `DPC-001` - vendor_data, session number, or session UUID), `warning`, and `organization_name`; the remaining KYC-only filters are ignored for KYB rows. Comma-separated parameters (`status`, `country`, `document_type`, `region`, `workflow_id`, `document_name`, `warning`, `organization_name`, `session_type`) match any of the listed values (OR within the parameter). `vendor_data` is an exact match - use `search` for partial matching. Unknown values in list filters simply return no rows (no error); malformed typed values (`date_from`, `date_to`, `didit_internal_id`, `api_service`, `session_kind`) return `400` with a per-field error object.\n *\n * **Search.** `search` adapts to the input: a full UUID looks up `session_id`; digits (with optional `+ - . space`) match session-number prefix, document/personal numbers, phone-number prefix, or `vendor_data`; values containing `@` match email prefixes; any other text matches names (accent-insensitive) and `vendor_data`.\n *\n * No fixed per-endpoint rate limit is enforced, but keep list polling infrequent and rely on webhooks for real-time updates.\n *\n * `GET /v3/sessions/`\n */\n list(\n params: SessionsListParams = {},\n options?: RequestOptions,\n ): PagePromise<SessionsListResponse, UserSessionListItem | BusinessSessionListItem> {\n return this._client.requestPage(SESSIONS_LIST, [], params, options);\n }\n\n /**\n * List AML screening history\n *\n * List every completed ongoing-monitoring re-screen of a session's AML check, newest first by `completed_at`, including the runs where nothing changed: alerts, activity entries and webhooks fire only when a result moves, so this history is the evidence that a clean subject was still being screened. Works for KYC and KYB session IDs; pass `node_id` when the session ran more than one AML step. Only ongoing-monitoring re-screens are listed (the first screening is part of the session decision) and runs from before this history existed are not reconstructed, so a session without ongoing monitoring returns an empty list. `count` is exact up to 100 and capped at 100 above that, so follow `next` until it is `null`. A scoped API key needs `decisions: read`; see [Continuous AML monitoring](https://docs.didit.me/core-technology/aml-screening/continuous-monitoring-aml-screening).\n *\n * `GET /v3/session/{sessionId}/aml-screening-history/`\n *\n * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs: the server resolves the ID across both session types. Must be a well-formed UUID; a malformed value does not match the route and returns an HTML `404`.\n */\n listAmlScreeningHistory(\n sessionId: string,\n params: SessionsListAmlScreeningHistoryParams = {},\n options?: RequestOptions,\n ): PagePromise<SessionsListAmlScreeningHistoryResponse, AMLScreeningRun> {\n return this._client.requestPage(\n SESSIONS_LIST_AML_SCREENING_HISTORY,\n [sessionId],\n params,\n options,\n );\n }\n\n /**\n * List session events\n *\n * Read the event timeline of one verification session, newest first by `sent_at`: the screens the user saw, buttons and uploads, failed attempts, status and feature-step changes, and the workflow routing trace. Works for User Verification (KYC) and Business Verification (KYB) session IDs. Events are stored asynchronously, so a new event can take a few seconds to appear. Results are paginated with `limit` and `offset`; follow `next` until it is `null`. A scoped API key needs `sessions: read` and `decisions: read`, and without `media: read` it receives `file_url` as `null`. The routing events are described in [Retrieve session](https://docs.didit.me/sessions-api/retrieve-session).\n *\n * `GET /v3/session/{sessionId}/events/`\n *\n * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs: the server resolves the ID across both session types. Must be a well-formed UUID; a malformed value does not match the route and returns an HTML `404`.\n */\n listEvents(\n sessionId: string,\n params: SessionsListEventsParams = {},\n options?: RequestOptions,\n ): PagePromise<SessionsListEventsResponse, SessionEvent> {\n return this._client.requestPage(SESSIONS_LIST_EVENTS, [sessionId], params, options);\n }\n\n /**\n * List a session's check overrides\n *\n * Every override of an individual feature (step) status on a User Verification (KYC) or Business Verification (KYB) session, newest first and not paginated: applied ones, ones waiting for the person to finish the flow (`pending_until_flow_finishes`) and cancelled ones, each with who asked, their reason, and whether it applied while the person was still in the flow (`forced`).\n *\n * `person_in_flow` tells you whether a new override with `defer_until_flow_finishes: true` would wait. `flow_finished_at` is when the person last finished the flow; it is `null` while they are still in it (a resubmission included) and when the session closed before they finished.\n *\n * Requires the `read:sessions` privilege; a scoped API key needs read access to decisions.\n *\n * `GET /v3/session/{sessionId}/features/overrides/`\n *\n * @param sessionId UUID of the verification session. Accepts both user (KYC) and business (KYB) session IDs.\n */\n listFeatureOverrides(\n sessionId: string,\n options?: RequestOptions,\n ): APIPromise<SessionsListFeatureOverridesResponse> {\n return this._client.request(SESSIONS_LIST_FEATURE_OVERRIDES, [sessionId], undefined, options);\n }\n\n /**\n * List networks for a session\n *\n * List the networks the session's vendor user belongs to. Resolves through the session's vendor_data-linked user.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/sessions/{session_id}/networks/`\n *\n * @param sessionId Session UUID.\n */\n listNetworks(\n sessionId: string,\n options?: RequestOptions,\n ): APIPromise<EntityNetworkMembershipList> {\n return this._client.request(SESSIONS_LIST_NETWORKS, [sessionId], undefined, options);\n }\n\n /**\n * Preview a session's decision email\n *\n * Render the email the person receives when you set a session to `Approved` or `Declined` with `send_email: true`, without changing the session or sending anything. The response shows the subject and HTML exactly as they are sent, the recipient, the sender, the language, and whether confirming the change sends the email at all (`will_be_sent`, `not_sent_reason`).\n *\n * The recipient is the person's own address: the one they verified in an email verification step of the flow, else the one given in `contact_details` when the session was created. The sender is your application's verified sender domain when white label applies (`sender_kind: customer`), else Didit's sender (`sender_kind: didit`).\n *\n * To send exactly what you previewed, call [Update Session Status](/sessions-api/update-status) with the same `new_status`, `send_email: true`, `email_address` set to `recipient`, `email_language` set to `language` and `email_preview_token` set to `preview_token`. The receipt expires after 15 minutes. When the recipient, language, session status, sender or email changed since the preview, the update returns `409` before anything changes; preview again and confirm with the new receipt.\n *\n * Works for User Verification (KYC) and Business Verification (KYB) sessions in `Approved`, `Declined`, `In Review`, `Kyc Expired`, `Abandoned` or `Resubmitted` status. The status check runs before body validation. Requires the `write:sessions` privilege; a scoped API key needs write access to decisions. Responses use `Cache-Control: no-store`: treat them as sensitive verification content.\n *\n * `POST /v3/session/{sessionId}/decision-email-preview/`\n *\n * @param sessionId UUID of the verification session. Accepts both user (KYC) and business (KYB) session IDs.\n */\n previewDecisionEmail(\n sessionId: string,\n params: SessionsPreviewDecisionEmailParams,\n options?: RequestOptions,\n ): APIPromise<SessionsPreviewDecisionEmailResponse> {\n return this._client.request(SESSIONS_PREVIEW_DECISION_EMAIL, [sessionId], params, options);\n }\n\n /**\n * Preview a resubmission email\n *\n * Render the email that would accompany a KYC or KYB resubmission without changing the session, resetting checks, extending its expiry, running checks or sending mail. Requires the `write:sessions` privilege (a scoped API key needs write access to decisions) and a session in `Approved`, `Declined`, `In Review`, `Kyc Expired` or `Abandoned` status. The server validates the selected workflow steps and renders its fixed translated template with the applicable verified white-label sender and branding. The request cannot set a subject, message body or action URL.\n *\n * `email_address` is optional. Without it, the email goes to the person's own address: the one they verified in an email verification step of the flow, else the one given in `contact_details` when the session was created. An address you pass wins (`recipient_source: request`). When no address is known and you pass none, `recipient` and `preview_token` are empty strings and no email can be sent.\n *\n * The response includes the recipient and where it comes from, the sender, subject, HTML, language, resolved steps, whether confirming sends the email (`will_be_sent`, `not_sent_reason`) and a signed `preview_token`. `requires_user_action` is `false` when every selected step runs without the person: the resubmission then finishes on its own and no email goes out (`not_sent_reason: no_user_action`).\n *\n * This preview does not reserve session state or authorize delivery. After reviewing it, call [Update Session Status](/sessions-api/update-status) with `new_status: Resubmitted`, the same `nodes_to_resubmit` and `email_language` you previewed, `send_email: true`, `email_address` set to `recipient` and `email_preview_token` set to `preview_token`. The receipt expires after 15 minutes. When a receipt is supplied, changed inputs, message content, sender or session state return `409` before any mutation or send. Existing integrations may omit the receipt. Regenerate the preview after a conflict. Treat the response as sensitive verification content; responses use `Cache-Control: no-store`. Render HTML in a sandboxed frame, never directly in your application DOM.\n *\n * `POST /v3/session/{sessionId}/resubmission-preview/`\n *\n * @param sessionId UUID of the verification session to update. Accepts both user (KYC) and business (KYB) session IDs - the service resolves the ID across both session types.\n */\n previewResubmission(\n sessionId: string,\n params: SessionsPreviewResubmissionParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsPreviewResubmissionResponse> {\n return this._client.request(SESSIONS_PREVIEW_RESUBMISSION, [sessionId], params, options);\n }\n\n /**\n * Regenerate a Key People party's KYC session\n *\n * Give a Key People party of a Business Verification (KYB) session a new individual KYC session after its previous one was deleted or expired before the person started it, so the Key People check can finish again; send no request body. It works when the party's KYC session was deleted (`kyc_session_deleted: true`) or expired before the person started it (`Expired`, never started). A session still in progress or one that ended in any other status (`Approved`, `Declined`, `In Review`, `Abandoned`, ...) returns `409` unless it was deleted. A party that never had one or a company party always returns `409`. Didit creates a new hosted KYC session with the workflow the party was verified with (its latest published version) or, when that is no longer known, the workflow your Key People settings assign to the party's role, so its link lasts that KYC workflow's session expiration time; it emails the link to the party when an email is on file, clears `is_skipped`, and recomputes the Key People check and the business session status. It then sends a `data.updated` [webhook](https://docs.didit.me/integration/webhooks) for the business session with trigger `console_key_people_regenerate`; to exempt the party instead, use `PATCH /v3/session/{sessionId}/kyb/parties/{partyUuid}/`. A scoped API key needs `decisions: write`, and without `sessions: write` it receives `kyc_session_url` as `null`. Deleted sessions qualify even if the person had already started or finished verification. Imported sessions do not qualify through expiry; they must have been deleted.\n *\n * `POST /v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/`\n *\n * @param sessionId UUID of the parent Business Verification (KYB) session.\n * @param partyUuid UUID of the Key People party (`key_people_checks[].submitted.parties[].uuid` on the business session decision). Must belong to the session referenced by `sessionId`.\n */\n regenerateKybParty(\n sessionId: string,\n partyUuid: string,\n options?: RequestOptions,\n ): APIPromise<KYBKeyPeopleParty> {\n return this._client.request(\n SESSIONS_REGENERATE_KYB_PARTY,\n [sessionId, partyUuid],\n undefined,\n options,\n );\n }\n\n /**\n * Retrieve the full decision for a verification session\n *\n * Retrieve the complete decision report for a verification session - the rolled-up session `status` plus one report per verification feature the workflow executed. This is the canonical read endpoint for both User Verification (KYC) and Business Verification (KYB) sessions: the same path serves both, and the top-level `session_kind` discriminator tells you which shape you received (`\"user\"` or `\"business\"`).\n *\n * **Every feature report is a plural array.** V3 workflows are graphs that can run the same feature more than once, so each block (`id_verifications`, `nfc_verifications`, `liveness_checks`, `face_matches`, `poa_verifications`, `document_ai_documents`, `phone_verifications`, `email_verifications`, `aml_screenings`, `ip_analyses`, `database_validations`, `questionnaire_responses`) is a JSON array whose items each carry a `node_id` identifying the workflow graph node that produced them. Read NFC as `response.nfc_verifications[0]` - never as a singular `nfc` field. A block is `null` until the workflow has run that feature at least once; features the workflow does not include never appear with data. Electronic Signature results are in `signatures`, which is present only when the workflow has an Electronic Signature step.\n *\n * **When to call.** The recommended pattern is event-driven: wait for the `status.updated` webhook that fires when the session reaches a decision (`Approved`, `Declined`, `In Review`), then call this endpoint once to fetch the full report. Polling also works - the endpoint can be called at any point in the session lifecycle and returns the data produced so far - but webhook-then-fetch is cheaper and faster. Media URLs in the response (document images, videos, PDFs) are short-lived presigned links: fetch them promptly or re-request the decision to get fresh ones, and do not persist them as long-term references.\n *\n * **Statuses.** The top-level `status` is the session lifecycle status (`Not Started`, `In Progress`, `Awaiting User`, `In Review`, `Approved`, `Declined`, `Resubmitted`, `Expired`, `Kyc Expired`, `Abandoned`). Each feature item additionally carries its own feature-level `status` (`Not Finished`, `Approved`, `Declined`, `In Review`, ...). A session can be `Approved` overall while an individual feature is `In Review`, depending on the workflow's decision rules.\n *\n * **Authentication and visibility.** Authenticate with the application API key in the `x-api-key` header (a console user Bearer token with the `read:sessions` permission also works). Only sessions owned by the authenticated application are visible. If your workflow restricts response attributes, non-allowed fields inside feature items are returned as `null` while `status`, `warnings`, and `node_id` are always preserved.\n *\n * **Rate limits.** GET requests are limited to 600 per minute per API key. Exceeding the limit returns `429` with `Retry-After` and `X-RateLimit-*` headers.\n *\n * `GET /v3/session/{sessionId}/decision/`\n *\n * @param sessionId UUID of the verification session whose decision you want to retrieve. This is the `session_id` returned by `POST /v3/session/`. The same path works for both User Verification (KYC) and Business Verification (KYB) sessions - the server resolves the id against both session types. **Must be a valid UUID.** The route only matches well-formed UUIDs, so a malformed value is rejected by the URL router before any application code runs and the response is a `404` **HTML** page rather than the JSON `{\"detail\": ...}` envelope shown below. Validate the UUID format client-side so you can distinguish an input error from a genuine missing-session `404`.\n */\n retrieveDecision(\n sessionId: string,\n params: SessionsRetrieveDecisionParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionDecision> {\n return this._client.request(SESSIONS_RETRIEVE_DECISION, [sessionId], params, options);\n }\n\n /**\n * Get a bulk session deletion job\n *\n * Progress of a bulk session deletion that `POST /v3/sessions/delete/` answered with `202` (more than 20 matching sessions, selected by `session_numbers` or with `delete_all`). Poll every few seconds while `status` is `PENDING` or `PROCESSING`; stop when it is `COMPLETED` or `FAILED`.\n *\n * The job reports how many sessions ended in each outcome and how many it has processed, never which sessions it deleted. A `FAILED` job carries the reason in `error`; the sessions it had not reached are still in place, so repeat the deletion request to delete them.\n *\n * **Authentication:** API key in the `x-api-key` header. A job is only visible to the application that created it; any other `job_id` returns `404`. Missing or invalid credentials return `403`; this API never returns `401`.\n *\n * `GET /v3/sessions/delete/{job_id}/`\n *\n * @param jobId The `job_id` returned with the `202` from `POST /v3/sessions/delete/`.\n */\n retrieveDeletionJob(jobId: string, options?: RequestOptions): APIPromise<SessionDeletionJob> {\n return this._client.request(SESSIONS_RETRIEVE_DELETION_JOB, [jobId], undefined, options);\n }\n\n /**\n * Mint a share token for a finished verification session\n *\n * Mint a short-lived JWT that lets a specific Didit application import this finished session. Pair with `POST /v3/session/import-shared/`.\n *\n * `POST /v3/session/{sessionId}/share/`\n *\n * @param sessionId UUID of the source verification session to mint a token for.\n */\n share(\n sessionId: string,\n params: SessionsShareParams,\n options?: RequestOptions,\n ): APIPromise<SessionsShareResponse> {\n return this._client.request(SESSIONS_SHARE, [sessionId], params, options);\n }\n\n /**\n * Simulate a sandbox session's status\n *\n * Force a terminal status on a sandbox session after the fact, from your backend, without running the flow. Sandbox applications only: a live session returns `404`. Works for User Verification (KYC) and Business Verification (KYB) sessions.\n *\n * Set `new_status`, or let `scenario` or `risk` supply it. `risk` (or the first risk the scenario's magic values carry) adds that warning to the session. The change is recorded in the session's activity.\n *\n * `send_webhooks` (default `true`) sends exactly the webhooks a real status change sends. With `false` the status still changes and the console still updates live, but no webhook is logged or sent, the missed-webhook recovery never re-sends that decision, and the next status change sends webhooks as usual. The response echoes the value applied.\n *\n * Requires the `write:sessions` privilege; a scoped API key needs write access to sessions. An unknown `session_id` returns `404` and another application's session returns `403`, both before the body is read; a live session returns `404` only after the body is validated. To simulate from the hosted flow with the session's own token, use `POST /v3/session/{sessionId}/sandbox/simulate/`. See [Sandbox & Test Data](/integration/sandbox-testing) for the scenario catalog.\n *\n * `POST /v3/session/{sessionId}/simulate/`\n *\n * @param sessionId UUID of the sandbox verification session. Accepts both user (KYC) and business (KYB) session IDs.\n */\n simulate(\n sessionId: string,\n params: SessionsSimulateParams = {},\n options?: RequestOptions,\n ): APIPromise<SandboxSimulateResponse> {\n return this._client.request(SESSIONS_SIMULATE, [sessionId], params, options);\n }\n\n /**\n * Update an AML hit review status\n *\n * Set the review status of a **single AML hit** (a potential sanction / PEP / watchlist / adverse-media match) returned by AML screening, without changing the overall session decision. Identify the hit by its `hit_id` (the `id` of an entry in the AML check's `hits` array - see the session decision).\n *\n * `review_status` is one of `Unreviewed`, `Confirmed Match`, `False Positive`, or `Inconclusive`. Reviewer decisions are preserved across ongoing-monitoring updates, so a hit you mark `False Positive` stays that way when the provider re-screens.\n *\n * A successful call fires a `data.updated` webhook and appends an activity entry (with actor attribution) to the session's review trail. For graph workflows with multiple AML checks, pass `node_id` to target a specific check.\n *\n * Authenticate with your API key (`x-api-key`) or a user authorization header - either must carry the `write:sessions` privilege.\n *\n * `PATCH /v3/session/{sessionId}/update-aml-hit-status/`\n *\n * @param sessionId UUID of the verification session. Accepts both user (KYC) and business (KYB) session IDs - the service resolves the ID across both session types.\n */\n updateAmlHitStatus(\n sessionId: string,\n params: SessionsUpdateAmlHitStatusParams,\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateAmlHitStatusResponse> {\n return this._client.request(SESSIONS_UPDATE_AML_HIT_STATUS, [sessionId], params, options);\n }\n\n /**\n * Update an AML check status\n *\n * Set the status of a session's AML screening check as a whole (the `status` of an `aml_screenings[]` entry in the session decision), for example `Approved` after your team cleared every hit. Works for KYC and KYB session IDs; pass `node_id` (query parameter or body field) when the session ran more than one AML step, otherwise the most recent AML check is updated. When the status actually changes, an `AML_STATUS_UPDATED` activity entry is recorded and a `data.updated` [webhook](https://docs.didit.me/integration/webhooks) is sent; sending the current status returns `200` and changes nothing. The session status is not recomputed: use `PATCH /v3/session/{sessionId}/update-status/` for the session decision and `PATCH /v3/session/{sessionId}/update-aml-hit-status/` for single hits. A scoped API key needs `decisions: write`.\n *\n * `PATCH /v3/session/{sessionId}/update-aml-status/`\n *\n * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs: the server resolves the ID across both session types. Must be a well-formed UUID; a malformed value does not match the route and returns an HTML `404`.\n */\n updateAmlStatus(\n sessionId: string,\n params: SessionsUpdateAmlStatusParams,\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateAmlStatusResponse> {\n return this._client.request(SESSIONS_UPDATE_AML_STATUS, [sessionId], params, options);\n }\n\n /**\n * Update KYC data extracted from the ID document on a verification session\n *\n * Correct the identity fields that were extracted (OCR / NFC) from the user's ID document - misread names, dates, document numbers, and so on - after the verification has finished. Typical callers are a compliance analyst working from your own back office, or an automated reconciliation job. Every field in the body is optional: only the keys you send are written, everything else is left untouched (`PATCH` semantics).\n *\n * The session must belong to your application and be in `Approved`, `Declined`, `In Review`, or `Kyc Expired` status. Sessions in any other state (e.g. still `In Progress`) return `404` with `\"No Session matches the given query.\"` - distinct from the `\"Not found.\"` returned for an unknown or deleted `sessionId`. The session must also carry an ID-verification (KYC) record: sessions whose workflow never ran an ID-verification step return `404` (`\"The session does not have a KYC.\"`). For graph workflows with multiple ID-verification steps, target a specific step with `node_id` (query parameter or body field); when omitted, the most recent KYC record is patched.\n *\n * Two derived fields are recomputed on every call: `full_name` (from `first_name` + `last_name`) and `issuing_state_name` (from `issuing_state`). If the free-text `address` changes, the server may also re-geocode it and refresh `parsed_address` (skipped for sandbox sessions). `extra_fields` and `parsed_address` are merged key-by-key rather than replaced - see the per-field descriptions for the `null`-to-delete semantics.\n *\n * Submitting at least one valid field fires the `data.updated` [webhook](/integration/webhooks) (trigger `manual_review`) - even when the submitted values equal the stored ones. When values actually change, a `KYC_DATA_UPDATED` activity entry recording the changed fields with previous and new values is appended to the session's `reviews`, visible in [Get Decision](#get-/v3/session/-sessionId-/decision/) and the console activity timeline. The session's status and decision are **not** re-evaluated - use [Update Status](#patch-/v3/session/-sessionId-/update-status/) to change the outcome. An empty JSON body (`{}`) is accepted and simply returns the current KYC data without firing the webhook.\n *\n * Accepts an API key or a console user token; either way the credential needs the `write:sessions` permission. Authentication and permission failures both return `403` - this API never responds `401`. Note that the session lookup runs before credential checks, so an unknown `sessionId` returns `404` even with missing credentials. This endpoint has a dedicated rate limit of 10 requests per minute per API key (invalid requests count too); the shared write budget of 300 requests per minute also applies.\n *\n * `PATCH /v3/session/{sessionId}/update-data/`\n *\n * @param sessionId UUID of the User Verification (KYC) session whose extracted document data you are correcting. Business (KYB) session IDs are not valid here - for company data use [Update KYB Company Data](#patch-/v3/session/-sessionId-/kyb/-companyUuid-/update-data/).\n */\n updateData(\n sessionId: string,\n params: SessionsUpdateDataParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateDataResponse> {\n return this._client.request(SESSIONS_UPDATE_DATA, [sessionId], params, options);\n }\n\n /**\n * Update a Document AI document\n *\n * Correct the fields Document AI extracted from one uploaded document, set its review status, or both, on a KYC or KYB session. `extracted_data` must be a JSON object and is merged key by key: a key you send replaces the stored value (a key sent as `null` is stored as `null`) and keys you leave out keep their values. The document status feeds the Document AI result of its workflow node in the session decision; the session status itself is not recomputed. Every successful call, including one that changes nothing, sends a `data.updated` [webhook](https://docs.didit.me/integration/webhooks) with trigger `manual_review`. A scoped API key needs `decisions: write`; see [Document AI](https://docs.didit.me/core-technology/document-ai/overview).\n *\n * `PATCH /v3/document-ai/{sessionId}/documents/{documentUuid}/`\n *\n * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs: the server resolves the ID across both session types. Must be a well-formed UUID; a malformed value does not match the route and returns an HTML `404`.\n * @param documentUuid UUID of the Document AI document (`document_ai_documents[].items[].uuid` in `GET /v3/session/{sessionId}/decision/`). It must belong to the session in the path.\n */\n updateDocumentAiData(\n sessionId: string,\n documentUuid: string,\n params: SessionsUpdateDocumentAiDataParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateDocumentAiDataResponse> {\n return this._client.request(\n SESSIONS_UPDATE_DOCUMENT_AI_DATA,\n [sessionId, documentUuid],\n params,\n options,\n );\n }\n\n /**\n * Update an individual feature (step) status\n *\n * Set the status of a single verification feature (step) within a session. Target the feature by its workflow graph `nodeId`. On non-graph workflows, whose steps have no node, use `default` and also pass `feature_type` to say which step you mean.\n *\n * Works for both User Verification (KYC) and Business Verification (KYB) sessions and every step type: ID/OCR, Liveness, Face Match, NFC, AML, Proof of Address, Phone, Email, Database Validation, Questionnaire, and the KYB registry / documents / key-people checks. This endpoint is **not** available for standalone API sessions (`session_type = API`).\n *\n * `new_status` must be one of `Approved`, `Declined`, or `In Review`, and must differ from the feature's current status.\n *\n * **When the override applies.** Without `defer_until_flow_finishes` (or with `false`) the override applies at once, as it always did; when the person is still in the flow it is recorded as `forced`. With `defer_until_flow_finishes: true` while the person is still in the flow (the session is `Not Started`, `In Progress` or `Resubmitted` and has not finished), the override is stored as `pending_until_flow_finishes` and applies when the flow finishes, after the flow reaches its own decision. On a session whose flow already ended it applies at once either way. A waiting override is cancelled instead when the person redoes its step before finishing, when a newer override on the same check replaces it, when the session leaves the flow unfinished (abandoned, expired, or decided mid-flow), or when you cancel it with `POST /v3/session/{sessionId}/features/overrides/{overrideId}/cancel/`. List a session's overrides with `GET /v3/session/{sessionId}/features/overrides/`.\n *\n * **Effect on the session.** A session that already has a decision keeps it: only the check changes. When the session has no decision yet and its workflow is waiting on exactly this step, applying the override completes the step: the workflow moves on, later steps run, and a status node can set the session decision and fire `status.updated`.\n *\n * **Webhooks and activity.** A `data.updated` webhook fires when the override applies (at once, or when the flow finishes), never while it waits or when it is cancelled. Every override is recorded in the session's activity as `FEATURE_OVERRIDE_PENDING`, `FEATURE_OVERRIDE_APPLIED` or `FEATURE_OVERRIDE_CANCELLED`, with who made it; the request's entry carries your `comment`.\n *\n * Authenticate with your API key (`x-api-key`) or a user authorization header carrying the `write:sessions` privilege; a scoped API key needs write access to decisions.\n *\n * `PATCH /v3/session/{sessionId}/features/{nodeId}/update-status/`\n *\n * @param sessionId UUID of the verification session. Accepts both user (KYC) and business (KYB) session IDs - the service resolves the ID across both session types.\n * @param nodeId Workflow graph node ID of the feature to update (for example `feature_ocr_1`). Use the literal value `default` for non-graph (single-step) workflows where the feature has no node ID.\n */\n updateFeatureStatus(\n sessionId: string,\n nodeId: string,\n params: SessionsUpdateFeatureStatusParams,\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateFeatureStatusResponse> {\n return this._client.request(\n SESSIONS_UPDATE_FEATURE_STATUS,\n [sessionId, nodeId],\n params,\n options,\n );\n }\n\n /**\n * Update registry-extracted company data on a Business Verification (KYB) session\n *\n * Correct the registry-extracted company data on a Business Verification (KYB) session - company name, registration number, addresses, status, contact details - identified by `companyUuid`. Typical callers are a compliance analyst fixing a registry misread, or your back office syncing corrected company data. Every field in the body is optional (`PATCH` semantics); an empty JSON body (`{}`) is a no-op that simply echoes the current company record.\n *\n * Edits are written in two places at once: fields with a canonical company column (name, registration number, country, incorporation date, tax number, type, statuses, capital fields (`registered_capital`, `registered_capital_amount`, `registered_capital_currency`), alternative names, nature of business, website, email, phone, LEI, location, and `legal_address` → `registered_address`) update that column, and **every** submitted key is also merged into the `registry_data` snapshot (dates as ISO strings) so the \"extracted from registry\" view reflects the correction. Fields without a column - `region`, `registration_date`, `dissolution_date`, `control_scheme` - land in `registry_data` only. `user_provided_data` (what the end user confirmed in the hosted flow) is never touched, and `last_console_edit_at` is stamped on every non-empty PATCH.\n *\n * Unlike the KYC/POA update endpoints, there is **no session-status gate**: the company can be edited at any point in the business session's lifecycle. The company must belong to the session in the path (`404` with `\"KYB company does not belong to the given session.\"` otherwise) and to your application. Every non-empty PATCH fires the `data.updated` [webhook](/integration/webhooks) on the business session (trigger `console_registry_edit`) - even when the submitted values equal the stored ones. The session's status and decision are **not** re-evaluated, and no review/audit entry is recorded.\n *\n * Accepts an API key or a console user token; either way the credential needs the `write:businesses` permission. Authentication and permission failures both return `403` - this API never responds `401`. Note that the session lookup runs before credential checks, so an unknown `sessionId` returns `404` even with missing credentials. The shared write budget of 300 requests per minute per API key applies.\n *\n * For User Verification sessions, the KYC counterpart is `PATCH /v3/session/{sessionId}/update-data/`; to change the session decision itself use `PATCH /v3/session/{sessionId}/update-status/`.\n *\n * `PATCH /v3/session/{sessionId}/kyb/{companyUuid}/update-data/`\n *\n * @param sessionId UUID of the parent Business Verification (KYB) session.\n * @param companyUuid UUID of the company record to update (`registry_checks[].company.uuid` on the business session decision). Must belong to the session referenced by `sessionId`.\n */\n updateKybCompanyData(\n sessionId: string,\n companyUuid: string,\n params: SessionsUpdateKybCompanyDataParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateKybCompanyDataResponse> {\n return this._client.request(\n SESSIONS_UPDATE_KYB_COMPANY_DATA,\n [sessionId, companyUuid],\n params,\n options,\n );\n }\n\n /**\n * Skip (or re-require) a Key People party on a Business Verification (KYB) session\n *\n * Exempt a Key People party from verification, or put it back in scope. This is the operator escape hatch for a party that can never finish its own check - most often because the individual KYC session handed to a UBO or director was deleted, which freezes that child's status and leaves the KYB parked in `Awaiting User` with nothing left that could move it.\n *\n * Setting `is_skipped: true` drops the party out of the Key People aggregation and immediately recomputes the `KYBKeyPeopleCheck` and the parent session status, so the business session can settle and then be approved or declined. Sending `is_skipped: false` puts the party back in scope and the check goes back to waiting on it.\n *\n * Unlike the applicant-facing skip in the hosted Key People screen, this endpoint is **not** gated by the role's `allow_skip` setting - that flag limits what the applicant may decide, not what your analyst may override. `requires_verification` is deliberately left untouched, so an overridden party reads as `requires_verification: true` **and** `is_skipped: true` and the record still shows what the rules asked for.\n *\n * The party must belong to the session in the path (`404` with `\"Party does not belong to the given session.\"` otherwise) and to your application. A PATCH that actually changes the flag fires the `data.updated` [webhook](/integration/webhooks) on the business session with trigger `console_key_people_skip`; a PATCH that sets the flag to its current value is a no-op that echoes the party back.\n *\n * Accepts an API key or a console user token; either way the credential needs the `write:businesses` permission.\n *\n * `PATCH /v3/session/{sessionId}/kyb/parties/{partyUuid}/`\n *\n * @param sessionId UUID of the parent Business Verification (KYB) session.\n * @param partyUuid UUID of the Key People party to update (`key_people_checks[].submitted.parties[].uuid` on the business session decision). Must belong to the session referenced by `sessionId`.\n */\n updateKybParty(\n sessionId: string,\n partyUuid: string,\n params: SessionsUpdateKybPartyParams,\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateKybPartyResponse> {\n return this._client.request(SESSIONS_UPDATE_KYB_PARTY, [sessionId, partyUuid], params, options);\n }\n\n /**\n * Update Proof of Address data extracted from the POA document on a verification session\n *\n * Correct the fields extracted from the user's Proof of Address document - utility bill, bank statement, or other address evidence - after the verification has finished: issuer, dates, the printed name, the address itself, and banking details. Every field in the body is optional: only the keys you send are written, everything else is left untouched (`PATCH` semantics).\n *\n * The session must belong to your application and be in `Approved`, `Declined`, `In Review`, or `Kyc Expired` status. Sessions in any other state (e.g. still `In Progress`) return `404` with `\"No Session matches the given query.\"` - distinct from the `\"Not found.\"` returned for an unknown or deleted `sessionId`. The session must also carry a POA record: sessions whose workflow never ran a Proof of Address step return `404` (`\"The session does not have a POA.\"`). For graph workflows with multiple POA steps, target a specific step with `node_id` (query parameter or body field); when omitted, the most recent POA record is patched.\n *\n * `extra_fields` is merged key-by-key: nine known keys (`bank_iban`, `additional_names`, …) write through to dedicated POA columns, any other key is kept as a custom extra, and `null` / `\"\"` deletes a key. `poa_parsed_address` accepts only the seven documented keys and recomputes `formatted_address` / `poa_formatted_address` after every edit. If the free-text `poa_address` changes, the server may also re-geocode it and refresh the structured address (skipped for sandbox sessions).\n *\n * Unlike the KYC variant of this endpoint, the `data.updated` [webhook](/integration/webhooks) (trigger `manual_review`) fires only when at least one stored value **actually changed** - re-sending identical values is a silent no-op. When values change, a `POA_DATA_UPDATED` activity entry recording the changed fields with previous and new values is appended to the session's `reviews`, visible in [Get Decision](#get-/v3/session/-sessionId-/decision/) and the console activity timeline. The session's status and decision are **not** re-evaluated - use [Update Status](#patch-/v3/session/-sessionId-/update-status/) to change the outcome.\n *\n * Accepts an API key or a console user token; either way the credential needs the `write:sessions` permission. Authentication and permission failures both return `403` - this API never responds `401`. Note that the session lookup runs before credential checks, so an unknown `sessionId` returns `404` even with missing credentials. This endpoint has a dedicated rate limit of 10 requests per minute per API key (invalid requests count too); the shared write budget of 300 requests per minute also applies.\n *\n * An empty JSON body `{}` is a no-op: it returns `200` echoing the current POA record without firing the webhook (`has_changes` stays false).\n *\n * `PATCH /v3/session/{sessionId}/update-poa-data/`\n *\n * @param sessionId UUID of the User Verification (KYC) session whose attached POA record you are correcting.\n */\n updatePoaData(\n sessionId: string,\n params: SessionsUpdatePoaDataParams = {},\n options?: RequestOptions,\n ): APIPromise<SessionsUpdatePoaDataResponse> {\n return this._client.request(SESSIONS_UPDATE_POA_DATA, [sessionId], params, options);\n }\n\n /**\n * Approve, decline, or request resubmission for a verification session\n *\n * Manually override the final decision of a KYC or KYB verification session. Set `new_status` to `Approved` or `Declined` to record a manual decision, or to `Resubmitted` to clear specific verification steps and let the user redo them through the same verification URL. The endpoint accepts both user (KYC) and business (KYB) session IDs.\n *\n * Call it once a session has reached a reviewable state: the current status must be `Approved`, `Declined`, `In Review`, `Kyc Expired`, `Abandoned`, or `Resubmitted`. Sessions that are still `Not Started`, `In Progress`, or `Awaiting User`, or that ended as `Expired`, return `400`. Your API key needs the `write:sessions` permission (a scoped API key needs write access to decisions). The eligible-state check runs before body validation, so an ineligible session returns the `Wrong Current Status` error even when the payload is also invalid.\n *\n * For `Resubmitted`, pass `nodes_to_resubmit` to choose which workflow steps the user must redo, or omit it to auto-select existing feature attempts in a resubmittable state (`Declined`, `In Review`, `Not Finished`, `Expired`). Never-attempted features are not auto-selected: list them explicitly in `nodes_to_resubmit`, or the request returns `400` when no recorded attempt needs resubmission. The selected steps' previous results move to the resubmission's history (returned by Get Decision with `include=resubmissions`), the steps are reordered to match the workflow graph, the session's expiration window restarts, and the original verification URL becomes usable again. Backend-only steps (`AML`, `DATABASE_VALIDATION`, `IP_ANALYSIS`) at the head of the list run immediately without user interaction; if every resubmitted step is backend-only, the session re-finalizes within the same request. `KYB_REGISTRY` and `KYB_KEY_PEOPLE` cannot be resubmitted directly: resubmit the relevant child KYC sessions instead and the parent business session recomputes automatically.\n *\n * Every call that changes the status fires the `status.updated` [webhook](/integration/webhooks) once the change commits and appends an activity entry (with actor attribution and your `comment`) to the session's `reviews`, visible in [Get Decision](#get-/v3/session/-sessionId-/decision/) and in the console activity timeline. The user-profile aggregates linked to the session's `vendor_data` update as well. Declining disables ongoing AML monitoring for the session; re-approving re-enables it (from `Resubmitted`, `Declined`, or `Kyc Expired`) when the workflow has monitoring turned on. Approving or declining a child KYC that belongs to a KYB key-people check recomputes the parent business session's status. Set `send_email: true` (with `email_address`) to notify the user: a status notice for `Approved`/`Declined`, or a resubmission email containing the verification link and per-step reasons for `Resubmitted`. To check the email first, preview it with [Preview Decision Email](/sessions-api/preview-decision-email) (`Approved`, `Declined`) or [Preview Resubmission Email](/sessions-api/preview-resubmission) (`Resubmitted`) and pass its `preview_token` as `email_preview_token`: the update then sends exactly the previewed email, or returns `409` before changing anything when the email or the session changed since the preview or the receipt is older than 15 minutes.\n *\n * Repeating `Approved` or `Declined` on a session that already has that status changes nothing and returns `200`: no webhook, no activity entry and no email. Repeating `Resubmitted` returns `400` (`The new status is the same as the current status.`). Missing or invalid credentials and missing permissions return `403`; an expired scoped API key returns `401`.\n *\n * `PATCH /v3/session/{sessionId}/update-status/`\n *\n * @param sessionId UUID of the verification session to update. Accepts both user (KYC) and business (KYB) session IDs - the service resolves the ID across both session types.\n */\n updateStatus(\n sessionId: string,\n params: SessionsUpdateStatusParams,\n options?: RequestOptions,\n ): APIPromise<SessionsUpdateStatusResponse> {\n return this._client.request(SESSIONS_UPDATE_STATUS, [sessionId], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n EntityNetworkMembershipList,\n TransactionDetail,\n TransactionNote,\n TransactionRuleBacktestResult,\n TransactionRuleDetail,\n TransactionRuleInstallResult,\n TransactionRuleLibraryEntry,\n TransactionSummary,\n TravelRuleMessage,\n TravelRuleTestVaspInboundResponse,\n TravelRuleTransferDetail,\n} from \"../types/components.js\";\nimport type {\n TransactionsBatchDeleteParamsAllTransactions,\n TransactionsBatchDeleteParamsSelectedTransactions,\n TransactionsCreateParams,\n TransactionsCreateSdkTokenParams,\n TransactionsCreateSdkTokenResponse,\n TransactionsListParams,\n TransactionsListRelatedParams,\n TransactionsListRelatedResponse,\n TransactionsListResponse,\n TransactionsListResponseResults,\n TransactionsNotesCreateParams,\n TransactionsNotesListParams,\n TransactionsNotesListResponse,\n TransactionsRulesBacktestParams,\n TransactionsRulesCreateParams,\n TransactionsRulesInstallLibraryParams,\n TransactionsRulesListLibraryParams,\n TransactionsRulesListLibraryResponse,\n TransactionsRulesListParams,\n TransactionsRulesListResponse,\n TransactionsRulesUninstallLibraryParams,\n TransactionsRulesUpdateParams,\n TransactionsTravelRuleConfirmOwnershipParams,\n TransactionsTravelRuleCreateMessageParams,\n TransactionsTravelRuleTriggerTestVaspInboundParams,\n TransactionsTravelRuleUpdateTransferParams,\n} from \"../types/transactions.js\";\n\nconst TRANSACTIONS_NOTES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/{transaction_id}/notes/\",\n body: \"json\",\n dates: \"TransactionNote\",\n};\nconst TRANSACTIONS_NOTES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/{transaction_id}/notes/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"TransactionNote\" } } },\n};\nconst TRANSACTIONS_RULES_BACKTEST: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/rules/backtest/\",\n body: \"json\",\n};\nconst TRANSACTIONS_RULES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/rules/\",\n body: \"json\",\n dates: \"TransactionRuleDetail\",\n};\nconst TRANSACTIONS_RULES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/transactions/rules/{rule_uuid}/\",\n response: \"none\",\n};\nconst TRANSACTIONS_RULES_INSTALL_LIBRARY: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/rules/install/\",\n body: \"json\",\n};\nconst TRANSACTIONS_RULES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/rules/\",\n query: [\"source\", \"category\", \"mode\", \"bundle\", \"search\", \"ordering\", \"limit\", \"offset\"],\n dates: { p: { results: { i: \"TransactionRuleDetail\" } } },\n};\nconst TRANSACTIONS_RULES_LIST_LIBRARY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/rules/library/\",\n query: [\"bundle\", \"category\", \"search\", \"limit\", \"offset\"],\n};\nconst TRANSACTIONS_RULES_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/rules/{rule_uuid}/\",\n dates: \"TransactionRuleDetail\",\n};\nconst TRANSACTIONS_RULES_UNINSTALL_LIBRARY: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/transactions/rules/install/\",\n body: \"json\",\n};\nconst TRANSACTIONS_RULES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/transactions/rules/{rule_uuid}/\",\n body: \"json\",\n dates: \"TransactionRuleDetail\",\n};\nconst TRANSACTIONS_TRAVEL_RULE_CONFIRM_OWNERSHIP: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/{transaction_id}/travel-rule/ownership/\",\n body: \"json\",\n dates: \"TravelRuleTransferDetail\",\n};\nconst TRANSACTIONS_TRAVEL_RULE_CREATE_MESSAGE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/{transaction_id}/travel-rule/messages/\",\n body: \"json\",\n dates: \"TravelRuleMessage\",\n};\nconst TRANSACTIONS_TRAVEL_RULE_LIST_MESSAGES: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/{transaction_id}/travel-rule/messages/\",\n dates: { i: \"TravelRuleMessage\" },\n};\nconst TRANSACTIONS_TRAVEL_RULE_TRIGGER_TEST_VASP_INBOUND: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/test-vasp/inbound/\",\n body: \"json\",\n dates: \"TravelRuleTestVaspInboundResponse\",\n};\nconst TRANSACTIONS_TRAVEL_RULE_UPDATE_TRANSFER: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/transactions/{transaction_id}/travel-rule/\",\n body: \"json\",\n dates: \"TravelRuleTransferDetail\",\n};\nconst TRANSACTIONS_BATCH_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/transactions/delete/\",\n scope: \"application\",\n body: \"whole\",\n response: \"none\",\n};\nconst TRANSACTIONS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/\",\n body: \"json\",\n dates: \"TransactionDetail\",\n};\nconst TRANSACTIONS_CREATE_SDK_TOKEN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/transactions/sdk-token/\",\n body: \"json\",\n dates: { p: { expires_at: 1 } },\n};\nconst TRANSACTIONS_GENERATE_PDF: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/\",\n scope: \"application\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst TRANSACTIONS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/\",\n query: [\"limit\", \"offset\", \"travel_rule_status\"],\n dates: {\n p: {\n results: { i: { p: { txn_date: 1, created_at: 1, travel_rule: \"TransactionTravelRule\" } } },\n },\n },\n};\nconst TRANSACTIONS_LIST_NETWORKS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/networks/\",\n scope: \"application\",\n dates: \"EntityNetworkMembershipList\",\n};\nconst TRANSACTIONS_LIST_PARTY_NETWORKS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/parties/{transaction_party_uuid}/networks/\",\n scope: \"application\",\n dates: \"EntityNetworkMembershipList\",\n};\nconst TRANSACTIONS_LIST_RELATED: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/{transaction_id}/related/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"TransactionSummary\" } } },\n};\nconst TRANSACTIONS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/transactions/{transaction_id}/\",\n dates: \"TransactionDetail\",\n};\n\n/** `transactions.notes` */\nexport class TransactionsNotes extends APIResource {\n /**\n * Create transaction note\n *\n * Add a plain-text note to a monitored transaction's review timeline, where Console reviewers see it. A note is context, not a decision: the transaction's `status`, `score` and alerts do not change, no webhook is sent, and nothing is billed. The transaction's `activities` gain a `TRANSACTION_NOTE_ADDED` entry.\n *\n * Notes created with an API key have no author: `actor_email` and `actor_name` are `null`, so put the author in the text if you need it. Every address in `mentioned_emails` must belong to a member of your organization, otherwise the whole request fails with `400`; mentions are stored lower-cased and de-duplicated, and this endpoint does not notify the mentioned members.\n *\n * Each call creates a new note, so retrying a timed-out request can add it twice: list the notes before retrying. There is no API endpoint to edit or remove a note. A scoped API key needs `transactions: write`; a key limited to some workflows or to approved sessions cannot call this endpoint.\n *\n * `POST /v3/transactions/{transaction_id}/notes/`\n *\n * @param transactionId Didit transaction UUID: the `uuid` returned by `POST /v3/transactions/` and `GET /v3/transactions/`. Your own `txn_id` is not accepted.\n */\n create(\n transactionId: string,\n params: TransactionsNotesCreateParams,\n options?: RequestOptions,\n ): APIPromise<TransactionNote> {\n return this._client.request(TRANSACTIONS_NOTES_CREATE, [transactionId], params, options);\n }\n\n /**\n * List transaction notes\n *\n * List the notes on one monitored transaction, newest first (`created_at` descending): notes you add through the API, notes and status changes reviewers make in the Console, and notes Didit adds automatically (a rule's `add_note` action, or a problem creating the user-action verification session), which carry `actor_name` `Rule Engine`. `metadata` tells the note types apart.\n *\n * Paginated with `limit` and `offset`. `count` is exact up to 100 and capped at 100 above that, so follow `next` until it is `null` instead of computing pages from `count`. This is a read with no side effects.\n *\n * A scoped API key needs `transactions: read`; a key limited to some workflows or to approved sessions cannot call this endpoint. Reviewers see the same list under **Notes** on the [transaction detail](https://docs.didit.me/transaction-monitoring/console#transaction-detail).\n *\n * `GET /v3/transactions/{transaction_id}/notes/`\n *\n * @param transactionId Didit transaction UUID: the `uuid` returned by `POST /v3/transactions/` and `GET /v3/transactions/`. Your own `txn_id` is not accepted.\n */\n list(\n transactionId: string,\n params: TransactionsNotesListParams = {},\n options?: RequestOptions,\n ): PagePromise<TransactionsNotesListResponse, TransactionNote> {\n return this._client.requestPage(TRANSACTIONS_NOTES_LIST, [transactionId], params, options);\n }\n}\n\n/** `transactions.rules` */\nexport class TransactionsRules extends APIResource {\n /**\n * Backtest rule configuration\n *\n * Evaluate a hypothetical rule configuration against your recent transactions (most recent first, up to the backtest cap) without creating a rule or touching any transaction. Use it before activating a rule to see how often it would have matched and how many subjects it would have affected.\n *\n * `POST /v3/transactions/rules/backtest/`\n */\n backtest(\n params: TransactionsRulesBacktestParams = {},\n options?: RequestOptions,\n ): APIPromise<TransactionRuleBacktestResult> {\n return this._client.request(TRANSACTIONS_RULES_BACKTEST, [], params, options);\n }\n\n /**\n * Create rule\n *\n * Create a CUSTOM transaction-monitoring rule. Titles are unique per application (duplicate -> 400). A `change_status` action targeting `AWAITING_USER` must carry `workflow_id`. Rules created in ACTIVE mode apply to new transactions immediately - the recommended workflow is create in TEST mode, backtest, then switch mode to ACTIVE.\n *\n * `POST /v3/transactions/rules/`\n */\n create(\n params: TransactionsRulesCreateParams,\n options?: RequestOptions,\n ): APIPromise<TransactionRuleDetail> {\n return this._client.request(TRANSACTIONS_RULES_CREATE, [], params, options);\n }\n\n /**\n * Delete rule\n *\n * Delete a CUSTOM rule. Deletion is immediate and permanent: the rule stops evaluating for new transactions and disappears from listings, while past rule runs on already-evaluated transactions keep their recorded results. Library rules cannot be deleted - uninstall them via the install endpoint instead (they can always be reinstalled from the library).\n *\n * `DELETE /v3/transactions/rules/{rule_uuid}/`\n *\n * @param ruleUuid The rule's uuid from list or create.\n */\n delete(ruleUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(TRANSACTIONS_RULES_DELETE, [ruleUuid], undefined, options);\n }\n\n /**\n * Install library rules\n *\n * Install one or more presets onto the application, by `library_keys` or a whole `bundle`. An installed preset is active at once while transaction monitoring is on, and disabled otherwise; already-installed keys are skipped. A library rule whose conditions read data the rules engine cannot evaluate yet is withheld until it can run. A request that names one in `library_keys` answers 400 and installs nothing (\"These library rules cannot run yet: their conditions read data the rules engine cannot evaluate.\" followed by the keys), and a `bundle` install skips it. A withheld rule comes back on its own once its conditions can be evaluated. A `library_keys` entry that is not in the library is skipped, not refused.\n *\n * `POST /v3/transactions/rules/install/`\n */\n installLibrary(\n params: TransactionsRulesInstallLibraryParams = {},\n options?: RequestOptions,\n ): APIPromise<TransactionRuleInstallResult> {\n return this._client.request(TRANSACTIONS_RULES_INSTALL_LIBRARY, [], params, options);\n }\n\n /**\n * List rules\n *\n * List the application's transaction-monitoring rules: your custom rules plus any library presets you have installed. Filter by source, category, mode, bundle or free-text search; order with `ordering` (run_count, approved_pct, reviewed_pct, declined_pct, latest_triggered_at, title, created_at, source, each with an optional `-` prefix).\n *\n * `GET /v3/transactions/rules/`\n */\n list(\n params: TransactionsRulesListParams = {},\n options?: RequestOptions,\n ): PagePromise<TransactionsRulesListResponse, TransactionRuleDetail> {\n return this._client.requestPage(TRANSACTIONS_RULES_LIST, [], params, options);\n }\n\n /**\n * List rule library\n *\n * Browse the full preset rule library (150+ rules) with each entry's complete configuration and an `is_installed` flag for this application. Filter by bundle, category, or free-text search. A library rule whose conditions read data the rules engine cannot evaluate yet is withheld until it can run. Withheld rules are not listed.\n *\n * `GET /v3/transactions/rules/library/`\n */\n listLibrary(\n params: TransactionsRulesListLibraryParams = {},\n options?: RequestOptions,\n ): PagePromise<TransactionsRulesListLibraryResponse, TransactionRuleLibraryEntry> {\n return this._client.requestPage(TRANSACTIONS_RULES_LIST_LIBRARY, [], params, options);\n }\n\n /**\n * Get rule\n *\n * Retrieve one rule with its full configuration and execution counters.\n *\n * `GET /v3/transactions/rules/{rule_uuid}/`\n *\n * @param ruleUuid The rule's uuid from list or create.\n */\n retrieve(ruleUuid: string, options?: RequestOptions): APIPromise<TransactionRuleDetail> {\n return this._client.request(TRANSACTIONS_RULES_RETRIEVE, [ruleUuid], undefined, options);\n }\n\n /**\n * Uninstall library rules\n *\n * Remove installed presets from the application, by `library_keys` or a whole `bundle`. Uninstalled presets stop evaluating immediately and can be reinstalled from the library at any time.\n *\n * `DELETE /v3/transactions/rules/install/`\n */\n uninstallLibrary(\n params: TransactionsRulesUninstallLibraryParams = {},\n options?: RequestOptions,\n ): APIPromise<TransactionRuleInstallResult> {\n return this._client.request(TRANSACTIONS_RULES_UNINSTALL_LIBRARY, [], params, options);\n }\n\n /**\n * Update rule\n *\n * Partially update a rule. Custom rules accept every configuration field. Library (PRESET) rules accept only `mode` - use it to activate, disable, or switch a preset to TEST; any other field returns 400. An installed copy of a withheld library rule is switched off: setting its `mode` to anything but `DISABLED` answers 400 (\"This library rule cannot run yet: its conditions read data the rules engine cannot evaluate.\").\n *\n * `PATCH /v3/transactions/rules/{rule_uuid}/`\n *\n * @param ruleUuid The rule's uuid from list or create.\n */\n update(\n ruleUuid: string,\n params: TransactionsRulesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<TransactionRuleDetail> {\n return this._client.request(TRANSACTIONS_RULES_UPDATE, [ruleUuid], params, options);\n }\n}\n\n/** `transactions.travel_rule` */\nexport class TransactionsTravelRule extends APIResource {\n /**\n * Confirm or deny wallet ownership\n *\n * Resolve a transfer that waits on wallet ownership: call it on your own side of the transfer when it is UNCONFIRMED_OWNERSHIP, or when it is an inbound transfer in ON_HOLD. Confirming marks the matching wallet address book entry as ownership-verified (for an inbound ON_HOLD transfer with no entry, Didit creates one from beneficiary_data.wallet_address) and runs the beneficiary name match on both sides of the transfer; denying declines both sides. An inbound transfer whose deposit already settled moves on to FINISHED when the match succeeds. When the counterparty wallet was declared self-hosted (counterparty.payment_method.method_type: unhosted_wallet), confirming records that the customer verified who controls that wallet and completes the transfer (COMPLETED) in both directions, or FINISHED for an inbound deposit whose on-chain hash is already known. The wallet verified is the counterparty's: the destination of an outbound withdrawal, or the source (originator's wallet) of an inbound deposit. If it is not in your wallet address book yet, Didit adds it as ownership-verified under the counterparty's name; if the book already holds it under a different holder name, the transfer moves to COUNTERPARTY_MISMATCHED_DATA. For an inbound TRP transfer in UNCONFIRMED_OWNERSHIP, ON_HOLD or COUNTERPARTY_MISMATCHED_DATA, Didit sends your decision to the originating VASP instead: approving returns the payment address (wallet_address, or the matched entry's address) and moves the transfer to COMPLETED, and denying declines it. The same call also decides an inbound transfer that a GTR or Sygna Bridge counterparty sent and that waits for your review (`UNCONFIRMED_OWNERSHIP`, `ON_HOLD` or `COUNTERPARTY_MISMATCHED_DATA`): `confirmed: true` approves it (pass `wallet_address` when the transfer names none) and `confirmed: false` declines it, and the network is answered after the response, with retries. VerifyVASP takes its answer when it asks, so a VerifyVASP transfer that would need your review is declined at once and cannot be decided later.\n *\n * `POST /v3/transactions/{transaction_id}/travel-rule/ownership/`\n *\n * @param transactionId Didit-stable UUID of the transaction your application holds for this transfer: the beneficiary side's transaction on an INTERNAL-rail transfer, or the transaction you created (outbound or inbound) when the counterparty wallet was declared self-hosted.\n */\n confirmOwnership(\n transactionId: string,\n params: TransactionsTravelRuleConfirmOwnershipParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleTransferDetail> {\n return this._client.request(\n TRANSACTIONS_TRAVEL_RULE_CONFIRM_OWNERSHIP,\n [transactionId],\n params,\n options,\n );\n }\n\n /**\n * Send a Travel Rule message or document request\n *\n * Sends a message or a document request to the counterparty VASP. Works on INTERNAL transfers (the other Didit customer sees it on its side of the pair) and EMAIL transfers (the counterparty is emailed and answers in the pickup portal). A transfer over TRP, GTR, TRUST, VerifyVASP or Sygna carries no messages, because those protocols have none. Limits: 100 messages per transfer, 5000 characters per body, 10 requested documents, 5 files of 10 MB each.\n *\n * `POST /v3/transactions/{transaction_id}/travel-rule/messages/`\n *\n * @param transactionId Didit-stable transaction UUID that owns the transfer.\n */\n createMessage(\n transactionId: string,\n params: TransactionsTravelRuleCreateMessageParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleMessage> {\n return this._client.request(\n TRANSACTIONS_TRAVEL_RULE_CREATE_MESSAGE,\n [transactionId],\n params,\n options,\n );\n }\n\n /**\n * List Travel Rule messages\n *\n * Messages and document requests exchanged with the counterparty VASP about this transfer.\n *\n * `GET /v3/transactions/{transaction_id}/travel-rule/messages/`\n *\n * @param transactionId Didit-stable transaction UUID that owns the transfer.\n */\n listMessages(transactionId: string, options?: RequestOptions): APIPromise<TravelRuleMessage[]> {\n return this._client.request(\n TRANSACTIONS_TRAVEL_RULE_LIST_MESSAGES,\n [transactionId],\n undefined,\n options,\n );\n }\n\n /**\n * Trigger an inbound transfer from the Didit Test VASP (sandbox)\n *\n * Sandbox applications only. The Didit Test VASP sends your application an inbound Travel Rule transfer, so you can exercise the receiving side of an exchange end to end before going live. The transfer is booked and decided by the same logic a real inbound transfer from a network runs against your wallet address book, so the inbox, the decision and the wallet ownership flow behave as they do live. Nothing leaves Didit. A live application receives 400. Send the same `reference` again to get the transfer the first call booked instead of a second one.\n *\n * `POST /v3/travel-rule/test-vasp/inbound/`\n */\n triggerTestVaspInbound(\n params: TransactionsTravelRuleTriggerTestVaspInboundParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleTestVaspInboundResponse> {\n return this._client.request(\n TRANSACTIONS_TRAVEL_RULE_TRIGGER_TEST_VASP_INBOUND,\n [],\n params,\n options,\n );\n }\n\n /**\n * Finish, cancel, resend, or update the originator wallet of a Travel Rule transfer\n *\n * Provide `payment_txn_id` to report the on-chain hash and move an outbound COMPLETED transfer to FINISHED (its INTERNAL-rail counterpart also moves to FINISHED), `{\"action\": \"cancel\"}` to cancel a non-terminal transfer, or `{\"action\": \"resend\"}` to route an outbound transfer stuck in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, or NOT_ENOUGH_COUNTERPARTY_DATA again (improve the counterparty data first, e.g. add a travel_address to the destination wallet entry). resend applies to outbound transfers only. `{\"action\": \"update_compliance_email\", \"compliance_email\": \"desk@example.com\"}` replaces the compliance email of an outbound transfer in one of those three statuses, the fix for `reason: email_undeliverable`: the status does not change, and the next `resend` sends the request to that address. A resend is queued, not run inside the request: the response shows the transfer back in AWAITING_COUNTERPARTY with a `resend queued` timeline entry and a queued `delivery`, and where it went arrives as a `travel_rule.status.updated` webhook. When the transfer went over GTR, VerifyVASP or Sygna Bridge, the network learns the on-chain hash or the cancellation after the response, with retries; `delivery` shows how that message stands. `{\"action\": \"update_originator_wallet\", \"wallet_address\": \"...\"}` records the wallet the funds actually left from on an outbound transfer, for example the address a UTXO withdrawal was broadcast from rather than the main wallet you declared. It changes the record only: nothing is sent to the counterparty again and the status stays. The originator becomes `chain_details.originator` with `source: updated`, the change is added to the `timeline` with the previous and the new wallet, and the INTERNAL-rail counterpart of the transfer is updated the same way. `{\"action\": \"beneficiary_vasp\", \"beneficiary_vasp\": \"<directory VASP id>\"}` names the counterparty yourself when discovery could not, on an outbound transfer in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE or NOT_ENOUGH_COUNTERPARTY_DATA: the transfer is routed to that VASP and sent again.\n *\n * `PATCH /v3/transactions/{transaction_id}/travel-rule/`\n *\n * @param transactionId Didit-stable transaction UUID that owns the transfer.\n */\n updateTransfer(\n transactionId: string,\n params: TransactionsTravelRuleUpdateTransferParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleTransferDetail> {\n return this._client.request(\n TRANSACTIONS_TRAVEL_RULE_UPDATE_TRANSFER,\n [transactionId],\n params,\n options,\n );\n }\n}\n\n/** `transactions` */\nexport class Transactions extends APIResource {\n readonly notes: TransactionsNotes = new TransactionsNotes(this._client);\n readonly rules: TransactionsRules = new TransactionsRules(this._client);\n readonly travelRule: TransactionsTravelRule = new TransactionsTravelRule(this._client);\n\n /**\n * Batch delete transactions\n *\n * Delete one or more transactions permanently. Select them with `transaction_uuids`, or delete every transaction in the application with `delete_all: true`.\n *\n * A deleted transaction goes with the records that are only its own: its parties, tags, notes, payment method links, documents and every stored version of their files, rule runs, alerts, provider results, network snapshot and Travel Rule data. Cases, people and companies stay; their link to the deleted transaction is cleared. Draft regulatory reports stop listing it and are rebuilt without it. Deletion is permanent and irreversible; there is no undo endpoint.\n *\n * If any selected transaction is listed in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each transaction and the reports that list it. Delete those reports, then repeat the request.\n *\n * `DELETE /v3/organization/{organization_id}/application/{application_id}/transactions/delete/`\n */\n batchDelete(\n params:\n | TransactionsBatchDeleteParamsSelectedTransactions\n | TransactionsBatchDeleteParamsAllTransactions,\n options?: RequestOptions,\n ): APIPromise<void> {\n return this._client.request(TRANSACTIONS_BATCH_DELETE, [], params, options);\n }\n\n /**\n * Create transaction\n *\n * Submit a transaction for synchronous AML/risk monitoring. The transaction is created `APPROVED`, then your rules (and crypto screening, when applicable) run inline and may flip the returned `status` to `IN_REVIEW` or `DECLINED`. **`transaction_id` is your idempotency key** (max 128 chars, unique per app); reusing it returns 400. A `transaction.created` webhook is dispatched on success for live applications. Sandbox applications are not billed and do not emit `transaction.created` or `transaction.status.updated` webhooks. Sandbox Travel Rule exchanges do emit `travel_rule.status.updated` webhooks with `environment: sandbox`. A Travel Rule transfer is stored and returned before any counterparty is contacted: `travel_rule.status` comes back `AWAITING_COUNTERPARTY` (or `NOT_APPLICABLE` below your threshold, `UNCONFIRMED_OWNERSHIP` for a declared self-hosted wallet, `COMPLETED` when the other wallet is your own verified wallet) and `travel_rule.protocol` is null. Didit then chooses the rail and sends the exchange, and every later status change of the transfer, including `COUNTERPARTY_VASP_NOT_FOUND` when no rail reaches the counterparty, arrives as a `travel_rule.status.updated` webhook. Your rules run again when the rail or the status changes.\n *\n * `POST /v3/transactions/`\n */\n create(\n params: TransactionsCreateParams,\n options?: RequestOptions,\n ): APIPromise<TransactionDetail> {\n return this._client.request(TRANSACTIONS_CREATE, [], params, options);\n }\n\n /**\n * Mint an SDK transaction token\n *\n * Mint a short-lived scoped token your app passes to the Didit SDKs so they can submit transactions directly from the end-user's device via `POST /v1/transactions/`. The token is bound to one `vendor_data` (your user id): every transaction submitted with it has its subject identity enforced server-side from that binding, so a tampered client cannot submit on behalf of another user. Mint tokens from your backend - never ship the API key itself in an app. camelCase aliases (`vendorData`, `ttlSeconds`, `maxUses`) are also accepted.\n *\n * `POST /v3/transactions/sdk-token/`\n */\n createSdkToken(\n params: TransactionsCreateSdkTokenParams,\n options?: RequestOptions,\n ): APIPromise<TransactionsCreateSdkTokenResponse> {\n return this._client.request(TRANSACTIONS_CREATE_SDK_TOKEN, [], params, options);\n }\n\n /**\n * Download a transaction PDF report\n *\n * Render one monitored transaction as a PDF report: overview and verdict, parties and payment methods, custom properties, alerts and rule runs, screening and Travel Rule results, the network summary, the cost breakdown, up to 50 related transactions and the 20 most recent activity entries. The body is the PDF itself (`application/pdf`), not JSON.\n *\n * The report is rendered from the transaction's current data on every call, so request it again after a status change. Nothing is stored and nothing is billed. Rendering can take a few seconds, so use a generous client timeout.\n *\n * This endpoint lives on an application-scoped path: put your organization ID and the ID of the application your API key belongs to in the URL ([find your organization ID](https://docs.didit.me/getting-started/api-authentication#find-your-organization-id)). A PDF report counts as media: a scoped API key needs `media: read` and `transactions: read`, and a key limited to some workflows or to approved sessions cannot call it.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/`\n *\n * @param transactionUuid Didit transaction UUID: the `uuid` returned by `POST /v3/transactions/` and `GET /v3/transactions/`. Your own `txn_id` is not accepted.\n */\n generatePdf(transactionUuid: string, options?: RequestOptions): APIPromise<Blob> {\n return this._client.request(TRANSACTIONS_GENERATE_PDF, [transactionUuid], undefined, options);\n }\n\n /**\n * List transactions\n *\n * Paginated list of monitored transactions, newest first (`txn_date` desc). `count` is capped at 100; use `total_transactions` for the true row count. This endpoint does not support filtering or search parameters.\n *\n * `GET /v3/transactions/`\n */\n list(\n params: TransactionsListParams = {},\n options?: RequestOptions,\n ): PagePromise<TransactionsListResponse, TransactionsListResponseResults> {\n return this._client.requestPage(TRANSACTIONS_LIST, [], params, options);\n }\n\n /**\n * List networks for a transaction\n *\n * List the networks the transaction's backing KYC/KYB subject belongs to (resolved through the transaction's session or business session).\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/networks/`\n *\n * @param transactionUuid Transaction UUID.\n */\n listNetworks(\n transactionUuid: string,\n options?: RequestOptions,\n ): APIPromise<EntityNetworkMembershipList> {\n return this._client.request(TRANSACTIONS_LIST_NETWORKS, [transactionUuid], undefined, options);\n }\n\n /**\n * List networks for a transaction party\n *\n * List the networks a transaction party (remitter, beneficiary, or counterparty) belongs to, resolved through the party itself rather than through the transaction's backing session.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/parties/{transaction_party_uuid}/networks/`\n *\n * @param transactionUuid Transaction UUID.\n * @param transactionPartyUuid Transaction party UUID.\n */\n listPartyNetworks(\n transactionUuid: string,\n transactionPartyUuid: string,\n options?: RequestOptions,\n ): APIPromise<EntityNetworkMembershipList> {\n return this._client.request(\n TRANSACTIONS_LIST_PARTY_NETWORKS,\n [transactionUuid, transactionPartyUuid],\n undefined,\n options,\n );\n }\n\n /**\n * List related transactions\n *\n * List the other transactions in your application that involve the same people or companies as this one. A transaction is related when any of its parties, in any role, has the same `vendor_data` as one of this transaction's parties. The transaction itself is never returned, and parties without `vendor_data` are ignored: when none of this transaction's parties has one, the result is always empty.\n *\n * Results use the summary shape of `GET /v3/transactions/`, newest first (`txn_date`, then `created_at`). Paginated with `limit` and `offset`; `count` is exact up to 100 and capped at 100 above that, so follow `next` until it is `null`.\n *\n * A scoped API key needs `transactions: read`; a key limited to some workflows or to approved sessions cannot call this endpoint. Send the same `vendor_data` for the same person or company on every [transaction](https://docs.didit.me/transaction-monitoring/transactions#subject-and-counterparty) to make this list complete.\n *\n * `GET /v3/transactions/{transaction_id}/related/`\n *\n * @param transactionId Didit transaction UUID: the `uuid` returned by `POST /v3/transactions/` and `GET /v3/transactions/`. Your own `txn_id` is not accepted.\n */\n listRelated(\n transactionId: string,\n params: TransactionsListRelatedParams = {},\n options?: RequestOptions,\n ): PagePromise<TransactionsListRelatedResponse, TransactionSummary> {\n return this._client.requestPage(TRANSACTIONS_LIST_RELATED, [transactionId], params, options);\n }\n\n /**\n * Get transaction\n *\n * Retrieve the full monitoring record for one transaction: parties, score/severity, rule runs, alerts, Travel Rule outcome, remediation session.\n *\n * `GET /v3/transactions/{transaction_id}/`\n *\n * @param transactionId Didit-stable transaction UUID (the `uuid` returned from create / list, **not** your `txn_id`).\n */\n retrieve(transactionId: string, options?: RequestOptions): APIPromise<TransactionDetail> {\n return this._client.request(TRANSACTIONS_RETRIEVE, [transactionId], undefined, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n TravelRuleCounterpartyContact,\n TravelRuleCounterpartyDecisionResponse,\n TravelRuleCounterpartyQuestionnaire,\n TravelRuleCounterpartyQuestionnaireList,\n TravelRuleCounterpartyScreeningResult,\n TravelRuleCounterpartyScreeningStatus,\n TravelRuleInboundResponse,\n TravelRuleNetworkParticipant,\n TravelRuleNetworkQuestionnaire,\n TravelRuleNetworksOverview,\n TravelRuleSettingsDetail,\n TravelRuleTransferRow,\n TravelRuleWalletProofReview,\n TravelRuleWidgetSessionResponse,\n TravelRuleWorkspace,\n TravelRuleWorkspaceDomainCodeResponse,\n VaspDirectoryEntry,\n WalletAddressEntry,\n WalletAddressEntryUpdate,\n WalletAddressImportReport,\n} from \"../types/components.js\";\nimport type {\n TravelRuleCounterpartyContactsCreateParams,\n TravelRuleCounterpartyContactsListParams,\n TravelRuleCounterpartyContactsListResponse,\n TravelRuleCreateWidgetSessionParams,\n TravelRuleListVaspsParams,\n TravelRuleListVaspsResponse,\n TravelRuleNetworksUpdateQuestionnaireParams,\n TravelRuleRegisterInboundParams,\n TravelRuleScreenVaspParams,\n TravelRuleSendComplianceEmailConfirmationResponse,\n TravelRuleSendVaspQuestionnaireParams,\n TravelRuleTransfersListParams,\n TravelRuleTransfersListResponse,\n TravelRuleUpdateSettingsParams,\n TravelRuleUpdateVaspDecisionParams,\n TravelRuleWalletAddressesBulkImportParams,\n TravelRuleWalletAddressesCreateParams,\n TravelRuleWalletAddressesListParams,\n TravelRuleWalletAddressesListResponse,\n TravelRuleWalletAddressesUpdateParams,\n TravelRuleWalletProofsDecideParams,\n TravelRuleWalletProofsListParams,\n TravelRuleWalletProofsListResponse,\n TravelRuleWorkspaceClaimParams,\n TravelRuleWorkspaceConfirmDomainParams,\n TravelRuleWorkspaceEnableBillingParams,\n} from \"../types/travel-rule.js\";\n\nconst TRAVEL_RULE_COUNTERPARTY_CONTACTS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/counterparty-contacts/\",\n body: \"json\",\n dates: \"TravelRuleCounterpartyContact\",\n};\nconst TRAVEL_RULE_COUNTERPARTY_CONTACTS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/travel-rule/counterparty-contacts/{contact_uuid}/\",\n response: \"none\",\n};\nconst TRAVEL_RULE_COUNTERPARTY_CONTACTS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/counterparty-contacts/\",\n query: [\"counterparty\", \"limit\", \"offset\"],\n dates: { p: { results: { i: \"TravelRuleCounterpartyContact\" } } },\n};\nconst TRAVEL_RULE_NETWORKS_REQUEST_ACCESS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/networks/{network}/request/\",\n dates: \"TravelRuleNetworkParticipant\",\n};\nconst TRAVEL_RULE_NETWORKS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/networks/\",\n dates: \"TravelRuleNetworksOverview\",\n};\nconst TRAVEL_RULE_NETWORKS_RETRIEVE_QUESTIONNAIRE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/networks/questionnaire/\",\n dates: \"TravelRuleNetworkQuestionnaire\",\n};\nconst TRAVEL_RULE_NETWORKS_SUBMIT_QUESTIONNAIRE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/networks/questionnaire/submit/\",\n dates: \"TravelRuleNetworkQuestionnaire\",\n};\nconst TRAVEL_RULE_NETWORKS_UPDATE_QUESTIONNAIRE: OperationSpec = {\n method: \"PUT\",\n path: \"/v3/travel-rule/networks/questionnaire/\",\n body: \"json\",\n dates: \"TravelRuleNetworkQuestionnaire\",\n};\nconst TRAVEL_RULE_TRANSFERS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/transfers/\",\n query: [\n \"direction\",\n \"status\",\n \"rail\",\n \"kind\",\n \"currency\",\n \"start_date\",\n \"end_date\",\n \"counterparty\",\n \"limit\",\n \"offset\",\n ],\n dates: { p: { results: { i: \"TravelRuleTransferRow\" } } },\n};\nconst TRAVEL_RULE_WALLET_ADDRESSES_BULK_IMPORT: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/wallet-addresses/import/\",\n body: \"auto\",\n files: [\"file\"],\n};\nconst TRAVEL_RULE_WALLET_ADDRESSES_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/wallet-addresses/\",\n body: \"json\",\n dates: \"WalletAddressEntry\",\n};\nconst TRAVEL_RULE_WALLET_ADDRESSES_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/travel-rule/wallet-addresses/{entry_uuid}/\",\n response: \"none\",\n};\nconst TRAVEL_RULE_WALLET_ADDRESSES_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/wallet-addresses/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"WalletAddressEntry\" } } },\n};\nconst TRAVEL_RULE_WALLET_ADDRESSES_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/travel-rule/wallet-addresses/{entry_uuid}/\",\n body: \"json\",\n};\nconst TRAVEL_RULE_WALLET_PROOFS_DECIDE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/wallet-proofs/{proof_uuid}/decision/\",\n body: \"json\",\n dates: \"TravelRuleWalletProofReview\",\n};\nconst TRAVEL_RULE_WALLET_PROOFS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/wallet-proofs/\",\n query: [\"status\", \"limit\", \"offset\"],\n dates: { p: { results: { i: \"TravelRuleWalletProofReview\" } } },\n};\nconst TRAVEL_RULE_WORKSPACE_CLAIM: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/workspace/claim/\",\n body: \"json\",\n dates: \"TravelRuleWorkspace\",\n};\nconst TRAVEL_RULE_WORKSPACE_CONFIRM_DOMAIN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/workspace/domain/confirm/\",\n body: \"json\",\n dates: \"TravelRuleWorkspace\",\n};\nconst TRAVEL_RULE_WORKSPACE_ENABLE_BILLING: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/workspace/billing/\",\n body: \"json\",\n dates: \"TravelRuleWorkspace\",\n};\nconst TRAVEL_RULE_WORKSPACE_GET: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/workspace/\",\n dates: \"TravelRuleWorkspace\",\n};\nconst TRAVEL_RULE_WORKSPACE_SEND_DOMAIN_CODE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/workspace/domain/code/\",\n};\nconst TRAVEL_RULE_WORKSPACE_VERIFY_DOMAIN_DNS: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/workspace/domain/dns/\",\n dates: \"TravelRuleWorkspace\",\n};\nconst TRAVEL_RULE_CLEAR_VASP_DECISION: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/decision/\",\n dates: \"TravelRuleCounterpartyDecisionResponse\",\n};\nconst TRAVEL_RULE_CREATE_WIDGET_SESSION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/widget-session/\",\n body: \"json\",\n dates: \"TravelRuleWidgetSessionResponse\",\n};\nconst TRAVEL_RULE_LIST_VASP_QUESTIONNAIRES: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/questionnaires/\",\n dates: \"TravelRuleCounterpartyQuestionnaireList\",\n};\nconst TRAVEL_RULE_LIST_VASPS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/vasps/\",\n query: [\n \"search\",\n \"network\",\n \"jurisdiction\",\n \"reachable\",\n \"kind\",\n \"risk\",\n \"responsiveness\",\n \"limit\",\n \"offset\",\n ],\n dates: { p: { results: { i: \"VaspDirectoryEntry\" } } },\n};\nconst TRAVEL_RULE_REGISTER_INBOUND: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/inbound/\",\n body: \"json\",\n dates: \"TravelRuleInboundResponse\",\n};\nconst TRAVEL_RULE_RETRIEVE_SETTINGS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/settings/\",\n dates: \"TravelRuleSettingsDetail\",\n};\nconst TRAVEL_RULE_RETRIEVE_VASP: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/\",\n dates: \"VaspDirectoryEntry\",\n};\nconst TRAVEL_RULE_RETRIEVE_VASP_DECISION: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/decision/\",\n dates: \"TravelRuleCounterpartyDecisionResponse\",\n};\nconst TRAVEL_RULE_RETRIEVE_VASP_SCREENING: OperationSpec = {\n method: \"GET\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/screening/\",\n dates: \"TravelRuleCounterpartyScreeningStatus\",\n};\nconst TRAVEL_RULE_SCREEN_VASP: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/screening/\",\n body: \"json\",\n dates: \"TravelRuleCounterpartyScreeningResult\",\n};\nconst TRAVEL_RULE_SEND_COMPLIANCE_EMAIL_CONFIRMATION: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/settings/compliance-email/confirmation/\",\n};\nconst TRAVEL_RULE_SEND_VASP_QUESTIONNAIRE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/questionnaires/\",\n body: \"json\",\n dates: \"TravelRuleCounterpartyQuestionnaire\",\n};\nconst TRAVEL_RULE_UPDATE_SETTINGS: OperationSpec = {\n method: \"PUT\",\n path: \"/v3/travel-rule/settings/\",\n body: \"json\",\n dates: \"TravelRuleSettingsDetail\",\n};\nconst TRAVEL_RULE_UPDATE_VASP_DECISION: OperationSpec = {\n method: \"PUT\",\n path: \"/v3/travel-rule/vasps/{vasp_id}/decision/\",\n body: \"json\",\n dates: \"TravelRuleCounterpartyDecisionResponse\",\n};\n\n/** `travel_rule.counterparty_contacts` */\nexport class TravelRuleCounterpartyContacts extends APIResource {\n /**\n * Add a counterparty contact\n *\n * Adds a private compliance address for one directory entry. Only your application sees and uses it, and the EMAIL rail writes to it before any platform contact. Adding an address the entry already has among your own contacts returns that contact.\n *\n * `POST /v3/travel-rule/counterparty-contacts/`\n */\n create(\n params: TravelRuleCounterpartyContactsCreateParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyContact> {\n return this._client.request(TRAVEL_RULE_COUNTERPARTY_CONTACTS_CREATE, [], params, options);\n }\n\n /**\n * Delete a counterparty contact\n *\n * Deletes one of your application's own contacts. The EMAIL rail stops writing to it at once. Platform contacts cannot be deleted.\n *\n * `DELETE /v3/travel-rule/counterparty-contacts/{contact_uuid}/`\n *\n * @param contactUuid contact_uuid\n */\n delete(contactUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(\n TRAVEL_RULE_COUNTERPARTY_CONTACTS_DELETE,\n [contactUuid],\n undefined,\n options,\n );\n }\n\n /**\n * List counterparty contacts\n *\n * The compliance addresses the EMAIL rail may write to for your application: Didit's platform contacts plus your application's own private ones, bounced ones included, newest first. Paginated with `limit` (default 50) and `offset`; `count` stops at 100, so 100 means 100 or more.\n *\n * `GET /v3/travel-rule/counterparty-contacts/`\n */\n list(\n params: TravelRuleCounterpartyContactsListParams = {},\n options?: RequestOptions,\n ): PagePromise<TravelRuleCounterpartyContactsListResponse, TravelRuleCounterpartyContact> {\n return this._client.requestPage(TRAVEL_RULE_COUNTERPARTY_CONTACTS_LIST, [], params, options);\n }\n}\n\n/** `travel_rule.networks` */\nexport class TravelRuleNetworks extends APIResource {\n /**\n * Request a Travel Rule network\n *\n * Ask for this application's own participant on a network Didit's membership carries (GTR or Sygna). Without an approved questionnaire the participant waits for it (questionnaire_pending); with one it goes to the network's onboarding (submitted_to_network) and becomes active once the network gives it a code. Idempotent: a pending, onboarding or live participant is returned unchanged. If the network refused the registration (last_error is set), requesting again retries. TRUST and VerifyVASP are reachable only through your own membership: TRUST admits members per VASP, and a VerifyVASP Enclave serves one VASP id.\n *\n * `POST /v3/travel-rule/networks/{network}/request/`\n *\n * @param network The network to join through Didit's membership.\n */\n requestAccess(\n network: string,\n options?: RequestOptions,\n ): APIPromise<TravelRuleNetworkParticipant> {\n return this._client.request(TRAVEL_RULE_NETWORKS_REQUEST_ACCESS, [network], undefined, options);\n }\n\n /**\n * Get Travel Rule networks\n *\n * Read, for this application, every network's true state: whether it sends through your own membership or through Didit's, and why it cannot yet. Also returns the due-diligence questionnaire and your participants. Reading creates nothing.\n *\n * `GET /v3/travel-rule/networks/`\n */\n retrieve(options?: RequestOptions): APIPromise<TravelRuleNetworksOverview> {\n return this._client.request(TRAVEL_RULE_NETWORKS_RETRIEVE, [], undefined, options);\n }\n\n /**\n * Get the network questionnaire\n *\n * Read Didit's network due-diligence questionnaire for this application, its status and Didit's review note. An application that never saved one reads an empty draft.\n *\n * `GET /v3/travel-rule/networks/questionnaire/`\n */\n retrieveQuestionnaire(options?: RequestOptions): APIPromise<TravelRuleNetworkQuestionnaire> {\n return this._client.request(\n TRAVEL_RULE_NETWORKS_RETRIEVE_QUESTIONNAIRE,\n [],\n undefined,\n options,\n );\n }\n\n /**\n * Submit the network questionnaire\n *\n * Send the saved questionnaire to Didit's review. The saved answers must be complete: every field except lei and data_protection_contact_email, with the three attestations true. Didit approves it, asks for changes (edit and submit again) or rejects it. Networks you requested while it was pending are handed to their onboarding when it is approved.\n *\n * `POST /v3/travel-rule/networks/questionnaire/submit/`\n */\n submitQuestionnaire(options?: RequestOptions): APIPromise<TravelRuleNetworkQuestionnaire> {\n return this._client.request(TRAVEL_RULE_NETWORKS_SUBMIT_QUESTIONNAIRE, [], undefined, options);\n }\n\n /**\n * Save network questionnaire answers\n *\n * Save answers to the questionnaire while it is draft or changes_requested. Saves are partial: answers you do not send are kept.\n *\n * `PUT /v3/travel-rule/networks/questionnaire/`\n */\n updateQuestionnaire(\n params: TravelRuleNetworksUpdateQuestionnaireParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleNetworkQuestionnaire> {\n return this._client.request(TRAVEL_RULE_NETWORKS_UPDATE_QUESTIONNAIRE, [], params, options);\n }\n}\n\n/** `travel_rule.transfers` */\nexport class TravelRuleTransfers extends APIResource {\n /**\n * List Travel Rule transfers\n *\n * Your application's Travel Rule transfers, newest first, paginated with `limit` (default 50) and `offset`. Rows carry VASP names, wallets and memos only, never person data. Comma-separated values select several. An unknown value answers 400 naming the parameter, for example `{\"direction\": [\"Unknown value(s): inbound.\"]}`.\n *\n * `GET /v3/travel-rule/transfers/`\n */\n list(\n params: TravelRuleTransfersListParams = {},\n options?: RequestOptions,\n ): PagePromise<TravelRuleTransfersListResponse, TravelRuleTransferRow> {\n return this._client.requestPage(TRAVEL_RULE_TRANSFERS_LIST, [], params, options);\n }\n}\n\n/** `travel_rule.wallet_addresses` */\nexport class TravelRuleWalletAddresses extends APIResource {\n /**\n * Import wallet addresses in bulk\n *\n * Add up to 10,000 wallets to your Travel Rule address book in one call, as JSON or as a CSV file. A wallet can be sent by its address, by the SHA-256 of its lowercased address (`address_hash`) to keep the address private, or both. The import is idempotent: a wallet already in the book is reported as `existing` and left untouched, so the same file can be sent again. Each row is validated on its own, so one bad row never fails the others. A wallet imported by its hash only matches transfers to that address and can be proven with the wallet-ownership widget like any other entry.\n *\n * `POST /v3/travel-rule/wallet-addresses/import/`\n */\n bulkImport(\n params: TravelRuleWalletAddressesBulkImportParams = {},\n options?: RequestOptions,\n ): APIPromise<WalletAddressImportReport> {\n return this._client.request(TRAVEL_RULE_WALLET_ADDRESSES_BULK_IMPORT, [], params, options);\n }\n\n /**\n * Register a wallet address\n *\n * Add an entry to your Travel Rule wallet address book so inbound INTERNAL-rail transfers can resolve against it.\n *\n * `POST /v3/travel-rule/wallet-addresses/`\n */\n create(\n params: TravelRuleWalletAddressesCreateParams,\n options?: RequestOptions,\n ): APIPromise<WalletAddressEntry> {\n return this._client.request(TRAVEL_RULE_WALLET_ADDRESSES_CREATE, [], params, options);\n }\n\n /**\n * Delete a wallet address\n *\n * Deletes the entry together with its ownership proofs and the screenshots they stored. It stops matching new transfers immediately and the address is freed up for re-registration. Transfers that already used the wallet keep their own record of it and read the same. Deletion is irreversible.\n *\n * `DELETE /v3/travel-rule/wallet-addresses/{entry_uuid}/`\n *\n * @param entryUuid entry_uuid\n */\n delete(entryUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(\n TRAVEL_RULE_WALLET_ADDRESSES_DELETE,\n [entryUuid],\n undefined,\n options,\n );\n }\n\n /**\n * List wallet address book entries\n *\n * Paginated list of your application's Travel Rule wallet address book, newest first.\n *\n * `GET /v3/travel-rule/wallet-addresses/`\n */\n list(\n params: TravelRuleWalletAddressesListParams = {},\n options?: RequestOptions,\n ): PagePromise<TravelRuleWalletAddressesListResponse, WalletAddressEntry> {\n return this._client.requestPage(TRAVEL_RULE_WALLET_ADDRESSES_LIST, [], params, options);\n }\n\n /**\n * Update wallet address holder metadata\n *\n * Partial update of holder_name, holder_vendor_data, entity_type, and travel_address. Setting travel_address attaches a TRP routing address to the entry; invalid values are rejected with 400. The response echoes only these four fields.\n *\n * `PATCH /v3/travel-rule/wallet-addresses/{entry_uuid}/`\n *\n * @param entryUuid entry_uuid\n */\n update(\n entryUuid: string,\n params: TravelRuleWalletAddressesUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<WalletAddressEntryUpdate> {\n return this._client.request(TRAVEL_RULE_WALLET_ADDRESSES_UPDATE, [entryUuid], params, options);\n }\n}\n\n/** `travel_rule.wallet_proofs` */\nexport class TravelRuleWalletProofs extends APIResource {\n /**\n * Approve or reject a screenshot wallet proof\n *\n * Decide a screenshot proof from your review queue. approve verifies the proof and the address book entry and applies the ownership to the transfer the widget session was minted for, exactly as a verified signature does. A screenshot never confirms a transfer that another Didit customer sent over the INTERNAL rail: that takes a signed message or a test deposit. reject closes the proof as REJECTED with failure_reason REVIEW_REJECTED; the end user can start a new proof from the widget. The note is kept with the proof.\n *\n * `POST /v3/travel-rule/wallet-proofs/{proof_uuid}/decision/`\n *\n * @param proofUuid proof_id from the review queue.\n */\n decide(\n proofUuid: string,\n params: TravelRuleWalletProofsDecideParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleWalletProofReview> {\n return this._client.request(TRAVEL_RULE_WALLET_PROOFS_DECIDE, [proofUuid], params, options);\n }\n\n /**\n * List screenshot wallet proofs to review\n *\n * Your review queue for screenshot wallet-ownership proofs. A screenshot is the one proof Didit cannot check itself: once the end user uploads it from the widget it waits PENDING until you approve or reject it with POST /v3/travel-rule/wallet-proofs/{proof_uuid}/decision/. Oldest first, so the queue is worked from the proof that has waited longest. Only uploaded screenshots appear, never a proof whose end user has not uploaded a file yet, and never one on a wallet you deleted from your address book (Didit closes those as OWNERSHIP_CHANGED).\n *\n * `GET /v3/travel-rule/wallet-proofs/`\n */\n list(\n params: TravelRuleWalletProofsListParams = {},\n options?: RequestOptions,\n ): PagePromise<TravelRuleWalletProofsListResponse, TravelRuleWalletProofReview> {\n return this._client.requestPage(TRAVEL_RULE_WALLET_PROOFS_LIST, [], params, options);\n }\n}\n\n/** `travel_rule.workspace` */\nexport class TravelRuleWorkspaceResource extends APIResource {\n /**\n * Claim a directory entry\n *\n * Claims the directory entry this workspace is. When the work email is at a domain the entry lists, the claim is proved and applies at once: the VASP profile and Travel Rule settings are filled from the entry and Travel Rule is turned on, so the next transfer to it routes over the Didit network. Otherwise the claim waits for review (`pending_review`).\n *\n * `POST /v3/travel-rule/workspace/claim/`\n */\n claim(\n params: TravelRuleWorkspaceClaimParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleWorkspace> {\n return this._client.request(TRAVEL_RULE_WORKSPACE_CLAIM, [], params, options);\n }\n\n /**\n * Confirm the domain verification code\n *\n * Spends the emailed code and marks the email domain verified.\n *\n * `POST /v3/travel-rule/workspace/domain/confirm/`\n */\n confirmDomain(\n params: TravelRuleWorkspaceConfirmDomainParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleWorkspace> {\n return this._client.request(TRAVEL_RULE_WORKSPACE_CONFIRM_DOMAIN, [], params, options);\n }\n\n /**\n * Enable outbound billing\n *\n * Turns outbound Travel Rule billing on for the workspace. Receiving stays free. This cannot be turned back off through the API: contact Didit support.\n *\n * `POST /v3/travel-rule/workspace/billing/`\n */\n enableBilling(\n params: TravelRuleWorkspaceEnableBillingParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleWorkspace> {\n return this._client.request(TRAVEL_RULE_WORKSPACE_ENABLE_BILLING, [], params, options);\n }\n\n /**\n * Get the free Travel Rule workspace\n *\n * Reads the free workspace of an application that joined free: directory claim, domain proof, billing and Didit network listing.\n *\n * `GET /v3/travel-rule/workspace/`\n */\n get(options?: RequestOptions): APIPromise<TravelRuleWorkspace> {\n return this._client.request(TRAVEL_RULE_WORKSPACE_GET, [], undefined, options);\n }\n\n /**\n * Email a domain verification code\n *\n * Emails a single-use code to the workspace's work address to prove it controls the email domain. Throttled, and a limited number of wrong attempts is accepted per code. Also returns the TXT record for the DNS alternative.\n *\n * `POST /v3/travel-rule/workspace/domain/code/`\n */\n sendDomainCode(options?: RequestOptions): APIPromise<TravelRuleWorkspaceDomainCodeResponse> {\n return this._client.request(TRAVEL_RULE_WORKSPACE_SEND_DOMAIN_CODE, [], undefined, options);\n }\n\n /**\n * Verify the domain from its TXT record\n *\n * Checks for the `didit-tr-verify.<domain>` TXT record returned by the code endpoint and marks the domain verified when it matches. One of the two proofs, the emailed code or the TXT record, is enough.\n *\n * `POST /v3/travel-rule/workspace/domain/dns/`\n */\n verifyDomainDns(options?: RequestOptions): APIPromise<TravelRuleWorkspace> {\n return this._client.request(TRAVEL_RULE_WORKSPACE_VERIFY_DOMAIN_DNS, [], undefined, options);\n }\n}\n\n/** `travel_rule` */\nexport class TravelRule extends APIResource {\n readonly counterpartyContacts: TravelRuleCounterpartyContacts =\n new TravelRuleCounterpartyContacts(this._client);\n readonly networks: TravelRuleNetworks = new TravelRuleNetworks(this._client);\n readonly transfers: TravelRuleTransfers = new TravelRuleTransfers(this._client);\n readonly walletAddresses: TravelRuleWalletAddresses = new TravelRuleWalletAddresses(this._client);\n readonly walletProofs: TravelRuleWalletProofs = new TravelRuleWalletProofs(this._client);\n readonly workspace: TravelRuleWorkspaceResource = new TravelRuleWorkspaceResource(this._client);\n\n /**\n * Clear your decision on a VASP\n *\n * Clear your application's own decision on a counterparty. The response shows the decision that applies afterwards: null, or for an entity of a brand the brand's decision, which the entity follows again.\n *\n * `DELETE /v3/travel-rule/vasps/{vasp_id}/decision/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n clearVaspDecision(\n vaspId: string,\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyDecisionResponse> {\n return this._client.request(TRAVEL_RULE_CLEAR_VASP_DECISION, [vaspId], undefined, options);\n }\n\n /**\n * Mint a wallet-ownership widget session\n *\n * Mint a hosted wallet-ownership widget URL/token. Send the customer to the returned url to prove control of a wallet (message signing, Satoshi test, screenshot, or self-declaration). The widget is web-only in this release - open the url in the system browser or a custom tab, never inside a mobile SDK webview.\n *\n * `POST /v3/travel-rule/widget-session/`\n */\n createWidgetSession(\n params: TravelRuleCreateWidgetSessionParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleWidgetSessionResponse> {\n return this._client.request(TRAVEL_RULE_CREATE_WIDGET_SESSION, [], params, options);\n }\n\n /**\n * List due-diligence questionnaires with a VASP\n *\n * Every due-diligence questionnaire your application sent the counterparty, newest first, with its status and, once answered, the answers. Private to your application.\n *\n * `GET /v3/travel-rule/vasps/{vasp_id}/questionnaires/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n listVaspQuestionnaires(\n vaspId: string,\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyQuestionnaireList> {\n return this._client.request(TRAVEL_RULE_LIST_VASP_QUESTIONNAIRES, [vaspId], undefined, options);\n }\n\n /**\n * Search the VASP directory\n *\n * Paginated, name-sorted search of the VASP directory: the shared directory entries, which Didit builds from the ESMA interim MiCA register, the public TRISA directory, the global LEI register and its own curation, plus the members of the Didit network. Each row carries the routes your application has to it today. Your own application's profile is never listed. Rows also carry the shared due-diligence assessment and your application's own decision, entity screening and questionnaires.\n *\n * `GET /v3/travel-rule/vasps/`\n */\n listVasps(\n params: TravelRuleListVaspsParams = {},\n options?: RequestOptions,\n ): PagePromise<TravelRuleListVaspsResponse, VaspDirectoryEntry> {\n return this._client.requestPage(TRAVEL_RULE_LIST_VASPS, [], params, options);\n }\n\n /**\n * Register an after-deposit (sunrise) inbound transfer\n *\n * Register Travel Rule data for a crypto deposit that already settled on-chain before any exchange took place. Creates an inbound travelRule transaction (or reuses an unclaimed deposit) and resolves the transfer against your wallet address book. For a newly created transaction, Didit sends transaction.created first and the travel_rule.status.updated webhooks after it.\n *\n * `POST /v3/travel-rule/inbound/`\n */\n registerInbound(\n params: TravelRuleRegisterInboundParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleInboundResponse> {\n return this._client.request(TRAVEL_RULE_REGISTER_INBOUND, [], params, options);\n }\n\n /**\n * Get Travel Rule settings\n *\n * Read the application's Travel Rule settings and VASP profile. Auto-creates a default (disabled) settings row and an empty profile on first read.\n *\n * `GET /v3/travel-rule/settings/`\n */\n retrieveSettings(options?: RequestOptions): APIPromise<TravelRuleSettingsDetail> {\n return this._client.request(TRAVEL_RULE_RETRIEVE_SETTINGS, [], undefined, options);\n }\n\n /**\n * Get a VASP directory entry\n *\n * One directory entry or Didit network member by the id the search returned, with the same fields and the routes your application has to it.\n *\n * `GET /v3/travel-rule/vasps/{vasp_id}/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/.\n */\n retrieveVasp(vaspId: string, options?: RequestOptions): APIPromise<VaspDirectoryEntry> {\n return this._client.request(TRAVEL_RULE_RETRIEVE_VASP, [vaspId], undefined, options);\n }\n\n /**\n * Get your decision on a VASP\n *\n * Your application's decision on a counterparty (a directory entry or a Didit network member): approved, restricted or blocked. An entity of a brand with no decision of its own follows the brand's decision, named in inherited_from. Private to your application.\n *\n * `GET /v3/travel-rule/vasps/{vasp_id}/decision/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n retrieveVaspDecision(\n vaspId: string,\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyDecisionResponse> {\n return this._client.request(TRAVEL_RULE_RETRIEVE_VASP_DECISION, [vaspId], undefined, options);\n }\n\n /**\n * Get a VASP's entity screening\n *\n * Whether counterparty screening is on for your application, what one screening costs your organization, how long a result stays fresh, and your latest sanctions and adverse-media screening of the counterparty. Reading it is free.\n *\n * `GET /v3/travel-rule/vasps/{vasp_id}/screening/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n retrieveVaspScreening(\n vaspId: string,\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyScreeningStatus> {\n return this._client.request(TRAVEL_RULE_RETRIEVE_VASP_SCREENING, [vaspId], undefined, options);\n }\n\n /**\n * Screen a VASP\n *\n * Screen the counterparty entity against sanctions and adverse media for your application. Opt-in: counterparty_screening_enabled must be on in your Travel Rule settings. Each new screening is billed at your organization's Company AML Screening price; a screening younger than 30 days is returned instead (200, not billed) unless you send refresh: true. One screening of a counterparty runs at a time per application. The result is private to your application. Sandbox applications are never screened.\n *\n * `POST /v3/travel-rule/vasps/{vasp_id}/screening/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n screenVasp(\n vaspId: string,\n params: TravelRuleScreenVaspParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyScreeningResult> {\n return this._client.request(TRAVEL_RULE_SCREEN_VASP, [vaspId], params, options);\n }\n\n /**\n * Send the compliance email confirmation\n *\n * Emails a single-use confirmation link to your VASP profile's compliance_email. Opening the link and pressing its confirm button confirms the address, which the Didit network needs before it lists your profile. A new request replaces the previous link; the link stops working when the compliance email changes. One email per minute per address.\n *\n * `POST /v3/travel-rule/settings/compliance-email/confirmation/`\n */\n sendComplianceEmailConfirmation(\n options?: RequestOptions,\n ): APIPromise<TravelRuleSendComplianceEmailConfirmationResponse> {\n return this._client.request(\n TRAVEL_RULE_SEND_COMPLIANCE_EMAIL_CONFIRMATION,\n [],\n undefined,\n options,\n );\n }\n\n /**\n * Send a due-diligence questionnaire to a VASP\n *\n * Email Didit's standard due-diligence questionnaire to a compliance address on record for the counterparty, with a single-use answer link. The counterparty has 30 days to answer every question; the answers stay current for 365 days. A new send replaces your earlier unanswered questionnaire to the same counterparty, whose link stops working. One email per minute per address.\n *\n * `POST /v3/travel-rule/vasps/{vasp_id}/questionnaires/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n sendVaspQuestionnaire(\n vaspId: string,\n params: TravelRuleSendVaspQuestionnaireParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyQuestionnaire> {\n return this._client.request(TRAVEL_RULE_SEND_VASP_QUESTIONNAIRE, [vaspId], params, options);\n }\n\n /**\n * Update Travel Rule settings\n *\n * Upsert the application's Travel Rule settings and VASP profile. Partial update - only send the fields you want to change. Setting `is_enabled: true` requires a non-blank `legal_name` (already stored or included in the same request), otherwise returns 400.\n *\n * `PUT /v3/travel-rule/settings/`\n */\n updateSettings(\n params: TravelRuleUpdateSettingsParams = {},\n options?: RequestOptions,\n ): APIPromise<TravelRuleSettingsDetail> {\n return this._client.request(TRAVEL_RULE_UPDATE_SETTINGS, [], params, options);\n }\n\n /**\n * Set your decision on a VASP\n *\n * Make or change your application's decision on a counterparty: APPROVED, RESTRICTED or BLOCKED, with an optional reason. It never changes the shared directory entry and acts only through your transaction rules (counterparty_dd_status). A decision on a brand also covers each of its entities that has no decision of its own.\n *\n * `PUT /v3/travel-rule/vasps/{vasp_id}/decision/`\n *\n * @param vaspId The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network member.\n */\n updateVaspDecision(\n vaspId: string,\n params: TravelRuleUpdateVaspDecisionParams,\n options?: RequestOptions,\n ): APIPromise<TravelRuleCounterpartyDecisionResponse> {\n return this._client.request(TRAVEL_RULE_UPDATE_VASP_DECISION, [vaspId], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n AMLMonitoringJob,\n AMLMonitoringToggleResult,\n EntityNetworkMembershipList,\n OngoingMonitoringJob,\n OngoingMonitoringToggleResult,\n UserDetailItem,\n UserListItem,\n} from \"../types/components.js\";\nimport type {\n UsersBatchDeleteParams,\n UsersBatchDeleteResponse,\n UsersCreateParams,\n UsersCreateResponse,\n UsersListParams,\n UsersListResponse,\n UsersSetAmlMonitoringParams,\n UsersSetOngoingMonitoringParams,\n UsersUpdateParams,\n UsersUpdateStatusParams,\n UsersUploadFaceParams,\n UsersUploadFaceResponse,\n} from \"../types/users.js\";\n\nconst USERS_BATCH_DELETE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/users/delete/\",\n body: \"json\",\n};\nconst USERS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/users/create/\",\n body: \"json\",\n dates: {\n p: {\n last_session_at: 1,\n first_session_at: 1,\n last_activity_at: 1,\n tags: { i: { p: { tag: { p: { created_at: 1, updated_at: 1 } }, created_at: 1 } } },\n created_at: 1,\n comments: { i: { p: { created_at: 1 } } },\n updated_at: 1,\n },\n },\n};\nconst USERS_GENERATE_PDF: OperationSpec = {\n method: \"GET\",\n path: \"/v3/users/{vendor_data}/generate-pdf/\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\nconst USERS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/users/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"UserListItem\" } } },\n};\nconst USERS_LIST_NETWORKS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/users/{vendor_user_uuid}/networks/\",\n scope: \"application\",\n dates: \"EntityNetworkMembershipList\",\n};\nconst USERS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/users/{vendor_data}/\",\n dates: \"UserDetailItem\",\n};\nconst USERS_RETRIEVE_ONGOING_MONITORING_JOB: OperationSpec = {\n method: \"GET\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/vendor-users/toggle-ongoing-monitoring/{job_id}/\",\n scope: \"application\",\n};\nconst USERS_SET_AML_MONITORING: OperationSpec = {\n method: \"POST\",\n path: \"/v3/users/aml-monitoring/\",\n body: \"json\",\n dates: \"AMLMonitoringToggleResult\",\n};\nconst USERS_SET_ONGOING_MONITORING: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/vendor-users/toggle-ongoing-monitoring/\",\n scope: \"application\",\n body: \"json\",\n};\nconst USERS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/users/{vendor_data}/\",\n body: \"json\",\n dates: \"UserDetailItem\",\n};\nconst USERS_UPDATE_STATUS: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/users/{vendor_data}/update-status/\",\n body: \"json\",\n dates: \"UserDetailItem\",\n};\nconst USERS_UPLOAD_FACE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/\",\n scope: \"application\",\n body: \"json\",\n dates: { p: { created_at: 1 } },\n};\n\n/** `users` */\nexport class Users extends APIResource {\n /**\n * Batch delete users\n *\n * **Permanently delete** users: the user records are removed permanently. For everyday blocking prefer [Update User Status](#patch-/v3/users/-vendor_data-/update-status/) with `BLOCKED`. Select users with `vendor_data_list`, with `didit_internal_id_list`, or with both at once; or pass `delete_all: true`. This endpoint never narrows `delete_all` with filters. The Console's People filters are refused with a `400` (see the `400` response), so a narrowed intent does not turn into a full wipe. Two exceptions: `filter_has_approved_sessions` and `filter_has_declined_sessions` are not refused and not applied, so with `delete_all: true` they still delete every user; do not send them.\n *\n * **Biometric templates:** every image-free biometric template retained for these users after session deletion (see `/v3/biometric-templates/`) is purged before the user is deleted, so the person stops matching in duplicate detection and Face Search. If a template cannot be purged because a biometric store is unavailable, the call returns `503`, no user in the request is deleted, and repeating the request finishes the job.\n *\n * **Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.\n *\n * `POST /v3/users/delete/`\n */\n batchDelete(\n params: UsersBatchDeleteParams = {},\n options?: RequestOptions,\n ): APIPromise<UsersBatchDeleteResponse> {\n return this._client.request(USERS_BATCH_DELETE, [], params, options);\n }\n\n /**\n * Create user\n *\n * Create a [user](/entities/users) by `vendor_data`, before or without a verification session. `vendor_data` must be unique among the application's users (a duplicate returns `400`). Not idempotent.\n *\n * **Contact details:** `email` and `phone_number` are stored in `metadata.contact`, and `country` in `metadata.address`. When you send `first_name` or `last_name` without `full_name`, Didit joins them into `full_name`.\n *\n * **Verification link:** with `send_verification_link: true`, Didit also creates a verification session for the person on `workflow_id` and emails them the link at `email`. The session runs the same checks as [Create Session](/sessions-api/create-session), such as the blocklist and your credit balance. The person and the session are created together or not at all: if any check fails, nothing is written and no email is sent. The response's `verification_link` describes the session, and is `null` when you don't ask for a link.\n *\n * **API key access:** a scoped API key needs `users` write. With `send_verification_link: true` it also needs `sessions` write, or the call answers `403` before anything is written. Full-access keys are unaffected. See [API keys](/console/api-keys).\n *\n * `POST /v3/users/create/`\n */\n create(params: UsersCreateParams, options?: RequestOptions): APIPromise<UsersCreateResponse> {\n return this._client.request(USERS_CREATE, [], params, options);\n }\n\n /**\n * Download the full user history PDF report\n *\n * Render and download one compliance-ready PDF containing the full verification history of the user identified by `vendor_data`. It is the same document the Console produces from **User detail → Actions → Download PDF**, so periodic compliance exports no longer need a person clicking in the Console.\n *\n * **What the report contains.** A cover page with the profile summary (name, date of birth, issuing states, approved emails and phones), the latest status of every feature, the session counters and an index of the sessions included - followed by the standard report of every included session, in chronological order (oldest first). Each session report is the same document `GET /v3/session/{sessionId}/generate-pdf/` returns for that session.\n *\n * **Eligible sessions.** Only User Verification (KYC) sessions in `Approved`, `Declined`, `In Review` or `Kyc Expired` are included; sessions in any other status are skipped. If the user has no session in one of those statuses the endpoint returns `403` - see below.\n *\n * **Cap.** The report is capped at the **20 most recent** reportable sessions. When a user has more, the newest 20 are included and the cover page states how many older sessions were left out. Use `GET /v3/sessions/?vendor_data=…` for the complete list as JSON.\n *\n * **Branding.** If your application has white-label customization, the cover and every session report are rendered with your logo and privacy-policy URL; otherwise they carry Didit branding. Reports are rendered in English - there is no language parameter.\n *\n * **No caching.** Every call re-renders the PDF from the current data, so a report generated after a manual review reflects the reviewer's decision. Two calls for the same user can produce byte-different files - archive the downloaded file if you need an immutable copy.\n *\n * **Latency.** Rendering is synchronous and downloads every stored image of every included session, so a user with many media-heavy sessions can take tens of seconds. Use a generous client read timeout (120 s recommended) and stream the body to disk. Generation stops at a server-side time budget instead of running until your client gives up: if that budget is reached, the response is still a valid PDF containing the most recent sessions, and the cover states how many were omitted.\n *\n * **Scope.** The user is resolved inside the application that owns the API key. A key can never export a user of another application - such a user does not exist for it and the endpoint returns `404`.\n *\n * **Trailing slash.** The canonical route ends with a trailing slash (`…/generate-pdf/`). A request without it is served directly with the same response - there is no `301` redirect, so no client has to follow redirects and `curl` does not need `-L`. Use the slashed URL as in the samples.\n *\n * `GET /v3/users/{vendor_data}/generate-pdf/`\n *\n * @param vendorData Your unique identifier for the user - a free-form string (NOT a UUID). This is the same value you passed as `vendor_data` when creating the user's sessions, matched exactly as sent. URL-encode it; a value containing `/` cannot be addressed by this route.\n */\n generatePdf(vendorData: string, options?: RequestOptions): APIPromise<Blob> {\n return this._client.request(USERS_GENERATE_PDF, [vendorData], undefined, options);\n }\n\n /**\n * List users\n *\n * List [users](/entities/users) Didit assembles from KYC sessions sharing the same `vendor_data` (free-form string, NOT a UUID), plus users created via the API. Paginated, ordered by `last_session_at` desc. This endpoint does not support filtering or search parameters - fetch pages and filter client-side.\n *\n * `GET /v3/users/`\n */\n list(\n params: UsersListParams = {},\n options?: RequestOptions,\n ): PagePromise<UsersListResponse, UserListItem> {\n return this._client.requestPage(USERS_LIST, [], params, options);\n }\n\n /**\n * List networks for a user\n *\n * List the networks a vendor user belongs to.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/users/{vendor_user_uuid}/networks/`\n *\n * @param vendorUserUuid Vendor user UUID.\n */\n listNetworks(\n vendorUserUuid: string,\n options?: RequestOptions,\n ): APIPromise<EntityNetworkMembershipList> {\n return this._client.request(USERS_LIST_NETWORKS, [vendorUserUuid], undefined, options);\n }\n\n /**\n * Get user\n *\n * Fetch one [user](/entities/users) by `vendor_data` (exact match). Adds `metadata`, `comments`, and `updated_at` to the list view, and switches `tags` to the detailed tag-link shape.\n *\n * `GET /v3/users/{vendor_data}/`\n *\n * @param vendorData Your unique identifier for the user - a free-form string (NOT a UUID). This is the same value you passed as `vendor_data` when creating the session that first introduced this user, matched exactly as sent.\n */\n retrieve(vendorData: string, options?: RequestOptions): APIPromise<UserDetailItem> {\n return this._client.request(USERS_RETRIEVE, [vendorData], undefined, options);\n }\n\n /**\n * Get AML ongoing monitoring job\n *\n * Progress and per-outcome counters of a monitoring toggle job. Poll every couple of seconds while status is PENDING or PROCESSING.\n *\n * `GET /v3/organization/{organization_id}/application/{application_id}/vendor-users/toggle-ongoing-monitoring/{job_id}/`\n *\n * @param jobId Monitoring job UUID returned by the toggle endpoint.\n */\n retrieveOngoingMonitoringJob(\n jobId: string,\n options?: RequestOptions,\n ): APIPromise<OngoingMonitoringJob> {\n return this._client.request(USERS_RETRIEVE_ONGOING_MONITORING_JOB, [jobId], undefined, options);\n }\n\n /**\n * Enable or disable AML ongoing monitoring for users\n *\n * Turns AML ongoing monitoring on or off for the selected users, with the same semantics as the Business Console. Exactly one monitored AML screening is kept per user, so a profile that verified several times is monitored and billed once; disabling turns monitoring off across all of the profile's screenings. Users without any AML screening are screened first (billed as a regular AML screening) when they have the full name, date of birth and country needed; otherwise they are reported as `skipped_no_identity_data`.\n *\n * Set `estimate_only: true` to preview counts and costs without writing anything. Selections of 20 profiles or fewer resolve inline and return `200` with the completed job; larger selections return `202` and run in the background - poll [Get AML monitoring job](#get-/v3/aml-monitoring/jobs/-job_id-/) with the returned `job_id`. Enabling is refused with `403` when the organization balance does not cover the estimate. Identifiers that match nothing are listed in `unmatched` and never fail the request: a selection that matches nothing completes as an empty job (`total` 0), the same convention as the batch delete endpoints.\n *\n * `POST /v3/users/aml-monitoring/`\n */\n setAmlMonitoring(\n params: UsersSetAmlMonitoringParams,\n options?: RequestOptions,\n ): APIPromise<AMLMonitoringToggleResult | AMLMonitoringJob> {\n return this._client.request(USERS_SET_AML_MONITORING, [], params, options);\n }\n\n /**\n * Toggle AML ongoing monitoring for users\n *\n * Enables or disables AML ongoing monitoring at the user level. Exactly one monitored AML screening is kept per user; users without any AML screening (for example imported users) get one created and screened first, billed as a regular AML screening. Set estimate_only to preview counts and costs without writing. Batches of 20 or fewer resolve inline (200, COMPLETED); larger batches return 202 and run asynchronously.\n *\n * `PATCH /v3/organization/{organization_id}/application/{application_id}/vendor-users/toggle-ongoing-monitoring/`\n */\n setOngoingMonitoring(\n params: UsersSetOngoingMonitoringParams,\n options?: RequestOptions,\n ): APIPromise<OngoingMonitoringToggleResult | OngoingMonitoringJob> {\n return this._client.request(USERS_SET_ONGOING_MONITORING, [], params, options);\n }\n\n /**\n * Update user\n *\n * Partial update of a user: `display_name`, `full_name`, `date_of_birth`, `status`, `metadata`, `approved_emails`/`approved_phones`/`issuing_states`. `metadata` fully replaces. Changing `status` here works like [Update User Status](#patch-/v3/users/-vendor_data-/update-status/): it records a `STATUS_CHANGED` activity with the optional `reason`, and `BLOCKED` adds the `vendor_data` to the system blocklist (moving away from `BLOCKED` removes that entry). Changes to `display_name`, `full_name`, `date_of_birth` or `metadata` are recorded as a `PROFILE_UPDATED` activity.\n *\n * `PATCH /v3/users/{vendor_data}/`\n *\n * @param vendorData Your unique identifier for the user (free-form string, NOT a UUID).\n */\n update(\n vendorData: string,\n params: UsersUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<UserDetailItem> {\n return this._client.request(USERS_UPDATE, [vendorData], params, options);\n }\n\n /**\n * Update user status\n *\n * Flip only the lifecycle `status` of a user: `ACTIVE`, `FLAGGED` or `BLOCKED` (not session statuses). `BLOCKED` adds the `vendor_data` to the system blocklist; moving away from `BLOCKED` removes that entry. Each change is recorded as a `STATUS_CHANGED` activity on the user, with the optional `reason` as its `comment`. Sending the current status changes nothing and records no `reason`. The `user.status.updated` webhook does not carry `reason`.\n *\n * `PATCH /v3/users/{vendor_data}/update-status/`\n *\n * @param vendorData Your unique identifier for the user.\n */\n updateStatus(\n vendorData: string,\n params: UsersUpdateStatusParams,\n options?: RequestOptions,\n ): APIPromise<UserDetailItem> {\n return this._client.request(USERS_UPDATE_STATUS, [vendorData], params, options);\n }\n\n /**\n * Upload user face\n *\n * Attach a trusted imported face image to an existing User profile. Use this after creating or retrieving a User by `vendor_data` and reading its `didit_internal_id`. The uploaded face is stored on the User profile and indexed for duplicate detection and face search. It is not added to a face blocklist.\n *\n * `POST /v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/`\n *\n * @param diditInternalId Didit's internal User UUID, returned as `didit_internal_id` by `GET /v3/users/{vendor_data}/` and `POST /v3/users/create/`.\n */\n uploadFace(\n diditInternalId: string,\n params: UsersUploadFaceParams,\n options?: RequestOptions,\n ): APIPromise<UsersUploadFaceResponse> {\n return this._client.request(USERS_UPLOAD_FACE, [diditInternalId], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { WalletScreeningResult } from \"../types/components.js\";\nimport type { WalletScreeningScreenParams } from \"../types/wallet-screening.js\";\n\nconst WALLET_SCREENING_SCREEN: OperationSpec = {\n method: \"POST\",\n path: \"/v3/wallet-screening/\",\n body: \"json\",\n};\nconst WALLET_SCREENING_SCREEN_PDF: OperationSpec = {\n method: \"POST\",\n path: \"/v3/wallet-screening/pdf/\",\n body: \"whole\",\n response: \"binary\",\n accept: \"application/pdf\",\n};\n\n/** `wallet_screening` */\nexport class WalletScreening extends APIResource {\n /**\n * Screen a wallet address\n *\n * Run on-demand AML screening for a single crypto wallet/address without creating a transaction. Resolves your application's configured blockchain analytics provider, screens the address synchronously, and returns the normalised risk result. LIGHTNING is available only with an Elliptic or Chainalysis BYOK connection added through Marketplace. Nothing is written to the transactions table. One AML monitoring usage is billed per successful screening (sandbox applications are not billed).\n *\n * `POST /v3/wallet-screening/`\n */\n screen(\n params: WalletScreeningScreenParams,\n options?: RequestOptions,\n ): APIPromise<WalletScreeningResult> {\n return this._client.request(WALLET_SCREENING_SCREEN, [], params, options);\n }\n\n /**\n * Render a wallet-screening result as a PDF\n *\n * Stateless companion to `POST /v3/wallet-screening/`: repost the exact JSON body that endpoint returned - including the `report_signature` it added - and get back a Didit-branded PDF of the same result. No provider is called and nothing is billed or persisted; this only re-renders a result Didit already produced. The signature ties the PDF to an unmodified result: editing `risk_score`, `severity`, `sanctions_hit`, or any other signed field before reposting fails with `400`.\n *\n * `POST /v3/wallet-screening/pdf/`\n */\n screenPdf(params: WalletScreeningResult, options?: RequestOptions): APIPromise<Blob> {\n return this._client.request(WALLET_SCREENING_SCREEN_PDF, [], params, options);\n }\n}\n","// A strict JSON parser for webhook bodies that keeps every number as its exact\n// source text. `JSON.parse` turns 9007199254740993 into 9007199254740992, and\n// X-Signature-V2 covers the exact digits, so canonical JSON (docs/DESIGN.md\n// section 9.2) is built from this parser's output instead.\n//\n// It accepts exactly what Python's `json.loads` accepts in the reference SDK\n// (sdk-python, didit/webhooks/_canonical.py), and builds the same values:\n//\n// - RFC 8259 grammar only: no NaN or Infinity, no leading zeros, no trailing\n// commas or data, no control characters inside strings, only the standard\n// escapes, whitespace limited to space, tab, CR and LF. A byte order mark is\n// not whitespace, so a body starting with one is refused (Python raises\n// \"Unexpected UTF-8 BOM\").\n// - Duplicate keys: the last value wins, like a Python dict.\n// - `\\uXXXX` escapes are joined into one code point only when a high surrogate\n// escape is directly followed by a low surrogate escape, as Python does. Any\n// other surrogate escape stays a lone surrogate in the string (a JavaScript\n// string can hold one, like a Python str); canonical.ts encodes it the way\n// the reference does (UTF-8 with \"surrogatepass\").\n// - An integer with more than 4300 digits is refused: Python's default\n// `sys.get_int_max_str_digits()` makes `json.loads` raise for it, so the\n// backend can never send one.\n// - A number with a fraction or exponent that overflows a double (1e400) is\n// refused: Python reads it as infinity, which the reference rejects.\n// - Nesting deeper than MAX_DEPTH is refused, like Python's RecursionError\n// (about 1000 levels by default).\n\nimport { WebhookVerificationError } from \"../core/errors.js\";\n\n/** The deepest nesting of objects and arrays a webhook body may have. */\nexport const MAX_DEPTH = 1000;\n\n/** Python refuses to convert integers with more digits than this (3.11+ default). */\nexport const MAX_INT_DIGITS = 4300;\n\n/** A JSON number, kept as the exact text it had in the body. */\nexport class LosslessNumber {\n /** The number's source text, for example `9007199254740993` or `1.5e-07`. */\n readonly raw: string;\n /** True when the text has no fraction and no exponent (a Python int). */\n readonly isInteger: boolean;\n\n constructor(raw: string) {\n this.raw = raw;\n this.isInteger = !/[.eE]/.test(raw);\n }\n}\n\n/** A parsed JSON value. Objects have a null prototype, so `__proto__` is an ordinary key. */\nexport type JsonValue = null | boolean | string | LosslessNumber | JsonValue[] | JsonObject;\n\n/** A parsed JSON object (null prototype). */\nexport interface JsonObject {\n [key: string]: JsonValue;\n}\n\nfunction invalid(detail: string): WebhookVerificationError {\n return new WebhookVerificationError(\n \"invalid_payload\",\n `The webhook body is not valid JSON: ${detail}.`,\n );\n}\n\n/**\n * Decode a body as strict UTF-8. Invalid bytes are an `invalid_payload` error,\n * and a leading byte order mark is kept (and then refused by the parser), as\n * Python's `bytes.decode(\"utf-8\")` keeps it.\n */\nexport function decodeUtf8(bytes: Uint8Array): string {\n try {\n return new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true }).decode(bytes);\n } catch {\n throw new WebhookVerificationError(\"invalid_payload\", \"The webhook body is not valid UTF-8.\");\n }\n}\n\nconst Char = {\n Tab: 0x09,\n LineFeed: 0x0a,\n CarriageReturn: 0x0d,\n Space: 0x20,\n Quote: 0x22,\n Plus: 0x2b,\n Comma: 0x2c,\n Minus: 0x2d,\n Dot: 0x2e,\n Slash: 0x2f,\n Zero: 0x30,\n One: 0x31,\n Nine: 0x39,\n Colon: 0x3a,\n UpperE: 0x45,\n OpenBracket: 0x5b,\n Backslash: 0x5c,\n CloseBracket: 0x5d,\n LowerB: 0x62,\n LowerE: 0x65,\n LowerF: 0x66,\n LowerN: 0x6e,\n LowerR: 0x72,\n LowerT: 0x74,\n LowerU: 0x75,\n OpenBrace: 0x7b,\n CloseBrace: 0x7d,\n} as const;\n\nconst SHORT_ESCAPES: Partial<Record<number, string>> = {\n [Char.Quote]: '\"',\n [Char.Backslash]: \"\\\\\",\n [Char.Slash]: \"/\",\n [Char.LowerB]: \"\\b\",\n [Char.LowerF]: \"\\f\",\n [Char.LowerN]: \"\\n\",\n [Char.LowerR]: \"\\r\",\n [Char.LowerT]: \"\\t\",\n};\n\nfunction isDigit(c: number): boolean {\n return c >= Char.Zero && c <= Char.Nine;\n}\n\nfunction hexValue(c: number): number {\n if (c >= 0x30 && c <= 0x39) return c - 0x30;\n if (c >= 0x41 && c <= 0x46) return c - 0x41 + 10;\n if (c >= 0x61 && c <= 0x66) return c - 0x61 + 10;\n return -1;\n}\n\nclass Parser {\n private pos = 0;\n\n constructor(private readonly text: string) {}\n\n parseDocument(): JsonValue {\n this.skipWhitespace();\n const value = this.parseValue(0);\n this.skipWhitespace();\n if (this.pos < this.text.length) throw invalid(`extra data at position ${this.pos}`);\n return value;\n }\n\n private skipWhitespace(): void {\n const { text } = this;\n while (this.pos < text.length) {\n const c = text.charCodeAt(this.pos);\n if (c !== Char.Space && c !== Char.LineFeed && c !== Char.CarriageReturn && c !== Char.Tab) {\n return;\n }\n this.pos++;\n }\n }\n\n private unexpected(): WebhookVerificationError {\n return this.pos >= this.text.length\n ? invalid(\"unexpected end of input\")\n : invalid(`unexpected character at position ${this.pos}`);\n }\n\n private parseValue(depth: number): JsonValue {\n const c = this.text.charCodeAt(this.pos);\n switch (c) {\n case Char.OpenBrace:\n return this.parseObject(depth + 1);\n case Char.OpenBracket:\n return this.parseArray(depth + 1);\n case Char.Quote:\n return this.parseString();\n case Char.LowerT:\n return this.parseLiteral(\"true\", true);\n case Char.LowerF:\n return this.parseLiteral(\"false\", false);\n case Char.LowerN:\n return this.parseLiteral(\"null\", null);\n default:\n if (c === Char.Minus || isDigit(c)) return this.parseNumber();\n throw this.unexpected();\n }\n }\n\n private parseLiteral<T>(word: string, value: T): T {\n if (!this.text.startsWith(word, this.pos)) throw this.unexpected();\n this.pos += word.length;\n return value;\n }\n\n private parseObject(depth: number): JsonObject {\n if (depth > MAX_DEPTH) throw invalid(`nesting deeper than ${MAX_DEPTH} levels`);\n const { text } = this;\n const object = Object.create(null) as JsonObject;\n this.pos++; // {\n this.skipWhitespace();\n if (text.charCodeAt(this.pos) === Char.CloseBrace) {\n this.pos++;\n return object;\n }\n for (;;) {\n if (text.charCodeAt(this.pos) !== Char.Quote) throw this.unexpected();\n const key = this.parseString();\n this.skipWhitespace();\n if (text.charCodeAt(this.pos) !== Char.Colon) throw this.unexpected();\n this.pos++;\n this.skipWhitespace();\n // Assignment on a null-prototype object always creates an own property,\n // and a repeated key overwrites the earlier value (last wins).\n object[key] = this.parseValue(depth);\n this.skipWhitespace();\n const next = text.charCodeAt(this.pos);\n if (next === Char.Comma) {\n this.pos++;\n this.skipWhitespace();\n } else if (next === Char.CloseBrace) {\n this.pos++;\n return object;\n } else {\n throw this.unexpected();\n }\n }\n }\n\n private parseArray(depth: number): JsonValue[] {\n if (depth > MAX_DEPTH) throw invalid(`nesting deeper than ${MAX_DEPTH} levels`);\n const { text } = this;\n const array: JsonValue[] = [];\n this.pos++; // [\n this.skipWhitespace();\n if (text.charCodeAt(this.pos) === Char.CloseBracket) {\n this.pos++;\n return array;\n }\n for (;;) {\n array.push(this.parseValue(depth));\n this.skipWhitespace();\n const next = text.charCodeAt(this.pos);\n if (next === Char.Comma) {\n this.pos++;\n this.skipWhitespace();\n } else if (next === Char.CloseBracket) {\n this.pos++;\n return array;\n } else {\n throw this.unexpected();\n }\n }\n }\n\n private parseString(): string {\n const { text } = this;\n let pos = this.pos + 1; // after the opening quote\n let out = \"\";\n let runStart = pos;\n for (;;) {\n if (pos >= text.length) {\n this.pos = pos;\n throw invalid(\"unterminated string\");\n }\n const c = text.charCodeAt(pos);\n if (c === Char.Quote) {\n out += text.slice(runStart, pos);\n this.pos = pos + 1;\n return out;\n }\n if (c < Char.Space) {\n this.pos = pos;\n throw invalid(`control character in a string at position ${pos}`);\n }\n if (c !== Char.Backslash) {\n pos++;\n continue;\n }\n out += text.slice(runStart, pos);\n const escape = text.charCodeAt(pos + 1);\n const short = SHORT_ESCAPES[escape];\n if (short !== undefined) {\n out += short;\n pos += 2;\n } else if (escape === Char.LowerU) {\n let unit = 0;\n for (let i = pos + 2; i < pos + 6; i++) {\n const digit = hexValue(text.charCodeAt(i));\n if (digit < 0) {\n this.pos = pos;\n throw invalid(`invalid \\\\uXXXX escape at position ${pos}`);\n }\n unit = unit * 16 + digit;\n }\n // Code units are appended one by one: a high surrogate escape directly\n // followed by a low surrogate escape forms one code point, exactly the\n // pairs Python joins; any other surrogate stays lone, as in Python.\n out += String.fromCharCode(unit);\n pos += 6;\n } else {\n this.pos = pos;\n throw invalid(`invalid escape at position ${pos}`);\n }\n runStart = pos;\n }\n }\n\n private parseNumber(): LosslessNumber {\n const { text } = this;\n const start = this.pos;\n let pos = start;\n if (text.charCodeAt(pos) === Char.Minus) pos++;\n const first = text.charCodeAt(pos);\n if (first === Char.Zero) {\n pos++;\n } else if (first >= Char.One && first <= Char.Nine) {\n while (isDigit(text.charCodeAt(pos))) pos++;\n } else {\n this.pos = pos;\n throw this.unexpected();\n }\n const integerEnd = pos;\n let isFloat = false;\n if (text.charCodeAt(pos) === Char.Dot) {\n if (!isDigit(text.charCodeAt(pos + 1))) {\n this.pos = pos + 1;\n throw this.unexpected();\n }\n pos += 2;\n while (isDigit(text.charCodeAt(pos))) pos++;\n isFloat = true;\n }\n const e = text.charCodeAt(pos);\n if (e === Char.LowerE || e === Char.UpperE) {\n pos++;\n const sign = text.charCodeAt(pos);\n if (sign === Char.Plus || sign === Char.Minus) pos++;\n if (!isDigit(text.charCodeAt(pos))) {\n this.pos = pos;\n throw this.unexpected();\n }\n while (isDigit(text.charCodeAt(pos))) pos++;\n isFloat = true;\n }\n this.pos = pos;\n const raw = text.slice(start, pos);\n if (isFloat) {\n if (!Number.isFinite(Number(raw))) throw invalid(`number ${raw} overflows a double`);\n } else if (\n integerEnd - start - (text.charCodeAt(start) === Char.Minus ? 1 : 0) >\n MAX_INT_DIGITS\n ) {\n throw invalid(`integer with more than ${MAX_INT_DIGITS} digits`);\n }\n return new LosslessNumber(raw);\n }\n}\n\n/**\n * Parse JSON text strictly (see the top of this file), keeping numbers as\n * {@link LosslessNumber}. Throws a `WebhookVerificationError` with reason\n * `invalid_payload` for anything Python's `json.loads` would refuse.\n */\nexport function parseJson(text: string): JsonValue {\n return new Parser(text).parseDocument();\n}\n\n/** True when `value` is a parsed JSON object (not an array, not null). */\nexport function isJsonObject(value: JsonValue): value is JsonObject {\n return (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n !(value instanceof LosslessNumber)\n );\n}\n","// Canonical JSON, the text X-Signature-V2 signs (docs/DESIGN.md section 9.2).\n// It is exactly what the backend computes in Python:\n//\n// json.dumps(shorten_floats(value), sort_keys=True, separators=(\",\", \":\"), ensure_ascii=False)\n//\n// where shorten_floats turns every float with an integral value into an int.\n\nimport { WebhookVerificationError } from \"../core/errors.js\";\nimport { LosslessNumber, MAX_DEPTH } from \"./json.js\";\n\n/**\n * Compare two strings by Unicode code point, the order Python's `sorted` gives\n * `str` keys. Plain `<` compares UTF-16 code units, which puts U+1F600 (a\n * surrogate pair) before U+FB00. A lone surrogate counts as its own code point,\n * as it does in Python.\n */\nexport function compareCodePoints(a: string, b: string): number {\n const length = Math.min(a.length, b.length);\n let i = 0;\n while (i < length) {\n // Equal code points take the same number of code units, so one index\n // walks both strings.\n const ca = a.codePointAt(i) ?? 0;\n const cb = b.codePointAt(i) ?? 0;\n if (ca !== cb) return ca - cb;\n i += ca > 0xffff ? 2 : 1;\n }\n return a.length - b.length;\n}\n\nfunction escapeChar(c: number): string {\n switch (c) {\n case 0x22:\n return '\\\\\"';\n case 0x5c:\n return \"\\\\\\\\\";\n case 0x0a:\n return \"\\\\n\";\n case 0x0d:\n return \"\\\\r\";\n case 0x09:\n return \"\\\\t\";\n case 0x08:\n return \"\\\\b\";\n case 0x0c:\n return \"\\\\f\";\n default:\n return `\\\\u00${c.toString(16).padStart(2, \"0\")}`;\n }\n}\n\n/**\n * A JSON string the way Python writes it with `ensure_ascii=False`: only `\"`,\n * `\\` and characters below U+0020 are escaped (short forms where they exist,\n * else `\\u00xx` in lowercase); everything else, including `/`, U+007F, U+2028\n * and U+2029, stays literal.\n */\nexport function quoteString(s: string): string {\n let out = \"\";\n let runStart = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n if (c >= 0x20 && c !== 0x22 && c !== 0x5c) continue;\n out += s.slice(runStart, i) + escapeChar(c);\n runStart = i + 1;\n }\n return runStart === 0 ? `\"${s}\"` : `\"${out}${s.slice(runStart)}\"`;\n}\n\n/**\n * Python's `repr(float)` of a finite double: the shortest digits that read\n * back as the same double, in positional notation (with `.0` when integral)\n * when the decimal exponent is between -4 and 15, else in scientific notation\n * with a signed exponent of at least two digits (`1e-05`, `1.5e+16`).\n */\nexport function pyFloatRepr(value: number): string {\n if (value === 0) return Object.is(value, -0) ? \"-0.0\" : \"0.0\";\n const sign = value < 0 ? \"-\" : \"\";\n // Number#toString gives the shortest round-trip digits too (ECMA-262\n // Number::toString), only with different notation rules. Take its digits and\n // exponent and lay them out the way Python does.\n const text = Math.abs(value).toString();\n const e = text.indexOf(\"e\");\n const mantissa = e < 0 ? text : text.slice(0, e);\n const exponent = e < 0 ? 0 : Number(text.slice(e + 1));\n const dot = mantissa.indexOf(\".\");\n const integerPart = dot < 0 ? mantissa : mantissa.slice(0, dot);\n let digits = integerPart + (dot < 0 ? \"\" : mantissa.slice(dot + 1));\n // value = 0.<digits> * 10^point\n let point = integerPart.length + exponent;\n const leadingZeros = /^0*/.exec(digits)?.[0].length ?? 0;\n digits = digits.slice(leadingZeros).replace(/0+$/, \"\");\n point -= leadingZeros;\n // CPython (format_float_short, mode \"r\"): exponent form when point <= -4 or point > 16.\n if (point <= -4 || point > 16) {\n const exp = point - 1;\n const head = digits.length > 1 ? `${digits[0] ?? \"\"}.${digits.slice(1)}` : digits;\n return `${sign}${head}e${exp < 0 ? \"-\" : \"+\"}${String(Math.abs(exp)).padStart(2, \"0\")}`;\n }\n if (point <= 0) return `${sign}0.${\"0\".repeat(-point)}${digits}`;\n if (point >= digits.length) return `${sign}${digits}${\"0\".repeat(point - digits.length)}.0`;\n return `${sign}${digits.slice(0, point)}.${digits.slice(point)}`;\n}\n\n/** The exact integer value of an integral double, as Python's `int(f)` prints it (`-0.0` is `0`). */\nexport function integralFloatString(value: number): string {\n return BigInt(value).toString();\n}\n\n/** Python's `str(int)` of a JSON integer literal: its digits, with `-0` as `0`. */\nexport function integerLiteralString(raw: string): string {\n return raw === \"-0\" ? \"0\" : raw;\n}\n\nfunction notJson(detail: string): WebhookVerificationError {\n return new WebhookVerificationError(\n \"invalid_payload\",\n `The webhook payload is not JSON data Didit sends: ${detail}.`,\n );\n}\n\nfunction writeFloat(value: number): string {\n if (!Number.isFinite(value)) throw notJson(\"NaN and Infinity are not JSON\");\n // shorten_floats: a float with an integral value is written as an integer.\n return Number.isInteger(value) ? integralFloatString(value) : pyFloatRepr(value);\n}\n\n/**\n * True for objects a JSON parser makes: `{}` literals and null-prototype\n * objects. The check looks for a prototype whose own prototype is null rather\n * than for this realm's Object.prototype, so objects from another realm (a vm\n * context, an iframe) count too.\n */\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto: unknown = Object.getPrototypeOf(value);\n return proto === null || Object.getPrototypeOf(proto) === null;\n}\n\n/** Thrown by {@link canonicalJsonWithin} when the text would pass its length limit. */\nclass TooLong extends Error {}\n\n/** Writes canonical JSON and stops once the text passes `limit` UTF-16 code units. */\nclass Writer {\n private length = 0;\n\n constructor(private readonly limit: number) {}\n\n private count(text: string): string {\n // Separators add at most one code unit per value or key; the limits that\n // callers pass leave room for them.\n this.length += text.length + 1;\n if (this.length > this.limit) throw new TooLong();\n return text;\n }\n\n write(value: unknown, depth: number): string {\n switch (typeof value) {\n case \"string\":\n return this.count(quoteString(value));\n case \"boolean\":\n return value ? \"true\" : \"false\";\n case \"number\":\n return this.count(writeFloat(value));\n case \"bigint\":\n return this.count(value.toString());\n case \"object\": {\n if (value === null) return \"null\";\n if (value instanceof LosslessNumber) {\n return this.count(\n value.isInteger ? integerLiteralString(value.raw) : writeFloat(Number(value.raw)),\n );\n }\n // Python's RecursionError, which also stops a self-referencing payload.\n if (depth >= MAX_DEPTH) throw notJson(`nesting deeper than ${MAX_DEPTH} levels`);\n if (Array.isArray(value)) {\n const parts: string[] = [];\n // A hole in a sparse array reads as undefined, which is refused.\n for (const item of value as unknown[]) parts.push(this.write(item, depth + 1));\n return `[${parts.join(\",\")}]`;\n }\n if (!isPlainObject(value)) throw notJson(\"an object that is not a plain object\");\n const keys = Object.keys(value).sort(compareCodePoints);\n const parts: string[] = [];\n for (const key of keys) {\n parts.push(`${this.count(quoteString(key))}:${this.write(value[key], depth + 1)}`);\n }\n return `{${parts.join(\",\")}}`;\n }\n default:\n throw notJson(`a value of type ${typeof value}`);\n }\n }\n}\n\n/**\n * The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs\n * (docs/DESIGN.md section 9.2), equal to the backend's\n * `json.dumps(shorten_floats(value), sort_keys=True, separators=(\",\", \":\"), ensure_ascii=False)`.\n *\n * `value` is made of plain objects, arrays, strings, booleans, `null`,\n * numbers and bigints. A number with an integral value is written as an\n * integer; any other finite number in Python `repr` form. Numbers from\n * `JSON.parse` lose precision above 2^53, so an integer like\n * 9007199254740993 must be given as a bigint to keep its digits\n * ({@link verifyWebhook} canonicalises from the raw body and never has this\n * problem).\n *\n * Throws a `WebhookVerificationError` with reason `invalid_payload` for\n * anything that is not JSON data: NaN, Infinity, `undefined`, functions,\n * class instances (such as `Date` or `Map`), and nesting deeper than 1000\n * levels (which includes a payload that contains itself).\n */\nexport function canonicalJson(value: unknown): string {\n return new Writer(Infinity).write(value, 0);\n}\n\n/**\n * {@link canonicalJson}, or `undefined` as soon as the text would be longer\n * than `limit` UTF-16 code units. The verifier builds canonical JSON before it\n * knows whether the delivery is genuine, and a float such as `1e308` expands\n * to a 309-digit integer, so an unbounded build would let any request cost\n * time and memory far beyond its size.\n */\nexport function canonicalJsonWithin(value: unknown, limit: number): string | undefined {\n try {\n return new Writer(limit).write(value, 0);\n } catch (error) {\n if (error instanceof TooLong) return undefined;\n throw error;\n }\n}\n\nconst LONE_SURROGATE = /[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?<![\\uD800-\\uDBFF])[\\uDC00-\\uDFFF]/;\n\n/** True when `s` contains a surrogate code unit that is not half of a pair. */\nexport function hasLoneSurrogate(s: string): boolean {\n return LONE_SURROGATE.test(s);\n}\n\nconst encoder = new TextEncoder();\n\n/**\n * The UTF-8 bytes of `s`, encoding a lone surrogate as its three-byte form\n * like Python's `str.encode(\"utf-8\", \"surrogatepass\")`, which the reference\n * SDK applies to canonical JSON. (TextEncoder would replace it with U+FFFD.)\n */\nexport function encodeUtf8SurrogatePass(s: string): Uint8Array<ArrayBuffer> {\n if (!hasLoneSurrogate(s)) return encoder.encode(s);\n const bytes: number[] = [];\n for (let i = 0; i < s.length; i++) {\n let c = s.charCodeAt(i);\n if (c >= 0xd800 && c <= 0xdbff && i + 1 < s.length) {\n const next = s.charCodeAt(i + 1);\n if (next >= 0xdc00 && next <= 0xdfff) {\n c = 0x10000 + ((c - 0xd800) << 10) + (next - 0xdc00);\n i++;\n }\n }\n if (c < 0x80) {\n bytes.push(c);\n } else if (c < 0x800) {\n bytes.push(0xc0 | (c >> 6), 0x80 | (c & 0x3f));\n } else if (c < 0x10000) {\n bytes.push(0xe0 | (c >> 12), 0x80 | ((c >> 6) & 0x3f), 0x80 | (c & 0x3f));\n } else {\n bytes.push(\n 0xf0 | (c >> 18),\n 0x80 | ((c >> 12) & 0x3f),\n 0x80 | ((c >> 6) & 0x3f),\n 0x80 | (c & 0x3f),\n );\n }\n }\n return new Uint8Array(bytes);\n}\n","// Typed webhook events (docs/DESIGN.md section 9.4).\n//\n// An event is the parsed webhook body itself, so every field Didit sends is\n// readable, including fields this version of the SDK does not describe. The one\n// change: a session event's `decision` is the generated decision type, whose\n// date-times are Date objects. Narrow it with `switch (event.webhook_type)`.\n//\n// How narrowing works with UnknownEvent in the union: the twelve known events\n// declare `webhook_type` as a string literal, and UnknownEvent reads it through\n// an index signature (`webhook_type${string}`) instead of declaring it. For a\n// union of ten or more object types whose discriminant is a literal in each\n// member that declares it, TypeScript maps each literal to its member, so\n// `case \"status.updated\":` narrows to exactly SessionStatusUpdatedEvent and\n// UnknownEvent drops out. A declared `webhook_type: string` (or any branded\n// string) on UnknownEvent would keep it in every case, because a string is\n// comparable to every literal. tests/webhooks/types.test.ts proves this.\n\nimport { decodeDates } from \"../core/dates.js\";\nimport { DATE_PLANS } from \"../resources/date-plans.js\";\nimport type { SessionDecision } from \"../types/components.js\";\n\n/** Which header authenticated a delivery. */\nexport type WebhookVerifiedBy = \"signature\" | \"signature_v2\" | \"signature_simple\";\n\n/** The environment of the application that sent the webhook. */\nexport type WebhookEnvironment = \"live\" | \"sandbox\" | (string & {});\n\n/** Fields on every event. */\nexport interface WebhookEventBase {\n /** Identifies the event; it stays the same across retries, so use it to deduplicate deliveries. */\n event_id?: string;\n /** The signed delivery time in unix seconds; verification checked it against the tolerance. */\n timestamp: number;\n /** When the event was created, in unix seconds. */\n created_at?: number;\n /** The Didit application the event belongs to. */\n application_id?: string;\n environment?: WebhookEnvironment;\n /**\n * Which header authenticated the delivery: `signature` (X-Signature, the raw\n * body), `signature_v2` (X-Signature-V2, the canonical JSON) or\n * `signature_simple` (the deprecated X-Signature-Simple). Not enumerable, so\n * it is not part of `JSON.stringify(event)`.\n */\n readonly verifiedBy: WebhookVerifiedBy;\n /**\n * `false` when only the deprecated X-Signature-Simple matched: it signs the\n * timestamp, session_id, status and webhook_type, not the body, so re-fetch\n * the record from the API before trusting anything else in the event. Not\n * enumerable.\n */\n readonly bodyAuthenticated: boolean;\n /** Fields this version of the SDK does not describe are kept as sent. */\n [key: string]: unknown;\n}\n\n/** Status of a verification session. */\ntype SessionStatus =\n | \"Not Started\"\n | \"In Progress\"\n | \"Awaiting User\"\n | \"In Review\"\n | \"Approved\"\n | \"Declined\"\n | \"Resubmitted\"\n | \"Expired\"\n | \"Kyc Expired\"\n | \"Abandoned\"\n | (string & {});\n\n/** Status of a user or business entity. */\ntype EntityStatus = \"ACTIVE\" | \"FLAGGED\" | \"BLOCKED\" | (string & {});\n\n/** Monitoring verdict of a transaction. */\ntype TransactionStatus = \"APPROVED\" | \"IN_REVIEW\" | \"DECLINED\" | \"AWAITING_USER\" | (string & {});\n\n/** Risk severity of a transaction. */\ntype TransactionSeverity = \"UNKNOWN\" | \"LOW\" | \"MEDIUM\" | \"HIGH\" | \"CRITICAL\" | (string & {});\n\n/** Direction of a transaction relative to its subject. */\ntype TransactionDirection = \"INBOUND\" | \"OUTBOUND\" | (string & {});\n\n/** Status of a Travel Rule exchange. */\ntype TravelRuleStatus =\n | \"AWAITING_COUNTERPARTY\"\n | \"ON_HOLD\"\n | \"COMPLETED\"\n | \"FINISHED\"\n | \"CANCELLED\"\n | \"EXPIRED\"\n | \"COUNTERPARTY_MISMATCHED_DATA\"\n | \"COUNTERPARTY_VASP_NOT_FOUND\"\n | \"COUNTERPARTY_VASP_NOT_REACHABLE\"\n | \"UNCONFIRMED_OWNERSHIP\"\n | \"COUNTERPARTY_VASP_GENERAL_DECLINE\"\n | \"NOT_ENOUGH_COUNTERPARTY_DATA\"\n | \"NOT_APPLICABLE\"\n | (string & {});\n\n/** Protocol a Travel Rule exchange runs on. */\ntype TravelRuleRail = \"INTERNAL\" | \"TRP\" | \"GTR\" | \"EMAIL\" | (string & {});\n\n/** Fields of the session events, `status.updated` and `data.updated`. */\ninterface SessionEventFields {\n /** The session: a user (KYC) or business (KYB) session. */\n session_id?: string;\n /** Set on business sessions, where it equals `session_id`. */\n business_session_id?: string | null;\n /** `business` on business sessions; user sessions may omit it. */\n session_kind?: \"user\" | \"business\" | (string & {}) | null;\n status?: SessionStatus | null;\n /** The workflow the session was created with. */\n workflow_id?: string | null;\n workflow_version?: number | null;\n /** The identifier you attached to the session. */\n vendor_data?: string | null;\n /** The metadata you attached to the session. */\n metadata?: Record<string, unknown> | null;\n /** The session decision, the same type `sessions.retrieveDecision` returns (date-times as `Date`). */\n decision?: SessionDecision | null;\n /** The steps the user must redo and why, when the status is `Resubmitted`. */\n resubmit_info?: unknown;\n}\n\n/** `status.updated`: a verification session changed status. */\nexport interface SessionStatusUpdatedEvent extends WebhookEventBase, SessionEventFields {\n webhook_type: \"status.updated\";\n}\n\n/** `data.updated`: the data of a verification session changed. */\nexport interface SessionDataUpdatedEvent extends WebhookEventBase, SessionEventFields {\n webhook_type: \"data.updated\";\n}\n\n/** Fields of `user.status.updated` and `user.data.updated`. */\ninterface UserEventFields {\n /** The user's identifier. */\n vendor_user_id?: string | null;\n /** The identifier you attached to the user. */\n vendor_data?: string | null;\n status?: EntityStatus | null;\n}\n\n/** `user.status.updated`: a user's status changed. */\nexport interface UserStatusUpdatedEvent extends WebhookEventBase, UserEventFields {\n webhook_type: \"user.status.updated\";\n}\n\n/** `user.data.updated`: a user's data changed. */\nexport interface UserDataUpdatedEvent extends WebhookEventBase, UserEventFields {\n webhook_type: \"user.data.updated\";\n}\n\n/** Fields of `business.status.updated` and `business.data.updated`. */\ninterface BusinessEventFields {\n /** The business's identifier. */\n vendor_business_id?: string | null;\n /** The identifier you attached to the business. */\n vendor_data?: string | null;\n status?: EntityStatus | null;\n}\n\n/** `business.status.updated`: a business's status changed. */\nexport interface BusinessStatusUpdatedEvent extends WebhookEventBase, BusinessEventFields {\n webhook_type: \"business.status.updated\";\n}\n\n/** `business.data.updated`: a business's data changed. */\nexport interface BusinessDataUpdatedEvent extends WebhookEventBase, BusinessEventFields {\n webhook_type: \"business.data.updated\";\n}\n\n/** `activity.created`. Didit has not published its payload beyond the envelope. */\nexport interface ActivityCreatedEvent extends WebhookEventBase {\n webhook_type: \"activity.created\";\n}\n\n/** Fields of `transaction.created` and `transaction.status.updated`. */\ninterface TransactionEventFields {\n /** Didit's transaction id. */\n transaction_id?: string;\n /** The transaction id you supplied. */\n txn_id?: string | null;\n status?: TransactionStatus | null;\n /** The risk score accumulated by rules. */\n score?: number | null;\n severity?: TransactionSeverity | null;\n /** The amount as a decimal string, exactly as sent. */\n amount?: string | null;\n /** Currency code or crypto asset symbol of `amount`. */\n currency?: string | null;\n direction?: TransactionDirection | null;\n /** The pending end-user action, if any. */\n action_required?: unknown;\n}\n\n/** `transaction.created`: a transaction was submitted for monitoring. */\nexport interface TransactionCreatedEvent extends WebhookEventBase, TransactionEventFields {\n webhook_type: \"transaction.created\";\n}\n\n/** `transaction.status.updated`: a transaction's monitoring verdict changed. */\nexport interface TransactionStatusUpdatedEvent extends WebhookEventBase, TransactionEventFields {\n webhook_type: \"transaction.status.updated\";\n}\n\n/** `travel_rule.status.updated`: a Travel Rule exchange changed status. */\nexport interface TravelRuleStatusUpdatedEvent extends WebhookEventBase {\n webhook_type: \"travel_rule.status.updated\";\n /** Didit's transaction id. */\n transaction_id?: string;\n /** The transaction id you supplied. */\n txn_id?: string | null;\n travel_rule_status?: TravelRuleStatus | null;\n /** The protocol of the exchange; empty when none was chosen. */\n rail?: TravelRuleRail | null;\n direction?: TransactionDirection | null;\n}\n\n/** `workflow.compliance_changed`. */\nexport interface WorkflowComplianceChangedEvent extends WebhookEventBase {\n webhook_type: \"workflow.compliance_changed\";\n workflow_id?: string | null;\n}\n\n/**\n * `kyb.registry_search.resolved`: an asynchronous business registry search\n * finished. The callback names its type `event_type`; the SDK then sets\n * `webhook_type` from it (not enumerable, so the payload stays as sent).\n *\n * Didit delivers this callback unsigned today (`X-Didit-Unsigned-Callback:\n * true`), so `verify` rejects it with `missing_signature`; read the result\n * from the API by its `request_id` instead of trusting the body.\n */\nexport interface KybRegistrySearchResolvedEvent extends WebhookEventBase {\n webhook_type: \"kyb.registry_search.resolved\";\n /** The search request, as `kyb.search` returned it. */\n request_id?: string | null;\n /** The identifier you attached to the search. */\n vendor_data?: string | null;\n metadata?: Record<string, unknown> | null;\n search_status?: \"pending\" | \"resolved\" | (string & {}) | null;\n search_resolved?: boolean | null;\n /** The registry result with the candidate companies. */\n kyb_registry?: Record<string, unknown> | null;\n}\n\n/**\n * An event type this version of the SDK has no typed event for. Every field of\n * the body is there as sent; `webhook_type` holds its type.\n */\n// A Record type would not be the interface member the narrowing relies on.\n// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style\nexport interface UnknownEvent extends WebhookEventBase {\n /** `webhook_type`: read through an index signature on purpose (see the top of this file). */\n [key: `webhook_type${string}`]: string;\n}\n\n/** Every event type this version of the SDK knows. */\nexport type KnownWebhookEvent =\n | SessionStatusUpdatedEvent\n | SessionDataUpdatedEvent\n | UserStatusUpdatedEvent\n | UserDataUpdatedEvent\n | BusinessStatusUpdatedEvent\n | BusinessDataUpdatedEvent\n | ActivityCreatedEvent\n | TransactionCreatedEvent\n | TransactionStatusUpdatedEvent\n | TravelRuleStatusUpdatedEvent\n | WorkflowComplianceChangedEvent\n | KybRegistrySearchResolvedEvent;\n\n/** A verified webhook event; narrow it with `switch (event.webhook_type)`. */\nexport type WebhookEvent = KnownWebhookEvent | UnknownEvent;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction defineHidden(target: object, name: string, value: unknown): void {\n Object.defineProperty(target, name, {\n value,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n}\n\n/**\n * Turn a verified body into its event, in place: `payload` must be a fresh\n * object the caller owns. Never throws on unknown data.\n *\n * `payload` is the `JSON.parse` view of the body, so integers above 2^53 in it\n * have lost precision (the signature itself is checked on the exact digits).\n */\nexport function parseEvent(\n payload: Record<string, unknown>,\n verifiedBy: WebhookVerifiedBy,\n): WebhookEvent {\n // The kyb.registry_search.resolved callback names its type event_type.\n if (!Object.hasOwn(payload, \"webhook_type\") && typeof payload.event_type === \"string\") {\n defineHidden(payload, \"webhook_type\", payload.event_type);\n }\n // Defined over any body field of the same name: with allowSimple the body is\n // not authenticated, so it must not be able to claim that it is.\n defineHidden(payload, \"verifiedBy\", verifiedBy);\n defineHidden(payload, \"bodyAuthenticated\", verifiedBy !== \"signature_simple\");\n // The decision is the generated response type, whose date-times are Date objects.\n const type = payload.webhook_type;\n if ((type === \"status.updated\" || type === \"data.updated\") && isRecord(payload.decision)) {\n decodeDates(payload.decision, \"SessionDecision\", DATE_PLANS);\n }\n return payload as WebhookEvent;\n}\n","// Webhook signature verification (docs/DESIGN.md section 9.3). The behaviour\n// mirrors the reference SDK (sdk-python, didit/webhooks/_verify.py): the same\n// checks in the same order, with the same reasons.\n\nimport { ConfigurationError, WebhookVerificationError } from \"../core/errors.js\";\nimport { webCrypto } from \"../core/runtime.js\";\nimport {\n canonicalJsonWithin,\n encodeUtf8SurrogatePass,\n hasLoneSurrogate,\n integerLiteralString,\n isPlainObject,\n pyFloatRepr,\n} from \"./canonical.js\";\nimport { parseEvent, type WebhookEvent, type WebhookVerifiedBy } from \"./events.js\";\nimport {\n decodeUtf8,\n isJsonObject,\n LosslessNumber,\n parseJson,\n type JsonObject,\n type JsonValue,\n} from \"./json.js\";\n\n/** How far, in seconds, the signed timestamp may be from now unless `tolerance` says otherwise. */\nexport const DEFAULT_WEBHOOK_TOLERANCE = 300;\n\n/**\n * The request headers: a Fetch `Headers` object, a Node.js or Express\n * `req.headers` record (any letter case, array values use their first\n * element), or an iterable of `[name, value]` pairs. Names are matched\n * case-insensitively, values are trimmed, and an empty signature header counts\n * as absent.\n */\nexport type WebhookHeaders =\n | Headers\n | Iterable<readonly [string, string]>\n | Readonly<Record<string, string | readonly string[] | undefined>>;\n\n/** The destination's signing secret, or several during a secret rotation. */\nexport type WebhookSecret = string | readonly string[];\n\n/** Options of {@link verifyWebhook}. */\nexport interface VerifyWebhookOptions {\n /**\n * How far, in seconds, the signed timestamp may be from now in either\n * direction (inclusive). Default 300.\n */\n tolerance?: number;\n /**\n * Also accept the deprecated `X-Signature-Simple` (and its `-Previous`). It\n * signs only the timestamp, session_id, status and webhook_type, so an event\n * it verifies has `bodyAuthenticated === false`: re-fetch the record from\n * the API before acting on it. Default false.\n */\n allowSimple?: boolean;\n}\n\n/** Options of {@link verifyWebhookParsed}. */\nexport interface VerifyWebhookParsedOptions {\n /** See {@link VerifyWebhookOptions.tolerance}. */\n tolerance?: number;\n}\n\nconst RAW_HEADERS = [\"x-signature\", \"x-signature-previous\"];\nconst V2_HEADERS = [\"x-signature-v2\", \"x-signature-v2-previous\"];\nconst SIMPLE_HEADERS = [\"x-signature-simple\", \"x-signature-simple-previous\"];\nconst SIGNATURE = /^[0-9a-f]{64}$/;\nconst TIMESTAMP_HEADER = /^[0-9]{1,20}$/;\n// The characters Python's str.strip() removes (the code points where str.isspace() is true).\nconst PY_WHITESPACE = new Set([\n 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x85, 0xa0, 0x1680, 0x2000, 0x2001,\n 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x2028, 0x2029, 0x202f,\n 0x205f, 0x3000,\n]);\n\n/** `s.strip()` in Python, which differs from String#trim (U+001C to U+001F, U+0085, U+FEFF). */\nfunction pyStrip(s: string): string {\n let start = 0;\n let end = s.length;\n while (start < end && PY_WHITESPACE.has(s.charCodeAt(start))) start++;\n while (end > start && PY_WHITESPACE.has(s.charCodeAt(end - 1))) end--;\n return s.slice(start, end);\n}\n\nconst encoder = new TextEncoder();\n\nfunction normaliseHeaders(headers: WebhookHeaders): Map<string, string> {\n const out = new Map<string, string>();\n const add = (name: unknown, value: unknown): void => {\n if (typeof name !== \"string\") return;\n const key = name.toLowerCase();\n // The first occurrence of a name wins, as in the reference (dict.setdefault).\n if (out.has(key)) return;\n let first: unknown = value;\n if (Array.isArray(first)) first = first.length ? (first[0] as unknown) : \"\";\n if (first === undefined || first === null) return;\n if (typeof first !== \"string\" && typeof first !== \"number\") return;\n out.set(key, pyStrip(String(first)));\n };\n if (typeof headers !== \"object\" || (headers as unknown) === null) {\n throw new TypeError(\n \"headers must be a Headers object, a record of header values or an iterable of [name, value] pairs.\",\n );\n }\n if (Symbol.iterator in headers) {\n for (const pair of headers as Iterable<unknown>) {\n if (!Array.isArray(pair)) {\n throw new TypeError(\"headers must be an iterable of [name, value] pairs.\");\n }\n add(pair[0], pair[1]);\n }\n } else {\n for (const [name, value] of Object.entries(headers)) add(name, value);\n }\n return out;\n}\n\nfunction normaliseSecrets(secret: unknown): string[] {\n if (secret === undefined || secret === null) {\n throw new ConfigurationError(\n `No webhook secret (${String(secret)}); copy it from the webhook destination in the console, for example into DIDIT_WEBHOOK_SECRET.`,\n );\n }\n if (secret instanceof ArrayBuffer || ArrayBuffer.isView(secret)) {\n throw new ConfigurationError(\"The webhook secret must be a string, not bytes.\");\n }\n let items: unknown[];\n if (typeof secret === \"string\") {\n items = [secret];\n } else if (typeof secret === \"object\" && Symbol.iterator in secret) {\n items = Array.from(secret as Iterable<unknown>);\n } else {\n throw new ConfigurationError(\"The webhook secret must be a string or an array of strings.\");\n }\n if (items.some((s) => typeof s !== \"string\")) {\n throw new ConfigurationError(\"Every webhook secret must be a string.\");\n }\n const secrets = items as string[];\n if (!secrets.length || secrets.some((s) => !s)) {\n throw new ConfigurationError(\n \"The webhook secret is empty; copy it from the webhook destination in the console.\",\n );\n }\n if (secrets.some(hasLoneSurrogate)) {\n throw new ConfigurationError(\"The webhook secret is not valid Unicode text.\");\n }\n return secrets;\n}\n\nfunction checkTolerance(tolerance: unknown): number {\n if (tolerance === undefined) return DEFAULT_WEBHOOK_TOLERANCE;\n // `!(x >= 0)` also refuses NaN, which would otherwise switch the replay check off.\n if (typeof tolerance !== \"number\" || !(tolerance >= 0)) {\n throw new ConfigurationError(\"tolerance must be 0 or more seconds.\");\n }\n return tolerance;\n}\n\n/** A body timestamp: its exact integer value and a double for the tolerance check. */\ninterface Timestamp {\n exact: bigint;\n approx: number;\n}\n\nfunction checkTimestamp(\n timestamp: Timestamp | null,\n headers: Map<string, string>,\n tolerance: number,\n): void {\n // Didit writes the timestamp as a JSON integer (integral floats are\n // shortened before signing), so anything else is not a Didit delivery.\n if (!timestamp) {\n throw new WebhookVerificationError(\n \"missing_timestamp\",\n \"The webhook body has no integer timestamp.\",\n );\n }\n const header = headers.get(\"x-timestamp\");\n // Present but empty is a mismatch, not absent, as in the reference.\n if (\n header !== undefined &&\n (!TIMESTAMP_HEADER.test(header) || BigInt(header) !== timestamp.exact)\n ) {\n throw new WebhookVerificationError(\n \"timestamp_mismatch\",\n \"X-Timestamp does not match the timestamp in the webhook body.\",\n );\n }\n const skew = Math.abs(Date.now() / 1000 - timestamp.approx);\n if (skew > tolerance) {\n throw new WebhookVerificationError(\n \"timestamp_out_of_tolerance\",\n `The webhook timestamp is more than ${tolerance} seconds away from now; it may be a replay.`,\n );\n }\n}\n\nfunction present(headers: Map<string, string>, names: readonly string[]): string[] {\n const values: string[] = [];\n for (const name of names) {\n const value = headers.get(name);\n if (value) values.push(value);\n }\n return values;\n}\n\n/** The candidates that can be signatures at all: 64-character lowercase hex. */\nfunction wellFormed(candidates: readonly string[]): string[] {\n return candidates.filter((c) => SIGNATURE.test(c));\n}\n\n// Slack for the canonical JSON of a re-encoded body (a proxy that writes `1e-7`\n// for Didit's `1e-07` makes the canonical form longer than the body it passes on).\nconst CANONICAL_SLACK = 64 * 1024;\n\n/**\n * Whether a well-formed `X-Signature-V2` candidate matches the canonical JSON\n * of `body`. The canonical text of a genuine delivery is never longer than the\n * body Didit sent, so it is built only up to `2 * size + 64 KiB` code units:\n * a body full of floats like `1e308` (each 309 digits once canonical) stops\n * there and fails as `invalid_signature` instead of costing gigabytes.\n */\nasync function matchesCanonical(\n body: unknown,\n size: number,\n keys: Keys,\n candidates: readonly string[],\n): Promise<boolean> {\n if (!wellFormed(candidates).length) return false;\n const canonical = canonicalJsonWithin(body, 2 * size + CANONICAL_SLACK);\n return canonical !== undefined && matches(encodeUtf8SurrogatePass(canonical), keys, candidates);\n}\n\n/** The length of `value` as JSON text, the size its canonical JSON is measured against. */\nfunction jsonLength(value: Record<string, unknown>): number {\n try {\n return JSON.stringify(value).length;\n } catch {\n // A bigint (or anything else JSON.stringify refuses): measure it as its digits.\n try {\n return JSON.stringify(value, (_key, item: unknown) =>\n typeof item === \"bigint\" ? item.toString() : item,\n ).length;\n } catch {\n // A cycle; canonicalJson refuses it as invalid_payload.\n return 0;\n }\n }\n}\n\nfunction hexToBytes(hex: string): Uint8Array<ArrayBuffer> {\n const bytes = new Uint8Array(hex.length / 2);\n for (let i = 0; i < bytes.length; i++) bytes[i] = parseInt(hex.slice(2 * i, 2 * i + 2), 16);\n return bytes;\n}\n\n/** HMAC keys for the secrets, imported once and only when a well-formed signature needs them. */\nclass Keys {\n private keys: Promise<CryptoKey[]> | undefined;\n\n constructor(private readonly secrets: readonly string[]) {}\n\n get(): Promise<CryptoKey[]> {\n this.keys ??= (async () => {\n const { subtle } = await webCrypto();\n return Promise.all(\n this.secrets.map((secret) =>\n subtle.importKey(\n \"raw\",\n encoder.encode(secret),\n { name: \"HMAC\", hash: \"SHA-256\" },\n false,\n [\"verify\"],\n ),\n ),\n );\n })();\n return this.keys;\n }\n}\n\n/**\n * Whether one of `candidates` is the HMAC-SHA256 of `message` under one of the\n * keys. Only 64-character lowercase hex values are compared, and\n * `crypto.subtle.verify` compares in constant time.\n */\nasync function matches(\n message: Uint8Array<ArrayBuffer>,\n keys: Keys,\n candidates: readonly string[],\n): Promise<boolean> {\n const signatures = wellFormed(candidates).map(hexToBytes);\n if (!signatures.length) return false;\n const { subtle } = await webCrypto();\n for (const key of await keys.get()) {\n for (const signature of signatures) {\n if (await subtle.verify(\"HMAC\", key, signature, message)) return true;\n }\n }\n return false;\n}\n\n/**\n * Python's `str()` of a body field, as the backend formats it for\n * X-Signature-Simple: absent is \"\", null is \"None\", booleans \"True\" and\n * \"False\", integers in decimal, floats in `repr` form, strings as they are.\n * `undefined` means the field cannot be reproduced (an object or array, whose\n * Python repr is not rebuilt here), so no simple signature can match.\n */\nfunction pyStr(value: JsonValue | undefined): string | undefined {\n if (value === undefined) return \"\";\n if (value === null) return \"None\";\n if (typeof value === \"boolean\") return value ? \"True\" : \"False\";\n if (typeof value === \"string\") return value;\n if (value instanceof LosslessNumber) {\n return value.isInteger ? integerLiteralString(value.raw) : pyFloatRepr(Number(value.raw));\n }\n return undefined;\n}\n\n/** What X-Signature-Simple signs: `{timestamp}:{session_id}:{status}:{webhook_type}`. */\nfunction simpleMessage(body: JsonObject): Uint8Array<ArrayBuffer> | undefined {\n const parts: string[] = [];\n for (const key of [\"timestamp\", \"session_id\", \"status\", \"webhook_type\"]) {\n const part = pyStr(body[key]);\n if (part === undefined) return undefined;\n parts.push(part);\n }\n const message = parts.join(\":\");\n // The backend encodes this strictly, so it never signs a lone surrogate.\n return hasLoneSurrogate(message) ? undefined : encoder.encode(message);\n}\n\nfunction bodyBytes(rawBody: unknown): { bytes: Uint8Array<ArrayBuffer>; text: string } {\n if (typeof rawBody === \"string\") {\n // Python's str.encode(\"utf-8\") refuses a lone surrogate.\n if (hasLoneSurrogate(rawBody)) {\n throw new WebhookVerificationError(\n \"invalid_payload\",\n \"The webhook body is not valid UTF-8 text.\",\n );\n }\n return { bytes: encoder.encode(rawBody), text: rawBody };\n }\n let bytes: Uint8Array<ArrayBuffer>;\n if (rawBody instanceof ArrayBuffer) {\n bytes = new Uint8Array(rawBody.slice(0));\n } else if (ArrayBuffer.isView(rawBody)) {\n // A copy, so the caller cannot change the bytes while they are verified.\n bytes = new Uint8Array(rawBody.byteLength);\n bytes.set(new Uint8Array(rawBody.buffer, rawBody.byteOffset, rawBody.byteLength));\n } else {\n throw new TypeError(\n \"verifyWebhook needs the raw request body as a string, Uint8Array or ArrayBuffer; for a body your framework already parsed, use verifyWebhookParsed.\",\n );\n }\n return { bytes, text: decodeUtf8(bytes) };\n}\n\n/**\n * Verify a webhook delivery and return its typed event.\n *\n * Pass the exact request body (a string, `Uint8Array` or `ArrayBuffer`), the\n * request headers and the destination's secret (an array of secrets during a\n * rotation). The delivery is accepted when `X-Signature` matches the body, or\n * `X-Signature-V2` matches its canonical JSON, or one of their `-Previous`\n * variants matches; signatures are compared in constant time. The body's\n * `timestamp` must be an integer, equal to `X-Timestamp` when that header is\n * present, and within `tolerance` seconds of now.\n *\n * The event is the parsed body (`JSON.parse`, so integers above 2^53 lose\n * precision in it; the signature is checked on the exact text) with two\n * non-enumerable properties, `verifiedBy` and `bodyAuthenticated`.\n *\n * Throws a `WebhookVerificationError` (see its `reason`) for anything the\n * request carries, and a `ConfigurationError` for a missing or empty secret or\n * an invalid tolerance.\n */\nexport async function verifyWebhook(\n rawBody: string | Uint8Array | ArrayBuffer,\n headers: WebhookHeaders,\n secret: WebhookSecret,\n options: VerifyWebhookOptions = {},\n): Promise<WebhookEvent> {\n const keys = new Keys(normaliseSecrets(secret));\n const tolerance = checkTolerance(options.tolerance);\n const { bytes, text } = bodyBytes(rawBody);\n const body = parseJson(text);\n if (!isJsonObject(body)) {\n throw new WebhookVerificationError(\"invalid_payload\", \"The webhook body is not a JSON object.\");\n }\n const normalised = normaliseHeaders(headers);\n const timestamp = body.timestamp;\n checkTimestamp(\n timestamp instanceof LosslessNumber && timestamp.isInteger\n ? { exact: BigInt(timestamp.raw), approx: Number(timestamp.raw) }\n : null,\n normalised,\n tolerance,\n );\n\n const raw = present(normalised, RAW_HEADERS);\n const v2 = present(normalised, V2_HEADERS);\n const simple = present(normalised, SIMPLE_HEADERS);\n if (!raw.length && !v2.length && !simple.length) {\n throw new WebhookVerificationError(\n \"missing_signature\",\n \"The delivery has no X-Signature header.\",\n );\n }\n let verifiedBy: WebhookVerifiedBy | undefined;\n if (raw.length && (await matches(bytes, keys, raw))) {\n verifiedBy = \"signature\";\n } else if (v2.length && (await matchesCanonical(body, bytes.length, keys, v2))) {\n verifiedBy = \"signature_v2\";\n } else if (options.allowSimple === true && simple.length) {\n const message = simpleMessage(body);\n if (message && (await matches(message, keys, simple))) verifiedBy = \"signature_simple\";\n }\n if (!verifiedBy) {\n throw new WebhookVerificationError(\n \"invalid_signature\",\n !raw.length && !v2.length && options.allowSimple !== true\n ? \"Only X-Signature-Simple is present, and it counts only with allowSimple.\"\n : \"No webhook signature matches the secret.\",\n );\n }\n return parseEvent(JSON.parse(text) as Record<string, unknown>, verifiedBy);\n}\n\n/**\n * Verify a delivery when the framework only gives you the parsed JSON body.\n *\n * Only `X-Signature-V2` (and `X-Signature-V2-Previous`) can be checked, because\n * the other signatures cover the exact body bytes; prefer {@link verifyWebhook}\n * with the raw body whenever you can get it. Numbers from `JSON.parse` lose\n * precision above 2^53, so a body with such an integer fails with\n * `invalid_signature` here unless it was parsed into a bigint.\n *\n * Returns a copy of `payload` with the non-enumerable `verifiedBy` and\n * `bodyAuthenticated`; `payload` itself is not changed.\n */\nexport async function verifyWebhookParsed(\n payload: unknown,\n headers: WebhookHeaders,\n secret: WebhookSecret,\n options: VerifyWebhookParsedOptions = {},\n): Promise<WebhookEvent> {\n const keys = new Keys(normaliseSecrets(secret));\n const tolerance = checkTolerance(options.tolerance);\n if (!isPlainObject(payload)) {\n throw new WebhookVerificationError(\n \"invalid_payload\",\n typeof payload === \"string\" || payload instanceof ArrayBuffer || ArrayBuffer.isView(payload)\n ? \"verifyWebhookParsed needs the parsed JSON object; pass the raw body to verifyWebhook.\"\n : \"The webhook payload is not a JSON object.\",\n );\n }\n const body = { ...payload };\n const normalised = normaliseHeaders(headers);\n const timestamp = body.timestamp;\n checkTimestamp(\n (typeof timestamp === \"number\" && Number.isInteger(timestamp)) || typeof timestamp === \"bigint\"\n ? { exact: BigInt(timestamp), approx: Number(timestamp) }\n : null,\n normalised,\n tolerance,\n );\n const v2 = present(normalised, V2_HEADERS);\n if (!v2.length) {\n throw new WebhookVerificationError(\n \"missing_signature\",\n \"verifyWebhookParsed needs X-Signature-V2; pass the raw body to verifyWebhook to check X-Signature.\",\n );\n }\n if (!(await matchesCanonical(body, jsonLength(body), keys, v2))) {\n throw new WebhookVerificationError(\n \"invalid_signature\",\n \"No webhook signature matches the secret.\",\n );\n }\n // A deep copy: parseEvent decodes the decision's date-times in place.\n return parseEvent(structuredClone(body), \"signature_v2\");\n}\n","// `didit.webhooks.verify(...)`: the webhook verifier, reachable from the client.\n// The generated `webhooks` resource extends this class.\n\nimport { APIResource } from \"../core/resource.js\";\nimport type { WebhookEvent } from \"./events.js\";\nimport {\n verifyWebhook,\n verifyWebhookParsed,\n type VerifyWebhookOptions,\n type VerifyWebhookParsedOptions,\n type WebhookHeaders,\n type WebhookSecret,\n} from \"./verify.js\";\n\n/**\n * Adds `verify` and `verifyParsed` to `didit.webhooks`. They need no API key and\n * send no request.\n */\nexport class WebhookHelpers extends APIResource {\n /** See {@link verifyWebhook}. */\n verify(\n rawBody: string | Uint8Array | ArrayBuffer,\n headers: WebhookHeaders,\n secret: WebhookSecret,\n options?: VerifyWebhookOptions,\n ): Promise<WebhookEvent> {\n return verifyWebhook(rawBody, headers, secret, options);\n }\n\n /** See {@link verifyWebhookParsed}. */\n verifyParsed(\n payload: unknown,\n headers: WebhookHeaders,\n secret: WebhookSecret,\n options?: VerifyWebhookParsedOptions,\n ): Promise<WebhookEvent> {\n return verifyWebhookParsed(payload, headers, secret, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type {\n WebhookConfig,\n WebhookDestinationDelivery,\n WebhookDestinationDeliveryDetail,\n} from \"../types/components.js\";\nimport type {\n WebhooksDestinationsCreateParams,\n WebhooksDestinationsCreateResponse,\n WebhooksDestinationsListDeliveriesParams,\n WebhooksDestinationsListDeliveriesResponse,\n WebhooksDestinationsListResponse,\n WebhooksDestinationsRetrieveAnalyticsParams,\n WebhooksDestinationsRetrieveAnalyticsResponse,\n WebhooksDestinationsRetrieveResponse,\n WebhooksDestinationsUpdateParams,\n WebhooksDestinationsUpdateResponse,\n WebhooksUpdateConfigParams,\n} from \"../types/webhooks.js\";\nimport { WebhookHelpers } from \"../webhooks/resource.js\";\n\nconst WEBHOOKS_DESTINATIONS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/webhook/destinations/\",\n body: \"json\",\n dates: {\n p: {\n previous_secret_expires_at: 1,\n created_at: 1,\n updated_at: 1,\n failing_since: 1,\n last_success_at: 1,\n summary: { p: { last_delivery_at: 1 } },\n },\n },\n};\nconst WEBHOOKS_DESTINATIONS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/webhook/destinations/{destination_uuid}/\",\n response: \"none\",\n};\nconst WEBHOOKS_DESTINATIONS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/webhook/destinations/\",\n dates: {\n i: {\n p: {\n last_delivery_at: 1,\n failing_since: 1,\n last_success_at: 1,\n created_at: 1,\n updated_at: 1,\n },\n },\n },\n};\nconst WEBHOOKS_DESTINATIONS_LIST_DELIVERIES: OperationSpec = {\n method: \"GET\",\n path: \"/v3/webhook/destinations/{destination_uuid}/deliveries/\",\n query: [\"limit\", \"offset\", \"date_from\", \"date_to\"],\n dates: { p: { results: { i: \"WebhookDestinationDelivery\" } } },\n};\nconst WEBHOOKS_DESTINATIONS_RESEND_DELIVERY: OperationSpec = {\n method: \"POST\",\n path: \"/v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/resend/\",\n dates: \"WebhookDestinationDeliveryDetail\",\n};\nconst WEBHOOKS_DESTINATIONS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/webhook/destinations/{destination_uuid}/\",\n dates: {\n p: {\n previous_secret_expires_at: 1,\n created_at: 1,\n updated_at: 1,\n failing_since: 1,\n last_success_at: 1,\n summary: { p: { last_delivery_at: 1 } },\n },\n },\n};\nconst WEBHOOKS_DESTINATIONS_RETRIEVE_ANALYTICS: OperationSpec = {\n method: \"GET\",\n path: \"/v3/webhook/destinations/{destination_uuid}/analytics/\",\n query: [\"date_from\", \"date_to\"],\n};\nconst WEBHOOKS_DESTINATIONS_RETRIEVE_DELIVERY: OperationSpec = {\n method: \"GET\",\n path: \"/v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/\",\n dates: \"WebhookDestinationDeliveryDetail\",\n};\nconst WEBHOOKS_DESTINATIONS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/webhook/destinations/{destination_uuid}/\",\n body: \"json\",\n dates: {\n p: {\n previous_secret_expires_at: 1,\n created_at: 1,\n updated_at: 1,\n failing_since: 1,\n last_success_at: 1,\n summary: { p: { last_delivery_at: 1 } },\n },\n },\n};\nconst WEBHOOKS_RETRIEVE_CONFIG: OperationSpec = {\n method: \"GET\",\n path: \"/v3/webhook/\",\n dates: \"WebhookConfig\",\n};\nconst WEBHOOKS_UPDATE_CONFIG: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/webhook/\",\n body: \"json\",\n dates: \"WebhookConfig\",\n};\n\n/** `webhooks.destinations` */\nexport class WebhooksDestinations extends APIResource {\n /**\n * Create webhook destination\n *\n * Create a webhook destination. The response includes the auto-generated `secret_shared_key` HMAC signing secret (also readable later via `GET /v3/webhook/destinations/{destination_uuid}/`). Always send `subscribed_events` with at least one event (no wildcards): an explicit empty list is rejected with 400, and omitting the field creates a destination subscribed to nothing, which never receives a webhook. The `(application, url)` pair must be unique among the application's destinations.\n *\n * `POST /v3/webhook/destinations/`\n */\n create(\n params: WebhooksDestinationsCreateParams,\n options?: RequestOptions,\n ): APIPromise<WebhooksDestinationsCreateResponse> {\n return this._client.request(WEBHOOKS_DESTINATIONS_CREATE, [], params, options);\n }\n\n /**\n * Delete webhook destination\n *\n * Permanently delete a webhook destination, its signing secret and its entire delivery log. This cannot be undone. No new webhook is sent to the destination's URL; other destinations subscribed to the same events keep receiving them. Afterwards the destination no longer appears in `GET /v3/webhook/destinations/`, and every route under `/v3/webhook/destinations/{destination_uuid}/`, including its deliveries, a delivery's detail and its resend, answers 404. The application's legacy `webhook_url` is set to the URL of the oldest remaining enabled destination, or cleared when no enabled destination is left. Calling DELETE again returns 404.\n *\n * `DELETE /v3/webhook/destinations/{destination_uuid}/`\n *\n * @param destinationUuid UUID of the destination to delete.\n */\n delete(destinationUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(\n WEBHOOKS_DESTINATIONS_DELETE,\n [destinationUuid],\n undefined,\n options,\n );\n }\n\n /**\n * List webhook destinations\n *\n * List all webhook destinations (unpaginated array, oldest first). Each item carries the destination's configuration, its delivery metrics for the last 30 days (`metrics_window_days`) with one `daily_points` entry per day, and its health (`health_status`, `failing_streak`, `failing_since`, `last_success_at`). The list has no `summary` object and never includes the signing secret: each item shows only `secret_last4`. Fetch a single destination (`GET /v3/webhook/destinations/{destination_uuid}/`) to read `secret_shared_key`.\n *\n * `GET /v3/webhook/destinations/`\n */\n list(options?: RequestOptions): APIPromise<WebhooksDestinationsListResponse[]> {\n return this._client.request(WEBHOOKS_DESTINATIONS_LIST, [], undefined, options);\n }\n\n /**\n * List webhook destination deliveries\n *\n * Page through every delivery attempt to one webhook destination, newest first. The first send of each event, each automatic [retry](https://docs.didit.me/integration/webhooks#retry-policy) and each resend are separate entries. Entries carry the HTTP status and response time but not the payload: fetch one delivery to read its headers and body. `count` is exact up to 100 and reads 100 above that, so follow `next` until it is `null`. Delivery records are available for about 30 days. A scoped API key needs `webhooks: read` and `decisions: read`; a key limited to some workflows or to approved sessions cannot use this endpoint.\n *\n * `GET /v3/webhook/destinations/{destination_uuid}/deliveries/`\n *\n * @param destinationUuid UUID of the destination (the `uuid` returned by `GET /v3/webhook/destinations/`).\n */\n listDeliveries(\n destinationUuid: string,\n params: WebhooksDestinationsListDeliveriesParams = {},\n options?: RequestOptions,\n ): PagePromise<WebhooksDestinationsListDeliveriesResponse, WebhookDestinationDelivery> {\n return this._client.requestPage(\n WEBHOOKS_DESTINATIONS_LIST_DELIVERIES,\n [destinationUuid],\n params,\n options,\n );\n }\n\n /**\n * Resend webhook destination delivery\n *\n * Send a past delivery again, for example after your endpoint was down. Didit takes the stored payload, sets a fresh `timestamp`, signs it again with the destination's current `secret_shared_key` (`X-Signature`, `X-Signature-V2`, `X-Signature-Simple` and `X-Timestamp`) and posts it to the delivery's `request_url`, even if the destination's URL has changed since or the destination is disabled. `event_id` and the rest of the payload are unchanged, so deduplicate on `event_id`. The call waits up to 5 seconds for your endpoint and returns the new delivery with `200` whatever your endpoint answered: read `response_status`. A resend is not retried automatically, every call sends again and creates a new delivery, and the request has no body. A scoped API key needs `webhooks: write` and `decisions: read`; a key limited to some workflows or to approved sessions cannot use this endpoint.\n *\n * `POST /v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/resend/`\n *\n * @param destinationUuid UUID of the destination the delivery was sent to.\n * @param deliveryUuid UUID of the delivery to resend: the `uuid` of an entry returned by `GET /v3/webhook/destinations/{destination_uuid}/deliveries/`.\n */\n resendDelivery(\n destinationUuid: string,\n deliveryUuid: string,\n options?: RequestOptions,\n ): APIPromise<WebhookDestinationDeliveryDetail> {\n return this._client.request(\n WEBHOOKS_DESTINATIONS_RESEND_DELIVERY,\n [destinationUuid, deliveryUuid],\n undefined,\n options,\n );\n }\n\n /**\n * Get webhook destination\n *\n * Retrieve one webhook destination with its `secret_shared_key` signing secret, its health (`health_status`, `failing_streak`, `failing_since`, `last_success_at`) and a delivery `summary` for the last 30 days. API-key callers always receive the secret in full; Console users without `read:webhooks` see an empty string.\n *\n * `GET /v3/webhook/destinations/{destination_uuid}/`\n *\n * @param destinationUuid UUID of the destination (the `uuid` returned from create / list).\n */\n retrieve(\n destinationUuid: string,\n options?: RequestOptions,\n ): APIPromise<WebhooksDestinationsRetrieveResponse> {\n return this._client.request(\n WEBHOOKS_DESTINATIONS_RETRIEVE,\n [destinationUuid],\n undefined,\n options,\n );\n }\n\n /**\n * Get webhook destination analytics\n *\n * Delivery totals, failure rate and response times for one webhook destination, over the whole range (`summary`) and per UTC day (`points`). Every attempt counts as a delivery: the first send of an event, each automatic [retry](https://docs.didit.me/integration/webhooks#retry-policy) and each resend. A delivery is failed when its recorded HTTP status is 400 or above, so timeouts (recorded as `504`) and connection failures (`503`) count as failed; a delivery still queued counts in `total_deliveries` only. Delivery records are available for about 30 days. A scoped API key needs `webhooks: read`.\n *\n * `GET /v3/webhook/destinations/{destination_uuid}/analytics/`\n *\n * @param destinationUuid UUID of the destination (the `uuid` returned by `GET /v3/webhook/destinations/`).\n */\n retrieveAnalytics(\n destinationUuid: string,\n params: WebhooksDestinationsRetrieveAnalyticsParams = {},\n options?: RequestOptions,\n ): APIPromise<WebhooksDestinationsRetrieveAnalyticsResponse> {\n return this._client.request(\n WEBHOOKS_DESTINATIONS_RETRIEVE_ANALYTICS,\n [destinationUuid],\n params,\n options,\n );\n }\n\n /**\n * Get webhook destination delivery\n *\n * Retrieve one delivery attempt to a webhook destination with the exact request headers and JSON body Didit sent, the HTTP status your endpoint returned and the response time. `request_header` and `request_body` are JSON text: parse them to read the signature headers and the payload, for example to check your [signature verification](https://docs.didit.me/integration/webhooks#signature-verification) against the destination's `secret_shared_key`. A delivery never contains the signing secret, and Didit does not record your endpoint's response body. A scoped API key needs `webhooks: read` and `decisions: read`; a key limited to some workflows or to approved sessions cannot use this endpoint.\n *\n * `GET /v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/`\n *\n * @param destinationUuid UUID of the destination the delivery was sent to.\n * @param deliveryUuid UUID of the delivery: the `uuid` of an entry returned by `GET /v3/webhook/destinations/{destination_uuid}/deliveries/`.\n */\n retrieveDelivery(\n destinationUuid: string,\n deliveryUuid: string,\n options?: RequestOptions,\n ): APIPromise<WebhookDestinationDeliveryDetail> {\n return this._client.request(\n WEBHOOKS_DESTINATIONS_RETRIEVE_DELIVERY,\n [destinationUuid, deliveryUuid],\n undefined,\n options,\n );\n }\n\n /**\n * Update webhook destination\n *\n * Update a webhook destination. **`subscribed_events` is REPLACED wholesale, not merged**: fetch first, append, resend. Secret is not rotated. A `uuid` in the body is ignored: the path names the destination.\n *\n * `PATCH /v3/webhook/destinations/{destination_uuid}/`\n *\n * @param destinationUuid UUID of the destination to update.\n */\n update(\n destinationUuid: string,\n params: WebhooksDestinationsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<WebhooksDestinationsUpdateResponse> {\n return this._client.request(WEBHOOKS_DESTINATIONS_UPDATE, [destinationUuid], params, options);\n }\n}\n\n/** `webhooks` */\nexport class Webhooks extends WebhookHelpers {\n readonly destinations: WebhooksDestinations = new WebhooksDestinations(this._client);\n\n /**\n * Get webhook configuration\n *\n * Return the application's webhook settings in one call: every [webhook destination](https://docs.didit.me/management-api/webhook/list-destinations) with its signing secret, the event types a destination can subscribe to, the application-level (legacy) webhook URL, version and secret, the data and biometric-template retention policy, and the Digital ID wallet return hosts. Didit delivers webhooks to destinations, each signed with its own `secret_shared_key`; the top-level `webhook_url`, `webhook_version` and `secret_shared_key` are used only while no destination is enabled, and then only for `status.updated` and `data.updated`. The response contains signing secrets, so keep it out of logs and client-side code. A scoped API key needs `webhooks: read`.\n *\n * `GET /v3/webhook/`\n */\n retrieveConfig(options?: RequestOptions): APIPromise<WebhookConfig> {\n return this._client.request(WEBHOOKS_RETRIEVE_CONFIG, [], undefined, options);\n }\n\n /**\n * Update webhook configuration\n *\n * Partially update application-level settings: the legacy webhook URL, version and secret, the data and biometric-template retention policy, and the Digital ID wallet return hosts. Send only the fields to change; the response is the full configuration, the same shape as `GET /v3/webhook/`. Destinations are not managed here: create, update and delete them with the `/v3/webhook/destinations/` endpoints, and do not send an `endpoints` field to this endpoint. A `data_retention_months` change also applies to existing sessions, and sessions it deletes cannot be restored; read [Data retention](https://docs.didit.me/console/data-retention) first. A scoped API key needs `webhooks: write`.\n *\n * `PATCH /v3/webhook/`\n */\n updateConfig(\n params: WebhooksUpdateConfigParams = {},\n options?: RequestOptions,\n ): APIPromise<WebhookConfig> {\n return this._client.request(WEBHOOKS_UPDATE_CONFIG, [], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport type { APIPromise } from \"../core/api-promise.js\";\nimport type { OperationSpec } from \"../core/operation.js\";\nimport type { PagePromise } from \"../core/pagination.js\";\nimport type { RequestOptions } from \"../core/request-options.js\";\nimport { APIResource } from \"../core/resource.js\";\nimport type { WorkflowDetail, WorkflowListItem } from \"../types/components.js\";\nimport type {\n WorkflowsCreateParams,\n WorkflowsListParams,\n WorkflowsListResponse,\n WorkflowsUpdateParams,\n} from \"../types/workflows.js\";\n\nconst WORKFLOWS_CREATE: OperationSpec = {\n method: \"POST\",\n path: \"/v3/workflows/\",\n body: \"json\",\n dates: \"WorkflowDetail\",\n};\nconst WORKFLOWS_DELETE: OperationSpec = {\n method: \"DELETE\",\n path: \"/v3/workflows/{settings_uuid}/\",\n response: \"none\",\n};\nconst WORKFLOWS_LIST: OperationSpec = {\n method: \"GET\",\n path: \"/v3/workflows/\",\n query: [\"limit\", \"offset\"],\n dates: { p: { results: { i: \"WorkflowListItem\" } } },\n};\nconst WORKFLOWS_RETRIEVE: OperationSpec = {\n method: \"GET\",\n path: \"/v3/workflows/{settings_uuid}/\",\n dates: \"WorkflowDetail\",\n};\nconst WORKFLOWS_UPDATE: OperationSpec = {\n method: \"PATCH\",\n path: \"/v3/workflows/{settings_uuid}/\",\n body: \"json\",\n dates: \"WorkflowDetail\",\n};\n\n/** `workflows` */\nexport class Workflows extends APIResource {\n /**\n * Create workflow\n *\n * Create a simple workflow. Send `features` in execution order (ordering rules apply); defaults to `published` v1. The body accepts ONLY the fields listed in `SimpleWorkflowRequest` - any other key (including `workflow_type`) is rejected with a 400. Not idempotent - each call creates a new workflow. Maximum 50 workflows per application.\n *\n * `POST /v3/workflows/`\n */\n create(params: WorkflowsCreateParams, options?: RequestOptions): APIPromise<WorkflowDetail> {\n return this._client.request(WORKFLOWS_CREATE, [], params, options);\n }\n\n /**\n * Delete workflow\n *\n * Permanently delete one workflow version (no undo). Existing sessions keep their verification results but their workflow reference is cleared; other versions in the same `workflow_id` group are not deleted.\n *\n * `DELETE /v3/workflows/{settings_uuid}/`\n *\n * @param settingsUuid Per-version UUID of the workflow to delete.\n */\n delete(settingsUuid: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request(WORKFLOWS_DELETE, [settingsUuid], undefined, options);\n }\n\n /**\n * List workflows\n *\n * List your workflows, newest first, in a limit/offset pagination envelope (`{count, next, previous, results}`, default page size 50). Each row is one version; `workflow_id` is the stable group ID and new sessions use the latest `published` version.\n *\n * `GET /v3/workflows/`\n */\n list(\n params: WorkflowsListParams = {},\n options?: RequestOptions,\n ): PagePromise<WorkflowsListResponse, WorkflowListItem> {\n return this._client.requestPage(WORKFLOWS_LIST, [], params, options);\n }\n\n /**\n * Get workflow\n *\n * Fetch full configuration for one workflow version by `settings_uuid`: feature toggles, thresholds, allowed documents, graph, retry policy, callbacks, and pricing.\n *\n * `GET /v3/workflows/{settings_uuid}/`\n *\n * @param settingsUuid Per-version UUID of the workflow (the `uuid` value returned by the list endpoint). Each version of a workflow has its own `settings_uuid`.\n */\n retrieve(settingsUuid: string, options?: RequestOptions): APIPromise<WorkflowDetail> {\n return this._client.request(WORKFLOWS_RETRIEVE, [settingsUuid], undefined, options);\n }\n\n /**\n * Update workflow\n *\n * Update a workflow. Versioning depends on the `status` field you send and the current state of the version: (1) no `status` on a **published** version → the published version is updated in place (same `uuid`, same `version`); (2) no `status` on a **draft** → the draft is updated and immediately published; (3) `status: \"published\"` on a **published** version → a NEW published version is created under the same `workflow_id` (new `uuid`, `version` + 1) and returned, and any existing draft in the group is deleted; (4) `status: \"draft\"` keeps a draft as a draft (autosave) but is rejected with 400 on a published version (`\"Cannot revert a published version to draft.\"`). The body accepts the same strict field whitelist as create - unknown keys are rejected with 400.\n *\n * `PATCH /v3/workflows/{settings_uuid}/`\n *\n * @param settingsUuid Per-version UUID of the workflow to update.\n */\n update(\n settingsUuid: string,\n params: WorkflowsUpdateParams = {},\n options?: RequestOptions,\n ): APIPromise<WorkflowDetail> {\n return this._client.request(WORKFLOWS_UPDATE, [settingsUuid], params, options);\n }\n}\n","// Code generated by codegen from openapi/*.json. DO NOT EDIT.\n\nimport { APIClient } from \"../core/api-client.js\";\nimport type { DatePlan } from \"../core/dates.js\";\nimport { DATE_PLANS } from \"./date-plans.js\";\nimport { Account } from \"./account.js\";\nimport { AddressValidation } from \"./address-validation.js\";\nimport { AgeEstimation } from \"./age-estimation.js\";\nimport { Aml } from \"./aml.js\";\nimport { AmlMonitoring } from \"./aml-monitoring.js\";\nimport { Analytics } from \"./analytics.js\";\nimport { Bank } from \"./bank.js\";\nimport { Billing } from \"./billing.js\";\nimport { BiometricTemplates } from \"./biometric-templates.js\";\nimport { Blocklist } from \"./blocklist.js\";\nimport { BusinessSessions } from \"./business-sessions.js\";\nimport { Businesses } from \"./businesses.js\";\nimport { Cases } from \"./cases.js\";\nimport { Customization } from \"./customization.js\";\nimport { DatabaseValidation } from \"./database-validation.js\";\nimport { DocumentAi } from \"./document-ai.js\";\nimport { Email } from \"./email.js\";\nimport { FaceMatch } from \"./face-match.js\";\nimport { FaceSearch } from \"./face-search.js\";\nimport { FraudChecks } from \"./fraud-checks.js\";\nimport { IdVerification } from \"./id-verification.js\";\nimport { IdWallets } from \"./id-wallets.js\";\nimport { Investigator } from \"./investigator.js\";\nimport { Ip } from \"./ip.js\";\nimport { Kyb } from \"./kyb.js\";\nimport { Lists } from \"./lists.js\";\nimport { MonitoringEvents } from \"./monitoring-events.js\";\nimport { Networks } from \"./networks.js\";\nimport { PassiveLiveness } from \"./passive-liveness.js\";\nimport { Phone } from \"./phone.js\";\nimport { Pricing } from \"./pricing.js\";\nimport { ProofOfAddress } from \"./proof-of-address.js\";\nimport { Questionnaires } from \"./questionnaires.js\";\nimport { RegulatoryReports } from \"./regulatory-reports.js\";\nimport { ReportTemplates } from \"./report-templates.js\";\nimport { Sessions } from \"./sessions.js\";\nimport { Transactions } from \"./transactions.js\";\nimport { TravelRule } from \"./travel-rule.js\";\nimport { Users } from \"./users.js\";\nimport { WalletScreening } from \"./wallet-screening.js\";\nimport { Webhooks } from \"./webhooks.js\";\nimport { Workflows } from \"./workflows.js\";\n\n/** Every resource of the API, one property per top-level resource. */\nexport abstract class DiditResources extends APIClient {\n protected override readonly datePlans: Readonly<Record<string, DatePlan>> = DATE_PLANS;\n readonly account: Account = new Account(this);\n readonly addressValidation: AddressValidation = new AddressValidation(this);\n readonly ageEstimation: AgeEstimation = new AgeEstimation(this);\n readonly aml: Aml = new Aml(this);\n readonly amlMonitoring: AmlMonitoring = new AmlMonitoring(this);\n readonly analytics: Analytics = new Analytics(this);\n readonly bank: Bank = new Bank(this);\n readonly billing: Billing = new Billing(this);\n readonly biometricTemplates: BiometricTemplates = new BiometricTemplates(this);\n readonly blocklist: Blocklist = new Blocklist(this);\n readonly businessSessions: BusinessSessions = new BusinessSessions(this);\n readonly businesses: Businesses = new Businesses(this);\n readonly cases: Cases = new Cases(this);\n readonly customization: Customization = new Customization(this);\n readonly databaseValidation: DatabaseValidation = new DatabaseValidation(this);\n readonly documentAi: DocumentAi = new DocumentAi(this);\n readonly email: Email = new Email(this);\n readonly faceMatch: FaceMatch = new FaceMatch(this);\n readonly faceSearch: FaceSearch = new FaceSearch(this);\n readonly fraudChecks: FraudChecks = new FraudChecks(this);\n readonly idVerification: IdVerification = new IdVerification(this);\n readonly idWallets: IdWallets = new IdWallets(this);\n readonly investigator: Investigator = new Investigator(this);\n readonly ip: Ip = new Ip(this);\n readonly kyb: Kyb = new Kyb(this);\n readonly lists: Lists = new Lists(this);\n readonly monitoringEvents: MonitoringEvents = new MonitoringEvents(this);\n readonly networks: Networks = new Networks(this);\n readonly passiveLiveness: PassiveLiveness = new PassiveLiveness(this);\n readonly phone: Phone = new Phone(this);\n readonly pricing: Pricing = new Pricing(this);\n readonly proofOfAddress: ProofOfAddress = new ProofOfAddress(this);\n readonly questionnaires: Questionnaires = new Questionnaires(this);\n readonly regulatoryReports: RegulatoryReports = new RegulatoryReports(this);\n readonly reportTemplates: ReportTemplates = new ReportTemplates(this);\n readonly sessions: Sessions = new Sessions(this);\n readonly transactions: Transactions = new Transactions(this);\n readonly travelRule: TravelRule = new TravelRule(this);\n readonly users: Users = new Users(this);\n readonly walletScreening: WalletScreening = new WalletScreening(this);\n readonly webhooks: Webhooks = new Webhooks(this);\n readonly workflows: Workflows = new Workflows(this);\n}\n\nexport { Account, AccountApplications, AccountOrganizations } from \"./account.js\";\nexport { AddressValidation } from \"./address-validation.js\";\nexport { AgeEstimation } from \"./age-estimation.js\";\nexport { Aml } from \"./aml.js\";\nexport { AmlMonitoring } from \"./aml-monitoring.js\";\nexport { Analytics } from \"./analytics.js\";\nexport { Bank } from \"./bank.js\";\nexport { Billing } from \"./billing.js\";\nexport { BiometricTemplates } from \"./biometric-templates.js\";\nexport { Blocklist } from \"./blocklist.js\";\nexport { BusinessSessions } from \"./business-sessions.js\";\nexport { Businesses } from \"./businesses.js\";\nexport {\n Cases,\n CasesBlueprints,\n CasesChecklist,\n CasesLinks,\n CasesNotes,\n CasesRegulatoryReports,\n CasesRequests,\n CasesRoutingRules,\n CasesTeams,\n} from \"./cases.js\";\nexport { Customization } from \"./customization.js\";\nexport { DatabaseValidation } from \"./database-validation.js\";\nexport { DocumentAi } from \"./document-ai.js\";\nexport { Email } from \"./email.js\";\nexport { FaceMatch } from \"./face-match.js\";\nexport { FaceSearch } from \"./face-search.js\";\nexport { FraudChecks } from \"./fraud-checks.js\";\nexport { IdVerification } from \"./id-verification.js\";\nexport { IdWallets } from \"./id-wallets.js\";\nexport { Investigator } from \"./investigator.js\";\nexport { Ip } from \"./ip.js\";\nexport { Kyb } from \"./kyb.js\";\nexport { Lists, ListsEntries } from \"./lists.js\";\nexport { MonitoringEvents } from \"./monitoring-events.js\";\nexport { Networks, NetworksNotes } from \"./networks.js\";\nexport { PassiveLiveness } from \"./passive-liveness.js\";\nexport { Phone } from \"./phone.js\";\nexport { Pricing } from \"./pricing.js\";\nexport { ProofOfAddress } from \"./proof-of-address.js\";\nexport { Questionnaires } from \"./questionnaires.js\";\nexport { RegulatoryReports } from \"./regulatory-reports.js\";\nexport { ReportTemplates } from \"./report-templates.js\";\nexport {\n Sessions,\n SessionsImports,\n SessionsReviews,\n SessionsSignatures,\n SessionsWebhooks,\n} from \"./sessions.js\";\nexport {\n Transactions,\n TransactionsNotes,\n TransactionsRules,\n TransactionsTravelRule,\n} from \"./transactions.js\";\nexport {\n TravelRule,\n TravelRuleCounterpartyContacts,\n TravelRuleNetworks,\n TravelRuleTransfers,\n TravelRuleWalletAddresses,\n TravelRuleWalletProofs,\n TravelRuleWorkspaceResource,\n} from \"./travel-rule.js\";\nexport { Users } from \"./users.js\";\nexport { WalletScreening } from \"./wallet-screening.js\";\nexport { Webhooks, WebhooksDestinations } from \"./webhooks.js\";\nexport { Workflows } from \"./workflows.js\";\n","import { type ClientOptions } from \"./core/api-client.js\";\nimport { DiditResources } from \"./resources/index.js\";\n\n/**\n * The Didit API client.\n *\n * ```ts\n * import Didit from \"@didit-protocol/sdk-node\";\n *\n * const didit = new Didit(); // reads DIDIT_API_KEY\n * const session = await didit.sessions.create({ workflow_id: \"...\" });\n * ```\n *\n * Create one client per process and reuse it. `apiKey` falls back to\n * `DIDIT_API_KEY`, `organizationId` and `applicationId` to\n * `DIDIT_ORGANIZATION_ID` and `DIDIT_APPLICATION_ID`. A client without an API\n * key can still call `didit.account` and verify webhooks.\n */\nexport class Didit extends DiditResources {\n constructor(options: ClientOptions = {}) {\n super(options);\n }\n\n /** A new client with some options changed; this one is left as it is. */\n withOptions(options: ClientOptions): Didit {\n return new Didit(this.mergedOptions(options));\n }\n}\n","// Verify Didit webhook deliveries and read them as typed events\n// (docs/DESIGN.md section 9).\n//\n// import { webhooks, WebhookVerificationError } from \"@didit-protocol/sdk-node\";\n//\n// const event = await webhooks.verify(rawBody, req.headers, process.env.DIDIT_WEBHOOK_SECRET!);\n// switch (event.webhook_type) {\n// case \"status.updated\":\n// event.session_id; // SessionStatusUpdatedEvent\n// }\n//\n// The same functions are on the client as `didit.webhooks.verify` and\n// `didit.webhooks.verifyParsed`. Nothing here depends on a framework.\n\nimport { verifyWebhook, verifyWebhookParsed } from \"./verify.js\";\n\nexport { canonicalJson } from \"./canonical.js\";\nexport type {\n ActivityCreatedEvent,\n BusinessDataUpdatedEvent,\n BusinessStatusUpdatedEvent,\n KnownWebhookEvent,\n KybRegistrySearchResolvedEvent,\n SessionDataUpdatedEvent,\n SessionStatusUpdatedEvent,\n TransactionCreatedEvent,\n TransactionStatusUpdatedEvent,\n TravelRuleStatusUpdatedEvent,\n UnknownEvent,\n UserDataUpdatedEvent,\n UserStatusUpdatedEvent,\n WebhookEnvironment,\n WebhookEvent,\n WebhookEventBase,\n WebhookVerifiedBy,\n WorkflowComplianceChangedEvent,\n} from \"./events.js\";\nexport {\n DEFAULT_WEBHOOK_TOLERANCE,\n verifyWebhook,\n verifyWebhookParsed,\n type VerifyWebhookOptions,\n type VerifyWebhookParsedOptions,\n type WebhookHeaders,\n type WebhookSecret,\n} from \"./verify.js\";\n\n/**\n * The webhook verifier without a client:\n * `await webhooks.verify(rawBody, req.headers, secret)`.\n */\nexport const webhooks = {\n /** See {@link verifyWebhook}. */\n verify: verifyWebhook,\n /** See {@link verifyWebhookParsed}. */\n verifyParsed: verifyWebhookParsed,\n} as const;\n","// Byte and JSON helpers for tokens, keys and publishable keys, on web platform\n// APIs only (atob, btoa, TextEncoder, TextDecoder).\n\nconst BASE64URL = /^[A-Za-z0-9_-]*$/;\n\n// fatal: invalid UTF-8 is an error, not U+FFFD. ignoreBOM: a byte order mark is\n// kept, so JSON.parse refuses it as Python's json.loads does.\nconst UTF8 = new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true });\nconst ENCODER = new TextEncoder();\n\n/** Unpadded base64url (RFC 7515 section 2) to bytes, or `null` when `text` is not that. */\nexport function base64UrlDecode(text: string): Uint8Array<ArrayBuffer> | null {\n if (!BASE64URL.test(text) || text.length % 4 === 1) return null;\n const padded =\n text.replace(/-/g, \"+\").replace(/_/g, \"/\") + \"=\".repeat((4 - (text.length % 4)) % 4);\n const binary = atob(padded);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);\n // atob ignores the unused low bits of the last character, so several strings\n // decode to the same bytes; only the canonical one is accepted.\n return base64UrlEncode(bytes) === text ? bytes : null;\n}\n\n/** Bytes to unpadded base64url. */\nexport function base64UrlEncode(bytes: Uint8Array): string {\n let binary = \"\";\n for (const byte of bytes) binary += String.fromCharCode(byte);\n return btoa(binary).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\n\n/** Strict UTF-8 to a string, or `null` when the bytes are not valid UTF-8. */\nexport function utf8Decode(bytes: Uint8Array): string | null {\n try {\n return UTF8.decode(bytes);\n } catch {\n return null;\n }\n}\n\n/** A string to UTF-8 bytes. */\nexport function utf8Encode(text: string): Uint8Array<ArrayBuffer> {\n return ENCODER.encode(text);\n}\n\n/** A JSON object (not an array, not `null`). */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** Whether `object` has `name` as its own member (not one inherited from Object.prototype). */\nexport function hasMember(object: Record<string, unknown>, name: string): boolean {\n return Object.prototype.hasOwnProperty.call(object, name);\n}\n\n/** Deeper nesting than any token carries; bounds the work on untrusted input. */\nconst MAX_DEPTH = 64;\n\n/**\n * `JSON.parse` that also refuses an object with two members of the same name\n * and nesting deeper than 64 levels, by throwing a `SyntaxError`. JSON.parse\n * keeps the last duplicate silently, so `{\"alg\":\"ES256\",\"alg\":\"none\"}` would\n * mean different things to different parsers; a token must be unambiguous.\n */\nexport function parseStrictJson(text: string): unknown {\n const value: unknown = JSON.parse(text);\n // The text is valid JSON now, so a scan only has to track strings and brackets.\n const stack: (Set<string> | null)[] = [];\n let expectKey = false;\n for (let i = 0; i < text.length; i++) {\n const char = text[i];\n if (char === '\"') {\n let end = i + 1;\n while (text[end] !== '\"') end += text[end] === \"\\\\\" ? 2 : 1;\n const members = stack[stack.length - 1];\n if (expectKey && members) {\n const name = JSON.parse(text.slice(i, end + 1)) as string;\n if (members.has(name)) throw new SyntaxError(\"Duplicate member name in a JSON object.\");\n members.add(name);\n expectKey = false;\n }\n i = end;\n } else if (char === \"{\" || char === \"[\") {\n stack.push(char === \"{\" ? new Set() : null);\n if (stack.length > MAX_DEPTH) throw new SyntaxError(\"JSON nested too deeply.\");\n expectKey = char === \"{\";\n } else if (char === \"}\" || char === \"]\") {\n stack.pop();\n expectKey = false;\n } else if (char === \",\") {\n expectKey = stack[stack.length - 1] instanceof Set;\n }\n }\n return value;\n}\n\n/** Compare two strings without an early exit on the first differing character. */\nexport function constantTimeEqual(a: string, b: string): boolean {\n const left = utf8Encode(a);\n const right = utf8Encode(b);\n if (left.length !== right.length) return false;\n let difference = 0;\n for (let i = 0; i < left.length; i++) difference |= (left[i] ?? 0) ^ (right[i] ?? 0);\n return difference === 0;\n}\n","// JWS parsing and claim checks for Didit Authentication tokens (no I/O here).\n//\n// Didit issuers sign with ES256 only (service-didit-auth\n// authentication/services/issuer.py): access tokens carry the header\n// `typ: at+jwt` and ID tokens `typ: JWT`. Every other algorithm, including\n// `none`, is refused before any key is looked up.\n\nimport { TokenVerificationError, type TokenVerificationReason } from \"../core/errors.js\";\nimport {\n base64UrlDecode,\n constantTimeEqual,\n hasMember,\n isRecord,\n parseStrictJson,\n utf8Decode,\n utf8Encode,\n} from \"./encoding.js\";\n\n/** The one algorithm Didit issuers sign with. */\nexport const ALGORITHM = \"ES256\";\n/** Bounds the work done on an untrusted token. */\nexport const MAX_TOKEN_LENGTH = 16384;\n\n/** Which kind of token is being verified. */\nexport type TokenKind = \"access\" | \"id\";\n\n// Media type names are case-insensitive and may omit \"application/\" (RFC 7515\n// section 4.1.9). Access tokens are typed at+jwt (RFC 9068).\nconst ACCESS_TYPES = new Set([\"at+jwt\", \"application/at+jwt\"]);\nconst ID_TYPES = new Set([\"jwt\", \"application/jwt\"]);\n\n/** A JWS whose header passed the algorithm and type checks; not yet verified. */\nexport interface ParsedToken {\n header: Record<string, unknown>;\n claims: Record<string, unknown>;\n signingInput: Uint8Array<ArrayBuffer>;\n signature: Uint8Array<ArrayBuffer>;\n kid: string;\n}\n\n/** What `checkClaims` compares the claims with. */\nexport interface ClaimExpectations {\n kind: TokenKind;\n issuer: string;\n /** Any one of these must be in `aud`; `null` skips the audience check. */\n audience: readonly string[] | null;\n /** The ID token's `nonce` must equal it; `null` skips the nonce check. */\n nonce: string | null;\n /** Seconds of clock skew allowed for `exp`, `nbf` and `iat`. */\n leeway: number;\n /** Seconds since the epoch. */\n now: number;\n}\n\nfunction fail(reason: TokenVerificationReason, message: string): never {\n throw new TokenVerificationError(reason, message);\n}\n\n// JSON.stringify returns undefined for undefined, functions and symbols.\nfunction jsonText(value: unknown): string | undefined {\n return JSON.stringify(value);\n}\n\n/**\n * A short, safe rendering of a header or claim value for an error message. The\n * values come from JSON.parse, so JSON.stringify cannot throw on them.\n */\nexport function shown(value: unknown): string {\n const text = jsonText(value) ?? String(value);\n return text.length <= 64 ? text : `${text.slice(0, 61)}...`;\n}\n\nfunction jsonObject(segment: string, part: string): Record<string, unknown> {\n const bytes = base64UrlDecode(segment);\n if (!bytes) fail(\"malformed\", `The token ${part} is not base64url.`);\n const text = utf8Decode(bytes);\n let value: unknown;\n try {\n if (text === null) throw new SyntaxError(\"not UTF-8\");\n value = parseStrictJson(text);\n } catch {\n fail(\"malformed\", `The token ${part} is not valid JSON.`);\n }\n if (!isRecord(value)) fail(\"malformed\", `The token ${part} is not a JSON object.`);\n return value;\n}\n\nfunction checkType(header: Record<string, unknown>, kind: TokenKind): void {\n const typ = header.typ;\n if (kind === \"access\") {\n if (typeof typ !== \"string\" || !ACCESS_TYPES.has(typ.toLowerCase())) {\n fail(\n \"invalid_type\",\n `The token is not an access token: its header typ is ${shown(typ)}, not \"at+jwt\".`,\n );\n }\n return;\n }\n // ID tokens are signed with typ JWT; refusing at+jwt keeps an access token from passing as one.\n if (typ !== undefined && typ !== null) {\n if (typeof typ !== \"string\" || !ID_TYPES.has(typ.toLowerCase())) {\n fail(\n \"invalid_type\",\n `The token is not an ID token: its header typ is ${shown(typ)}, not \"JWT\".`,\n );\n }\n }\n}\n\n/**\n * Split and decode a compact JWS and check its header (`alg`, `crit`, `typ`,\n * `kid`) and the signature's length. Throws `TokenVerificationError`; nothing\n * here is trusted until the signature has been checked.\n */\nexport function parseToken(token: unknown, kind: TokenKind): ParsedToken {\n if (typeof token !== \"string\" || !token) fail(\"malformed\", \"The token is empty or not a string.\");\n if (token.length > MAX_TOKEN_LENGTH) {\n fail(\"malformed\", `The token is longer than ${MAX_TOKEN_LENGTH} characters.`);\n }\n const parts = token.split(\".\");\n const [headerPart, payloadPart, signaturePart] = parts;\n if (parts.length !== 3 || headerPart === undefined || payloadPart === undefined) {\n fail(\"malformed\", \"The token is not a compact JWS (three dot-separated segments).\");\n }\n const header = jsonObject(headerPart, \"header\");\n const alg = header.alg;\n if (alg !== ALGORITHM) {\n fail(\n \"unsupported_algorithm\",\n alg === undefined\n ? \"The token header names no algorithm (alg); only ES256 is accepted.\"\n : `The token is signed with ${shown(alg)}; only ES256 is accepted.`,\n );\n }\n if (hasMember(header, \"crit\")) {\n fail(\"malformed\", \"The token header has critical extensions (crit), which are not supported.\");\n }\n checkType(header, kind);\n const kid = header.kid;\n if (typeof kid !== \"string\" || !kid) {\n fail(\"malformed\", \"The token header names no signing key (kid).\");\n }\n const claims = jsonObject(payloadPart, \"payload\");\n const signature = base64UrlDecode(signaturePart ?? \"\");\n if (!signature) fail(\"malformed\", \"The token signature is not base64url.\");\n // Checked before any key is looked up, so junk never causes a key set fetch.\n if (signature.length !== 64) {\n fail(\"invalid_signature\", \"The token's signature is not a 64-byte ES256 (r || s) signature.\");\n }\n return {\n header,\n claims,\n signingInput: utf8Encode(`${headerPart}.${payloadPart}`),\n signature,\n kid,\n };\n}\n\n/**\n * The public JWK to import for a P-256 signing key, or `null` when the key is\n * anything else (another curve or key type, or not meant for ES256 signatures).\n * Only the public members are copied, so a stray `d` or `key_ops` never changes\n * what is imported.\n */\nexport function p256Jwk(jwk: Record<string, unknown>): JsonWebKey | null {\n if (jwk.kty !== \"EC\" || jwk.crv !== \"P-256\") return null;\n const use = hasMember(jwk, \"use\") ? jwk.use : \"sig\";\n const alg = hasMember(jwk, \"alg\") ? jwk.alg : ALGORITHM;\n if (use !== \"sig\" || alg !== ALGORITHM) return null;\n const { x, y } = jwk;\n if (typeof x !== \"string\" || typeof y !== \"string\") return null;\n if (base64UrlDecode(x)?.length !== 32 || base64UrlDecode(y)?.length !== 32) return null;\n return { kty: \"EC\", crv: \"P-256\", x, y, ext: true };\n}\n\nfunction numericDate(claims: Record<string, unknown>, name: string): number {\n if (!hasMember(claims, name)) fail(\"missing_claim\", `The token has no ${name} claim.`);\n const value = claims[name];\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n fail(\"malformed\", `The token's ${name} claim is not a number of seconds.`);\n }\n return value;\n}\n\nfunction audiences(value: unknown): string[] {\n if (typeof value === \"string\") return [value];\n if (Array.isArray(value)) return value.filter((item): item is string => typeof item === \"string\");\n return [];\n}\n\n/**\n * Check the registered claims of a token whose signature is already verified.\n * `iss` must equal the issuer; `sub`, `exp` and `iat` must be present; `exp`,\n * `nbf` and `iat` are compared with `now` allowing `leeway` seconds of clock\n * skew; `aud` must contain one of `audience` when it is given; for an ID token\n * `nonce` must equal the expected nonce when one is given.\n */\nexport function checkClaims(claims: Record<string, unknown>, expected: ClaimExpectations): void {\n const { iss } = claims;\n if (iss === undefined || iss === null) fail(\"missing_claim\", \"The token has no iss claim.\");\n if (iss !== expected.issuer) {\n fail(\n \"invalid_issuer\",\n `The token was issued by ${shown(iss)}, not by ${JSON.stringify(expected.issuer)}.`,\n );\n }\n const { sub } = claims;\n if (typeof sub !== \"string\" || !sub) fail(\"missing_claim\", \"The token has no sub claim.\");\n const exp = numericDate(claims, \"exp\");\n const iat = numericDate(claims, \"iat\");\n const nbf = hasMember(claims, \"nbf\") ? numericDate(claims, \"nbf\") : null;\n const { now, leeway } = expected;\n if (now >= exp + leeway) fail(\"expired\", \"The token has expired.\");\n if (nbf !== null && now + leeway < nbf) {\n fail(\"not_yet_valid\", \"The token is not valid yet (nbf is in the future).\");\n }\n if (now + leeway < iat) fail(\"invalid_issued_at\", \"The token was issued in the future (iat).\");\n if (expected.audience !== null) {\n if (!hasMember(claims, \"aud\")) fail(\"missing_claim\", \"The token has no aud claim.\");\n const granted = audiences(claims.aud);\n if (!expected.audience.some((audience) => granted.includes(audience))) {\n fail(\"invalid_audience\", \"The token was not issued for this audience.\");\n }\n }\n if (expected.kind === \"id\") {\n const { nonce } = claims;\n if (expected.nonce === null) {\n // No nonce was sent (a sign-in without one, or a refresh): the token must carry none.\n if (hasMember(claims, \"nonce\")) {\n fail(\"invalid_nonce\", \"The ID token carries a nonce, but none was expected.\");\n }\n } else if (typeof nonce !== \"string\" || !constantTimeEqual(nonce, expected.nonce)) {\n fail(\"invalid_nonce\", \"The ID token's nonce does not match this sign-in.\");\n }\n }\n}\n","// Caching of the issuer's discovery document and key set (no I/O here).\n//\n// Both are cached for the response's `Cache-Control: max-age` (Didit sends\n// `public, max-age=300`), five minutes when the header is absent, never less\n// than a minute and never more than a day. A token whose `kid` is not in the\n// cached key set triggers a refetch only when the last fetch, successful or\n// failed, is at least a minute old. After a failed fetch, verification that\n// needs the keys fails fast for a minute (as a connection error) instead of\n// fetching again for every token.\n\nimport { TokenVerificationError } from \"../core/errors.js\";\nimport { isRecord } from \"./encoding.js\";\nimport { p256Jwk } from \"./jwt.js\";\n\n/** Seconds a response without `max-age` is kept. */\nexport const DEFAULT_MAX_AGE = 300;\n/** The shortest time anything is kept, so no response makes the SDK fetch on every token. */\nexport const MIN_MAX_AGE = 60;\n/** The longest time anything is kept, so a rotated key is always picked up within a day. */\nexport const MAX_MAX_AGE = 86_400;\n/** The least time between two key set fetches caused by unknown `kid`s. */\nexport const REFETCH_INTERVAL = 60;\n\nconst INTEGER = /^[+-]?\\d+$/;\n\n/**\n * How long, in seconds, a discovery or JWKS response may be kept: `max-age`\n * (less the `Age` a shared cache reports), or zero for `no-store` and\n * `no-cache`, or five minutes without either; then clamped to 60 seconds ..\n * one day.\n */\nexport function cacheSeconds(headers: Headers): number {\n let maxAge: number | null = null;\n for (const directive of (headers.get(\"cache-control\") ?? \"\").split(\",\")) {\n const [rawName = \"\", ...rest] = directive.split(\"=\");\n const name = rawName.trim().toLowerCase();\n if (name === \"no-store\" || name === \"no-cache\") {\n maxAge = 0;\n break;\n }\n if (name === \"max-age\") {\n const value = rest.join(\"=\").trim().replace(/^\"|\"$/g, \"\");\n if (INTEGER.test(value)) maxAge = Number.parseInt(value, 10);\n }\n }\n let seconds = DEFAULT_MAX_AGE;\n if (maxAge !== null) {\n seconds = maxAge;\n const age = (headers.get(\"age\") ?? \"0\").trim();\n if (INTEGER.test(age)) seconds -= Number.parseInt(age, 10);\n }\n return Math.min(MAX_MAX_AGE, Math.max(MIN_MAX_AGE, seconds));\n}\n\n/** The parts of `/.well-known/openid-configuration` the SDK uses. */\nexport interface Discovery {\n issuer: string | null;\n tokenEndpoint: string | null;\n jwksUri: string | null;\n}\n\nfunction absoluteUrl(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n let url: URL;\n try {\n url = new URL(value);\n } catch {\n return null;\n }\n return (url.protocol === \"https:\" || url.protocol === \"http:\") && url.hostname ? value : null;\n}\n\n/**\n * The discovery document, or `null` when `data` is not a JSON object. An\n * endpoint that is not an absolute http(s) URL counts as absent, and the\n * documented path under the issuer is used instead.\n */\nexport function parseDiscovery(data: unknown): Discovery | null {\n if (!isRecord(data)) return null;\n const { issuer } = data;\n return {\n issuer: typeof issuer === \"string\" ? issuer : null,\n tokenEndpoint: absoluteUrl(data.token_endpoint),\n jwksUri: absoluteUrl(data.jwks_uri),\n };\n}\n\n/** The issuer's published keys by `kid`, with the public keys imported so far. */\nexport class KeySet {\n readonly keys: ReadonlyMap<string, Record<string, unknown>>;\n readonly #imported = new Map<string, Promise<CryptoKey | null>>();\n\n constructor(keys: ReadonlyMap<string, Record<string, unknown>>) {\n this.keys = keys;\n }\n\n /** Whether the issuer publishes a key (usable or not) with this `kid`. */\n has(kid: string): boolean {\n return this.keys.has(kid);\n }\n\n /** How many published keys have been imported (or are being imported); never more than `keys.size`. */\n get importedCount(): number {\n return this.#imported.size;\n }\n\n /** The P-256 key published as `kid`, or `TokenVerificationError(\"unknown_key\")`. */\n async publicKey(kid: string, subtle: SubtleCrypto): Promise<CryptoKey> {\n // Only published kids are remembered: a `kid` comes from an unverified token,\n // so remembering every one would let forged tokens grow this map without limit.\n const jwk = this.keys.get(kid);\n let imported = jwk ? this.#imported.get(kid) : undefined;\n if (jwk && !imported) {\n const usable = p256Jwk(jwk);\n imported = usable\n ? subtle\n .importKey(\"jwk\", usable, { name: \"ECDSA\", namedCurve: \"P-256\" }, false, [\"verify\"])\n .catch(() => null) // a point that is not on the curve\n : Promise.resolve(null);\n this.#imported.set(kid, imported);\n }\n const key = imported ? await imported : null;\n if (!key) {\n throw new TokenVerificationError(\n \"unknown_key\",\n \"The issuer publishes no ES256 (P-256) key with the token's key id (kid).\",\n );\n }\n return key;\n }\n}\n\n/**\n * The key set, or `null` when `data` is not a JWKS (`{\"keys\": [...]}`). Keys\n * without a string `kid` are ignored: Didit always sets one, and a token is\n * matched to its key by `kid` only. The first usable (ES256, P-256) key with a\n * given `kid` wins, so an entry of another type cannot hide it.\n */\nexport function parseKeySet(data: unknown): KeySet | null {\n if (!isRecord(data) || !Array.isArray(data.keys)) return null;\n const byKid = new Map<string, Record<string, unknown>>();\n for (const item of data.keys as unknown[]) {\n if (!isRecord(item)) continue;\n const { kid } = item;\n if (typeof kid !== \"string\" || !kid) continue;\n const current = byKid.get(kid);\n if (!current || (!p256Jwk(current) && p256Jwk(item))) byKid.set(kid, item);\n }\n return new KeySet(byKid);\n}\n\ninterface Entry<T> {\n value: T;\n expiresAt: number;\n}\n\n/** What is cached for one issuer, and when to fetch again. Times are in seconds. */\nexport class IssuerCache {\n readonly #clock: () => number;\n #discovery: Entry<Discovery> | null = null;\n #keySet: Entry<KeySet> | null = null;\n #keySetAttemptedAt: number | null = null;\n #keySetFailed = false;\n #discoveryRefusal: { error: Error; until: number } | null = null;\n\n constructor(clock: () => number) {\n this.#clock = clock;\n }\n\n /**\n * Remember for a minute that the discovery document cannot be used (it names\n * another issuer), so a misconfigured backend does not fetch it on every\n * request. Returns `error`.\n */\n refuseDiscovery(error: Error): Error {\n this.#discoveryRefusal = { error, until: this.#clock() + REFETCH_INTERVAL };\n return error;\n }\n\n /** The error from {@link refuseDiscovery} while its minute lasts. */\n discoveryRefusal(): Error | null {\n const refusal = this.#discoveryRefusal;\n return refusal && this.#clock() < refusal.until ? refusal.error : null;\n }\n\n /** The cached discovery document while it is fresh. */\n discovery(): Discovery | null {\n const entry = this.#discovery;\n return entry && this.#clock() < entry.expiresAt ? entry.value : null;\n }\n\n storeDiscovery(discovery: Discovery, headers: Headers): Discovery {\n this.#discovery = { value: discovery, expiresAt: this.#clock() + cacheSeconds(headers) };\n return discovery;\n }\n\n /** The cached key set while it is fresh. */\n keySet(): KeySet | null {\n const entry = this.#keySet;\n return entry && this.#clock() < entry.expiresAt ? entry.value : null;\n }\n\n storeKeySet(keySet: KeySet, headers: Headers): KeySet {\n const now = this.#clock();\n this.#keySet = { value: keySet, expiresAt: now + cacheSeconds(headers) };\n this.#keySetAttemptedAt = now;\n this.#keySetFailed = false;\n return keySet;\n }\n\n /** Note a fetch of the key set (or of the discovery document before it) that failed. */\n keySetFetchFailed(): void {\n this.#keySetAttemptedAt = this.#clock();\n this.#keySetFailed = true;\n }\n\n /** No key set is fresh and the last fetch failed less than a minute ago. */\n keySetUnavailable(): boolean {\n const attemptedAt = this.#keySetAttemptedAt;\n return (\n this.#keySetFailed &&\n this.keySet() === null &&\n attemptedAt !== null &&\n this.#clock() - attemptedAt < REFETCH_INTERVAL\n );\n }\n\n /**\n * The fresh key set to look `kid` up in, or `null` when it must be fetched\n * first: when none is fresh, or when `kid` is not in it and the last fetch,\n * successful or failed, was at least a minute ago. A fresh key set without\n * `kid` is returned within that minute, so the lookup fails as `unknown_key`.\n */\n keySetFor(kid: string): KeySet | null {\n const keySet = this.keySet();\n if (!keySet) return null;\n if (keySet.has(kid)) return keySet;\n const attemptedAt = this.#keySetAttemptedAt;\n return attemptedAt !== null && this.#clock() - attemptedAt < REFETCH_INTERVAL ? keySet : null;\n }\n}\n","// Requests to the issuer: headers, body encoding, the timeout, debug logging and\n// the mapping of failures to the SDK's errors. Nothing is retried: codes and\n// refresh tokens are single use, a revoked session no longer accepts its own\n// token, and discovery and key fetches are rate limited by the cache instead.\n\nimport {\n APIConnectionError,\n APIResponseValidationError,\n APITimeoutError,\n makeStatusError,\n requestIdOf,\n} from \"../core/errors.js\";\nimport { formatLogLine, type Logger } from \"../core/logger.js\";\nimport { clientHeader, userAgent } from \"../core/runtime.js\";\n\n/** One request to the issuer. */\nexport interface IssuerRequest {\n method: \"GET\" | \"POST\" | \"DELETE\";\n url: string;\n /** Sent as `Authorization: Bearer <bearer>`. */\n bearer?: string;\n /** Sent form encoded (token requests). */\n form?: Record<string, string>;\n /** Sent as JSON. */\n json?: Record<string, unknown>;\n /** Values removed from error messages and bodies: tokens, codes and verifiers. */\n secrets?: readonly string[];\n}\n\n/** A 2xx answer: the parsed JSON body, or `null` for an empty body. */\nexport interface IssuerResponse {\n status: number;\n headers: Headers;\n data: unknown;\n}\n\n/** How requests are sent; fixed per `Authentication` instance. */\nexport interface Transport {\n fetch: typeof fetch | undefined;\n /** Milliseconds for the whole exchange, body included. */\n timeout: number;\n defaultHeaders: Headers;\n /** Where debug lines go, or `null` when logging is off. */\n logger: Logger | null;\n}\n\n// setTimeout fires at once for delays above 2^31 - 1 ms.\nconst MAX_TIMER = 2_147_483_647;\n\n/** The path of a URL, for messages and logs: never the query, which may carry anything. */\nexport function pathOf(url: string): string {\n return new URL(url).pathname;\n}\n\nfunction bodyOf(text: string): unknown {\n if (!text) return null;\n try {\n return JSON.parse(text) as unknown;\n } catch {\n return text;\n }\n}\n\n/**\n * Send one request. Throws `APITimeoutError` when no answer arrives within the\n * timeout, `APIConnectionError` when none arrives at all, `makeStatusError(...)`\n * for a status outside 2xx (3xx included: redirects are never followed, so a\n * token never leaves the issuer's origin) and `APIResponseValidationError` for\n * a 2xx body that is not JSON.\n */\nexport async function send(transport: Transport, request: IssuerRequest): Promise<IssuerResponse> {\n const headers = new Headers({\n Accept: \"application/json\",\n \"User-Agent\": userAgent(),\n \"X-Didit-Client\": clientHeader(),\n });\n transport.defaultHeaders.forEach((value, name) => {\n headers.set(name, value);\n });\n let body: string | undefined;\n if (request.form) {\n headers.set(\"Content-Type\", \"application/x-www-form-urlencoded\");\n body = new URLSearchParams(request.form).toString();\n } else if (request.json) {\n headers.set(\"Content-Type\", \"application/json\");\n body = JSON.stringify(request.json);\n }\n if (request.bearer !== undefined) headers.set(\"Authorization\", `Bearer ${request.bearer}`);\n\n const { method, url } = request;\n const path = pathOf(url);\n const fetchImpl = transport.fetch ?? globalThis.fetch;\n const controller = new AbortController();\n const timer = setTimeout(\n () => {\n controller.abort();\n },\n Math.min(transport.timeout, MAX_TIMER),\n );\n const started = Date.now();\n const log = (status: number | null, responseHeaders: Headers | null, error?: string): void => {\n transport.logger?.debug(\n formatLogLine({\n method,\n url,\n status,\n durationMs: Date.now() - started,\n requestId: responseHeaders ? requestIdOf(responseHeaders) : null,\n attempt: 0,\n ...(error === undefined ? {} : { error }),\n }),\n );\n };\n const noAnswer = (cause: unknown): APIConnectionError => {\n if (controller.signal.aborted) {\n log(null, null, \"timeout\");\n return new APITimeoutError(\n `The issuer did not answer ${method} ${path} within ${transport.timeout} ms.`,\n { cause },\n );\n }\n log(null, null, \"connection_error\");\n return new APIConnectionError(`Could not reach the issuer for ${method} ${path}.`, { cause });\n };\n\n let status: number;\n let responseHeaders: Headers;\n let text: string;\n try {\n let response: Response;\n try {\n response = await fetchImpl(url, {\n method,\n headers,\n body,\n redirect: \"manual\",\n signal: controller.signal,\n });\n } catch (error) {\n throw noAnswer(error);\n }\n status = response.status;\n responseHeaders = response.headers;\n try {\n text = await response.text();\n } catch (error) {\n throw noAnswer(error);\n }\n } finally {\n clearTimeout(timer);\n }\n log(status, responseHeaders);\n\n if (status < 200 || status > 299) {\n throw makeStatusError(status, bodyOf(text), responseHeaders, request.secrets ?? []);\n }\n if (status === 204 || !text) return { status, headers: responseHeaders, data: null };\n try {\n return { status, headers: responseHeaders, data: JSON.parse(text) as unknown };\n } catch {\n // Not chained: the parser's message quotes the start of the body, which may\n // hold a token.\n const type = responseHeaders.get(\"content-type\") ?? \"no content type\";\n throw new APIResponseValidationError(\n `Expected a JSON response from ${method} ${path}, got ${type}.`,\n status,\n responseHeaders,\n );\n }\n}\n","// The issuer URL and the publishable key that carries it.\n//\n// An application's issuer is its canonical origin: https://<slug>.auth.didit.me\n// (live), https://<slug>.sandbox.auth.didit.me (sandbox) or its active custom\n// domain, with no trailing slash. A publishable key is `pk_live_` (live) or\n// `pk_test_` (sandbox) followed by the unpadded base64url encoding of the issuer.\n\nimport { ConfigurationError } from \"../core/errors.js\";\nimport { base64UrlDecode, utf8Decode } from \"./encoding.js\";\n\nconst LOOPBACK_HOSTS = new Set([\"localhost\", \"127.0.0.1\", \"::1\", \"[::1]\"]);\nconst PREFIXES = { pk_live_: \"live\", pk_test_: \"test\" } as const;\n// `scheme://` and a host character: the WHATWG URL parser would also read\n// `https:///host` or `https:host` as https://host/, which the issuer text then\n// would not match.\nconst ABSOLUTE = /^[a-z][a-z0-9+.-]*:\\/\\/[^/]/i;\n\n/** Where a publishable key's application runs: `live`, or `test` for sandbox. */\nexport type PublishableKeyEnvironment = \"live\" | \"test\";\n\n/** What a publishable key carries. */\nexport interface PublishableKey {\n /** The application's issuer, without a trailing slash. */\n issuer: string;\n /** `live` for `pk_live_` keys, `test` (sandbox) for `pk_test_` keys. */\n environment: PublishableKeyEnvironment;\n}\n\n/** Hosts that may use plain http: what Didit allows for local sandbox development. */\nexport function isLoopbackHost(hostname: string): boolean {\n const host = hostname.toLowerCase();\n return LOOPBACK_HOSTS.has(host) || host.endsWith(\".localhost\");\n}\n\nfunction hasControlOrSpace(text: string): boolean {\n for (let i = 0; i < text.length; i++) {\n const code = text.charCodeAt(i);\n if (code <= 0x20 || code === 0x7f || /\\s/.test(text.charAt(i))) return true;\n }\n return false;\n}\n\n/**\n * The issuer without trailing slashes, or a `ConfigurationError`. It must be an\n * absolute https URL with no credentials, query or fragment; plain http is\n * accepted only for localhost and loopback addresses when `allowLoopbackHttp`\n * is true. The text is kept as written (not re-serialised by the URL parser),\n * because tokens must name exactly this value in `iss`.\n */\nexport function normaliseIssuer(issuer: unknown, allowLoopbackHttp = true): string {\n if (typeof issuer !== \"string\" || !issuer.trim()) {\n throw new ConfigurationError(\n \"The issuer is empty: pass your application's issuer \" +\n \"(https://<slug>.auth.didit.me or your custom domain) or use \" +\n \"Authentication.fromPublishableKey(...).\",\n );\n }\n const text = issuer.trim();\n let url: URL | null;\n try {\n url = new URL(text);\n } catch {\n url = null;\n }\n if (url && (url.username || url.password)) {\n throw new ConfigurationError(\"The issuer URL must not contain a user name or password.\");\n }\n if (!url?.hostname || !ABSOLUTE.test(text) || /[?#\\\\]/.test(text) || hasControlOrSpace(text)) {\n throw new ConfigurationError(\n `The issuer must be an absolute https URL with no query or fragment, got ${JSON.stringify(text)}.`,\n );\n }\n const secure = url.protocol === \"https:\";\n const local = allowLoopbackHttp && url.protocol === \"http:\" && isLoopbackHost(url.hostname);\n if (!secure && !local) {\n throw new ConfigurationError(\n `The issuer must use https (http only for localhost while testing), got ${JSON.stringify(text)}.`,\n );\n }\n return text.replace(/\\/+$/, \"\");\n}\n\n/**\n * The issuer and environment a `pk_live_` or `pk_test_` publishable key carries.\n * A publishable key is a public identifier, not a credential. Surrounding\n * whitespace is ignored. A live key must name an https issuer; a test (sandbox)\n * key may also name http on localhost, as the console allows for sandbox\n * applications. Throws `ConfigurationError` for anything else.\n */\nexport function parsePublishableKey(key: string): PublishableKey {\n const raw: unknown = key;\n const text = typeof raw === \"string\" ? raw.trim() : \"\";\n const prefix = text.slice(0, 8);\n if (prefix !== \"pk_live_\" && prefix !== \"pk_test_\") {\n throw new ConfigurationError(\n \"A publishable key starts with pk_live_ or pk_test_; copy it from the \" +\n \"Developers section of Authentication in the Didit console.\",\n );\n }\n const encoded = text.slice(8);\n const bytes = encoded ? base64UrlDecode(encoded) : null;\n const issuer = bytes ? utf8Decode(bytes) : null;\n if (issuer === null) {\n throw new ConfigurationError(\n `The publishable key is not valid: expected ${prefix} followed by the base64url-encoded issuer.`,\n );\n }\n const environment = PREFIXES[prefix];\n return { issuer: normaliseIssuer(issuer, environment === \"test\"), environment };\n}\n","// `Authentication` (docs/DESIGN.md section 10): verifies the tokens an\n// application's issuer signs and calls its token, session and step-up\n// endpoints. The decisions live in the pure helpers (jwt.ts, cache.ts,\n// issuer.ts); this file wires them to the issuer over fetch.\n\nimport {\n APIConnectionError,\n APIResponseValidationError,\n APIStatusError,\n ConfigurationError,\n TokenVerificationError,\n} from \"../core/errors.js\";\nimport { envLogLevel, type Logger, type LogLevel } from \"../core/logger.js\";\nimport { webCrypto } from \"../core/runtime.js\";\nimport { IssuerCache, parseDiscovery, parseKeySet, type Discovery, type KeySet } from \"./cache.js\";\nimport { isRecord } from \"./encoding.js\";\nimport { pathOf, send, type IssuerRequest, type IssuerResponse, type Transport } from \"./http.js\";\nimport { normaliseIssuer, parsePublishableKey } from \"./issuer.js\";\nimport { checkClaims, parseToken, shown, type ParsedToken, type TokenKind } from \"./jwt.js\";\nimport type {\n AccessTokenClaims,\n AuthenticationSession,\n IdTokenClaims,\n StepUp,\n StepUpAction,\n StepUpNotRequired,\n TokenResponse,\n} from \"./types.js\";\n\nconst DEFAULT_TIMEOUT = 10_000;\nconst DEFAULT_LEEWAY = 60;\nconst DISCOVERY_PATH = \".well-known/openid-configuration\";\nconst JWKS_PATH = \".well-known/jwks.json\";\nconst TOKEN_PATH = \"token/\";\nconst SESSION_PATH = \"session/\";\nconst STEP_UP_PATH = \"step-up/\";\n// Sent as written, so only plain ASCII decimals (\"1500.00\"): no exponents,\n// separators, other digits or NaN, which the issuer would read differently.\nconst DECIMAL_TEXT = /^-?[0-9]+(\\.[0-9]+)?$/;\n\n/** One audience (the application id) or several, any of which is accepted. */\nexport type Audience = string | readonly string[];\n\n/** A money amount: a decimal string such as `\"1500.00\"`, or a finite number. Sent as a decimal string. */\nexport type Amount = string | number;\n\n/** Options of `new Authentication(...)`. */\nexport interface AuthenticationOptions {\n /**\n * The application's issuer: `https://<slug>.auth.didit.me`,\n * `https://<slug>.sandbox.auth.didit.me` or its active custom domain. A\n * trailing slash is removed. Plain http only for localhost while testing.\n */\n issuer: string;\n /**\n * The application id. When set it is sent with token requests (the issuer\n * checks it) and is the default audience of `verifyAccessToken` and\n * `verifyIdToken`.\n */\n clientId?: string | null;\n /** The fetch implementation; defaults to the global `fetch`. */\n fetch?: typeof fetch;\n /** Milliseconds a request to the issuer may take, body included. Default 10 000. */\n timeout?: number;\n /** Seconds of clock skew allowed for `exp`, `nbf` and `iat`. Default 60. */\n leeway?: number;\n /** `debug` logs one line per request (never tokens); defaults to `DIDIT_LOG`. */\n logLevel?: LogLevel;\n /** Where debug lines go; defaults to `console`. */\n logger?: Logger;\n /** Extra headers sent with every request to the issuer. */\n defaultHeaders?: Record<string, string>;\n}\n\n/** Options of `verifyAccessToken`. */\nexport interface VerifyAccessTokenOptions {\n /** `aud` must contain this (or one of these); defaults to `clientId` when configured. */\n audience?: Audience;\n}\n\n/** Options of `verifyIdToken`. */\nexport interface VerifyIdTokenOptions {\n /**\n * The nonce sent with this sign-in's authorization request; the ID token must\n * carry the same value. Pass `null` only for an ID token returned by\n * `refresh`, which carries no nonce.\n */\n nonce: string | null;\n /** `aud` must contain this (or one of these). Required unless `clientId` is configured. */\n audience?: Audience;\n}\n\n/** Arguments of `exchangeCode`. */\nexport interface ExchangeCodeParams {\n /** The `code` of the callback, after you checked its `state`. */\n code: string;\n /** The PKCE verifier of this sign-in (`createPkce().codeVerifier`). */\n codeVerifier: string;\n /** Exactly the redirect URI the sign-in used. */\n redirectUri: string;\n}\n\n/** Arguments of `createStepUp`. */\nexport interface CreateStepUpParams {\n /** `payout` (with `amount` and an optional `currency`), `bank` or `contact`. */\n action: StepUpAction;\n /**\n * The payout amount: a decimal string such as `\"1500.00\"` or a finite number\n * (sent in its shortest decimal form, so `0.1 + 0.2` is `0.30000000000000004`,\n * which the issuer refuses: it takes at most two decimal places). Prefer a string.\n */\n amount?: Amount;\n /** A three-letter ISO 4217 code such as `\"EUR\"`. */\n currency?: string;\n /**\n * Where the person comes back after verifying; one of the application's\n * registered redirect URIs. The issuer currently requires it and answers\n * HTTP 400 (`BadRequestError`) without it.\n */\n returnTo?: string;\n}\n\n/** The fields of an options object; a JavaScript caller may pass nothing where one is required. */\nfunction fieldsOf<T extends object>(value: T | undefined): Partial<T> {\n return value ?? {};\n}\n\nfunction requiredText(value: unknown, name: string): string {\n if (typeof value !== \"string\" || !value.trim()) throw new TypeError(`${name} is empty.`);\n return value.trim();\n}\n\nfunction bearerToken(value: unknown, name: string): string {\n const token = requiredText(value, name);\n // Checked here so that fetch never echoes a bad header value (the token) in its error.\n for (let i = 0; i < token.length; i++) {\n const code = token.charCodeAt(i);\n if (code < 0x21 || code > 0x7e) {\n throw new TypeError(`${name} contains characters that cannot be sent in a header.`);\n }\n }\n return token;\n}\n\nfunction optionalText(value: unknown, name: string): string | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value !== \"string\") throw new TypeError(`${name} must be a string.`);\n return value;\n}\n\n/** A number in plain decimal notation, as Python's `format(Decimal(repr(x)), \"f\")` writes it. */\nfunction plainDecimal(value: number): string {\n const text = String(value);\n const match = /^(-?)(\\d+)(?:\\.(\\d+))?e([+-]\\d+)$/.exec(text);\n if (!match) return text;\n // JavaScript writes an exponent only from 1e21 up (at most 17 significant\n // digits, so the point falls after them) or below 1e-6 (before them).\n const [, sign = \"\", whole = \"\", fraction = \"\", exponentText = \"0\"] = match;\n const digits = whole + fraction;\n const point = whole.length + Number(exponentText);\n if (point <= 0) return `${sign}0.${\"0\".repeat(-point)}${digits}`;\n return sign + digits + \"0\".repeat(point - digits.length);\n}\n\nfunction amountText(amount: unknown): string {\n if (typeof amount === \"string\") {\n const text = amount.trim();\n if (!DECIMAL_TEXT.test(text)) {\n throw new TypeError(\n `amount must be a decimal number such as \"1500.00\", got ${shown(amount)}.`,\n );\n }\n return text;\n }\n if (typeof amount === \"number\") {\n if (!Number.isFinite(amount)) {\n throw new TypeError(`amount must be a finite number, got ${amount}.`);\n }\n return plainDecimal(amount);\n }\n throw new TypeError(\"amount must be a decimal string or a number.\");\n}\n\n/** A path segment from a caller-supplied id: never empty, `.` or `..`, and percent-encoded. */\nfunction pathSegment(value: unknown, name: string): string {\n if (typeof value !== \"string\" || value === \"\" || value === \".\" || value === \"..\") {\n throw new TypeError(`${name} must be a non-empty id.`);\n }\n return encodeURIComponent(value).replace(\n /[!'()*]/g,\n (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`,\n );\n}\n\nfunction sameOrigin(url: URL, origin: URL): boolean {\n return url.origin === origin.origin && !url.username && !url.password;\n}\n\n/**\n * Didit Authentication for your backend: verify the tokens your application's\n * issuer signs and call its token, session and step-up endpoints.\n *\n * ```ts\n * const auth = Authentication.fromPublishableKey(\"pk_live_...\", { clientId: APPLICATION_ID });\n * const claims = await auth.verifyAccessToken(accessToken);\n * console.log(claims.sub, claims.vendor_data);\n * ```\n *\n * It never takes or sends your Didit API key, and sends nothing to any origin\n * but the issuer's. The discovery document and the issuer's keys are fetched on\n * first use, cached, and shared by concurrent calls; create one instance per\n * issuer and reuse it.\n */\nexport class Authentication {\n /** The issuer every token must name in `iss`, without a trailing slash. */\n readonly issuer: string;\n /** The application id: sent with token requests and the default audience. */\n readonly clientId: string | null;\n /** Seconds of clock skew allowed for `exp`, `nbf` and `iat`. */\n readonly leeway: number;\n /** Milliseconds a request to the issuer may take. */\n readonly timeout: number;\n\n readonly #origin: URL;\n readonly #transport: Transport;\n readonly #cache = new IssuerCache(() => Date.now() / 1000);\n #discoveryFetch: Promise<Discovery> | undefined;\n #keySetFetch: Promise<KeySet> | undefined;\n\n /** Throws `ConfigurationError` for an invalid issuer or option; sends no request. */\n constructor(options: AuthenticationOptions) {\n const given = fieldsOf(options);\n this.issuer = normaliseIssuer(given.issuer);\n this.#origin = new URL(this.issuer);\n const clientId: unknown = given.clientId;\n if (\n clientId !== undefined &&\n clientId !== null &&\n (typeof clientId !== \"string\" || !clientId.trim())\n ) {\n throw new ConfigurationError(\"clientId is empty: pass your application id or leave it out.\");\n }\n this.clientId = typeof clientId === \"string\" ? clientId.trim() : null;\n const leeway: unknown = given.leeway ?? DEFAULT_LEEWAY;\n if (typeof leeway !== \"number\" || !Number.isFinite(leeway) || leeway < 0) {\n throw new ConfigurationError(\"leeway must be 0 or more seconds.\");\n }\n this.leeway = leeway;\n const timeout: unknown = given.timeout ?? DEFAULT_TIMEOUT;\n if (typeof timeout !== \"number\" || !Number.isFinite(timeout) || timeout <= 0) {\n throw new ConfigurationError(\"timeout must be a positive number of milliseconds.\");\n }\n this.timeout = timeout;\n const fetchImpl: unknown = given.fetch;\n if (fetchImpl !== undefined && typeof fetchImpl !== \"function\") {\n throw new ConfigurationError(\"fetch must be a function compatible with the global fetch.\");\n }\n let defaultHeaders: Headers;\n try {\n defaultHeaders = new Headers(given.defaultHeaders);\n } catch {\n // No cause: the platform's message would quote the offending header value.\n throw new ConfigurationError(\"defaultHeaders must map header names to string values.\");\n }\n const level = given.logLevel ?? envLogLevel();\n this.#transport = {\n fetch: fetchImpl as typeof fetch | undefined,\n timeout,\n defaultHeaders,\n logger: level === \"debug\" ? (given.logger ?? console) : null,\n };\n }\n\n /**\n * The client for the issuer a `pk_live_` or `pk_test_` publishable key carries\n * (see `parsePublishableKey`).\n */\n static fromPublishableKey(\n key: string,\n options: Omit<AuthenticationOptions, \"issuer\"> = {},\n ): Authentication {\n return new Authentication({ ...options, issuer: parsePublishableKey(key).issuer });\n }\n\n // Tokens --------------------------------------------------------------------\n\n /**\n * Verify an access token offline and return its claims (the JWT payload).\n *\n * Checks, in order: the header (`alg` ES256 only, so `none`, HS*, RS*, PS*,\n * EdDSA and every other algorithm are refused; `typ` `at+jwt`), the ES256\n * signature against the issuer's published key with the token's `kid`, then\n * `iss` (equal to the issuer), `sub`, `exp`, `nbf` and `iat` (with `leeway`\n * seconds of clock skew) and, when `audience` is given or `clientId` is\n * configured, `aud`.\n *\n * An offline check cannot see a session revoked a moment ago: access tokens\n * expire within five minutes. Call `getSession` when the action needs an\n * instant revocation check.\n *\n * A token an agent uses on a person's behalf verifies too: its `act` claim\n * names the agent. Check `act` before actions an agent must not take.\n *\n * Throws `TokenVerificationError` (answer 401) with a machine-readable\n * `reason`; `APIConnectionError`, `APIStatusError` or\n * `APIResponseValidationError` (answer 503) when the issuer's keys cannot be\n * fetched; `ConfigurationError` when the issuer's discovery document names\n * another issuer; `TypeError` for an invalid `audience` option.\n */\n async verifyAccessToken(\n token: string,\n options?: VerifyAccessTokenOptions,\n ): Promise<AccessTokenClaims> {\n const audience = this.#audience(options?.audience, false);\n const parsed = parseToken(token, \"access\");\n const claims = await this.#verify(parsed, \"access\", audience, null);\n return claims as AccessTokenClaims;\n }\n\n /**\n * Verify an ID token and return its claims (the JWT payload).\n *\n * The same checks as `verifyAccessToken` (`typ` must be `JWT` or absent, never\n * `at+jwt`), plus `aud`, which is always checked: pass `audience` or configure\n * `clientId`. `nonce` must equal the nonce you sent with the authorization\n * request. Pass `null` when no nonce was sent: for an ID token returned by\n * `refresh`, or a sign-in made without one; the token must then carry no\n * nonce. Throws like `verifyAccessToken`, and `ConfigurationError` when no\n * audience is known.\n */\n async verifyIdToken(token: string, options: VerifyIdTokenOptions): Promise<IdTokenClaims> {\n const given = fieldsOf(options);\n const audience = this.#audience(given.audience, true);\n const nonce: unknown = given.nonce;\n if (nonce !== null && (typeof nonce !== \"string\" || !nonce)) {\n throw new TypeError(\n \"nonce is empty: pass the nonce of this sign-in, or null for an ID token returned by refresh().\",\n );\n }\n const parsed = parseToken(token, \"id\");\n const claims = await this.#verify(parsed, \"id\", audience, nonce);\n return claims as IdTokenClaims;\n }\n\n /**\n * Exchange an authorization code for tokens (`POST token/`, form encoded).\n *\n * Check the callback's `state` first. The code is single use and expires\n * after 60 seconds. Never retried. A used, expired or unknown code, or a\n * verifier or redirect URI that does not match, is a `BadRequestError` with\n * body `{\"error\": \"invalid_grant\"}`; `mfa_required` means the person still\n * has to complete a second factor.\n */\n async exchangeCode(params: ExchangeCodeParams): Promise<TokenResponse> {\n const given = fieldsOf(params);\n const code = requiredText(given.code, \"code\");\n const codeVerifier = requiredText(given.codeVerifier, \"codeVerifier\");\n const redirectUri = requiredText(given.redirectUri, \"redirectUri\");\n const form = {\n grant_type: \"authorization_code\",\n code,\n code_verifier: codeVerifier,\n redirect_uri: redirectUri,\n };\n return this.#token(form, [code, codeVerifier]);\n }\n\n /**\n * Swap a refresh token for new tokens (`POST token/`, form encoded).\n *\n * Refresh tokens are single use: replace both tokens with the result.\n * Serialise refreshes for one session (one at a time, across processes and\n * browser tabs), because presenting a refresh token that was already used\n * revokes the whole session. For the same reason this request is never\n * retried; if its outcome is unknown, sign the person in again.\n */\n async refresh(refreshToken: string): Promise<TokenResponse> {\n const token = requiredText(refreshToken, \"refreshToken\");\n return this.#token({ grant_type: \"refresh_token\", refresh_token: token }, [token]);\n }\n\n // Sessions and step-ups -----------------------------------------------------\n\n /**\n * The live session behind `accessToken` (`GET session/`).\n *\n * The instant revocation check: unlike `verifyAccessToken` it fails\n * (`AuthenticationError`, HTTP 401) as soon as the session is revoked,\n * expired or idle, or the token was replaced by a refresh. Agent access\n * tokens are refused here.\n */\n async getSession(accessToken: string): Promise<AuthenticationSession> {\n const token = bearerToken(accessToken, \"accessToken\");\n const call = this.#bearerCall(\"GET\", SESSION_PATH, token);\n return (await this.#object(call)) as AuthenticationSession;\n }\n\n /**\n * Sign the person out: revoke the session behind `accessToken`\n * (`DELETE session/`). Never retried: a revoked session no longer accepts its\n * token, so calling it again after an unknown outcome answers 401.\n */\n async revokeSession(accessToken: string): Promise<void> {\n const token = bearerToken(accessToken, \"accessToken\");\n await this.#send(this.#bearerCall(\"DELETE\", SESSION_PATH, token));\n }\n\n /**\n * Ask whether the person must verify before a sensitive action\n * (`POST step-up/`). Never retried.\n *\n * `{ required: false }` (HTTP 200) means no rule applies and the action may\n * go ahead. Otherwise (HTTP 201) send the person to `verification_url`; they\n * come back to `returnTo` with `step_up=<id>&status=approved`, which proves\n * nothing: call `retrieveStepUp` and act only on status `approved`.\n *\n * The issuer currently requires `returnTo` and answers HTTP 400\n * (`BadRequestError`) without it.\n */\n async createStepUp(\n accessToken: string,\n params: CreateStepUpParams,\n ): Promise<StepUp | StepUpNotRequired> {\n const token = bearerToken(accessToken, \"accessToken\");\n const given = fieldsOf(params);\n const body: Record<string, unknown> = { action: requiredText(given.action, \"action\") };\n const amount: unknown = given.amount;\n if (amount !== undefined && amount !== null) body.amount = amountText(amount);\n const currency = optionalText(given.currency, \"currency\");\n if (currency !== undefined) body.currency = currency;\n const returnTo = optionalText(given.returnTo, \"returnTo\");\n if (returnTo !== undefined) body.return_to = returnTo;\n const call = { ...this.#bearerCall(\"POST\", STEP_UP_PATH, token), json: body };\n return (await this.#object(call)) as StepUp | StepUpNotRequired;\n }\n\n /**\n * Read a step-up (`GET step-up/{id}/`) with a token of the session that asked\n * for it. Act only when its `status` is `approved`; `pending`, `review`,\n * `declined`, `expired`, `superseded` and any other value all mean no. A\n * step-up of another session is a `NotFoundError`.\n */\n async retrieveStepUp(accessToken: string, id: string): Promise<StepUp> {\n const token = bearerToken(accessToken, \"accessToken\");\n const path = `${STEP_UP_PATH}${pathSegment(id, \"id\")}/`;\n return (await this.#object(this.#bearerCall(\"GET\", path, token))) as StepUp;\n }\n\n // Requests ------------------------------------------------------------------\n\n #url(path: string): string {\n return `${this.issuer}/${path}`;\n }\n\n #bearerCall(method: IssuerRequest[\"method\"], path: string, token: string): IssuerRequest {\n return { method, url: this.#url(path), bearer: token, secrets: [token] };\n }\n\n #send(call: IssuerRequest): Promise<IssuerResponse> {\n return send(this.#transport, call);\n }\n\n async #object(call: IssuerRequest): Promise<Record<string, unknown>> {\n const response = await this.#send(call);\n if (!isRecord(response.data)) {\n throw new APIResponseValidationError(\n `Expected a JSON object from ${call.method} ${pathOf(call.url)}.`,\n response.status,\n response.headers,\n );\n }\n return response.data;\n }\n\n async #token(form: Record<string, string>, secrets: readonly string[]): Promise<TokenResponse> {\n const discovery = await this.#discovery();\n const body = this.clientId ? { ...form, client_id: this.clientId } : form;\n const url = discovery.tokenEndpoint ?? this.#url(TOKEN_PATH);\n return (await this.#object({ method: \"POST\", url, form: body, secrets })) as TokenResponse;\n }\n\n // Discovery and keys --------------------------------------------------------\n\n /** The discovery document: cached, or fetched once for every concurrent caller. */\n #discovery(): Promise<Discovery> {\n const cached = this.#cache.discovery();\n if (cached) return Promise.resolve(cached);\n const refused = this.#cache.discoveryRefusal();\n if (refused) return Promise.reject(refused);\n this.#discoveryFetch ??= this.#fetchDiscovery().finally(() => {\n this.#discoveryFetch = undefined;\n });\n return this.#discoveryFetch;\n }\n\n async #fetchDiscovery(): Promise<Discovery> {\n const url = this.#url(DISCOVERY_PATH);\n const response = await this.#send({ method: \"GET\", url });\n const invalid = (message: string): APIResponseValidationError =>\n new APIResponseValidationError(message, response.status, response.headers);\n const discovery = parseDiscovery(response.data);\n if (!discovery) throw invalid(\"The issuer's discovery document is not a JSON object.\");\n if (discovery.issuer === null)\n throw invalid(`The discovery document at ${url} names no issuer.`);\n if (discovery.issuer !== this.issuer) {\n // Raised for a minute without fetching again; not counted as a failed key fetch.\n throw this.#cache.refuseDiscovery(\n new ConfigurationError(\n `The discovery document at ${url} names the issuer ${shown(discovery.issuer)}, ` +\n `not ${JSON.stringify(this.issuer)}. Configure Authentication with the issuer it names ` +\n \"(an application's issuer changes when its custom domain is activated).\",\n ),\n );\n }\n // Codes and refresh tokens go to the token endpoint, and the keys decide which\n // tokens are trusted: neither may downgrade to plain http or leave the issuer's origin.\n const endpoints = [\n [\"token_endpoint\", discovery.tokenEndpoint],\n [\"jwks_uri\", discovery.jwksUri],\n ] as const;\n for (const [name, value] of endpoints) {\n if (value === null) continue;\n const endpoint = new URL(value);\n if (endpoint.protocol !== \"https:\" && endpoint.protocol !== this.#origin.protocol) {\n throw invalid(`The discovery document's ${name} ${shown(value)} does not use https.`);\n }\n if (!sameOrigin(endpoint, this.#origin)) {\n throw invalid(\n `The discovery document's ${name} ${shown(value)} is not on the issuer's origin ${this.#origin.origin}.`,\n );\n }\n }\n return this.#cache.storeDiscovery(discovery, response.headers);\n }\n\n /** The key set to look `kid` up in: cached, or fetched once for every concurrent caller. */\n async #keySetFor(kid: string): Promise<KeySet> {\n for (;;) {\n const cached = this.#cache.keySetFor(kid);\n if (cached) return cached;\n if (!this.#keySetFetch) {\n if (this.#cache.keySetUnavailable()) {\n throw new APIConnectionError(\n \"The issuer's keys could not be fetched less than a minute ago; the next attempt \" +\n \"is made once that minute has passed.\",\n );\n }\n this.#keySetFetch = this.#fetchKeySet().finally(() => {\n this.#keySetFetch = undefined;\n });\n }\n // Then look again: the kid is in the new key set, or it is unknown for a minute.\n await this.#keySetFetch;\n }\n }\n\n async #fetchKeySet(): Promise<KeySet> {\n try {\n const discovery = await this.#discovery();\n const url = discovery.jwksUri ?? this.#url(JWKS_PATH);\n const response = await this.#send({ method: \"GET\", url });\n const keySet = parseKeySet(response.data);\n if (!keySet) {\n throw new APIResponseValidationError(\n 'The issuer\\'s JWKS is not a key set ({\"keys\": [...]}).',\n response.status,\n response.headers,\n );\n }\n return this.#cache.storeKeySet(keySet, response.headers);\n } catch (error) {\n // Counted only when the issuer failed, not for a configuration error,\n // which is raised every time.\n if (\n error instanceof APIConnectionError ||\n error instanceof APIStatusError ||\n error instanceof APIResponseValidationError\n ) {\n this.#cache.keySetFetchFailed();\n }\n throw error;\n }\n }\n\n // Token checks --------------------------------------------------------------\n\n #audience(audience: unknown, required: boolean): readonly string[] | null {\n if (audience === undefined || audience === null) {\n if (this.clientId) return [this.clientId];\n if (required) {\n throw new ConfigurationError(\n \"verifyIdToken needs the audience: pass { audience: <application id> }, \" +\n \"or clientId: <application id> to Authentication.\",\n );\n }\n return null;\n }\n const values: unknown[] =\n typeof audience === \"string\" ? [audience] : Array.isArray(audience) ? audience : [];\n if (!values.length || values.some((value) => typeof value !== \"string\" || !value)) {\n throw new TypeError(\"audience must be a non-empty string or a list of them.\");\n }\n return values as string[];\n }\n\n async #verify(\n parsed: ParsedToken,\n kind: TokenKind,\n audience: readonly string[] | null,\n nonce: string | null,\n ): Promise<Record<string, unknown>> {\n const keySet = await this.#keySetFor(parsed.kid);\n const { subtle } = await webCrypto();\n const key = await keySet.publicKey(parsed.kid, subtle);\n const valid = await subtle.verify(\n { name: \"ECDSA\", hash: \"SHA-256\" },\n key,\n parsed.signature,\n parsed.signingInput,\n );\n if (!valid) {\n throw new TokenVerificationError(\n \"invalid_signature\",\n \"The token's signature does not verify with the issuer's key.\",\n );\n }\n checkClaims(parsed.claims, {\n kind,\n issuer: this.issuer,\n audience,\n nonce,\n leeway: this.leeway,\n now: Date.now() / 1000,\n });\n return parsed.claims;\n }\n}\n","// PKCE (RFC 7636), `state` and `nonce` values for the authorization code flow.\n// They are async because Web Crypto is loaded lazily on Node.js 18.\n\nimport { webCrypto } from \"../core/runtime.js\";\nimport { base64UrlEncode, utf8Encode } from \"./encoding.js\";\n\n// 32 random octets, base64url encoded: the 43-character verifier RFC 7636 section 4.1 recommends.\nconst RANDOM_BYTES = 32;\n\n/**\n * A PKCE verifier and its S256 challenge. Send `codeChallenge` and\n * `codeChallengeMethod` with the authorization request, keep `codeVerifier` on\n * your server and pass it to `exchangeCode`.\n */\nexport interface PkcePair {\n /** 43 characters of unpadded base64url from 32 random bytes. Keep it secret. */\n codeVerifier: string;\n /** `BASE64URL(SHA256(codeVerifier))`, without padding. */\n codeChallenge: string;\n /** Always `S256`, the only method Didit accepts. */\n codeChallengeMethod: \"S256\";\n}\n\nasync function randomValue(): Promise<string> {\n const crypto = await webCrypto();\n return base64UrlEncode(crypto.getRandomValues(new Uint8Array(RANDOM_BYTES)));\n}\n\n/** `BASE64URL(SHA256(ASCII(verifier)))` without padding (RFC 7636 section 4.2). */\nexport async function s256Challenge(verifier: string): Promise<string> {\n const crypto = await webCrypto();\n const digest = await crypto.subtle.digest(\"SHA-256\", utf8Encode(verifier));\n return base64UrlEncode(new Uint8Array(digest));\n}\n\n/** A new random PKCE verifier (43 characters) and its S256 challenge. */\nexport async function createPkce(): Promise<PkcePair> {\n const codeVerifier = await randomValue();\n return {\n codeVerifier,\n codeChallenge: await s256Challenge(codeVerifier),\n codeChallengeMethod: \"S256\",\n };\n}\n\n/**\n * A new random `state` value (43 characters of base64url). Store it with the\n * sign-in attempt and compare it with the `state` on the callback before\n * exchanging the code.\n */\nexport function createState(): Promise<string> {\n return randomValue();\n}\n\n/**\n * A new random `nonce` value (43 characters of base64url). Send it with the\n * authorization request and pass it to `verifyIdToken`, which checks that the\n * ID token carries the same value.\n */\nexport function createNonce(): Promise<string> {\n return randomValue();\n}\n","// The official Didit TypeScript and JavaScript library.\n//\n// import Didit from \"@didit-protocol/sdk-node\";\n// const didit = new Didit(); // reads DIDIT_API_KEY\n//\n// See README.md and https://docs.didit.me.\n\nimport { Didit } from \"./client.js\";\n\nexport { Didit };\nexport default Didit;\n\nexport {\n DEFAULT_ACCOUNT_BASE_URL,\n DEFAULT_BASE_URL,\n DEFAULT_MAX_RETRIES,\n DEFAULT_TIMEOUT,\n type ClientOptions,\n type Fetch,\n} from \"./core/api-client.js\";\nexport { APIPromise, type WithResponse } from \"./core/api-promise.js\";\nexport {\n APIConnectionError,\n APIResponseValidationError,\n APIStatusError,\n APITimeoutError,\n AuthenticationError,\n BadRequestError,\n ConfigurationError,\n ConflictError,\n DiditError,\n InternalServerError,\n NotFoundError,\n PermissionDeniedError,\n RateLimitError,\n TokenVerificationError,\n UnprocessableEntityError,\n WebhookVerificationError,\n type TokenVerificationReason,\n type WebhookVerificationReason,\n} from \"./core/errors.js\";\nexport type { Logger, LogLevel } from \"./core/logger.js\";\nexport { PagePromise, type Page, type PageMethods, type PageResponse } from \"./core/pagination.js\";\nexport type { RequestOptions } from \"./core/request-options.js\";\nexport {\n fileFromPath,\n toFile,\n type FileData,\n type FileUpload,\n type Uploadable,\n} from \"./core/uploads.js\";\nexport { VERSION } from \"./core/version.js\";\nexport * from \"./resources/index.js\";\nexport * from \"./webhooks/index.js\";\nexport * from \"./authentication/index.js\";\nexport type * from \"./types/index.js\";\n"]}