@productcraft/notify 0.2.0 → 0.4.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.
- package/README.md +10 -7
- package/api.md +316 -4
- package/dist/index.cjs +347 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5531 -2852
- package/dist/index.d.ts +5531 -2852
- package/dist/index.js +347 -9
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +291 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +291 -0
- package/dist/testing.js.map +1 -1
- package/manifest.json +167 -2
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/_generated/resources.ts","../src/_generated/types.ts","../src/_generated/client.ts","../src/_generated/errors.ts"],"names":["Notify"],"mappings":";;;;;;AAwBO,IAAM,cAAN,MAAkB;AAAA,EACJ,OAAA;AAAA;AAAA,EAEA,EAAA;AAAA,EACnB,WAAA,CAAY,MAAA,EAAmB,KAAA,GAAe,EAAC,EAAG;AAChD,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA;AACf,IAAA,IAAA,CAAK,EAAA,GAAK,KAAA;AAAA,EACZ;AACF,CAAA;AAKO,IAAM,kBAAA,GAAN,cAAiC,WAAA,CAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBlD,MAAA,CAAO,QAAgC,OAAA,EAAsE;AAC3G,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,0CAAA,EAA4C,IAAA,EAAM,MAAA,EAAQ,UAAA,EAAY,IAAA,IAAQ,OAAO,CAAA;AAAA,EAC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A,EAAoB,kBAAA,EAAoB,wBAAA,EAA0B,oBAAA,EAAsB,wBAAwB,qBAAA,EAAuB,sBAAA,EAAwB,8BAAA,EAAgC,yBAAA,EAA2B,2BAA2B,uBAAA,EAAyB,oBAAA,EAAsB,cAAA,EAAgB,gBAAA,EAAkB,wBAAwB,YAAA,EAAc,0BAAA,EAA4B,kBAAA,EAAoB,oBAAA,EAAsB,sBAAsB,iBAAA,EAAmB,6BAAA,EAA+B,oBAAA,EAAsB,4BAAA,EAA8B,qBAAqB,wBAAA,EAA0B,oBAAA,EAAsB,yBAAyB,sBAAA,EAAwB,kBAAA,EAAoB,mBAAmB,CAAA","file":"index.js","sourcesContent":["// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nimport type { APIClient, APIPromise, PagePromise, PollOptions, RequestOptions } from \"@productcraft/core\";\nimport type * as T from \"./types.js\";\nimport type { UnwrapWebhookEvent, WebhookSignParams, WebhookUnwrapParams } from \"./webhooks.js\";\nimport type { SignedWebhook } from \"@productcraft/core\";\n\ntype Bound = Readonly<Record<string, string | undefined>>;\n\n/** Split params into [picked, rest] by key. */\nfunction split(params: object | undefined, keys: readonly string[]): [Record<string, unknown>, Record<string, unknown>] {\n const picked: Record<string, unknown> = {};\n const rest: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(params ?? {})) (keys.includes(k) ? picked : rest)[k] = v;\n return [picked, rest];\n}\n\n/** Fill `actor_id` from a scope bound with `.as(actorId)`, unless the call passes one. */\nfunction fillActor<P>(params: P, bound: Bound): P {\n if (bound.actor_id === undefined) return params;\n const p = (params ?? {}) as Record<string, unknown>;\n return (p.actor_id === undefined ? { ...p, actor_id: bound.actor_id } : p) as P;\n}\n\nexport class APIResource {\n protected readonly _client: APIClient;\n /** Path parameters (and `actor_id`) bound by the enclosing scope. */\n protected readonly _b: Bound;\n constructor(client: APIClient, bound: Bound = {}) {\n this._client = client;\n this._b = bound;\n }\n}\n\nvoid split;\nvoid fillActor;\n/** `categories` */\nexport class CategoriesResource extends APIResource {\n /**\n * Create a category\n *\n * At most 50 categories per workspace during the preview. Channels left out of `defaults` are `on`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.CategoryCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, CATEGORY_KEY_TAKEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CATEGORY_KEY_TAKEN`: the key is in use; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the workspace already has 50 categories.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/categories\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-categories\n * @example\n * ```ts\n * const category = await notify.categories.create({ key: \"security\" });\n * ```\n */\n create(params: T.CategoryCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Category>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/categories\", body: params, idempotent: true }, options);\n }\n /**\n * Delete a category\n *\n * Only when no notification type uses it. Recipients' preferences for the category are deleted with it.\n *\n * Credential: `bearer`.\n *\n * @param categoryId - Id of the category.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.\n * @throws {ConflictError} 409 CONFLICT, CATEGORY_IN_USE: `CATEGORY_IN_USE`: a notification type still uses the category.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/categories/{category_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-categories-category-id\n * @example\n * ```ts\n * await notify.categories.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(categoryId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/categories/{category_id}\", pathParams: { category_id: categoryId } }, options);\n }\n /**\n * List categories\n *\n * By `ordinal`, then oldest first.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.CategoryListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad parameter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/categories\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-categories\n * @example\n * ```ts\n * for await (const category of notify.categories.list()) {\n * console.log(category);\n * }\n * const page = await notify.categories.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.CategoryListParams, options?: RequestOptions): PagePromise<T.Category> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/categories\", query: params }, options);\n }\n /**\n * Get a category\n *\n * Credential: `bearer`.\n *\n * @param categoryId - Id of the category.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/categories/{category_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-categories-category-id\n * @example\n * ```ts\n * const category = await notify.categories.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(categoryId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Category>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/categories/{category_id}\", pathParams: { category_id: categoryId } }, options);\n }\n /**\n * Update a category\n *\n * Changes the fields you send. `defaults` merges per channel. The key cannot change.\n *\n * Credential: `bearer`.\n *\n * @param categoryId - Id of the category.\n * @param params - `Notify.CategoryUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/categories/{category_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-categories-category-id\n * @example\n * ```ts\n * const category = await notify.categories.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { android_channel_id: \"string\" });\n * ```\n */\n update(categoryId: string, params?: T.CategoryUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Category>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/categories/{category_id}\", pathParams: { category_id: categoryId }, body: params }, options);\n }\n}\n\n/** `channels.apns` */\nexport class ChannelsApnsResource extends APIResource {\n /**\n * Delete an APNs key\n *\n * Deletes an APNs credential and erases its key immediately. Push to devices of its bundle id is skipped (`credential_invalid`) until another key is uploaded.\n *\n * Credential: `bearer`.\n *\n * @param credentialId - Id of the credential.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CREDENTIAL_NOT_FOUND: `CREDENTIAL_NOT_FOUND`: no APNs credential with this id in the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/channels/apns/credentials/{credential_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-channels-apns-credentials-credential-id\n * @example\n * ```ts\n * await notify.channels.apns.deleteCredential(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n deleteCredential(credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/channels/apns/credentials/{credential_id}\", pathParams: { credential_id: credentialId } }, options);\n }\n /**\n * Upload an APNs key\n *\n * Uploads an APNs authentication key (`.p8`, token auth) for one bundle id. You still create the key in your Apple developer account; Notify validates it with Apple before activating it (a background push to a placeholder token that reaches no device), stores it encrypted and never returns it. An upload replaces the active or invalid key of the same bundle id whose environment overlaps (`replaced_credential_ids`), and resumes push for that bundle id if Apple had refused the previous key. Uploading the active key again unchanged only re-validates it. Nothing is stored when Apple refuses the key or cannot be reached.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelApnUploadCredentialParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is malformed (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFLICT`: another upload for the same bundle id ran at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID, CREDENTIAL_MISMATCH: `CREDENTIAL_INVALID`: the `.p8` is not a P-256 private key, or Apple rejected it (wrong `key_id`/`team_id`, revoked key); `CREDENTIAL_MISMATCH`: Apple accepted the key but not for this `bundle_id`. Nothing was stored.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 502 BAD_GATEWAY: `BAD_GATEWAY`: Apple could not be reached or is throttling; nothing was stored, retry.\n * @see PUT /v1/workspaces/{workspace_id}/channels/apns/credentials\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-channels-apns-credentials\n * @example\n * ```ts\n * const apnsCredential = await notify.channels.apns.uploadCredential({\n * bundle_id: \"com.example.app\",\n * environment: \"sandbox\",\n * key_id: \"ABC123DEFG\",\n * p8: \"string\",\n * team_id: \"DEF123GHIJ\",\n * });\n * ```\n */\n uploadCredential(params: T.ChannelApnUploadCredentialParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ApnsCredential>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/channels/apns/credentials\", body: params, idempotent: true }, options);\n }\n}\n\n/** `channels.fcm` */\nexport class ChannelsFcmResource extends APIResource {\n /**\n * Delete an FCM service account\n *\n * Deletes an FCM credential and erases its private key immediately. Push to Android devices of its project is skipped (`credential_invalid`) until another service account is uploaded.\n *\n * Credential: `bearer`.\n *\n * @param credentialId - Id of the credential.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CREDENTIAL_NOT_FOUND: `CREDENTIAL_NOT_FOUND`: no FCM credential with this id in the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/channels/fcm/credentials/{credential_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-channels-fcm-credentials-credential-id\n * @example\n * ```ts\n * await notify.channels.fcm.deleteCredential(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n deleteCredential(credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/channels/fcm/credentials/{credential_id}\", pathParams: { credential_id: credentialId } }, options);\n }\n /**\n * Upload an FCM service account\n *\n * Uploads the JSON key of a Google service account for one Firebase project (FCM HTTP v1). You still create the service account and its key in your Google Cloud project; Notify validates it with Google before activating it (an OAuth token request and a `validate_only` message to a placeholder token that reaches no device), stores the private key encrypted and never returns it. Use a dedicated service account with only the \"Firebase Cloud Messaging API Admin\" role: the Firebase Admin SDK account (`firebase-adminsdk-*`) is accepted with a `warnings` entry because it can do far more than send push. An upload replaces the active or invalid credential of the same project (`replaced_credential_ids`) and resumes push for that project if Google had refused the previous one. Uploading the active account again unchanged only re-validates it. Nothing is stored when Google refuses the account or cannot be reached.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelFcmUploadCredentialParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is malformed (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFLICT`: another upload for the same project ran at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID: `CREDENTIAL_INVALID`: the JSON is not a service-account key file, or Google rejected it (deleted account or key, missing Firebase Cloud Messaging role, FCM API not enabled, unknown project). Nothing was stored.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 502 BAD_GATEWAY: `BAD_GATEWAY`: Google could not be reached or is throttling; nothing was stored, retry.\n * @see PUT /v1/workspaces/{workspace_id}/channels/fcm/credentials\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-channels-fcm-credentials\n * @example\n * ```ts\n * const fcmCredential = await notify.channels.fcm.uploadCredential({ service_account: \"string\" });\n * ```\n */\n uploadCredential(params: T.ChannelFcmUploadCredentialParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.FcmCredential>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/channels/fcm/credentials\", body: params, idempotent: true }, options);\n }\n}\n\n/** `channels.webpush` */\nexport class ChannelsWebpushResource extends APIResource {\n /**\n * Generate the web push VAPID key\n *\n * Generates a P-256 key pair for web push (RFC 8292) and returns its public key; the private key is stored encrypted and never returned. If the workspace already has a key, this rotates it and needs `confirm: \"rotate\"`: every existing browser subscription stops working and every web push device is marked `invalid` (`vapid_rotated`) until the browser subscribes again with the new key.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelWebpushGenerateVapidKeysParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFIRMATION_REQUIRED`: the workspace already has a VAPID key and the body has no `confirm: \"rotate\"`; `CONFLICT`: another request changed the key at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-channels-webpush-vapid-keys\n * @example\n * ```ts\n * const vapidKey = await notify.channels.webpush.generateVapidKeys({ confirm: \"rotate\" });\n * ```\n */\n generateVapidKeys(params?: T.ChannelWebpushGenerateVapidKeysParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.VapidKey>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\", body: params, idempotent: true }, options);\n }\n /**\n * Import a web push VAPID key\n *\n * Imports an existing VAPID key pair (for example from another push provider) so subscriptions made with it keep working. The pair is checked to be a matching P-256 pair. The private key is stored encrypted and never returned. Replacing a different existing key needs `confirm: \"rotate\"` (see generate); importing the active pair again changes nothing.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelWebpushImportVapidKeysParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, CONFIRMATION_REQUIRED: `CONFIRMATION_REQUIRED`: a different key is active and the body has no `confirm: \"rotate\"`; `CONFLICT`: another request changed the key at the same time.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID: `CREDENTIAL_INVALID`: the keys are not base64url P-256 keys, or they are not a matching pair.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-channels-webpush-vapid-keys\n * @example\n * ```ts\n * const vapidKey = await notify.channels.webpush.importVapidKeys({\n * private_key: \"string\",\n * public_key: \"BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U\",\n * });\n * ```\n */\n importVapidKeys(params: T.ChannelWebpushImportVapidKeysParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.VapidKey>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\", body: params }, options);\n }\n /**\n * Get the web push public key\n *\n * The VAPID public key browsers subscribe with (`applicationServerKey`), or `configured: false` before one is generated or imported.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/channels/webpush\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-channels-webpush\n * @example\n * ```ts\n * const webPushChannel = await notify.channels.webpush.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebPushChannel>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/channels/webpush\" }, options);\n }\n}\n\n/** `channels` */\nexport class ChannelsResource extends APIResource {\n #apns?: ChannelsApnsResource;\n #fcm?: ChannelsFcmResource;\n #webpush?: ChannelsWebpushResource;\n get apns(): ChannelsApnsResource {\n return (this.#apns ??= new ChannelsApnsResource(this._client, this._b));\n }\n get fcm(): ChannelsFcmResource {\n return (this.#fcm ??= new ChannelsFcmResource(this._client, this._b));\n }\n get webpush(): ChannelsWebpushResource {\n return (this.#webpush ??= new ChannelsWebpushResource(this._client, this._b));\n }\n /**\n * List channels\n *\n * Whether each channel (inbox, email, push, web push) can deliver now, and the metadata of its credentials. Never returns a secret: credentials show a fingerprint only.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/channels\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-channels\n * @example\n * ```ts\n * const channelList = await notify.channels.list();\n * ```\n */\n list(options?: RequestOptions): APIPromise<T.WithLastResponse<T.ChannelList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/channels\" }, options);\n }\n}\n\n/** `deliveries` */\nexport class DeliveriesResource extends APIResource {\n /**\n * List deliveries\n *\n * Newest first. Filter by `notification_id`, `recipient` (external id), `state` or `channel`. Every skip, retry and failure carries a `reason` with an `explanation`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.DeliveryListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/deliveries\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-deliveries\n * @example\n * ```ts\n * for await (const delivery of notify.deliveries.list()) {\n * console.log(delivery);\n * }\n * const page = await notify.deliveries.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.DeliveryListParams, options?: RequestOptions): PagePromise<T.Delivery> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/deliveries\", query: params }, options);\n }\n /**\n * Get a delivery\n *\n * With every provider attempt (status, code, duration; no message content).\n *\n * Credential: `bearer`.\n *\n * @param deliveryId - The delivery id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, DELIVERY_NOT_FOUND: `DELIVERY_NOT_FOUND`: no delivery with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/deliveries/{delivery_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-deliveries-delivery-id\n * @example\n * ```ts\n * const deliveryDetail = await notify.deliveries.retrieve(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a02\");\n * ```\n */\n retrieve(deliveryId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.DeliveryDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/deliveries/{delivery_id}\", pathParams: { delivery_id: deliveryId } }, options);\n }\n}\n\n/** `export` */\nexport class ExportResource extends APIResource {\n /**\n * Export the configuration\n *\n * Categories, notification types with every template, and settings, in the shapes the create and `PUT /notification-types/by-key/{key}` calls accept: apply it to another workspace to promote a setup. Recipients are exported with `GET /recipients?include=preferences`.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/export\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-export\n * @example\n * ```ts\n * const exportResult = await notify.export.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.Export>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/export\" }, options);\n }\n}\n\n/** `notificationTypes.templates` */\nexport class NotificationTypesTemplatesResource extends APIResource {\n /**\n * Delete a template\n *\n * Deletes the template and its versions. Sends to that channel and locale fall back along the locale chain.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale\n * @example\n * ```ts\n * await notify.notificationTypes.templates.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\");\n * ```\n */\n delete(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\", locale: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\", pathParams: { type_id: typeId, channel, locale } }, options);\n }\n /**\n * Get a template\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale\n * @example\n * ```ts\n * const template = await notify.notificationTypes.templates.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\");\n * ```\n */\n retrieve(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\", locale: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Template>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\", pathParams: { type_id: typeId, channel, locale } }, options);\n }\n /**\n * Revert a template\n *\n * Restores an earlier version as a new version (audited as `notify.template.reverted`).\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param params - `Notify.NotificationTypeTemplateRevertParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel, malformed locale or version.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND, TEMPLATE_VERSION_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, `TEMPLATE_NOT_FOUND`, or `TEMPLATE_VERSION_NOT_FOUND`: that version is not kept.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale-revert\n * @example\n * ```ts\n * const template = await notify.notificationTypes.templates.revert(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\", { version: 1 });\n * ```\n */\n revert(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\", locale: string, params: T.NotificationTypeTemplateRevertParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Template>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert\", pathParams: { type_id: typeId, channel, locale }, body: params }, options);\n }\n /**\n * Create or replace a template\n *\n * Sets the template of one channel and locale. Every change is kept as a version (the last 20); writing the same body again changes nothing. For `email`, the body names a Mail template (`mail_template_name`); setup status reports one that does not exist.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param params - `Notify.NotificationTypeTemplateUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, TEMPLATE_INVALID, UNSAFE_URL, LIMIT_EXCEEDED: `TEMPLATE_INVALID`: a field is missing, unknown or does not parse (the message names it); `UNSAFE_URL`: a URL field is not https; `LIMIT_EXCEEDED`: the template is over 32 KB or the type has 100 templates.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale\n * @example\n * ```ts\n * const template = await notify.notificationTypes.templates.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\", { body: { body: \"We received **{{amount}}**.\", title: \"Invoice {{invoice_id}} paid\" } });\n * ```\n */\n update(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\", locale: string, params: T.NotificationTypeTemplateUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Template>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\", pathParams: { type_id: typeId, channel, locale }, body: params }, options);\n }\n /**\n * List a template's versions\n *\n * The last 20 versions, newest first.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/versions\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale-versions\n * @example\n * ```ts\n * const templateVersionList = await notify.notificationTypes.templates.versions(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\");\n * ```\n */\n versions(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\", locale: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.TemplateVersionList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/versions\", pathParams: { type_id: typeId, channel, locale } }, options);\n }\n}\n\n/** `notificationTypes` */\nexport class NotificationTypesResource extends APIResource {\n #templates?: NotificationTypesTemplatesResource;\n get templates(): NotificationTypesTemplatesResource {\n return (this.#templates ??= new NotificationTypesTemplatesResource(this._client, this._b));\n }\n /**\n * Archive a notification type\n *\n * Archived types cannot be sent (`NOTIFICATION_TYPE_ARCHIVED`); history stays. Archiving twice is a no-op.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/archive\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types-type-id-archive\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.archive(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n archive(typeId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/archive\", pathParams: { type_id: typeId } }, options);\n }\n /**\n * Create a notification type\n *\n * At most 200 types per workspace during the preview. Add templates with `PUT …/templates/{channel}/{locale}`, or create the type and its templates in one call with `PUT /notification-types/by-key/{key}`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationTypeCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, NOTIFICATION_TYPE_KEY_TAKEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `NOTIFICATION_TYPE_KEY_TAKEN`: the key is in use; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR, LIMIT_EXCEEDED: `CATEGORY_NOT_FOUND`: no category with `category_key`; `VALIDATION_ERROR`: the routing is invalid; `LIMIT_EXCEEDED`: the workspace already has 200 types.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.create({ key: \"invoice.paid\" });\n * ```\n */\n create(params: T.NotificationTypeCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types\", body: params, idempotent: true }, options);\n }\n /**\n * List notification types\n *\n * Newest first; archived types only with `include_archived=true`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationTypeListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad parameter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types\n * @example\n * ```ts\n * for await (const notificationType of notify.notificationTypes.list()) {\n * console.log(notificationType);\n * }\n * const page = await notify.notificationTypes.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.NotificationTypeListParams, options?: RequestOptions): PagePromise<T.NotificationType> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types\", query: params }, options);\n }\n /**\n * Preview a notification type\n *\n * Renders every routed channel with sample `data`, or as a real `recipient` (its locale: exact, then language, then the type default; its fields as `recipient.*`). Reports missing variables per channel and variables some channels use but others do not. Sends nothing.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param params - `Notify.NotificationTypePreviewParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, RECIPIENT_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `RECIPIENT_NOT_FOUND`: no recipient with this external id.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/preview\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types-type-id-preview\n * @example\n * ```ts\n * const preview = await notify.notificationTypes.preview(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { data: { amount: \"12.00\", invoice_id: \"inv_123\" } });\n * ```\n */\n preview(typeId: string, params?: T.NotificationTypePreviewParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Preview>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/preview\", pathParams: { type_id: typeId }, body: params }, options);\n }\n /**\n * Create or replace a notification type by key\n *\n * Types as code: sets the type and its complete template set in one transaction (the shape `GET /export` returns per type). Fields left out take their defaults; templates not listed are deleted; unchanged templates keep their version. Applying the same body again changes nothing, so the call is safe to retry without an `Idempotency-Key`. Use it to promote types from a staging workspace. An archived type stays archived.\n *\n * Credential: `bearer`.\n *\n * @param key - The type key.\n * @param params - `Notify.NotificationTypeReplaceByKeyParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field or template entry is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR, TEMPLATE_INVALID, UNSAFE_URL, LIMIT_EXCEEDED: `CATEGORY_NOT_FOUND`, `VALIDATION_ERROR` (routing), `TEMPLATE_INVALID`, `UNSAFE_URL` or `LIMIT_EXCEEDED` (200 types, 32 KB per template).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/notification-types/by-key/{key}\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-notification-types-by-key-key\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.replaceByKey(\"invoice.paid\", { templates: [{ body: {}, channel: \"inbox\", locale: \"string\" }] });\n * ```\n */\n replaceByKey(key: string, params: T.NotificationTypeReplaceByKeyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/notification-types/by-key/{key}\", pathParams: { key }, body: params }, options);\n }\n /**\n * Get a notification type\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types-type-id\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(typeId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}\", pathParams: { type_id: typeId } }, options);\n }\n /**\n * Update a notification type\n *\n * Changes the fields you send; `routing` is replaced whole. The key cannot change. Changing `critical` is audited with the old and new value.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param params - `Notify.NotificationTypeUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR: `CATEGORY_NOT_FOUND`: no category with `category_key`; `VALIDATION_ERROR`: the routing is invalid.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/notification-types/{type_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-notification-types-type-id\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { category_key: \"billing\" });\n * ```\n */\n update(typeId: string, params?: T.NotificationTypeUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}\", pathParams: { type_id: typeId }, body: params }, options);\n }\n}\n\n/** `notifications` */\nexport class NotificationsResource extends APIResource {\n /**\n * Cancel a notification\n *\n * Deliveries still pending, scheduled or retrying end `skipped: cancelled`, and recipients not planned yet are never notified. Delivered messages stay (retract inbox items with `…/retract`). Safe to repeat.\n *\n * Credential: `bearer`.\n *\n * @param notificationId - The notification id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications/{notification_id}/cancel\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-notification-id-cancel\n * @example\n * ```ts\n * const notification = await notify.notifications.cancel(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a01\");\n * ```\n */\n cancel(notificationId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Notification>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications/{notification_id}/cancel\", pathParams: { notification_id: notificationId } }, options);\n }\n /**\n * Cancel notifications by cancellation key\n *\n * Cancels every live notification sent with this `cancellation_key`: deliveries still pending, scheduled or retrying end `skipped: cancelled`. Already delivered messages stay delivered (retract inbox items with `…/retract`). Safe to repeat.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationCancelByKeyParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `cancellation_key` is missing or not 1-255 characters of `A-Z a-z 0-9 . _ : @ | -`.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications/cancel\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-cancel\n * @example\n * ```ts\n * const cancelByKey = await notify.notifications.cancelByKey({ cancellation_key: \"invite.sent:inv_77\" });\n * ```\n */\n cancelByKey(params: T.NotificationCancelByKeyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.CancelByKey>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications/cancel\", body: params }, options);\n }\n /**\n * List notifications (message log)\n *\n * Newest first. Filter by `type`, `tag` (`key:value` or `key`), `tenant` or `cancellation_key`. Pass `next_cursor` as `cursor` until `has_more` is false.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notifications\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notifications\n * @example\n * ```ts\n * for await (const notification of notify.notifications.list()) {\n * console.log(notification);\n * }\n * const page = await notify.notifications.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.NotificationListParams, options?: RequestOptions): PagePromise<T.Notification> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notifications\", query: params }, options);\n }\n /**\n * Retract a notification from inboxes\n *\n * Archives the notification's inbox items for every recipient (for example once an invite is accepted) and updates their unread counts; open inboxes drop the items. Does not cancel other channels (use `…/cancel`). Safe to repeat.\n *\n * Credential: `bearer`.\n *\n * @param notificationId - The notification id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications/{notification_id}/retract\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-notification-id-retract\n * @example\n * ```ts\n * const retract = await notify.notifications.retract(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a01\");\n * ```\n */\n retract(notificationId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Retract>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications/{notification_id}/retract\", pathParams: { notification_id: notificationId } }, options);\n }\n /**\n * Get a notification\n *\n * With its data and the number of deliveries per channel and state.\n *\n * Credential: `bearer`.\n *\n * @param notificationId - The notification id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notifications/{notification_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notifications-notification-id\n * @example\n * ```ts\n * const notification = await notify.notifications.retrieve(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a01\");\n * ```\n */\n retrieve(notificationId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Notification>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notifications/{notification_id}\", pathParams: { notification_id: notificationId } }, options);\n }\n /**\n * Send a notification\n *\n * Notifies up to 1,000 recipients with one notification type, across the type's channels (in-app inbox, email, push, web push), honouring each recipient's preferences. Returns 202 as soon as the send is stored; delivery happens in the background (see `GET /deliveries`). Unknown external ids do not fail the call: they are listed in `skipped` (`create_missing: true` creates them instead); the call fails only when no recipient can be notified. An `Idempotency-Key` is **required** (a deterministic one built from your event, such as `invoice.paid:inv_123`, is best; dots are fine): the same key and body return the same notification, even when retried much later; the same key with a different body is a 409. `dry_run: true` returns the plan per recipient and channel with the reason for every skip, and stores nothing (200, no key needed). Limits: 3,000 recipients per minute per workspace; 30 notifications per minute per recipient (critical types have a separate 30), beyond which deliveries are skipped as `rate_limited`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationSendParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, IDEMPOTENCY_KEY_REQUIRED, TOO_MANY_RECIPIENTS: `IDEMPOTENCY_KEY_REQUIRED`: no `Idempotency-Key`; `BAD_REQUEST`: the `Idempotency-Key` is over 256 characters or has a character outside `A-Z a-z 0-9 . _ : -` (the message names it); `TOO_MANY_RECIPIENTS`: over 1,000; `VALIDATION_ERROR`: a field is invalid (an invalid `cancellation_key` included).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no type with this key.\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the key was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {APIError} 413 PAYLOAD_TOO_LARGE, DATA_TOO_LARGE: `DATA_TOO_LARGE`: `data` is over 16 KB.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, RECIPIENT_NOT_FOUND, NOTIFICATION_TYPE_ARCHIVED, TEMPLATE_MISSING, SEND_AT_OUT_OF_RANGE, UNSAFE_URL, VALIDATION_ERROR: `RECIPIENT_NOT_FOUND`: no recipient can be notified (`details.skipped` lists why); `NOTIFICATION_TYPE_ARCHIVED`; `TEMPLATE_MISSING`: no template for any requested channel; `SEND_AT_OUT_OF_RANGE`; `UNSAFE_URL`; `VALIDATION_ERROR`: a channel outside the type's routing.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 3,000 recipients a minute in this workspace; see `Retry-After`. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications\n * @example\n * ```ts\n * const result = await notify.notifications.send({\n * recipients: [\"user_123\", { email: \"a@example.com\", external_id: \"user_456\", locale: \"pt-PT\" }],\n * type: \"invoice.paid\",\n * });\n * ```\n */\n send(params: T.NotificationSendParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationSendResponse>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications\", body: params, idempotent: true }, options);\n }\n}\n\n/** `recipientTokens` */\nexport class RecipientTokensResource extends APIResource {\n /**\n * Mint a recipient token\n *\n * Returns a short-lived token (default 1 hour, at most 24 hours) that lets one recipient read their inbox, register devices, manage their preferences and open the real-time stream through the client API (`/v1/client/…`). Mint it on your backend with your API key after you have signed the user in, and hand it to the app or browser: your secret key never ships in an app. A recipient that does not exist yet is created (with the `upsert` fields if given). Limited to 3,000 mints per minute per workspace: cache a token per user for most of its lifetime. Not idempotent by design (each call returns a fresh token), so it takes no `Idempotency-Key`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.RecipientTokenMintParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, RECIPIENT_ERASED: `RECIPIENT_ERASED`: the recipient was erased in the last 24 hours (its linked Auth user was deleted).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over the mint limit; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipient-tokens\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipient-tokens\n * @example\n * ```ts\n * const recipientToken = await notify.recipientTokens.mint({ recipient: \"user_123\" });\n * ```\n */\n mint(params: T.RecipientTokenMintParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.RecipientToken>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipient-tokens\", body: params }, options);\n }\n}\n\n/** `recipients.devices` */\nexport class RecipientsDevicesResource extends APIResource {\n /**\n * Register a device\n *\n * Registers an APNs or FCM token, or a browser web push subscription, for the recipient. Registering a token the recipient already has refreshes it (200). A token registered to another recipient of the workspace moves to this one (a shared device signed in as someone else), at most 3 times per token per UTC day. A recipient keeps at most 20 active devices: registering more marks the least recently seen as `pruned` (`evicted`). The token is stored hashed and encrypted; responses show its last 6 characters only.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientDeviceCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id; create it with `PUT` first.\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was already used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, DEVICE_TOKEN_INVALID, WEBPUSH_ENDPOINT_NOT_ALLOWED: `DEVICE_TOKEN_INVALID`: the token or subscription is malformed for its channel (or `environment` is missing for APNs); `WEBPUSH_ENDPOINT_NOT_ALLOWED`: the endpoint is not https on a known push service, or resolves to a private address.\n * @throws {RateLimitError} 429 RATE_LIMITED, DEVICE_MOVE_LIMIT: `DEVICE_MOVE_LIMIT`: the token already moved between recipients 3 times today (UTC); `Retry-After` gives the seconds to midnight UTC. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/devices\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-external-id-devices\n * @example\n * ```ts\n * const device = await notify.recipients.devices.create(\"user_123\", { app_id: \"com.example.app\", channel: \"apns\" });\n * ```\n */\n create(externalId: string, params: T.RecipientDeviceCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Device>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices\", pathParams: { external_id: externalId }, body: params, idempotent: true }, options);\n }\n /**\n * Remove a device\n *\n * Deletes the device (call it when the user signs out on that device). Pushes stop at once.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param deviceId - Id of the device.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND, DEVICE_NOT_FOUND: `RECIPIENT_NOT_FOUND`, or `DEVICE_NOT_FOUND`: the recipient has no device with this id.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/recipients/{external_id}/devices/{device_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-recipients-external-id-devices-device-id\n * @example\n * ```ts\n * await notify.recipients.devices.delete(\"user_123\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(externalId: string, deviceId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices/{device_id}\", pathParams: { external_id: externalId, device_id: deviceId } }, options);\n }\n /**\n * List a recipient's devices\n *\n * Most recently seen first: the active ones (at most 20) and any invalid or pruned ones not yet reaped (kept 7 days).\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/devices\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-devices\n * @example\n * ```ts\n * const deviceList = await notify.recipients.devices.list(\"user_123\");\n * ```\n */\n list(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.DeviceList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices\", pathParams: { external_id: externalId } }, options);\n }\n}\n\n/** `recipients.inbox` */\nexport class RecipientsInboxResource extends APIResource {\n /**\n * List a recipient's inbox items\n *\n * What the recipient sees in their in-app inbox, newest first, with their unseen and unread counts. `status` picks active (default), archived or all items. Read-only: recipients mark items through the client API.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientInboxListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/inbox\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-inbox\n * @example\n * ```ts\n * for await (const inbox of notify.recipients.inbox.list(\"user_123\")) {\n * console.log(inbox);\n * }\n * const page = await notify.recipients.inbox.list(\"user_123\", {}, { timeout: 5_000 });\n * ```\n */\n list(externalId: string, params?: T.RecipientInboxListParams, options?: RequestOptions): PagePromise<T.InboxItem> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/inbox\", pathParams: { external_id: externalId }, query: params }, options);\n }\n}\n\n/** `recipients.preferences` */\nexport class RecipientsPreferencesResource extends APIResource {\n /**\n * Replace a recipient's preferences\n *\n * Sets the complete set of cells: cells you leave out are removed. Most specific wins when sending: type × channel, type × `*`, category × channel, category × `*`, all × channel, then the category default. Calling it again with the same body changes nothing.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientPreferenceReplaceParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a cell is malformed or repeated.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, PREFERENCE_LOCKED: `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: a cell names an unknown key; `PREFERENCE_LOCKED`: the channel is mandatory for that category and cannot be turned off.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-recipients-external-id-preferences\n * @example\n * ```ts\n * const preferenceSet = await notify.recipients.preferences.replace(\"user_123\", { preferences: [{ channel: \"inbox\", enabled: true, scope: \"all\" }] });\n * ```\n */\n replace(externalId: string, params: T.RecipientPreferenceReplaceParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceSet>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\", pathParams: { external_id: externalId }, body: params }, options);\n }\n /**\n * Get a recipient's preferences\n *\n * The cells the recipient set, unsubscribe-all, time zone and quiet hours. Anything not set follows the category defaults.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-preferences\n * @example\n * ```ts\n * const preferenceSet = await notify.recipients.preferences.retrieve(\"user_123\");\n * ```\n */\n retrieve(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceSet>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Update a recipient's preferences\n *\n * Sets or removes (`enabled: null`) the cells you send and keeps the others; also sets unsubscribe-all, time zone and quiet hours.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientPreferenceUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a cell is malformed or repeated.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, PREFERENCE_LOCKED: `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: a cell names an unknown key; `PREFERENCE_LOCKED`: the channel is mandatory for that category and cannot be turned off.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-recipients-external-id-preferences\n * @example\n * ```ts\n * const preferenceSet = await notify.recipients.preferences.update(\"user_123\", { preferences: [{ channel: \"inbox\", enabled: true, key: \"billing\", scope: \"all\" }] });\n * ```\n */\n update(externalId: string, params?: T.RecipientPreferenceUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceSet>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\", pathParams: { external_id: externalId }, body: params }, options);\n }\n}\n\n/** `recipients` */\nexport class RecipientsResource extends APIResource {\n #devices?: RecipientsDevicesResource;\n #inbox?: RecipientsInboxResource;\n #preferences?: RecipientsPreferencesResource;\n get devices(): RecipientsDevicesResource {\n return (this.#devices ??= new RecipientsDevicesResource(this._client, this._b));\n }\n get inbox(): RecipientsInboxResource {\n return (this.#inbox ??= new RecipientsInboxResource(this._client, this._b));\n }\n get preferences(): RecipientsPreferencesResource {\n return (this.#preferences ??= new RecipientsPreferencesResource(this._client, this._b));\n }\n /**\n * Create or update up to 1,000 recipients\n *\n * Upserts each row like `PUT /recipients/{external_id}`, with its devices. Rows are independent: a bad row is reported in `data` with `status: error` and its code, and never fails the rest. Rows are written in order of external id, in transactions of at most 200. At most 20 calls per minute per workspace (20,000 recipients) and 4 MB per request. Each row may carry its complete `preferences` set (as `PUT …/preferences`); a bad cell fails only its row. Send an `Idempotency-Key` so a retried import replays its first result.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.RecipientBulkIdentifyParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `recipients` is missing, empty or longer than 1,000.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was already used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: more than 20 bulk calls in a minute; see `Retry-After`. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/bulk\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-bulk\n * @example\n * ```ts\n * const bulkUpsertRecipients = await notify.recipients.bulkIdentify({ recipients: [{ external_id: \"user_123\" }] });\n * ```\n */\n bulkIdentify(params: T.RecipientBulkIdentifyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.BulkUpsertRecipients>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/bulk\", body: params, idempotent: true }, options);\n }\n /**\n * Erase a recipient (GDPR)\n *\n * Deletes the recipient and everything Notify holds for it: devices now, and preferences, inbox items and pending deliveries as those land. Delivery history keeps ids and states but loses addresses and rendered text. The data is gone when this returns; the external id can be used again. Email already handed to ProductCraft Mail stays in Mail's message log under Mail's retention.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipientErasure = await notify.recipients.delete(\"user_123\");\n * ```\n */\n delete(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.RecipientErasure>> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Create or update a recipient\n *\n * Creates the recipient with this external id, or updates it. Fields you leave out keep their stored value; `null` clears one; `properties` is replaced whole. Calling it again with the same body leaves the same recipient, so a retry is safe without an `Idempotency-Key` (the route does not take one).\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientIdentifyParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, AUTH_USER_ALREADY_LINKED: `AUTH_USER_ALREADY_LINKED`: the Auth end user is linked to another recipient of the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipient = await notify.recipients.identify(\"user_123\", { auth_user_id: \"9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b\" });\n * ```\n */\n identify(externalId: string, params?: T.RecipientIdentifyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Recipient>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId }, body: params }, options);\n }\n /**\n * List recipients\n *\n * Newest first. Filter by `email` (case-insensitive), `auth_user_id`, or `updated_since` for an incremental sync. Pass `next_cursor` as `cursor` until `has_more` is false. `include=preferences` adds each recipient's preference cells (an export of consent).\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.RecipientListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients\n * @example\n * ```ts\n * for await (const recipient of notify.recipients.list()) {\n * console.log(recipient);\n * }\n * const page = await notify.recipients.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.RecipientListParams, options?: RequestOptions): PagePromise<T.Recipient> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients\", query: params }, options);\n }\n /**\n * Get a recipient\n *\n * The profile; devices are under `…/devices`.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipient = await notify.recipients.retrieve(\"user_123\");\n * ```\n */\n retrieve(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Recipient>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Revoke a recipient's tokens\n *\n * Every recipient token minted for this recipient so far stops working on its next call (`401 RECIPIENT_TOKEN_INVALID`), open real-time streams included. Tokens you mint afterwards work. Use it when the user signs out everywhere or you suspect a token leaked. Calling it again is harmless.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokens\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-external-id-revoke-tokens\n * @example\n * ```ts\n * await notify.recipients.revokeTokens(\"user_123\");\n * ```\n */\n revokeTokens(externalId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokens\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Get a recipient's delivery timeline\n *\n * Every delivery to this recipient across notifications, newest first, with the reason for each skip or failure, the device's state and its last successful delivery; the first page also lists device token moves in and out of the recipient.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientTimelineParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/timeline\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-timeline\n * @example\n * ```ts\n * for await (const recipient of notify.recipients.timeline(\"user_123\")) {\n * console.log(recipient);\n * }\n * const page = await notify.recipients.timeline(\"user_123\", {}, { timeout: 5_000 });\n * ```\n */\n timeline(externalId: string, params?: T.RecipientTimelineParams, options?: RequestOptions): PagePromise<T.TimelineEntry> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/timeline\", pathParams: { external_id: externalId }, query: params }, options);\n }\n /**\n * Update a recipient\n *\n * Changes the fields you send on an existing recipient (404 when there is none; use `PUT` to create). `null` clears a field.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {ConflictError} 409 CONFLICT, AUTH_USER_ALREADY_LINKED: `AUTH_USER_ALREADY_LINKED`: the Auth end user is linked to another recipient of the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipient = await notify.recipients.update(\"user_123\", { auth_user_id: \"9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b\" });\n * ```\n */\n update(externalId: string, params?: T.RecipientUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Recipient>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId }, body: params }, options);\n }\n}\n\n/** `settings` */\nexport class SettingsResource extends APIResource {\n /**\n * Get Notify settings\n *\n * Email on/off and, after an automatic pause, when and why email was paused; the default time zone and quiet hours for recipients without their own.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/settings\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-settings\n * @example\n * ```ts\n * const notifySettings = await notify.settings.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotifySettings>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/settings\" }, options);\n }\n /**\n * Revoke every recipient token\n *\n * Every recipient token of the workspace stops working on its next call (`401 RECIPIENT_TOKEN_INVALID`), open real-time streams included; your apps get a new token from your backend. Use it after a suspected leak of many tokens.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/settings/revoke-all-tokens\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-settings-revoke-all-tokens\n * @example\n * ```ts\n * await notify.settings.revokeAllTokens();\n * ```\n */\n revokeAllTokens(options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/settings/revoke-all-tokens\" }, options);\n }\n /**\n * Update Notify settings\n *\n * Turn email on or off, set the default time zone and quiet hours (`null` clears either), replace the browser origins allowed on the client API (`client_origins`), or resume email after an automatic pause with `{ \"email_paused\": false }`. Resuming starts a fresh pause window: only emails sent after it count. Fix the cause first (where the addresses come from, whether people expect the email), or the next complaints pause it again. Calling it again with the same body changes nothing.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.SettingsUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/settings\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-settings\n * @example\n * ```ts\n * const notifySettings = await notify.settings.update({ client_origins: [\"https://app.example.com\", \"https://www.example.com\"] });\n * ```\n */\n update(params?: T.SettingsUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotifySettings>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/settings\", body: params }, options);\n }\n}\n\n/** `setupStatus` */\nexport class SetupStatusResource extends APIResource {\n /**\n * Get the setup checklist for Notify: what works, what is missing, and where to fix it.\n *\n * Rows, in order: `notification_type` (not_set until an active type exists), `email` (attention while email is off, blocked while Notify has paused it), and, once a type uses email, `mail_sender` (the Mail workspace default sender: pass when its domain is verified) and `email_templates` (every Mail template name your types use exists in Mail). Notify sends email through ProductCraft Mail and holds no credential for it: Mail is read with your own access, so a key without Mail read access shows those rows as `attention`. `complete` is true once no row is `not_set` or `blocked`. Each `fix.href` is a console path. Computed on every request.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.channel.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/setup-status\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-setup-status\n * @example\n * ```ts\n * const setupStatus = await notify.setupStatus.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.SetupStatus>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/setup-status\" }, options);\n }\n}\n\n/** `stats` */\nexport class StatsResource extends APIResource {\n /**\n * Get Notify stats\n *\n * Daily delivery counts per channel for a range of UTC days (default the last 30, at most 90): planned, sent, delivered, failed, skipped, and inbox items read. Counted by the day a delivery was planned, from an hourly rollup: today and yesterday are refreshed every hour, so the newest counts can be up to an hour old (`updated_at`). Kept beyond the 30 days that delivery history is kept.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.StatsRetrieveParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a date is invalid, `from` is after `to`, or the range is longer than 90 days.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.message.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/stats\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-stats\n * @example\n * ```ts\n * const notifyStats = await notify.stats.retrieve();\n * ```\n */\n retrieve(params?: T.StatsRetrieveParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotifyStats>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/stats\", query: params }, options);\n }\n}\n\n/** `webhooks.endpoints` */\nexport class WebhooksEndpointsResource extends APIResource {\n /**\n * Add a webhook endpoint. Returns its signing secret once.\n *\n * Deliveries are signed with the Standard Webhooks headers `webhook-id`, `webhook-timestamp` and `webhook-signature` (`v1,<base64 HMAC-SHA256 of \"<id>.<timestamp>.<body>\">`); the returned `whsec_…` secret works unchanged with any Standard Webhooks library. Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.WebhookEndpointCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, WEBHOOK_EVENT_TYPE_UNKNOWN: Validation failure: URL not https with a public host, or an unknown event type (`WEBHOOK_EVENT_TYPE_UNKNOWN`).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_LIMIT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Already 10 endpoints (`WEBHOOK_ENDPOINT_LIMIT`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The URL points at a private, loopback or internal address.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.create({ url: \"https://api.acme.com/webhooks\" });\n * ```\n */\n create(params: T.WebhookEndpointCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpointWithSecret>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints\", body: params, idempotent: true }, options);\n }\n /**\n * Delete a webhook endpoint.\n *\n * Queued retries are dropped. Its past attempts stay in the event log until the events expire.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * await notify.webhooks.endpoints.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(endpointId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId } }, options);\n }\n /**\n * List webhook endpoints, oldest first.\n *\n * At most 10, so this is always one page. Signing secrets are never returned here, only their last 4 characters.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: The scope id in the path is malformed.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints\n * @example\n * ```ts\n * for await (const endpoint of notify.webhooks.endpoints.list()) {\n * console.log(endpoint);\n * }\n * ```\n */\n list(options?: RequestOptions): PagePromise<T.WebhookEndpoint> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints\" }, options);\n }\n /**\n * Get one webhook endpoint (without its secret).\n *\n * The endpoint's URL, subscription, on/off state, failure streak and the last 4 characters of its signing secret. The full secret is only returned when the endpoint is created or its secret is rotated.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(endpointId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpoint>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId } }, options);\n }\n /**\n * Rotate the signing secret. The new one is returned once.\n *\n * For `grace_hours` (default 24) the previous secret keeps signing too: `webhook-signature` then lists one `v1,` signature per secret, so receivers can switch over without dropping a delivery.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Notify.WebhookEndpointRotateSecretParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `grace_hours` out of range, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-rotate-secret\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.rotateSecret(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { grace_hours: 24 });\n * ```\n */\n rotateSecret(endpointId: string, params?: T.WebhookEndpointRotateSecretParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpointWithSecret>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n /**\n * Send a test event to this endpoint now and return the result.\n *\n * Delivers the catalogue example of `event_type`, signed like any delivery, with `\"test\": true` in the body. Works while the endpoint is switched off or not subscribed to that type, is logged in the event log, and is never retried or counted toward an automatic disable. Waits up to 15 s for your receiver.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Notify.WebhookEndpointTestParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Unknown `event_type`, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-test\n * @example\n * ```ts\n * const webhookDeliveryAttempt = await notify.webhooks.endpoints.test(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { event_type: \"notification.accepted\" });\n * ```\n */\n test(endpointId: string, params: T.WebhookEndpointTestParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookDeliveryAttempt>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n /**\n * Change a webhook endpoint: URL, description, events, on/off.\n *\n * Only the fields sent change. `enabled: true` (or a new URL) also clears an automatic disable. Switching off cancels queued retries. The secret is unchanged; rotate it with `POST …/rotate-secret`.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Notify.WebhookEndpointUpdateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Validation failure, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The new URL points at a private, loopback or internal address.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { description: \"Production receiver\" });\n * ```\n */\n update(endpointId: string, params?: T.WebhookEndpointUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpoint>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n}\n\n/** `webhooks.eventTypes` */\nexport class WebhooksEventTypesResource extends APIResource {\n /**\n * List the events an endpoint can subscribe to.\n *\n * Each type with a plain description, its group and an example `data` object (what \"Send test\" delivers).\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/event-types\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-event-types\n * @example\n * ```ts\n * const webhookEventTypeList = await notify.webhooks.eventTypes.list();\n * ```\n */\n list(options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventTypeList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/event-types\" }, options);\n }\n}\n\n/** `webhooks.events` */\nexport class WebhooksEventsResource extends APIResource {\n /**\n * List webhook events, newest first (kept for 30 days).\n *\n * Every event logged while at least one endpoint existed, with the latest state per endpoint and when the next retry is due.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.WebhookEventListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Invalid filter value or cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/events\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-events\n * @example\n * ```ts\n * for await (const event of notify.webhooks.events.list()) {\n * console.log(event);\n * }\n * const page = await notify.webhooks.events.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.WebhookEventListParams, options?: RequestOptions): PagePromise<T.WebhookEvent> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/events\", query: params }, options);\n }\n /**\n * Send a logged event again, to its endpoints or to one endpoint.\n *\n * Same body and `webhook-id`, freshly signed, to every switched-on endpoint that receives this event type now, or only to `endpoint_id`. Waits for the receivers (up to 15 s each) and returns the attempts. A success cancels a retry still queued for that endpoint.\n *\n * Credential: `bearer`.\n *\n * @param eventId - The event id, `evt_<uuid>`.\n * @param params - `Notify.WebhookEventReplayParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. Or No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_NOT_SUBSCRIBED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `endpoint_id` is switched off or does not receive this event type (`WEBHOOK_ENDPOINT_NOT_SUBSCRIBED`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-events-event-id-replay\n * @example\n * ```ts\n * const webhookEventReplay = await notify.webhooks.events.replay(\"3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b\");\n * ```\n */\n replay(eventId: string, params?: T.WebhookEventReplayParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventReplay>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\", pathParams: { event_id: eventId }, query: params, idempotent: true }, options);\n }\n /**\n * Get one webhook event with every delivery attempt.\n *\n * The event as it was sent (`type`, `data`) and every delivery attempt to every endpoint, with its trigger, HTTP status, error and the start of the response body. Use it to debug a receiver, then `replay` to send it again.\n *\n * Credential: `bearer`.\n *\n * @param eventId - The event id, `evt_<uuid>`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/events/{event_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-events-event-id\n * @example\n * ```ts\n * const webhookEventDetail = await notify.webhooks.events.retrieve(\"3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b\");\n * ```\n */\n retrieve(eventId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}\", pathParams: { event_id: eventId } }, options);\n }\n}\n\n/** `webhooks` */\nexport class WebhooksResource extends APIResource {\n #endpoints?: WebhooksEndpointsResource;\n #eventTypes?: WebhooksEventTypesResource;\n #events?: WebhooksEventsResource;\n get endpoints(): WebhooksEndpointsResource {\n return (this.#endpoints ??= new WebhooksEndpointsResource(this._client, this._b));\n }\n get eventTypes(): WebhooksEventTypesResource {\n return (this.#eventTypes ??= new WebhooksEventTypesResource(this._client, this._b));\n }\n get events(): WebhooksEventsResource {\n return (this.#events ??= new WebhooksEventsResource(this._client, this._b));\n }\n /**\n * Verify a webhook's signature and parse it (Standard Webhooks, and the legacy `t=…,v1=…` scheme).\n *\n * @param params - The raw body, the request headers and optionally the secret.\n * @throws {WebhookVerificationError} The signature, timestamp or payload is invalid.\n * @throws {ConfigurationError} No secret was passed or configured.\n */\n unwrap(params: WebhookUnwrapParams): Promise<UnwrapWebhookEvent> {\n return this._client.unwrapWebhook<UnwrapWebhookEvent>(params, \"PRODUCTCRAFT_NOTIFY_WEBHOOK_SECRET\");\n }\n /**\n * Sign a test event the way ProductCraft signs deliveries (Standard Webhooks), so a handler\n * test can call `unwrap` without a live delivery. Returns the exact body and the headers.\n *\n * @param params - The event (an object is JSON-encoded), and optionally the secret, `id` and `timestamp`.\n * @throws {ConfigurationError} No secret was passed or configured.\n */\n sign(params: WebhookSignParams): Promise<SignedWebhook> {\n return this._client.signWebhook(params, \"PRODUCTCRAFT_NOTIFY_WEBHOOK_SECRET\");\n }\n}\n\n/** `notify` */\nexport class NotifyResources extends APIResource {\n #categories?: CategoriesResource;\n #channels?: ChannelsResource;\n #deliveries?: DeliveriesResource;\n #export?: ExportResource;\n #notificationTypes?: NotificationTypesResource;\n #notifications?: NotificationsResource;\n #recipientTokens?: RecipientTokensResource;\n #recipients?: RecipientsResource;\n #settings?: SettingsResource;\n #setupStatus?: SetupStatusResource;\n #stats?: StatsResource;\n #webhooks?: WebhooksResource;\n get categories(): CategoriesResource {\n return (this.#categories ??= new CategoriesResource(this._client, this._b));\n }\n get channels(): ChannelsResource {\n return (this.#channels ??= new ChannelsResource(this._client, this._b));\n }\n get deliveries(): DeliveriesResource {\n return (this.#deliveries ??= new DeliveriesResource(this._client, this._b));\n }\n get export(): ExportResource {\n return (this.#export ??= new ExportResource(this._client, this._b));\n }\n get notificationTypes(): NotificationTypesResource {\n return (this.#notificationTypes ??= new NotificationTypesResource(this._client, this._b));\n }\n get notifications(): NotificationsResource {\n return (this.#notifications ??= new NotificationsResource(this._client, this._b));\n }\n get recipientTokens(): RecipientTokensResource {\n return (this.#recipientTokens ??= new RecipientTokensResource(this._client, this._b));\n }\n get recipients(): RecipientsResource {\n return (this.#recipients ??= new RecipientsResource(this._client, this._b));\n }\n get settings(): SettingsResource {\n return (this.#settings ??= new SettingsResource(this._client, this._b));\n }\n get setupStatus(): SetupStatusResource {\n return (this.#setupStatus ??= new SetupStatusResource(this._client, this._b));\n }\n get stats(): StatsResource {\n return (this.#stats ??= new StatsResource(this._client, this._b));\n }\n get webhooks(): WebhooksResource {\n return (this.#webhooks ??= new WebhooksResource(this._client, this._b));\n }\n}\n\n/** `devices` */\nexport class ClientDevicesResource extends APIResource {\n /**\n * Remove this device\n *\n * Call it when the user signs out on the device: pushes to it stop at once.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param deviceId - Id of the device.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, DEVICE_NOT_FOUND: `DEVICE_NOT_FOUND`: the recipient has no device with this id.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/client/devices/{device_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-client-devices-device-id\n * @example\n * ```ts\n * await notify.client({ token: \"rt_example_recipient_token\" }).devices.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(deviceId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/client/devices/{device_id}\", pathParams: { device_id: deviceId } }, options);\n }\n /**\n * Register this device\n *\n * Registers the app's APNs or FCM token, or the browser's web push subscription, for the signed-in recipient (call it on every app start; the same token again refreshes it). A token registered to another recipient moves to this one, at most 3 times per token per UTC day; a recipient registers at most 10 times per hour. Call `DELETE /v1/client/devices/{device_id}` when the user signs out on this device. Safe to repeat, so it takes no `Idempotency-Key`.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MeDeviceRegisterParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, DEVICE_TOKEN_INVALID, WEBPUSH_ENDPOINT_NOT_ALLOWED: `DEVICE_TOKEN_INVALID`: the token or subscription is malformed for its channel (or `environment` is missing for APNs); `WEBPUSH_ENDPOINT_NOT_ALLOWED`: the endpoint is not https on a known push service.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/devices\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-devices\n * @example\n * ```ts\n * const device = await notify.client({ token: \"rt_example_recipient_token\" }).devices.register({ app_id: \"com.example.app\", channel: \"apns\" });\n * ```\n */\n register(params: T.MeDeviceRegisterParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Device>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/devices\", body: params }, options);\n }\n}\n\n/** `inbox` */\nexport class ClientInboxResource extends APIResource {\n /**\n * Get the inbox counts\n *\n * Unseen and unread counts for the badge, cheap enough to poll every 30 seconds or more when the real-time stream is not available. Send the last `ETag` as `If-None-Match` to get `304` while nothing changed.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/inbox/counts\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-inbox-counts\n * @example\n * ```ts\n * const inboxCounts = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.counts();\n * ```\n */\n counts(options?: RequestOptions): APIPromise<T.WithLastResponse<T.InboxCounts>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/inbox/counts\" }, options);\n }\n /**\n * Record a press on an inbox item\n *\n * Call it when the recipient presses the item or one of its buttons (`action_key`). Marks the item seen and read, records `interacted_at` and the key, and sends the `inbox_item.interacted` webhook so your backend can act on it (for example \"Accept invite\"). Repeating the same press changes nothing.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param itemId - Id of the item.\n * @param params - `Notify.MeInboxInteractParams`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, INBOX_ITEM_NOT_FOUND: `INBOX_ITEM_NOT_FOUND`: the recipient has no item with this id (or it was retracted).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, VALIDATION_ERROR: `VALIDATION_ERROR`: the item has no button with this `action_key`.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/inbox/{item_id}/interact\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-inbox-item-id-interact\n * @example\n * ```ts\n * const inboxItem = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.interact(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { action_key: \"accept\" });\n * ```\n */\n interact(itemId: string, params?: T.MeInboxInteractParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.InboxItem>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/inbox/{item_id}/interact\", pathParams: { item_id: itemId }, body: params }, options);\n }\n /**\n * List the inbox\n *\n * The recipient's in-app inbox, newest first, with the unseen and unread counts for the badge. Active items by default; `archived=true` lists the archived ones. Items the sender retracted are left out.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MeInboxListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a query parameter is invalid, or the cursor is not one this route returned.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/inbox\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-inbox\n * @example\n * ```ts\n * for await (const inbox of notify.client({ token: \"rt_example_recipient_token\" }).inbox.list()) {\n * console.log(inbox);\n * }\n * const page = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.MeInboxListParams, options?: RequestOptions): PagePromise<T.InboxItem> {\n return this._client.list({ method: \"GET\", path: \"/v1/client/inbox\", query: params }, options);\n }\n /**\n * Mark inbox items\n *\n * Marks up to 100 items (`ids`), or every item up to and including `before_id` (\"mark all as read\"), as `seen`, `read`, `unread`, `archived` or `unarchived`, and returns the new counts. Marking `read` also marks seen. Open streams get `item.updated` and `counts`. Safe to repeat: items already in that state do not change.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MeInboxMarkParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid, or not exactly one of `ids` and `before_id` was given.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/inbox/mark\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-inbox-mark\n * @example\n * ```ts\n * const markInboxResult = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.mark({ action: \"seen\" });\n * ```\n */\n mark(params: T.MeInboxMarkParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.MarkInboxResult>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/inbox/mark\", body: params }, options);\n }\n}\n\n/** `preferences` */\nexport class ClientPreferencesResource extends APIResource {\n /**\n * Get my preferences\n *\n * The workspace's categories with their per-channel defaults (`mandatory` channels cannot be turned off: show them read-only), the cells the recipient set, and their time zone and quiet hours.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/preferences\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-preferences\n * @example\n * ```ts\n * const clientPreferences = await notify.client({ token: \"rt_example_recipient_token\" }).preferences.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.ClientPreferences>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/preferences\" }, options);\n }\n /**\n * Update my preferences\n *\n * Sets or (with `enabled: null`) removes individual cells, and the time zone, quiet hours and unsubscribe-all. Cells you leave out are kept, so two open tabs cannot overwrite each other. Every change is recorded as consent evidence (source `recipient_token`).\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MePreferenceUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, PREFERENCE_LOCKED, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `PREFERENCE_LOCKED`: the channel is mandatory for the category; `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: no category or type with that key.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/client/preferences\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-client-preferences\n * @example\n * ```ts\n * const clientPreferences = await notify.client({ token: \"rt_example_recipient_token\" }).preferences.update({ preferences: [{ channel: \"inbox\", enabled: true, key: \"billing\", scope: \"all\" }] });\n * ```\n */\n update(params?: T.MePreferenceUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ClientPreferences>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/client/preferences\", body: params }, options);\n }\n}\n\n/** `webpush` */\nexport class ClientWebpushResource extends APIResource {\n /**\n * Get the web push key\n *\n * The VAPID public key the browser subscribes with (`pushManager.subscribe({ applicationServerKey })`).\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, CHANNEL_NOT_CONFIGURED: `CHANNEL_NOT_CONFIGURED`: the workspace has no web push key yet (generate one in the console or with `POST /channels/webpush/vapid-keys`).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/webpush/vapid-public-key\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-webpush-vapid-public-key\n * @example\n * ```ts\n * const vapidPublicKey = await notify.client({ token: \"rt_example_recipient_token\" }).webpush.vapidPublicKey();\n * ```\n */\n vapidPublicKey(options?: RequestOptions): APIPromise<T.WithLastResponse<T.VapidPublicKey>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/webpush/vapid-public-key\" }, options);\n }\n}\n\n/** `notify.client(…)`: Browser- and app-safe calls for one recipient (inbox, devices, preferences), authenticated by the short-lived recipient token your backend mints with `recipientTokens.mint`. Sends only that token, never an API key. */\nexport class NotifyClient extends APIResource {\n #devices?: ClientDevicesResource;\n #inbox?: ClientInboxResource;\n #preferences?: ClientPreferencesResource;\n #webpush?: ClientWebpushResource;\n get devices(): ClientDevicesResource {\n return (this.#devices ??= new ClientDevicesResource(this._client, this._b));\n }\n get inbox(): ClientInboxResource {\n return (this.#inbox ??= new ClientInboxResource(this._client, this._b));\n }\n get preferences(): ClientPreferencesResource {\n return (this.#preferences ??= new ClientPreferencesResource(this._client, this._b));\n }\n get webpush(): ClientWebpushResource {\n return (this.#webpush ??= new ClientWebpushResource(this._client, this._b));\n }\n}\n","// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nimport type { LastResponse } from \"@productcraft/core\";\nimport type { components, paths } from \"./paths.js\";\n\ntype IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : never;\ntype OpenString<T extends string> = string extends T ? T : true extends IsUnion<T> ? T | (string & {}) : T;\ntype OpenValue<T> = [T] extends [string] ? OpenString<T> : T extends readonly (infer I)[] ? (OpenValue<Exclude<I, null | undefined>> | Extract<I, null | undefined>)[] : T extends object ? { [K in keyof T]: OpenValue<Exclude<T[K], null | undefined>> | Extract<T[K], null | undefined> } : T;\n/** A response type: string-literal unions also accept values added after this SDK was built. */\nexport type Open<T> = OpenValue<Exclude<T, null | undefined>> | Extract<T, null | undefined>;\n/** What a method resolves to: the parsed body plus non-enumerable `lastResponse`. */\nexport type WithLastResponse<T> = T & { readonly lastResponse: LastResponse };\n/** Params inside a scope bound with `.as(actorId)`: `actor_id` may be left out. */\nexport type WithOptionalActor<P> = P extends { actor_id: unknown } ? Omit<P, \"actor_id\"> & { actor_id?: P[\"actor_id\"] } : P;\n/** A polled model whose free-form `K` the caller types as `R` (`createAndPoll<R>`); optional and nullable stay as declared. */\nexport type WithResult<M, K extends keyof M, R> = Omit<M, K> & { [P in keyof M as P extends K ? P : never]: R | Extract<M[P], null> };\n\nexport type ApnsCredentialEnvironment = components[\"schemas\"][\"ApnsCredentialEnvironment\"];\nexport const ApnsCredentialEnvironment = { values: [\"sandbox\", \"production\", \"both\"] as const };\n\nexport type ApnsEnvironment = components[\"schemas\"][\"ApnsEnvironment\"];\nexport const ApnsEnvironment = { values: [\"sandbox\", \"production\"] as const };\n\nexport type BulkRowStatus = components[\"schemas\"][\"BulkRowStatus\"];\nexport const BulkRowStatus = { values: [\"created\", \"updated\", \"error\"] as const };\n\nexport type CategoryDefault = components[\"schemas\"][\"CategoryDefault\"];\nexport const CategoryDefault = { values: [\"on\", \"off\", \"mandatory\"] as const };\n\nexport type ChannelReadiness = components[\"schemas\"][\"ChannelReadiness\"];\nexport const ChannelReadiness = { values: [\"ready\", \"not_configured\", \"disabled\", \"paused\"] as const };\n\nexport type ClientInboxStatusFilter = components[\"schemas\"][\"ClientInboxStatusFilter\"];\nexport const ClientInboxStatusFilter = { values: [\"all\", \"unread\", \"unseen\"] as const };\n\nexport type CredentialEnvironment = components[\"schemas\"][\"CredentialEnvironment\"];\nexport const CredentialEnvironment = { values: [\"sandbox\", \"production\", \"both\"] as const };\n\nexport type CredentialOrigin = components[\"schemas\"][\"CredentialOrigin\"];\nexport const CredentialOrigin = { values: [\"generated\", \"imported\", \"uploaded\"] as const };\n\nexport type CredentialProvider = components[\"schemas\"][\"CredentialProvider\"];\nexport const CredentialProvider = { values: [\"apns\", \"fcm\", \"vapid\"] as const };\n\nexport type CredentialStatus = components[\"schemas\"][\"CredentialStatus\"];\nexport const CredentialStatus = { values: [\"active\", \"invalid\", \"superseded\"] as const };\n\nexport type DeliveryState = components[\"schemas\"][\"DeliveryState\"];\nexport const DeliveryState = { values: [\"pending\", \"scheduled\", \"sending\", \"retry\", \"sent\", \"delivered\", \"failed\", \"bounced\", \"skipped\", \"pruned\"] as const };\n\nexport type DeviceChannel = components[\"schemas\"][\"DeviceChannel\"];\nexport const DeviceChannel = { values: [\"apns\", \"fcm\", \"webpush\"] as const };\n\nexport type DeviceMoveDirection = components[\"schemas\"][\"DeviceMoveDirection\"];\nexport const DeviceMoveDirection = { values: [\"moved_in\", \"moved_out\"] as const };\n\nexport type DevicePlatform = components[\"schemas\"][\"DevicePlatform\"];\nexport const DevicePlatform = { values: [\"ios\", \"ipados\", \"macos\", \"watchos\", \"tvos\", \"visionos\", \"android\", \"web\"] as const };\n\nexport type DeviceState = components[\"schemas\"][\"DeviceState\"];\nexport const DeviceState = { values: [\"active\", \"invalid\", \"pruned\"] as const };\n\nexport type InboxItemStatusFilter = components[\"schemas\"][\"InboxItemStatusFilter\"];\nexport const InboxItemStatusFilter = { values: [\"active\", \"archived\", \"all\"] as const };\n\nexport type InboxMarkAction = components[\"schemas\"][\"InboxMarkAction\"];\nexport const InboxMarkAction = { values: [\"seen\", \"read\", \"unread\", \"archived\", \"unarchived\"] as const };\n\nexport type NotificationStatus = components[\"schemas\"][\"NotificationStatus\"];\nexport const NotificationStatus = { values: [\"scheduled\", \"accepted\", \"planned\", \"cancelled\"] as const };\n\nexport type NotifyChannel = components[\"schemas\"][\"NotifyChannel\"];\nexport const NotifyChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\"] as const };\n\n/**\n * Why a delivery was skipped, held, retried or failed. Open enum: new reasons may be added.\n *\n * - `suppressed_preference`: The recipient turned this channel off for this type or its category. Fix: Nothing to fix: the recipient chose this. Mark the category channel `mandatory` only for messages they must receive.\n * - `default_off`: This channel is off by default for the category, and the recipient has not turned it on. Fix: Nothing to fix if the channel is opt-in by design: it is sent once the recipient turns it on in their preferences. Set the category default to `on` to send it without an opt-in.\n * - `unsubscribed_all`: The recipient unsubscribed from all non-critical notifications. Fix: Only types marked `critical` still reach them; otherwise the recipient has to opt back in.\n * - `held_quiet_hours`: Held until the recipient's quiet hours end. Fix: It is sent when the window ends. Mark the type `critical` if it must not wait.\n * - `scheduled_send`: Waiting for the send time given in `send_at` or `delay_seconds`. Fix: It is sent at that time. Cancel it with the notification id or its `cancellation_key`.\n * - `no_device`: The recipient has no active device for this channel. Fix: Register the device token from your app (`POST …/devices`) after the user grants permission.\n * - `no_address`: The recipient has no email address. Fix: Set `email` on the recipient, or pass it inline in the send.\n * - `email_invalid`: An earlier email to this address hard-bounced. Fix: Update the recipient's email address; a new address clears the bounce.\n * - `email_complained`: The recipient marked an earlier email as spam. Fix: Email stays off for this recipient; reach them through another channel.\n * - `email_paused`: Email is paused for this workspace (high bounce or complaint rate). Fix: Check your sending in the console and resume email in Notify settings.\n * - `email_budget`: The workspace email budget is spent for now; the email waits for the next window. Fix: It is sent automatically when the budget allows. Ask us to raise the budget if this is routine.\n * - `email_backlog_full`: The workspace already holds 10,000 emails waiting for budget, so this one was not queued. Fix: Send fewer emails or spread them out; ask us to raise the budget if this volume is routine.\n * - `channel_not_configured`: The channel is not set up in this workspace. Fix: Upload APNs or FCM credentials, generate web push keys, or enable Mail with a verified sender.\n * - `channel_restricted`: The send's `channels` list left this channel out. Fix: Add the channel to `channels`, or omit `channels` to use every channel of the type.\n * - `type_archived`: The notification type is archived. Fix: Unarchive the type or send a different one.\n * - `credential_invalid`: No valid credential matches this device's app or environment. Fix: Upload the APNs key or FCM service account for this bundle id or project, in the right environment.\n * - `template_missing`: The type has no template for this channel. Fix: Add a template for the channel (any locale) to the notification type.\n * - `rate_limited`: The recipient already received the per-minute maximum of notifications. Fix: Send fewer notifications to one person, or batch them; critical types have their own budget.\n * - `throttled`: The type's own throttle for this recipient was reached. Fix: Raise or remove `throttle` on the notification type if every message must go out.\n * - `read_in_inbox`: The recipient read the inbox item first, so the follow-up was not needed. Fix: Nothing to fix: this is how `after_unread_seconds` works.\n * - `awaiting_unread`: A follow-up step waiting to see whether the recipient reads the inbox item first. Fix: Nothing to fix: it is sent when the `after_unread_seconds` timer ends and the item is still unread, and skipped as `read_in_inbox` otherwise.\n * - `actor_excluded`: The recipient is the actor who caused the notification. Fix: Pass `exclude_actor: false` to notify the actor too.\n * - `recipient_not_found`: No recipient with this external id exists in the workspace. Fix: Create the recipient first (`PUT /recipients/{external_id}`), pass it inline with an email, or send `create_missing: true`.\n * - `recipient_erased`: The recipient was erased in the last 24 hours and cannot be recreated by a send yet. Fix: Wait 24 hours after the erasure, then create the recipient again.\n * - `mail_suppressed`: ProductCraft Mail suppressed the address (earlier bounces or complaints). Fix: Check the suppression list in Mail; remove the address only if you know it is valid.\n * - `mail_refused`: ProductCraft Mail refused the message (the code after the colon says why). Fix: Look up the Mail error code; usually the template name or sender needs fixing.\n * - `pruned`: The push provider said the device token is no longer valid; the device was removed. Fix: Nothing to fix: the app registers a fresh token the next time it opens.\n * - `payload_too_large`: The rendered push payload is over the provider's size limit. Fix: Shorten the template or move data out of the push payload.\n * - `credential_error`: The push provider rejected the workspace credential. Fix: Upload a fresh APNs key or FCM service account; the channel resumes as soon as it validates.\n * - `circuit_open`: The provider is failing for this credential, so sends are paused briefly and retried. Fix: Nothing to fix: it retries on its own. Check the provider's status page if it lasts.\n * - `expired`: The notification's time to live passed before it could be delivered. Fix: Raise `ttl_seconds` on the type if late delivery is still useful.\n * - `cancelled`: The notification was cancelled, or the recipient was erased, before delivery. Fix: Nothing to fix.\n * - `provider_error`: The provider kept failing until retries ran out. Fix: Check the attempts for the provider status and code.\n */\nexport type NotifyDeliveryReason = components[\"schemas\"][\"NotifyDeliveryReason\"];\nexport const NotifyDeliveryReason = { values: [\"suppressed_preference\", \"default_off\", \"unsubscribed_all\", \"held_quiet_hours\", \"scheduled_send\", \"no_device\", \"no_address\", \"email_invalid\", \"email_complained\", \"email_paused\", \"email_budget\", \"email_backlog_full\", \"channel_not_configured\", \"channel_restricted\", \"type_archived\", \"credential_invalid\", \"template_missing\", \"rate_limited\", \"throttled\", \"read_in_inbox\", \"awaiting_unread\", \"actor_excluded\", \"recipient_not_found\", \"recipient_erased\", \"mail_suppressed\", \"mail_refused\", \"pruned\", \"payload_too_large\", \"credential_error\", \"circuit_open\", \"expired\", \"cancelled\", \"provider_error\"] as const };\n\nexport type NotifyEmailPauseReason = components[\"schemas\"][\"NotifyEmailPauseReason\"];\nexport const NotifyEmailPauseReason = { values: [\"complaints\", \"bounces\"] as const };\n\nexport type NotifyQuietHoursSource = components[\"schemas\"][\"NotifyQuietHoursSource\"];\nexport const NotifyQuietHoursSource = { values: [\"recipient\", \"workspace\"] as const };\n\nexport type NotifyRecipientDeletionCause = components[\"schemas\"][\"NotifyRecipientDeletionCause\"];\nexport const NotifyRecipientDeletionCause = { values: [\"api\", \"auth_user_deleted\"] as const };\n\nexport type NotifyStatsChannel = components[\"schemas\"][\"NotifyStatsChannel\"];\nexport const NotifyStatsChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\"] as const };\n\nexport type NotifyWebhookChannel = components[\"schemas\"][\"NotifyWebhookChannel\"];\nexport const NotifyWebhookChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\"] as const };\n\nexport type NotifyWebhookCredentialProvider = components[\"schemas\"][\"NotifyWebhookCredentialProvider\"];\nexport const NotifyWebhookCredentialProvider = { values: [\"apns\", \"fcm\", \"vapid\"] as const };\n\nexport type NotifyWebhookDeliveryState = components[\"schemas\"][\"NotifyWebhookDeliveryState\"];\nexport const NotifyWebhookDeliveryState = { values: [\"sent\", \"delivered\", \"failed\", \"bounced\", \"skipped\", \"pruned\"] as const };\n\nexport type NotifyWebhookDeviceChannel = components[\"schemas\"][\"NotifyWebhookDeviceChannel\"];\nexport const NotifyWebhookDeviceChannel = { values: [\"apns\", \"fcm\", \"webpush\"] as const };\n\nexport type PlanDecision = components[\"schemas\"][\"PlanDecision\"];\nexport const PlanDecision = { values: [\"deliver\", \"schedule\", \"skip\"] as const };\n\nexport type PreferenceChannel = components[\"schemas\"][\"PreferenceChannel\"];\nexport const PreferenceChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\", \"*\"] as const };\n\nexport type PreferenceScope = components[\"schemas\"][\"PreferenceScope\"];\nexport const PreferenceScope = { values: [\"all\", \"category\", \"type\"] as const };\n\nexport type RecipientErasureStatus = components[\"schemas\"][\"RecipientErasureStatus\"];\nexport const RecipientErasureStatus = { values: [\"erased\"] as const };\n\nexport type RecipientInclude = components[\"schemas\"][\"RecipientInclude\"];\nexport const RecipientInclude = { values: [\"preferences\"] as const };\n\nexport type RecipientTokenScope = components[\"schemas\"][\"RecipientTokenScope\"];\nexport const RecipientTokenScope = { values: [\"inbox:read\", \"inbox:write\", \"devices:write\", \"preferences:read\", \"preferences:write\", \"stream\"] as const };\n\nexport type SendStatus = components[\"schemas\"][\"SendStatus\"];\nexport const SendStatus = { values: [\"accepted\", \"scheduled\"] as const };\n\nexport type SetupRowState = components[\"schemas\"][\"SetupRowState\"];\nexport const SetupRowState = { values: [\"pass\", \"attention\", \"not_set\", \"blocked\"] as const };\n\nexport type WebhookAttemptTrigger = components[\"schemas\"][\"WebhookAttemptTrigger\"];\nexport const WebhookAttemptTrigger = { values: [\"automatic\", \"replay\", \"test\"] as const };\n\nexport type WebhookEndpointDisabledReason = components[\"schemas\"][\"WebhookEndpointDisabledReason\"];\nexport const WebhookEndpointDisabledReason = { values: [\"manual\", \"failing\"] as const };\n\nexport type WebhookEndpointStatus = components[\"schemas\"][\"WebhookEndpointStatus\"];\nexport const WebhookEndpointStatus = { values: [\"enabled\", \"disabled\", \"auto_disabled\"] as const };\n\nexport type WebhookEventStatus = components[\"schemas\"][\"WebhookEventStatus\"];\nexport const WebhookEventStatus = { values: [\"pending\", \"delivered\", \"failed\", \"not_sent\"] as const };\n\n/**\n * Every event type this product sends; `x-webhooks` maps each to its payload schema. New types can be added, so treat it as open.\n */\nexport type WebhookEventType = components[\"schemas\"][\"WebhookEventType\"];\nexport const WebhookEventType = { values: [\"notification.accepted\", \"delivery.sent\", \"delivery.delivered\", \"delivery.failed\", \"delivery.bounced\", \"delivery.skipped\", \"inbox_item.read\", \"inbox_item.archived\", \"inbox_item.interacted\", \"device.pruned\", \"device.moved\", \"credential.invalid\", \"email.auto_paused\", \"recipient.deleted\"] as const };\n\nexport interface ApnsCredential extends Open<components[\"schemas\"][\"ApnsCredentialDto\"]> {}\nexport interface BulkRowError extends Open<components[\"schemas\"][\"BulkRowErrorDto\"]> {}\nexport interface BulkRowResult extends Open<components[\"schemas\"][\"BulkRowResultDto\"]> {}\nexport interface BulkUpsertRecipients extends Open<components[\"schemas\"][\"BulkUpsertRecipientsResponseDto\"]> {}\nexport interface CancelByKey extends Open<components[\"schemas\"][\"CancelByKeyResponseDto\"]> {}\nexport interface CategoryDefaultsView extends Open<components[\"schemas\"][\"CategoryDefaultsViewDto\"]> {}\nexport interface Category extends Open<components[\"schemas\"][\"CategoryDto\"]> {}\nexport interface CategoryList extends Open<components[\"schemas\"][\"CategoryListResponseDto\"]> {}\nexport interface ChannelCounts extends Open<components[\"schemas\"][\"ChannelCountsDto\"]> {}\nexport interface ChannelCredential extends Open<components[\"schemas\"][\"ChannelCredentialDto\"]> {}\nexport interface ChannelList extends Open<components[\"schemas\"][\"ChannelListResponseDto\"]> {}\nexport interface ChannelStatus extends Open<components[\"schemas\"][\"ChannelStatusDto\"]> {}\nexport interface ClientCategory extends Open<components[\"schemas\"][\"ClientCategoryDto\"]> {}\nexport interface ClientInboxList extends Open<components[\"schemas\"][\"ClientInboxListDto\"]> {}\nexport interface ClientPreferences extends Open<components[\"schemas\"][\"ClientPreferencesDto\"]> {}\nexport interface DeliveryAttempt extends Open<components[\"schemas\"][\"DeliveryAttemptDto\"]> {}\nexport interface DeliveryDetail extends Open<components[\"schemas\"][\"DeliveryDetailDto\"]> {}\nexport interface Delivery extends Open<components[\"schemas\"][\"DeliveryDto\"]> {}\nexport interface DeliveryList extends Open<components[\"schemas\"][\"DeliveryListResponseDto\"]> {}\nexport interface Device extends Open<components[\"schemas\"][\"DeviceDto\"]> {}\nexport interface DeviceList extends Open<components[\"schemas\"][\"DeviceListResponseDto\"]> {}\nexport interface DeviceMove extends Open<components[\"schemas\"][\"DeviceMoveDto\"]> {}\nexport interface DryRun extends Open<components[\"schemas\"][\"DryRunResponseDto\"]> {}\nexport interface EffectiveQuietHours extends Open<components[\"schemas\"][\"EffectiveQuietHoursDto\"]> {}\nexport interface Export extends Open<components[\"schemas\"][\"ExportDto\"]> {}\nexport interface ExportNotificationType extends Open<components[\"schemas\"][\"ExportNotificationTypeDto\"]> {}\nexport interface ExportSettings extends Open<components[\"schemas\"][\"ExportSettingsDto\"]> {}\nexport interface FallbackStepView extends Open<components[\"schemas\"][\"FallbackStepViewDto\"]> {}\nexport interface FcmCredential extends Open<components[\"schemas\"][\"FcmCredentialDto\"]> {}\nexport interface InboxAction extends Open<components[\"schemas\"][\"InboxActionDto\"]> {}\nexport interface InboxCounts extends Open<components[\"schemas\"][\"InboxCountsDto\"]> {}\nexport interface InboxItem extends Open<components[\"schemas\"][\"InboxItemDto\"]> {}\nexport interface InboxList extends Open<components[\"schemas\"][\"InboxListResponseDto\"]> {}\nexport interface ListPagination extends Open<components[\"schemas\"][\"ListPaginationDto\"]> {}\nexport interface WebhookEndpointList extends Open<components[\"schemas\"][\"ListWebhookEndpointsResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEndpointList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEndpoints = WebhookEndpointList;\nexport interface WebhookEventTypeList extends Open<components[\"schemas\"][\"ListWebhookEventTypesResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventTypeList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEventTypes = WebhookEventTypeList;\nexport interface WebhookEventList extends Open<components[\"schemas\"][\"ListWebhookEventsResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEvents = WebhookEventList;\nexport interface MarkInboxResult extends Open<components[\"schemas\"][\"MarkInboxResultDto\"]> {}\nexport interface NotificationActor extends Open<components[\"schemas\"][\"NotificationActorDto\"]> {}\nexport interface Notification extends Open<components[\"schemas\"][\"NotificationDto\"]> {}\nexport interface NotificationList extends Open<components[\"schemas\"][\"NotificationListResponseDto\"]> {}\nexport interface NotificationType extends Open<components[\"schemas\"][\"NotificationTypeDto\"]> {}\nexport interface NotificationTypeList extends Open<components[\"schemas\"][\"NotificationTypeListResponseDto\"]> {}\nexport interface NotifyCredentialInvalidData extends Open<components[\"schemas\"][\"NotifyCredentialInvalidDataDto\"]> {}\nexport interface NotifyDeliveryEventData extends Open<components[\"schemas\"][\"NotifyDeliveryEventDataDto\"]> {}\nexport interface NotifyDeviceEventData extends Open<components[\"schemas\"][\"NotifyDeviceEventDataDto\"]> {}\nexport interface NotifyEmailAutoPausedData extends Open<components[\"schemas\"][\"NotifyEmailAutoPausedDataDto\"]> {}\nexport interface NotifyInboxItemEventData extends Open<components[\"schemas\"][\"NotifyInboxItemEventDataDto\"]> {}\nexport interface NotifyNotificationAcceptedData extends Open<components[\"schemas\"][\"NotifyNotificationAcceptedDataDto\"]> {}\nexport interface NotifyRecipientDeletedData extends Open<components[\"schemas\"][\"NotifyRecipientDeletedDataDto\"]> {}\nexport interface NotifySettings extends Open<components[\"schemas\"][\"NotifySettingsDto\"]> {}\nexport interface NotifyStatsCounts extends Open<components[\"schemas\"][\"NotifyStatsCountsDto\"]> {}\nexport interface NotifyStatsDay extends Open<components[\"schemas\"][\"NotifyStatsDayDto\"]> {}\nexport interface NotifyStats extends Open<components[\"schemas\"][\"NotifyStatsResponseDto\"]> {}\nexport interface NotifyWebhookRecipient extends Open<components[\"schemas\"][\"NotifyWebhookRecipientDto\"]> {}\nexport interface Pagination extends Open<components[\"schemas\"][\"PaginationDto\"]> {}\nexport interface PlanRow extends Open<components[\"schemas\"][\"PlanRowDto\"]> {}\nexport interface PreferenceCell extends Open<components[\"schemas\"][\"PreferenceCellDto\"]> {}\nexport interface PreferenceSet extends Open<components[\"schemas\"][\"PreferenceSetDto\"]> {}\nexport interface PreviewChannel extends Open<components[\"schemas\"][\"PreviewChannelDto\"]> {}\nexport interface Preview extends Open<components[\"schemas\"][\"PreviewResponseDto\"]> {}\nexport interface QuietHours extends Open<components[\"schemas\"][\"QuietHoursDto\"]> {}\nexport interface Recipient extends Open<components[\"schemas\"][\"RecipientDto\"]> {}\nexport interface RecipientErasure extends Open<components[\"schemas\"][\"RecipientErasureDto\"]> {}\nexport interface RecipientListPagination extends Open<components[\"schemas\"][\"RecipientListPaginationDto\"]> {}\nexport interface RecipientList extends Open<components[\"schemas\"][\"RecipientListResponseDto\"]> {}\nexport interface RecipientToken extends Open<components[\"schemas\"][\"RecipientTokenDto\"]> {}\nexport interface RenderedPush extends Open<components[\"schemas\"][\"RenderedPushDto\"]> {}\nexport interface WebhookEventReplay extends Open<components[\"schemas\"][\"ReplayWebhookEventResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventReplay`. Kept for 1.x callers; removed in the next major. */\nexport type ReplayWebhookEvent = WebhookEventReplay;\nexport interface Retract extends Open<components[\"schemas\"][\"RetractResponseDto\"]> {}\nexport interface RoutingView extends Open<components[\"schemas\"][\"RoutingViewDto\"]> {}\nexport interface SendNotification extends Open<components[\"schemas\"][\"SendNotificationResponseDto\"]> {}\nexport interface SetupRow extends Open<components[\"schemas\"][\"SetupRowDto\"]> {}\nexport interface SetupRowFix extends Open<components[\"schemas\"][\"SetupRowFixDto\"]> {}\nexport interface SetupRowTest extends Open<components[\"schemas\"][\"SetupRowTestDto\"]> {}\nexport interface SetupStatus extends Open<components[\"schemas\"][\"SetupStatusDto\"]> {}\nexport interface SkippedRecipient extends Open<components[\"schemas\"][\"SkippedRecipientDto\"]> {}\nexport interface Template extends Open<components[\"schemas\"][\"TemplateDto\"]> {}\nexport interface TemplateSummary extends Open<components[\"schemas\"][\"TemplateSummaryDto\"]> {}\nexport interface TemplateVersion extends Open<components[\"schemas\"][\"TemplateVersionDto\"]> {}\nexport interface TemplateVersionList extends Open<components[\"schemas\"][\"TemplateVersionListDto\"]> {}\nexport interface ThrottleView extends Open<components[\"schemas\"][\"ThrottleViewDto\"]> {}\nexport interface TimelineDevice extends Open<components[\"schemas\"][\"TimelineDeviceDto\"]> {}\nexport interface TimelineEntry extends Open<components[\"schemas\"][\"TimelineEntryDto\"]> {}\nexport interface Timeline extends Open<components[\"schemas\"][\"TimelineResponseDto\"]> {}\nexport interface VapidKey extends Open<components[\"schemas\"][\"VapidKeyDto\"]> {}\nexport interface VapidPublicKey extends Open<components[\"schemas\"][\"VapidPublicKeyDto\"]> {}\nexport interface WebPushChannel extends Open<components[\"schemas\"][\"WebPushChannelDto\"]> {}\nexport interface WebhookDeliveryAttempt extends Open<components[\"schemas\"][\"WebhookDeliveryAttemptDto\"]> {}\nexport interface WebhookEndpoint extends Open<components[\"schemas\"][\"WebhookEndpointDto\"]> {}\nexport interface WebhookEndpointWithSecret extends Open<components[\"schemas\"][\"WebhookEndpointWithSecretDto\"]> {}\nexport interface WebhookEventDelivery extends Open<components[\"schemas\"][\"WebhookEventDeliveryDto\"]> {}\nexport interface WebhookEventDetail extends Open<components[\"schemas\"][\"WebhookEventDetailDto\"]> {}\nexport interface WebhookEvent extends Open<components[\"schemas\"][\"WebhookEventDto\"]> {}\nexport interface WebhookEventTypeInfo extends Open<components[\"schemas\"][\"WebhookEventTypeDto\"]> {}\nexport interface WebhookPagination extends Open<components[\"schemas\"][\"WebhookPaginationDto\"]> {}\n\n/** Params for `me.devices.register` (POST /v1/client/devices). */\nexport type MeDeviceRegisterParams = NonNullable<paths[\"/v1/client/devices\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.inbox.list` (GET /v1/client/inbox). */\nexport type MeInboxListParams = NonNullable<paths[\"/v1/client/inbox\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `me.inbox.mark` (POST /v1/client/inbox/mark). */\nexport type MeInboxMarkParams = NonNullable<paths[\"/v1/client/inbox/mark\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.inbox.interact` (POST /v1/client/inbox/{item_id}/interact). */\nexport type MeInboxInteractParams = NonNullable<paths[\"/v1/client/inbox/{item_id}/interact\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.preferences.update` (PATCH /v1/client/preferences). */\nexport type MePreferenceUpdateParams = NonNullable<paths[\"/v1/client/preferences\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `categories.list` (GET /v1/workspaces/{workspace_id}/categories). */\nexport type CategoryListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/categories\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `categories.create` (POST /v1/workspaces/{workspace_id}/categories). */\nexport type CategoryCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/categories\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `categories.update` (PATCH /v1/workspaces/{workspace_id}/categories/{category_id}). */\nexport type CategoryUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/categories/{category_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.apns.uploadCredential` (PUT /v1/workspaces/{workspace_id}/channels/apns/credentials). */\nexport type ChannelApnUploadCredentialParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/apns/credentials\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.fcm.uploadCredential` (PUT /v1/workspaces/{workspace_id}/channels/fcm/credentials). */\nexport type ChannelFcmUploadCredentialParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/fcm/credentials\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.webpush.generateVapidKeys` (POST /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys). */\nexport type ChannelWebpushGenerateVapidKeysParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.webpush.importVapidKeys` (PUT /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys). */\nexport type ChannelWebpushImportVapidKeysParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `deliveries.list` (GET /v1/workspaces/{workspace_id}/deliveries). */\nexport type DeliveryListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/deliveries\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `notificationTypes.list` (GET /v1/workspaces/{workspace_id}/notification-types). */\nexport type NotificationTypeListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `notificationTypes.create` (POST /v1/workspaces/{workspace_id}/notification-types). */\nexport type NotificationTypeCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.replaceByKey` (PUT /v1/workspaces/{workspace_id}/notification-types/by-key/{key}). */\nexport type NotificationTypeReplaceByKeyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/by-key/{key}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.update` (PATCH /v1/workspaces/{workspace_id}/notification-types/{type_id}). */\nexport type NotificationTypeUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.preview` (POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/preview). */\nexport type NotificationTypePreviewParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}/preview\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.templates.update` (PUT /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}). */\nexport type NotificationTypeTemplateUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.templates.revert` (POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert). */\nexport type NotificationTypeTemplateRevertParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notifications.list` (GET /v1/workspaces/{workspace_id}/notifications). */\nexport type NotificationListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notifications\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `notifications.send` (POST /v1/workspaces/{workspace_id}/notifications). */\nexport type NotificationSendParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notifications\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Response of `notifications.send`: one of 2 success shapes (HTTP 200, 202). */\nexport type NotificationSendResponse = DryRun | SendNotification;\n/** Params for `notifications.cancelByKey` (POST /v1/workspaces/{workspace_id}/notifications/cancel). */\nexport type NotificationCancelByKeyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notifications/cancel\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipientTokens.mint` (POST /v1/workspaces/{workspace_id}/recipient-tokens). */\nexport type RecipientTokenMintParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipient-tokens\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.list` (GET /v1/workspaces/{workspace_id}/recipients). */\nexport type RecipientListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `recipients.bulkIdentify` (POST /v1/workspaces/{workspace_id}/recipients/bulk). */\nexport type RecipientBulkIdentifyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/bulk\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.identify` (PUT /v1/workspaces/{workspace_id}/recipients/{external_id}). */\nexport type RecipientIdentifyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.update` (PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}). */\nexport type RecipientUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.devices.create` (POST /v1/workspaces/{workspace_id}/recipients/{external_id}/devices). */\nexport type RecipientDeviceCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.inbox.list` (GET /v1/workspaces/{workspace_id}/recipients/{external_id}/inbox). */\nexport type RecipientInboxListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/inbox\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `recipients.preferences.replace` (PUT /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences). */\nexport type RecipientPreferenceReplaceParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.preferences.update` (PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences). */\nexport type RecipientPreferenceUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.timeline` (GET /v1/workspaces/{workspace_id}/recipients/{external_id}/timeline). */\nexport type RecipientTimelineParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/timeline\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `settings.update` (PATCH /v1/workspaces/{workspace_id}/settings). */\nexport type SettingsUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/settings\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `stats.retrieve` (GET /v1/workspaces/{workspace_id}/stats). */\nexport type StatsRetrieveParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/stats\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `webhooks.endpoints.create` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints). */\nexport type WebhookEndpointCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.update` (PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}). */\nexport type WebhookEndpointUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.rotateSecret` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret). */\nexport type WebhookEndpointRotateSecretParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.test` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test). */\nexport type WebhookEndpointTestParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.events.list` (GET /v1/workspaces/{workspace_id}/webhooks/events). */\nexport type WebhookEventListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/events\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `webhooks.events.replay` (POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay). */\nexport type WebhookEventReplayParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\"][\"post\"][\"parameters\"][\"query\"]>;\n","// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nimport { APIClient, ConfigurationError, createOpenAPIClient, PC_BASE_URL, type ClientOptions, type ClientOptions as CoreClientOptions, type PollOptions as CorePollOptions, type RequestOptions as CoreRequestOptions } from \"@productcraft/core\";\nimport type { APIPromise as CoreAPIPromise, LastResponse as CoreLastResponse, Page as CorePage, PagePromise as CorePagePromise, RateLimitInfo as CoreRateLimitInfo, WithResponse as CoreWithResponse } from \"@productcraft/core\";\nimport type { Client } from \"openapi-fetch\";\nimport type * as E from \"./errors.js\";\nimport type { paths } from \"./paths.js\";\nimport { NotifyClient, NotifyResources } from \"./resources.js\";\nimport * as T from \"./types.js\";\nimport type * as W from \"./webhooks.js\";\n\ndeclare const __PC_SDK_VERSION__: string | undefined;\nconst VERSION = typeof __PC_SDK_VERSION__ === \"string\" ? __PC_SDK_VERSION__ : \"0.0.0-dev\";\n\n/**\n * ProductCraft Notify API client (recipients, preferences, notification types, sends, deliveries, inbox, channels and webhooks). Every method is generated from the API's OpenAPI document.\n *\n * @example\n * ```ts\n * import { Notify } from \"@productcraft/notify\";\n * const notify = new Notify({ apiKey: process.env.PRODUCTCRAFT_API_KEY });\n * ```\n */\n\nexport class Notify extends NotifyResources {\n /** The options this client was built with, for the token scopes' own clients. Never enumerable. */\n readonly #options: ClientOptions;\n constructor(options: ClientOptions = {}) {\n super(new APIClient(options, PC_BASE_URL.notify, { name: \"notify\", version: VERSION }));\n this.#options = options;\n }\n #openapi?: Client<paths> & ((scope: { token: string }) => NotifyClient);\n /**\n * Browser- and app-safe calls for one recipient (inbox, devices, preferences), authenticated by the short-lived recipient token your backend mints with `recipientTokens.mint`. Sends only that token, never an API key.\n *\n * Call it: `notify.client({ token })` returns the scope. Read it: `notify.client.GET(…)` is the typed\n * `openapi-fetch` escape hatch over this client's credential and base URL (it does not retry).\n *\n * @example\n * ```ts\n * const inbox = await notify.client({ token }).inbox.list();\n * ```\n */\n get client(): Client<paths> & ((scope: { token: string }) => NotifyClient) {\n return (this.#openapi ??= Object.assign((scope: { token: string }) => this.#tokenScope(scope), createOpenAPIClient<paths>(this._client)));\n }\n #tokenScope(scope: { token: string }): NotifyClient {\n const token = scope?.token;\n if (typeof token !== \"string\" || token.trim() === \"\") throw new ConfigurationError(\"client({ token }) needs a non-empty token.\");\n if (token.startsWith(\"pcft_\")) {\n throw new ConfigurationError(\"client({ token }) was given a workspace API key. Pass the short-lived token your backend minted; never ship an API key to a browser or an app.\");\n }\n // Only the token: no API key, no environment fallback, no workspace (the token names it).\n const { apiKey: _apiKey, auth: _auth, workspaceId: _workspaceId, credentialFromEnv: _env, dangerouslyAllowBrowser: _browser, ...rest } = this.#options;\n return new NotifyClient(new APIClient({ ...rest, auth: { type: \"bearer\", token }, credentialFromEnv: false }, PC_BASE_URL.notify, { name: \"notify\", version: VERSION }));\n }\n}\n\ntype __RequestOptions = CoreRequestOptions;\ntype __PollOptions = CorePollOptions;\ntype __ClientOptions = CoreClientOptions;\ntype __Page<T> = CorePage<T>;\ntype __PagePromise<T> = CorePagePromise<T>;\ntype __APIPromise<T> = CoreAPIPromise<T>;\ntype __WithResponse<T> = CoreWithResponse<T>;\ntype __RateLimitInfo = CoreRateLimitInfo;\ntype __LastResponse = CoreLastResponse;\ntype __ApnsCredentialEnvironment = T.ApnsCredentialEnvironment;\ntype __ApnsEnvironment = T.ApnsEnvironment;\ntype __BulkRowStatus = T.BulkRowStatus;\ntype __CategoryDefault = T.CategoryDefault;\ntype __ChannelReadiness = T.ChannelReadiness;\ntype __ClientInboxStatusFilter = T.ClientInboxStatusFilter;\ntype __CredentialEnvironment = T.CredentialEnvironment;\ntype __CredentialOrigin = T.CredentialOrigin;\ntype __CredentialProvider = T.CredentialProvider;\ntype __CredentialStatus = T.CredentialStatus;\ntype __DeliveryState = T.DeliveryState;\ntype __DeviceChannel = T.DeviceChannel;\ntype __DeviceMoveDirection = T.DeviceMoveDirection;\ntype __DevicePlatform = T.DevicePlatform;\ntype __DeviceState = T.DeviceState;\ntype __InboxItemStatusFilter = T.InboxItemStatusFilter;\ntype __InboxMarkAction = T.InboxMarkAction;\ntype __NotificationStatus = T.NotificationStatus;\ntype __NotifyChannel = T.NotifyChannel;\ntype __NotifyDeliveryReason = T.NotifyDeliveryReason;\ntype __NotifyEmailPauseReason = T.NotifyEmailPauseReason;\ntype __NotifyQuietHoursSource = T.NotifyQuietHoursSource;\ntype __NotifyRecipientDeletionCause = T.NotifyRecipientDeletionCause;\ntype __NotifyStatsChannel = T.NotifyStatsChannel;\ntype __NotifyWebhookChannel = T.NotifyWebhookChannel;\ntype __NotifyWebhookCredentialProvider = T.NotifyWebhookCredentialProvider;\ntype __NotifyWebhookDeliveryState = T.NotifyWebhookDeliveryState;\ntype __NotifyWebhookDeviceChannel = T.NotifyWebhookDeviceChannel;\ntype __PlanDecision = T.PlanDecision;\ntype __PreferenceChannel = T.PreferenceChannel;\ntype __PreferenceScope = T.PreferenceScope;\ntype __RecipientErasureStatus = T.RecipientErasureStatus;\ntype __RecipientInclude = T.RecipientInclude;\ntype __RecipientTokenScope = T.RecipientTokenScope;\ntype __SendStatus = T.SendStatus;\ntype __SetupRowState = T.SetupRowState;\ntype __WebhookAttemptTrigger = T.WebhookAttemptTrigger;\ntype __WebhookEndpointDisabledReason = T.WebhookEndpointDisabledReason;\ntype __WebhookEndpointStatus = T.WebhookEndpointStatus;\ntype __WebhookEventStatus = T.WebhookEventStatus;\ntype __WebhookEventType = T.WebhookEventType;\ntype __ApnsCredential = T.ApnsCredential;\ntype __BulkRowError = T.BulkRowError;\ntype __BulkRowResult = T.BulkRowResult;\ntype __BulkUpsertRecipients = T.BulkUpsertRecipients;\ntype __CancelByKey = T.CancelByKey;\ntype __CategoryDefaultsView = T.CategoryDefaultsView;\ntype __Category = T.Category;\ntype __CategoryList = T.CategoryList;\ntype __ChannelCounts = T.ChannelCounts;\ntype __ChannelCredential = T.ChannelCredential;\ntype __ChannelList = T.ChannelList;\ntype __ChannelStatus = T.ChannelStatus;\ntype __ClientCategory = T.ClientCategory;\ntype __ClientInboxList = T.ClientInboxList;\ntype __ClientPreferences = T.ClientPreferences;\ntype __DeliveryAttempt = T.DeliveryAttempt;\ntype __DeliveryDetail = T.DeliveryDetail;\ntype __Delivery = T.Delivery;\ntype __DeliveryList = T.DeliveryList;\ntype __Device = T.Device;\ntype __DeviceList = T.DeviceList;\ntype __DeviceMove = T.DeviceMove;\ntype __DryRun = T.DryRun;\ntype __EffectiveQuietHours = T.EffectiveQuietHours;\ntype __Export = T.Export;\ntype __ExportNotificationType = T.ExportNotificationType;\ntype __ExportSettings = T.ExportSettings;\ntype __FallbackStepView = T.FallbackStepView;\ntype __FcmCredential = T.FcmCredential;\ntype __InboxAction = T.InboxAction;\ntype __InboxCounts = T.InboxCounts;\ntype __InboxItem = T.InboxItem;\ntype __InboxList = T.InboxList;\ntype __ListPagination = T.ListPagination;\ntype __WebhookEndpointList = T.WebhookEndpointList;\ntype __ListWebhookEndpoints = T.WebhookEndpointList;\ntype __WebhookEventTypeList = T.WebhookEventTypeList;\ntype __ListWebhookEventTypes = T.WebhookEventTypeList;\ntype __WebhookEventList = T.WebhookEventList;\ntype __ListWebhookEvents = T.WebhookEventList;\ntype __MarkInboxResult = T.MarkInboxResult;\ntype __NotificationActor = T.NotificationActor;\ntype __Notification = T.Notification;\ntype __NotificationList = T.NotificationList;\ntype __NotificationType = T.NotificationType;\ntype __NotificationTypeList = T.NotificationTypeList;\ntype __NotifyCredentialInvalidData = T.NotifyCredentialInvalidData;\ntype __NotifyDeliveryEventData = T.NotifyDeliveryEventData;\ntype __NotifyDeviceEventData = T.NotifyDeviceEventData;\ntype __NotifyEmailAutoPausedData = T.NotifyEmailAutoPausedData;\ntype __NotifyInboxItemEventData = T.NotifyInboxItemEventData;\ntype __NotifyNotificationAcceptedData = T.NotifyNotificationAcceptedData;\ntype __NotifyRecipientDeletedData = T.NotifyRecipientDeletedData;\ntype __NotifySettings = T.NotifySettings;\ntype __NotifyStatsCounts = T.NotifyStatsCounts;\ntype __NotifyStatsDay = T.NotifyStatsDay;\ntype __NotifyStats = T.NotifyStats;\ntype __NotifyWebhookRecipient = T.NotifyWebhookRecipient;\ntype __Pagination = T.Pagination;\ntype __PlanRow = T.PlanRow;\ntype __PreferenceCell = T.PreferenceCell;\ntype __PreferenceSet = T.PreferenceSet;\ntype __PreviewChannel = T.PreviewChannel;\ntype __Preview = T.Preview;\ntype __QuietHours = T.QuietHours;\ntype __Recipient = T.Recipient;\ntype __RecipientErasure = T.RecipientErasure;\ntype __RecipientListPagination = T.RecipientListPagination;\ntype __RecipientList = T.RecipientList;\ntype __RecipientToken = T.RecipientToken;\ntype __RenderedPush = T.RenderedPush;\ntype __WebhookEventReplay = T.WebhookEventReplay;\ntype __ReplayWebhookEvent = T.WebhookEventReplay;\ntype __Retract = T.Retract;\ntype __RoutingView = T.RoutingView;\ntype __SendNotification = T.SendNotification;\ntype __SetupRow = T.SetupRow;\ntype __SetupRowFix = T.SetupRowFix;\ntype __SetupRowTest = T.SetupRowTest;\ntype __SetupStatus = T.SetupStatus;\ntype __SkippedRecipient = T.SkippedRecipient;\ntype __Template = T.Template;\ntype __TemplateSummary = T.TemplateSummary;\ntype __TemplateVersion = T.TemplateVersion;\ntype __TemplateVersionList = T.TemplateVersionList;\ntype __ThrottleView = T.ThrottleView;\ntype __TimelineDevice = T.TimelineDevice;\ntype __TimelineEntry = T.TimelineEntry;\ntype __Timeline = T.Timeline;\ntype __VapidKey = T.VapidKey;\ntype __VapidPublicKey = T.VapidPublicKey;\ntype __WebPushChannel = T.WebPushChannel;\ntype __WebhookDeliveryAttempt = T.WebhookDeliveryAttempt;\ntype __WebhookEndpoint = T.WebhookEndpoint;\ntype __WebhookEndpointWithSecret = T.WebhookEndpointWithSecret;\ntype __WebhookEventDelivery = T.WebhookEventDelivery;\ntype __WebhookEventDetail = T.WebhookEventDetail;\ntype __WebhookEvent = T.WebhookEvent;\ntype __WebhookEventTypeInfo = T.WebhookEventTypeInfo;\ntype __WebhookPagination = T.WebhookPagination;\ntype __MeDeviceRegisterParams = T.MeDeviceRegisterParams;\ntype __MeInboxListParams = T.MeInboxListParams;\ntype __MeInboxMarkParams = T.MeInboxMarkParams;\ntype __MeInboxInteractParams = T.MeInboxInteractParams;\ntype __MePreferenceUpdateParams = T.MePreferenceUpdateParams;\ntype __CategoryListParams = T.CategoryListParams;\ntype __CategoryCreateParams = T.CategoryCreateParams;\ntype __CategoryUpdateParams = T.CategoryUpdateParams;\ntype __ChannelApnUploadCredentialParams = T.ChannelApnUploadCredentialParams;\ntype __ChannelFcmUploadCredentialParams = T.ChannelFcmUploadCredentialParams;\ntype __ChannelWebpushGenerateVapidKeysParams = T.ChannelWebpushGenerateVapidKeysParams;\ntype __ChannelWebpushImportVapidKeysParams = T.ChannelWebpushImportVapidKeysParams;\ntype __DeliveryListParams = T.DeliveryListParams;\ntype __NotificationTypeListParams = T.NotificationTypeListParams;\ntype __NotificationTypeCreateParams = T.NotificationTypeCreateParams;\ntype __NotificationTypeReplaceByKeyParams = T.NotificationTypeReplaceByKeyParams;\ntype __NotificationTypeUpdateParams = T.NotificationTypeUpdateParams;\ntype __NotificationTypePreviewParams = T.NotificationTypePreviewParams;\ntype __NotificationTypeTemplateUpdateParams = T.NotificationTypeTemplateUpdateParams;\ntype __NotificationTypeTemplateRevertParams = T.NotificationTypeTemplateRevertParams;\ntype __NotificationListParams = T.NotificationListParams;\ntype __NotificationSendParams = T.NotificationSendParams;\ntype __NotificationSendResponse = T.NotificationSendResponse;\ntype __NotificationCancelByKeyParams = T.NotificationCancelByKeyParams;\ntype __RecipientTokenMintParams = T.RecipientTokenMintParams;\ntype __RecipientListParams = T.RecipientListParams;\ntype __RecipientBulkIdentifyParams = T.RecipientBulkIdentifyParams;\ntype __RecipientIdentifyParams = T.RecipientIdentifyParams;\ntype __RecipientUpdateParams = T.RecipientUpdateParams;\ntype __RecipientDeviceCreateParams = T.RecipientDeviceCreateParams;\ntype __RecipientInboxListParams = T.RecipientInboxListParams;\ntype __RecipientPreferenceReplaceParams = T.RecipientPreferenceReplaceParams;\ntype __RecipientPreferenceUpdateParams = T.RecipientPreferenceUpdateParams;\ntype __RecipientTimelineParams = T.RecipientTimelineParams;\ntype __SettingsUpdateParams = T.SettingsUpdateParams;\ntype __StatsRetrieveParams = T.StatsRetrieveParams;\ntype __WebhookEndpointCreateParams = T.WebhookEndpointCreateParams;\ntype __WebhookEndpointUpdateParams = T.WebhookEndpointUpdateParams;\ntype __WebhookEndpointRotateSecretParams = T.WebhookEndpointRotateSecretParams;\ntype __WebhookEndpointTestParams = T.WebhookEndpointTestParams;\ntype __WebhookEventListParams = T.WebhookEventListParams;\ntype __WebhookEventReplayParams = T.WebhookEventReplayParams;\ntype __ErrorCode = E.NotifyErrorCode;\ntype __CredentialInvalidEvent = W.CredentialInvalidEvent;\ntype __DeliveryBouncedEvent = W.DeliveryBouncedEvent;\ntype __DeliveryDeliveredEvent = W.DeliveryDeliveredEvent;\ntype __DeliveryFailedEvent = W.DeliveryFailedEvent;\ntype __DeliverySentEvent = W.DeliverySentEvent;\ntype __DeliverySkippedEvent = W.DeliverySkippedEvent;\ntype __DeviceMovedEvent = W.DeviceMovedEvent;\ntype __DevicePrunedEvent = W.DevicePrunedEvent;\ntype __EmailAutoPausedEvent = W.EmailAutoPausedEvent;\ntype __InboxItemArchivedEvent = W.InboxItemArchivedEvent;\ntype __InboxItemInteractedEvent = W.InboxItemInteractedEvent;\ntype __InboxItemReadEvent = W.InboxItemReadEvent;\ntype __NotificationAcceptedEvent = W.NotificationAcceptedEvent;\ntype __RecipientDeletedEvent = W.RecipientDeletedEvent;\ntype __UnknownWebhookEvent = W.UnknownWebhookEvent;\ntype __UnwrapWebhookEvent = W.UnwrapWebhookEvent;\ntype __WebhookSignParams = W.WebhookSignParams;\ntype __WebhookUnwrapParams = W.WebhookUnwrapParams;\n/** Public types: `Notify.ApnsCredential`, `Notify.MeDeviceRegisterParams`, … */\nexport namespace Notify {\n export type RequestOptions = __RequestOptions;\n export type PollOptions = __PollOptions;\n export type ClientOptions = __ClientOptions;\n export type Page<T> = __Page<T>;\n export type PagePromise<T> = __PagePromise<T>;\n export type APIPromise<T> = __APIPromise<T>;\n export type WithResponse<T> = __WithResponse<T>;\n export type RateLimitInfo = __RateLimitInfo;\n export type LastResponse = __LastResponse;\n export type ApnsCredentialEnvironment = __ApnsCredentialEnvironment;\n export const ApnsCredentialEnvironment = T.ApnsCredentialEnvironment;\n export type ApnsEnvironment = __ApnsEnvironment;\n export const ApnsEnvironment = T.ApnsEnvironment;\n export type BulkRowStatus = __BulkRowStatus;\n export const BulkRowStatus = T.BulkRowStatus;\n export type CategoryDefault = __CategoryDefault;\n export const CategoryDefault = T.CategoryDefault;\n export type ChannelReadiness = __ChannelReadiness;\n export const ChannelReadiness = T.ChannelReadiness;\n export type ClientInboxStatusFilter = __ClientInboxStatusFilter;\n export const ClientInboxStatusFilter = T.ClientInboxStatusFilter;\n export type CredentialEnvironment = __CredentialEnvironment;\n export const CredentialEnvironment = T.CredentialEnvironment;\n export type CredentialOrigin = __CredentialOrigin;\n export const CredentialOrigin = T.CredentialOrigin;\n export type CredentialProvider = __CredentialProvider;\n export const CredentialProvider = T.CredentialProvider;\n export type CredentialStatus = __CredentialStatus;\n export const CredentialStatus = T.CredentialStatus;\n export type DeliveryState = __DeliveryState;\n export const DeliveryState = T.DeliveryState;\n export type DeviceChannel = __DeviceChannel;\n export const DeviceChannel = T.DeviceChannel;\n export type DeviceMoveDirection = __DeviceMoveDirection;\n export const DeviceMoveDirection = T.DeviceMoveDirection;\n export type DevicePlatform = __DevicePlatform;\n export const DevicePlatform = T.DevicePlatform;\n export type DeviceState = __DeviceState;\n export const DeviceState = T.DeviceState;\n export type InboxItemStatusFilter = __InboxItemStatusFilter;\n export const InboxItemStatusFilter = T.InboxItemStatusFilter;\n export type InboxMarkAction = __InboxMarkAction;\n export const InboxMarkAction = T.InboxMarkAction;\n export type NotificationStatus = __NotificationStatus;\n export const NotificationStatus = T.NotificationStatus;\n export type NotifyChannel = __NotifyChannel;\n export const NotifyChannel = T.NotifyChannel;\n export type NotifyDeliveryReason = __NotifyDeliveryReason;\n export const NotifyDeliveryReason = T.NotifyDeliveryReason;\n export type NotifyEmailPauseReason = __NotifyEmailPauseReason;\n export const NotifyEmailPauseReason = T.NotifyEmailPauseReason;\n export type NotifyQuietHoursSource = __NotifyQuietHoursSource;\n export const NotifyQuietHoursSource = T.NotifyQuietHoursSource;\n export type NotifyRecipientDeletionCause = __NotifyRecipientDeletionCause;\n export const NotifyRecipientDeletionCause = T.NotifyRecipientDeletionCause;\n export type NotifyStatsChannel = __NotifyStatsChannel;\n export const NotifyStatsChannel = T.NotifyStatsChannel;\n export type NotifyWebhookChannel = __NotifyWebhookChannel;\n export const NotifyWebhookChannel = T.NotifyWebhookChannel;\n export type NotifyWebhookCredentialProvider = __NotifyWebhookCredentialProvider;\n export const NotifyWebhookCredentialProvider = T.NotifyWebhookCredentialProvider;\n export type NotifyWebhookDeliveryState = __NotifyWebhookDeliveryState;\n export const NotifyWebhookDeliveryState = T.NotifyWebhookDeliveryState;\n export type NotifyWebhookDeviceChannel = __NotifyWebhookDeviceChannel;\n export const NotifyWebhookDeviceChannel = T.NotifyWebhookDeviceChannel;\n export type PlanDecision = __PlanDecision;\n export const PlanDecision = T.PlanDecision;\n export type PreferenceChannel = __PreferenceChannel;\n export const PreferenceChannel = T.PreferenceChannel;\n export type PreferenceScope = __PreferenceScope;\n export const PreferenceScope = T.PreferenceScope;\n export type RecipientErasureStatus = __RecipientErasureStatus;\n export const RecipientErasureStatus = T.RecipientErasureStatus;\n export type RecipientInclude = __RecipientInclude;\n export const RecipientInclude = T.RecipientInclude;\n export type RecipientTokenScope = __RecipientTokenScope;\n export const RecipientTokenScope = T.RecipientTokenScope;\n export type SendStatus = __SendStatus;\n export const SendStatus = T.SendStatus;\n export type SetupRowState = __SetupRowState;\n export const SetupRowState = T.SetupRowState;\n export type WebhookAttemptTrigger = __WebhookAttemptTrigger;\n export const WebhookAttemptTrigger = T.WebhookAttemptTrigger;\n export type WebhookEndpointDisabledReason = __WebhookEndpointDisabledReason;\n export const WebhookEndpointDisabledReason = T.WebhookEndpointDisabledReason;\n export type WebhookEndpointStatus = __WebhookEndpointStatus;\n export const WebhookEndpointStatus = T.WebhookEndpointStatus;\n export type WebhookEventStatus = __WebhookEventStatus;\n export const WebhookEventStatus = T.WebhookEventStatus;\n export type WebhookEventType = __WebhookEventType;\n export const WebhookEventType = T.WebhookEventType;\n export type ApnsCredential = __ApnsCredential;\n export type BulkRowError = __BulkRowError;\n export type BulkRowResult = __BulkRowResult;\n export type BulkUpsertRecipients = __BulkUpsertRecipients;\n export type CancelByKey = __CancelByKey;\n export type CategoryDefaultsView = __CategoryDefaultsView;\n export type Category = __Category;\n export type CategoryList = __CategoryList;\n export type ChannelCounts = __ChannelCounts;\n export type ChannelCredential = __ChannelCredential;\n export type ChannelList = __ChannelList;\n export type ChannelStatus = __ChannelStatus;\n export type ClientCategory = __ClientCategory;\n export type ClientInboxList = __ClientInboxList;\n export type ClientPreferences = __ClientPreferences;\n export type DeliveryAttempt = __DeliveryAttempt;\n export type DeliveryDetail = __DeliveryDetail;\n export type Delivery = __Delivery;\n export type DeliveryList = __DeliveryList;\n export type Device = __Device;\n export type DeviceList = __DeviceList;\n export type DeviceMove = __DeviceMove;\n export type DryRun = __DryRun;\n export type EffectiveQuietHours = __EffectiveQuietHours;\n export type Export = __Export;\n export type ExportNotificationType = __ExportNotificationType;\n export type ExportSettings = __ExportSettings;\n export type FallbackStepView = __FallbackStepView;\n export type FcmCredential = __FcmCredential;\n export type InboxAction = __InboxAction;\n export type InboxCounts = __InboxCounts;\n export type InboxItem = __InboxItem;\n export type InboxList = __InboxList;\n export type ListPagination = __ListPagination;\n export type WebhookEndpointList = __WebhookEndpointList;\n /** @deprecated Renamed to `Notify.WebhookEndpointList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEndpoints = __ListWebhookEndpoints;\n export type WebhookEventTypeList = __WebhookEventTypeList;\n /** @deprecated Renamed to `Notify.WebhookEventTypeList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEventTypes = __ListWebhookEventTypes;\n export type WebhookEventList = __WebhookEventList;\n /** @deprecated Renamed to `Notify.WebhookEventList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEvents = __ListWebhookEvents;\n export type MarkInboxResult = __MarkInboxResult;\n export type NotificationActor = __NotificationActor;\n export type Notification = __Notification;\n export type NotificationList = __NotificationList;\n export type NotificationType = __NotificationType;\n export type NotificationTypeList = __NotificationTypeList;\n export type NotifyCredentialInvalidData = __NotifyCredentialInvalidData;\n export type NotifyDeliveryEventData = __NotifyDeliveryEventData;\n export type NotifyDeviceEventData = __NotifyDeviceEventData;\n export type NotifyEmailAutoPausedData = __NotifyEmailAutoPausedData;\n export type NotifyInboxItemEventData = __NotifyInboxItemEventData;\n export type NotifyNotificationAcceptedData = __NotifyNotificationAcceptedData;\n export type NotifyRecipientDeletedData = __NotifyRecipientDeletedData;\n export type NotifySettings = __NotifySettings;\n export type NotifyStatsCounts = __NotifyStatsCounts;\n export type NotifyStatsDay = __NotifyStatsDay;\n export type NotifyStats = __NotifyStats;\n export type NotifyWebhookRecipient = __NotifyWebhookRecipient;\n export type Pagination = __Pagination;\n export type PlanRow = __PlanRow;\n export type PreferenceCell = __PreferenceCell;\n export type PreferenceSet = __PreferenceSet;\n export type PreviewChannel = __PreviewChannel;\n export type Preview = __Preview;\n export type QuietHours = __QuietHours;\n export type Recipient = __Recipient;\n export type RecipientErasure = __RecipientErasure;\n export type RecipientListPagination = __RecipientListPagination;\n export type RecipientList = __RecipientList;\n export type RecipientToken = __RecipientToken;\n export type RenderedPush = __RenderedPush;\n export type WebhookEventReplay = __WebhookEventReplay;\n /** @deprecated Renamed to `Notify.WebhookEventReplay`. Kept for 1.x callers; removed in the next major. */\n export type ReplayWebhookEvent = __ReplayWebhookEvent;\n export type Retract = __Retract;\n export type RoutingView = __RoutingView;\n export type SendNotification = __SendNotification;\n export type SetupRow = __SetupRow;\n export type SetupRowFix = __SetupRowFix;\n export type SetupRowTest = __SetupRowTest;\n export type SetupStatus = __SetupStatus;\n export type SkippedRecipient = __SkippedRecipient;\n export type Template = __Template;\n export type TemplateSummary = __TemplateSummary;\n export type TemplateVersion = __TemplateVersion;\n export type TemplateVersionList = __TemplateVersionList;\n export type ThrottleView = __ThrottleView;\n export type TimelineDevice = __TimelineDevice;\n export type TimelineEntry = __TimelineEntry;\n export type Timeline = __Timeline;\n export type VapidKey = __VapidKey;\n export type VapidPublicKey = __VapidPublicKey;\n export type WebPushChannel = __WebPushChannel;\n export type WebhookDeliveryAttempt = __WebhookDeliveryAttempt;\n export type WebhookEndpoint = __WebhookEndpoint;\n export type WebhookEndpointWithSecret = __WebhookEndpointWithSecret;\n export type WebhookEventDelivery = __WebhookEventDelivery;\n export type WebhookEventDetail = __WebhookEventDetail;\n export type WebhookEvent = __WebhookEvent;\n export type WebhookEventTypeInfo = __WebhookEventTypeInfo;\n export type WebhookPagination = __WebhookPagination;\n export type MeDeviceRegisterParams = __MeDeviceRegisterParams;\n export type MeInboxListParams = __MeInboxListParams;\n export type MeInboxMarkParams = __MeInboxMarkParams;\n export type MeInboxInteractParams = __MeInboxInteractParams;\n export type MePreferenceUpdateParams = __MePreferenceUpdateParams;\n export type CategoryListParams = __CategoryListParams;\n export type CategoryCreateParams = __CategoryCreateParams;\n export type CategoryUpdateParams = __CategoryUpdateParams;\n export type ChannelApnUploadCredentialParams = __ChannelApnUploadCredentialParams;\n export type ChannelFcmUploadCredentialParams = __ChannelFcmUploadCredentialParams;\n export type ChannelWebpushGenerateVapidKeysParams = __ChannelWebpushGenerateVapidKeysParams;\n export type ChannelWebpushImportVapidKeysParams = __ChannelWebpushImportVapidKeysParams;\n export type DeliveryListParams = __DeliveryListParams;\n export type NotificationTypeListParams = __NotificationTypeListParams;\n export type NotificationTypeCreateParams = __NotificationTypeCreateParams;\n export type NotificationTypeReplaceByKeyParams = __NotificationTypeReplaceByKeyParams;\n export type NotificationTypeUpdateParams = __NotificationTypeUpdateParams;\n export type NotificationTypePreviewParams = __NotificationTypePreviewParams;\n export type NotificationTypeTemplateUpdateParams = __NotificationTypeTemplateUpdateParams;\n export type NotificationTypeTemplateRevertParams = __NotificationTypeTemplateRevertParams;\n export type NotificationListParams = __NotificationListParams;\n export type NotificationSendParams = __NotificationSendParams;\n export type NotificationSendResponse = __NotificationSendResponse;\n export type NotificationCancelByKeyParams = __NotificationCancelByKeyParams;\n export type RecipientTokenMintParams = __RecipientTokenMintParams;\n export type RecipientListParams = __RecipientListParams;\n export type RecipientBulkIdentifyParams = __RecipientBulkIdentifyParams;\n export type RecipientIdentifyParams = __RecipientIdentifyParams;\n export type RecipientUpdateParams = __RecipientUpdateParams;\n export type RecipientDeviceCreateParams = __RecipientDeviceCreateParams;\n export type RecipientInboxListParams = __RecipientInboxListParams;\n export type RecipientPreferenceReplaceParams = __RecipientPreferenceReplaceParams;\n export type RecipientPreferenceUpdateParams = __RecipientPreferenceUpdateParams;\n export type RecipientTimelineParams = __RecipientTimelineParams;\n export type SettingsUpdateParams = __SettingsUpdateParams;\n export type StatsRetrieveParams = __StatsRetrieveParams;\n export type WebhookEndpointCreateParams = __WebhookEndpointCreateParams;\n export type WebhookEndpointUpdateParams = __WebhookEndpointUpdateParams;\n export type WebhookEndpointRotateSecretParams = __WebhookEndpointRotateSecretParams;\n export type WebhookEndpointTestParams = __WebhookEndpointTestParams;\n export type WebhookEventListParams = __WebhookEventListParams;\n export type WebhookEventReplayParams = __WebhookEventReplayParams;\n export type ErrorCode = __ErrorCode;\n export type CredentialInvalidEvent = __CredentialInvalidEvent;\n export type DeliveryBouncedEvent = __DeliveryBouncedEvent;\n export type DeliveryDeliveredEvent = __DeliveryDeliveredEvent;\n export type DeliveryFailedEvent = __DeliveryFailedEvent;\n export type DeliverySentEvent = __DeliverySentEvent;\n export type DeliverySkippedEvent = __DeliverySkippedEvent;\n export type DeviceMovedEvent = __DeviceMovedEvent;\n export type DevicePrunedEvent = __DevicePrunedEvent;\n export type EmailAutoPausedEvent = __EmailAutoPausedEvent;\n export type InboxItemArchivedEvent = __InboxItemArchivedEvent;\n export type InboxItemInteractedEvent = __InboxItemInteractedEvent;\n export type InboxItemReadEvent = __InboxItemReadEvent;\n export type NotificationAcceptedEvent = __NotificationAcceptedEvent;\n export type RecipientDeletedEvent = __RecipientDeletedEvent;\n export type UnknownWebhookEvent = __UnknownWebhookEvent;\n export type UnwrapWebhookEvent = __UnwrapWebhookEvent;\n export type WebhookSignParams = __WebhookSignParams;\n export type WebhookUnwrapParams = __WebhookUnwrapParams;\n}\n","// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nexport { APIConnectionError, APIError, APITimeoutError, APIUserAbortError, AuthenticationError, BadRequestError, ConfigurationError, ConflictError, IdempotencyKeyReuseError, InternalServerError, NotFoundError, PaymentRequiredError, PermissionDeniedError, ProductCraftError, RateLimitError, UnprocessableEntityError, WebhookVerificationError } from \"@productcraft/core\";\n\n/** Error codes this API documents. Open: codes added later still type-check. See https://productcraft.co/docs/errors. */\nexport type NotifyErrorCode = \"BAD_REQUEST\" | \"VALIDATION_ERROR\" | \"UNAUTHORIZED\" | \"PAYMENT_REQUIRED\" | \"FORBIDDEN\" | \"NOT_FOUND\" | \"METHOD_NOT_ALLOWED\" | \"NOT_ACCEPTABLE\" | \"REQUEST_TIMEOUT\" | \"CONFLICT\" | \"GONE\" | \"PRECONDITION_FAILED\" | \"PAYLOAD_TOO_LARGE\" | \"UNSUPPORTED_MEDIA_TYPE\" | \"UNPROCESSABLE_ENTITY\" | \"PRECONDITION_REQUIRED\" | \"RATE_LIMITED\" | \"INTERNAL_SERVER_ERROR\" | \"NOT_IMPLEMENTED\" | \"BAD_GATEWAY\" | \"SERVICE_UNAVAILABLE\" | \"GATEWAY_TIMEOUT\" | \"SERVICE_NOT_ENABLED\" | \"INVALID_CREDENTIALS\" | \"SESSION_REVOKED\" | \"MCP_NOT_PERMITTED\" | \"MCP_WORKSPACE_MISMATCH\" | \"PAK_NOT_PERMITTED\" | \"ACTIONS_NOT_GRANTABLE\" | \"IDEMPOTENCY_KEY_REUSE\" | \"IDEMPOTENCY_KEY_REQUIRED\" | \"IDEMPOTENCY_IN_PROGRESS\" | \"WEBHOOK_ENDPOINT_LIMIT\" | \"WEBHOOK_ENDPOINT_NOT_FOUND\" | \"WEBHOOK_ENDPOINT_NOT_SUBSCRIBED\" | \"WEBHOOK_EVENT_NOT_FOUND\" | \"WEBHOOK_EVENT_TYPE_UNKNOWN\" | \"NOTIFICATION_TYPE_NOT_FOUND\" | \"NOTIFICATION_TYPE_ARCHIVED\" | \"RECIPIENT_NOT_FOUND\" | \"TOO_MANY_RECIPIENTS\" | \"DATA_TOO_LARGE\" | \"TEMPLATE_MISSING\" | \"TEMPLATE_INVALID\" | \"CHANNEL_NOT_CONFIGURED\" | \"CREDENTIAL_INVALID\" | \"CREDENTIAL_NOT_FOUND\" | \"CREDENTIAL_MISMATCH\" | \"DEVICE_TOKEN_INVALID\" | \"WEBPUSH_ENDPOINT_NOT_ALLOWED\" | \"RECIPIENT_TOKEN_INVALID\" | \"RECIPIENT_TOKEN_EXPIRED\" | \"RECIPIENT_TOKEN_SCOPE\" | \"ORIGIN_NOT_ALLOWED\" | \"STREAM_LIMIT\" | \"LIMIT_EXCEEDED\" | \"SEND_AT_OUT_OF_RANGE\" | \"UNSAFE_URL\" | \"AUTH_USER_ALREADY_LINKED\" | \"DEVICE_NOT_FOUND\" | \"CATEGORY_NOT_FOUND\" | \"CATEGORY_KEY_TAKEN\" | \"CATEGORY_IN_USE\" | \"NOTIFICATION_TYPE_KEY_TAKEN\" | \"TEMPLATE_NOT_FOUND\" | \"TEMPLATE_VERSION_NOT_FOUND\" | \"PREFERENCE_LOCKED\" | \"NOTIFICATION_NOT_FOUND\" | \"DELIVERY_NOT_FOUND\" | \"CONFIRMATION_REQUIRED\" | \"INBOX_ITEM_NOT_FOUND\" | \"RECIPIENT_ERASED\" | \"DEVICE_MOVE_LIMIT\" | (string & {});\nexport const NotifyErrorCode = { values: [\"BAD_REQUEST\", \"VALIDATION_ERROR\", \"UNAUTHORIZED\", \"PAYMENT_REQUIRED\", \"FORBIDDEN\", \"NOT_FOUND\", \"METHOD_NOT_ALLOWED\", \"NOT_ACCEPTABLE\", \"REQUEST_TIMEOUT\", \"CONFLICT\", \"GONE\", \"PRECONDITION_FAILED\", \"PAYLOAD_TOO_LARGE\", \"UNSUPPORTED_MEDIA_TYPE\", \"UNPROCESSABLE_ENTITY\", \"PRECONDITION_REQUIRED\", \"RATE_LIMITED\", \"INTERNAL_SERVER_ERROR\", \"NOT_IMPLEMENTED\", \"BAD_GATEWAY\", \"SERVICE_UNAVAILABLE\", \"GATEWAY_TIMEOUT\", \"SERVICE_NOT_ENABLED\", \"INVALID_CREDENTIALS\", \"SESSION_REVOKED\", \"MCP_NOT_PERMITTED\", \"MCP_WORKSPACE_MISMATCH\", \"PAK_NOT_PERMITTED\", \"ACTIONS_NOT_GRANTABLE\", \"IDEMPOTENCY_KEY_REUSE\", \"IDEMPOTENCY_KEY_REQUIRED\", \"IDEMPOTENCY_IN_PROGRESS\", \"WEBHOOK_ENDPOINT_LIMIT\", \"WEBHOOK_ENDPOINT_NOT_FOUND\", \"WEBHOOK_ENDPOINT_NOT_SUBSCRIBED\", \"WEBHOOK_EVENT_NOT_FOUND\", \"WEBHOOK_EVENT_TYPE_UNKNOWN\", \"NOTIFICATION_TYPE_NOT_FOUND\", \"NOTIFICATION_TYPE_ARCHIVED\", \"RECIPIENT_NOT_FOUND\", \"TOO_MANY_RECIPIENTS\", \"DATA_TOO_LARGE\", \"TEMPLATE_MISSING\", \"TEMPLATE_INVALID\", \"CHANNEL_NOT_CONFIGURED\", \"CREDENTIAL_INVALID\", \"CREDENTIAL_NOT_FOUND\", \"CREDENTIAL_MISMATCH\", \"DEVICE_TOKEN_INVALID\", \"WEBPUSH_ENDPOINT_NOT_ALLOWED\", \"RECIPIENT_TOKEN_INVALID\", \"RECIPIENT_TOKEN_EXPIRED\", \"RECIPIENT_TOKEN_SCOPE\", \"ORIGIN_NOT_ALLOWED\", \"STREAM_LIMIT\", \"LIMIT_EXCEEDED\", \"SEND_AT_OUT_OF_RANGE\", \"UNSAFE_URL\", \"AUTH_USER_ALREADY_LINKED\", \"DEVICE_NOT_FOUND\", \"CATEGORY_NOT_FOUND\", \"CATEGORY_KEY_TAKEN\", \"CATEGORY_IN_USE\", \"NOTIFICATION_TYPE_KEY_TAKEN\", \"TEMPLATE_NOT_FOUND\", \"TEMPLATE_VERSION_NOT_FOUND\", \"PREFERENCE_LOCKED\", \"NOTIFICATION_NOT_FOUND\", \"DELIVERY_NOT_FOUND\", \"CONFIRMATION_REQUIRED\", \"INBOX_ITEM_NOT_FOUND\", \"RECIPIENT_ERASED\", \"DEVICE_MOVE_LIMIT\"] as const };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/_generated/resources.ts","../src/_generated/types.ts","../src/_generated/client.ts","../src/_generated/errors.ts"],"names":["Notify"],"mappings":";;;;;;AAwBO,IAAM,cAAN,MAAkB;AAAA,EACJ,OAAA;AAAA;AAAA,EAEA,EAAA;AAAA,EACnB,WAAA,CAAY,MAAA,EAAmB,KAAA,GAAe,EAAC,EAAG;AAChD,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA;AACf,IAAA,IAAA,CAAK,EAAA,GAAK,KAAA;AAAA,EACZ;AACF,CAAA;AAKO,IAAM,iBAAA,GAAN,cAAgC,WAAA,CAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBjD,MAAA,CAAO,YAAoB,OAAA,EAAsE;AAC/F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,EAAE,QAAQ,MAAA,EAAQ,IAAA,EAAM,8DAAA,EAAgE,UAAA,EAAY,EAAE,WAAA,EAAa,UAAA,EAAW,IAAK,OAAO,CAAA;AAAA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ollOptions, RequestOptions } from \"@productcraft/core\";\nimport type * as T from \"./types.js\";\nimport type { UnwrapWebhookEvent, WebhookSignParams, WebhookUnwrapParams } from \"./webhooks.js\";\nimport type { SignedWebhook } from \"@productcraft/core\";\n\ntype Bound = Readonly<Record<string, string | undefined>>;\n\n/** Split params into [picked, rest] by key. */\nfunction split(params: object | undefined, keys: readonly string[]): [Record<string, unknown>, Record<string, unknown>] {\n const picked: Record<string, unknown> = {};\n const rest: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(params ?? {})) (keys.includes(k) ? picked : rest)[k] = v;\n return [picked, rest];\n}\n\n/** Fill `actor_id` from a scope bound with `.as(actorId)`, unless the call passes one. */\nfunction fillActor<P>(params: P, bound: Bound): P {\n if (bound.actor_id === undefined) return params;\n const p = (params ?? {}) as Record<string, unknown>;\n return (p.actor_id === undefined ? { ...p, actor_id: bound.actor_id } : p) as P;\n}\n\nexport class APIResource {\n protected readonly _client: APIClient;\n /** Path parameters (and `actor_id`) bound by the enclosing scope. */\n protected readonly _b: Bound;\n constructor(client: APIClient, bound: Bound = {}) {\n this._client = client;\n this._b = bound;\n }\n}\n\nvoid split;\nvoid fillActor;\n/** `approvals` */\nexport class ApprovalsResource extends APIResource {\n /**\n * Cancel an approval request\n *\n * Withdraws a pending request: approvers see it as cancelled, nothing more is sent, and `approval.resolved` fires with `status: cancelled`. Takes no Idempotency-Key: cancelling twice is a 409 the second time.\n *\n * Credential: `bearer`.\n *\n * @param approvalId - The approval request id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, APPROVAL_NOT_FOUND: `APPROVAL_NOT_FOUND`: no approval request with this id in this workspace.\n * @throws {ConflictError} 409 CONFLICT, APPROVAL_NOT_PENDING: `APPROVAL_NOT_PENDING`: it was already answered, expired or cancelled.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/approvals/{approval_id}/cancel\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-approvals-approval-id-cancel\n * @example\n * ```ts\n * const approval = await notify.approvals.cancel(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n cancel(approvalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Approval>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/approvals/{approval_id}/cancel\", pathParams: { approval_id: approvalId } }, options);\n }\n /**\n * Request an approval\n *\n * Asks one or more people a yes/no question on the type's channels and records the first answer. In the inbox the item gets Approve and Reject buttons (or render it with `<NotifyApproval/>`); emails and pushes carry a signed link per approver (`approval.url`, `approval.approve_url`, `approval.reject_url`) to a hosted page that needs no sign-in. The answer arrives as the signed `approval.resolved` webhook and on `GET /approvals/{approval_id}`. Nobody answered by `expires_at`: the type's `timeout_outcome` applies (default `expired`). Pass `wait_seconds` (up to 15) to wait for the answer in this call. The type must have `approval` set; its notifications can only be sent here. An `Idempotency-Key` is required: the same key and body return the same request (200), a different body is a 409.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ApprovalCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, IDEMPOTENCY_KEY_REQUIRED: `IDEMPOTENCY_KEY_REQUIRED`; `VALIDATION_ERROR`: a field is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no type with this key.\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the key was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, NOT_AN_APPROVAL_TYPE, NOTIFICATION_TYPE_ARCHIVED, RECIPIENT_NOT_FOUND: `NOT_AN_APPROVAL_TYPE`: the type has no `approval`; `NOTIFICATION_TYPE_ARCHIVED`; `RECIPIENT_NOT_FOUND`: an approver is not a recipient (`details.missing`).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over the workspace send limit; see `Retry-After`. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/approvals\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-approvals\n * @example\n * ```ts\n * const approval = await notify.approvals.create({\n * approvers: [\"user_123\"],\n * title: \"Deploy api v2.14 to production?\",\n * type: \"deploy.approval\",\n * });\n * ```\n */\n create(params: T.ApprovalCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Approval>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/approvals\", body: params, idempotent: true }, options);\n }\n /**\n * List approval requests\n *\n * Newest first; filter by `status` and `type`. Pass `next_cursor` as `cursor` until `has_more` is false.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ApprovalListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/approvals\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-approvals\n * @example\n * ```ts\n * for await (const approval of notify.approvals.list()) {\n * console.log(approval);\n * }\n * const page = await notify.approvals.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.ApprovalListParams, options?: RequestOptions): PagePromise<T.Approval> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/approvals\", query: params }, options);\n }\n /**\n * Record an approver's answer\n *\n * For answers you collected yourself (your own UI, a phone call): records `approve` or `reject` for one of the approvers, exactly as if they had pressed the button (`decided_via: api`). Never give this to the agent that made the request: it is how a human's answer gets in, so it is not an MCP tool.\n *\n * Credential: `bearer`.\n *\n * @param approvalId - The approval request id.\n * @param params - `Notify.ApprovalRecordDecisionParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, APPROVAL_NOT_FOUND, RECIPIENT_NOT_FOUND: `APPROVAL_NOT_FOUND`, or `RECIPIENT_NOT_FOUND`: no recipient with that external id.\n * @throws {ConflictError} 409 CONFLICT, APPROVAL_NOT_PENDING: `APPROVAL_NOT_PENDING`: already answered, expired or cancelled.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, NOT_AN_APPROVER, APPROVAL_REASON_REQUIRED: `NOT_AN_APPROVER`: that recipient was not asked; `APPROVAL_REASON_REQUIRED`: the type needs a reason.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/approvals/{approval_id}/decision\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-approvals-approval-id-decision\n * @example\n * ```ts\n * const approval = await notify.approvals.recordDecision(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { approver: \"user_123\", decision: \"approve\" });\n * ```\n */\n recordDecision(approvalId: string, params: T.ApprovalRecordDecisionParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Approval>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/approvals/{approval_id}/decision\", pathParams: { approval_id: approvalId }, body: params }, options);\n }\n /**\n * Get an approval request\n *\n * Its status, the answer (who, when, why, from where) and its trail. With `wait_seconds` (up to 15) a pending request is long-polled: the call returns as soon as someone answers, or after that many seconds.\n *\n * Credential: `bearer`.\n *\n * @param approvalId - The approval request id.\n * @param params - `Notify.ApprovalRetrieveParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `wait_seconds` out of range.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, APPROVAL_NOT_FOUND: `APPROVAL_NOT_FOUND`: no approval request with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/approvals/{approval_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-approvals-approval-id\n * @example\n * ```ts\n * const approvalDetail = await notify.approvals.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(approvalId: string, params?: T.ApprovalRetrieveParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ApprovalDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/approvals/{approval_id}\", pathParams: { approval_id: approvalId }, query: params }, options);\n }\n}\n\n/** `batches` */\nexport class BatchesResource extends APIResource {\n /**\n * Close a batch now\n *\n * Sends an open batch now instead of at its window end or digest time: one message per batched channel, rendered with everything collected so far. Preferences, quiet hours, the recipient budgets and the type throttle apply as for any send. Useful to test a digest template without waiting for the morning.\n *\n * Credential: `bearer`.\n *\n * @param batchId - The batch id (from a delivery's `batch_id`, or the list).\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, BATCH_NOT_FOUND: `BATCH_NOT_FOUND`: no batch with this id in this workspace.\n * @throws {ConflictError} 409 CONFLICT, BATCH_NOT_OPEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `BATCH_NOT_OPEN`: the batch already closed, or is closing right now. `IDEMPOTENCY_KEY_REUSE`: the key was used for another request. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/batches/{batch_id}/flush\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-batches-batch-id-flush\n * @example\n * ```ts\n * const flushBatch = await notify.batches.flush(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n flush(batchId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.FlushBatch>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/batches/{batch_id}/flush\", pathParams: { batch_id: batchId }, idempotent: true }, options);\n }\n /**\n * List batches\n *\n * Batches of notification types with `batch` (a window or a digest), newest first: one per recipient and key value while collecting (`open`), then `flushed` once its one message went out. Filter by `recipient`, `type` and `state`. Pass `next_cursor` as `cursor` until `has_more` is false.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.BatchListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/batches\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-batches\n * @example\n * ```ts\n * for await (const batch of notify.batches.list()) {\n * console.log(batch);\n * }\n * const page = await notify.batches.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.BatchListParams, options?: RequestOptions): PagePromise<T.BatchSummary> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/batches\", query: params }, options);\n }\n /**\n * Get a batch\n *\n * The notifications collected in it, its deliveries (while open, `scheduled: batched`; after it closes, one carrier per channel with its outcome, the rest `skipped: batched_into`), and the `batch` data templates got.\n *\n * Credential: `bearer`.\n *\n * @param batchId - The batch id (from a delivery's `batch_id`, or the list).\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, BATCH_NOT_FOUND: `BATCH_NOT_FOUND`: no batch with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/batches/{batch_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-batches-batch-id\n * @example\n * ```ts\n * const batchDetail = await notify.batches.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(batchId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.BatchDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/batches/{batch_id}\", pathParams: { batch_id: batchId } }, options);\n }\n}\n\n/** `categories` */\nexport class CategoriesResource extends APIResource {\n /**\n * Create a category\n *\n * At most 50 categories per workspace during the preview. Channels left out of `defaults` are `on`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.CategoryCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, CATEGORY_KEY_TAKEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CATEGORY_KEY_TAKEN`: the key is in use; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the workspace already has 50 categories.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/categories\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-categories\n * @example\n * ```ts\n * const category = await notify.categories.create({ key: \"security\" });\n * ```\n */\n create(params: T.CategoryCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Category>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/categories\", body: params, idempotent: true }, options);\n }\n /**\n * Delete a category\n *\n * Only when no notification type uses it. Recipients' preferences for the category are deleted with it.\n *\n * Credential: `bearer`.\n *\n * @param categoryId - Id of the category.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.\n * @throws {ConflictError} 409 CONFLICT, CATEGORY_IN_USE: `CATEGORY_IN_USE`: a notification type still uses the category.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/categories/{category_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-categories-category-id\n * @example\n * ```ts\n * await notify.categories.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(categoryId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/categories/{category_id}\", pathParams: { category_id: categoryId } }, options);\n }\n /**\n * List categories\n *\n * By `ordinal`, then oldest first.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.CategoryListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad parameter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/categories\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-categories\n * @example\n * ```ts\n * for await (const category of notify.categories.list()) {\n * console.log(category);\n * }\n * const page = await notify.categories.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.CategoryListParams, options?: RequestOptions): PagePromise<T.Category> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/categories\", query: params }, options);\n }\n /**\n * Get a category\n *\n * Credential: `bearer`.\n *\n * @param categoryId - Id of the category.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/categories/{category_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-categories-category-id\n * @example\n * ```ts\n * const category = await notify.categories.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(categoryId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Category>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/categories/{category_id}\", pathParams: { category_id: categoryId } }, options);\n }\n /**\n * Update a category\n *\n * Changes the fields you send. `defaults` merges per channel. The key cannot change.\n *\n * Credential: `bearer`.\n *\n * @param categoryId - Id of the category.\n * @param params - `Notify.CategoryUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/categories/{category_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-categories-category-id\n * @example\n * ```ts\n * const category = await notify.categories.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { android_channel_id: \"string\" });\n * ```\n */\n update(categoryId: string, params?: T.CategoryUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Category>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/categories/{category_id}\", pathParams: { category_id: categoryId }, body: params }, options);\n }\n}\n\n/** `channels.apns` */\nexport class ChannelsApnsResource extends APIResource {\n /**\n * Delete an APNs key\n *\n * Deletes an APNs credential and erases its key immediately. Push to devices of its bundle id is skipped (`credential_invalid`) until another key is uploaded.\n *\n * Credential: `bearer`.\n *\n * @param credentialId - Id of the credential.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CREDENTIAL_NOT_FOUND: `CREDENTIAL_NOT_FOUND`: no APNs credential with this id in the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/channels/apns/credentials/{credential_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-channels-apns-credentials-credential-id\n * @example\n * ```ts\n * await notify.channels.apns.deleteCredential(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n deleteCredential(credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/channels/apns/credentials/{credential_id}\", pathParams: { credential_id: credentialId } }, options);\n }\n /**\n * Upload an APNs key\n *\n * Uploads an APNs authentication key (`.p8`, token auth) for one bundle id. You still create the key in your Apple developer account; Notify validates it with Apple before activating it (a background push to a placeholder token that reaches no device), stores it encrypted and never returns it. An upload replaces the active or invalid key of the same bundle id whose environment overlaps (`replaced_credential_ids`), and resumes push for that bundle id if Apple had refused the previous key. Uploading the active key again unchanged only re-validates it. Nothing is stored when Apple refuses the key or cannot be reached.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelApnUploadCredentialParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is malformed (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFLICT`: another upload for the same bundle id ran at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID, CREDENTIAL_MISMATCH: `CREDENTIAL_INVALID`: the `.p8` is not a P-256 private key, or Apple rejected it (wrong `key_id`/`team_id`, revoked key); `CREDENTIAL_MISMATCH`: Apple accepted the key but not for this `bundle_id`. Nothing was stored.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 502 BAD_GATEWAY: `BAD_GATEWAY`: Apple could not be reached or is throttling; nothing was stored, retry.\n * @see PUT /v1/workspaces/{workspace_id}/channels/apns/credentials\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-channels-apns-credentials\n * @example\n * ```ts\n * const apnsCredential = await notify.channels.apns.uploadCredential({\n * bundle_id: \"com.example.app\",\n * environment: \"sandbox\",\n * key_id: \"ABC123DEFG\",\n * p8: \"string\",\n * team_id: \"DEF123GHIJ\",\n * });\n * ```\n */\n uploadCredential(params: T.ChannelApnUploadCredentialParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ApnsCredential>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/channels/apns/credentials\", body: params, idempotent: true }, options);\n }\n}\n\n/** `channels.fcm` */\nexport class ChannelsFcmResource extends APIResource {\n /**\n * Delete an FCM service account\n *\n * Deletes an FCM credential and erases its private key immediately. Push to Android devices of its project is skipped (`credential_invalid`) until another service account is uploaded.\n *\n * Credential: `bearer`.\n *\n * @param credentialId - Id of the credential.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, CREDENTIAL_NOT_FOUND: `CREDENTIAL_NOT_FOUND`: no FCM credential with this id in the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/channels/fcm/credentials/{credential_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-channels-fcm-credentials-credential-id\n * @example\n * ```ts\n * await notify.channels.fcm.deleteCredential(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n deleteCredential(credentialId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/channels/fcm/credentials/{credential_id}\", pathParams: { credential_id: credentialId } }, options);\n }\n /**\n * Upload an FCM service account\n *\n * Uploads the JSON key of a Google service account for one Firebase project (FCM HTTP v1). You still create the service account and its key in your Google Cloud project; Notify validates it with Google before activating it (an OAuth token request and a `validate_only` message to a placeholder token that reaches no device), stores the private key encrypted and never returns it. Use a dedicated service account with only the \"Firebase Cloud Messaging API Admin\" role: the Firebase Admin SDK account (`firebase-adminsdk-*`) is accepted with a `warnings` entry because it can do far more than send push. An upload replaces the active or invalid credential of the same project (`replaced_credential_ids`) and resumes push for that project if Google had refused the previous one. Uploading the active account again unchanged only re-validates it. Nothing is stored when Google refuses the account or cannot be reached.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelFcmUploadCredentialParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is malformed (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFLICT`: another upload for the same project ran at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID: `CREDENTIAL_INVALID`: the JSON is not a service-account key file, or Google rejected it (deleted account or key, missing Firebase Cloud Messaging role, FCM API not enabled, unknown project). Nothing was stored.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 502 BAD_GATEWAY: `BAD_GATEWAY`: Google could not be reached or is throttling; nothing was stored, retry.\n * @see PUT /v1/workspaces/{workspace_id}/channels/fcm/credentials\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-channels-fcm-credentials\n * @example\n * ```ts\n * const fcmCredential = await notify.channels.fcm.uploadCredential({ service_account: \"string\" });\n * ```\n */\n uploadCredential(params: T.ChannelFcmUploadCredentialParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.FcmCredential>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/channels/fcm/credentials\", body: params, idempotent: true }, options);\n }\n}\n\n/** `channels.webpush` */\nexport class ChannelsWebpushResource extends APIResource {\n /**\n * Generate the web push VAPID key\n *\n * Generates a P-256 key pair for web push (RFC 8292) and returns its public key; the private key is stored encrypted and never returned. If the workspace already has a key, this rotates it and needs `confirm: \"rotate\"`: every existing browser subscription stops working and every web push device is marked `invalid` (`vapid_rotated`) until the browser subscribes again with the new key.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelWebpushGenerateVapidKeysParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFIRMATION_REQUIRED`: the workspace already has a VAPID key and the body has no `confirm: \"rotate\"`; `CONFLICT`: another request changed the key at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-channels-webpush-vapid-keys\n * @example\n * ```ts\n * const vapidKey = await notify.channels.webpush.generateVapidKeys({ confirm: \"rotate\" });\n * ```\n */\n generateVapidKeys(params?: T.ChannelWebpushGenerateVapidKeysParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.VapidKey>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\", body: params, idempotent: true }, options);\n }\n /**\n * Import a web push VAPID key\n *\n * Imports an existing VAPID key pair (for example from another push provider) so subscriptions made with it keep working. The pair is checked to be a matching P-256 pair. The private key is stored encrypted and never returned. Replacing a different existing key needs `confirm: \"rotate\"` (see generate); importing the active pair again changes nothing.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.ChannelWebpushImportVapidKeysParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, CONFIRMATION_REQUIRED: `CONFIRMATION_REQUIRED`: a different key is active and the body has no `confirm: \"rotate\"`; `CONFLICT`: another request changed the key at the same time.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID: `CREDENTIAL_INVALID`: the keys are not base64url P-256 keys, or they are not a matching pair.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-channels-webpush-vapid-keys\n * @example\n * ```ts\n * const vapidKey = await notify.channels.webpush.importVapidKeys({\n * private_key: \"string\",\n * public_key: \"BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U\",\n * });\n * ```\n */\n importVapidKeys(params: T.ChannelWebpushImportVapidKeysParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.VapidKey>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\", body: params }, options);\n }\n /**\n * Get the web push public key\n *\n * The VAPID public key browsers subscribe with (`applicationServerKey`), or `configured: false` before one is generated or imported.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/channels/webpush\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-channels-webpush\n * @example\n * ```ts\n * const webPushChannel = await notify.channels.webpush.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebPushChannel>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/channels/webpush\" }, options);\n }\n}\n\n/** `channels` */\nexport class ChannelsResource extends APIResource {\n #apns?: ChannelsApnsResource;\n #fcm?: ChannelsFcmResource;\n #webpush?: ChannelsWebpushResource;\n get apns(): ChannelsApnsResource {\n return (this.#apns ??= new ChannelsApnsResource(this._client, this._b));\n }\n get fcm(): ChannelsFcmResource {\n return (this.#fcm ??= new ChannelsFcmResource(this._client, this._b));\n }\n get webpush(): ChannelsWebpushResource {\n return (this.#webpush ??= new ChannelsWebpushResource(this._client, this._b));\n }\n /**\n * List channels\n *\n * Whether each channel (inbox, email, push, web push) can deliver now, and the metadata of its credentials. Never returns a secret: credentials show a fingerprint only.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/channels\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-channels\n * @example\n * ```ts\n * const channelList = await notify.channels.list();\n * ```\n */\n list(options?: RequestOptions): APIPromise<T.WithLastResponse<T.ChannelList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/channels\" }, options);\n }\n}\n\n/** `deliveries` */\nexport class DeliveriesResource extends APIResource {\n /**\n * List deliveries\n *\n * Newest first. Filter by `notification_id`, `recipient` (external id), `state` or `channel`. Every skip, retry and failure carries a `reason` with an `explanation`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.DeliveryListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/deliveries\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-deliveries\n * @example\n * ```ts\n * for await (const delivery of notify.deliveries.list()) {\n * console.log(delivery);\n * }\n * const page = await notify.deliveries.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.DeliveryListParams, options?: RequestOptions): PagePromise<T.Delivery> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/deliveries\", query: params }, options);\n }\n /**\n * Get a delivery\n *\n * With every provider attempt (status, code, duration; no message content).\n *\n * Credential: `bearer`.\n *\n * @param deliveryId - The delivery id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, DELIVERY_NOT_FOUND: `DELIVERY_NOT_FOUND`: no delivery with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/deliveries/{delivery_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-deliveries-delivery-id\n * @example\n * ```ts\n * const deliveryDetail = await notify.deliveries.retrieve(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a02\");\n * ```\n */\n retrieve(deliveryId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.DeliveryDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/deliveries/{delivery_id}\", pathParams: { delivery_id: deliveryId } }, options);\n }\n}\n\n/** `export` */\nexport class ExportResource extends APIResource {\n /**\n * Export the configuration\n *\n * Categories, notification types with every template, and settings, in the shapes the create and `PUT /notification-types/by-key/{key}` calls accept: apply it to another workspace to promote a setup. Recipients are exported with `GET /recipients?include=preferences`.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/export\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-export\n * @example\n * ```ts\n * const exportResult = await notify.export.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.Export>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/export\" }, options);\n }\n}\n\n/** `notificationTypes.templates` */\nexport class NotificationTypesTemplatesResource extends APIResource {\n /**\n * Delete a template\n *\n * Deletes the template and its versions. Sends to that channel and locale fall back along the locale chain.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale\n * @example\n * ```ts\n * await notify.notificationTypes.templates.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\");\n * ```\n */\n delete(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\" | \"webhook\", locale: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\", pathParams: { type_id: typeId, channel, locale } }, options);\n }\n /**\n * Get a template\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale\n * @example\n * ```ts\n * const template = await notify.notificationTypes.templates.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\");\n * ```\n */\n retrieve(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\" | \"webhook\", locale: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Template>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\", pathParams: { type_id: typeId, channel, locale } }, options);\n }\n /**\n * Revert a template\n *\n * Restores an earlier version as a new version (audited as `notify.template.reverted`).\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param params - `Notify.NotificationTypeTemplateRevertParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel, malformed locale or version.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND, TEMPLATE_VERSION_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, `TEMPLATE_NOT_FOUND`, or `TEMPLATE_VERSION_NOT_FOUND`: that version is not kept.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale-revert\n * @example\n * ```ts\n * const template = await notify.notificationTypes.templates.revert(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\", { version: 1 });\n * ```\n */\n revert(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\" | \"webhook\", locale: string, params: T.NotificationTypeTemplateRevertParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Template>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert\", pathParams: { type_id: typeId, channel, locale }, body: params }, options);\n }\n /**\n * Create or replace a template\n *\n * Sets the template of one channel and locale. Every change is kept as a version (the last 20); writing the same body again changes nothing. For `email`, the body names a Mail template (`mail_template_name`); setup status reports one that does not exist.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param params - `Notify.NotificationTypeTemplateUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, TEMPLATE_INVALID, UNSAFE_URL, LIMIT_EXCEEDED: `TEMPLATE_INVALID`: a field is missing, unknown or does not parse (the message names it); `UNSAFE_URL`: a URL field is not https; `LIMIT_EXCEEDED`: the template is over 32 KB or the type has 100 templates.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale\n * @example\n * ```ts\n * const template = await notify.notificationTypes.templates.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\", { body: { body: \"We received **{{amount}}**.\", title: \"Invoice {{invoice_id}} paid\" } });\n * ```\n */\n update(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\" | \"webhook\", locale: string, params: T.NotificationTypeTemplateUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Template>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\", pathParams: { type_id: typeId, channel, locale }, body: params }, options);\n }\n /**\n * List a template's versions\n *\n * The last 20 versions, newest first.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param channel - Template channel.\n * @param locale - Template locale (BCP 47).\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/versions\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types-type-id-templates-channel-locale-versions\n * @example\n * ```ts\n * const templateVersionList = await notify.notificationTypes.templates.versions(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"inbox\", \"pt-PT\");\n * ```\n */\n versions(typeId: string, channel: \"inbox\" | \"email\" | \"push\" | \"webpush\" | \"webhook\", locale: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.TemplateVersionList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/versions\", pathParams: { type_id: typeId, channel, locale } }, options);\n }\n}\n\n/** `notificationTypes` */\nexport class NotificationTypesResource extends APIResource {\n #templates?: NotificationTypesTemplatesResource;\n get templates(): NotificationTypesTemplatesResource {\n return (this.#templates ??= new NotificationTypesTemplatesResource(this._client, this._b));\n }\n /**\n * Archive a notification type\n *\n * Archived types cannot be sent (`NOTIFICATION_TYPE_ARCHIVED`); history stays. Archiving twice is a no-op.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/archive\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types-type-id-archive\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.archive(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n archive(typeId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/archive\", pathParams: { type_id: typeId } }, options);\n }\n /**\n * Create a notification type\n *\n * At most 200 types per workspace during the preview. Add templates with `PUT …/templates/{channel}/{locale}`, or create the type and its templates in one call with `PUT /notification-types/by-key/{key}`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationTypeCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, NOTIFICATION_TYPE_KEY_TAKEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `NOTIFICATION_TYPE_KEY_TAKEN`: the key is in use; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR, LIMIT_EXCEEDED: `CATEGORY_NOT_FOUND`: no category with `category_key`; `VALIDATION_ERROR`: the routing is invalid; `LIMIT_EXCEEDED`: the workspace already has 200 types.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.create({ key: \"invoice.paid\" });\n * ```\n */\n create(params: T.NotificationTypeCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types\", body: params, idempotent: true }, options);\n }\n /**\n * List notification types\n *\n * Newest first; archived types only with `include_archived=true`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationTypeListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad parameter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types\n * @example\n * ```ts\n * for await (const notificationType of notify.notificationTypes.list()) {\n * console.log(notificationType);\n * }\n * const page = await notify.notificationTypes.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.NotificationTypeListParams, options?: RequestOptions): PagePromise<T.NotificationType> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types\", query: params }, options);\n }\n /**\n * Preview a notification type\n *\n * Renders every routed channel with sample `data`, or as a real `recipient` (its locale: exact, then language, then the type default; its fields as `recipient.*`). Reports missing variables per channel and variables some channels use but others do not. Sends nothing.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param params - `Notify.NotificationTypePreviewParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, RECIPIENT_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `RECIPIENT_NOT_FOUND`: no recipient with this external id.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/preview\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notification-types-type-id-preview\n * @example\n * ```ts\n * const preview = await notify.notificationTypes.preview(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { data: { amount: \"12.00\", invoice_id: \"inv_123\" } });\n * ```\n */\n preview(typeId: string, params?: T.NotificationTypePreviewParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Preview>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}/preview\", pathParams: { type_id: typeId }, body: params }, options);\n }\n /**\n * Create or replace a notification type by key\n *\n * Types as code: sets the type and its complete template set in one transaction (the shape `GET /export` returns per type). Fields left out take their defaults; templates not listed are deleted; unchanged templates keep their version. Applying the same body again changes nothing, so the call is safe to retry without an `Idempotency-Key`. Use it to promote types from a staging workspace. An archived type stays archived.\n *\n * Credential: `bearer`.\n *\n * @param key - The type key.\n * @param params - `Notify.NotificationTypeReplaceByKeyParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field or template entry is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR, TEMPLATE_INVALID, UNSAFE_URL, LIMIT_EXCEEDED: `CATEGORY_NOT_FOUND`, `VALIDATION_ERROR` (routing), `TEMPLATE_INVALID`, `UNSAFE_URL` or `LIMIT_EXCEEDED` (200 types, 32 KB per template).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/notification-types/by-key/{key}\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-notification-types-by-key-key\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.replaceByKey(\"invoice.paid\", { templates: [{ body: {}, channel: \"inbox\", locale: \"string\" }] });\n * ```\n */\n replaceByKey(key: string, params: T.NotificationTypeReplaceByKeyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/notification-types/by-key/{key}\", pathParams: { key }, body: params }, options);\n }\n /**\n * Get a notification type\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types-type-id\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(typeId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}\", pathParams: { type_id: typeId } }, options);\n }\n /**\n * Update a notification type\n *\n * Changes the fields you send; `routing` is replaced whole. The key cannot change. Changing `critical` is audited with the old and new value.\n *\n * Credential: `bearer`.\n *\n * @param typeId - Id of the type.\n * @param params - `Notify.NotificationTypeUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR: `CATEGORY_NOT_FOUND`: no category with `category_key`; `VALIDATION_ERROR`: the routing is invalid.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/notification-types/{type_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-notification-types-type-id\n * @example\n * ```ts\n * const notificationType = await notify.notificationTypes.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n * approval: { default_expires_in_seconds: 86400, reason: \"optional\", timeout_outcome: \"expired\" },\n * });\n * ```\n */\n update(typeId: string, params?: T.NotificationTypeUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationType>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/notification-types/{type_id}\", pathParams: { type_id: typeId }, body: params }, options);\n }\n}\n\n/** `notifications` */\nexport class NotificationsResource extends APIResource {\n /**\n * Cancel a notification\n *\n * Deliveries still pending, scheduled or retrying end `skipped: cancelled`, and recipients not planned yet are never notified. Delivered messages stay (retract inbox items with `…/retract`). Safe to repeat.\n *\n * Credential: `bearer`.\n *\n * @param notificationId - The notification id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications/{notification_id}/cancel\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-notification-id-cancel\n * @example\n * ```ts\n * const notification = await notify.notifications.cancel(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a01\");\n * ```\n */\n cancel(notificationId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Notification>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications/{notification_id}/cancel\", pathParams: { notification_id: notificationId } }, options);\n }\n /**\n * Cancel notifications by cancellation key\n *\n * Cancels every live notification sent with this `cancellation_key`: deliveries still pending, scheduled or retrying end `skipped: cancelled`. Already delivered messages stay delivered (retract inbox items with `…/retract`). Safe to repeat.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationCancelByKeyParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `cancellation_key` is missing or not 1-255 characters of `A-Z a-z 0-9 . _ : @ | -`.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications/cancel\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-cancel\n * @example\n * ```ts\n * const cancelByKey = await notify.notifications.cancelByKey({ cancellation_key: \"invite.sent:inv_77\" });\n * ```\n */\n cancelByKey(params: T.NotificationCancelByKeyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.CancelByKey>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications/cancel\", body: params }, options);\n }\n /**\n * List notifications (message log)\n *\n * Newest first. Filter by `type`, `tag` (`key:value` or `key`), `tenant` or `cancellation_key`. Pass `next_cursor` as `cursor` until `has_more` is false.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notifications\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notifications\n * @example\n * ```ts\n * for await (const notification of notify.notifications.list()) {\n * console.log(notification);\n * }\n * const page = await notify.notifications.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.NotificationListParams, options?: RequestOptions): PagePromise<T.Notification> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notifications\", query: params }, options);\n }\n /**\n * Retract a notification from inboxes\n *\n * Archives the notification's inbox items for every recipient (for example once an invite is accepted) and updates their unread counts; open inboxes drop the items. Does not cancel other channels (use `…/cancel`). Safe to repeat.\n *\n * Credential: `bearer`.\n *\n * @param notificationId - The notification id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications/{notification_id}/retract\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-notification-id-retract\n * @example\n * ```ts\n * const retract = await notify.notifications.retract(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a01\");\n * ```\n */\n retract(notificationId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Retract>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications/{notification_id}/retract\", pathParams: { notification_id: notificationId } }, options);\n }\n /**\n * Get a notification\n *\n * With its data and the number of deliveries per channel and state.\n *\n * Credential: `bearer`.\n *\n * @param notificationId - The notification id.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/notifications/{notification_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notifications-notification-id\n * @example\n * ```ts\n * const notification = await notify.notifications.retrieve(\"0193a5f2-7c1e-7b3a-9f10-2b6c4d8e9a01\");\n * ```\n */\n retrieve(notificationId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Notification>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/notifications/{notification_id}\", pathParams: { notification_id: notificationId } }, options);\n }\n /**\n * Send a notification\n *\n * Notifies up to 1,000 recipients with one notification type, across the type's channels (in-app inbox, email, push, web push), honouring each recipient's preferences. Returns 202 as soon as the send is stored; delivery happens in the background (see `GET /deliveries`). Unknown external ids do not fail the call: they are listed in `skipped` (`create_missing: true` creates them instead); the call fails only when no recipient can be notified. An `Idempotency-Key` is **required** (a deterministic one built from your event, such as `invoice.paid:inv_123`, is best; dots are fine): the same key and body return the same notification, even when retried much later; the same key with a different body is a 409. `dry_run: true` returns the plan per recipient and channel with the reason for every skip, and stores nothing (200, no key needed). Limits: 3,000 recipients per minute per workspace; 30 notifications per minute per recipient (critical types have a separate 30), beyond which deliveries are skipped as `rate_limited`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.NotificationSendParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, IDEMPOTENCY_KEY_REQUIRED, TOO_MANY_RECIPIENTS: `IDEMPOTENCY_KEY_REQUIRED`: no `Idempotency-Key`; `BAD_REQUEST`: the `Idempotency-Key` is over 256 characters or has a character outside `A-Z a-z 0-9 . _ : -` (the message names it); `TOO_MANY_RECIPIENTS`: over 1,000; `VALIDATION_ERROR`: a field is invalid (an invalid `cancellation_key` included).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no type with this key.\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the key was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {APIError} 413 PAYLOAD_TOO_LARGE, DATA_TOO_LARGE: `DATA_TOO_LARGE`: `data` is over 16 KB.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, RECIPIENT_NOT_FOUND, NOTIFICATION_TYPE_ARCHIVED, TEMPLATE_MISSING, SEND_AT_OUT_OF_RANGE, BATCHED_TYPE_NOT_SCHEDULABLE, APPROVAL_TYPE_SEND_REFUSED, UNSAFE_URL, VALIDATION_ERROR: `RECIPIENT_NOT_FOUND`: no recipient can be notified (`details.skipped` lists why); `NOTIFICATION_TYPE_ARCHIVED`; `TEMPLATE_MISSING`: no template for any requested channel; `SEND_AT_OUT_OF_RANGE`; `BATCHED_TYPE_NOT_SCHEDULABLE`: the type batches (send it now); `APPROVAL_TYPE_SEND_REFUSED`: an approval type, sent with `POST /approvals`; `UNSAFE_URL`; `VALIDATION_ERROR`: a channel outside the type's routing.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 3,000 recipients a minute in this workspace; see `Retry-After`. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/notifications\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications\n * @example\n * ```ts\n * const result = await notify.notifications.send({\n * recipients: [\"user_123\", { email: \"a@example.com\", external_id: \"user_456\", locale: \"pt-PT\" }],\n * type: \"invoice.paid\",\n * });\n * ```\n */\n send(params: T.NotificationSendParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotificationSendResponse>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/notifications\", body: params, idempotent: true }, options);\n }\n}\n\n/** `recipientTokens` */\nexport class RecipientTokensResource extends APIResource {\n /**\n * Mint a recipient token\n *\n * Returns a short-lived token (default 1 hour, at most 24 hours) that lets one recipient read their inbox, register devices, manage their preferences and open the real-time stream through the client API (`/v1/client/…`). Mint it on your backend with your API key after you have signed the user in, and hand it to the app or browser: your secret key never ships in an app. A recipient that does not exist yet is created (with the `upsert` fields if given). Limited to 3,000 mints per minute per workspace: cache a token per user for most of its lifetime. Not idempotent by design (each call returns a fresh token), so it takes no `Idempotency-Key`.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.RecipientTokenMintParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, RECIPIENT_ERASED: `RECIPIENT_ERASED`: the recipient was erased in the last 24 hours (its linked Auth user was deleted).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over the mint limit; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipient-tokens\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipient-tokens\n * @example\n * ```ts\n * const recipientToken = await notify.recipientTokens.mint({ recipient: \"user_123\" });\n * ```\n */\n mint(params: T.RecipientTokenMintParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.RecipientToken>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipient-tokens\", body: params }, options);\n }\n}\n\n/** `recipients.devices` */\nexport class RecipientsDevicesResource extends APIResource {\n /**\n * Register a device\n *\n * Registers an APNs or FCM token, or a browser web push subscription, for the recipient. Registering a token the recipient already has refreshes it (200). A token registered to another recipient of the workspace moves to this one (a shared device signed in as someone else), at most 3 times per token per UTC day. A recipient keeps at most 20 active devices: registering more marks the least recently seen as `pruned` (`evicted`). The token is stored hashed and encrypted; responses show its last 6 characters only.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientDeviceCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id; create it with `PUT` first.\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was already used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, DEVICE_TOKEN_INVALID, WEBPUSH_ENDPOINT_NOT_ALLOWED: `DEVICE_TOKEN_INVALID`: the token or subscription is malformed for its channel (or `environment` is missing for APNs); `WEBPUSH_ENDPOINT_NOT_ALLOWED`: the endpoint is not https on a known push service, or resolves to a private address.\n * @throws {RateLimitError} 429 RATE_LIMITED, DEVICE_MOVE_LIMIT: `DEVICE_MOVE_LIMIT`: the token already moved between recipients 3 times today (UTC); `Retry-After` gives the seconds to midnight UTC. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/devices\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-external-id-devices\n * @example\n * ```ts\n * const device = await notify.recipients.devices.create(\"user_123\", { app_id: \"com.example.app\", channel: \"apns\" });\n * ```\n */\n create(externalId: string, params: T.RecipientDeviceCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Device>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices\", pathParams: { external_id: externalId }, body: params, idempotent: true }, options);\n }\n /**\n * Remove a device\n *\n * Deletes the device (call it when the user signs out on that device). Pushes stop at once.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param deviceId - Id of the device.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND, DEVICE_NOT_FOUND: `RECIPIENT_NOT_FOUND`, or `DEVICE_NOT_FOUND`: the recipient has no device with this id.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/recipients/{external_id}/devices/{device_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-recipients-external-id-devices-device-id\n * @example\n * ```ts\n * await notify.recipients.devices.delete(\"user_123\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(externalId: string, deviceId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices/{device_id}\", pathParams: { external_id: externalId, device_id: deviceId } }, options);\n }\n /**\n * List a recipient's devices\n *\n * Most recently seen first: the active ones (at most 20) and any invalid or pruned ones not yet reaped (kept 7 days).\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/devices\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-devices\n * @example\n * ```ts\n * const deviceList = await notify.recipients.devices.list(\"user_123\");\n * ```\n */\n list(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.DeviceList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices\", pathParams: { external_id: externalId } }, options);\n }\n}\n\n/** `recipients.inbox` */\nexport class RecipientsInboxResource extends APIResource {\n /**\n * List a recipient's inbox items\n *\n * What the recipient sees in their in-app inbox, newest first, with their unseen and unread counts. `status` picks active (default), archived or all items. Read-only: recipients mark items through the client API.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientInboxListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/inbox\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-inbox\n * @example\n * ```ts\n * for await (const inbox of notify.recipients.inbox.list(\"user_123\")) {\n * console.log(inbox);\n * }\n * const page = await notify.recipients.inbox.list(\"user_123\", {}, { timeout: 5_000 });\n * ```\n */\n list(externalId: string, params?: T.RecipientInboxListParams, options?: RequestOptions): PagePromise<T.InboxItem> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/inbox\", pathParams: { external_id: externalId }, query: params }, options);\n }\n}\n\n/** `recipients.preferences` */\nexport class RecipientsPreferencesResource extends APIResource {\n /**\n * Replace a recipient's preferences\n *\n * Sets the complete set of cells: cells you leave out are removed. Most specific wins when sending: type × channel, type × `*`, category × channel, category × `*`, all × channel, then the category default. Calling it again with the same body changes nothing.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientPreferenceReplaceParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a cell is malformed or repeated.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, PREFERENCE_LOCKED: `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: a cell names an unknown key; `PREFERENCE_LOCKED`: the channel is mandatory for that category and cannot be turned off.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-recipients-external-id-preferences\n * @example\n * ```ts\n * const preferenceSet = await notify.recipients.preferences.replace(\"user_123\", { preferences: [{ channel: \"inbox\", enabled: true, scope: \"all\" }] });\n * ```\n */\n replace(externalId: string, params: T.RecipientPreferenceReplaceParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceSet>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\", pathParams: { external_id: externalId }, body: params }, options);\n }\n /**\n * Get a recipient's preferences\n *\n * The cells the recipient set, unsubscribe-all, time zone and quiet hours. Anything not set follows the category defaults.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-preferences\n * @example\n * ```ts\n * const preferenceSet = await notify.recipients.preferences.retrieve(\"user_123\");\n * ```\n */\n retrieve(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceSet>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Update a recipient's preferences\n *\n * Sets or removes (`enabled: null`) the cells you send and keeps the others; also sets unsubscribe-all, time zone and quiet hours.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientPreferenceUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a cell is malformed or repeated.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, PREFERENCE_LOCKED: `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: a cell names an unknown key; `PREFERENCE_LOCKED`: the channel is mandatory for that category and cannot be turned off.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-recipients-external-id-preferences\n * @example\n * ```ts\n * const preferenceSet = await notify.recipients.preferences.update(\"user_123\", { preferences: [{ channel: \"inbox\", enabled: true, key: \"billing\", scope: \"all\" }] });\n * ```\n */\n update(externalId: string, params?: T.RecipientPreferenceUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceSet>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\", pathParams: { external_id: externalId }, body: params }, options);\n }\n}\n\n/** `recipients` */\nexport class RecipientsResource extends APIResource {\n #devices?: RecipientsDevicesResource;\n #inbox?: RecipientsInboxResource;\n #preferences?: RecipientsPreferencesResource;\n get devices(): RecipientsDevicesResource {\n return (this.#devices ??= new RecipientsDevicesResource(this._client, this._b));\n }\n get inbox(): RecipientsInboxResource {\n return (this.#inbox ??= new RecipientsInboxResource(this._client, this._b));\n }\n get preferences(): RecipientsPreferencesResource {\n return (this.#preferences ??= new RecipientsPreferencesResource(this._client, this._b));\n }\n /**\n * Create or update up to 1,000 recipients\n *\n * Upserts each row like `PUT /recipients/{external_id}`, with its devices. Rows are independent: a bad row is reported in `data` with `status: error` and its code, and never fails the rest. Rows are written in order of external id, in transactions of at most 200. At most 20 calls per minute per workspace (20,000 recipients) and 4 MB per request. Each row may carry its complete `preferences` set (as `PUT …/preferences`); a bad cell fails only its row. Send an `Idempotency-Key` so a retried import replays its first result.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.RecipientBulkIdentifyParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `recipients` is missing, empty or longer than 1,000.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was already used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: more than 20 bulk calls in a minute; see `Retry-After`. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/bulk\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-bulk\n * @example\n * ```ts\n * const bulkUpsertRecipients = await notify.recipients.bulkIdentify({ recipients: [{ external_id: \"user_123\" }] });\n * ```\n */\n bulkIdentify(params: T.RecipientBulkIdentifyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.BulkUpsertRecipients>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/bulk\", body: params, idempotent: true }, options);\n }\n /**\n * Create a hosted preference page link\n *\n * Returns a signed link to a page, hosted by Notify in your workspace's branding (`branding` in settings), where this recipient switches each category on or off per channel, sets quiet hours and a time zone, or unsubscribes from everything except critical types. It needs no sign-in, so it works from any email, also for people who never open your app. The link is valid for 365 days. Changes are recorded in the recipient's consent history with source `hosted_page`. Each call returns a fresh link and changes nothing, so it takes no `Idempotency-Key`.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientCreatePreferenceLinkParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `category_key` is malformed.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.recipient.write`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this key.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-external-id-preference-link\n * @example\n * ```ts\n * const preferenceLink = await notify.recipients.createPreferenceLink(\"user_123\", { category_key: \"product-updates\" });\n * ```\n */\n createPreferenceLink(externalId: string, params?: T.RecipientCreatePreferenceLinkParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.PreferenceLink>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link\", pathParams: { external_id: externalId }, body: params }, options);\n }\n /**\n * Erase a recipient (GDPR)\n *\n * Deletes the recipient and everything Notify holds for it: devices now, and preferences, inbox items and pending deliveries as those land. Delivery history keeps ids and states but loses addresses and rendered text. The data is gone when this returns; the external id can be used again. Email already handed to ProductCraft Mail stays in Mail's message log under Mail's retention.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipientErasure = await notify.recipients.delete(\"user_123\");\n * ```\n */\n delete(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.RecipientErasure>> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Create or update a recipient\n *\n * Creates the recipient with this external id, or updates it. Fields you leave out keep their stored value; `null` clears one; `properties` is replaced whole. Calling it again with the same body leaves the same recipient, so a retry is safe without an `Idempotency-Key` (the route does not take one).\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientIdentifyParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, AUTH_USER_ALREADY_LINKED: `AUTH_USER_ALREADY_LINKED`: the Auth end user is linked to another recipient of the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#put-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipient = await notify.recipients.identify(\"user_123\", { auth_user_id: \"9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b\" });\n * ```\n */\n identify(externalId: string, params?: T.RecipientIdentifyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Recipient>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId }, body: params }, options);\n }\n /**\n * List recipients\n *\n * Newest first. Filter by `email` (case-insensitive), `auth_user_id`, or `updated_since` for an incremental sync. Pass `next_cursor` as `cursor` until `has_more` is false. `include=preferences` adds each recipient's preference cells (an export of consent).\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.RecipientListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients\n * @example\n * ```ts\n * for await (const recipient of notify.recipients.list()) {\n * console.log(recipient);\n * }\n * const page = await notify.recipients.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.RecipientListParams, options?: RequestOptions): PagePromise<T.Recipient> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients\", query: params }, options);\n }\n /**\n * Get a recipient\n *\n * The profile; devices are under `…/devices`.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipient = await notify.recipients.retrieve(\"user_123\");\n * ```\n */\n retrieve(externalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Recipient>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Revoke a recipient's tokens\n *\n * Every recipient token minted for this recipient so far stops working on its next call (`401 RECIPIENT_TOKEN_INVALID`), open real-time streams included. Tokens you mint afterwards work. Use it when the user signs out everywhere or you suspect a token leaked. Calling it again is harmless.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokens\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-external-id-revoke-tokens\n * @example\n * ```ts\n * await notify.recipients.revokeTokens(\"user_123\");\n * ```\n */\n revokeTokens(externalId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokens\", pathParams: { external_id: externalId } }, options);\n }\n /**\n * Get a recipient's delivery timeline\n *\n * Every delivery to this recipient across notifications, newest first, with the reason for each skip or failure, the device's state and its last successful delivery; the first page also lists device token moves in and out of the recipient.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientTimelineParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `BAD_REQUEST`: invalid cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/timeline\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients-external-id-timeline\n * @example\n * ```ts\n * for await (const recipient of notify.recipients.timeline(\"user_123\")) {\n * console.log(recipient);\n * }\n * const page = await notify.recipients.timeline(\"user_123\", {}, { timeout: 5_000 });\n * ```\n */\n timeline(externalId: string, params?: T.RecipientTimelineParams, options?: RequestOptions): PagePromise<T.TimelineEntry> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}/timeline\", pathParams: { external_id: externalId }, query: params }, options);\n }\n /**\n * Update a recipient\n *\n * Changes the fields you send on an existing recipient (404 when there is none; use `PUT` to create). `null` clears a field.\n *\n * Credential: `bearer`.\n *\n * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.\n * @param params - `Notify.RecipientUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.\n * @throws {ConflictError} 409 CONFLICT, AUTH_USER_ALREADY_LINKED: `AUTH_USER_ALREADY_LINKED`: the Auth end user is linked to another recipient of the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-recipients-external-id\n * @example\n * ```ts\n * const recipient = await notify.recipients.update(\"user_123\", { auth_user_id: \"9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b\" });\n * ```\n */\n update(externalId: string, params?: T.RecipientUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Recipient>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/recipients/{external_id}\", pathParams: { external_id: externalId }, body: params }, options);\n }\n}\n\n/** `settings` */\nexport class SettingsResource extends APIResource {\n /**\n * Get Notify settings\n *\n * Email on/off and, after an automatic pause, when and why email was paused; the default time zone and quiet hours for recipients without their own.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/settings\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-settings\n * @example\n * ```ts\n * const notifySettings = await notify.settings.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotifySettings>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/settings\" }, options);\n }\n /**\n * Revoke every recipient token\n *\n * Every recipient token of the workspace stops working on its next call (`401 RECIPIENT_TOKEN_INVALID`), open real-time streams included; your apps get a new token from your backend. Use it after a suspected leak of many tokens.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/settings/revoke-all-tokens\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-settings-revoke-all-tokens\n * @example\n * ```ts\n * await notify.settings.revokeAllTokens();\n * ```\n */\n revokeAllTokens(options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/settings/revoke-all-tokens\" }, options);\n }\n /**\n * Update Notify settings\n *\n * Turn email on or off, set the default time zone and quiet hours (`null` clears either), replace the browser origins allowed on the client API (`client_origins`), or resume email after an automatic pause with `{ \"email_paused\": false }`. Resuming starts a fresh pause window: only emails sent after it count. Fix the cause first (where the addresses come from, whether people expect the email), or the next complaints pause it again. Calling it again with the same body changes nothing.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.SettingsUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/settings\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-settings\n * @example\n * ```ts\n * const notifySettings = await notify.settings.update({\n * branding: {\n * accent_color: \"#4f46e5\",\n * logo_url: \"https://acme.example/logo.png\",\n * name: \"Acme\",\n * privacy_url: \"https://acme.example/privacy\",\n * },\n * });\n * ```\n */\n update(params?: T.SettingsUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotifySettings>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/settings\", body: params }, options);\n }\n}\n\n/** `setupStatus` */\nexport class SetupStatusResource extends APIResource {\n /**\n * Get the setup checklist for Notify: what works, what is missing, and where to fix it.\n *\n * Rows, in order: `notification_type` (not_set until an active type exists), `email` (attention while email is off, blocked while Notify has paused it), and, once a type uses email, `mail_sender` (the Mail workspace default sender: pass when its domain is verified) and `email_templates` (every Mail template name your types use exists in Mail). Notify sends email through ProductCraft Mail and holds no credential for it: Mail is read with your own access, so a key without Mail read access shows those rows as `attention`. `complete` is true once no row is `not_set` or `blocked`. Each `fix.href` is a console path. Computed on every request.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.channel.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/setup-status\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-setup-status\n * @example\n * ```ts\n * const setupStatus = await notify.setupStatus.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.SetupStatus>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/setup-status\" }, options);\n }\n}\n\n/** `stats` */\nexport class StatsResource extends APIResource {\n /**\n * Get Notify stats\n *\n * Daily delivery counts per channel for a range of UTC days (default the last 30, at most 90): planned, sent, delivered, failed, skipped, and inbox items read. Counted by the day a delivery was planned, from an hourly rollup: today and yesterday are refreshed every hour, so the newest counts can be up to an hour old (`updated_at`). Kept beyond the 30 days that delivery history is kept.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.StatsRetrieveParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a date is invalid, `from` is after `to`, or the range is longer than 90 days.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.message.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/stats\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-stats\n * @example\n * ```ts\n * const notifyStats = await notify.stats.retrieve();\n * ```\n */\n retrieve(params?: T.StatsRetrieveParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.NotifyStats>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/stats\", query: params }, options);\n }\n}\n\n/** `webhooks.endpoints` */\nexport class WebhooksEndpointsResource extends APIResource {\n /**\n * Add a webhook endpoint. Returns its signing secret once.\n *\n * Deliveries are signed with the Standard Webhooks headers `webhook-id`, `webhook-timestamp` and `webhook-signature` (`v1,<base64 HMAC-SHA256 of \"<id>.<timestamp>.<body>\">`); the returned `whsec_…` secret works unchanged with any Standard Webhooks library. Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.WebhookEndpointCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, WEBHOOK_EVENT_TYPE_UNKNOWN: Validation failure: URL not https with a public host, or an unknown event type (`WEBHOOK_EVENT_TYPE_UNKNOWN`).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_LIMIT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Already 10 endpoints (`WEBHOOK_ENDPOINT_LIMIT`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The URL points at a private, loopback or internal address.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.create({ url: \"https://api.acme.com/webhooks\" });\n * ```\n */\n create(params: T.WebhookEndpointCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpointWithSecret>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints\", body: params, idempotent: true }, options);\n }\n /**\n * Delete a webhook endpoint.\n *\n * Queued retries are dropped. Its past attempts stay in the event log until the events expire.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * await notify.webhooks.endpoints.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(endpointId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId } }, options);\n }\n /**\n * List webhook endpoints, oldest first.\n *\n * At most 10, so this is always one page. Signing secrets are never returned here, only their last 4 characters.\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: The scope id in the path is malformed.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints\n * @example\n * ```ts\n * for await (const endpoint of notify.webhooks.endpoints.list()) {\n * console.log(endpoint);\n * }\n * ```\n */\n list(options?: RequestOptions): PagePromise<T.WebhookEndpoint> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints\" }, options);\n }\n /**\n * Get one webhook endpoint (without its secret).\n *\n * The endpoint's URL, subscription, on/off state, failure streak and the last 4 characters of its signing secret. The full secret is only returned when the endpoint is created or its secret is rotated.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(endpointId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpoint>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId } }, options);\n }\n /**\n * Rotate the signing secret. The new one is returned once.\n *\n * For `grace_hours` (default 24) the previous secret keeps signing too: `webhook-signature` then lists one `v1,` signature per secret, so receivers can switch over without dropping a delivery.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Notify.WebhookEndpointRotateSecretParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `grace_hours` out of range, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-rotate-secret\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.rotateSecret(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { grace_hours: 24 });\n * ```\n */\n rotateSecret(endpointId: string, params?: T.WebhookEndpointRotateSecretParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpointWithSecret>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n /**\n * Send a test event to this endpoint now and return the result.\n *\n * Delivers the catalogue example of `event_type`, signed like any delivery, with `\"test\": true` in the body. Works while the endpoint is switched off or not subscribed to that type, is logged in the event log, and is never retried or counted toward an automatic disable. Waits up to 15 s for your receiver.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Notify.WebhookEndpointTestParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Unknown `event_type`, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-test\n * @example\n * ```ts\n * const webhookDeliveryAttempt = await notify.webhooks.endpoints.test(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { event_type: \"notification.accepted\" });\n * ```\n */\n test(endpointId: string, params: T.WebhookEndpointTestParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookDeliveryAttempt>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n /**\n * Change a webhook endpoint: URL, description, events, on/off.\n *\n * Only the fields sent change. `enabled: true` (or a new URL) also clears an automatic disable. Switching off cancels queued retries. The secret is unchanged; rotate it with `POST …/rotate-secret`.\n *\n * Credential: `bearer`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Notify.WebhookEndpointUpdateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Validation failure, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The new URL points at a private, loopback or internal address.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * const webhookEndpoint = await notify.webhooks.endpoints.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { description: \"Production receiver\" });\n * ```\n */\n update(endpointId: string, params?: T.WebhookEndpointUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpoint>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n}\n\n/** `webhooks.eventTypes` */\nexport class WebhooksEventTypesResource extends APIResource {\n /**\n * List the events an endpoint can subscribe to.\n *\n * Each type with a plain description, its group and an example `data` object (what \"Send test\" delivers).\n *\n * Credential: `bearer`.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/event-types\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-event-types\n * @example\n * ```ts\n * const webhookEventTypeList = await notify.webhooks.eventTypes.list();\n * ```\n */\n list(options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventTypeList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/event-types\" }, options);\n }\n}\n\n/** `webhooks.events` */\nexport class WebhooksEventsResource extends APIResource {\n /**\n * List webhook events, newest first (kept for 30 days).\n *\n * Every event logged while at least one endpoint existed, with the latest state per endpoint and when the next retry is due.\n *\n * Credential: `bearer`.\n *\n * @param params - `Notify.WebhookEventListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Invalid filter value or cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/events\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-events\n * @example\n * ```ts\n * for await (const event of notify.webhooks.events.list()) {\n * console.log(event);\n * }\n * const page = await notify.webhooks.events.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.WebhookEventListParams, options?: RequestOptions): PagePromise<T.WebhookEvent> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/events\", query: params }, options);\n }\n /**\n * Send a logged event again, to its endpoints or to one endpoint.\n *\n * Same body and `webhook-id`, freshly signed, to every switched-on endpoint that receives this event type now, or only to `endpoint_id`. Waits for the receivers (up to 15 s each) and returns the attempts. A success cancels a retry still queued for that endpoint.\n *\n * Credential: `bearer`.\n *\n * @param eventId - The event id, `evt_<uuid>`.\n * @param params - `Notify.WebhookEventReplayParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. Or No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_NOT_SUBSCRIBED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `endpoint_id` is switched off or does not receive this event type (`WEBHOOK_ENDPOINT_NOT_SUBSCRIBED`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-webhooks-events-event-id-replay\n * @example\n * ```ts\n * const webhookEventReplay = await notify.webhooks.events.replay(\"3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b\");\n * ```\n */\n replay(eventId: string, params?: T.WebhookEventReplayParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventReplay>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\", pathParams: { event_id: eventId }, query: params, idempotent: true }, options);\n }\n /**\n * Get one webhook event with every delivery attempt.\n *\n * The event as it was sent (`type`, `data`) and every delivery attempt to every endpoint, with its trigger, HTTP status, error and the start of the response body. Use it to debug a receiver, then `replay` to send it again.\n *\n * Credential: `bearer`.\n *\n * @param eventId - The event id, `evt_<uuid>`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/events/{event_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-events-event-id\n * @example\n * ```ts\n * const webhookEventDetail = await notify.webhooks.events.retrieve(\"3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b\");\n * ```\n */\n retrieve(eventId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}\", pathParams: { event_id: eventId } }, options);\n }\n}\n\n/** `webhooks` */\nexport class WebhooksResource extends APIResource {\n #endpoints?: WebhooksEndpointsResource;\n #eventTypes?: WebhooksEventTypesResource;\n #events?: WebhooksEventsResource;\n get endpoints(): WebhooksEndpointsResource {\n return (this.#endpoints ??= new WebhooksEndpointsResource(this._client, this._b));\n }\n get eventTypes(): WebhooksEventTypesResource {\n return (this.#eventTypes ??= new WebhooksEventTypesResource(this._client, this._b));\n }\n get events(): WebhooksEventsResource {\n return (this.#events ??= new WebhooksEventsResource(this._client, this._b));\n }\n /**\n * Verify a webhook's signature and parse it (Standard Webhooks, and the legacy `t=…,v1=…` scheme).\n *\n * @param params - The raw body, the request headers and optionally the secret.\n * @throws {WebhookVerificationError} The signature, timestamp or payload is invalid.\n * @throws {ConfigurationError} No secret was passed or configured.\n */\n unwrap(params: WebhookUnwrapParams): Promise<UnwrapWebhookEvent> {\n return this._client.unwrapWebhook<UnwrapWebhookEvent>(params, \"PRODUCTCRAFT_NOTIFY_WEBHOOK_SECRET\");\n }\n /**\n * Sign a test event the way ProductCraft signs deliveries (Standard Webhooks), so a handler\n * test can call `unwrap` without a live delivery. Returns the exact body and the headers.\n *\n * @param params - The event (an object is JSON-encoded), and optionally the secret, `id` and `timestamp`.\n * @throws {ConfigurationError} No secret was passed or configured.\n */\n sign(params: WebhookSignParams): Promise<SignedWebhook> {\n return this._client.signWebhook(params, \"PRODUCTCRAFT_NOTIFY_WEBHOOK_SECRET\");\n }\n}\n\n/** `notify` */\nexport class NotifyResources extends APIResource {\n #approvals?: ApprovalsResource;\n #batches?: BatchesResource;\n #categories?: CategoriesResource;\n #channels?: ChannelsResource;\n #deliveries?: DeliveriesResource;\n #export?: ExportResource;\n #notificationTypes?: NotificationTypesResource;\n #notifications?: NotificationsResource;\n #recipientTokens?: RecipientTokensResource;\n #recipients?: RecipientsResource;\n #settings?: SettingsResource;\n #setupStatus?: SetupStatusResource;\n #stats?: StatsResource;\n #webhooks?: WebhooksResource;\n get approvals(): ApprovalsResource {\n return (this.#approvals ??= new ApprovalsResource(this._client, this._b));\n }\n get batches(): BatchesResource {\n return (this.#batches ??= new BatchesResource(this._client, this._b));\n }\n get categories(): CategoriesResource {\n return (this.#categories ??= new CategoriesResource(this._client, this._b));\n }\n get channels(): ChannelsResource {\n return (this.#channels ??= new ChannelsResource(this._client, this._b));\n }\n get deliveries(): DeliveriesResource {\n return (this.#deliveries ??= new DeliveriesResource(this._client, this._b));\n }\n get export(): ExportResource {\n return (this.#export ??= new ExportResource(this._client, this._b));\n }\n get notificationTypes(): NotificationTypesResource {\n return (this.#notificationTypes ??= new NotificationTypesResource(this._client, this._b));\n }\n get notifications(): NotificationsResource {\n return (this.#notifications ??= new NotificationsResource(this._client, this._b));\n }\n get recipientTokens(): RecipientTokensResource {\n return (this.#recipientTokens ??= new RecipientTokensResource(this._client, this._b));\n }\n get recipients(): RecipientsResource {\n return (this.#recipients ??= new RecipientsResource(this._client, this._b));\n }\n get settings(): SettingsResource {\n return (this.#settings ??= new SettingsResource(this._client, this._b));\n }\n get setupStatus(): SetupStatusResource {\n return (this.#setupStatus ??= new SetupStatusResource(this._client, this._b));\n }\n get stats(): StatsResource {\n return (this.#stats ??= new StatsResource(this._client, this._b));\n }\n get webhooks(): WebhooksResource {\n return (this.#webhooks ??= new WebhooksResource(this._client, this._b));\n }\n}\n\n/** `approvals` */\nexport class ClientApprovalsResource extends APIResource {\n /**\n * Answer an approval request\n *\n * Approve or reject, with an optional reason (required when the type says so). The first answer of any approver decides; the requester gets the signed `approval.resolved` webhook. Answering again, or after the request expired, is a 409.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param approvalId - Id of the approval.\n * @param params - `Notify.MeApprovalDecideParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `decision` must be `approve` or `reject`.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, APPROVAL_NOT_FOUND: `APPROVAL_NOT_FOUND`: no such request for this recipient.\n * @throws {ConflictError} 409 CONFLICT, APPROVAL_NOT_PENDING: `APPROVAL_NOT_PENDING`: already answered, expired or cancelled.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, APPROVAL_REASON_REQUIRED: `APPROVAL_REASON_REQUIRED`: a reason is required.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/approvals/{approval_id}/decision\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-approvals-approval-id-decision\n * @example\n * ```ts\n * const approval = await notify.client({ token: \"rt_example_recipient_token\" }).approvals.decide(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { decision: \"approve\" });\n * ```\n */\n decide(approvalId: string, params: T.MeApprovalDecideParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Approval>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/approvals/{approval_id}/decision\", pathParams: { approval_id: approvalId }, body: params }, options);\n }\n /**\n * Get an approval request\n *\n * One request the recipient was asked to answer: the question, who asked, its status and, once decided, who answered and why.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param approvalId - Id of the approval.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, APPROVAL_NOT_FOUND: `APPROVAL_NOT_FOUND`: no such request for this recipient.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/approvals/{approval_id}\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-approvals-approval-id\n * @example\n * ```ts\n * const approval = await notify.client({ token: \"rt_example_recipient_token\" }).approvals.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(approvalId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Approval>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/approvals/{approval_id}\", pathParams: { approval_id: approvalId } }, options);\n }\n}\n\n/** `devices` */\nexport class ClientDevicesResource extends APIResource {\n /**\n * Remove this device\n *\n * Call it when the user signs out on the device: pushes to it stop at once.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param deviceId - Id of the device.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, DEVICE_NOT_FOUND: `DEVICE_NOT_FOUND`: the recipient has no device with this id.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/client/devices/{device_id}\n * @see https://productcraft.co/docs/notify/api-reference#delete-v1-client-devices-device-id\n * @example\n * ```ts\n * await notify.client({ token: \"rt_example_recipient_token\" }).devices.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(deviceId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/client/devices/{device_id}\", pathParams: { device_id: deviceId } }, options);\n }\n /**\n * Register this device\n *\n * Registers the app's APNs or FCM token, or the browser's web push subscription, for the signed-in recipient (call it on every app start; the same token again refreshes it). A token registered to another recipient moves to this one, at most 3 times per token per UTC day; a recipient registers at most 10 times per hour. Call `DELETE /v1/client/devices/{device_id}` when the user signs out on this device. Safe to repeat, so it takes no `Idempotency-Key`.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MeDeviceRegisterParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, DEVICE_TOKEN_INVALID, WEBPUSH_ENDPOINT_NOT_ALLOWED: `DEVICE_TOKEN_INVALID`: the token or subscription is malformed for its channel (or `environment` is missing for APNs); `WEBPUSH_ENDPOINT_NOT_ALLOWED`: the endpoint is not https on a known push service.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/devices\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-devices\n * @example\n * ```ts\n * const device = await notify.client({ token: \"rt_example_recipient_token\" }).devices.register({ app_id: \"com.example.app\", channel: \"apns\" });\n * ```\n */\n register(params: T.MeDeviceRegisterParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Device>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/devices\", body: params }, options);\n }\n}\n\n/** `inbox` */\nexport class ClientInboxResource extends APIResource {\n /**\n * Get the inbox counts\n *\n * Unseen and unread counts for the badge, cheap enough to poll every 30 seconds or more when the real-time stream is not available. Send the last `ETag` as `If-None-Match` to get `304` while nothing changed.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/inbox/counts\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-inbox-counts\n * @example\n * ```ts\n * const inboxCounts = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.counts();\n * ```\n */\n counts(options?: RequestOptions): APIPromise<T.WithLastResponse<T.InboxCounts>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/inbox/counts\" }, options);\n }\n /**\n * Record a press on an inbox item\n *\n * Call it when the recipient presses the item or one of its buttons (`action_key`). Marks the item seen and read, records `interacted_at` and the key, and sends the `inbox_item.interacted` webhook so your backend can act on it (for example \"Accept invite\"). Repeating the same press changes nothing.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param itemId - Id of the item.\n * @param params - `Notify.MeInboxInteractParams`.\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, INBOX_ITEM_NOT_FOUND: `INBOX_ITEM_NOT_FOUND`: the recipient has no item with this id (or it was retracted).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, VALIDATION_ERROR: `VALIDATION_ERROR`: the item has no button with this `action_key`.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/inbox/{item_id}/interact\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-inbox-item-id-interact\n * @example\n * ```ts\n * const inboxItem = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.interact(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { action_key: \"accept\" });\n * ```\n */\n interact(itemId: string, params?: T.MeInboxInteractParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.InboxItem>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/inbox/{item_id}/interact\", pathParams: { item_id: itemId }, body: params }, options);\n }\n /**\n * List the inbox\n *\n * The recipient's in-app inbox, newest first, with the unseen and unread counts for the badge. Active items by default; `archived=true` lists the archived ones. Items the sender retracted are left out.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MeInboxListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a query parameter is invalid, or the cursor is not one this route returned.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/inbox\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-inbox\n * @example\n * ```ts\n * for await (const inbox of notify.client({ token: \"rt_example_recipient_token\" }).inbox.list()) {\n * console.log(inbox);\n * }\n * const page = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.MeInboxListParams, options?: RequestOptions): PagePromise<T.InboxItem> {\n return this._client.list({ method: \"GET\", path: \"/v1/client/inbox\", query: params }, options);\n }\n /**\n * Mark inbox items\n *\n * Marks up to 100 items (`ids`), or every item up to and including `before_id` (\"mark all as read\"), as `seen`, `read`, `unread`, `archived` or `unarchived`, and returns the new counts. Marking `read` also marks seen. Open streams get `item.updated` and `counts`. Safe to repeat: items already in that state do not change.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MeInboxMarkParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid, or not exactly one of `ids` and `before_id` was given.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/client/inbox/mark\n * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-inbox-mark\n * @example\n * ```ts\n * const markInboxResult = await notify.client({ token: \"rt_example_recipient_token\" }).inbox.mark({ action: \"seen\" });\n * ```\n */\n mark(params: T.MeInboxMarkParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.MarkInboxResult>> {\n return this._client.request({ method: \"POST\", path: \"/v1/client/inbox/mark\", body: params }, options);\n }\n}\n\n/** `preferences` */\nexport class ClientPreferencesResource extends APIResource {\n /**\n * Get my preferences\n *\n * The workspace's categories with their per-channel defaults (`mandatory` channels cannot be turned off: show them read-only), the cells the recipient set, and their time zone and quiet hours.\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/preferences\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-preferences\n * @example\n * ```ts\n * const clientPreferences = await notify.client({ token: \"rt_example_recipient_token\" }).preferences.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.ClientPreferences>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/preferences\" }, options);\n }\n /**\n * Update my preferences\n *\n * Sets or (with `enabled: null`) removes individual cells, and the time zone, quiet hours and unsubscribe-all. Cells you leave out are kept, so two open tabs cannot overwrite each other. Every change is recorded as consent evidence (source `recipient_token`).\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param params - `Notify.MePreferenceUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, PREFERENCE_LOCKED, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `PREFERENCE_LOCKED`: the channel is mandatory for the category; `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: no category or type with that key.\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/client/preferences\n * @see https://productcraft.co/docs/notify/api-reference#patch-v1-client-preferences\n * @example\n * ```ts\n * const clientPreferences = await notify.client({ token: \"rt_example_recipient_token\" }).preferences.update({ preferences: [{ channel: \"inbox\", enabled: true, key: \"billing\", scope: \"all\" }] });\n * ```\n */\n update(params?: T.MePreferenceUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ClientPreferences>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/client/preferences\", body: params }, options);\n }\n}\n\n/** `webpush` */\nexport class ClientWebpushResource extends APIResource {\n /**\n * Get the web push key\n *\n * The VAPID public key the browser subscribes with (`pushManager.subscribe({ applicationServerKey })`).\n *\n * Credential: `recipient_token`.\n * - `recipient_token`: A recipient token minted by your backend with `POST /v1/workspaces/{workspace_id}/recipient-tokens`. Only the client API (`/v1/client/…`) accepts it.\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.\n * @throws {NotFoundError} 404 NOT_FOUND, CHANNEL_NOT_CONFIGURED: `CHANNEL_NOT_CONFIGURED`: the workspace has no web push key yet (generate one in the console or with `POST /channels/webpush/vapid-keys`).\n * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/client/webpush/vapid-public-key\n * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-webpush-vapid-public-key\n * @example\n * ```ts\n * const vapidPublicKey = await notify.client({ token: \"rt_example_recipient_token\" }).webpush.vapidPublicKey();\n * ```\n */\n vapidPublicKey(options?: RequestOptions): APIPromise<T.WithLastResponse<T.VapidPublicKey>> {\n return this._client.request({ method: \"GET\", path: \"/v1/client/webpush/vapid-public-key\" }, options);\n }\n}\n\n/** `notify.client(…)`: Browser- and app-safe calls for one recipient (inbox, devices, preferences), authenticated by the short-lived recipient token your backend mints with `recipientTokens.mint`. Sends only that token, never an API key. */\nexport class NotifyClient extends APIResource {\n #approvals?: ClientApprovalsResource;\n #devices?: ClientDevicesResource;\n #inbox?: ClientInboxResource;\n #preferences?: ClientPreferencesResource;\n #webpush?: ClientWebpushResource;\n get approvals(): ClientApprovalsResource {\n return (this.#approvals ??= new ClientApprovalsResource(this._client, this._b));\n }\n get devices(): ClientDevicesResource {\n return (this.#devices ??= new ClientDevicesResource(this._client, this._b));\n }\n get inbox(): ClientInboxResource {\n return (this.#inbox ??= new ClientInboxResource(this._client, this._b));\n }\n get preferences(): ClientPreferencesResource {\n return (this.#preferences ??= new ClientPreferencesResource(this._client, this._b));\n }\n get webpush(): ClientWebpushResource {\n return (this.#webpush ??= new ClientWebpushResource(this._client, this._b));\n }\n}\n","// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nimport type { LastResponse } from \"@productcraft/core\";\nimport type { components, paths } from \"./paths.js\";\n\ntype IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : never;\ntype OpenString<T extends string> = string extends T ? T : true extends IsUnion<T> ? T | (string & {}) : T;\ntype OpenValue<T> = [T] extends [string] ? OpenString<T> : T extends readonly (infer I)[] ? (OpenValue<Exclude<I, null | undefined>> | Extract<I, null | undefined>)[] : T extends object ? { [K in keyof T]: OpenValue<Exclude<T[K], null | undefined>> | Extract<T[K], null | undefined> } : T;\n/** A response type: string-literal unions also accept values added after this SDK was built. */\nexport type Open<T> = OpenValue<Exclude<T, null | undefined>> | Extract<T, null | undefined>;\n/** What a method resolves to: the parsed body plus non-enumerable `lastResponse`. */\nexport type WithLastResponse<T> = T & { readonly lastResponse: LastResponse };\n/** Params inside a scope bound with `.as(actorId)`: `actor_id` may be left out. */\nexport type WithOptionalActor<P> = P extends { actor_id: unknown } ? Omit<P, \"actor_id\"> & { actor_id?: P[\"actor_id\"] } : P;\n/** A polled model whose free-form `K` the caller types as `R` (`createAndPoll<R>`); optional and nullable stay as declared. */\nexport type WithResult<M, K extends keyof M, R> = Omit<M, K> & { [P in keyof M as P extends K ? P : never]: R | Extract<M[P], null> };\n\nexport type ApnsCredentialEnvironment = components[\"schemas\"][\"ApnsCredentialEnvironment\"];\nexport const ApnsCredentialEnvironment = { values: [\"sandbox\", \"production\", \"both\"] as const };\n\nexport type ApnsEnvironment = components[\"schemas\"][\"ApnsEnvironment\"];\nexport const ApnsEnvironment = { values: [\"sandbox\", \"production\"] as const };\n\nexport type BulkRowStatus = components[\"schemas\"][\"BulkRowStatus\"];\nexport const BulkRowStatus = { values: [\"created\", \"updated\", \"error\"] as const };\n\nexport type CategoryDefault = components[\"schemas\"][\"CategoryDefault\"];\nexport const CategoryDefault = { values: [\"on\", \"off\", \"mandatory\"] as const };\n\nexport type ChannelReadiness = components[\"schemas\"][\"ChannelReadiness\"];\nexport const ChannelReadiness = { values: [\"ready\", \"not_configured\", \"disabled\", \"paused\"] as const };\n\nexport type ClientInboxStatusFilter = components[\"schemas\"][\"ClientInboxStatusFilter\"];\nexport const ClientInboxStatusFilter = { values: [\"all\", \"unread\", \"unseen\"] as const };\n\nexport type CredentialEnvironment = components[\"schemas\"][\"CredentialEnvironment\"];\nexport const CredentialEnvironment = { values: [\"sandbox\", \"production\", \"both\"] as const };\n\nexport type CredentialOrigin = components[\"schemas\"][\"CredentialOrigin\"];\nexport const CredentialOrigin = { values: [\"generated\", \"imported\", \"uploaded\"] as const };\n\nexport type CredentialProvider = components[\"schemas\"][\"CredentialProvider\"];\nexport const CredentialProvider = { values: [\"apns\", \"fcm\", \"vapid\"] as const };\n\nexport type CredentialStatus = components[\"schemas\"][\"CredentialStatus\"];\nexport const CredentialStatus = { values: [\"active\", \"invalid\", \"superseded\"] as const };\n\nexport type DeliveryState = components[\"schemas\"][\"DeliveryState\"];\nexport const DeliveryState = { values: [\"pending\", \"scheduled\", \"sending\", \"retry\", \"sent\", \"delivered\", \"failed\", \"bounced\", \"skipped\", \"pruned\"] as const };\n\nexport type DeviceChannel = components[\"schemas\"][\"DeviceChannel\"];\nexport const DeviceChannel = { values: [\"apns\", \"fcm\", \"webpush\"] as const };\n\nexport type DeviceMoveDirection = components[\"schemas\"][\"DeviceMoveDirection\"];\nexport const DeviceMoveDirection = { values: [\"moved_in\", \"moved_out\"] as const };\n\nexport type DevicePlatform = components[\"schemas\"][\"DevicePlatform\"];\nexport const DevicePlatform = { values: [\"ios\", \"ipados\", \"macos\", \"watchos\", \"tvos\", \"visionos\", \"android\", \"web\"] as const };\n\nexport type DeviceState = components[\"schemas\"][\"DeviceState\"];\nexport const DeviceState = { values: [\"active\", \"invalid\", \"pruned\"] as const };\n\nexport type InboxItemStatusFilter = components[\"schemas\"][\"InboxItemStatusFilter\"];\nexport const InboxItemStatusFilter = { values: [\"active\", \"archived\", \"all\"] as const };\n\nexport type InboxMarkAction = components[\"schemas\"][\"InboxMarkAction\"];\nexport const InboxMarkAction = { values: [\"seen\", \"read\", \"unread\", \"archived\", \"unarchived\"] as const };\n\nexport type NotificationStatus = components[\"schemas\"][\"NotificationStatus\"];\nexport const NotificationStatus = { values: [\"scheduled\", \"accepted\", \"planned\", \"cancelled\"] as const };\n\nexport type NotifyApprovalDecidedVia = components[\"schemas\"][\"NotifyApprovalDecidedVia\"];\nexport const NotifyApprovalDecidedVia = { values: [\"inbox\", \"hosted_page\", \"api\", \"timeout\"] as const };\n\nexport type NotifyApprovalDecision = components[\"schemas\"][\"NotifyApprovalDecision\"];\nexport const NotifyApprovalDecision = { values: [\"approve\", \"reject\"] as const };\n\nexport type NotifyApprovalOutcome = components[\"schemas\"][\"NotifyApprovalOutcome\"];\nexport const NotifyApprovalOutcome = { values: [\"approved\", \"rejected\", \"expired\", \"cancelled\"] as const };\n\nexport type NotifyApprovalOutcomeVia = components[\"schemas\"][\"NotifyApprovalOutcomeVia\"];\nexport const NotifyApprovalOutcomeVia = { values: [\"inbox\", \"hosted_page\", \"api\", \"timeout\"] as const };\n\nexport type NotifyApprovalReasonPolicy = components[\"schemas\"][\"NotifyApprovalReasonPolicy\"];\nexport const NotifyApprovalReasonPolicy = { values: [\"optional\", \"required_on_reject\", \"required\"] as const };\n\nexport type NotifyApprovalRequesterKind = components[\"schemas\"][\"NotifyApprovalRequesterKind\"];\nexport const NotifyApprovalRequesterKind = { values: [\"agent\", \"service\", \"user\"] as const };\n\nexport type NotifyApprovalRequesterViewKind = components[\"schemas\"][\"NotifyApprovalRequesterViewKind\"];\nexport const NotifyApprovalRequesterViewKind = { values: [\"agent\", \"service\", \"user\", \"api_key\"] as const };\n\nexport type NotifyApprovalStatus = components[\"schemas\"][\"NotifyApprovalStatus\"];\nexport const NotifyApprovalStatus = { values: [\"pending\", \"approved\", \"rejected\", \"expired\", \"cancelled\"] as const };\n\nexport type NotifyApprovalTimeoutOutcome = components[\"schemas\"][\"NotifyApprovalTimeoutOutcome\"];\nexport const NotifyApprovalTimeoutOutcome = { values: [\"expired\", \"approved\", \"rejected\"] as const };\n\nexport type NotifyBatchInboxMode = components[\"schemas\"][\"NotifyBatchInboxMode\"];\nexport const NotifyBatchInboxMode = { values: [\"collapse\", \"each\"] as const };\n\nexport type NotifyBatchMode = components[\"schemas\"][\"NotifyBatchMode\"];\nexport const NotifyBatchMode = { values: [\"window\", \"digest\"] as const };\n\nexport type NotifyBatchState = components[\"schemas\"][\"NotifyBatchState\"];\nexport const NotifyBatchState = { values: [\"open\", \"flushed\", \"cancelled\"] as const };\n\nexport type NotifyChannel = components[\"schemas\"][\"NotifyChannel\"];\nexport const NotifyChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\", \"webhook\"] as const };\n\n/**\n * Why a delivery was skipped, held, retried or failed. Open enum: new reasons may be added.\n *\n * - `suppressed_preference`: The recipient turned this channel off for this type or its category. Fix: Nothing to fix: the recipient chose this. Mark the category channel `mandatory` only for messages they must receive.\n * - `default_off`: This channel is off by default for the category, and the recipient has not turned it on. Fix: Nothing to fix if the channel is opt-in by design: it is sent once the recipient turns it on in their preferences. Set the category default to `on` to send it without an opt-in.\n * - `unsubscribed_all`: The recipient unsubscribed from all non-critical notifications. Fix: Only types marked `critical` still reach them; otherwise the recipient has to opt back in.\n * - `held_quiet_hours`: Held until the recipient's quiet hours end. Fix: It is sent when the window ends. Mark the type `critical` if it must not wait.\n * - `scheduled_send`: Waiting for the send time given in `send_at` or `delay_seconds`. Fix: It is sent at that time. Cancel it with the notification id or its `cancellation_key`.\n * - `no_device`: The recipient has no active device for this channel. Fix: Register the device token from your app (`POST …/devices`) after the user grants permission.\n * - `no_address`: The recipient has no email address. Fix: Set `email` on the recipient, or pass it inline in the send.\n * - `email_invalid`: An earlier email to this address hard-bounced. Fix: Update the recipient's email address; a new address clears the bounce.\n * - `email_complained`: The recipient marked an earlier email as spam. Fix: Email stays off for this recipient; reach them through another channel.\n * - `email_paused`: Email is paused for this workspace (high bounce or complaint rate). Fix: Check your sending in the console and resume email in Notify settings.\n * - `email_budget`: The workspace email budget is spent for now; the email waits for the next window. Fix: It is sent automatically when the budget allows. Ask us to raise the budget if this is routine.\n * - `email_backlog_full`: The workspace already holds 10,000 emails waiting for budget, so this one was not queued. Fix: Send fewer emails or spread them out; ask us to raise the budget if this volume is routine.\n * - `channel_not_configured`: The channel is not set up in this workspace. Fix: Upload APNs or FCM credentials, generate web push keys, or enable Mail with a verified sender.\n * - `channel_restricted`: The send's `channels` list left this channel out. Fix: Add the channel to `channels`, or omit `channels` to use every channel of the type.\n * - `type_archived`: The notification type is archived. Fix: Unarchive the type or send a different one.\n * - `credential_invalid`: No valid credential matches this device's app or environment. Fix: Upload the APNs key or FCM service account for this bundle id or project, in the right environment.\n * - `template_missing`: The type has no template for this channel. Fix: Add a template for the channel (any locale) to the notification type.\n * - `rate_limited`: The recipient already received the per-minute maximum of notifications. Fix: Send fewer notifications to one person, or batch them; critical types have their own budget.\n * - `throttled`: The type's own throttle for this recipient was reached. Fix: Raise or remove `throttle` on the notification type if every message must go out.\n * - `read_in_inbox`: The recipient read the inbox item first, so the follow-up was not needed. Fix: Nothing to fix: this is how `after_unread_seconds` works.\n * - `batched`: The type batches notifications: this one waits in the recipient's open batch, which closes at the delivery's next attempt time (the batch window end or the digest time) and then sends one message for everything in it. Fix: Nothing to fix. To send it sooner, flush the batch (POST /batches/{batch_id}/flush), or remove `batch` from the type.\n * - `batched_into`: Sent together with the rest of its batch: the batch's message went out in another delivery of the same batch (same recipient and channel). Fix: Nothing to fix. Look up the batch (GET /batches/{batch_id}) to see the delivery that carried it.\n * - `awaiting_unread`: A follow-up step waiting to see whether the recipient reads the inbox item first. Fix: Nothing to fix: it is sent when the `after_unread_seconds` timer ends and the item is still unread, and skipped as `read_in_inbox` otherwise.\n * - `actor_excluded`: The recipient is the actor who caused the notification. Fix: Pass `exclude_actor: false` to notify the actor too.\n * - `recipient_not_found`: No recipient with this external id exists in the workspace. Fix: Create the recipient first (`PUT /recipients/{external_id}`), pass it inline with an email, or send `create_missing: true`.\n * - `recipient_erased`: The recipient was erased in the last 24 hours and cannot be recreated by a send yet. Fix: Wait 24 hours after the erasure, then create the recipient again.\n * - `mail_suppressed`: ProductCraft Mail suppressed the address (earlier bounces or complaints). Fix: Check the suppression list in Mail; remove the address only if you know it is valid.\n * - `mail_refused`: ProductCraft Mail refused the message (the code after the colon says why). Fix: Look up the Mail error code; usually the template name or sender needs fixing.\n * - `pruned`: The push provider said the device token is no longer valid; the device was removed. Fix: Nothing to fix: the app registers a fresh token the next time it opens.\n * - `payload_too_large`: The rendered push payload is over the provider's size limit. Fix: Shorten the template or move data out of the push payload.\n * - `credential_error`: The push provider rejected the workspace credential. Fix: Upload a fresh APNs key or FCM service account; the channel resumes as soon as it validates.\n * - `circuit_open`: The provider is failing for this credential, so sends are paused briefly and retried. Fix: Nothing to fix: it retries on its own. Check the provider's status page if it lasts.\n * - `expired`: The notification's time to live passed before it could be delivered. Fix: Raise `ttl_seconds` on the type if late delivery is still useful.\n * - `cancelled`: The notification was cancelled, or the recipient was erased, before delivery. Fix: Nothing to fix.\n * - `provider_error`: The provider kept failing until retries ran out. Fix: Check the attempts for the provider status and code.\n */\nexport type NotifyDeliveryReason = components[\"schemas\"][\"NotifyDeliveryReason\"];\nexport const NotifyDeliveryReason = { values: [\"suppressed_preference\", \"default_off\", \"unsubscribed_all\", \"held_quiet_hours\", \"scheduled_send\", \"no_device\", \"no_address\", \"email_invalid\", \"email_complained\", \"email_paused\", \"email_budget\", \"email_backlog_full\", \"channel_not_configured\", \"channel_restricted\", \"type_archived\", \"credential_invalid\", \"template_missing\", \"rate_limited\", \"throttled\", \"read_in_inbox\", \"awaiting_unread\", \"batched\", \"batched_into\", \"actor_excluded\", \"recipient_not_found\", \"recipient_erased\", \"mail_suppressed\", \"mail_refused\", \"pruned\", \"payload_too_large\", \"credential_error\", \"circuit_open\", \"expired\", \"cancelled\", \"provider_error\"] as const };\n\nexport type NotifyDigestFrequency = components[\"schemas\"][\"NotifyDigestFrequency\"];\nexport const NotifyDigestFrequency = { values: [\"daily\", \"weekly\"] as const };\n\nexport type NotifyEmailPauseReason = components[\"schemas\"][\"NotifyEmailPauseReason\"];\nexport const NotifyEmailPauseReason = { values: [\"complaints\", \"bounces\"] as const };\n\nexport type NotifyQuietHoursSource = components[\"schemas\"][\"NotifyQuietHoursSource\"];\nexport const NotifyQuietHoursSource = { values: [\"recipient\", \"workspace\"] as const };\n\nexport type NotifyRecipientDeletionCause = components[\"schemas\"][\"NotifyRecipientDeletionCause\"];\nexport const NotifyRecipientDeletionCause = { values: [\"api\", \"auth_user_deleted\"] as const };\n\nexport type NotifyStatsChannel = components[\"schemas\"][\"NotifyStatsChannel\"];\nexport const NotifyStatsChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\"] as const };\n\nexport type NotifyWebhookChannel = components[\"schemas\"][\"NotifyWebhookChannel\"];\nexport const NotifyWebhookChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\", \"webhook\"] as const };\n\nexport type NotifyWebhookCredentialProvider = components[\"schemas\"][\"NotifyWebhookCredentialProvider\"];\nexport const NotifyWebhookCredentialProvider = { values: [\"apns\", \"fcm\", \"vapid\"] as const };\n\nexport type NotifyWebhookDeliveryState = components[\"schemas\"][\"NotifyWebhookDeliveryState\"];\nexport const NotifyWebhookDeliveryState = { values: [\"sent\", \"delivered\", \"failed\", \"bounced\", \"skipped\", \"pruned\"] as const };\n\nexport type NotifyWebhookDeviceChannel = components[\"schemas\"][\"NotifyWebhookDeviceChannel\"];\nexport const NotifyWebhookDeviceChannel = { values: [\"apns\", \"fcm\", \"webpush\"] as const };\n\nexport type NotifyWeekday = components[\"schemas\"][\"NotifyWeekday\"];\nexport const NotifyWeekday = { values: [\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\"] as const };\n\nexport type PlanDecision = components[\"schemas\"][\"PlanDecision\"];\nexport const PlanDecision = { values: [\"deliver\", \"schedule\", \"skip\"] as const };\n\nexport type PreferenceChannel = components[\"schemas\"][\"PreferenceChannel\"];\nexport const PreferenceChannel = { values: [\"inbox\", \"email\", \"push\", \"webpush\", \"*\"] as const };\n\nexport type PreferenceScope = components[\"schemas\"][\"PreferenceScope\"];\nexport const PreferenceScope = { values: [\"all\", \"category\", \"type\"] as const };\n\nexport type RecipientErasureStatus = components[\"schemas\"][\"RecipientErasureStatus\"];\nexport const RecipientErasureStatus = { values: [\"erased\"] as const };\n\nexport type RecipientInclude = components[\"schemas\"][\"RecipientInclude\"];\nexport const RecipientInclude = { values: [\"preferences\"] as const };\n\nexport type RecipientTokenScope = components[\"schemas\"][\"RecipientTokenScope\"];\nexport const RecipientTokenScope = { values: [\"inbox:read\", \"inbox:write\", \"devices:write\", \"preferences:read\", \"preferences:write\", \"stream\"] as const };\n\nexport type SendStatus = components[\"schemas\"][\"SendStatus\"];\nexport const SendStatus = { values: [\"accepted\", \"scheduled\"] as const };\n\nexport type SetupRowState = components[\"schemas\"][\"SetupRowState\"];\nexport const SetupRowState = { values: [\"pass\", \"attention\", \"not_set\", \"blocked\"] as const };\n\nexport type WebhookAttemptTrigger = components[\"schemas\"][\"WebhookAttemptTrigger\"];\nexport const WebhookAttemptTrigger = { values: [\"automatic\", \"replay\", \"test\"] as const };\n\nexport type WebhookEndpointDisabledReason = components[\"schemas\"][\"WebhookEndpointDisabledReason\"];\nexport const WebhookEndpointDisabledReason = { values: [\"manual\", \"failing\"] as const };\n\nexport type WebhookEndpointStatus = components[\"schemas\"][\"WebhookEndpointStatus\"];\nexport const WebhookEndpointStatus = { values: [\"enabled\", \"disabled\", \"auto_disabled\"] as const };\n\nexport type WebhookEventStatus = components[\"schemas\"][\"WebhookEventStatus\"];\nexport const WebhookEventStatus = { values: [\"pending\", \"delivered\", \"failed\", \"not_sent\"] as const };\n\n/**\n * Every event type this product sends; `x-webhooks` maps each to its payload schema. New types can be added, so treat it as open.\n */\nexport type WebhookEventType = components[\"schemas\"][\"WebhookEventType\"];\nexport const WebhookEventType = { values: [\"notification.accepted\", \"delivery.sent\", \"delivery.delivered\", \"delivery.failed\", \"delivery.bounced\", \"delivery.skipped\", \"inbox_item.read\", \"inbox_item.archived\", \"inbox_item.interacted\", \"device.pruned\", \"device.moved\", \"credential.invalid\", \"email.auto_paused\", \"recipient.deleted\", \"notification.webhook\", \"approval.resolved\"] as const };\n\nexport interface ApnsCredential extends Open<components[\"schemas\"][\"ApnsCredentialDto\"]> {}\nexport interface ApprovalConfigView extends Open<components[\"schemas\"][\"ApprovalConfigViewDto\"]> {}\nexport interface ApprovalDetail extends Open<components[\"schemas\"][\"ApprovalDetailDto\"]> {}\nexport interface Approval extends Open<components[\"schemas\"][\"ApprovalDto\"]> {}\nexport interface ApprovalEvent extends Open<components[\"schemas\"][\"ApprovalEventDto\"]> {}\nexport interface ApprovalList extends Open<components[\"schemas\"][\"ApprovalListResponseDto\"]> {}\nexport interface ApprovalRequesterView extends Open<components[\"schemas\"][\"ApprovalRequesterViewDto\"]> {}\nexport interface BatchDelivery extends Open<components[\"schemas\"][\"BatchDeliveryDto\"]> {}\nexport interface BatchDetail extends Open<components[\"schemas\"][\"BatchDetailDto\"]> {}\nexport interface BatchList extends Open<components[\"schemas\"][\"BatchListResponseDto\"]> {}\nexport interface BatchScheduleView extends Open<components[\"schemas\"][\"BatchScheduleViewDto\"]> {}\nexport interface BatchSummary extends Open<components[\"schemas\"][\"BatchSummaryDto\"]> {}\nexport interface BatchView extends Open<components[\"schemas\"][\"BatchViewDto\"]> {}\nexport interface BulkRowError extends Open<components[\"schemas\"][\"BulkRowErrorDto\"]> {}\nexport interface BulkRowResult extends Open<components[\"schemas\"][\"BulkRowResultDto\"]> {}\nexport interface BulkUpsertRecipients extends Open<components[\"schemas\"][\"BulkUpsertRecipientsResponseDto\"]> {}\nexport interface CancelByKey extends Open<components[\"schemas\"][\"CancelByKeyResponseDto\"]> {}\nexport interface CategoryDefaultsView extends Open<components[\"schemas\"][\"CategoryDefaultsViewDto\"]> {}\nexport interface Category extends Open<components[\"schemas\"][\"CategoryDto\"]> {}\nexport interface CategoryList extends Open<components[\"schemas\"][\"CategoryListResponseDto\"]> {}\nexport interface ChannelCounts extends Open<components[\"schemas\"][\"ChannelCountsDto\"]> {}\nexport interface ChannelCredential extends Open<components[\"schemas\"][\"ChannelCredentialDto\"]> {}\nexport interface ChannelList extends Open<components[\"schemas\"][\"ChannelListResponseDto\"]> {}\nexport interface ChannelStatus extends Open<components[\"schemas\"][\"ChannelStatusDto\"]> {}\nexport interface ClientCategory extends Open<components[\"schemas\"][\"ClientCategoryDto\"]> {}\nexport interface ClientInboxList extends Open<components[\"schemas\"][\"ClientInboxListDto\"]> {}\nexport interface ClientPreferences extends Open<components[\"schemas\"][\"ClientPreferencesDto\"]> {}\nexport interface DeliveryAttempt extends Open<components[\"schemas\"][\"DeliveryAttemptDto\"]> {}\nexport interface DeliveryDetail extends Open<components[\"schemas\"][\"DeliveryDetailDto\"]> {}\nexport interface Delivery extends Open<components[\"schemas\"][\"DeliveryDto\"]> {}\nexport interface DeliveryList extends Open<components[\"schemas\"][\"DeliveryListResponseDto\"]> {}\nexport interface Device extends Open<components[\"schemas\"][\"DeviceDto\"]> {}\nexport interface DeviceList extends Open<components[\"schemas\"][\"DeviceListResponseDto\"]> {}\nexport interface DeviceMove extends Open<components[\"schemas\"][\"DeviceMoveDto\"]> {}\nexport interface DryRun extends Open<components[\"schemas\"][\"DryRunResponseDto\"]> {}\nexport interface EffectiveQuietHours extends Open<components[\"schemas\"][\"EffectiveQuietHoursDto\"]> {}\nexport interface Export extends Open<components[\"schemas\"][\"ExportDto\"]> {}\nexport interface ExportNotificationType extends Open<components[\"schemas\"][\"ExportNotificationTypeDto\"]> {}\nexport interface ExportSettings extends Open<components[\"schemas\"][\"ExportSettingsDto\"]> {}\nexport interface FallbackStepView extends Open<components[\"schemas\"][\"FallbackStepViewDto\"]> {}\nexport interface FcmCredential extends Open<components[\"schemas\"][\"FcmCredentialDto\"]> {}\nexport interface FlushBatch extends Open<components[\"schemas\"][\"FlushBatchResponseDto\"]> {}\nexport interface InboxAction extends Open<components[\"schemas\"][\"InboxActionDto\"]> {}\nexport interface InboxCounts extends Open<components[\"schemas\"][\"InboxCountsDto\"]> {}\nexport interface InboxItem extends Open<components[\"schemas\"][\"InboxItemDto\"]> {}\nexport interface InboxList extends Open<components[\"schemas\"][\"InboxListResponseDto\"]> {}\nexport interface ListPagination extends Open<components[\"schemas\"][\"ListPaginationDto\"]> {}\nexport interface WebhookEndpointList extends Open<components[\"schemas\"][\"ListWebhookEndpointsResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEndpointList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEndpoints = WebhookEndpointList;\nexport interface WebhookEventTypeList extends Open<components[\"schemas\"][\"ListWebhookEventTypesResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventTypeList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEventTypes = WebhookEventTypeList;\nexport interface WebhookEventList extends Open<components[\"schemas\"][\"ListWebhookEventsResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEvents = WebhookEventList;\nexport interface MarkInboxResult extends Open<components[\"schemas\"][\"MarkInboxResultDto\"]> {}\nexport interface NotificationActor extends Open<components[\"schemas\"][\"NotificationActorDto\"]> {}\nexport interface Notification extends Open<components[\"schemas\"][\"NotificationDto\"]> {}\nexport interface NotificationList extends Open<components[\"schemas\"][\"NotificationListResponseDto\"]> {}\nexport interface NotificationType extends Open<components[\"schemas\"][\"NotificationTypeDto\"]> {}\nexport interface NotificationTypeList extends Open<components[\"schemas\"][\"NotificationTypeListResponseDto\"]> {}\nexport interface NotifyApprovalRequester extends Open<components[\"schemas\"][\"NotifyApprovalRequesterDto\"]> {}\nexport interface NotifyApprovalResolvedData extends Open<components[\"schemas\"][\"NotifyApprovalResolvedDataDto\"]> {}\nexport interface NotifyBrandingView extends Open<components[\"schemas\"][\"NotifyBrandingViewDto\"]> {}\nexport interface NotifyCredentialInvalidData extends Open<components[\"schemas\"][\"NotifyCredentialInvalidDataDto\"]> {}\nexport interface NotifyDeliveryEventData extends Open<components[\"schemas\"][\"NotifyDeliveryEventDataDto\"]> {}\nexport interface NotifyDeviceEventData extends Open<components[\"schemas\"][\"NotifyDeviceEventDataDto\"]> {}\nexport interface NotifyEmailAutoPausedData extends Open<components[\"schemas\"][\"NotifyEmailAutoPausedDataDto\"]> {}\nexport interface NotifyInboxItemEventData extends Open<components[\"schemas\"][\"NotifyInboxItemEventDataDto\"]> {}\nexport interface NotifyNotificationAcceptedData extends Open<components[\"schemas\"][\"NotifyNotificationAcceptedDataDto\"]> {}\nexport interface NotifyNotificationWebhookData extends Open<components[\"schemas\"][\"NotifyNotificationWebhookDataDto\"]> {}\nexport interface NotifyRecipientDeletedData extends Open<components[\"schemas\"][\"NotifyRecipientDeletedDataDto\"]> {}\nexport interface NotifySettings extends Open<components[\"schemas\"][\"NotifySettingsDto\"]> {}\nexport interface NotifyStatsCounts extends Open<components[\"schemas\"][\"NotifyStatsCountsDto\"]> {}\nexport interface NotifyStatsDay extends Open<components[\"schemas\"][\"NotifyStatsDayDto\"]> {}\nexport interface NotifyStats extends Open<components[\"schemas\"][\"NotifyStatsResponseDto\"]> {}\nexport interface NotifyWebhookChannelRendered extends Open<components[\"schemas\"][\"NotifyWebhookChannelRenderedDto\"]> {}\nexport interface NotifyWebhookRecipient extends Open<components[\"schemas\"][\"NotifyWebhookRecipientDto\"]> {}\nexport interface Pagination extends Open<components[\"schemas\"][\"PaginationDto\"]> {}\nexport interface PlanBatch extends Open<components[\"schemas\"][\"PlanBatchDto\"]> {}\nexport interface PlanRow extends Open<components[\"schemas\"][\"PlanRowDto\"]> {}\nexport interface PreferenceCell extends Open<components[\"schemas\"][\"PreferenceCellDto\"]> {}\nexport interface PreferenceLink extends Open<components[\"schemas\"][\"PreferenceLinkDto\"]> {}\nexport interface PreferenceSet extends Open<components[\"schemas\"][\"PreferenceSetDto\"]> {}\nexport interface PreviewChannel extends Open<components[\"schemas\"][\"PreviewChannelDto\"]> {}\nexport interface Preview extends Open<components[\"schemas\"][\"PreviewResponseDto\"]> {}\nexport interface QuietHours extends Open<components[\"schemas\"][\"QuietHoursDto\"]> {}\nexport interface Recipient extends Open<components[\"schemas\"][\"RecipientDto\"]> {}\nexport interface RecipientErasure extends Open<components[\"schemas\"][\"RecipientErasureDto\"]> {}\nexport interface RecipientListPagination extends Open<components[\"schemas\"][\"RecipientListPaginationDto\"]> {}\nexport interface RecipientList extends Open<components[\"schemas\"][\"RecipientListResponseDto\"]> {}\nexport interface RecipientToken extends Open<components[\"schemas\"][\"RecipientTokenDto\"]> {}\nexport interface RenderedPush extends Open<components[\"schemas\"][\"RenderedPushDto\"]> {}\nexport interface WebhookEventReplay extends Open<components[\"schemas\"][\"ReplayWebhookEventResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventReplay`. Kept for 1.x callers; removed in the next major. */\nexport type ReplayWebhookEvent = WebhookEventReplay;\nexport interface Retract extends Open<components[\"schemas\"][\"RetractResponseDto\"]> {}\nexport interface RoutingView extends Open<components[\"schemas\"][\"RoutingViewDto\"]> {}\nexport interface SendNotification extends Open<components[\"schemas\"][\"SendNotificationResponseDto\"]> {}\nexport interface SetupRow extends Open<components[\"schemas\"][\"SetupRowDto\"]> {}\nexport interface SetupRowFix extends Open<components[\"schemas\"][\"SetupRowFixDto\"]> {}\nexport interface SetupRowTest extends Open<components[\"schemas\"][\"SetupRowTestDto\"]> {}\nexport interface SetupStatus extends Open<components[\"schemas\"][\"SetupStatusDto\"]> {}\nexport interface SkippedRecipient extends Open<components[\"schemas\"][\"SkippedRecipientDto\"]> {}\nexport interface Template extends Open<components[\"schemas\"][\"TemplateDto\"]> {}\nexport interface TemplateSummary extends Open<components[\"schemas\"][\"TemplateSummaryDto\"]> {}\nexport interface TemplateVersion extends Open<components[\"schemas\"][\"TemplateVersionDto\"]> {}\nexport interface TemplateVersionList extends Open<components[\"schemas\"][\"TemplateVersionListDto\"]> {}\nexport interface ThrottleView extends Open<components[\"schemas\"][\"ThrottleViewDto\"]> {}\nexport interface TimelineDevice extends Open<components[\"schemas\"][\"TimelineDeviceDto\"]> {}\nexport interface TimelineEntry extends Open<components[\"schemas\"][\"TimelineEntryDto\"]> {}\nexport interface Timeline extends Open<components[\"schemas\"][\"TimelineResponseDto\"]> {}\nexport interface VapidKey extends Open<components[\"schemas\"][\"VapidKeyDto\"]> {}\nexport interface VapidPublicKey extends Open<components[\"schemas\"][\"VapidPublicKeyDto\"]> {}\nexport interface WebPushChannel extends Open<components[\"schemas\"][\"WebPushChannelDto\"]> {}\nexport interface WebhookDeliveryAttempt extends Open<components[\"schemas\"][\"WebhookDeliveryAttemptDto\"]> {}\nexport interface WebhookEndpoint extends Open<components[\"schemas\"][\"WebhookEndpointDto\"]> {}\nexport interface WebhookEndpointWithSecret extends Open<components[\"schemas\"][\"WebhookEndpointWithSecretDto\"]> {}\nexport interface WebhookEventDelivery extends Open<components[\"schemas\"][\"WebhookEventDeliveryDto\"]> {}\nexport interface WebhookEventDetail extends Open<components[\"schemas\"][\"WebhookEventDetailDto\"]> {}\nexport interface WebhookEvent extends Open<components[\"schemas\"][\"WebhookEventDto\"]> {}\nexport interface WebhookEventTypeInfo extends Open<components[\"schemas\"][\"WebhookEventTypeDto\"]> {}\nexport interface WebhookPagination extends Open<components[\"schemas\"][\"WebhookPaginationDto\"]> {}\n\n/** Params for `me.approvals.decide` (POST /v1/client/approvals/{approval_id}/decision). */\nexport type MeApprovalDecideParams = NonNullable<paths[\"/v1/client/approvals/{approval_id}/decision\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.devices.register` (POST /v1/client/devices). */\nexport type MeDeviceRegisterParams = NonNullable<paths[\"/v1/client/devices\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.inbox.list` (GET /v1/client/inbox). */\nexport type MeInboxListParams = NonNullable<paths[\"/v1/client/inbox\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `me.inbox.mark` (POST /v1/client/inbox/mark). */\nexport type MeInboxMarkParams = NonNullable<paths[\"/v1/client/inbox/mark\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.inbox.interact` (POST /v1/client/inbox/{item_id}/interact). */\nexport type MeInboxInteractParams = NonNullable<paths[\"/v1/client/inbox/{item_id}/interact\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `me.preferences.update` (PATCH /v1/client/preferences). */\nexport type MePreferenceUpdateParams = NonNullable<paths[\"/v1/client/preferences\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `approvals.list` (GET /v1/workspaces/{workspace_id}/approvals). */\nexport type ApprovalListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/approvals\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `approvals.create` (POST /v1/workspaces/{workspace_id}/approvals). */\nexport type ApprovalCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/approvals\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `approvals.retrieve` (GET /v1/workspaces/{workspace_id}/approvals/{approval_id}). */\nexport type ApprovalRetrieveParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/approvals/{approval_id}\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `approvals.recordDecision` (POST /v1/workspaces/{workspace_id}/approvals/{approval_id}/decision). */\nexport type ApprovalRecordDecisionParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/approvals/{approval_id}/decision\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `batches.list` (GET /v1/workspaces/{workspace_id}/batches). */\nexport type BatchListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/batches\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `categories.list` (GET /v1/workspaces/{workspace_id}/categories). */\nexport type CategoryListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/categories\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `categories.create` (POST /v1/workspaces/{workspace_id}/categories). */\nexport type CategoryCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/categories\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `categories.update` (PATCH /v1/workspaces/{workspace_id}/categories/{category_id}). */\nexport type CategoryUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/categories/{category_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.apns.uploadCredential` (PUT /v1/workspaces/{workspace_id}/channels/apns/credentials). */\nexport type ChannelApnUploadCredentialParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/apns/credentials\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.fcm.uploadCredential` (PUT /v1/workspaces/{workspace_id}/channels/fcm/credentials). */\nexport type ChannelFcmUploadCredentialParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/fcm/credentials\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.webpush.generateVapidKeys` (POST /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys). */\nexport type ChannelWebpushGenerateVapidKeysParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `channels.webpush.importVapidKeys` (PUT /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys). */\nexport type ChannelWebpushImportVapidKeysParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `deliveries.list` (GET /v1/workspaces/{workspace_id}/deliveries). */\nexport type DeliveryListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/deliveries\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `notificationTypes.list` (GET /v1/workspaces/{workspace_id}/notification-types). */\nexport type NotificationTypeListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `notificationTypes.create` (POST /v1/workspaces/{workspace_id}/notification-types). */\nexport type NotificationTypeCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.replaceByKey` (PUT /v1/workspaces/{workspace_id}/notification-types/by-key/{key}). */\nexport type NotificationTypeReplaceByKeyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/by-key/{key}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.update` (PATCH /v1/workspaces/{workspace_id}/notification-types/{type_id}). */\nexport type NotificationTypeUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.preview` (POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/preview). */\nexport type NotificationTypePreviewParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}/preview\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.templates.update` (PUT /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}). */\nexport type NotificationTypeTemplateUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notificationTypes.templates.revert` (POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert). */\nexport type NotificationTypeTemplateRevertParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `notifications.list` (GET /v1/workspaces/{workspace_id}/notifications). */\nexport type NotificationListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notifications\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `notifications.send` (POST /v1/workspaces/{workspace_id}/notifications). */\nexport type NotificationSendParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notifications\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Response of `notifications.send`: one of 2 success shapes (HTTP 200, 202). */\nexport type NotificationSendResponse = DryRun | SendNotification;\n/** Params for `notifications.cancelByKey` (POST /v1/workspaces/{workspace_id}/notifications/cancel). */\nexport type NotificationCancelByKeyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/notifications/cancel\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipientTokens.mint` (POST /v1/workspaces/{workspace_id}/recipient-tokens). */\nexport type RecipientTokenMintParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipient-tokens\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.list` (GET /v1/workspaces/{workspace_id}/recipients). */\nexport type RecipientListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `recipients.bulkIdentify` (POST /v1/workspaces/{workspace_id}/recipients/bulk). */\nexport type RecipientBulkIdentifyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/bulk\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.identify` (PUT /v1/workspaces/{workspace_id}/recipients/{external_id}). */\nexport type RecipientIdentifyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.update` (PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}). */\nexport type RecipientUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.devices.create` (POST /v1/workspaces/{workspace_id}/recipients/{external_id}/devices). */\nexport type RecipientDeviceCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/devices\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.inbox.list` (GET /v1/workspaces/{workspace_id}/recipients/{external_id}/inbox). */\nexport type RecipientInboxListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/inbox\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `recipients.createPreferenceLink` (POST /v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link). */\nexport type RecipientCreatePreferenceLinkParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.preferences.replace` (PUT /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences). */\nexport type RecipientPreferenceReplaceParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.preferences.update` (PATCH /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences). */\nexport type RecipientPreferenceUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `recipients.timeline` (GET /v1/workspaces/{workspace_id}/recipients/{external_id}/timeline). */\nexport type RecipientTimelineParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/recipients/{external_id}/timeline\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `settings.update` (PATCH /v1/workspaces/{workspace_id}/settings). */\nexport type SettingsUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/settings\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `stats.retrieve` (GET /v1/workspaces/{workspace_id}/stats). */\nexport type StatsRetrieveParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/stats\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `webhooks.endpoints.create` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints). */\nexport type WebhookEndpointCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.update` (PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}). */\nexport type WebhookEndpointUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.rotateSecret` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret). */\nexport type WebhookEndpointRotateSecretParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.test` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test). */\nexport type WebhookEndpointTestParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.events.list` (GET /v1/workspaces/{workspace_id}/webhooks/events). */\nexport type WebhookEventListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/events\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `webhooks.events.replay` (POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay). */\nexport type WebhookEventReplayParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\"][\"post\"][\"parameters\"][\"query\"]>;\n","// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nimport { APIClient, ConfigurationError, createOpenAPIClient, PC_BASE_URL, type ClientOptions, type ClientOptions as CoreClientOptions, type PollOptions as CorePollOptions, type RequestOptions as CoreRequestOptions } from \"@productcraft/core\";\nimport type { APIPromise as CoreAPIPromise, LastResponse as CoreLastResponse, Page as CorePage, PagePromise as CorePagePromise, RateLimitInfo as CoreRateLimitInfo, WithResponse as CoreWithResponse } from \"@productcraft/core\";\nimport type { Client } from \"openapi-fetch\";\nimport type * as E from \"./errors.js\";\nimport type { paths } from \"./paths.js\";\nimport { NotifyClient, NotifyResources } from \"./resources.js\";\nimport * as T from \"./types.js\";\nimport type * as W from \"./webhooks.js\";\n\ndeclare const __PC_SDK_VERSION__: string | undefined;\nconst VERSION = typeof __PC_SDK_VERSION__ === \"string\" ? __PC_SDK_VERSION__ : \"0.0.0-dev\";\n\n/**\n * ProductCraft Notify API client (recipients, preferences, notification types, sends, deliveries, inbox, channels and webhooks). Every method is generated from the API's OpenAPI document.\n *\n * @example\n * ```ts\n * import { Notify } from \"@productcraft/notify\";\n * const notify = new Notify({ apiKey: process.env.PRODUCTCRAFT_API_KEY });\n * ```\n */\n\nexport class Notify extends NotifyResources {\n /** The options this client was built with, for the token scopes' own clients. Never enumerable. */\n readonly #options: ClientOptions;\n constructor(options: ClientOptions = {}) {\n super(new APIClient(options, PC_BASE_URL.notify, { name: \"notify\", version: VERSION }));\n this.#options = options;\n }\n #openapi?: Client<paths> & ((scope: { token: string }) => NotifyClient);\n /**\n * Browser- and app-safe calls for one recipient (inbox, devices, preferences), authenticated by the short-lived recipient token your backend mints with `recipientTokens.mint`. Sends only that token, never an API key.\n *\n * Call it: `notify.client({ token })` returns the scope. Read it: `notify.client.GET(…)` is the typed\n * `openapi-fetch` escape hatch over this client's credential and base URL (it does not retry).\n *\n * @example\n * ```ts\n * const inbox = await notify.client({ token }).inbox.list();\n * ```\n */\n get client(): Client<paths> & ((scope: { token: string }) => NotifyClient) {\n return (this.#openapi ??= Object.assign((scope: { token: string }) => this.#tokenScope(scope), createOpenAPIClient<paths>(this._client)));\n }\n #tokenScope(scope: { token: string }): NotifyClient {\n const token = scope?.token;\n if (typeof token !== \"string\" || token.trim() === \"\") throw new ConfigurationError(\"client({ token }) needs a non-empty token.\");\n if (token.startsWith(\"pcft_\")) {\n throw new ConfigurationError(\"client({ token }) was given a workspace API key. Pass the short-lived token your backend minted; never ship an API key to a browser or an app.\");\n }\n // Only the token: no API key, no environment fallback, no workspace (the token names it).\n const { apiKey: _apiKey, auth: _auth, workspaceId: _workspaceId, credentialFromEnv: _env, dangerouslyAllowBrowser: _browser, ...rest } = this.#options;\n return new NotifyClient(new APIClient({ ...rest, auth: { type: \"bearer\", token }, credentialFromEnv: false }, PC_BASE_URL.notify, { name: \"notify\", version: VERSION }));\n }\n}\n\ntype __RequestOptions = CoreRequestOptions;\ntype __PollOptions = CorePollOptions;\ntype __ClientOptions = CoreClientOptions;\ntype __Page<T> = CorePage<T>;\ntype __PagePromise<T> = CorePagePromise<T>;\ntype __APIPromise<T> = CoreAPIPromise<T>;\ntype __WithResponse<T> = CoreWithResponse<T>;\ntype __RateLimitInfo = CoreRateLimitInfo;\ntype __LastResponse = CoreLastResponse;\ntype __ApnsCredentialEnvironment = T.ApnsCredentialEnvironment;\ntype __ApnsEnvironment = T.ApnsEnvironment;\ntype __BulkRowStatus = T.BulkRowStatus;\ntype __CategoryDefault = T.CategoryDefault;\ntype __ChannelReadiness = T.ChannelReadiness;\ntype __ClientInboxStatusFilter = T.ClientInboxStatusFilter;\ntype __CredentialEnvironment = T.CredentialEnvironment;\ntype __CredentialOrigin = T.CredentialOrigin;\ntype __CredentialProvider = T.CredentialProvider;\ntype __CredentialStatus = T.CredentialStatus;\ntype __DeliveryState = T.DeliveryState;\ntype __DeviceChannel = T.DeviceChannel;\ntype __DeviceMoveDirection = T.DeviceMoveDirection;\ntype __DevicePlatform = T.DevicePlatform;\ntype __DeviceState = T.DeviceState;\ntype __InboxItemStatusFilter = T.InboxItemStatusFilter;\ntype __InboxMarkAction = T.InboxMarkAction;\ntype __NotificationStatus = T.NotificationStatus;\ntype __NotifyApprovalDecidedVia = T.NotifyApprovalDecidedVia;\ntype __NotifyApprovalDecision = T.NotifyApprovalDecision;\ntype __NotifyApprovalOutcome = T.NotifyApprovalOutcome;\ntype __NotifyApprovalOutcomeVia = T.NotifyApprovalOutcomeVia;\ntype __NotifyApprovalReasonPolicy = T.NotifyApprovalReasonPolicy;\ntype __NotifyApprovalRequesterKind = T.NotifyApprovalRequesterKind;\ntype __NotifyApprovalRequesterViewKind = T.NotifyApprovalRequesterViewKind;\ntype __NotifyApprovalStatus = T.NotifyApprovalStatus;\ntype __NotifyApprovalTimeoutOutcome = T.NotifyApprovalTimeoutOutcome;\ntype __NotifyBatchInboxMode = T.NotifyBatchInboxMode;\ntype __NotifyBatchMode = T.NotifyBatchMode;\ntype __NotifyBatchState = T.NotifyBatchState;\ntype __NotifyChannel = T.NotifyChannel;\ntype __NotifyDeliveryReason = T.NotifyDeliveryReason;\ntype __NotifyDigestFrequency = T.NotifyDigestFrequency;\ntype __NotifyEmailPauseReason = T.NotifyEmailPauseReason;\ntype __NotifyQuietHoursSource = T.NotifyQuietHoursSource;\ntype __NotifyRecipientDeletionCause = T.NotifyRecipientDeletionCause;\ntype __NotifyStatsChannel = T.NotifyStatsChannel;\ntype __NotifyWebhookChannel = T.NotifyWebhookChannel;\ntype __NotifyWebhookCredentialProvider = T.NotifyWebhookCredentialProvider;\ntype __NotifyWebhookDeliveryState = T.NotifyWebhookDeliveryState;\ntype __NotifyWebhookDeviceChannel = T.NotifyWebhookDeviceChannel;\ntype __NotifyWeekday = T.NotifyWeekday;\ntype __PlanDecision = T.PlanDecision;\ntype __PreferenceChannel = T.PreferenceChannel;\ntype __PreferenceScope = T.PreferenceScope;\ntype __RecipientErasureStatus = T.RecipientErasureStatus;\ntype __RecipientInclude = T.RecipientInclude;\ntype __RecipientTokenScope = T.RecipientTokenScope;\ntype __SendStatus = T.SendStatus;\ntype __SetupRowState = T.SetupRowState;\ntype __WebhookAttemptTrigger = T.WebhookAttemptTrigger;\ntype __WebhookEndpointDisabledReason = T.WebhookEndpointDisabledReason;\ntype __WebhookEndpointStatus = T.WebhookEndpointStatus;\ntype __WebhookEventStatus = T.WebhookEventStatus;\ntype __WebhookEventType = T.WebhookEventType;\ntype __ApnsCredential = T.ApnsCredential;\ntype __ApprovalConfigView = T.ApprovalConfigView;\ntype __ApprovalDetail = T.ApprovalDetail;\ntype __Approval = T.Approval;\ntype __ApprovalEvent = T.ApprovalEvent;\ntype __ApprovalList = T.ApprovalList;\ntype __ApprovalRequesterView = T.ApprovalRequesterView;\ntype __BatchDelivery = T.BatchDelivery;\ntype __BatchDetail = T.BatchDetail;\ntype __BatchList = T.BatchList;\ntype __BatchScheduleView = T.BatchScheduleView;\ntype __BatchSummary = T.BatchSummary;\ntype __BatchView = T.BatchView;\ntype __BulkRowError = T.BulkRowError;\ntype __BulkRowResult = T.BulkRowResult;\ntype __BulkUpsertRecipients = T.BulkUpsertRecipients;\ntype __CancelByKey = T.CancelByKey;\ntype __CategoryDefaultsView = T.CategoryDefaultsView;\ntype __Category = T.Category;\ntype __CategoryList = T.CategoryList;\ntype __ChannelCounts = T.ChannelCounts;\ntype __ChannelCredential = T.ChannelCredential;\ntype __ChannelList = T.ChannelList;\ntype __ChannelStatus = T.ChannelStatus;\ntype __ClientCategory = T.ClientCategory;\ntype __ClientInboxList = T.ClientInboxList;\ntype __ClientPreferences = T.ClientPreferences;\ntype __DeliveryAttempt = T.DeliveryAttempt;\ntype __DeliveryDetail = T.DeliveryDetail;\ntype __Delivery = T.Delivery;\ntype __DeliveryList = T.DeliveryList;\ntype __Device = T.Device;\ntype __DeviceList = T.DeviceList;\ntype __DeviceMove = T.DeviceMove;\ntype __DryRun = T.DryRun;\ntype __EffectiveQuietHours = T.EffectiveQuietHours;\ntype __Export = T.Export;\ntype __ExportNotificationType = T.ExportNotificationType;\ntype __ExportSettings = T.ExportSettings;\ntype __FallbackStepView = T.FallbackStepView;\ntype __FcmCredential = T.FcmCredential;\ntype __FlushBatch = T.FlushBatch;\ntype __InboxAction = T.InboxAction;\ntype __InboxCounts = T.InboxCounts;\ntype __InboxItem = T.InboxItem;\ntype __InboxList = T.InboxList;\ntype __ListPagination = T.ListPagination;\ntype __WebhookEndpointList = T.WebhookEndpointList;\ntype __ListWebhookEndpoints = T.WebhookEndpointList;\ntype __WebhookEventTypeList = T.WebhookEventTypeList;\ntype __ListWebhookEventTypes = T.WebhookEventTypeList;\ntype __WebhookEventList = T.WebhookEventList;\ntype __ListWebhookEvents = T.WebhookEventList;\ntype __MarkInboxResult = T.MarkInboxResult;\ntype __NotificationActor = T.NotificationActor;\ntype __Notification = T.Notification;\ntype __NotificationList = T.NotificationList;\ntype __NotificationType = T.NotificationType;\ntype __NotificationTypeList = T.NotificationTypeList;\ntype __NotifyApprovalRequester = T.NotifyApprovalRequester;\ntype __NotifyApprovalResolvedData = T.NotifyApprovalResolvedData;\ntype __NotifyBrandingView = T.NotifyBrandingView;\ntype __NotifyCredentialInvalidData = T.NotifyCredentialInvalidData;\ntype __NotifyDeliveryEventData = T.NotifyDeliveryEventData;\ntype __NotifyDeviceEventData = T.NotifyDeviceEventData;\ntype __NotifyEmailAutoPausedData = T.NotifyEmailAutoPausedData;\ntype __NotifyInboxItemEventData = T.NotifyInboxItemEventData;\ntype __NotifyNotificationAcceptedData = T.NotifyNotificationAcceptedData;\ntype __NotifyNotificationWebhookData = T.NotifyNotificationWebhookData;\ntype __NotifyRecipientDeletedData = T.NotifyRecipientDeletedData;\ntype __NotifySettings = T.NotifySettings;\ntype __NotifyStatsCounts = T.NotifyStatsCounts;\ntype __NotifyStatsDay = T.NotifyStatsDay;\ntype __NotifyStats = T.NotifyStats;\ntype __NotifyWebhookChannelRendered = T.NotifyWebhookChannelRendered;\ntype __NotifyWebhookRecipient = T.NotifyWebhookRecipient;\ntype __Pagination = T.Pagination;\ntype __PlanBatch = T.PlanBatch;\ntype __PlanRow = T.PlanRow;\ntype __PreferenceCell = T.PreferenceCell;\ntype __PreferenceLink = T.PreferenceLink;\ntype __PreferenceSet = T.PreferenceSet;\ntype __PreviewChannel = T.PreviewChannel;\ntype __Preview = T.Preview;\ntype __QuietHours = T.QuietHours;\ntype __Recipient = T.Recipient;\ntype __RecipientErasure = T.RecipientErasure;\ntype __RecipientListPagination = T.RecipientListPagination;\ntype __RecipientList = T.RecipientList;\ntype __RecipientToken = T.RecipientToken;\ntype __RenderedPush = T.RenderedPush;\ntype __WebhookEventReplay = T.WebhookEventReplay;\ntype __ReplayWebhookEvent = T.WebhookEventReplay;\ntype __Retract = T.Retract;\ntype __RoutingView = T.RoutingView;\ntype __SendNotification = T.SendNotification;\ntype __SetupRow = T.SetupRow;\ntype __SetupRowFix = T.SetupRowFix;\ntype __SetupRowTest = T.SetupRowTest;\ntype __SetupStatus = T.SetupStatus;\ntype __SkippedRecipient = T.SkippedRecipient;\ntype __Template = T.Template;\ntype __TemplateSummary = T.TemplateSummary;\ntype __TemplateVersion = T.TemplateVersion;\ntype __TemplateVersionList = T.TemplateVersionList;\ntype __ThrottleView = T.ThrottleView;\ntype __TimelineDevice = T.TimelineDevice;\ntype __TimelineEntry = T.TimelineEntry;\ntype __Timeline = T.Timeline;\ntype __VapidKey = T.VapidKey;\ntype __VapidPublicKey = T.VapidPublicKey;\ntype __WebPushChannel = T.WebPushChannel;\ntype __WebhookDeliveryAttempt = T.WebhookDeliveryAttempt;\ntype __WebhookEndpoint = T.WebhookEndpoint;\ntype __WebhookEndpointWithSecret = T.WebhookEndpointWithSecret;\ntype __WebhookEventDelivery = T.WebhookEventDelivery;\ntype __WebhookEventDetail = T.WebhookEventDetail;\ntype __WebhookEvent = T.WebhookEvent;\ntype __WebhookEventTypeInfo = T.WebhookEventTypeInfo;\ntype __WebhookPagination = T.WebhookPagination;\ntype __MeApprovalDecideParams = T.MeApprovalDecideParams;\ntype __MeDeviceRegisterParams = T.MeDeviceRegisterParams;\ntype __MeInboxListParams = T.MeInboxListParams;\ntype __MeInboxMarkParams = T.MeInboxMarkParams;\ntype __MeInboxInteractParams = T.MeInboxInteractParams;\ntype __MePreferenceUpdateParams = T.MePreferenceUpdateParams;\ntype __ApprovalListParams = T.ApprovalListParams;\ntype __ApprovalCreateParams = T.ApprovalCreateParams;\ntype __ApprovalRetrieveParams = T.ApprovalRetrieveParams;\ntype __ApprovalRecordDecisionParams = T.ApprovalRecordDecisionParams;\ntype __BatchListParams = T.BatchListParams;\ntype __CategoryListParams = T.CategoryListParams;\ntype __CategoryCreateParams = T.CategoryCreateParams;\ntype __CategoryUpdateParams = T.CategoryUpdateParams;\ntype __ChannelApnUploadCredentialParams = T.ChannelApnUploadCredentialParams;\ntype __ChannelFcmUploadCredentialParams = T.ChannelFcmUploadCredentialParams;\ntype __ChannelWebpushGenerateVapidKeysParams = T.ChannelWebpushGenerateVapidKeysParams;\ntype __ChannelWebpushImportVapidKeysParams = T.ChannelWebpushImportVapidKeysParams;\ntype __DeliveryListParams = T.DeliveryListParams;\ntype __NotificationTypeListParams = T.NotificationTypeListParams;\ntype __NotificationTypeCreateParams = T.NotificationTypeCreateParams;\ntype __NotificationTypeReplaceByKeyParams = T.NotificationTypeReplaceByKeyParams;\ntype __NotificationTypeUpdateParams = T.NotificationTypeUpdateParams;\ntype __NotificationTypePreviewParams = T.NotificationTypePreviewParams;\ntype __NotificationTypeTemplateUpdateParams = T.NotificationTypeTemplateUpdateParams;\ntype __NotificationTypeTemplateRevertParams = T.NotificationTypeTemplateRevertParams;\ntype __NotificationListParams = T.NotificationListParams;\ntype __NotificationSendParams = T.NotificationSendParams;\ntype __NotificationSendResponse = T.NotificationSendResponse;\ntype __NotificationCancelByKeyParams = T.NotificationCancelByKeyParams;\ntype __RecipientTokenMintParams = T.RecipientTokenMintParams;\ntype __RecipientListParams = T.RecipientListParams;\ntype __RecipientBulkIdentifyParams = T.RecipientBulkIdentifyParams;\ntype __RecipientIdentifyParams = T.RecipientIdentifyParams;\ntype __RecipientUpdateParams = T.RecipientUpdateParams;\ntype __RecipientDeviceCreateParams = T.RecipientDeviceCreateParams;\ntype __RecipientInboxListParams = T.RecipientInboxListParams;\ntype __RecipientCreatePreferenceLinkParams = T.RecipientCreatePreferenceLinkParams;\ntype __RecipientPreferenceReplaceParams = T.RecipientPreferenceReplaceParams;\ntype __RecipientPreferenceUpdateParams = T.RecipientPreferenceUpdateParams;\ntype __RecipientTimelineParams = T.RecipientTimelineParams;\ntype __SettingsUpdateParams = T.SettingsUpdateParams;\ntype __StatsRetrieveParams = T.StatsRetrieveParams;\ntype __WebhookEndpointCreateParams = T.WebhookEndpointCreateParams;\ntype __WebhookEndpointUpdateParams = T.WebhookEndpointUpdateParams;\ntype __WebhookEndpointRotateSecretParams = T.WebhookEndpointRotateSecretParams;\ntype __WebhookEndpointTestParams = T.WebhookEndpointTestParams;\ntype __WebhookEventListParams = T.WebhookEventListParams;\ntype __WebhookEventReplayParams = T.WebhookEventReplayParams;\ntype __ErrorCode = E.NotifyErrorCode;\ntype __ApprovalResolvedEvent = W.ApprovalResolvedEvent;\ntype __CredentialInvalidEvent = W.CredentialInvalidEvent;\ntype __DeliveryBouncedEvent = W.DeliveryBouncedEvent;\ntype __DeliveryDeliveredEvent = W.DeliveryDeliveredEvent;\ntype __DeliveryFailedEvent = W.DeliveryFailedEvent;\ntype __DeliverySentEvent = W.DeliverySentEvent;\ntype __DeliverySkippedEvent = W.DeliverySkippedEvent;\ntype __DeviceMovedEvent = W.DeviceMovedEvent;\ntype __DevicePrunedEvent = W.DevicePrunedEvent;\ntype __EmailAutoPausedEvent = W.EmailAutoPausedEvent;\ntype __InboxItemArchivedEvent = W.InboxItemArchivedEvent;\ntype __InboxItemInteractedEvent = W.InboxItemInteractedEvent;\ntype __InboxItemReadEvent = W.InboxItemReadEvent;\ntype __NotificationAcceptedEvent = W.NotificationAcceptedEvent;\ntype __NotificationWebhookEvent = W.NotificationWebhookEvent;\ntype __RecipientDeletedEvent = W.RecipientDeletedEvent;\ntype __UnknownWebhookEvent = W.UnknownWebhookEvent;\ntype __UnwrapWebhookEvent = W.UnwrapWebhookEvent;\ntype __WebhookSignParams = W.WebhookSignParams;\ntype __WebhookUnwrapParams = W.WebhookUnwrapParams;\n/** Public types: `Notify.ApnsCredential`, `Notify.MeApprovalDecideParams`, … */\nexport namespace Notify {\n export type RequestOptions = __RequestOptions;\n export type PollOptions = __PollOptions;\n export type ClientOptions = __ClientOptions;\n export type Page<T> = __Page<T>;\n export type PagePromise<T> = __PagePromise<T>;\n export type APIPromise<T> = __APIPromise<T>;\n export type WithResponse<T> = __WithResponse<T>;\n export type RateLimitInfo = __RateLimitInfo;\n export type LastResponse = __LastResponse;\n export type ApnsCredentialEnvironment = __ApnsCredentialEnvironment;\n export const ApnsCredentialEnvironment = T.ApnsCredentialEnvironment;\n export type ApnsEnvironment = __ApnsEnvironment;\n export const ApnsEnvironment = T.ApnsEnvironment;\n export type BulkRowStatus = __BulkRowStatus;\n export const BulkRowStatus = T.BulkRowStatus;\n export type CategoryDefault = __CategoryDefault;\n export const CategoryDefault = T.CategoryDefault;\n export type ChannelReadiness = __ChannelReadiness;\n export const ChannelReadiness = T.ChannelReadiness;\n export type ClientInboxStatusFilter = __ClientInboxStatusFilter;\n export const ClientInboxStatusFilter = T.ClientInboxStatusFilter;\n export type CredentialEnvironment = __CredentialEnvironment;\n export const CredentialEnvironment = T.CredentialEnvironment;\n export type CredentialOrigin = __CredentialOrigin;\n export const CredentialOrigin = T.CredentialOrigin;\n export type CredentialProvider = __CredentialProvider;\n export const CredentialProvider = T.CredentialProvider;\n export type CredentialStatus = __CredentialStatus;\n export const CredentialStatus = T.CredentialStatus;\n export type DeliveryState = __DeliveryState;\n export const DeliveryState = T.DeliveryState;\n export type DeviceChannel = __DeviceChannel;\n export const DeviceChannel = T.DeviceChannel;\n export type DeviceMoveDirection = __DeviceMoveDirection;\n export const DeviceMoveDirection = T.DeviceMoveDirection;\n export type DevicePlatform = __DevicePlatform;\n export const DevicePlatform = T.DevicePlatform;\n export type DeviceState = __DeviceState;\n export const DeviceState = T.DeviceState;\n export type InboxItemStatusFilter = __InboxItemStatusFilter;\n export const InboxItemStatusFilter = T.InboxItemStatusFilter;\n export type InboxMarkAction = __InboxMarkAction;\n export const InboxMarkAction = T.InboxMarkAction;\n export type NotificationStatus = __NotificationStatus;\n export const NotificationStatus = T.NotificationStatus;\n export type NotifyApprovalDecidedVia = __NotifyApprovalDecidedVia;\n export const NotifyApprovalDecidedVia = T.NotifyApprovalDecidedVia;\n export type NotifyApprovalDecision = __NotifyApprovalDecision;\n export const NotifyApprovalDecision = T.NotifyApprovalDecision;\n export type NotifyApprovalOutcome = __NotifyApprovalOutcome;\n export const NotifyApprovalOutcome = T.NotifyApprovalOutcome;\n export type NotifyApprovalOutcomeVia = __NotifyApprovalOutcomeVia;\n export const NotifyApprovalOutcomeVia = T.NotifyApprovalOutcomeVia;\n export type NotifyApprovalReasonPolicy = __NotifyApprovalReasonPolicy;\n export const NotifyApprovalReasonPolicy = T.NotifyApprovalReasonPolicy;\n export type NotifyApprovalRequesterKind = __NotifyApprovalRequesterKind;\n export const NotifyApprovalRequesterKind = T.NotifyApprovalRequesterKind;\n export type NotifyApprovalRequesterViewKind = __NotifyApprovalRequesterViewKind;\n export const NotifyApprovalRequesterViewKind = T.NotifyApprovalRequesterViewKind;\n export type NotifyApprovalStatus = __NotifyApprovalStatus;\n export const NotifyApprovalStatus = T.NotifyApprovalStatus;\n export type NotifyApprovalTimeoutOutcome = __NotifyApprovalTimeoutOutcome;\n export const NotifyApprovalTimeoutOutcome = T.NotifyApprovalTimeoutOutcome;\n export type NotifyBatchInboxMode = __NotifyBatchInboxMode;\n export const NotifyBatchInboxMode = T.NotifyBatchInboxMode;\n export type NotifyBatchMode = __NotifyBatchMode;\n export const NotifyBatchMode = T.NotifyBatchMode;\n export type NotifyBatchState = __NotifyBatchState;\n export const NotifyBatchState = T.NotifyBatchState;\n export type NotifyChannel = __NotifyChannel;\n export const NotifyChannel = T.NotifyChannel;\n export type NotifyDeliveryReason = __NotifyDeliveryReason;\n export const NotifyDeliveryReason = T.NotifyDeliveryReason;\n export type NotifyDigestFrequency = __NotifyDigestFrequency;\n export const NotifyDigestFrequency = T.NotifyDigestFrequency;\n export type NotifyEmailPauseReason = __NotifyEmailPauseReason;\n export const NotifyEmailPauseReason = T.NotifyEmailPauseReason;\n export type NotifyQuietHoursSource = __NotifyQuietHoursSource;\n export const NotifyQuietHoursSource = T.NotifyQuietHoursSource;\n export type NotifyRecipientDeletionCause = __NotifyRecipientDeletionCause;\n export const NotifyRecipientDeletionCause = T.NotifyRecipientDeletionCause;\n export type NotifyStatsChannel = __NotifyStatsChannel;\n export const NotifyStatsChannel = T.NotifyStatsChannel;\n export type NotifyWebhookChannel = __NotifyWebhookChannel;\n export const NotifyWebhookChannel = T.NotifyWebhookChannel;\n export type NotifyWebhookCredentialProvider = __NotifyWebhookCredentialProvider;\n export const NotifyWebhookCredentialProvider = T.NotifyWebhookCredentialProvider;\n export type NotifyWebhookDeliveryState = __NotifyWebhookDeliveryState;\n export const NotifyWebhookDeliveryState = T.NotifyWebhookDeliveryState;\n export type NotifyWebhookDeviceChannel = __NotifyWebhookDeviceChannel;\n export const NotifyWebhookDeviceChannel = T.NotifyWebhookDeviceChannel;\n export type NotifyWeekday = __NotifyWeekday;\n export const NotifyWeekday = T.NotifyWeekday;\n export type PlanDecision = __PlanDecision;\n export const PlanDecision = T.PlanDecision;\n export type PreferenceChannel = __PreferenceChannel;\n export const PreferenceChannel = T.PreferenceChannel;\n export type PreferenceScope = __PreferenceScope;\n export const PreferenceScope = T.PreferenceScope;\n export type RecipientErasureStatus = __RecipientErasureStatus;\n export const RecipientErasureStatus = T.RecipientErasureStatus;\n export type RecipientInclude = __RecipientInclude;\n export const RecipientInclude = T.RecipientInclude;\n export type RecipientTokenScope = __RecipientTokenScope;\n export const RecipientTokenScope = T.RecipientTokenScope;\n export type SendStatus = __SendStatus;\n export const SendStatus = T.SendStatus;\n export type SetupRowState = __SetupRowState;\n export const SetupRowState = T.SetupRowState;\n export type WebhookAttemptTrigger = __WebhookAttemptTrigger;\n export const WebhookAttemptTrigger = T.WebhookAttemptTrigger;\n export type WebhookEndpointDisabledReason = __WebhookEndpointDisabledReason;\n export const WebhookEndpointDisabledReason = T.WebhookEndpointDisabledReason;\n export type WebhookEndpointStatus = __WebhookEndpointStatus;\n export const WebhookEndpointStatus = T.WebhookEndpointStatus;\n export type WebhookEventStatus = __WebhookEventStatus;\n export const WebhookEventStatus = T.WebhookEventStatus;\n export type WebhookEventType = __WebhookEventType;\n export const WebhookEventType = T.WebhookEventType;\n export type ApnsCredential = __ApnsCredential;\n export type ApprovalConfigView = __ApprovalConfigView;\n export type ApprovalDetail = __ApprovalDetail;\n export type Approval = __Approval;\n export type ApprovalEvent = __ApprovalEvent;\n export type ApprovalList = __ApprovalList;\n export type ApprovalRequesterView = __ApprovalRequesterView;\n export type BatchDelivery = __BatchDelivery;\n export type BatchDetail = __BatchDetail;\n export type BatchList = __BatchList;\n export type BatchScheduleView = __BatchScheduleView;\n export type BatchSummary = __BatchSummary;\n export type BatchView = __BatchView;\n export type BulkRowError = __BulkRowError;\n export type BulkRowResult = __BulkRowResult;\n export type BulkUpsertRecipients = __BulkUpsertRecipients;\n export type CancelByKey = __CancelByKey;\n export type CategoryDefaultsView = __CategoryDefaultsView;\n export type Category = __Category;\n export type CategoryList = __CategoryList;\n export type ChannelCounts = __ChannelCounts;\n export type ChannelCredential = __ChannelCredential;\n export type ChannelList = __ChannelList;\n export type ChannelStatus = __ChannelStatus;\n export type ClientCategory = __ClientCategory;\n export type ClientInboxList = __ClientInboxList;\n export type ClientPreferences = __ClientPreferences;\n export type DeliveryAttempt = __DeliveryAttempt;\n export type DeliveryDetail = __DeliveryDetail;\n export type Delivery = __Delivery;\n export type DeliveryList = __DeliveryList;\n export type Device = __Device;\n export type DeviceList = __DeviceList;\n export type DeviceMove = __DeviceMove;\n export type DryRun = __DryRun;\n export type EffectiveQuietHours = __EffectiveQuietHours;\n export type Export = __Export;\n export type ExportNotificationType = __ExportNotificationType;\n export type ExportSettings = __ExportSettings;\n export type FallbackStepView = __FallbackStepView;\n export type FcmCredential = __FcmCredential;\n export type FlushBatch = __FlushBatch;\n export type InboxAction = __InboxAction;\n export type InboxCounts = __InboxCounts;\n export type InboxItem = __InboxItem;\n export type InboxList = __InboxList;\n export type ListPagination = __ListPagination;\n export type WebhookEndpointList = __WebhookEndpointList;\n /** @deprecated Renamed to `Notify.WebhookEndpointList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEndpoints = __ListWebhookEndpoints;\n export type WebhookEventTypeList = __WebhookEventTypeList;\n /** @deprecated Renamed to `Notify.WebhookEventTypeList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEventTypes = __ListWebhookEventTypes;\n export type WebhookEventList = __WebhookEventList;\n /** @deprecated Renamed to `Notify.WebhookEventList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEvents = __ListWebhookEvents;\n export type MarkInboxResult = __MarkInboxResult;\n export type NotificationActor = __NotificationActor;\n export type Notification = __Notification;\n export type NotificationList = __NotificationList;\n export type NotificationType = __NotificationType;\n export type NotificationTypeList = __NotificationTypeList;\n export type NotifyApprovalRequester = __NotifyApprovalRequester;\n export type NotifyApprovalResolvedData = __NotifyApprovalResolvedData;\n export type NotifyBrandingView = __NotifyBrandingView;\n export type NotifyCredentialInvalidData = __NotifyCredentialInvalidData;\n export type NotifyDeliveryEventData = __NotifyDeliveryEventData;\n export type NotifyDeviceEventData = __NotifyDeviceEventData;\n export type NotifyEmailAutoPausedData = __NotifyEmailAutoPausedData;\n export type NotifyInboxItemEventData = __NotifyInboxItemEventData;\n export type NotifyNotificationAcceptedData = __NotifyNotificationAcceptedData;\n export type NotifyNotificationWebhookData = __NotifyNotificationWebhookData;\n export type NotifyRecipientDeletedData = __NotifyRecipientDeletedData;\n export type NotifySettings = __NotifySettings;\n export type NotifyStatsCounts = __NotifyStatsCounts;\n export type NotifyStatsDay = __NotifyStatsDay;\n export type NotifyStats = __NotifyStats;\n export type NotifyWebhookChannelRendered = __NotifyWebhookChannelRendered;\n export type NotifyWebhookRecipient = __NotifyWebhookRecipient;\n export type Pagination = __Pagination;\n export type PlanBatch = __PlanBatch;\n export type PlanRow = __PlanRow;\n export type PreferenceCell = __PreferenceCell;\n export type PreferenceLink = __PreferenceLink;\n export type PreferenceSet = __PreferenceSet;\n export type PreviewChannel = __PreviewChannel;\n export type Preview = __Preview;\n export type QuietHours = __QuietHours;\n export type Recipient = __Recipient;\n export type RecipientErasure = __RecipientErasure;\n export type RecipientListPagination = __RecipientListPagination;\n export type RecipientList = __RecipientList;\n export type RecipientToken = __RecipientToken;\n export type RenderedPush = __RenderedPush;\n export type WebhookEventReplay = __WebhookEventReplay;\n /** @deprecated Renamed to `Notify.WebhookEventReplay`. Kept for 1.x callers; removed in the next major. */\n export type ReplayWebhookEvent = __ReplayWebhookEvent;\n export type Retract = __Retract;\n export type RoutingView = __RoutingView;\n export type SendNotification = __SendNotification;\n export type SetupRow = __SetupRow;\n export type SetupRowFix = __SetupRowFix;\n export type SetupRowTest = __SetupRowTest;\n export type SetupStatus = __SetupStatus;\n export type SkippedRecipient = __SkippedRecipient;\n export type Template = __Template;\n export type TemplateSummary = __TemplateSummary;\n export type TemplateVersion = __TemplateVersion;\n export type TemplateVersionList = __TemplateVersionList;\n export type ThrottleView = __ThrottleView;\n export type TimelineDevice = __TimelineDevice;\n export type TimelineEntry = __TimelineEntry;\n export type Timeline = __Timeline;\n export type VapidKey = __VapidKey;\n export type VapidPublicKey = __VapidPublicKey;\n export type WebPushChannel = __WebPushChannel;\n export type WebhookDeliveryAttempt = __WebhookDeliveryAttempt;\n export type WebhookEndpoint = __WebhookEndpoint;\n export type WebhookEndpointWithSecret = __WebhookEndpointWithSecret;\n export type WebhookEventDelivery = __WebhookEventDelivery;\n export type WebhookEventDetail = __WebhookEventDetail;\n export type WebhookEvent = __WebhookEvent;\n export type WebhookEventTypeInfo = __WebhookEventTypeInfo;\n export type WebhookPagination = __WebhookPagination;\n export type MeApprovalDecideParams = __MeApprovalDecideParams;\n export type MeDeviceRegisterParams = __MeDeviceRegisterParams;\n export type MeInboxListParams = __MeInboxListParams;\n export type MeInboxMarkParams = __MeInboxMarkParams;\n export type MeInboxInteractParams = __MeInboxInteractParams;\n export type MePreferenceUpdateParams = __MePreferenceUpdateParams;\n export type ApprovalListParams = __ApprovalListParams;\n export type ApprovalCreateParams = __ApprovalCreateParams;\n export type ApprovalRetrieveParams = __ApprovalRetrieveParams;\n export type ApprovalRecordDecisionParams = __ApprovalRecordDecisionParams;\n export type BatchListParams = __BatchListParams;\n export type CategoryListParams = __CategoryListParams;\n export type CategoryCreateParams = __CategoryCreateParams;\n export type CategoryUpdateParams = __CategoryUpdateParams;\n export type ChannelApnUploadCredentialParams = __ChannelApnUploadCredentialParams;\n export type ChannelFcmUploadCredentialParams = __ChannelFcmUploadCredentialParams;\n export type ChannelWebpushGenerateVapidKeysParams = __ChannelWebpushGenerateVapidKeysParams;\n export type ChannelWebpushImportVapidKeysParams = __ChannelWebpushImportVapidKeysParams;\n export type DeliveryListParams = __DeliveryListParams;\n export type NotificationTypeListParams = __NotificationTypeListParams;\n export type NotificationTypeCreateParams = __NotificationTypeCreateParams;\n export type NotificationTypeReplaceByKeyParams = __NotificationTypeReplaceByKeyParams;\n export type NotificationTypeUpdateParams = __NotificationTypeUpdateParams;\n export type NotificationTypePreviewParams = __NotificationTypePreviewParams;\n export type NotificationTypeTemplateUpdateParams = __NotificationTypeTemplateUpdateParams;\n export type NotificationTypeTemplateRevertParams = __NotificationTypeTemplateRevertParams;\n export type NotificationListParams = __NotificationListParams;\n export type NotificationSendParams = __NotificationSendParams;\n export type NotificationSendResponse = __NotificationSendResponse;\n export type NotificationCancelByKeyParams = __NotificationCancelByKeyParams;\n export type RecipientTokenMintParams = __RecipientTokenMintParams;\n export type RecipientListParams = __RecipientListParams;\n export type RecipientBulkIdentifyParams = __RecipientBulkIdentifyParams;\n export type RecipientIdentifyParams = __RecipientIdentifyParams;\n export type RecipientUpdateParams = __RecipientUpdateParams;\n export type RecipientDeviceCreateParams = __RecipientDeviceCreateParams;\n export type RecipientInboxListParams = __RecipientInboxListParams;\n export type RecipientCreatePreferenceLinkParams = __RecipientCreatePreferenceLinkParams;\n export type RecipientPreferenceReplaceParams = __RecipientPreferenceReplaceParams;\n export type RecipientPreferenceUpdateParams = __RecipientPreferenceUpdateParams;\n export type RecipientTimelineParams = __RecipientTimelineParams;\n export type SettingsUpdateParams = __SettingsUpdateParams;\n export type StatsRetrieveParams = __StatsRetrieveParams;\n export type WebhookEndpointCreateParams = __WebhookEndpointCreateParams;\n export type WebhookEndpointUpdateParams = __WebhookEndpointUpdateParams;\n export type WebhookEndpointRotateSecretParams = __WebhookEndpointRotateSecretParams;\n export type WebhookEndpointTestParams = __WebhookEndpointTestParams;\n export type WebhookEventListParams = __WebhookEventListParams;\n export type WebhookEventReplayParams = __WebhookEventReplayParams;\n export type ErrorCode = __ErrorCode;\n export type ApprovalResolvedEvent = __ApprovalResolvedEvent;\n export type CredentialInvalidEvent = __CredentialInvalidEvent;\n export type DeliveryBouncedEvent = __DeliveryBouncedEvent;\n export type DeliveryDeliveredEvent = __DeliveryDeliveredEvent;\n export type DeliveryFailedEvent = __DeliveryFailedEvent;\n export type DeliverySentEvent = __DeliverySentEvent;\n export type DeliverySkippedEvent = __DeliverySkippedEvent;\n export type DeviceMovedEvent = __DeviceMovedEvent;\n export type DevicePrunedEvent = __DevicePrunedEvent;\n export type EmailAutoPausedEvent = __EmailAutoPausedEvent;\n export type InboxItemArchivedEvent = __InboxItemArchivedEvent;\n export type InboxItemInteractedEvent = __InboxItemInteractedEvent;\n export type InboxItemReadEvent = __InboxItemReadEvent;\n export type NotificationAcceptedEvent = __NotificationAcceptedEvent;\n export type NotificationWebhookEvent = __NotificationWebhookEvent;\n export type RecipientDeletedEvent = __RecipientDeletedEvent;\n export type UnknownWebhookEvent = __UnknownWebhookEvent;\n export type UnwrapWebhookEvent = __UnwrapWebhookEvent;\n export type WebhookSignParams = __WebhookSignParams;\n export type WebhookUnwrapParams = __WebhookUnwrapParams;\n}\n","// Generated by scripts/gen-sdk.mjs from Specs/notify.json. Do not edit.\n\nexport { APIConnectionError, APIError, APITimeoutError, APIUserAbortError, AuthenticationError, BadRequestError, ConfigurationError, ConflictError, IdempotencyKeyReuseError, InternalServerError, NotFoundError, PaymentRequiredError, PermissionDeniedError, ProductCraftError, RateLimitError, UnprocessableEntityError, WebhookVerificationError } from \"@productcraft/core\";\n\n/** Error codes this API documents. Open: codes added later still type-check. See https://productcraft.co/docs/errors. */\nexport type NotifyErrorCode = \"BAD_REQUEST\" | \"VALIDATION_ERROR\" | \"UNAUTHORIZED\" | \"PAYMENT_REQUIRED\" | \"FORBIDDEN\" | \"NOT_FOUND\" | \"METHOD_NOT_ALLOWED\" | \"NOT_ACCEPTABLE\" | \"REQUEST_TIMEOUT\" | \"CONFLICT\" | \"GONE\" | \"PRECONDITION_FAILED\" | \"PAYLOAD_TOO_LARGE\" | \"UNSUPPORTED_MEDIA_TYPE\" | \"UNPROCESSABLE_ENTITY\" | \"PRECONDITION_REQUIRED\" | \"RATE_LIMITED\" | \"INTERNAL_SERVER_ERROR\" | \"NOT_IMPLEMENTED\" | \"BAD_GATEWAY\" | \"SERVICE_UNAVAILABLE\" | \"GATEWAY_TIMEOUT\" | \"SERVICE_NOT_ENABLED\" | \"INVALID_CREDENTIALS\" | \"SESSION_REVOKED\" | \"MCP_NOT_PERMITTED\" | \"MCP_WORKSPACE_MISMATCH\" | \"PAK_NOT_PERMITTED\" | \"ACTIONS_NOT_GRANTABLE\" | \"IDEMPOTENCY_KEY_REUSE\" | \"IDEMPOTENCY_KEY_REQUIRED\" | \"IDEMPOTENCY_IN_PROGRESS\" | \"WEBHOOK_ENDPOINT_LIMIT\" | \"WEBHOOK_ENDPOINT_NOT_FOUND\" | \"WEBHOOK_ENDPOINT_NOT_SUBSCRIBED\" | \"WEBHOOK_EVENT_NOT_FOUND\" | \"WEBHOOK_EVENT_TYPE_UNKNOWN\" | \"NOTIFICATION_TYPE_NOT_FOUND\" | \"NOTIFICATION_TYPE_ARCHIVED\" | \"RECIPIENT_NOT_FOUND\" | \"TOO_MANY_RECIPIENTS\" | \"DATA_TOO_LARGE\" | \"TEMPLATE_MISSING\" | \"TEMPLATE_INVALID\" | \"CHANNEL_NOT_CONFIGURED\" | \"CREDENTIAL_INVALID\" | \"CREDENTIAL_NOT_FOUND\" | \"CREDENTIAL_MISMATCH\" | \"DEVICE_TOKEN_INVALID\" | \"WEBPUSH_ENDPOINT_NOT_ALLOWED\" | \"RECIPIENT_TOKEN_INVALID\" | \"RECIPIENT_TOKEN_EXPIRED\" | \"RECIPIENT_TOKEN_SCOPE\" | \"ORIGIN_NOT_ALLOWED\" | \"STREAM_LIMIT\" | \"LIMIT_EXCEEDED\" | \"BATCHED_TYPE_NOT_SCHEDULABLE\" | \"APPROVAL_NOT_FOUND\" | \"APPROVAL_NOT_PENDING\" | \"APPROVAL_REASON_REQUIRED\" | \"APPROVAL_TYPE_SEND_REFUSED\" | \"NOT_AN_APPROVAL_TYPE\" | \"NOT_AN_APPROVER\" | \"BATCH_NOT_FOUND\" | \"BATCH_NOT_OPEN\" | \"SEND_AT_OUT_OF_RANGE\" | \"UNSAFE_URL\" | \"AUTH_USER_ALREADY_LINKED\" | \"DEVICE_NOT_FOUND\" | \"CATEGORY_NOT_FOUND\" | \"CATEGORY_KEY_TAKEN\" | \"CATEGORY_IN_USE\" | \"NOTIFICATION_TYPE_KEY_TAKEN\" | \"TEMPLATE_NOT_FOUND\" | \"TEMPLATE_VERSION_NOT_FOUND\" | \"PREFERENCE_LOCKED\" | \"NOTIFICATION_NOT_FOUND\" | \"DELIVERY_NOT_FOUND\" | \"CONFIRMATION_REQUIRED\" | \"INBOX_ITEM_NOT_FOUND\" | \"RECIPIENT_ERASED\" | \"DEVICE_MOVE_LIMIT\" | (string & {});\nexport const NotifyErrorCode = { values: [\"BAD_REQUEST\", \"VALIDATION_ERROR\", \"UNAUTHORIZED\", \"PAYMENT_REQUIRED\", \"FORBIDDEN\", \"NOT_FOUND\", \"METHOD_NOT_ALLOWED\", \"NOT_ACCEPTABLE\", \"REQUEST_TIMEOUT\", \"CONFLICT\", \"GONE\", \"PRECONDITION_FAILED\", \"PAYLOAD_TOO_LARGE\", \"UNSUPPORTED_MEDIA_TYPE\", \"UNPROCESSABLE_ENTITY\", \"PRECONDITION_REQUIRED\", \"RATE_LIMITED\", \"INTERNAL_SERVER_ERROR\", \"NOT_IMPLEMENTED\", \"BAD_GATEWAY\", \"SERVICE_UNAVAILABLE\", \"GATEWAY_TIMEOUT\", \"SERVICE_NOT_ENABLED\", \"INVALID_CREDENTIALS\", \"SESSION_REVOKED\", \"MCP_NOT_PERMITTED\", \"MCP_WORKSPACE_MISMATCH\", \"PAK_NOT_PERMITTED\", \"ACTIONS_NOT_GRANTABLE\", \"IDEMPOTENCY_KEY_REUSE\", \"IDEMPOTENCY_KEY_REQUIRED\", \"IDEMPOTENCY_IN_PROGRESS\", \"WEBHOOK_ENDPOINT_LIMIT\", \"WEBHOOK_ENDPOINT_NOT_FOUND\", \"WEBHOOK_ENDPOINT_NOT_SUBSCRIBED\", \"WEBHOOK_EVENT_NOT_FOUND\", \"WEBHOOK_EVENT_TYPE_UNKNOWN\", \"NOTIFICATION_TYPE_NOT_FOUND\", \"NOTIFICATION_TYPE_ARCHIVED\", \"RECIPIENT_NOT_FOUND\", \"TOO_MANY_RECIPIENTS\", \"DATA_TOO_LARGE\", \"TEMPLATE_MISSING\", \"TEMPLATE_INVALID\", \"CHANNEL_NOT_CONFIGURED\", \"CREDENTIAL_INVALID\", \"CREDENTIAL_NOT_FOUND\", \"CREDENTIAL_MISMATCH\", \"DEVICE_TOKEN_INVALID\", \"WEBPUSH_ENDPOINT_NOT_ALLOWED\", \"RECIPIENT_TOKEN_INVALID\", \"RECIPIENT_TOKEN_EXPIRED\", \"RECIPIENT_TOKEN_SCOPE\", \"ORIGIN_NOT_ALLOWED\", \"STREAM_LIMIT\", \"LIMIT_EXCEEDED\", \"BATCHED_TYPE_NOT_SCHEDULABLE\", \"APPROVAL_NOT_FOUND\", \"APPROVAL_NOT_PENDING\", \"APPROVAL_REASON_REQUIRED\", \"APPROVAL_TYPE_SEND_REFUSED\", \"NOT_AN_APPROVAL_TYPE\", \"NOT_AN_APPROVER\", \"BATCH_NOT_FOUND\", \"BATCH_NOT_OPEN\", \"SEND_AT_OUT_OF_RANGE\", \"UNSAFE_URL\", \"AUTH_USER_ALREADY_LINKED\", \"DEVICE_NOT_FOUND\", \"CATEGORY_NOT_FOUND\", \"CATEGORY_KEY_TAKEN\", \"CATEGORY_IN_USE\", \"NOTIFICATION_TYPE_KEY_TAKEN\", \"TEMPLATE_NOT_FOUND\", \"TEMPLATE_VERSION_NOT_FOUND\", \"PREFERENCE_LOCKED\", \"NOTIFICATION_NOT_FOUND\", \"DELIVERY_NOT_FOUND\", \"CONFIRMATION_REQUIRED\", \"INBOX_ITEM_NOT_FOUND\", \"RECIPIENT_ERASED\", \"DEVICE_MOVE_LIMIT\"] as const };\n"]}
|