@proxyrequest/sdk 2.1.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["encoder","headersToRecord","#client","#fetch","#headers","#openapi","createClient"],"sources":["../src/errors.ts","../src/files.ts","../src/generated/resources.ts","../src/pagination.ts","../src/client.ts","../src/webhooks.ts"],"sourcesContent":["const encoder = new TextEncoder();\n\nexport type ErrorKind =\n | \"validation\"\n | \"authentication\"\n | \"permission\"\n | \"not_found\"\n | \"conflict\"\n | \"precondition\"\n | \"rate_limit\"\n | \"server\"\n | \"network\"\n | \"unexpected\";\n\nexport class ProxyRequestError extends Error {\n override readonly name: string = \"ProxyRequestError\";\n}\n\nexport interface ApiErrorOptions {\n kind: ErrorKind;\n statusCode?: number;\n detail?: string;\n fieldErrors?: Record<string, string[]>;\n requestId?: string;\n retryAfter?: number;\n contentLanguage?: string;\n currentEtag?: string;\n idempotencyKey?: string;\n headers?: Record<string, string>;\n rawBody?: Uint8Array;\n cause?: unknown;\n}\n\nexport class ApiError extends ProxyRequestError {\n override readonly name = \"ApiError\";\n readonly kind: ErrorKind;\n readonly statusCode: number | undefined;\n readonly detail: string | undefined;\n readonly fieldErrors: Readonly<Record<string, string[]>>;\n readonly requestId: string | undefined;\n readonly retryAfter: number | undefined;\n readonly contentLanguage: string | undefined;\n readonly currentEtag: string | undefined;\n readonly idempotencyKey: string | undefined;\n readonly headers: Readonly<Record<string, string>>;\n readonly rawBody: Uint8Array;\n override readonly cause: unknown;\n\n constructor(message: string, options: ApiErrorOptions) {\n super(message);\n this.kind = options.kind;\n this.statusCode = options.statusCode;\n this.detail = options.detail;\n this.fieldErrors = options.fieldErrors ?? {};\n this.requestId = options.requestId;\n this.retryAfter = options.retryAfter;\n this.contentLanguage = options.contentLanguage;\n this.currentEtag = options.currentEtag;\n this.idempotencyKey = options.idempotencyKey;\n this.headers = options.headers ?? {};\n this.rawBody = options.rawBody ?? new Uint8Array();\n this.cause = options.cause;\n }\n\n static async fromResponse(response: Response): Promise<ApiError> {\n const headers = headersToRecord(response.headers);\n let rawBody = new Uint8Array();\n try {\n rawBody = new Uint8Array(await response.clone().arrayBuffer());\n } catch {\n // A response supplied by a custom fetch can expose an unreadable body.\n }\n return ApiError.fromPayload(response.status, rawBody, headers);\n }\n\n static fromPayload(\n statusCode: number,\n rawBody: Uint8Array,\n headers: Record<string, string> = {},\n ): ApiError {\n const payload = decodeJson(rawBody);\n const detail = errorDetail(payload);\n const kind = kindForStatus(statusCode);\n const requestId = header(headers, \"x-request-id\", \"x-correlation-id\");\n const retryAfter = numberHeader(headers, \"retry-after\");\n const contentLanguage = header(headers, \"content-language\");\n const currentEtag = header(headers, \"etag\");\n return new ApiError(detail ?? `ProxyRequest API returned HTTP ${statusCode}.`, {\n kind,\n statusCode,\n ...(detail === undefined ? {} : { detail }),\n fieldErrors: fieldErrors(payload),\n ...(requestId === undefined ? {} : { requestId }),\n ...(retryAfter === undefined ? {} : { retryAfter }),\n ...(contentLanguage === undefined ? {} : { contentLanguage }),\n ...(currentEtag === undefined ? {} : { currentEtag }),\n headers,\n rawBody,\n });\n }\n\n static network(cause: unknown): ApiError {\n const detail = cause instanceof Error ? cause.message : String(cause);\n return new ApiError(`ProxyRequest network request failed: ${detail}`, {\n kind: \"network\",\n cause,\n });\n }\n\n static unexpected(message: string, cause?: unknown): ApiError {\n return new ApiError(message, {\n kind: \"unexpected\",\n ...(cause === undefined ? {} : { cause }),\n });\n }\n\n withIdempotencyKey(idempotencyKey: string | undefined): ApiError {\n if (idempotencyKey === undefined || this.idempotencyKey === idempotencyKey) return this;\n return new ApiError(this.message, {\n kind: this.kind,\n ...(this.statusCode === undefined ? {} : { statusCode: this.statusCode }),\n ...(this.detail === undefined ? {} : { detail: this.detail }),\n fieldErrors: { ...this.fieldErrors },\n ...(this.requestId === undefined ? {} : { requestId: this.requestId }),\n ...(this.retryAfter === undefined ? {} : { retryAfter: this.retryAfter }),\n ...(this.contentLanguage === undefined ? {} : { contentLanguage: this.contentLanguage }),\n ...(this.currentEtag === undefined ? {} : { currentEtag: this.currentEtag }),\n idempotencyKey,\n headers: { ...this.headers },\n rawBody: this.rawBody,\n ...(this.cause === undefined ? {} : { cause: this.cause }),\n });\n }\n}\n\nexport class PaginationError extends ProxyRequestError {\n override readonly name = \"PaginationError\";\n}\n\nexport class InvalidSignatureError extends ProxyRequestError {\n override readonly name = \"InvalidSignatureError\";\n}\n\nfunction kindForStatus(statusCode: number): ErrorKind {\n if (statusCode === 400 || statusCode === 422) return \"validation\";\n if (statusCode === 401) return \"authentication\";\n if (statusCode === 403) return \"permission\";\n if (statusCode === 404) return \"not_found\";\n if (statusCode === 409) return \"conflict\";\n if (statusCode === 412) return \"precondition\";\n if (statusCode === 429) return \"rate_limit\";\n if (statusCode >= 500) return \"server\";\n return \"unexpected\";\n}\n\nfunction headersToRecord(headers: Headers): Record<string, string> {\n return Object.fromEntries(\n [...headers.entries()].map(([key, value]) => [key.toLowerCase(), value]),\n );\n}\n\nfunction header(headers: Record<string, string>, ...names: string[]): string | undefined {\n for (const name of names) {\n const value = headers[name.toLowerCase()];\n if (value !== undefined && value !== \"\") return value;\n }\n return undefined;\n}\n\nfunction numberHeader(headers: Record<string, string>, name: string): number | undefined {\n const value = header(headers, name);\n if (value === undefined) return undefined;\n const number = Number(value);\n return Number.isFinite(number) ? number : undefined;\n}\n\nfunction decodeJson(rawBody: Uint8Array): unknown {\n if (rawBody.byteLength === 0) return undefined;\n try {\n return JSON.parse(new TextDecoder().decode(rawBody));\n } catch {\n return undefined;\n }\n}\n\nfunction errorDetail(payload: unknown): string | undefined {\n if (typeof payload === \"string\" && payload.length > 0) return payload;\n if (!isRecord(payload)) return undefined;\n for (const key of [\"detail\", \"message\", \"error\"]) {\n const value = payload[key];\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\nfunction fieldErrors(payload: unknown): Record<string, string[]> {\n if (!isRecord(payload)) return {};\n const source = isRecord(payload.errors) ? payload.errors : payload;\n const result: Record<string, string[]> = {};\n for (const [key, value] of Object.entries(source)) {\n if ([\"detail\", \"message\", \"error\", \"code\"].includes(key)) continue;\n if (typeof value === \"string\") result[key] = [value];\n if (Array.isArray(value) && value.every((item) => typeof item === \"string\")) {\n result[key] = value;\n }\n }\n return result;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nexport function bodyFromUnknown(value: unknown): Uint8Array {\n if (value instanceof Uint8Array) return value;\n if (typeof value === \"string\") return encoder.encode(value);\n return encoder.encode(JSON.stringify(value));\n}\n","export class FileDownload {\n readonly content: Uint8Array;\n readonly filename: string;\n readonly contentType: string;\n\n constructor(content: Uint8Array, filename: string, contentType: string) {\n this.content = content;\n this.filename = filename;\n this.contentType = contentType;\n }\n\n static fromResponse(content: ArrayBuffer | Uint8Array, headers: Headers): FileDownload {\n const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);\n const contentType = (headers.get(\"content-type\") ?? \"application/octet-stream\")\n .split(\";\", 1)[0]\n ?.trim();\n return new FileDownload(\n bytes,\n filenameFromDisposition(headers.get(\"content-disposition\")),\n contentType || \"application/octet-stream\",\n );\n }\n\n arrayBuffer(): ArrayBuffer {\n return this.content.slice().buffer;\n }\n\n blob(): Blob {\n return new Blob([this.arrayBuffer()], { type: this.contentType });\n }\n\n text(): string {\n return new TextDecoder().decode(this.content);\n }\n}\n\nfunction filenameFromDisposition(disposition: string | null): string {\n if (disposition === null) return \"download.bin\";\n const encoded = /filename\\*=UTF-8''([^;]+)/iu.exec(disposition)?.[1];\n if (encoded !== undefined) {\n try {\n return safeBasename(decodeURIComponent(encoded.trim()));\n } catch {\n return safeBasename(encoded.trim());\n }\n }\n const plain = /filename=(?:\"([^\"]+)\"|([^;]+))/iu.exec(disposition);\n return safeBasename((plain?.[1] ?? plain?.[2] ?? \"download.bin\").trim());\n}\n\nfunction safeBasename(filename: string): string {\n const normalized = filename.replaceAll(\"\\\\\", \"/\");\n const basename = normalized.split(\"/\").at(-1)?.replaceAll(\"\\0\", \"\").trim();\n return basename || \"download.bin\";\n}\n","/** This file is generated from openapi/openapi.yaml. Do not edit manually. */\n\nimport type { FileDownload } from \"../files.js\";\nimport type {\n ApiResponse,\n OperationBody,\n OperationParameter,\n OperationResult,\n RequestControls,\n ResourceClient,\n} from \"../internal.js\";\nimport type { operations } from \"./schema.js\";\n\nexport interface APIKeysListOptions {\n limit?: OperationParameter<operations[\"api_keys_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"api_keys_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<operations[\"api_keys_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type APIKeysListResponse = OperationResult<operations[\"api_keys_list\"]>;\n\nexport interface APIKeysCreateOptions {\n acceptLanguage?: OperationParameter<operations[\"api_keys_create\"], \"header\", \"Accept-Language\">;\n body?: OperationBody<operations[\"api_keys_create\"]>;\n request?: RequestControls;\n}\n\nexport type APIKeysCreateResponse = OperationResult<operations[\"api_keys_create\"]>;\n\nexport interface APIKeysDeleteOptions {\n id: OperationParameter<operations[\"api_keys_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"api_keys_destroy\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"api_keys_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type APIKeysDeleteResponse = OperationResult<operations[\"api_keys_destroy\"]>;\n\nexport class APIKeysResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List API keys */\n async list(options: APIKeysListOptions = {}): Promise<APIKeysListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List API keys; include response metadata. */\n async listWithResponse(\n options: APIKeysListOptions = {},\n ): Promise<ApiResponse<APIKeysListResponse>> {\n return this.#client._callWithResponse<APIKeysListResponse>(\n {\n operationId: \"api_keys_list\",\n method: \"GET\",\n path: \"/api-keys\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create an API key */\n async create(options: APIKeysCreateOptions = {}): Promise<APIKeysCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create an API key; include response metadata. */\n async createWithResponse(\n options: APIKeysCreateOptions = {},\n ): Promise<ApiResponse<APIKeysCreateResponse>> {\n return this.#client._callWithResponse<APIKeysCreateResponse>(\n {\n operationId: \"api_keys_create\",\n method: \"POST\",\n path: \"/api-keys\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Revoke an API key */\n async delete(options: APIKeysDeleteOptions): Promise<APIKeysDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Revoke an API key; include response metadata. */\n async deleteWithResponse(\n options: APIKeysDeleteOptions,\n ): Promise<ApiResponse<APIKeysDeleteResponse>> {\n return this.#client._callWithResponse<APIKeysDeleteResponse>(\n {\n operationId: \"api_keys_destroy\",\n method: \"DELETE\",\n path: \"/api-keys/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface AffiliatesListOptions {\n limit?: OperationParameter<operations[\"affiliates_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"affiliates_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<operations[\"affiliates_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type AffiliatesListResponse = OperationResult<operations[\"affiliates_list\"]>;\n\nexport interface AffiliatesListRewardsOptions {\n limit?: OperationParameter<operations[\"affiliates_rewards_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"affiliates_rewards_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<\n operations[\"affiliates_rewards_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AffiliatesListRewardsResponse = OperationResult<operations[\"affiliates_rewards_list\"]>;\n\nexport interface AffiliatesGetRewardsOverallOptions {\n acceptLanguage?: OperationParameter<\n operations[\"affiliates_rewards_overall_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AffiliatesGetRewardsOverallResponse = OperationResult<\n operations[\"affiliates_rewards_overall_retrieve\"]\n>;\n\nexport class AffiliatesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List referred customers */\n async list(options: AffiliatesListOptions = {}): Promise<AffiliatesListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List referred customers; include response metadata. */\n async listWithResponse(\n options: AffiliatesListOptions = {},\n ): Promise<ApiResponse<AffiliatesListResponse>> {\n return this.#client._callWithResponse<AffiliatesListResponse>(\n {\n operationId: \"affiliates_list\",\n method: \"GET\",\n path: \"/affiliates\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List affiliate reward entries */\n async listRewards(\n options: AffiliatesListRewardsOptions = {},\n ): Promise<AffiliatesListRewardsResponse> {\n return (await this.listRewardsWithResponse(options)).data;\n }\n\n /** List affiliate reward entries; include response metadata. */\n async listRewardsWithResponse(\n options: AffiliatesListRewardsOptions = {},\n ): Promise<ApiResponse<AffiliatesListRewardsResponse>> {\n return this.#client._callWithResponse<AffiliatesListRewardsResponse>(\n {\n operationId: \"affiliates_rewards_list\",\n method: \"GET\",\n path: \"/affiliates/rewards\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get affiliate earnings over time */\n async getRewardsOverall(\n options: AffiliatesGetRewardsOverallOptions = {},\n ): Promise<AffiliatesGetRewardsOverallResponse> {\n return (await this.getRewardsOverallWithResponse(options)).data;\n }\n\n /** Get affiliate earnings over time; include response metadata. */\n async getRewardsOverallWithResponse(\n options: AffiliatesGetRewardsOverallOptions = {},\n ): Promise<ApiResponse<AffiliatesGetRewardsOverallResponse>> {\n return this.#client._callWithResponse<AffiliatesGetRewardsOverallResponse>(\n {\n operationId: \"affiliates_rewards_overall_retrieve\",\n method: \"GET\",\n path: \"/affiliates/rewards/overall\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface AnalyticsGetTransactionsOptions {\n end?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"end\">;\n id: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"path\", \"id\">;\n limit?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"offset\">;\n recipientId?: OperationParameter<\n operations[\"analytics_transactions_retrieve\"],\n \"query\",\n \"recipient_id\"\n >;\n senderId?: OperationParameter<\n operations[\"analytics_transactions_retrieve\"],\n \"query\",\n \"sender_id\"\n >;\n start?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"timezone\">;\n type?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_transactions_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsGetTransactionsResponse = OperationResult<\n operations[\"analytics_transactions_retrieve\"]\n>;\n\nexport interface AnalyticsGetConnectionsOptions {\n limit?: OperationParameter<operations[\"analytics_connections_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_connections_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<\n operations[\"analytics_connections_retrieve\"],\n \"query\",\n \"package_id\"\n >;\n userId?: OperationParameter<operations[\"analytics_connections_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_connections_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsGetConnectionsResponse = OperationResult<\n operations[\"analytics_connections_retrieve\"]\n>;\n\nexport interface AnalyticsListDomainsOptions {\n end?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"end\">;\n hostname?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"hostname\">;\n includeSubUsers?: OperationParameter<\n operations[\"analytics_domains_retrieve\"],\n \"query\",\n \"include_sub_users\"\n >;\n ledgerId?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"ledger_id\">;\n limit?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"ordering\">;\n packageId?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"search\">;\n start?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_domains_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsListDomainsResponse = OperationResult<\n operations[\"analytics_domains_retrieve\"]\n>;\n\nexport interface AnalyticsListFeedOptions {\n city?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"city\">;\n country?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"country\">;\n end?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"end\">;\n hostname?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"hostname\">;\n ledgerId?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"ledger_id\">;\n limit?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"package_id\">;\n protocol?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"protocol\">;\n region?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"region\">;\n search?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"search\">;\n start?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_feed_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsListFeedResponse = OperationResult<operations[\"analytics_feed_retrieve\"]>;\n\nexport interface AnalyticsListLogsOptions {\n city?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"city\">;\n country?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"country\">;\n end?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"end\">;\n errorCode?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"error_code\">;\n hostname?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"hostname\">;\n ledgerId?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"ledger_id\">;\n limit?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"package_id\">;\n protocol?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"protocol\">;\n region?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"region\">;\n start?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_logs_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsListLogsResponse = OperationResult<operations[\"analytics_logs_retrieve\"]>;\n\nexport interface AnalyticsGetOverallOptions {\n end?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"end\">;\n includeSubUsers?: OperationParameter<\n operations[\"analytics_overall_retrieve\"],\n \"query\",\n \"include_sub_users\"\n >;\n limit?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"package_id\">;\n start?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_overall_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsGetOverallResponse = OperationResult<operations[\"analytics_overall_retrieve\"]>;\n\nexport class AnalyticsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List data transactions */\n async getTransactions(\n options: AnalyticsGetTransactionsOptions,\n ): Promise<AnalyticsGetTransactionsResponse> {\n return (await this.getTransactionsWithResponse(options)).data;\n }\n\n /** List data transactions; include response metadata. */\n async getTransactionsWithResponse(\n options: AnalyticsGetTransactionsOptions,\n ): Promise<ApiResponse<AnalyticsGetTransactionsResponse>> {\n return this.#client._callWithResponse<AnalyticsGetTransactionsResponse>(\n {\n operationId: \"analytics_transactions_retrieve\",\n method: \"GET\",\n path: \"/analytics/{id}/transactions\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n end: options.end,\n limit: options.limit,\n offset: options.offset,\n recipient_id: options.recipientId,\n sender_id: options.senderId,\n start: options.start,\n timezone: options.timezone,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List active proxy connections */\n async getConnections(\n options: AnalyticsGetConnectionsOptions = {},\n ): Promise<AnalyticsGetConnectionsResponse> {\n return (await this.getConnectionsWithResponse(options)).data;\n }\n\n /** List active proxy connections; include response metadata. */\n async getConnectionsWithResponse(\n options: AnalyticsGetConnectionsOptions = {},\n ): Promise<ApiResponse<AnalyticsGetConnectionsResponse>> {\n return this.#client._callWithResponse<AnalyticsGetConnectionsResponse>(\n {\n operationId: \"analytics_connections_retrieve\",\n method: \"GET\",\n path: \"/analytics/connections\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List top destination domains */\n async listDomains(\n options: AnalyticsListDomainsOptions = {},\n ): Promise<AnalyticsListDomainsResponse> {\n return (await this.listDomainsWithResponse(options)).data;\n }\n\n /** List top destination domains; include response metadata. */\n async listDomainsWithResponse(\n options: AnalyticsListDomainsOptions = {},\n ): Promise<ApiResponse<AnalyticsListDomainsResponse>> {\n return this.#client._callWithResponse<AnalyticsListDomainsResponse>(\n {\n operationId: \"analytics_domains_retrieve\",\n method: \"GET\",\n path: \"/analytics/domains\",\n },\n {\n query: {\n end: options.end,\n hostname: options.hostname,\n include_sub_users: options.includeSubUsers,\n ledger_id: options.ledgerId,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List proxy request activity */\n async listFeed(options: AnalyticsListFeedOptions = {}): Promise<AnalyticsListFeedResponse> {\n return (await this.listFeedWithResponse(options)).data;\n }\n\n /** List proxy request activity; include response metadata. */\n async listFeedWithResponse(\n options: AnalyticsListFeedOptions = {},\n ): Promise<ApiResponse<AnalyticsListFeedResponse>> {\n return this.#client._callWithResponse<AnalyticsListFeedResponse>(\n {\n operationId: \"analytics_feed_retrieve\",\n method: \"GET\",\n path: \"/analytics/feed\",\n },\n {\n query: {\n city: options.city,\n country: options.country,\n end: options.end,\n hostname: options.hostname,\n ledger_id: options.ledgerId,\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n protocol: options.protocol,\n region: options.region,\n search: options.search,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List proxy error logs */\n async listLogs(options: AnalyticsListLogsOptions = {}): Promise<AnalyticsListLogsResponse> {\n return (await this.listLogsWithResponse(options)).data;\n }\n\n /** List proxy error logs; include response metadata. */\n async listLogsWithResponse(\n options: AnalyticsListLogsOptions = {},\n ): Promise<ApiResponse<AnalyticsListLogsResponse>> {\n return this.#client._callWithResponse<AnalyticsListLogsResponse>(\n {\n operationId: \"analytics_logs_retrieve\",\n method: \"GET\",\n path: \"/analytics/logs\",\n },\n {\n query: {\n city: options.city,\n country: options.country,\n end: options.end,\n error_code: options.errorCode,\n hostname: options.hostname,\n ledger_id: options.ledgerId,\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n protocol: options.protocol,\n region: options.region,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get traffic totals over time */\n async getOverall(options: AnalyticsGetOverallOptions = {}): Promise<AnalyticsGetOverallResponse> {\n return (await this.getOverallWithResponse(options)).data;\n }\n\n /** Get traffic totals over time; include response metadata. */\n async getOverallWithResponse(\n options: AnalyticsGetOverallOptions = {},\n ): Promise<ApiResponse<AnalyticsGetOverallResponse>> {\n return this.#client._callWithResponse<AnalyticsGetOverallResponse>(\n {\n operationId: \"analytics_overall_retrieve\",\n method: \"GET\",\n path: \"/analytics/overall\",\n },\n {\n query: {\n end: options.end,\n include_sub_users: options.includeSubUsers,\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface AuthorizationLoginOptions {\n acceptLanguage?: OperationParameter<operations[\"login_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"login_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationLoginResponse = OperationResult<operations[\"login_create\"]>;\n\nexport interface AuthorizationLoginWithGoogleOptions {\n acceptLanguage?: OperationParameter<\n operations[\"login_google_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"login_google_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationLoginWithGoogleResponse = OperationResult<\n operations[\"login_google_create\"]\n>;\n\nexport interface AuthorizationVerifyOtpOptions {\n acceptLanguage?: OperationParameter<operations[\"login_otp_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"login_otp_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationVerifyOtpResponse = OperationResult<operations[\"login_otp_create\"]>;\n\nexport interface AuthorizationRecoverPasswordOptions {\n acceptLanguage?: OperationParameter<\n operations[\"recover_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"recover_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationRecoverPasswordResponse = OperationResult<\n operations[\"recover_password_create\"]\n>;\n\nexport interface AuthorizationRefreshOptions {\n acceptLanguage?: OperationParameter<operations[\"refresh_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"refresh_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationRefreshResponse = OperationResult<operations[\"refresh_create\"]>;\n\nexport interface AuthorizationSignupOptions {\n acceptLanguage?: OperationParameter<operations[\"signup_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"signup_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationSignupResponse = OperationResult<operations[\"signup_create\"]>;\n\nexport class AuthorizationResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Sign in with email or username */\n async login(options: AuthorizationLoginOptions): Promise<AuthorizationLoginResponse> {\n return (await this.loginWithResponse(options)).data;\n }\n\n /** Sign in with email or username; include response metadata. */\n async loginWithResponse(\n options: AuthorizationLoginOptions,\n ): Promise<ApiResponse<AuthorizationLoginResponse>> {\n return this.#client._callWithResponse<AuthorizationLoginResponse>(\n {\n operationId: \"login_create\",\n method: \"POST\",\n path: \"/login\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Sign in with Google */\n async loginWithGoogle(\n options: AuthorizationLoginWithGoogleOptions,\n ): Promise<AuthorizationLoginWithGoogleResponse> {\n return (await this.loginWithGoogleWithResponse(options)).data;\n }\n\n /** Sign in with Google; include response metadata. */\n async loginWithGoogleWithResponse(\n options: AuthorizationLoginWithGoogleOptions,\n ): Promise<ApiResponse<AuthorizationLoginWithGoogleResponse>> {\n return this.#client._callWithResponse<AuthorizationLoginWithGoogleResponse>(\n {\n operationId: \"login_google_create\",\n method: \"POST\",\n path: \"/login/google\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Complete two-factor sign-in */\n async verifyOtp(options: AuthorizationVerifyOtpOptions): Promise<AuthorizationVerifyOtpResponse> {\n return (await this.verifyOtpWithResponse(options)).data;\n }\n\n /** Complete two-factor sign-in; include response metadata. */\n async verifyOtpWithResponse(\n options: AuthorizationVerifyOtpOptions,\n ): Promise<ApiResponse<AuthorizationVerifyOtpResponse>> {\n return this.#client._callWithResponse<AuthorizationVerifyOtpResponse>(\n {\n operationId: \"login_otp_create\",\n method: \"POST\",\n path: \"/login/otp\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Send a password recovery email */\n async recoverPassword(\n options: AuthorizationRecoverPasswordOptions,\n ): Promise<AuthorizationRecoverPasswordResponse> {\n return (await this.recoverPasswordWithResponse(options)).data;\n }\n\n /** Send a password recovery email; include response metadata. */\n async recoverPasswordWithResponse(\n options: AuthorizationRecoverPasswordOptions,\n ): Promise<ApiResponse<AuthorizationRecoverPasswordResponse>> {\n return this.#client._callWithResponse<AuthorizationRecoverPasswordResponse>(\n {\n operationId: \"recover_password_create\",\n method: \"POST\",\n path: \"/recover-password\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Refresh an access token */\n async refresh(options: AuthorizationRefreshOptions): Promise<AuthorizationRefreshResponse> {\n return (await this.refreshWithResponse(options)).data;\n }\n\n /** Refresh an access token; include response metadata. */\n async refreshWithResponse(\n options: AuthorizationRefreshOptions,\n ): Promise<ApiResponse<AuthorizationRefreshResponse>> {\n return this.#client._callWithResponse<AuthorizationRefreshResponse>(\n {\n operationId: \"refresh_create\",\n method: \"POST\",\n path: \"/refresh\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a customer account */\n async signup(options: AuthorizationSignupOptions): Promise<AuthorizationSignupResponse> {\n return (await this.signupWithResponse(options)).data;\n }\n\n /** Create a customer account; include response metadata. */\n async signupWithResponse(\n options: AuthorizationSignupOptions,\n ): Promise<ApiResponse<AuthorizationSignupResponse>> {\n return this.#client._callWithResponse<AuthorizationSignupResponse>(\n {\n operationId: \"signup_create\",\n method: \"POST\",\n path: \"/signup\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface CouponsListOptions {\n code?: OperationParameter<operations[\"coupons_list\"], \"query\", \"code\">;\n limit?: OperationParameter<operations[\"coupons_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"coupons_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"coupons_list\"], \"query\", \"ordering\">;\n search?: OperationParameter<operations[\"coupons_list\"], \"query\", \"search\">;\n type?: OperationParameter<operations[\"coupons_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type CouponsListResponse = OperationResult<operations[\"coupons_list\"]>;\n\nexport interface CouponsCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"coupons_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"coupons_create\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsCreateResponse = OperationResult<operations[\"coupons_create\"]>;\n\nexport interface CouponsGetOptions {\n id: OperationParameter<operations[\"coupons_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type CouponsGetResponse = OperationResult<operations[\"coupons_retrieve\"]>;\n\nexport interface CouponsReplaceOptions {\n id: OperationParameter<operations[\"coupons_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"coupons_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_update\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"coupons_update\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsReplaceResponse = OperationResult<operations[\"coupons_update\"]>;\n\nexport interface CouponsUpdateOptions {\n id: OperationParameter<operations[\"coupons_partial_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"coupons_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"coupons_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"coupons_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsUpdateResponse = OperationResult<operations[\"coupons_partial_update\"]>;\n\nexport interface CouponsDeleteOptions {\n id: OperationParameter<operations[\"coupons_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"coupons_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"coupons_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type CouponsDeleteResponse = OperationResult<operations[\"coupons_destroy\"]>;\n\nexport interface CouponsListRedeemsOptions {\n code?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"code\">;\n id: OperationParameter<operations[\"coupons_redeems_list\"], \"path\", \"id\">;\n limit?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"ordering\">;\n type?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<\n operations[\"coupons_redeems_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type CouponsListRedeemsResponse = OperationResult<operations[\"coupons_redeems_list\"]>;\n\nexport interface CouponsCalculatePriceOptions {\n acceptLanguage?: OperationParameter<\n operations[\"coupons_calculate_price_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"coupons_calculate_price_create\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsCalculatePriceResponse = OperationResult<\n operations[\"coupons_calculate_price_create\"]\n>;\n\nexport class CouponsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List available coupons */\n async list(options: CouponsListOptions = {}): Promise<CouponsListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List available coupons; include response metadata. */\n async listWithResponse(\n options: CouponsListOptions = {},\n ): Promise<ApiResponse<CouponsListResponse>> {\n return this.#client._callWithResponse<CouponsListResponse>(\n {\n operationId: \"coupons_list\",\n method: \"GET\",\n path: \"/coupons\",\n },\n {\n query: {\n code: options.code,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n search: options.search,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a coupon */\n async create(options: CouponsCreateOptions): Promise<CouponsCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a coupon; include response metadata. */\n async createWithResponse(\n options: CouponsCreateOptions,\n ): Promise<ApiResponse<CouponsCreateResponse>> {\n return this.#client._callWithResponse<CouponsCreateResponse>(\n {\n operationId: \"coupons_create\",\n method: \"POST\",\n path: \"/coupons\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a coupon */\n async get(options: CouponsGetOptions): Promise<CouponsGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get a coupon; include response metadata. */\n async getWithResponse(options: CouponsGetOptions): Promise<ApiResponse<CouponsGetResponse>> {\n return this.#client._callWithResponse<CouponsGetResponse>(\n {\n operationId: \"coupons_retrieve\",\n method: \"GET\",\n path: \"/coupons/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Replace a coupon */\n async replace(options: CouponsReplaceOptions): Promise<CouponsReplaceResponse> {\n return (await this.replaceWithResponse(options)).data;\n }\n\n /** Replace a coupon; include response metadata. */\n async replaceWithResponse(\n options: CouponsReplaceOptions,\n ): Promise<ApiResponse<CouponsReplaceResponse>> {\n return this.#client._callWithResponse<CouponsReplaceResponse>(\n {\n operationId: \"coupons_update\",\n method: \"PUT\",\n path: \"/coupons/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update a coupon */\n async update(options: CouponsUpdateOptions): Promise<CouponsUpdateResponse> {\n return (await this.updateWithResponse(options)).data;\n }\n\n /** Update a coupon; include response metadata. */\n async updateWithResponse(\n options: CouponsUpdateOptions,\n ): Promise<ApiResponse<CouponsUpdateResponse>> {\n return this.#client._callWithResponse<CouponsUpdateResponse>(\n {\n operationId: \"coupons_partial_update\",\n method: \"PATCH\",\n path: \"/coupons/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a coupon */\n async delete(options: CouponsDeleteOptions): Promise<CouponsDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a coupon; include response metadata. */\n async deleteWithResponse(\n options: CouponsDeleteOptions,\n ): Promise<ApiResponse<CouponsDeleteResponse>> {\n return this.#client._callWithResponse<CouponsDeleteResponse>(\n {\n operationId: \"coupons_destroy\",\n method: \"DELETE\",\n path: \"/coupons/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List coupon redemptions */\n async listRedeems(options: CouponsListRedeemsOptions): Promise<CouponsListRedeemsResponse> {\n return (await this.listRedeemsWithResponse(options)).data;\n }\n\n /** List coupon redemptions; include response metadata. */\n async listRedeemsWithResponse(\n options: CouponsListRedeemsOptions,\n ): Promise<ApiResponse<CouponsListRedeemsResponse>> {\n return this.#client._callWithResponse<CouponsListRedeemsResponse>(\n {\n operationId: \"coupons_redeems_list\",\n method: \"GET\",\n path: \"/coupons/{id}/redeems\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n code: options.code,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Calculate a discounted price */\n async calculatePrice(\n options: CouponsCalculatePriceOptions,\n ): Promise<CouponsCalculatePriceResponse> {\n return (await this.calculatePriceWithResponse(options)).data;\n }\n\n /** Calculate a discounted price; include response metadata. */\n async calculatePriceWithResponse(\n options: CouponsCalculatePriceOptions,\n ): Promise<ApiResponse<CouponsCalculatePriceResponse>> {\n return this.#client._callWithResponse<CouponsCalculatePriceResponse>(\n {\n operationId: \"coupons_calculate_price_create\",\n method: \"POST\",\n path: \"/coupons/calculate-price\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface InvoicesListOptions {\n gateway?: OperationParameter<operations[\"invoices_list\"], \"query\", \"gateway\">;\n internalId?: OperationParameter<operations[\"invoices_list\"], \"query\", \"internal_id\">;\n limit?: OperationParameter<operations[\"invoices_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"invoices_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"invoices_list\"], \"query\", \"ordering\">;\n packageId?: OperationParameter<operations[\"invoices_list\"], \"query\", \"package__id\">;\n search?: OperationParameter<operations[\"invoices_list\"], \"query\", \"search\">;\n status?: OperationParameter<operations[\"invoices_list\"], \"query\", \"status\">;\n type?: OperationParameter<operations[\"invoices_list\"], \"query\", \"type\">;\n userEmail?: OperationParameter<operations[\"invoices_list\"], \"query\", \"user__email\">;\n userId?: OperationParameter<operations[\"invoices_list\"], \"query\", \"user__id\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type InvoicesListResponse = OperationResult<operations[\"invoices_list\"]>;\n\nexport interface InvoicesCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"invoices_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"invoices_create\"]>;\n request?: RequestControls;\n}\n\nexport type InvoicesCreateResponse = OperationResult<operations[\"invoices_create\"]>;\n\nexport interface InvoicesGetOptions {\n id: OperationParameter<operations[\"invoices_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type InvoicesGetResponse = OperationResult<operations[\"invoices_retrieve\"]>;\n\nexport interface InvoicesDeleteOptions {\n id: OperationParameter<operations[\"invoices_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"invoices_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"invoices_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type InvoicesDeleteResponse = OperationResult<operations[\"invoices_destroy\"]>;\n\nexport interface InvoicesDownloadPdfOptions {\n id: OperationParameter<operations[\"invoices_download_pdf_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<\n operations[\"invoices_download_pdf_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type InvoicesDownloadPdfResponse = FileDownload;\n\nexport interface InvoicesGetPaymentLinkOptions {\n id: OperationParameter<operations[\"invoices_pay_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<\n operations[\"invoices_pay_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type InvoicesGetPaymentLinkResponse = OperationResult<operations[\"invoices_pay_retrieve\"]>;\n\nexport class InvoicesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List invoices */\n async list(options: InvoicesListOptions = {}): Promise<InvoicesListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List invoices; include response metadata. */\n async listWithResponse(\n options: InvoicesListOptions = {},\n ): Promise<ApiResponse<InvoicesListResponse>> {\n return this.#client._callWithResponse<InvoicesListResponse>(\n {\n operationId: \"invoices_list\",\n method: \"GET\",\n path: \"/invoices\",\n },\n {\n query: {\n gateway: options.gateway,\n internal_id: options.internalId,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package__id: options.packageId,\n search: options.search,\n status: options.status,\n type: options.type,\n user__email: options.userEmail,\n user__id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create an invoice */\n async create(options: InvoicesCreateOptions): Promise<InvoicesCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create an invoice; include response metadata. */\n async createWithResponse(\n options: InvoicesCreateOptions,\n ): Promise<ApiResponse<InvoicesCreateResponse>> {\n return this.#client._callWithResponse<InvoicesCreateResponse>(\n {\n operationId: \"invoices_create\",\n method: \"POST\",\n path: \"/invoices\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get an invoice */\n async get(options: InvoicesGetOptions): Promise<InvoicesGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get an invoice; include response metadata. */\n async getWithResponse(options: InvoicesGetOptions): Promise<ApiResponse<InvoicesGetResponse>> {\n return this.#client._callWithResponse<InvoicesGetResponse>(\n {\n operationId: \"invoices_retrieve\",\n method: \"GET\",\n path: \"/invoices/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete an invoice */\n async delete(options: InvoicesDeleteOptions): Promise<InvoicesDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete an invoice; include response metadata. */\n async deleteWithResponse(\n options: InvoicesDeleteOptions,\n ): Promise<ApiResponse<InvoicesDeleteResponse>> {\n return this.#client._callWithResponse<InvoicesDeleteResponse>(\n {\n operationId: \"invoices_destroy\",\n method: \"DELETE\",\n path: \"/invoices/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Download an invoice PDF */\n async downloadPdf(options: InvoicesDownloadPdfOptions): Promise<InvoicesDownloadPdfResponse> {\n return (await this.downloadPdfWithResponse(options)).data;\n }\n\n /** Download an invoice PDF; include response metadata. */\n async downloadPdfWithResponse(\n options: InvoicesDownloadPdfOptions,\n ): Promise<ApiResponse<InvoicesDownloadPdfResponse>> {\n return this.#client._callWithResponse<InvoicesDownloadPdfResponse>(\n {\n operationId: \"invoices_download_pdf_retrieve\",\n method: \"GET\",\n path: \"/invoices/{id}/download/pdf\",\n binary: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get an invoice payment link */\n async getPaymentLink(\n options: InvoicesGetPaymentLinkOptions,\n ): Promise<InvoicesGetPaymentLinkResponse> {\n return (await this.getPaymentLinkWithResponse(options)).data;\n }\n\n /** Get an invoice payment link; include response metadata. */\n async getPaymentLinkWithResponse(\n options: InvoicesGetPaymentLinkOptions,\n ): Promise<ApiResponse<InvoicesGetPaymentLinkResponse>> {\n return this.#client._callWithResponse<InvoicesGetPaymentLinkResponse>(\n {\n operationId: \"invoices_pay_retrieve\",\n method: \"GET\",\n path: \"/invoices/{id}/pay\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface LocationsListAsnsOptions {\n code?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"country__code\">;\n global?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"global\">;\n limit?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_asn_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListAsnsResponse = OperationResult<operations[\"locations_asn_list\"]>;\n\nexport interface LocationsListCitiesOptions {\n code?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"country__code\">;\n limit?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"package_id\">;\n regionCode?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"region__code\">;\n search?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_cities_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListCitiesResponse = OperationResult<operations[\"locations_cities_list\"]>;\n\nexport interface LocationsGetCityOptions {\n id: OperationParameter<operations[\"locations_cities_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_cities_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_cities_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetCityResponse = OperationResult<operations[\"locations_cities_retrieve\"]>;\n\nexport interface LocationsListContinentsOptions {\n code?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"code\">;\n limit?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_continents_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListContinentsResponse = OperationResult<\n operations[\"locations_continents_list\"]\n>;\n\nexport interface LocationsGetContinentOptions {\n id: OperationParameter<operations[\"locations_continents_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_continents_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_continents_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetContinentResponse = OperationResult<\n operations[\"locations_continents_retrieve\"]\n>;\n\nexport interface LocationsListCountriesOptions {\n code?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"code\">;\n limit?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_countries_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListCountriesResponse = OperationResult<\n operations[\"locations_countries_list\"]\n>;\n\nexport interface LocationsGetCountryOptions {\n id: OperationParameter<operations[\"locations_countries_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_countries_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_countries_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetCountryResponse = OperationResult<\n operations[\"locations_countries_retrieve\"]\n>;\n\nexport interface LocationsListIspsOptions {\n code?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"country__code\">;\n limit?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_isps_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListIspsResponse = OperationResult<operations[\"locations_isps_list\"]>;\n\nexport interface LocationsListRegionsOptions {\n code?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"country__code\">;\n limit?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_regions_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListRegionsResponse = OperationResult<operations[\"locations_regions_list\"]>;\n\nexport interface LocationsGetRegionOptions {\n id: OperationParameter<operations[\"locations_regions_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_regions_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_regions_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetRegionResponse = OperationResult<operations[\"locations_regions_retrieve\"]>;\n\nexport class LocationsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List available autonomous systems */\n async listAsns(options: LocationsListAsnsOptions): Promise<LocationsListAsnsResponse> {\n return (await this.listAsnsWithResponse(options)).data;\n }\n\n /** List available autonomous systems; include response metadata. */\n async listAsnsWithResponse(\n options: LocationsListAsnsOptions,\n ): Promise<ApiResponse<LocationsListAsnsResponse>> {\n return this.#client._callWithResponse<LocationsListAsnsResponse>(\n {\n operationId: \"locations_asn_list\",\n method: \"GET\",\n path: \"/locations/asn\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n global: options.global,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available cities */\n async listCities(options: LocationsListCitiesOptions): Promise<LocationsListCitiesResponse> {\n return (await this.listCitiesWithResponse(options)).data;\n }\n\n /** List available cities; include response metadata. */\n async listCitiesWithResponse(\n options: LocationsListCitiesOptions,\n ): Promise<ApiResponse<LocationsListCitiesResponse>> {\n return this.#client._callWithResponse<LocationsListCitiesResponse>(\n {\n operationId: \"locations_cities_list\",\n method: \"GET\",\n path: \"/locations/cities\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n region__code: options.regionCode,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a city */\n async getCity(options: LocationsGetCityOptions): Promise<LocationsGetCityResponse> {\n return (await this.getCityWithResponse(options)).data;\n }\n\n /** Get a city; include response metadata. */\n async getCityWithResponse(\n options: LocationsGetCityOptions,\n ): Promise<ApiResponse<LocationsGetCityResponse>> {\n return this.#client._callWithResponse<LocationsGetCityResponse>(\n {\n operationId: \"locations_cities_retrieve\",\n method: \"GET\",\n path: \"/locations/cities/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available continents */\n async listContinents(\n options: LocationsListContinentsOptions,\n ): Promise<LocationsListContinentsResponse> {\n return (await this.listContinentsWithResponse(options)).data;\n }\n\n /** List available continents; include response metadata. */\n async listContinentsWithResponse(\n options: LocationsListContinentsOptions,\n ): Promise<ApiResponse<LocationsListContinentsResponse>> {\n return this.#client._callWithResponse<LocationsListContinentsResponse>(\n {\n operationId: \"locations_continents_list\",\n method: \"GET\",\n path: \"/locations/continents\",\n },\n {\n query: {\n code: options.code,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a continent */\n async getContinent(\n options: LocationsGetContinentOptions,\n ): Promise<LocationsGetContinentResponse> {\n return (await this.getContinentWithResponse(options)).data;\n }\n\n /** Get a continent; include response metadata. */\n async getContinentWithResponse(\n options: LocationsGetContinentOptions,\n ): Promise<ApiResponse<LocationsGetContinentResponse>> {\n return this.#client._callWithResponse<LocationsGetContinentResponse>(\n {\n operationId: \"locations_continents_retrieve\",\n method: \"GET\",\n path: \"/locations/continents/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available countries */\n async listCountries(\n options: LocationsListCountriesOptions,\n ): Promise<LocationsListCountriesResponse> {\n return (await this.listCountriesWithResponse(options)).data;\n }\n\n /** List available countries; include response metadata. */\n async listCountriesWithResponse(\n options: LocationsListCountriesOptions,\n ): Promise<ApiResponse<LocationsListCountriesResponse>> {\n return this.#client._callWithResponse<LocationsListCountriesResponse>(\n {\n operationId: \"locations_countries_list\",\n method: \"GET\",\n path: \"/locations/countries\",\n },\n {\n query: {\n code: options.code,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a country */\n async getCountry(options: LocationsGetCountryOptions): Promise<LocationsGetCountryResponse> {\n return (await this.getCountryWithResponse(options)).data;\n }\n\n /** Get a country; include response metadata. */\n async getCountryWithResponse(\n options: LocationsGetCountryOptions,\n ): Promise<ApiResponse<LocationsGetCountryResponse>> {\n return this.#client._callWithResponse<LocationsGetCountryResponse>(\n {\n operationId: \"locations_countries_retrieve\",\n method: \"GET\",\n path: \"/locations/countries/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available internet service providers */\n async listIsps(options: LocationsListIspsOptions): Promise<LocationsListIspsResponse> {\n return (await this.listIspsWithResponse(options)).data;\n }\n\n /** List available internet service providers; include response metadata. */\n async listIspsWithResponse(\n options: LocationsListIspsOptions,\n ): Promise<ApiResponse<LocationsListIspsResponse>> {\n return this.#client._callWithResponse<LocationsListIspsResponse>(\n {\n operationId: \"locations_isps_list\",\n method: \"GET\",\n path: \"/locations/isps\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available regions */\n async listRegions(options: LocationsListRegionsOptions): Promise<LocationsListRegionsResponse> {\n return (await this.listRegionsWithResponse(options)).data;\n }\n\n /** List available regions; include response metadata. */\n async listRegionsWithResponse(\n options: LocationsListRegionsOptions,\n ): Promise<ApiResponse<LocationsListRegionsResponse>> {\n return this.#client._callWithResponse<LocationsListRegionsResponse>(\n {\n operationId: \"locations_regions_list\",\n method: \"GET\",\n path: \"/locations/regions\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a region */\n async getRegion(options: LocationsGetRegionOptions): Promise<LocationsGetRegionResponse> {\n return (await this.getRegionWithResponse(options)).data;\n }\n\n /** Get a region; include response metadata. */\n async getRegionWithResponse(\n options: LocationsGetRegionOptions,\n ): Promise<ApiResponse<LocationsGetRegionResponse>> {\n return this.#client._callWithResponse<LocationsGetRegionResponse>(\n {\n operationId: \"locations_regions_retrieve\",\n method: \"GET\",\n path: \"/locations/regions/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface NewsListOptions {\n limit?: OperationParameter<operations[\"news_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"news_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"news_list\"], \"query\", \"ordering\">;\n search?: OperationParameter<operations[\"news_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<operations[\"news_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type NewsListResponse = OperationResult<operations[\"news_list\"]>;\n\nexport class NewsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List product announcements */\n async list(options: NewsListOptions = {}): Promise<NewsListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List product announcements; include response metadata. */\n async listWithResponse(options: NewsListOptions = {}): Promise<ApiResponse<NewsListResponse>> {\n return this.#client._callWithResponse<NewsListResponse>(\n {\n operationId: \"news_list\",\n method: \"GET\",\n path: \"/news\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface OrdersListOptions {\n limit?: OperationParameter<operations[\"orders_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"orders_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"orders_list\"], \"query\", \"ordering\">;\n packageAlias?: OperationParameter<operations[\"orders_list\"], \"query\", \"package__alias\">;\n packageId?: OperationParameter<operations[\"orders_list\"], \"query\", \"package__id\">;\n packageType?: OperationParameter<operations[\"orders_list\"], \"query\", \"package__type\">;\n search?: OperationParameter<operations[\"orders_list\"], \"query\", \"search\">;\n userEmail?: OperationParameter<operations[\"orders_list\"], \"query\", \"user__email\">;\n userId?: OperationParameter<operations[\"orders_list\"], \"query\", \"user__id\">;\n acceptLanguage?: OperationParameter<operations[\"orders_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type OrdersListResponse = OperationResult<operations[\"orders_list\"]>;\n\nexport interface OrdersGetOptions {\n id: OperationParameter<operations[\"orders_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"orders_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type OrdersGetResponse = OperationResult<operations[\"orders_retrieve\"]>;\n\nexport interface OrdersUpdateAutoRenewalOptions {\n id: OperationParameter<operations[\"orders_partial_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"orders_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"orders_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"orders_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type OrdersUpdateAutoRenewalResponse = OperationResult<operations[\"orders_partial_update\"]>;\n\nexport interface OrdersDeleteOptions {\n id: OperationParameter<operations[\"orders_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"orders_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"orders_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"orders_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type OrdersDeleteResponse = OperationResult<operations[\"orders_destroy\"]>;\n\nexport interface OrdersResetPasswordOptions {\n acceptLanguage?: OperationParameter<\n operations[\"reset_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"reset_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type OrdersResetPasswordResponse = OperationResult<operations[\"reset_password_create\"]>;\n\nexport class OrdersResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List active orders */\n async list(options: OrdersListOptions = {}): Promise<OrdersListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List active orders; include response metadata. */\n async listWithResponse(\n options: OrdersListOptions = {},\n ): Promise<ApiResponse<OrdersListResponse>> {\n return this.#client._callWithResponse<OrdersListResponse>(\n {\n operationId: \"orders_list\",\n method: \"GET\",\n path: \"/orders\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package__alias: options.packageAlias,\n package__id: options.packageId,\n package__type: options.packageType,\n search: options.search,\n user__email: options.userEmail,\n user__id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get an order */\n async get(options: OrdersGetOptions): Promise<OrdersGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get an order; include response metadata. */\n async getWithResponse(options: OrdersGetOptions): Promise<ApiResponse<OrdersGetResponse>> {\n return this.#client._callWithResponse<OrdersGetResponse>(\n {\n operationId: \"orders_retrieve\",\n method: \"GET\",\n path: \"/orders/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update order auto-renewal */\n async updateAutoRenewal(\n options: OrdersUpdateAutoRenewalOptions,\n ): Promise<OrdersUpdateAutoRenewalResponse> {\n return (await this.updateAutoRenewalWithResponse(options)).data;\n }\n\n /** Update order auto-renewal; include response metadata. */\n async updateAutoRenewalWithResponse(\n options: OrdersUpdateAutoRenewalOptions,\n ): Promise<ApiResponse<OrdersUpdateAutoRenewalResponse>> {\n return this.#client._callWithResponse<OrdersUpdateAutoRenewalResponse>(\n {\n operationId: \"orders_partial_update\",\n method: \"PATCH\",\n path: \"/orders/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a sub-user order */\n async delete(options: OrdersDeleteOptions): Promise<OrdersDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a sub-user order; include response metadata. */\n async deleteWithResponse(\n options: OrdersDeleteOptions,\n ): Promise<ApiResponse<OrdersDeleteResponse>> {\n return this.#client._callWithResponse<OrdersDeleteResponse>(\n {\n operationId: \"orders_destroy\",\n method: \"DELETE\",\n path: \"/orders/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Reset an order's proxy password */\n async resetPassword(options: OrdersResetPasswordOptions): Promise<OrdersResetPasswordResponse> {\n return (await this.resetPasswordWithResponse(options)).data;\n }\n\n /** Reset an order's proxy password; include response metadata. */\n async resetPasswordWithResponse(\n options: OrdersResetPasswordOptions,\n ): Promise<ApiResponse<OrdersResetPasswordResponse>> {\n return this.#client._callWithResponse<OrdersResetPasswordResponse>(\n {\n operationId: \"reset_password_create\",\n method: \"POST\",\n path: \"/reset-password\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface PackagesListOptions {\n alias?: OperationParameter<operations[\"packages_list\"], \"query\", \"alias\">;\n limit?: OperationParameter<operations[\"packages_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"packages_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"packages_list\"], \"query\", \"ordering\">;\n pricingUnit?: OperationParameter<operations[\"packages_list\"], \"query\", \"pricing_unit\">;\n search?: OperationParameter<operations[\"packages_list\"], \"query\", \"search\">;\n type?: OperationParameter<operations[\"packages_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<operations[\"packages_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type PackagesListResponse = OperationResult<operations[\"packages_list\"]>;\n\nexport interface PackagesListCommissionsOptions {\n alias?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"alias\">;\n limit?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"ordering\">;\n pricingUnit?: OperationParameter<\n operations[\"packages_commissions_list\"],\n \"query\",\n \"pricing_unit\"\n >;\n type?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<\n operations[\"packages_commissions_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type PackagesListCommissionsResponse = OperationResult<\n operations[\"packages_commissions_list\"]\n>;\n\nexport class PackagesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List available proxy packages */\n async list(options: PackagesListOptions = {}): Promise<PackagesListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List available proxy packages; include response metadata. */\n async listWithResponse(\n options: PackagesListOptions = {},\n ): Promise<ApiResponse<PackagesListResponse>> {\n return this.#client._callWithResponse<PackagesListResponse>(\n {\n operationId: \"packages_list\",\n method: \"GET\",\n path: \"/packages\",\n },\n {\n query: {\n alias: options.alias,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n pricing_unit: options.pricingUnit,\n search: options.search,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List affiliate package commissions */\n async listCommissions(\n options: PackagesListCommissionsOptions = {},\n ): Promise<PackagesListCommissionsResponse> {\n return (await this.listCommissionsWithResponse(options)).data;\n }\n\n /** List affiliate package commissions; include response metadata. */\n async listCommissionsWithResponse(\n options: PackagesListCommissionsOptions = {},\n ): Promise<ApiResponse<PackagesListCommissionsResponse>> {\n return this.#client._callWithResponse<PackagesListCommissionsResponse>(\n {\n operationId: \"packages_commissions_list\",\n method: \"GET\",\n path: \"/packages/commissions\",\n },\n {\n query: {\n alias: options.alias,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n pricing_unit: options.pricingUnit,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface ProfileGetOptions {\n acceptLanguage?: OperationParameter<operations[\"profile_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type ProfileGetResponse = OperationResult<operations[\"profile_retrieve\"]>;\n\nexport interface ProfileUpdateOptions {\n ifMatch?: OperationParameter<operations[\"profile_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"profile_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"profile_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileUpdateResponse = OperationResult<operations[\"profile_partial_update\"]>;\n\nexport interface ProfileDeleteOptions {\n ifMatch?: OperationParameter<operations[\"profile_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"profile_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type ProfileDeleteResponse = OperationResult<operations[\"profile_destroy\"]>;\n\nexport interface ProfileConfirmTwoFactorOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_confirm_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"profile_2fa_confirm_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileConfirmTwoFactorResponse = OperationResult<\n operations[\"profile_2fa_confirm_create\"]\n>;\n\nexport interface ProfileDisableTwoFactorOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_disable_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"profile_2fa_disable_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileDisableTwoFactorResponse = OperationResult<\n operations[\"profile_2fa_disable_create\"]\n>;\n\nexport interface ProfileSetupTwoFactorOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_setup_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"profile_2fa_setup_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileSetupTwoFactorResponse = OperationResult<operations[\"profile_2fa_setup_create\"]>;\n\nexport interface ProfileGetTwoFactorStatusOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_status_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type ProfileGetTwoFactorStatusResponse = OperationResult<\n operations[\"profile_2fa_status_retrieve\"]\n>;\n\nexport interface ProfileChangePasswordOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_change_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"profile_change_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileChangePasswordResponse = OperationResult<\n operations[\"profile_change_password_create\"]\n>;\n\nexport class ProfileResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Get the current profile */\n async get(options: ProfileGetOptions = {}): Promise<ProfileGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get the current profile; include response metadata. */\n async getWithResponse(options: ProfileGetOptions = {}): Promise<ApiResponse<ProfileGetResponse>> {\n return this.#client._callWithResponse<ProfileGetResponse>(\n {\n operationId: \"profile_retrieve\",\n method: \"GET\",\n path: \"/profile\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update the current profile */\n async update(options: ProfileUpdateOptions = {}): Promise<ProfileUpdateResponse> {\n return (await this.updateWithResponse(options)).data;\n }\n\n /** Update the current profile; include response metadata. */\n async updateWithResponse(\n options: ProfileUpdateOptions = {},\n ): Promise<ApiResponse<ProfileUpdateResponse>> {\n return this.#client._callWithResponse<ProfileUpdateResponse>(\n {\n operationId: \"profile_partial_update\",\n method: \"PATCH\",\n path: \"/profile\",\n },\n {\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete the current account */\n async delete(options: ProfileDeleteOptions = {}): Promise<ProfileDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete the current account; include response metadata. */\n async deleteWithResponse(\n options: ProfileDeleteOptions = {},\n ): Promise<ApiResponse<ProfileDeleteResponse>> {\n return this.#client._callWithResponse<ProfileDeleteResponse>(\n {\n operationId: \"profile_destroy\",\n method: \"DELETE\",\n path: \"/profile\",\n },\n {\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Confirm two-factor authentication */\n async confirmTwoFactor(\n options: ProfileConfirmTwoFactorOptions,\n ): Promise<ProfileConfirmTwoFactorResponse> {\n return (await this.confirmTwoFactorWithResponse(options)).data;\n }\n\n /** Confirm two-factor authentication; include response metadata. */\n async confirmTwoFactorWithResponse(\n options: ProfileConfirmTwoFactorOptions,\n ): Promise<ApiResponse<ProfileConfirmTwoFactorResponse>> {\n return this.#client._callWithResponse<ProfileConfirmTwoFactorResponse>(\n {\n operationId: \"profile_2fa_confirm_create\",\n method: \"POST\",\n path: \"/profile/2fa/confirm\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Disable two-factor authentication */\n async disableTwoFactor(\n options: ProfileDisableTwoFactorOptions,\n ): Promise<ProfileDisableTwoFactorResponse> {\n return (await this.disableTwoFactorWithResponse(options)).data;\n }\n\n /** Disable two-factor authentication; include response metadata. */\n async disableTwoFactorWithResponse(\n options: ProfileDisableTwoFactorOptions,\n ): Promise<ApiResponse<ProfileDisableTwoFactorResponse>> {\n return this.#client._callWithResponse<ProfileDisableTwoFactorResponse>(\n {\n operationId: \"profile_2fa_disable_create\",\n method: \"POST\",\n path: \"/profile/2fa/disable\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Prepare two-factor authentication */\n async setupTwoFactor(\n options: ProfileSetupTwoFactorOptions = {},\n ): Promise<ProfileSetupTwoFactorResponse> {\n return (await this.setupTwoFactorWithResponse(options)).data;\n }\n\n /** Prepare two-factor authentication; include response metadata. */\n async setupTwoFactorWithResponse(\n options: ProfileSetupTwoFactorOptions = {},\n ): Promise<ApiResponse<ProfileSetupTwoFactorResponse>> {\n return this.#client._callWithResponse<ProfileSetupTwoFactorResponse>(\n {\n operationId: \"profile_2fa_setup_create\",\n method: \"POST\",\n path: \"/profile/2fa/setup\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get two-factor status */\n async getTwoFactorStatus(\n options: ProfileGetTwoFactorStatusOptions = {},\n ): Promise<ProfileGetTwoFactorStatusResponse> {\n return (await this.getTwoFactorStatusWithResponse(options)).data;\n }\n\n /** Get two-factor status; include response metadata. */\n async getTwoFactorStatusWithResponse(\n options: ProfileGetTwoFactorStatusOptions = {},\n ): Promise<ApiResponse<ProfileGetTwoFactorStatusResponse>> {\n return this.#client._callWithResponse<ProfileGetTwoFactorStatusResponse>(\n {\n operationId: \"profile_2fa_status_retrieve\",\n method: \"GET\",\n path: \"/profile/2fa/status\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Change the account password */\n async changePassword(\n options: ProfileChangePasswordOptions,\n ): Promise<ProfileChangePasswordResponse> {\n return (await this.changePasswordWithResponse(options)).data;\n }\n\n /** Change the account password; include response metadata. */\n async changePasswordWithResponse(\n options: ProfileChangePasswordOptions,\n ): Promise<ApiResponse<ProfileChangePasswordResponse>> {\n return this.#client._callWithResponse<ProfileChangePasswordResponse>(\n {\n operationId: \"profile_change_password_create\",\n method: \"POST\",\n path: \"/profile/change-password\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface ProxiesGenerateOptions {\n acceptLanguage?: OperationParameter<\n operations[\"proxies_generate_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"proxies_generate_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProxiesGenerateResponse = OperationResult<operations[\"proxies_generate_create\"]>;\n\nexport class ProxiesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Generate proxy credentials */\n async generate(options: ProxiesGenerateOptions): Promise<ProxiesGenerateResponse> {\n return (await this.generateWithResponse(options)).data;\n }\n\n /** Generate proxy credentials; include response metadata. */\n async generateWithResponse(\n options: ProxiesGenerateOptions,\n ): Promise<ApiResponse<ProxiesGenerateResponse>> {\n return this.#client._callWithResponse<ProxiesGenerateResponse>(\n {\n operationId: \"proxies_generate_create\",\n method: \"POST\",\n path: \"/proxies/generate\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface RewardsListOptions {\n level?: OperationParameter<operations[\"rewards_list\"], \"query\", \"level\">;\n limit?: OperationParameter<operations[\"rewards_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"rewards_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"rewards_list\"], \"query\", \"ordering\">;\n userEmail?: OperationParameter<operations[\"rewards_list\"], \"query\", \"user__email\">;\n userId?: OperationParameter<operations[\"rewards_list\"], \"query\", \"user__id\">;\n acceptLanguage?: OperationParameter<operations[\"rewards_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type RewardsListResponse = OperationResult<operations[\"rewards_list\"]>;\n\nexport interface RewardsClaimOptions {\n acceptLanguage?: OperationParameter<\n operations[\"rewards_claim_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"rewards_claim_create\"]>;\n request?: RequestControls;\n}\n\nexport type RewardsClaimResponse = OperationResult<operations[\"rewards_claim_create\"]>;\n\nexport class RewardsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List account rewards */\n async list(options: RewardsListOptions = {}): Promise<RewardsListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List account rewards; include response metadata. */\n async listWithResponse(\n options: RewardsListOptions = {},\n ): Promise<ApiResponse<RewardsListResponse>> {\n return this.#client._callWithResponse<RewardsListResponse>(\n {\n operationId: \"rewards_list\",\n method: \"GET\",\n path: \"/rewards\",\n },\n {\n query: {\n level: options.level,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n user__email: options.userEmail,\n user__id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Claim available rewards */\n async claim(options: RewardsClaimOptions): Promise<RewardsClaimResponse> {\n return (await this.claimWithResponse(options)).data;\n }\n\n /** Claim available rewards; include response metadata. */\n async claimWithResponse(\n options: RewardsClaimOptions,\n ): Promise<ApiResponse<RewardsClaimResponse>> {\n return this.#client._callWithResponse<RewardsClaimResponse>(\n {\n operationId: \"rewards_claim_create\",\n method: \"POST\",\n path: \"/rewards/claim\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface SettingsGetOptions {\n acceptLanguage?: OperationParameter<operations[\"settings_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type SettingsGetResponse = OperationResult<operations[\"settings_retrieve\"]>;\n\nexport class SettingsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Get account settings */\n async get(options: SettingsGetOptions = {}): Promise<SettingsGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get account settings; include response metadata. */\n async getWithResponse(\n options: SettingsGetOptions = {},\n ): Promise<ApiResponse<SettingsGetResponse>> {\n return this.#client._callWithResponse<SettingsGetResponse>(\n {\n operationId: \"settings_retrieve\",\n method: \"GET\",\n path: \"/settings\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface TelegramDashboardGetConnectionOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_connection_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardGetConnectionResponse = OperationResult<\n operations[\"integrations_telegram_connection_retrieve\"]\n>;\n\nexport interface TelegramDashboardUpdateConnectionOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_connection_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"integrations_telegram_connection_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardUpdateConnectionResponse = OperationResult<\n operations[\"integrations_telegram_connection_partial_update\"]\n>;\n\nexport interface TelegramDashboardDeleteConnectionOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_connection_destroy\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardDeleteConnectionResponse = OperationResult<\n operations[\"integrations_telegram_connection_destroy\"]\n>;\n\nexport interface TelegramDashboardCreateLinkOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_link_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardCreateLinkResponse = OperationResult<\n operations[\"integrations_telegram_link_create\"]\n>;\n\nexport class TelegramDashboardResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Get the Telegram dashboard connection */\n async getConnection(\n options: TelegramDashboardGetConnectionOptions = {},\n ): Promise<TelegramDashboardGetConnectionResponse> {\n return (await this.getConnectionWithResponse(options)).data;\n }\n\n /** Get the Telegram dashboard connection; include response metadata. */\n async getConnectionWithResponse(\n options: TelegramDashboardGetConnectionOptions = {},\n ): Promise<ApiResponse<TelegramDashboardGetConnectionResponse>> {\n return this.#client._callWithResponse<TelegramDashboardGetConnectionResponse>(\n {\n operationId: \"integrations_telegram_connection_retrieve\",\n method: \"GET\",\n path: \"/integrations/telegram/connection\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update Telegram dashboard preferences */\n async updateConnection(\n options: TelegramDashboardUpdateConnectionOptions = {},\n ): Promise<TelegramDashboardUpdateConnectionResponse> {\n return (await this.updateConnectionWithResponse(options)).data;\n }\n\n /** Update Telegram dashboard preferences; include response metadata. */\n async updateConnectionWithResponse(\n options: TelegramDashboardUpdateConnectionOptions = {},\n ): Promise<ApiResponse<TelegramDashboardUpdateConnectionResponse>> {\n return this.#client._callWithResponse<TelegramDashboardUpdateConnectionResponse>(\n {\n operationId: \"integrations_telegram_connection_partial_update\",\n method: \"PATCH\",\n path: \"/integrations/telegram/connection\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Disconnect the Telegram dashboard */\n async deleteConnection(\n options: TelegramDashboardDeleteConnectionOptions = {},\n ): Promise<TelegramDashboardDeleteConnectionResponse> {\n return (await this.deleteConnectionWithResponse(options)).data;\n }\n\n /** Disconnect the Telegram dashboard; include response metadata. */\n async deleteConnectionWithResponse(\n options: TelegramDashboardDeleteConnectionOptions = {},\n ): Promise<ApiResponse<TelegramDashboardDeleteConnectionResponse>> {\n return this.#client._callWithResponse<TelegramDashboardDeleteConnectionResponse>(\n {\n operationId: \"integrations_telegram_connection_destroy\",\n method: \"DELETE\",\n path: \"/integrations/telegram/connection\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a Telegram account link */\n async createLink(\n options: TelegramDashboardCreateLinkOptions = {},\n ): Promise<TelegramDashboardCreateLinkResponse> {\n return (await this.createLinkWithResponse(options)).data;\n }\n\n /** Create a Telegram account link; include response metadata. */\n async createLinkWithResponse(\n options: TelegramDashboardCreateLinkOptions = {},\n ): Promise<ApiResponse<TelegramDashboardCreateLinkResponse>> {\n return this.#client._callWithResponse<TelegramDashboardCreateLinkResponse>(\n {\n operationId: \"integrations_telegram_link_create\",\n method: \"POST\",\n path: \"/integrations/telegram/link\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface UsersListOptions {\n email?: OperationParameter<operations[\"users_list\"], \"query\", \"email\">;\n id?: OperationParameter<operations[\"users_list\"], \"query\", \"id\">;\n limit?: OperationParameter<operations[\"users_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"users_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"users_list\"], \"query\", \"ordering\">;\n packageId?: OperationParameter<operations[\"users_list\"], \"query\", \"package__id\">;\n search?: OperationParameter<operations[\"users_list\"], \"query\", \"search\">;\n username?: OperationParameter<operations[\"users_list\"], \"query\", \"username\">;\n acceptLanguage?: OperationParameter<operations[\"users_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersListResponse = OperationResult<operations[\"users_list\"]>;\n\nexport interface UsersCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"users_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"users_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"users_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersCreateResponse = OperationResult<operations[\"users_create\"]>;\n\nexport interface UsersGetOptions {\n id: OperationParameter<operations[\"users_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"users_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersGetResponse = OperationResult<operations[\"users_retrieve\"]>;\n\nexport interface UsersUpdateOptions {\n id: OperationParameter<operations[\"users_partial_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"users_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"users_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"users_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type UsersUpdateResponse = OperationResult<operations[\"users_partial_update\"]>;\n\nexport interface UsersDeleteOptions {\n id: OperationParameter<operations[\"users_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"users_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"users_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"users_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersDeleteResponse = OperationResult<operations[\"users_destroy\"]>;\n\nexport interface UsersAddDataOptions {\n id: OperationParameter<operations[\"users_data_add_create\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<\n operations[\"users_data_add_create\"],\n \"header\",\n \"Idempotency-Key\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"users_data_add_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_data_add_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersAddDataResponse = OperationResult<operations[\"users_data_add_create\"]>;\n\nexport interface UsersSubtractDataOptions {\n id: OperationParameter<operations[\"users_data_subtract_create\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<\n operations[\"users_data_subtract_create\"],\n \"header\",\n \"Idempotency-Key\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"users_data_subtract_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_data_subtract_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersSubtractDataResponse = OperationResult<operations[\"users_data_subtract_create\"]>;\n\nexport interface UsersResetDataOptions {\n id: OperationParameter<operations[\"users_data_reset_create\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<\n operations[\"users_data_reset_create\"],\n \"header\",\n \"Idempotency-Key\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"users_data_reset_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_data_reset_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersResetDataResponse = OperationResult<operations[\"users_data_reset_create\"]>;\n\nexport interface UsersListOrdersOptions {\n email?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"email\">;\n idPath: OperationParameter<operations[\"users_orders_list\"], \"path\", \"id\">;\n idQuery?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"id\">;\n limit?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"ordering\">;\n username?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"username\">;\n acceptLanguage?: OperationParameter<operations[\"users_orders_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersListOrdersResponse = OperationResult<operations[\"users_orders_list\"]>;\n\nexport interface UsersResetPasswordOptions {\n id: OperationParameter<operations[\"users_password_create\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<\n operations[\"users_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersResetPasswordResponse = OperationResult<operations[\"users_password_create\"]>;\n\nexport class UsersResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List users in the current account */\n async list(options: UsersListOptions = {}): Promise<UsersListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List users in the current account; include response metadata. */\n async listWithResponse(options: UsersListOptions = {}): Promise<ApiResponse<UsersListResponse>> {\n return this.#client._callWithResponse<UsersListResponse>(\n {\n operationId: \"users_list\",\n method: \"GET\",\n path: \"/users\",\n },\n {\n query: {\n email: options.email,\n id: options.id,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package__id: options.packageId,\n search: options.search,\n username: options.username,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a customer account */\n async create(options: UsersCreateOptions): Promise<UsersCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a customer account; include response metadata. */\n async createWithResponse(options: UsersCreateOptions): Promise<ApiResponse<UsersCreateResponse>> {\n return this.#client._callWithResponse<UsersCreateResponse>(\n {\n operationId: \"users_create\",\n method: \"POST\",\n path: \"/users\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a user */\n async get(options: UsersGetOptions): Promise<UsersGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get a user; include response metadata. */\n async getWithResponse(options: UsersGetOptions): Promise<ApiResponse<UsersGetResponse>> {\n return this.#client._callWithResponse<UsersGetResponse>(\n {\n operationId: \"users_retrieve\",\n method: \"GET\",\n path: \"/users/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update a user */\n async update(options: UsersUpdateOptions): Promise<UsersUpdateResponse> {\n return (await this.updateWithResponse(options)).data;\n }\n\n /** Update a user; include response metadata. */\n async updateWithResponse(options: UsersUpdateOptions): Promise<ApiResponse<UsersUpdateResponse>> {\n return this.#client._callWithResponse<UsersUpdateResponse>(\n {\n operationId: \"users_partial_update\",\n method: \"PATCH\",\n path: \"/users/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a user */\n async delete(options: UsersDeleteOptions): Promise<UsersDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a user; include response metadata. */\n async deleteWithResponse(options: UsersDeleteOptions): Promise<ApiResponse<UsersDeleteResponse>> {\n return this.#client._callWithResponse<UsersDeleteResponse>(\n {\n operationId: \"users_destroy\",\n method: \"DELETE\",\n path: \"/users/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Add data to a sub-user order */\n async addData(options: UsersAddDataOptions): Promise<UsersAddDataResponse> {\n return (await this.addDataWithResponse(options)).data;\n }\n\n /** Add data to a sub-user order; include response metadata. */\n async addDataWithResponse(\n options: UsersAddDataOptions,\n ): Promise<ApiResponse<UsersAddDataResponse>> {\n return this.#client._callWithResponse<UsersAddDataResponse>(\n {\n operationId: \"users_data_add_create\",\n method: \"POST\",\n path: \"/users/{id}/data/add\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Subtract data from a sub-user order */\n async subtractData(options: UsersSubtractDataOptions): Promise<UsersSubtractDataResponse> {\n return (await this.subtractDataWithResponse(options)).data;\n }\n\n /** Subtract data from a sub-user order; include response metadata. */\n async subtractDataWithResponse(\n options: UsersSubtractDataOptions,\n ): Promise<ApiResponse<UsersSubtractDataResponse>> {\n return this.#client._callWithResponse<UsersSubtractDataResponse>(\n {\n operationId: \"users_data_subtract_create\",\n method: \"POST\",\n path: \"/users/{id}/data/subtract\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Reset a user's remaining data */\n async resetData(options: UsersResetDataOptions): Promise<UsersResetDataResponse> {\n return (await this.resetDataWithResponse(options)).data;\n }\n\n /** Reset a user's remaining data; include response metadata. */\n async resetDataWithResponse(\n options: UsersResetDataOptions,\n ): Promise<ApiResponse<UsersResetDataResponse>> {\n return this.#client._callWithResponse<UsersResetDataResponse>(\n {\n operationId: \"users_data_reset_create\",\n method: \"POST\",\n path: \"/users/{id}/data/reset\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List a sub-user's orders */\n async listOrders(options: UsersListOrdersOptions): Promise<UsersListOrdersResponse> {\n return (await this.listOrdersWithResponse(options)).data;\n }\n\n /** List a sub-user's orders; include response metadata. */\n async listOrdersWithResponse(\n options: UsersListOrdersOptions,\n ): Promise<ApiResponse<UsersListOrdersResponse>> {\n return this.#client._callWithResponse<UsersListOrdersResponse>(\n {\n operationId: \"users_orders_list\",\n method: \"GET\",\n path: \"/users/{id}/orders\",\n },\n {\n path: {\n id: options.idPath,\n },\n query: {\n email: options.email,\n id: options.idQuery,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n username: options.username,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Rotate a sub-user proxy password */\n async resetPassword(options: UsersResetPasswordOptions): Promise<UsersResetPasswordResponse> {\n return (await this.resetPasswordWithResponse(options)).data;\n }\n\n /** Rotate a sub-user proxy password; include response metadata. */\n async resetPasswordWithResponse(\n options: UsersResetPasswordOptions,\n ): Promise<ApiResponse<UsersResetPasswordResponse>> {\n return this.#client._callWithResponse<UsersResetPasswordResponse>(\n {\n operationId: \"users_password_create\",\n method: \"POST\",\n path: \"/users/{id}/password\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface WebhooksListOptions {\n limit?: OperationParameter<operations[\"webhooks_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"webhooks_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type WebhooksListResponse = OperationResult<operations[\"webhooks_list\"]>;\n\nexport interface WebhooksCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"webhooks_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"webhooks_create\"]>;\n request?: RequestControls;\n}\n\nexport type WebhooksCreateResponse = OperationResult<operations[\"webhooks_create\"]>;\n\nexport interface WebhooksGetOptions {\n id: OperationParameter<operations[\"webhooks_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type WebhooksGetResponse = OperationResult<operations[\"webhooks_retrieve\"]>;\n\nexport interface WebhooksDeleteOptions {\n id: OperationParameter<operations[\"webhooks_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"webhooks_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"webhooks_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type WebhooksDeleteResponse = OperationResult<operations[\"webhooks_destroy\"]>;\n\nexport class WebhooksResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List customer webhooks */\n async list(options: WebhooksListOptions = {}): Promise<WebhooksListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List customer webhooks; include response metadata. */\n async listWithResponse(\n options: WebhooksListOptions = {},\n ): Promise<ApiResponse<WebhooksListResponse>> {\n return this.#client._callWithResponse<WebhooksListResponse>(\n {\n operationId: \"webhooks_list\",\n method: \"GET\",\n path: \"/webhooks\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a customer webhook */\n async create(options: WebhooksCreateOptions): Promise<WebhooksCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a customer webhook; include response metadata. */\n async createWithResponse(\n options: WebhooksCreateOptions,\n ): Promise<ApiResponse<WebhooksCreateResponse>> {\n return this.#client._callWithResponse<WebhooksCreateResponse>(\n {\n operationId: \"webhooks_create\",\n method: \"POST\",\n path: \"/webhooks\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a customer webhook */\n async get(options: WebhooksGetOptions): Promise<WebhooksGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get a customer webhook; include response metadata. */\n async getWithResponse(options: WebhooksGetOptions): Promise<ApiResponse<WebhooksGetResponse>> {\n return this.#client._callWithResponse<WebhooksGetResponse>(\n {\n operationId: \"webhooks_retrieve\",\n method: \"GET\",\n path: \"/webhooks/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a customer webhook */\n async delete(options: WebhooksDeleteOptions): Promise<WebhooksDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a customer webhook; include response metadata. */\n async deleteWithResponse(\n options: WebhooksDeleteOptions,\n ): Promise<ApiResponse<WebhooksDeleteResponse>> {\n return this.#client._callWithResponse<WebhooksDeleteResponse>(\n {\n operationId: \"webhooks_destroy\",\n method: \"DELETE\",\n path: \"/webhooks/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface ResourceCollection {\n readonly apiKeys: APIKeysResource;\n readonly affiliates: AffiliatesResource;\n readonly analytics: AnalyticsResource;\n readonly authorization: AuthorizationResource;\n readonly coupons: CouponsResource;\n readonly invoices: InvoicesResource;\n readonly locations: LocationsResource;\n readonly news: NewsResource;\n readonly orders: OrdersResource;\n readonly packages: PackagesResource;\n readonly profile: ProfileResource;\n readonly proxies: ProxiesResource;\n readonly rewards: RewardsResource;\n readonly settings: SettingsResource;\n readonly telegram: TelegramDashboardResource;\n readonly users: UsersResource;\n readonly webhooks: WebhooksResource;\n}\n\nexport function createResourceCollection(client: ResourceClient): ResourceCollection {\n return {\n apiKeys: new APIKeysResource(client),\n affiliates: new AffiliatesResource(client),\n analytics: new AnalyticsResource(client),\n authorization: new AuthorizationResource(client),\n coupons: new CouponsResource(client),\n invoices: new InvoicesResource(client),\n locations: new LocationsResource(client),\n news: new NewsResource(client),\n orders: new OrdersResource(client),\n packages: new PackagesResource(client),\n profile: new ProfileResource(client),\n proxies: new ProxiesResource(client),\n rewards: new RewardsResource(client),\n settings: new SettingsResource(client),\n telegram: new TelegramDashboardResource(client),\n users: new UsersResource(client),\n webhooks: new WebhooksResource(client),\n };\n}\n","import { PaginationError } from \"./errors.js\";\n\nexport interface PageParameters {\n limit: number;\n offset: number;\n}\n\nexport interface PaginatedPage<Item> {\n count?: number;\n next?: string | null;\n previous?: string | null;\n results: Item[];\n}\n\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n maxPages?: number;\n}\n\nexport async function* paginate<Item>(\n pageFetcher: (parameters: PageParameters) => Promise<PaginatedPage<Item>>,\n options: PaginationOptions = {},\n): AsyncGenerator<Item, void, undefined> {\n const limit = options.limit ?? 100;\n let offset = options.offset ?? 0;\n const maxPages = options.maxPages ?? 10_000;\n if (limit <= 0 || offset < 0 || maxPages <= 0) {\n throw new RangeError(\"limit and maxPages must be positive; offset must not be negative.\");\n }\n\n const visited = new Set<string>();\n for (let pageNumber = 0; pageNumber < maxPages; pageNumber += 1) {\n const page = await pageFetcher({ limit, offset });\n if (!Array.isArray(page.results)) {\n throw new PaginationError(\"A page object must expose an array in results.\");\n }\n yield* page.results;\n if (page.next === null || page.next === undefined) return;\n if (visited.has(page.next)) {\n throw new PaginationError(\"Pagination stopped because the API returned a repeated next URL.\");\n }\n visited.add(page.next);\n const nextOffset = offsetFromUrl(page.next);\n offset = nextOffset ?? offset + page.results.length;\n if (page.results.length === 0 && nextOffset === undefined) {\n throw new PaginationError(\"Pagination cannot advance from an empty page.\");\n }\n }\n throw new PaginationError(\"Pagination stopped after the configured maximum number of pages.\");\n}\n\nfunction offsetFromUrl(url: string): number | undefined {\n try {\n const value = new URL(url, \"https://api.proxyrequest.com\").searchParams.get(\"offset\");\n if (value === null) return undefined;\n const offset = Number(value);\n return Number.isInteger(offset) && offset >= 0 ? offset : undefined;\n } catch {\n return undefined;\n }\n}\n","import createClient, { type Middleware, type Client as OpenApiClient } from \"openapi-fetch\";\nimport { ApiError } from \"./errors.js\";\nimport { FileDownload } from \"./files.js\";\nimport { createResourceCollection, type ResourceCollection } from \"./generated/resources.js\";\nimport type { paths } from \"./generated/schema.js\";\nimport type {\n ApiResponse,\n OperationCallData,\n OperationCallSpec,\n RequestControls,\n ResourceClient,\n} from \"./internal.js\";\nimport {\n type PageParameters,\n type PaginatedPage,\n type PaginationOptions,\n paginate,\n} from \"./pagination.js\";\n\nexport const DEFAULT_BASE_URL = \"https://api.proxyrequest.com/api/v1\";\nexport const SDK_VERSION = \"2.1.0\";\n\nexport interface ClientCommonOptions {\n baseUrl?: string;\n language?: string;\n timeoutMs?: number;\n fetch?: typeof globalThis.fetch;\n headers?: HeadersInit;\n /** Automatically protect supported mutations with an Idempotency-Key. */\n idempotency?: boolean;\n}\n\nexport type ClientOptions = ClientCommonOptions &\n (\n | { apiKey: string; bearerToken?: never }\n | { bearerToken: string; apiKey?: never }\n | { apiKey?: undefined; bearerToken?: undefined }\n );\n\nexport interface RawRequestOptions extends RequestControls {\n query?: Record<string, unknown>;\n body?: unknown;\n}\n\nexport class ProxyRequestClient implements ResourceClient, ResourceCollection {\n readonly apiKeys: ResourceCollection[\"apiKeys\"];\n readonly affiliates: ResourceCollection[\"affiliates\"];\n readonly analytics: ResourceCollection[\"analytics\"];\n readonly authorization: ResourceCollection[\"authorization\"];\n readonly coupons: ResourceCollection[\"coupons\"];\n readonly invoices: ResourceCollection[\"invoices\"];\n readonly locations: ResourceCollection[\"locations\"];\n readonly news: ResourceCollection[\"news\"];\n readonly orders: ResourceCollection[\"orders\"];\n readonly packages: ResourceCollection[\"packages\"];\n readonly profile: ResourceCollection[\"profile\"];\n readonly proxies: ResourceCollection[\"proxies\"];\n readonly rewards: ResourceCollection[\"rewards\"];\n readonly settings: ResourceCollection[\"settings\"];\n readonly telegram: ResourceCollection[\"telegram\"];\n readonly users: ResourceCollection[\"users\"];\n readonly webhooks: ResourceCollection[\"webhooks\"];\n\n readonly baseUrl: string;\n readonly language: string;\n readonly timeoutMs: number;\n readonly idempotency: boolean;\n readonly #fetch: typeof globalThis.fetch;\n readonly #headers: Headers;\n readonly #openapi: OpenApiClient<paths, `${string}/${string}`>;\n\n constructor(options: ClientOptions = {}) {\n this.baseUrl = normalizeBaseUrl(options.baseUrl ?? DEFAULT_BASE_URL);\n this.language = options.language ?? \"en\";\n this.timeoutMs = options.timeoutMs ?? 15_000;\n this.idempotency = options.idempotency ?? true;\n if (!Number.isFinite(this.timeoutMs) || this.timeoutMs < 0) {\n throw new RangeError(\"timeoutMs must be a non-negative finite number.\");\n }\n this.#fetch = options.fetch ?? globalThis.fetch;\n if (typeof this.#fetch !== \"function\") {\n throw new TypeError(\"A Fetch API implementation is required.\");\n }\n this.#headers = new Headers(options.headers);\n this.#headers.set(\"Accept-Language\", this.language);\n if (options.apiKey !== undefined)\n this.#headers.set(\"Authorization\", `Static ${options.apiKey}`);\n if (options.bearerToken !== undefined) {\n this.#headers.set(\"Authorization\", `Bearer ${options.bearerToken}`);\n }\n\n this.#openapi = createClient<paths>({\n baseUrl: this.baseUrl,\n fetch: this.#fetch,\n headers: this.#headers,\n });\n const errorMiddleware: Middleware = {\n async onResponse({ response }) {\n if (!response.ok) throw await ApiError.fromResponse(response);\n return undefined;\n },\n onError({ error }) {\n return error instanceof ApiError ? error : ApiError.network(error);\n },\n };\n this.#openapi.use(errorMiddleware);\n\n const resources = createResourceCollection(this);\n this.apiKeys = resources.apiKeys;\n this.affiliates = resources.affiliates;\n this.analytics = resources.analytics;\n this.authorization = resources.authorization;\n this.coupons = resources.coupons;\n this.invoices = resources.invoices;\n this.locations = resources.locations;\n this.news = resources.news;\n this.orders = resources.orders;\n this.packages = resources.packages;\n this.profile = resources.profile;\n this.proxies = resources.proxies;\n this.rewards = resources.rewards;\n this.settings = resources.settings;\n this.telegram = resources.telegram;\n this.users = resources.users;\n this.webhooks = resources.webhooks;\n }\n\n static withApiKey(apiKey: string, options: ClientCommonOptions = {}): ProxyRequestClient {\n return new ProxyRequestClient({ ...options, apiKey });\n }\n\n static withBearerToken(\n bearerToken: string,\n options: ClientCommonOptions = {},\n ): ProxyRequestClient {\n return new ProxyRequestClient({ ...options, bearerToken });\n }\n\n static anonymous(options: ClientCommonOptions = {}): ProxyRequestClient {\n return new ProxyRequestClient(options);\n }\n\n async _call<Result>(spec: OperationCallSpec, data: OperationCallData = {}): Promise<Result> {\n return (await this._callWithResponse<Result>(spec, data)).data;\n }\n\n async _callWithResponse<Result>(\n spec: OperationCallSpec,\n data: OperationCallData = {},\n ): Promise<ApiResponse<Result>> {\n const controls = data.request ?? {};\n const controlHeaders = new Headers(controls.headers);\n const parameterKey = stringHeader(data.headers?.[\"Idempotency-Key\"]);\n const controlKey = controlHeaders.get(\"Idempotency-Key\") ?? undefined;\n const idempotencyKey = spec.idempotent\n ? (parameterKey ?? controlKey ?? (this.idempotency ? newIdempotencyKey() : undefined))\n : undefined;\n if (spec.idempotent) controlHeaders.delete(\"Idempotency-Key\");\n const operationHeaders = {\n ...data.headers,\n ...(idempotencyKey === undefined ? {} : { \"Idempotency-Key\": idempotencyKey }),\n };\n const method = this.#openapi[spec.method] as (\n path: string,\n options: unknown,\n ) => Promise<{ data?: unknown; error?: unknown; response: Response }>;\n\n for (let attempt = 0; attempt < 3; attempt += 1) {\n const timeout = requestSignal(controls.signal, controls.timeoutMs ?? this.timeoutMs);\n try {\n const result = await method(spec.path, {\n params: {\n ...(data.path === undefined ? {} : { path: data.path }),\n ...(data.query === undefined ? {} : { query: data.query }),\n ...(Object.keys(operationHeaders).length === 0 ? {} : { header: operationHeaders }),\n },\n ...(data.body === undefined ? {} : { body: data.body }),\n ...([...controlHeaders].length === 0 ? {} : { headers: controlHeaders }),\n signal: timeout.signal,\n ...(spec.binary ? { parseAs: \"arrayBuffer\" as const } : {}),\n });\n if (result.error !== undefined) {\n throw ApiError.unexpected(\n `ProxyRequest returned an undocumented error for ${spec.operationId}.`,\n result.error,\n );\n }\n const dataValue = spec.binary\n ? binaryResult<Result>(spec, result.data, result.response.headers)\n : (result.data as Result);\n const headers = headersToRecord(result.response.headers);\n const etag = headers.etag;\n return {\n data: dataValue,\n statusCode: result.response.status,\n headers,\n ...(etag === undefined ? {} : { etag }),\n idempotencyReplayed: headers[\"idempotency-replayed\"]?.toLowerCase() === \"true\",\n };\n } catch (error) {\n const apiError = (\n error instanceof ApiError\n ? error\n : ApiError.unexpected(\n `Unable to process the ProxyRequest response for ${spec.operationId}.`,\n error,\n )\n ).withIdempotencyKey(idempotencyKey);\n const delay = retryDelay(apiError, attempt);\n if (\n attempt >= 2 ||\n idempotencyKey === undefined ||\n controls.signal?.aborted ||\n delay === undefined\n ) {\n throw apiError;\n }\n await wait(delay, controls.signal);\n } finally {\n timeout.cleanup();\n }\n }\n throw ApiError.unexpected(`Unable to complete ${spec.operationId}.`);\n }\n\n async request(method: string, path: string, options: RawRequestOptions = {}): Promise<Response> {\n const url = new URL(path.replace(/^\\//u, \"\"), `${this.baseUrl}/`);\n appendQuery(url.searchParams, options.query);\n const headers = new Headers(this.#headers);\n new Headers(options.headers).forEach((value, key) => {\n headers.set(key, value);\n });\n let body: BodyInit | undefined;\n if (options.body !== undefined) {\n if (isBodyInit(options.body)) {\n body = options.body;\n } else {\n headers.set(\"Content-Type\", \"application/json\");\n body = JSON.stringify(options.body);\n }\n }\n const timeout = requestSignal(options.signal, options.timeoutMs ?? this.timeoutMs);\n try {\n const response = await this.#fetch(url, {\n method: method.toUpperCase(),\n headers,\n ...(body === undefined ? {} : { body }),\n signal: timeout.signal,\n });\n if (!response.ok) throw await ApiError.fromResponse(response);\n return response;\n } catch (error) {\n if (error instanceof ApiError) throw error;\n throw ApiError.network(error);\n } finally {\n timeout.cleanup();\n }\n }\n\n paginate<Item>(\n pageFetcher: (parameters: PageParameters) => Promise<PaginatedPage<Item>>,\n options: PaginationOptions = {},\n ): AsyncGenerator<Item, void, undefined> {\n return paginate(pageFetcher, options);\n }\n\n downloadInvoicePdf(id: string, request?: RequestControls): Promise<FileDownload> {\n return this.invoices.downloadPdf({ id, ...(request === undefined ? {} : { request }) });\n }\n}\n\nexport { ProxyRequestClient as Client };\n\nfunction normalizeBaseUrl(value: string): string {\n const url = new URL(value);\n if (url.protocol !== \"https:\" && url.protocol !== \"http:\") {\n throw new TypeError(\"baseUrl must use http or https.\");\n }\n return url.toString().replace(/\\/$/u, \"\");\n}\n\nfunction requestSignal(\n input: AbortSignal | undefined,\n timeoutMs: number,\n): { signal: AbortSignal; cleanup: () => void } {\n if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {\n throw new RangeError(\"timeoutMs must be a non-negative finite number.\");\n }\n const controller = new AbortController();\n const abortFromInput = (): void => controller.abort(input?.reason);\n if (input?.aborted) abortFromInput();\n else input?.addEventListener(\"abort\", abortFromInput, { once: true });\n const timer =\n timeoutMs === 0\n ? undefined\n : setTimeout(\n () => controller.abort(new DOMException(\"Request timed out.\", \"TimeoutError\")),\n timeoutMs,\n );\n return {\n signal: controller.signal,\n cleanup: () => {\n if (timer !== undefined) clearTimeout(timer);\n input?.removeEventListener(\"abort\", abortFromInput);\n },\n };\n}\n\nfunction appendQuery(search: URLSearchParams, query: Record<string, unknown> | undefined): void {\n if (query === undefined) return;\n for (const [key, value] of Object.entries(query)) {\n if (value === undefined || value === null) continue;\n if (Array.isArray(value)) {\n for (const item of value) search.append(key, String(item));\n } else {\n search.set(key, String(value));\n }\n }\n}\n\nfunction isBodyInit(value: unknown): value is BodyInit {\n return (\n typeof value === \"string\" ||\n value instanceof Blob ||\n value instanceof ArrayBuffer ||\n ArrayBuffer.isView(value) ||\n value instanceof FormData ||\n value instanceof URLSearchParams ||\n value instanceof ReadableStream\n );\n}\n\nfunction stringHeader(value: unknown): string | undefined {\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction newIdempotencyKey(): string {\n if (typeof globalThis.crypto?.randomUUID !== \"function\") {\n throw new Error(\"crypto.randomUUID() is required for automatic idempotency keys.\");\n }\n return globalThis.crypto.randomUUID();\n}\n\nfunction binaryResult<Result>(spec: OperationCallSpec, data: unknown, headers: Headers): Result {\n if (!(data instanceof ArrayBuffer)) {\n throw ApiError.unexpected(`ProxyRequest returned an invalid file for ${spec.operationId}.`);\n }\n return FileDownload.fromResponse(data, headers) as Result;\n}\n\nfunction headersToRecord(headers: Headers): Readonly<Record<string, string>> {\n return Object.freeze(Object.fromEntries(headers.entries()));\n}\n\nfunction retryDelay(error: ApiError, attempt: number): number | undefined {\n if (error.kind === \"network\") return attempt === 0 ? 100 : 200;\n if (\n error.statusCode === 409 &&\n error.retryAfter !== undefined &&\n error.retryAfter >= 0 &&\n error.retryAfter <= 5\n ) {\n return error.retryAfter * 1_000;\n }\n return undefined;\n}\n\nfunction wait(milliseconds: number, signal: AbortSignal | undefined): Promise<void> {\n if (signal?.aborted) return Promise.reject(ApiError.network(signal.reason));\n return new Promise((resolvePromise, reject) => {\n const timer = setTimeout(() => {\n signal?.removeEventListener(\"abort\", abort);\n resolvePromise();\n }, milliseconds);\n const abort = () => {\n clearTimeout(timer);\n reject(ApiError.network(signal?.reason));\n };\n signal?.addEventListener(\"abort\", abort, { once: true });\n });\n}\n","import { InvalidSignatureError } from \"./errors.js\";\n\nconst encoder = new TextEncoder();\n\nexport class WebhookVerifier {\n /** Verify X-Signature against the exact raw request body. */\n static async verify(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n ): Promise<boolean> {\n if (!signature || !secret) return false;\n const candidate = parseBase64Signature(signature);\n if (candidate === undefined) return false;\n\n try {\n const key = await globalThis.crypto.subtle.importKey(\n \"raw\",\n encoder.encode(secret),\n { name: \"HMAC\", hash: \"SHA-256\" },\n false,\n [\"verify\"],\n );\n return globalThis.crypto.subtle.verify(\n \"HMAC\",\n key,\n candidate.slice().buffer,\n bodyBytes(rawBody).slice().buffer,\n );\n } catch {\n return false;\n }\n }\n\n static async verifyOrThrow(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n ): Promise<void> {\n if (!(await WebhookVerifier.verify(rawBody, signature, secret))) {\n throw new InvalidSignatureError(\"The ProxyRequest webhook signature is invalid.\");\n }\n }\n\n static async decodeVerifiedJson<Payload = Record<string, unknown>>(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n ): Promise<Payload> {\n await WebhookVerifier.verifyOrThrow(rawBody, signature, secret);\n const text =\n typeof rawBody === \"string\" ? rawBody : new TextDecoder().decode(bodyBytes(rawBody));\n try {\n const payload: unknown = JSON.parse(text);\n if (typeof payload !== \"object\" || payload === null || Array.isArray(payload)) {\n throw new TypeError(\"The verified webhook payload must be a JSON object.\");\n }\n return payload as Payload;\n } catch (error) {\n if (error instanceof TypeError) throw error;\n throw new TypeError(\"The verified webhook body is not valid JSON.\", { cause: error });\n }\n }\n}\n\nfunction bodyBytes(value: string | Uint8Array | ArrayBuffer): Uint8Array {\n if (typeof value === \"string\") return encoder.encode(value);\n return value instanceof Uint8Array ? value : new Uint8Array(value);\n}\n\nfunction parseBase64Signature(signature: string): Uint8Array | undefined {\n if (!/^[A-Za-z0-9+/]{43}=$/u.test(signature)) return undefined;\n const decoded = atob(signature);\n if (decoded.length !== 32 || btoa(decoded) !== signature) return undefined;\n return Uint8Array.from(decoded, (character) => character.charCodeAt(0));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAMA,YAAU,IAAI,YAAY;AAchC,IAAa,oBAAb,cAAuC,MAAM;CAC3C,AAAkB,OAAe;AACnC;AAiBA,IAAa,WAAb,MAAa,iBAAiB,kBAAkB;CAC9C,AAAkB,OAAO;CACzB,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAkB;CAElB,YAAY,SAAiB,SAA0B;EACrD,MAAM,OAAO;EACb,KAAK,OAAO,QAAQ;EACpB,KAAK,aAAa,QAAQ;EAC1B,KAAK,SAAS,QAAQ;EACtB,KAAK,cAAc,QAAQ,eAAe,CAAC;EAC3C,KAAK,YAAY,QAAQ;EACzB,KAAK,aAAa,QAAQ;EAC1B,KAAK,kBAAkB,QAAQ;EAC/B,KAAK,cAAc,QAAQ;EAC3B,KAAK,iBAAiB,QAAQ;EAC9B,KAAK,UAAU,QAAQ,WAAW,CAAC;EACnC,KAAK,UAAU,QAAQ,2BAAW,IAAI,WAAW;EACjD,KAAK,QAAQ,QAAQ;CACvB;CAEA,aAAa,aAAa,UAAuC;EAC/D,MAAM,UAAUC,kBAAgB,SAAS,OAAO;EAChD,IAAI,0BAAU,IAAI,WAAW;EAC7B,IAAI;GACF,UAAU,IAAI,WAAW,MAAM,SAAS,MAAM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M,WAAW,OAAO;CACjE,OAAO,WAAW,KAAK,UAAU,cAAc,UAAU,WAAW,CAAC,CAAC;AACxE"}
1
+ {"version":3,"file":"index.cjs","names":["isObject","encoder","headersToRecord","#client","#fetch","#headers","#openapi"],"sources":["../node_modules/openapi-fetch/dist/index.mjs","../node_modules/lossless-json/lib/esm/utils.js","../node_modules/lossless-json/lib/esm/LosslessNumber.js","../node_modules/lossless-json/lib/esm/numberParsers.js","../node_modules/lossless-json/lib/esm/revive.js","../node_modules/lossless-json/lib/esm/parse.js","../src/analytics.ts","../src/errors.ts","../src/files.ts","../src/generated/resources.ts","../src/pagination.ts","../src/client.ts","../src/webhooks.ts"],"sourcesContent":["const PATH_PARAM_RE = /\\{[^{}]+\\}/g;\nconst supportsRequestInitExt = () => {\n return typeof process === \"object\" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;\n};\nfunction randomID() {\n return Math.random().toString(36).slice(2, 11);\n}\nfunction createClient(clientOptions) {\n let {\n baseUrl = \"\",\n Request: CustomRequest = globalThis.Request,\n fetch: baseFetch = globalThis.fetch,\n querySerializer: globalQuerySerializer,\n bodySerializer: globalBodySerializer,\n pathSerializer: globalPathSerializer,\n headers: baseHeaders,\n requestInitExt = void 0,\n ...baseOptions\n } = { ...clientOptions };\n requestInitExt = supportsRequestInitExt() ? requestInitExt : void 0;\n baseUrl = removeTrailingSlash(baseUrl);\n const globalMiddlewares = [];\n async function coreFetch(schemaPath, fetchOptions) {\n const {\n baseUrl: localBaseUrl,\n fetch = baseFetch,\n Request = CustomRequest,\n headers,\n params = {},\n parseAs = \"json\",\n querySerializer: requestQuerySerializer,\n bodySerializer = globalBodySerializer ?? defaultBodySerializer,\n pathSerializer: requestPathSerializer,\n body,\n middleware: requestMiddlewares = [],\n ...init\n } = fetchOptions || {};\n let finalBaseUrl = baseUrl;\n if (localBaseUrl) {\n finalBaseUrl = removeTrailingSlash(localBaseUrl) ?? baseUrl;\n }\n let querySerializer = typeof globalQuerySerializer === \"function\" ? globalQuerySerializer : createQuerySerializer(globalQuerySerializer);\n if (requestQuerySerializer) {\n querySerializer = typeof requestQuerySerializer === \"function\" ? requestQuerySerializer : createQuerySerializer({\n ...typeof globalQuerySerializer === \"object\" ? globalQuerySerializer : {},\n ...requestQuerySerializer\n });\n }\n const pathSerializer = requestPathSerializer || globalPathSerializer || defaultPathSerializer;\n const serializedBody = body === void 0 ? void 0 : bodySerializer(\n body,\n // Note: we declare mergeHeaders() both here and below because it’s a bit of a chicken-or-egg situation:\n // bodySerializer() needs all headers so we aren’t dropping ones set by the user, however,\n // the result of this ALSO sets the lowest-priority content-type header. So we re-merge below,\n // setting the content-type at the very beginning to be overwritten.\n // Lastly, based on the way headers work, it’s not a simple “present-or-not” check becauase null intentionally un-sets headers.\n mergeHeaders(baseHeaders, headers, params.header)\n );\n const finalHeaders = mergeHeaders(\n // with no body, we should not to set Content-Type\n serializedBody === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression\n serializedBody instanceof FormData ? {} : {\n \"Content-Type\": \"application/json\"\n },\n baseHeaders,\n headers,\n params.header\n );\n const finalMiddlewares = [...globalMiddlewares, ...requestMiddlewares];\n const requestInit = {\n redirect: \"follow\",\n ...baseOptions,\n ...init,\n body: serializedBody,\n headers: finalHeaders\n };\n let id;\n let options;\n let request = new Request(\n createFinalURL(schemaPath, { baseUrl: finalBaseUrl, params, querySerializer, pathSerializer }),\n requestInit\n );\n let response;\n for (const key in init) {\n if (!(key in request)) {\n request[key] = init[key];\n }\n }\n if (finalMiddlewares.length) {\n id = randomID();\n options = Object.freeze({\n baseUrl: finalBaseUrl,\n fetch,\n parseAs,\n querySerializer,\n bodySerializer,\n pathSerializer\n });\n for (const m of finalMiddlewares) {\n if (m && typeof m === \"object\" && typeof m.onRequest === \"function\") {\n const result = await m.onRequest({\n request,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (result instanceof Request) {\n request = result;\n } else if (result instanceof Response) {\n response = result;\n break;\n } else {\n throw new Error(\"onRequest: must return new Request() or Response() when modifying the request\");\n }\n }\n }\n }\n }\n if (!response) {\n try {\n response = await fetch(request, requestInitExt);\n } catch (error2) {\n let errorAfterMiddleware = error2;\n if (finalMiddlewares.length) {\n for (let i = finalMiddlewares.length - 1; i >= 0; i--) {\n const m = finalMiddlewares[i];\n if (m && typeof m === \"object\" && typeof m.onError === \"function\") {\n const result = await m.onError({\n request,\n error: errorAfterMiddleware,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (result instanceof Response) {\n errorAfterMiddleware = void 0;\n response = result;\n break;\n }\n if (result instanceof Error) {\n errorAfterMiddleware = result;\n continue;\n }\n throw new Error(\"onError: must return new Response() or instance of Error\");\n }\n }\n }\n }\n if (errorAfterMiddleware) {\n throw errorAfterMiddleware;\n }\n }\n if (finalMiddlewares.length) {\n for (let i = finalMiddlewares.length - 1; i >= 0; i--) {\n const m = finalMiddlewares[i];\n if (m && typeof m === \"object\" && typeof m.onResponse === \"function\") {\n const result = await m.onResponse({\n request,\n response,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (!(result instanceof Response)) {\n throw new Error(\"onResponse: must return new Response() when modifying the response\");\n }\n response = result;\n }\n }\n }\n }\n }\n const contentLength = response.headers.get(\"Content-Length\");\n if (response.status === 204 || request.method === \"HEAD\" || contentLength === \"0\" && !response.headers.get(\"Transfer-Encoding\")?.includes(\"chunked\")) {\n return response.ok ? { data: void 0, response } : { error: void 0, response };\n }\n if (response.ok) {\n const getResponseData = async () => {\n if (parseAs === \"stream\") {\n return response.body;\n }\n if (parseAs === \"json\" && !contentLength) {\n const raw = await response.text();\n return raw ? JSON.parse(raw) : void 0;\n }\n return await response[parseAs]();\n };\n return { data: await getResponseData(), response };\n }\n let error = await response.text();\n try {\n error = JSON.parse(error);\n } catch {\n }\n return { error, response };\n }\n return {\n request(method, url, init) {\n return coreFetch(url, { ...init, method: method.toUpperCase() });\n },\n /** Call a GET endpoint */\n GET(url, init) {\n return coreFetch(url, { ...init, method: \"GET\" });\n },\n /** Call a PUT endpoint */\n PUT(url, init) {\n return coreFetch(url, { ...init, method: \"PUT\" });\n },\n /** Call a POST endpoint */\n POST(url, init) {\n return coreFetch(url, { ...init, method: \"POST\" });\n },\n /** Call a DELETE endpoint */\n DELETE(url, init) {\n return coreFetch(url, { ...init, method: \"DELETE\" });\n },\n /** Call a OPTIONS endpoint */\n OPTIONS(url, init) {\n return coreFetch(url, { ...init, method: \"OPTIONS\" });\n },\n /** Call a HEAD endpoint */\n HEAD(url, init) {\n return coreFetch(url, { ...init, method: \"HEAD\" });\n },\n /** Call a PATCH endpoint */\n PATCH(url, init) {\n return coreFetch(url, { ...init, method: \"PATCH\" });\n },\n /** Call a TRACE endpoint */\n TRACE(url, init) {\n return coreFetch(url, { ...init, method: \"TRACE\" });\n },\n /** Register middleware */\n use(...middleware) {\n for (const m of middleware) {\n if (!m) {\n continue;\n }\n if (typeof m !== \"object\" || !(\"onRequest\" in m || \"onResponse\" in m || \"onError\" in m)) {\n throw new Error(\"Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`\");\n }\n globalMiddlewares.push(m);\n }\n },\n /** Unregister middleware */\n eject(...middleware) {\n for (const m of middleware) {\n const i = globalMiddlewares.indexOf(m);\n if (i !== -1) {\n globalMiddlewares.splice(i, 1);\n }\n }\n }\n };\n}\nclass PathCallForwarder {\n constructor(client, url) {\n this.client = client;\n this.url = url;\n }\n GET = (init) => {\n return this.client.GET(this.url, init);\n };\n PUT = (init) => {\n return this.client.PUT(this.url, init);\n };\n POST = (init) => {\n return this.client.POST(this.url, init);\n };\n DELETE = (init) => {\n return this.client.DELETE(this.url, init);\n };\n OPTIONS = (init) => {\n return this.client.OPTIONS(this.url, init);\n };\n HEAD = (init) => {\n return this.client.HEAD(this.url, init);\n };\n PATCH = (init) => {\n return this.client.PATCH(this.url, init);\n };\n TRACE = (init) => {\n return this.client.TRACE(this.url, init);\n };\n}\nclass PathClientProxyHandler {\n constructor() {\n this.client = null;\n }\n // Assume the property is an URL.\n get(coreClient, url) {\n const forwarder = new PathCallForwarder(coreClient, url);\n this.client[url] = forwarder;\n return forwarder;\n }\n}\nfunction wrapAsPathBasedClient(coreClient) {\n const handler = new PathClientProxyHandler();\n const proxy = new Proxy(coreClient, handler);\n function Client() {\n }\n Client.prototype = proxy;\n const client = new Client();\n handler.client = client;\n return client;\n}\nfunction createPathBasedClient(clientOptions) {\n return wrapAsPathBasedClient(createClient(clientOptions));\n}\nfunction serializePrimitiveParam(name, value, options) {\n if (value === void 0 || value === null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n throw new Error(\n \"Deeply-nested arrays/objects aren\\u2019t supported. Provide your own `querySerializer()` to handle these.\"\n );\n }\n return `${name}=${options?.allowReserved === true ? value : encodeURIComponent(value)}`;\n}\nfunction serializeObjectParam(name, value, options) {\n if (!value || typeof value !== \"object\") {\n return \"\";\n }\n const values = [];\n const joiner = {\n simple: \",\",\n label: \".\",\n matrix: \";\"\n }[options.style] || \"&\";\n if (options.style !== \"deepObject\" && options.explode === false) {\n for (const k in value) {\n values.push(k, options.allowReserved === true ? value[k] : encodeURIComponent(value[k]));\n }\n const final2 = values.join(\",\");\n switch (options.style) {\n case \"form\": {\n return `${name}=${final2}`;\n }\n case \"label\": {\n return `.${final2}`;\n }\n case \"matrix\": {\n return `;${name}=${final2}`;\n }\n default: {\n return final2;\n }\n }\n }\n for (const k in value) {\n const finalName = options.style === \"deepObject\" ? `${name}[${k}]` : k;\n values.push(serializePrimitiveParam(finalName, value[k], options));\n }\n const final = values.join(joiner);\n return options.style === \"label\" || options.style === \"matrix\" ? `${joiner}${final}` : final;\n}\nfunction serializeArrayParam(name, value, options) {\n if (!Array.isArray(value)) {\n return \"\";\n }\n if (options.explode === false) {\n const joiner2 = { form: \",\", spaceDelimited: \"%20\", pipeDelimited: \"|\" }[options.style] || \",\";\n const final = (options.allowReserved === true ? value : value.map((v) => encodeURIComponent(v))).join(joiner2);\n switch (options.style) {\n case \"simple\": {\n return final;\n }\n case \"label\": {\n return `.${final}`;\n }\n case \"matrix\": {\n return `;${name}=${final}`;\n }\n // case \"spaceDelimited\":\n // case \"pipeDelimited\":\n default: {\n return `${name}=${final}`;\n }\n }\n }\n const joiner = { simple: \",\", label: \".\", matrix: \";\" }[options.style] || \"&\";\n const values = [];\n for (const v of value) {\n if (options.style === \"simple\" || options.style === \"label\") {\n values.push(options.allowReserved === true ? v : encodeURIComponent(v));\n } else {\n values.push(serializePrimitiveParam(name, v, options));\n }\n }\n return options.style === \"label\" || options.style === \"matrix\" ? `${joiner}${values.join(joiner)}` : values.join(joiner);\n}\nfunction createQuerySerializer(options) {\n return function querySerializer(queryParams) {\n const search = [];\n if (queryParams && typeof queryParams === \"object\") {\n for (const name in queryParams) {\n const value = queryParams[name];\n if (value === void 0 || value === null) {\n continue;\n }\n if (Array.isArray(value)) {\n if (value.length === 0) {\n continue;\n }\n search.push(\n serializeArrayParam(name, value, {\n style: \"form\",\n explode: true,\n ...options?.array,\n allowReserved: options?.allowReserved || false\n })\n );\n continue;\n }\n if (typeof value === \"object\") {\n search.push(\n serializeObjectParam(name, value, {\n style: \"deepObject\",\n explode: true,\n ...options?.object,\n allowReserved: options?.allowReserved || false\n })\n );\n continue;\n }\n search.push(serializePrimitiveParam(name, value, options));\n }\n }\n return search.join(\"&\");\n };\n}\nfunction defaultPathSerializer(pathname, pathParams) {\n let nextURL = pathname;\n for (const match of pathname.match(PATH_PARAM_RE) ?? []) {\n let name = match.substring(1, match.length - 1);\n let explode = false;\n let style = \"simple\";\n if (name.endsWith(\"*\")) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n if (name.startsWith(\".\")) {\n style = \"label\";\n name = name.substring(1);\n } else if (name.startsWith(\";\")) {\n style = \"matrix\";\n name = name.substring(1);\n }\n if (!pathParams || pathParams[name] === void 0 || pathParams[name] === null) {\n continue;\n }\n const value = pathParams[name];\n if (Array.isArray(value)) {\n nextURL = nextURL.replace(match, serializeArrayParam(name, value, { style, explode }));\n continue;\n }\n if (typeof value === \"object\") {\n nextURL = nextURL.replace(match, serializeObjectParam(name, value, { style, explode }));\n continue;\n }\n if (style === \"matrix\") {\n nextURL = nextURL.replace(match, `;${serializePrimitiveParam(name, value)}`);\n continue;\n }\n nextURL = nextURL.replace(match, style === \"label\" ? `.${encodeURIComponent(value)}` : encodeURIComponent(value));\n }\n return nextURL;\n}\nfunction defaultBodySerializer(body, headers) {\n if (body instanceof FormData) {\n return body;\n }\n if (headers) {\n const contentType = headers.get instanceof Function ? headers.get(\"Content-Type\") ?? headers.get(\"content-type\") : headers[\"Content-Type\"] ?? headers[\"content-type\"];\n if (contentType === \"application/x-www-form-urlencoded\") {\n return new URLSearchParams(body).toString();\n }\n }\n return JSON.stringify(body);\n}\nfunction createFinalURL(pathname, options) {\n let finalURL = `${options.baseUrl}${pathname}`;\n if (options.params?.path) {\n finalURL = options.pathSerializer(finalURL, options.params.path);\n }\n let search = options.querySerializer(options.params.query ?? {});\n if (search.startsWith(\"?\")) {\n search = search.substring(1);\n }\n if (search) {\n finalURL += `?${search}`;\n }\n return finalURL;\n}\nfunction mergeHeaders(...allHeaders) {\n const finalHeaders = new Headers();\n for (const h of allHeaders) {\n if (!h || typeof h !== \"object\") {\n continue;\n }\n const iterator = h instanceof Headers ? h.entries() : Object.entries(h);\n for (const [k, v] of iterator) {\n if (v === null) {\n finalHeaders.delete(k);\n } else if (Array.isArray(v)) {\n for (const v2 of v) {\n finalHeaders.append(k, v2);\n }\n } else if (v !== void 0) {\n finalHeaders.set(k, v);\n }\n }\n }\n return finalHeaders;\n}\nfunction removeTrailingSlash(url) {\n if (url.endsWith(\"/\")) {\n return url.substring(0, url.length - 1);\n }\n return url;\n}\n\nexport { createFinalURL, createPathBasedClient, createQuerySerializer, createClient as default, defaultBodySerializer, defaultPathSerializer, mergeHeaders, randomID, removeTrailingSlash, serializeArrayParam, serializeObjectParam, serializePrimitiveParam, wrapAsPathBasedClient };\n//# sourceMappingURL=index.mjs.map\n","/**\n * Test whether a string contains an integer number\n */\nexport function isInteger(value) {\n return INTEGER_REGEX.test(value);\n}\nconst INTEGER_REGEX = /^-?[0-9]+$/;\n\n/**\n * Test whether a string contains a number\n * http://stackoverflow.com/questions/13340717/json-numbers-regular-expression\n */\nexport function isNumber(value) {\n return NUMBER_REGEX.test(value);\n}\nconst NUMBER_REGEX = /^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;\n\n/**\n * Test whether a string can be safely represented with a number\n * without information loss.\n *\n * When approx is true, floating point numbers that lose a few digits but\n * are still approximately equal in value are considered safe too.\n * Integer numbers must still be exactly equal.\n */\nexport function isSafeNumber(value, config) {\n if (isInteger(value)) {\n return Number.isSafeInteger(Number.parseInt(value, 10));\n }\n const num = Number.parseFloat(value);\n const parsed = String(num);\n if (value === parsed) {\n return true;\n }\n const valueDigits = extractSignificantDigits(value);\n const parsedDigits = extractSignificantDigits(parsed);\n if (valueDigits === parsedDigits) {\n return true;\n }\n if (config?.approx === true) {\n // A value is approximately equal when:\n // 1. it is a floating point number, not an integer\n // 2. it has at least 14 digits\n // 3. the first 14 digits are equal\n const requiredDigits = 14;\n if (!isInteger(value) && parsedDigits.length >= requiredDigits && valueDigits.startsWith(parsedDigits.substring(0, requiredDigits))) {\n return true;\n }\n }\n return false;\n}\nexport let UnsafeNumberReason = /*#__PURE__*/function (UnsafeNumberReason) {\n UnsafeNumberReason[\"underflow\"] = \"underflow\";\n UnsafeNumberReason[\"overflow\"] = \"overflow\";\n UnsafeNumberReason[\"truncate_integer\"] = \"truncate_integer\";\n UnsafeNumberReason[\"truncate_float\"] = \"truncate_float\";\n return UnsafeNumberReason;\n}({});\n\n/**\n * When the provided value is an unsafe number, describe what the reason is:\n * overflow, underflow, truncate_integer, or truncate_float.\n * Returns undefined when the value is safe.\n */\nexport function getUnsafeNumberReason(value) {\n if (isSafeNumber(value, {\n approx: false\n })) {\n return undefined;\n }\n if (isInteger(value)) {\n return UnsafeNumberReason.truncate_integer;\n }\n const num = Number.parseFloat(value);\n if (!Number.isFinite(num)) {\n return UnsafeNumberReason.overflow;\n }\n if (num === 0) {\n return UnsafeNumberReason.underflow;\n }\n return UnsafeNumberReason.truncate_float;\n}\n\n/**\n * Convert a string into a number when it is safe to do so.\n * Throws an error otherwise, explaining the reason.\n */\nexport function toSafeNumberOrThrow(value, config) {\n const number = Number.parseFloat(value);\n const unsafeReason = getUnsafeNumberReason(value);\n if (config?.approx === true ? unsafeReason && unsafeReason !== UnsafeNumberReason.truncate_float : unsafeReason) {\n const unsafeReasonText = unsafeReason?.replace(/_\\w+$/, '');\n throw new Error(`Cannot safely convert to number: the value '${value}' would ${unsafeReasonText} and become ${number}`);\n }\n return number;\n}\n\n/**\n * Split a number into sign, digits, and exponent.\n * Leading zeros and non-canonical zeros are normalized.\n *\n * The value can be constructed again from a split number by inserting a dot\n * at the second character of the digits if there is more than one digit,\n * prepending it with the sign, and appending an \"e\" and the exponent as follows:\n *\n * const reconstructed = `${sign}${digits[0]}.${digits.slice(1)}e${exponent}`\n *\n */\nexport function splitNumber(value) {\n const match = value.match(/^(-?)(\\d+\\.?\\d*)([eE]([+-]?\\d+))?$/);\n if (!match) {\n throw new SyntaxError(`Invalid number: ${value}`);\n }\n const sign = match[1];\n const digitsStr = match[2];\n let exponent = match[4] !== undefined ? Number.parseInt(match[4], 10) : 0;\n const dot = digitsStr.indexOf('.');\n exponent += dot !== -1 ? dot - 1 : digitsStr.length - 1;\n const digits = digitsStr.replace('.', '') // remove the dot (must be removed before removing leading zeros)\n .replace(/^0*/, zeros => {\n // remove leading zeros, add their count to the exponent\n exponent -= zeros.length;\n return '';\n }).replace(/0*$/, ''); // remove trailing zeros\n\n // normalize zero, for example normalizes 0e5 or -0 into 0\n return digits.length > 0 ? {\n sign,\n digits,\n exponent\n } : {\n sign: '',\n digits: '0',\n exponent: 0\n };\n}\n\n/**\n * Compare two strings containing a numeric value\n * Returns 1 when a is larger than b, 0 when they are equal,\n * and -1 when a is smaller than b.\n */\nexport function compareNumber(a, b) {\n if (a === b) {\n return 0;\n }\n const aa = splitNumber(a);\n const bb = splitNumber(b);\n const sign = aa.sign === '-' ? -1 : 1;\n if (aa.sign !== bb.sign) {\n return sign;\n }\n if (aa.exponent !== bb.exponent) {\n return aa.exponent > bb.exponent ? sign : aa.exponent < bb.exponent ? -sign : 0;\n }\n return aa.digits > bb.digits ? sign : aa.digits < bb.digits ? -sign : 0;\n}\n\n/**\n * Count the significant digits of a number.\n *\n * For example:\n * '2.34' returns 3\n * '-77' returns 2\n * '0.003400' returns 2\n * '120.5e+30' returns 4\n **/\nexport function countSignificantDigits(value) {\n const {\n start,\n end\n } = getSignificantDigitRange(value);\n const dot = value.indexOf('.');\n if (dot === -1 || dot < start || dot > end) {\n return end - start;\n }\n return end - start - 1;\n}\n\n/**\n * Get the significant digits of a number.\n *\n * For example:\n * '2.34' returns '234'\n * '-77' returns '77'\n * '0.003400' returns '34'\n * '120.5e+30' returns '1205'\n **/\nexport function extractSignificantDigits(value) {\n const {\n start,\n end\n } = getSignificantDigitRange(value);\n const digits = value.substring(start, end);\n const dot = digits.indexOf('.');\n if (dot === -1) {\n return digits;\n }\n return digits.substring(0, dot) + digits.substring(dot + 1);\n}\n\n/**\n * Returns the range (start to end) of the significant digits of a value.\n * Note that this range _may_ contain the decimal dot.\n *\n * For example:\n *\n * getSignificantDigitRange('0.0325900') // { start: 3, end: 7 }\n * getSignificantDigitRange('2.0300') // { start: 0, end: 3 }\n * getSignificantDigitRange('0.0') // { start: 3, end: 3 }\n *\n */\nfunction getSignificantDigitRange(value) {\n let start = 0;\n if (value[0] === '-') {\n start++;\n }\n while (value[start] === '0' || value[start] === '.') {\n start++;\n }\n let end = value.lastIndexOf('e');\n if (end === -1) {\n end = value.lastIndexOf('E');\n }\n if (end === -1) {\n end = value.length;\n }\n while ((value[end - 1] === '0' || value[end - 1] === '.') && end > start) {\n end--;\n }\n return {\n start,\n end\n };\n}\n//# sourceMappingURL=utils.js.map","import { compareNumber, countSignificantDigits, getUnsafeNumberReason, isInteger, isNumber, UnsafeNumberReason } from './utils.js';\n\n/**\n * A lossless number. Stores its numeric value as string\n */\nexport class LosslessNumber {\n // numeric value as string\n\n // type information\n isLosslessNumber = true;\n constructor(value) {\n if (!isNumber(value)) {\n throw new Error(`Invalid number (value: \"${value}\")`);\n }\n this.value = value;\n }\n\n /**\n * Get the value of the LosslessNumber as number or bigint.\n *\n * - a number is returned for safe numbers and decimal values that only lose some insignificant digits\n * - a bigint is returned for big integer numbers\n * - an Error is thrown for values that will overflow or underflow\n *\n * Note that you can implement your own strategy for conversion by just getting the value as string\n * via .toString(), and using util functions like isInteger, isSafeNumber, getUnsafeNumberReason,\n * and toSafeNumberOrThrow to convert it to a numeric value.\n */\n valueOf() {\n const unsafeReason = getUnsafeNumberReason(this.value);\n\n // safe or truncate_float\n if (unsafeReason === undefined || unsafeReason === UnsafeNumberReason.truncate_float) {\n return Number.parseFloat(this.value);\n }\n\n // truncate_integer\n if (isInteger(this.value)) {\n return BigInt(this.value);\n }\n\n // overflow or underflow\n throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${unsafeReason} and become ${Number.parseFloat(this.value)}`);\n }\n\n /**\n * Get the value of the LosslessNumber as string.\n */\n toString() {\n return this.value;\n }\n\n // Note: we do NOT implement a .toJSON() method, and you should not implement\n // or use that, it cannot safely turn the numeric value in the string into\n // stringified JSON since it has to be parsed into a number first.\n}\n\n/**\n * Test whether a value is a LosslessNumber\n */\nexport function isLosslessNumber(value) {\n // @ts-expect-error\n return value && typeof value === 'object' && value.isLosslessNumber || false;\n}\n\n/**\n * Convert a number into a LosslessNumber if this is possible in a safe way\n * If the value has too many digits, or is NaN or Infinity, an error will be thrown\n */\nexport function toLosslessNumber(value) {\n const maxDigits = 15;\n if (countSignificantDigits(String(value)) > maxDigits) {\n throw new Error(`Invalid number: contains more than 15 digits and is most likely truncated and unsafe by itself (value: ${value})`);\n }\n if (Number.isNaN(value)) {\n throw new Error('Invalid number: NaN');\n }\n if (!Number.isFinite(value)) {\n throw new Error(`Invalid number: ${value}`);\n }\n return new LosslessNumber(String(value));\n}\n\n/**\n * Compare two lossless numbers.\n * Returns 1 when a is larger than b, 0 when they are equal,\n * and -1 when a is smaller than b.\n */\nexport function compareLosslessNumber(a, b) {\n return compareNumber(a.value, b.value);\n}\n//# sourceMappingURL=LosslessNumber.js.map","import { LosslessNumber } from './LosslessNumber.js';\nimport { isInteger } from './utils.js';\nexport function parseLosslessNumber(value) {\n return new LosslessNumber(value);\n}\nexport function parseNumberAndBigInt(value) {\n return isInteger(value) ? BigInt(value) : Number.parseFloat(value);\n}\n//# sourceMappingURL=numberParsers.js.map","import { isLosslessNumber } from './LosslessNumber.js';\n/**\n * Revive a json object.\n * Applies the reviver function recursively on all values in the JSON object.\n * @param json A JSON Object, Array, or value\n * @param reviver\n * A reviver function invoked with arguments `key` and `value`,\n * which must return a replacement value. The function context\n * (`this`) is the Object or Array that contains the currently\n * handled value.\n */\nexport function revive(json, reviver) {\n return reviveValue({\n '': json\n }, '', json, reviver);\n}\n\n/**\n * Revive a value\n */\nfunction reviveValue(context, key, value, reviver) {\n if (Array.isArray(value)) {\n return reviver.call(context, key, reviveArray(value, reviver));\n }\n if (value && typeof value === 'object' && !isLosslessNumber(value)) {\n // note the special case for LosslessNumber,\n // we don't want to iterate over the internals of a LosslessNumber\n return reviver.call(context, key, reviveObject(value, reviver));\n }\n return reviver.call(context, key, value);\n}\n\n/**\n * Revive the properties of an object\n */\nfunction reviveObject(object, reviver) {\n for (const key of Object.keys(object)) {\n const value = reviveValue(object, key, object[key], reviver);\n if (value !== undefined) {\n object[key] = value;\n } else {\n delete object[key];\n }\n }\n return object;\n}\n\n/**\n * Revive the properties of an Array\n */\nfunction reviveArray(array, reviver) {\n for (let i = 0; i < array.length; i++) {\n array[i] = reviveValue(array, String(i), array[i], reviver);\n }\n return array;\n}\n//# sourceMappingURL=revive.js.map","import { parseLosslessNumber } from './numberParsers.js';\nimport { revive } from './revive.js';\n/**\n * The LosslessJSON.parse() method parses a string as JSON, optionally transforming\n * the value produced by parsing.\n *\n * The parser is based on the parser of Tan Li Hou shared in\n * https://lihautan.com/json-parser-with-javascript/\n *\n * @param text\n * The string to parse as JSON. See the JSON object for a description of JSON syntax.\n *\n * @param [reviver]\n * If a function, prescribes how the value originally produced by parsing is\n * transformed, before being returned.\n *\n * @param [options=ParseOptions | NumberParserArgument]\n * Pass a custom number parser. Input is a string, and the output can be unknown\n * numeric value: number, bigint, LosslessNumber, or a custom BigNumber library.\n *\n * @returns Returns the Object corresponding to the given JSON text.\n *\n * @throws Throws a SyntaxError exception if the string to parse is not valid JSON.\n */\nexport function parse(text, reviver, options) {\n const optionsObj = typeof options === 'function' ? {\n parseNumber: options\n } : options;\n const parseNumber = optionsObj?.parseNumber ?? parseLosslessNumber;\n const onDuplicateKey = optionsObj?.onDuplicateKey ?? throwDuplicateKey;\n let i = 0;\n const value = parseValue();\n expectValue(value);\n expectEndOfInput();\n return reviver ? revive(value, reviver) : value;\n function parseObject() {\n if (text.charCodeAt(i) === codeOpeningBrace) {\n i++;\n skipWhitespace();\n const object = {};\n let initial = true;\n while (i < text.length && text.charCodeAt(i) !== codeClosingBrace) {\n if (!initial) {\n eatComma();\n skipWhitespace();\n } else {\n initial = false;\n }\n const start = i;\n const key = parseString();\n if (key === undefined) {\n throwObjectKeyExpected();\n return; // To make TS happy\n }\n skipWhitespace();\n eatColon();\n const value = parseValue();\n if (value === undefined) {\n throwObjectValueExpected();\n return; // To make TS happy\n }\n\n // handle duplicate keys\n // biome-ignore lint/suspicious/noPrototypeBuiltins: TODO: replace with hasOwn one day, when browser support is high enough\n if (Object.prototype.hasOwnProperty.call(object, key) && !isDeepEqual(value, object[key])) {\n // Note that we could also test `if(key in object) {...}`\n // or `if (object[key] !== 'undefined') {...}`, but that is slower.\n const returnedValue = onDuplicateKey({\n key,\n position: start + 1,\n oldValue: object[key],\n newValue: value\n });\n if (returnedValue !== undefined) {\n object[key] = returnedValue;\n }\n } else {\n object[key] = value;\n }\n }\n if (text.charCodeAt(i) !== codeClosingBrace) {\n throwObjectKeyOrEndExpected();\n }\n i++;\n return object;\n }\n }\n function parseArray() {\n if (text.charCodeAt(i) === codeOpeningBracket) {\n i++;\n skipWhitespace();\n const array = [];\n let initial = true;\n while (i < text.length && text.charCodeAt(i) !== codeClosingBracket) {\n if (!initial) {\n eatComma();\n } else {\n initial = false;\n }\n const value = parseValue();\n expectArrayItem(value);\n array.push(value);\n }\n if (text.charCodeAt(i) !== codeClosingBracket) {\n throwArrayItemOrEndExpected();\n }\n i++;\n return array;\n }\n }\n function parseValue() {\n skipWhitespace();\n const value = parseString() ?? parseNumeric() ?? parseObject() ?? parseArray() ?? parseKeyword('true', true) ?? parseKeyword('false', false) ?? parseKeyword('null', null);\n skipWhitespace();\n return value;\n }\n function parseKeyword(name, value) {\n if (text.slice(i, i + name.length) === name) {\n i += name.length;\n return value;\n }\n }\n function skipWhitespace() {\n while (isWhitespace(text.charCodeAt(i))) {\n i++;\n }\n }\n function parseString() {\n if (text.charCodeAt(i) === codeDoubleQuote) {\n i++;\n let result = '';\n while (i < text.length && text.charCodeAt(i) !== codeDoubleQuote) {\n if (text.charCodeAt(i) === codeBackslash) {\n const char = text[i + 1];\n const escapeChar = escapeCharacters[char];\n if (escapeChar !== undefined) {\n result += escapeChar;\n i++;\n } else if (char === 'u') {\n if (isHex(text.charCodeAt(i + 2)) && isHex(text.charCodeAt(i + 3)) && isHex(text.charCodeAt(i + 4)) && isHex(text.charCodeAt(i + 5))) {\n result += String.fromCharCode(Number.parseInt(text.slice(i + 2, i + 6), 16));\n i += 5;\n } else {\n throwInvalidUnicodeCharacter(i);\n }\n } else {\n throwInvalidEscapeCharacter(i);\n }\n } else {\n if (isValidStringCharacter(text.charCodeAt(i))) {\n result += text[i];\n } else {\n throwInvalidCharacter(text[i]);\n }\n }\n i++;\n }\n expectEndOfString();\n i++;\n return result;\n }\n }\n function parseNumeric() {\n const start = i;\n if (text.charCodeAt(i) === codeMinus) {\n i++;\n expectDigit(start);\n }\n if (text.charCodeAt(i) === codeZero) {\n i++;\n } else if (isNonZeroDigit(text.charCodeAt(i))) {\n i++;\n while (isDigit(text.charCodeAt(i))) {\n i++;\n }\n }\n if (text.charCodeAt(i) === codeDot) {\n i++;\n expectDigit(start);\n while (isDigit(text.charCodeAt(i))) {\n i++;\n }\n }\n if (text.charCodeAt(i) === codeLowercaseE || text.charCodeAt(i) === codeUppercaseE) {\n i++;\n if (text.charCodeAt(i) === codeMinus || text.charCodeAt(i) === codePlus) {\n i++;\n }\n expectDigit(start);\n while (isDigit(text.charCodeAt(i))) {\n i++;\n }\n }\n if (i > start) {\n return parseNumber(text.slice(start, i));\n }\n }\n function eatComma() {\n if (text.charCodeAt(i) !== codeComma) {\n throw new SyntaxError(`Comma ',' expected after value ${gotAt()}`);\n }\n i++;\n }\n function eatColon() {\n if (text.charCodeAt(i) !== codeColon) {\n throw new SyntaxError(`Colon ':' expected after property name ${gotAt()}`);\n }\n i++;\n }\n function expectValue(value) {\n if (value === undefined) {\n throw new SyntaxError(`JSON value expected ${gotAt()}`);\n }\n }\n function expectArrayItem(value) {\n if (value === undefined) {\n throw new SyntaxError(`Array item expected ${gotAt()}`);\n }\n }\n function expectEndOfInput() {\n if (i < text.length) {\n throw new SyntaxError(`Expected end of input ${gotAt()}`);\n }\n }\n function expectDigit(start) {\n if (!isDigit(text.charCodeAt(i))) {\n const numSoFar = text.slice(start, i);\n throw new SyntaxError(`Invalid number '${numSoFar}', expecting a digit ${gotAt()}`);\n }\n }\n function expectEndOfString() {\n if (text.charCodeAt(i) !== codeDoubleQuote) {\n throw new SyntaxError(`End of string '\"' expected ${gotAt()}`);\n }\n }\n function throwObjectKeyExpected() {\n throw new SyntaxError(`Quoted object key expected ${gotAt()}`);\n }\n function throwDuplicateKey(_ref) {\n let {\n key,\n position\n } = _ref;\n throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`);\n }\n function throwObjectKeyOrEndExpected() {\n throw new SyntaxError(`Quoted object key or end of object '}' expected ${gotAt()}`);\n }\n function throwArrayItemOrEndExpected() {\n throw new SyntaxError(`Array item or end of array ']' expected ${gotAt()}`);\n }\n function throwInvalidCharacter(char) {\n throw new SyntaxError(`Invalid character '${char}' ${pos()}`);\n }\n function throwInvalidEscapeCharacter(start) {\n const chars = text.slice(start, start + 2);\n throw new SyntaxError(`Invalid escape character '${chars}' ${pos()}`);\n }\n function throwObjectValueExpected() {\n throw new SyntaxError(`Object value expected after ':' ${pos()}`);\n }\n function throwInvalidUnicodeCharacter(start) {\n const chars = text.slice(start, start + 6);\n throw new SyntaxError(`Invalid unicode character '${chars}' ${pos()}`);\n }\n\n // zero based character position\n function pos() {\n return `at position ${i}`;\n }\n function got() {\n return i < text.length ? `but got '${text[i]}'` : 'but reached end of input';\n }\n function gotAt() {\n return `${got()} ${pos()}`;\n }\n}\nfunction isWhitespace(code) {\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn;\n}\nfunction isHex(code) {\n return code >= codeZero && code <= codeNine || code >= codeUppercaseA && code <= codeUppercaseF || code >= codeLowercaseA && code <= codeLowercaseF;\n}\nfunction isDigit(code) {\n return code >= codeZero && code <= codeNine;\n}\nfunction isNonZeroDigit(code) {\n return code >= codeOne && code <= codeNine;\n}\nexport function isValidStringCharacter(code) {\n return code >= 0x20 && code <= 0x10ffff;\n}\nexport function isDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => isDeepEqual(item, b[index]));\n }\n if (isObject(a) && isObject(b)) {\n const keys = [...new Set([...Object.keys(a), ...Object.keys(b)])];\n return keys.every(key => isDeepEqual(a[key], b[key]));\n }\n return false;\n}\nfunction isObject(value) {\n return typeof value === 'object' && value !== null;\n}\n\n// map with all escape characters\nconst escapeCharacters = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n};\nconst codeBackslash = 0x5c; // \"\\\"\nconst codeOpeningBrace = 0x7b; // \"{\"\nconst codeClosingBrace = 0x7d; // \"}\"\nconst codeOpeningBracket = 0x5b; // \"[\"\nconst codeClosingBracket = 0x5d; // \"]\"\nconst codeSpace = 0x20; // \" \"\nconst codeNewline = 0xa; // \"\\n\"\nconst codeTab = 0x9; // \"\\t\"\nconst codeReturn = 0xd; // \"\\r\"\nconst codeDoubleQuote = 0x0022; // \"\nconst codePlus = 0x2b; // \"+\"\nconst codeMinus = 0x2d; // \"-\"\nconst codeZero = 0x30;\nconst codeOne = 0x31;\nconst codeNine = 0x39;\nconst codeComma = 0x2c; // \",\"\nconst codeDot = 0x2e; // \".\" (dot, period)\nconst codeColon = 0x3a; // \":\"\nexport const codeUppercaseA = 0x41; // \"A\"\nexport const codeLowercaseA = 0x61; // \"a\"\nexport const codeUppercaseE = 0x45; // \"E\"\nexport const codeLowercaseE = 0x65; // \"e\"\nexport const codeUppercaseF = 0x46; // \"F\"\nexport const codeLowercaseF = 0x66; // \"f\"\n//# sourceMappingURL=parse.js.map","import { isLosslessNumber, parse } from \"lossless-json\";\n\n/** Decode feed IDs before a native JSON parser can round their UInt64 values. */\nexport function parseFeedResponse(raw: string): unknown {\n const page = parse(raw, undefined, { onDuplicateKey: ({ newValue }) => newValue });\n if (!isObject(page) || !Array.isArray(page.results)) {\n throw new TypeError(\"Expected a feed response with a results array.\");\n }\n for (const record of page.results) {\n if (!isObject(record)) throw new TypeError(\"Expected a feed record.\");\n const id = isLosslessNumber(record.id) ? record.id.value : record.id;\n if (\n typeof id !== \"string\" ||\n !/^(0|[1-9]\\d*)$/u.test(id) ||\n id.length > 20 ||\n (id.length === 20 && id > \"18446744073709551615\")\n ) {\n throw new TypeError(\"Expected a decimal UInt64 feed ID.\");\n }\n record.id = id;\n }\n return nativeValues(page);\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction nativeValues(value: unknown): unknown {\n if (isLosslessNumber(value)) return Number(value.value);\n if (Array.isArray(value)) return value.map(nativeValues);\n if (isObject(value)) {\n return Object.fromEntries(\n Object.entries(value).map(([key, item]) => [key, nativeValues(item)]),\n );\n }\n return value;\n}\n","const encoder = new TextEncoder();\n\nexport type ErrorKind =\n | \"validation\"\n | \"authentication\"\n | \"permission\"\n | \"not_found\"\n | \"conflict\"\n | \"precondition\"\n | \"rate_limit\"\n | \"server\"\n | \"network\"\n | \"unexpected\";\n\nexport class ProxyRequestError extends Error {\n override readonly name: string = \"ProxyRequestError\";\n}\n\nexport interface ApiErrorOptions {\n kind: ErrorKind;\n statusCode?: number;\n detail?: string;\n fieldErrors?: Record<string, string[]>;\n requestId?: string;\n retryAfter?: number;\n contentLanguage?: string;\n currentEtag?: string;\n idempotencyKey?: string;\n headers?: Record<string, string>;\n rawBody?: Uint8Array;\n cause?: unknown;\n}\n\nexport class ApiError extends ProxyRequestError {\n override readonly name = \"ApiError\";\n readonly kind: ErrorKind;\n readonly statusCode: number | undefined;\n readonly detail: string | undefined;\n readonly fieldErrors: Readonly<Record<string, string[]>>;\n readonly requestId: string | undefined;\n readonly retryAfter: number | undefined;\n readonly contentLanguage: string | undefined;\n readonly currentEtag: string | undefined;\n readonly idempotencyKey: string | undefined;\n readonly headers: Readonly<Record<string, string>>;\n readonly rawBody: Uint8Array;\n override readonly cause: unknown;\n\n constructor(message: string, options: ApiErrorOptions) {\n super(message);\n this.kind = options.kind;\n this.statusCode = options.statusCode;\n this.detail = options.detail;\n this.fieldErrors = options.fieldErrors ?? {};\n this.requestId = options.requestId;\n this.retryAfter = options.retryAfter;\n this.contentLanguage = options.contentLanguage;\n this.currentEtag = options.currentEtag;\n this.idempotencyKey = options.idempotencyKey;\n this.headers = options.headers ?? {};\n this.rawBody = options.rawBody ?? new Uint8Array();\n this.cause = options.cause;\n }\n\n static async fromResponse(response: Response): Promise<ApiError> {\n const headers = headersToRecord(response.headers);\n let rawBody = new Uint8Array();\n try {\n rawBody = new Uint8Array(await response.clone().arrayBuffer());\n } catch {\n // A response supplied by a custom fetch can expose an unreadable body.\n }\n return ApiError.fromPayload(response.status, rawBody, headers);\n }\n\n static fromPayload(\n statusCode: number,\n rawBody: Uint8Array,\n headers: Record<string, string> = {},\n ): ApiError {\n const payload = decodeJson(rawBody);\n const detail = errorDetail(payload);\n const kind = kindForStatus(statusCode);\n const requestId = header(headers, \"x-request-id\", \"x-correlation-id\");\n const retryAfter = numberHeader(headers, \"retry-after\");\n const contentLanguage = header(headers, \"content-language\");\n const currentEtag = header(headers, \"etag\");\n return new ApiError(detail ?? `ProxyRequest API returned HTTP ${statusCode}.`, {\n kind,\n statusCode,\n ...(detail === undefined ? {} : { detail }),\n fieldErrors: fieldErrors(payload),\n ...(requestId === undefined ? {} : { requestId }),\n ...(retryAfter === undefined ? {} : { retryAfter }),\n ...(contentLanguage === undefined ? {} : { contentLanguage }),\n ...(currentEtag === undefined ? {} : { currentEtag }),\n headers,\n rawBody,\n });\n }\n\n static network(cause: unknown): ApiError {\n const detail = cause instanceof Error ? cause.message : String(cause);\n return new ApiError(`ProxyRequest network request failed: ${detail}`, {\n kind: \"network\",\n cause,\n });\n }\n\n static unexpected(message: string, cause?: unknown): ApiError {\n return new ApiError(message, {\n kind: \"unexpected\",\n ...(cause === undefined ? {} : { cause }),\n });\n }\n\n withIdempotencyKey(idempotencyKey: string | undefined): ApiError {\n if (idempotencyKey === undefined || this.idempotencyKey === idempotencyKey) return this;\n return new ApiError(this.message, {\n kind: this.kind,\n ...(this.statusCode === undefined ? {} : { statusCode: this.statusCode }),\n ...(this.detail === undefined ? {} : { detail: this.detail }),\n fieldErrors: { ...this.fieldErrors },\n ...(this.requestId === undefined ? {} : { requestId: this.requestId }),\n ...(this.retryAfter === undefined ? {} : { retryAfter: this.retryAfter }),\n ...(this.contentLanguage === undefined ? {} : { contentLanguage: this.contentLanguage }),\n ...(this.currentEtag === undefined ? {} : { currentEtag: this.currentEtag }),\n idempotencyKey,\n headers: { ...this.headers },\n rawBody: this.rawBody,\n ...(this.cause === undefined ? {} : { cause: this.cause }),\n });\n }\n}\n\nexport class PaginationError extends ProxyRequestError {\n override readonly name = \"PaginationError\";\n}\n\nexport class InvalidSignatureError extends ProxyRequestError {\n override readonly name = \"InvalidSignatureError\";\n}\n\nfunction kindForStatus(statusCode: number): ErrorKind {\n if (statusCode === 400 || statusCode === 422) return \"validation\";\n if (statusCode === 401) return \"authentication\";\n if (statusCode === 403) return \"permission\";\n if (statusCode === 404) return \"not_found\";\n if (statusCode === 409) return \"conflict\";\n if (statusCode === 412) return \"precondition\";\n if (statusCode === 429) return \"rate_limit\";\n if (statusCode >= 500) return \"server\";\n return \"unexpected\";\n}\n\nfunction headersToRecord(headers: Headers): Record<string, string> {\n return Object.fromEntries(\n [...headers.entries()].map(([key, value]) => [key.toLowerCase(), value]),\n );\n}\n\nfunction header(headers: Record<string, string>, ...names: string[]): string | undefined {\n for (const name of names) {\n const value = headers[name.toLowerCase()];\n if (value !== undefined && value !== \"\") return value;\n }\n return undefined;\n}\n\nfunction numberHeader(headers: Record<string, string>, name: string): number | undefined {\n const value = header(headers, name);\n if (value === undefined) return undefined;\n const number = Number(value);\n return Number.isFinite(number) ? number : undefined;\n}\n\nfunction decodeJson(rawBody: Uint8Array): unknown {\n if (rawBody.byteLength === 0) return undefined;\n try {\n return JSON.parse(new TextDecoder().decode(rawBody));\n } catch {\n return undefined;\n }\n}\n\nfunction errorDetail(payload: unknown): string | undefined {\n if (typeof payload === \"string\" && payload.length > 0) return payload;\n if (!isRecord(payload)) return undefined;\n for (const key of [\"detail\", \"message\", \"error\"]) {\n const value = payload[key];\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\nfunction fieldErrors(payload: unknown): Record<string, string[]> {\n if (!isRecord(payload)) return {};\n const source = isRecord(payload.errors) ? payload.errors : payload;\n const result: Record<string, string[]> = {};\n for (const [key, value] of Object.entries(source)) {\n if ([\"detail\", \"message\", \"error\", \"code\"].includes(key)) continue;\n if (typeof value === \"string\") result[key] = [value];\n if (Array.isArray(value) && value.every((item) => typeof item === \"string\")) {\n result[key] = value;\n }\n }\n return result;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nexport function bodyFromUnknown(value: unknown): Uint8Array {\n if (value instanceof Uint8Array) return value;\n if (typeof value === \"string\") return encoder.encode(value);\n return encoder.encode(JSON.stringify(value));\n}\n","export class FileDownload {\n readonly content: Uint8Array;\n readonly filename: string;\n readonly contentType: string;\n\n constructor(content: Uint8Array, filename: string, contentType: string) {\n this.content = content;\n this.filename = filename;\n this.contentType = contentType;\n }\n\n static fromResponse(content: ArrayBuffer | Uint8Array, headers: Headers): FileDownload {\n const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);\n const contentType = (headers.get(\"content-type\") ?? \"application/octet-stream\")\n .split(\";\", 1)[0]\n ?.trim();\n return new FileDownload(\n bytes,\n filenameFromDisposition(headers.get(\"content-disposition\")),\n contentType || \"application/octet-stream\",\n );\n }\n\n arrayBuffer(): ArrayBuffer {\n return this.content.slice().buffer;\n }\n\n blob(): Blob {\n return new Blob([this.arrayBuffer()], { type: this.contentType });\n }\n\n text(): string {\n return new TextDecoder().decode(this.content);\n }\n}\n\nfunction filenameFromDisposition(disposition: string | null): string {\n if (disposition === null) return \"download.bin\";\n const encoded = /filename\\*=UTF-8''([^;]+)/iu.exec(disposition)?.[1];\n if (encoded !== undefined) {\n try {\n return safeBasename(decodeURIComponent(encoded.trim()));\n } catch {\n return safeBasename(encoded.trim());\n }\n }\n const plain = /filename=(?:\"([^\"]+)\"|([^;]+))/iu.exec(disposition);\n return safeBasename((plain?.[1] ?? plain?.[2] ?? \"download.bin\").trim());\n}\n\nfunction safeBasename(filename: string): string {\n const normalized = filename.replaceAll(\"\\\\\", \"/\");\n const basename = normalized.split(\"/\").at(-1)?.replaceAll(\"\\0\", \"\").trim();\n return basename || \"download.bin\";\n}\n","/** This file is generated from openapi/openapi.yaml. Do not edit manually. */\n\nimport type { FileDownload } from \"../files.js\";\nimport type {\n ApiResponse,\n OperationBody,\n OperationParameter,\n OperationResult,\n RequestControls,\n ResourceClient,\n} from \"../internal.js\";\nimport type { operations } from \"./schema.js\";\n\nexport interface APIKeysListOptions {\n limit?: OperationParameter<operations[\"api_keys_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"api_keys_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<operations[\"api_keys_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type APIKeysListResponse = OperationResult<operations[\"api_keys_list\"]>;\n\nexport interface APIKeysCreateOptions {\n acceptLanguage?: OperationParameter<operations[\"api_keys_create\"], \"header\", \"Accept-Language\">;\n body?: OperationBody<operations[\"api_keys_create\"]>;\n request?: RequestControls;\n}\n\nexport type APIKeysCreateResponse = OperationResult<operations[\"api_keys_create\"]>;\n\nexport interface APIKeysDeleteOptions {\n id: OperationParameter<operations[\"api_keys_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"api_keys_destroy\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"api_keys_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type APIKeysDeleteResponse = OperationResult<operations[\"api_keys_destroy\"]>;\n\nexport class APIKeysResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List API keys */\n async list(options: APIKeysListOptions = {}): Promise<APIKeysListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List API keys; include response metadata. */\n async listWithResponse(\n options: APIKeysListOptions = {},\n ): Promise<ApiResponse<APIKeysListResponse>> {\n return this.#client._callWithResponse<APIKeysListResponse>(\n {\n operationId: \"api_keys_list\",\n method: \"GET\",\n path: \"/api-keys\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create an API key */\n async create(options: APIKeysCreateOptions = {}): Promise<APIKeysCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create an API key; include response metadata. */\n async createWithResponse(\n options: APIKeysCreateOptions = {},\n ): Promise<ApiResponse<APIKeysCreateResponse>> {\n return this.#client._callWithResponse<APIKeysCreateResponse>(\n {\n operationId: \"api_keys_create\",\n method: \"POST\",\n path: \"/api-keys\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Revoke an API key */\n async delete(options: APIKeysDeleteOptions): Promise<APIKeysDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Revoke an API key; include response metadata. */\n async deleteWithResponse(\n options: APIKeysDeleteOptions,\n ): Promise<ApiResponse<APIKeysDeleteResponse>> {\n return this.#client._callWithResponse<APIKeysDeleteResponse>(\n {\n operationId: \"api_keys_destroy\",\n method: \"DELETE\",\n path: \"/api-keys/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface AffiliatesListOptions {\n limit?: OperationParameter<operations[\"affiliates_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"affiliates_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<operations[\"affiliates_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type AffiliatesListResponse = OperationResult<operations[\"affiliates_list\"]>;\n\nexport interface AffiliatesListRewardsOptions {\n limit?: OperationParameter<operations[\"affiliates_rewards_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"affiliates_rewards_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<\n operations[\"affiliates_rewards_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AffiliatesListRewardsResponse = OperationResult<operations[\"affiliates_rewards_list\"]>;\n\nexport interface AffiliatesGetRewardsOverallOptions {\n acceptLanguage?: OperationParameter<\n operations[\"affiliates_rewards_overall_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AffiliatesGetRewardsOverallResponse = OperationResult<\n operations[\"affiliates_rewards_overall_retrieve\"]\n>;\n\nexport class AffiliatesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List referred customers */\n async list(options: AffiliatesListOptions = {}): Promise<AffiliatesListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List referred customers; include response metadata. */\n async listWithResponse(\n options: AffiliatesListOptions = {},\n ): Promise<ApiResponse<AffiliatesListResponse>> {\n return this.#client._callWithResponse<AffiliatesListResponse>(\n {\n operationId: \"affiliates_list\",\n method: \"GET\",\n path: \"/affiliates\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List affiliate reward entries */\n async listRewards(\n options: AffiliatesListRewardsOptions = {},\n ): Promise<AffiliatesListRewardsResponse> {\n return (await this.listRewardsWithResponse(options)).data;\n }\n\n /** List affiliate reward entries; include response metadata. */\n async listRewardsWithResponse(\n options: AffiliatesListRewardsOptions = {},\n ): Promise<ApiResponse<AffiliatesListRewardsResponse>> {\n return this.#client._callWithResponse<AffiliatesListRewardsResponse>(\n {\n operationId: \"affiliates_rewards_list\",\n method: \"GET\",\n path: \"/affiliates/rewards\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get affiliate earnings over time */\n async getRewardsOverall(\n options: AffiliatesGetRewardsOverallOptions = {},\n ): Promise<AffiliatesGetRewardsOverallResponse> {\n return (await this.getRewardsOverallWithResponse(options)).data;\n }\n\n /** Get affiliate earnings over time; include response metadata. */\n async getRewardsOverallWithResponse(\n options: AffiliatesGetRewardsOverallOptions = {},\n ): Promise<ApiResponse<AffiliatesGetRewardsOverallResponse>> {\n return this.#client._callWithResponse<AffiliatesGetRewardsOverallResponse>(\n {\n operationId: \"affiliates_rewards_overall_retrieve\",\n method: \"GET\",\n path: \"/affiliates/rewards/overall\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface AnalyticsGetTransactionsOptions {\n end?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"end\">;\n id: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"path\", \"id\">;\n limit?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"offset\">;\n recipientId?: OperationParameter<\n operations[\"analytics_transactions_retrieve\"],\n \"query\",\n \"recipient_id\"\n >;\n senderId?: OperationParameter<\n operations[\"analytics_transactions_retrieve\"],\n \"query\",\n \"sender_id\"\n >;\n start?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"timezone\">;\n type?: OperationParameter<operations[\"analytics_transactions_retrieve\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_transactions_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsGetTransactionsResponse = OperationResult<\n operations[\"analytics_transactions_retrieve\"]\n>;\n\nexport interface AnalyticsGetConnectionsOptions {\n limit?: OperationParameter<operations[\"analytics_connections_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_connections_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<\n operations[\"analytics_connections_retrieve\"],\n \"query\",\n \"package_id\"\n >;\n userId?: OperationParameter<operations[\"analytics_connections_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_connections_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsGetConnectionsResponse = OperationResult<\n operations[\"analytics_connections_retrieve\"]\n>;\n\nexport interface AnalyticsListDomainsOptions {\n end?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"end\">;\n hostname?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"hostname\">;\n includeSubUsers?: OperationParameter<\n operations[\"analytics_domains_retrieve\"],\n \"query\",\n \"include_sub_users\"\n >;\n ledgerId?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"ledger_id\">;\n limit?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"ordering\">;\n packageId?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"search\">;\n start?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_domains_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_domains_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsListDomainsResponse = OperationResult<\n operations[\"analytics_domains_retrieve\"]\n>;\n\nexport interface AnalyticsListFeedOptions {\n city?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"city\">;\n country?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"country\">;\n end?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"end\">;\n hostname?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"hostname\">;\n ledgerId?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"ledger_id\">;\n limit?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"package_id\">;\n protocol?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"protocol\">;\n region?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"region\">;\n search?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"search\">;\n start?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_feed_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_feed_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsListFeedResponse = OperationResult<operations[\"analytics_feed_retrieve\"]>;\n\nexport interface AnalyticsListLogsOptions {\n acceptLanguage?: OperationParameter<\n operations[\"analytics_logs_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n city?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"city\">;\n country?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"country\">;\n end?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"end\">;\n errorCode?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"error_code\">;\n hostname?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"hostname\">;\n ledgerId?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"ledger_id\">;\n limit?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"package_id\">;\n protocol?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"protocol\">;\n region?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"region\">;\n start?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_logs_retrieve\"], \"query\", \"user_id\">;\n request?: RequestControls;\n}\n\nexport type AnalyticsListLogsResponse = OperationResult<operations[\"analytics_logs_retrieve\"]>;\n\nexport interface AnalyticsGetOverallOptions {\n end?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"end\">;\n includeSubUsers?: OperationParameter<\n operations[\"analytics_overall_retrieve\"],\n \"query\",\n \"include_sub_users\"\n >;\n limit?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"offset\">;\n packageId?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"package_id\">;\n start?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"start\">;\n timezone?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"timezone\">;\n userId?: OperationParameter<operations[\"analytics_overall_retrieve\"], \"query\", \"user_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"analytics_overall_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type AnalyticsGetOverallResponse = OperationResult<operations[\"analytics_overall_retrieve\"]>;\n\nexport class AnalyticsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List data transactions */\n async getTransactions(\n options: AnalyticsGetTransactionsOptions,\n ): Promise<AnalyticsGetTransactionsResponse> {\n return (await this.getTransactionsWithResponse(options)).data;\n }\n\n /** List data transactions; include response metadata. */\n async getTransactionsWithResponse(\n options: AnalyticsGetTransactionsOptions,\n ): Promise<ApiResponse<AnalyticsGetTransactionsResponse>> {\n return this.#client._callWithResponse<AnalyticsGetTransactionsResponse>(\n {\n operationId: \"analytics_transactions_retrieve\",\n method: \"GET\",\n path: \"/analytics/{id}/transactions\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n end: options.end,\n limit: options.limit,\n offset: options.offset,\n recipient_id: options.recipientId,\n sender_id: options.senderId,\n start: options.start,\n timezone: options.timezone,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List active proxy connections */\n async getConnections(\n options: AnalyticsGetConnectionsOptions = {},\n ): Promise<AnalyticsGetConnectionsResponse> {\n return (await this.getConnectionsWithResponse(options)).data;\n }\n\n /** List active proxy connections; include response metadata. */\n async getConnectionsWithResponse(\n options: AnalyticsGetConnectionsOptions = {},\n ): Promise<ApiResponse<AnalyticsGetConnectionsResponse>> {\n return this.#client._callWithResponse<AnalyticsGetConnectionsResponse>(\n {\n operationId: \"analytics_connections_retrieve\",\n method: \"GET\",\n path: \"/analytics/connections\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List top destination domains */\n async listDomains(\n options: AnalyticsListDomainsOptions = {},\n ): Promise<AnalyticsListDomainsResponse> {\n return (await this.listDomainsWithResponse(options)).data;\n }\n\n /** List top destination domains; include response metadata. */\n async listDomainsWithResponse(\n options: AnalyticsListDomainsOptions = {},\n ): Promise<ApiResponse<AnalyticsListDomainsResponse>> {\n return this.#client._callWithResponse<AnalyticsListDomainsResponse>(\n {\n operationId: \"analytics_domains_retrieve\",\n method: \"GET\",\n path: \"/analytics/domains\",\n },\n {\n query: {\n end: options.end,\n hostname: options.hostname,\n include_sub_users: options.includeSubUsers,\n ledger_id: options.ledgerId,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List proxy request activity */\n async listFeed(options: AnalyticsListFeedOptions = {}): Promise<AnalyticsListFeedResponse> {\n return (await this.listFeedWithResponse(options)).data;\n }\n\n /** List proxy request activity; include response metadata. */\n async listFeedWithResponse(\n options: AnalyticsListFeedOptions = {},\n ): Promise<ApiResponse<AnalyticsListFeedResponse>> {\n return this.#client._callWithResponse<AnalyticsListFeedResponse>(\n {\n operationId: \"analytics_feed_retrieve\",\n method: \"GET\",\n path: \"/analytics/feed\",\n },\n {\n query: {\n city: options.city,\n country: options.country,\n end: options.end,\n hostname: options.hostname,\n ledger_id: options.ledgerId,\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n protocol: options.protocol,\n region: options.region,\n search: options.search,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List proxy error logs */\n async listLogs(options: AnalyticsListLogsOptions = {}): Promise<AnalyticsListLogsResponse> {\n return (await this.listLogsWithResponse(options)).data;\n }\n\n /** List proxy error logs; include response metadata. */\n async listLogsWithResponse(\n options: AnalyticsListLogsOptions = {},\n ): Promise<ApiResponse<AnalyticsListLogsResponse>> {\n return this.#client._callWithResponse<AnalyticsListLogsResponse>(\n {\n operationId: \"analytics_logs_retrieve\",\n method: \"GET\",\n path: \"/analytics/logs\",\n },\n {\n query: {\n city: options.city,\n country: options.country,\n end: options.end,\n error_code: options.errorCode,\n hostname: options.hostname,\n ledger_id: options.ledgerId,\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n protocol: options.protocol,\n region: options.region,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get traffic totals over time */\n async getOverall(options: AnalyticsGetOverallOptions = {}): Promise<AnalyticsGetOverallResponse> {\n return (await this.getOverallWithResponse(options)).data;\n }\n\n /** Get traffic totals over time; include response metadata. */\n async getOverallWithResponse(\n options: AnalyticsGetOverallOptions = {},\n ): Promise<ApiResponse<AnalyticsGetOverallResponse>> {\n return this.#client._callWithResponse<AnalyticsGetOverallResponse>(\n {\n operationId: \"analytics_overall_retrieve\",\n method: \"GET\",\n path: \"/analytics/overall\",\n },\n {\n query: {\n end: options.end,\n include_sub_users: options.includeSubUsers,\n limit: options.limit,\n offset: options.offset,\n package_id: options.packageId,\n start: options.start,\n timezone: options.timezone,\n user_id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface AuthorizationLoginOptions {\n acceptLanguage?: OperationParameter<operations[\"login_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"login_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationLoginResponse = OperationResult<operations[\"login_create\"]>;\n\nexport interface AuthorizationLoginWithGoogleOptions {\n acceptLanguage?: OperationParameter<\n operations[\"login_google_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"login_google_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationLoginWithGoogleResponse = OperationResult<\n operations[\"login_google_create\"]\n>;\n\nexport interface AuthorizationVerifyOtpOptions {\n acceptLanguage?: OperationParameter<operations[\"login_otp_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"login_otp_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationVerifyOtpResponse = OperationResult<operations[\"login_otp_create\"]>;\n\nexport interface AuthorizationRecoverPasswordOptions {\n acceptLanguage?: OperationParameter<\n operations[\"recover_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"recover_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationRecoverPasswordResponse = OperationResult<\n operations[\"recover_password_create\"]\n>;\n\nexport interface AuthorizationRefreshOptions {\n acceptLanguage?: OperationParameter<operations[\"refresh_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"refresh_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationRefreshResponse = OperationResult<operations[\"refresh_create\"]>;\n\nexport interface AuthorizationSignupOptions {\n acceptLanguage?: OperationParameter<operations[\"signup_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"signup_create\"]>;\n request?: RequestControls;\n}\n\nexport type AuthorizationSignupResponse = OperationResult<operations[\"signup_create\"]>;\n\nexport class AuthorizationResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Sign in with email or username */\n async login(options: AuthorizationLoginOptions): Promise<AuthorizationLoginResponse> {\n return (await this.loginWithResponse(options)).data;\n }\n\n /** Sign in with email or username; include response metadata. */\n async loginWithResponse(\n options: AuthorizationLoginOptions,\n ): Promise<ApiResponse<AuthorizationLoginResponse>> {\n return this.#client._callWithResponse<AuthorizationLoginResponse>(\n {\n operationId: \"login_create\",\n method: \"POST\",\n path: \"/login\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Sign in with Google */\n async loginWithGoogle(\n options: AuthorizationLoginWithGoogleOptions,\n ): Promise<AuthorizationLoginWithGoogleResponse> {\n return (await this.loginWithGoogleWithResponse(options)).data;\n }\n\n /** Sign in with Google; include response metadata. */\n async loginWithGoogleWithResponse(\n options: AuthorizationLoginWithGoogleOptions,\n ): Promise<ApiResponse<AuthorizationLoginWithGoogleResponse>> {\n return this.#client._callWithResponse<AuthorizationLoginWithGoogleResponse>(\n {\n operationId: \"login_google_create\",\n method: \"POST\",\n path: \"/login/google\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Complete two-factor sign-in */\n async verifyOtp(options: AuthorizationVerifyOtpOptions): Promise<AuthorizationVerifyOtpResponse> {\n return (await this.verifyOtpWithResponse(options)).data;\n }\n\n /** Complete two-factor sign-in; include response metadata. */\n async verifyOtpWithResponse(\n options: AuthorizationVerifyOtpOptions,\n ): Promise<ApiResponse<AuthorizationVerifyOtpResponse>> {\n return this.#client._callWithResponse<AuthorizationVerifyOtpResponse>(\n {\n operationId: \"login_otp_create\",\n method: \"POST\",\n path: \"/login/otp\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Send a password recovery email */\n async recoverPassword(\n options: AuthorizationRecoverPasswordOptions,\n ): Promise<AuthorizationRecoverPasswordResponse> {\n return (await this.recoverPasswordWithResponse(options)).data;\n }\n\n /** Send a password recovery email; include response metadata. */\n async recoverPasswordWithResponse(\n options: AuthorizationRecoverPasswordOptions,\n ): Promise<ApiResponse<AuthorizationRecoverPasswordResponse>> {\n return this.#client._callWithResponse<AuthorizationRecoverPasswordResponse>(\n {\n operationId: \"recover_password_create\",\n method: \"POST\",\n path: \"/recover-password\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Refresh an access token */\n async refresh(options: AuthorizationRefreshOptions): Promise<AuthorizationRefreshResponse> {\n return (await this.refreshWithResponse(options)).data;\n }\n\n /** Refresh an access token; include response metadata. */\n async refreshWithResponse(\n options: AuthorizationRefreshOptions,\n ): Promise<ApiResponse<AuthorizationRefreshResponse>> {\n return this.#client._callWithResponse<AuthorizationRefreshResponse>(\n {\n operationId: \"refresh_create\",\n method: \"POST\",\n path: \"/refresh\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a customer account */\n async signup(options: AuthorizationSignupOptions): Promise<AuthorizationSignupResponse> {\n return (await this.signupWithResponse(options)).data;\n }\n\n /** Create a customer account; include response metadata. */\n async signupWithResponse(\n options: AuthorizationSignupOptions,\n ): Promise<ApiResponse<AuthorizationSignupResponse>> {\n return this.#client._callWithResponse<AuthorizationSignupResponse>(\n {\n operationId: \"signup_create\",\n method: \"POST\",\n path: \"/signup\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface CouponsListOptions {\n code?: OperationParameter<operations[\"coupons_list\"], \"query\", \"code\">;\n limit?: OperationParameter<operations[\"coupons_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"coupons_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"coupons_list\"], \"query\", \"ordering\">;\n search?: OperationParameter<operations[\"coupons_list\"], \"query\", \"search\">;\n type?: OperationParameter<operations[\"coupons_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type CouponsListResponse = OperationResult<operations[\"coupons_list\"]>;\n\nexport interface CouponsCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"coupons_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"coupons_create\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsCreateResponse = OperationResult<operations[\"coupons_create\"]>;\n\nexport interface CouponsGetOptions {\n id: OperationParameter<operations[\"coupons_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type CouponsGetResponse = OperationResult<operations[\"coupons_retrieve\"]>;\n\nexport interface CouponsReplaceOptions {\n id: OperationParameter<operations[\"coupons_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"coupons_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_update\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"coupons_update\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsReplaceResponse = OperationResult<operations[\"coupons_update\"]>;\n\nexport interface CouponsUpdateOptions {\n id: OperationParameter<operations[\"coupons_partial_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"coupons_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"coupons_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"coupons_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsUpdateResponse = OperationResult<operations[\"coupons_partial_update\"]>;\n\nexport interface CouponsDeleteOptions {\n id: OperationParameter<operations[\"coupons_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"coupons_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"coupons_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"coupons_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type CouponsDeleteResponse = OperationResult<operations[\"coupons_destroy\"]>;\n\nexport interface CouponsListRedeemsOptions {\n code?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"code\">;\n id: OperationParameter<operations[\"coupons_redeems_list\"], \"path\", \"id\">;\n limit?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"ordering\">;\n type?: OperationParameter<operations[\"coupons_redeems_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<\n operations[\"coupons_redeems_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type CouponsListRedeemsResponse = OperationResult<operations[\"coupons_redeems_list\"]>;\n\nexport interface CouponsCalculatePriceOptions {\n acceptLanguage?: OperationParameter<\n operations[\"coupons_calculate_price_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"coupons_calculate_price_create\"]>;\n request?: RequestControls;\n}\n\nexport type CouponsCalculatePriceResponse = OperationResult<\n operations[\"coupons_calculate_price_create\"]\n>;\n\nexport class CouponsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List available coupons */\n async list(options: CouponsListOptions = {}): Promise<CouponsListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List available coupons; include response metadata. */\n async listWithResponse(\n options: CouponsListOptions = {},\n ): Promise<ApiResponse<CouponsListResponse>> {\n return this.#client._callWithResponse<CouponsListResponse>(\n {\n operationId: \"coupons_list\",\n method: \"GET\",\n path: \"/coupons\",\n },\n {\n query: {\n code: options.code,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n search: options.search,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a coupon */\n async create(options: CouponsCreateOptions): Promise<CouponsCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a coupon; include response metadata. */\n async createWithResponse(\n options: CouponsCreateOptions,\n ): Promise<ApiResponse<CouponsCreateResponse>> {\n return this.#client._callWithResponse<CouponsCreateResponse>(\n {\n operationId: \"coupons_create\",\n method: \"POST\",\n path: \"/coupons\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a coupon */\n async get(options: CouponsGetOptions): Promise<CouponsGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get a coupon; include response metadata. */\n async getWithResponse(options: CouponsGetOptions): Promise<ApiResponse<CouponsGetResponse>> {\n return this.#client._callWithResponse<CouponsGetResponse>(\n {\n operationId: \"coupons_retrieve\",\n method: \"GET\",\n path: \"/coupons/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Replace a coupon */\n async replace(options: CouponsReplaceOptions): Promise<CouponsReplaceResponse> {\n return (await this.replaceWithResponse(options)).data;\n }\n\n /** Replace a coupon; include response metadata. */\n async replaceWithResponse(\n options: CouponsReplaceOptions,\n ): Promise<ApiResponse<CouponsReplaceResponse>> {\n return this.#client._callWithResponse<CouponsReplaceResponse>(\n {\n operationId: \"coupons_update\",\n method: \"PUT\",\n path: \"/coupons/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update a coupon */\n async update(options: CouponsUpdateOptions): Promise<CouponsUpdateResponse> {\n return (await this.updateWithResponse(options)).data;\n }\n\n /** Update a coupon; include response metadata. */\n async updateWithResponse(\n options: CouponsUpdateOptions,\n ): Promise<ApiResponse<CouponsUpdateResponse>> {\n return this.#client._callWithResponse<CouponsUpdateResponse>(\n {\n operationId: \"coupons_partial_update\",\n method: \"PATCH\",\n path: \"/coupons/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a coupon */\n async delete(options: CouponsDeleteOptions): Promise<CouponsDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a coupon; include response metadata. */\n async deleteWithResponse(\n options: CouponsDeleteOptions,\n ): Promise<ApiResponse<CouponsDeleteResponse>> {\n return this.#client._callWithResponse<CouponsDeleteResponse>(\n {\n operationId: \"coupons_destroy\",\n method: \"DELETE\",\n path: \"/coupons/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List coupon redemptions */\n async listRedeems(options: CouponsListRedeemsOptions): Promise<CouponsListRedeemsResponse> {\n return (await this.listRedeemsWithResponse(options)).data;\n }\n\n /** List coupon redemptions; include response metadata. */\n async listRedeemsWithResponse(\n options: CouponsListRedeemsOptions,\n ): Promise<ApiResponse<CouponsListRedeemsResponse>> {\n return this.#client._callWithResponse<CouponsListRedeemsResponse>(\n {\n operationId: \"coupons_redeems_list\",\n method: \"GET\",\n path: \"/coupons/{id}/redeems\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n code: options.code,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Calculate a discounted price */\n async calculatePrice(\n options: CouponsCalculatePriceOptions,\n ): Promise<CouponsCalculatePriceResponse> {\n return (await this.calculatePriceWithResponse(options)).data;\n }\n\n /** Calculate a discounted price; include response metadata. */\n async calculatePriceWithResponse(\n options: CouponsCalculatePriceOptions,\n ): Promise<ApiResponse<CouponsCalculatePriceResponse>> {\n return this.#client._callWithResponse<CouponsCalculatePriceResponse>(\n {\n operationId: \"coupons_calculate_price_create\",\n method: \"POST\",\n path: \"/coupons/calculate-price\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface InvoicesListOptions {\n gateway?: OperationParameter<operations[\"invoices_list\"], \"query\", \"gateway\">;\n internalId?: OperationParameter<operations[\"invoices_list\"], \"query\", \"internal_id\">;\n limit?: OperationParameter<operations[\"invoices_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"invoices_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"invoices_list\"], \"query\", \"ordering\">;\n packageId?: OperationParameter<operations[\"invoices_list\"], \"query\", \"package__id\">;\n search?: OperationParameter<operations[\"invoices_list\"], \"query\", \"search\">;\n status?: OperationParameter<operations[\"invoices_list\"], \"query\", \"status\">;\n type?: OperationParameter<operations[\"invoices_list\"], \"query\", \"type\">;\n userEmail?: OperationParameter<operations[\"invoices_list\"], \"query\", \"user__email\">;\n userId?: OperationParameter<operations[\"invoices_list\"], \"query\", \"user__id\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type InvoicesListResponse = OperationResult<operations[\"invoices_list\"]>;\n\nexport interface InvoicesCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"invoices_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"invoices_create\"]>;\n request?: RequestControls;\n}\n\nexport type InvoicesCreateResponse = OperationResult<operations[\"invoices_create\"]>;\n\nexport interface InvoicesGetOptions {\n id: OperationParameter<operations[\"invoices_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type InvoicesGetResponse = OperationResult<operations[\"invoices_retrieve\"]>;\n\nexport interface InvoicesDeleteOptions {\n id: OperationParameter<operations[\"invoices_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"invoices_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"invoices_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"invoices_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type InvoicesDeleteResponse = OperationResult<operations[\"invoices_destroy\"]>;\n\nexport interface InvoicesDownloadPdfOptions {\n id: OperationParameter<operations[\"invoices_download_pdf_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<\n operations[\"invoices_download_pdf_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type InvoicesDownloadPdfResponse = FileDownload;\n\nexport interface InvoicesGetPaymentLinkOptions {\n id: OperationParameter<operations[\"invoices_pay_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<\n operations[\"invoices_pay_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type InvoicesGetPaymentLinkResponse = OperationResult<operations[\"invoices_pay_retrieve\"]>;\n\nexport class InvoicesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List invoices */\n async list(options: InvoicesListOptions = {}): Promise<InvoicesListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List invoices; include response metadata. */\n async listWithResponse(\n options: InvoicesListOptions = {},\n ): Promise<ApiResponse<InvoicesListResponse>> {\n return this.#client._callWithResponse<InvoicesListResponse>(\n {\n operationId: \"invoices_list\",\n method: \"GET\",\n path: \"/invoices\",\n },\n {\n query: {\n gateway: options.gateway,\n internal_id: options.internalId,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package__id: options.packageId,\n search: options.search,\n status: options.status,\n type: options.type,\n user__email: options.userEmail,\n user__id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create an invoice */\n async create(options: InvoicesCreateOptions): Promise<InvoicesCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create an invoice; include response metadata. */\n async createWithResponse(\n options: InvoicesCreateOptions,\n ): Promise<ApiResponse<InvoicesCreateResponse>> {\n return this.#client._callWithResponse<InvoicesCreateResponse>(\n {\n operationId: \"invoices_create\",\n method: \"POST\",\n path: \"/invoices\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get an invoice */\n async get(options: InvoicesGetOptions): Promise<InvoicesGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get an invoice; include response metadata. */\n async getWithResponse(options: InvoicesGetOptions): Promise<ApiResponse<InvoicesGetResponse>> {\n return this.#client._callWithResponse<InvoicesGetResponse>(\n {\n operationId: \"invoices_retrieve\",\n method: \"GET\",\n path: \"/invoices/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete an invoice */\n async delete(options: InvoicesDeleteOptions): Promise<InvoicesDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete an invoice; include response metadata. */\n async deleteWithResponse(\n options: InvoicesDeleteOptions,\n ): Promise<ApiResponse<InvoicesDeleteResponse>> {\n return this.#client._callWithResponse<InvoicesDeleteResponse>(\n {\n operationId: \"invoices_destroy\",\n method: \"DELETE\",\n path: \"/invoices/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Download an invoice PDF */\n async downloadPdf(options: InvoicesDownloadPdfOptions): Promise<InvoicesDownloadPdfResponse> {\n return (await this.downloadPdfWithResponse(options)).data;\n }\n\n /** Download an invoice PDF; include response metadata. */\n async downloadPdfWithResponse(\n options: InvoicesDownloadPdfOptions,\n ): Promise<ApiResponse<InvoicesDownloadPdfResponse>> {\n return this.#client._callWithResponse<InvoicesDownloadPdfResponse>(\n {\n operationId: \"invoices_download_pdf_retrieve\",\n method: \"GET\",\n path: \"/invoices/{id}/download/pdf\",\n binary: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get an invoice payment link */\n async getPaymentLink(\n options: InvoicesGetPaymentLinkOptions,\n ): Promise<InvoicesGetPaymentLinkResponse> {\n return (await this.getPaymentLinkWithResponse(options)).data;\n }\n\n /** Get an invoice payment link; include response metadata. */\n async getPaymentLinkWithResponse(\n options: InvoicesGetPaymentLinkOptions,\n ): Promise<ApiResponse<InvoicesGetPaymentLinkResponse>> {\n return this.#client._callWithResponse<InvoicesGetPaymentLinkResponse>(\n {\n operationId: \"invoices_pay_retrieve\",\n method: \"GET\",\n path: \"/invoices/{id}/pay\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface LocationsListAsnsOptions {\n code?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"country__code\">;\n global?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"global\">;\n limit?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_asn_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_asn_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListAsnsResponse = OperationResult<operations[\"locations_asn_list\"]>;\n\nexport interface LocationsListCitiesOptions {\n code?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"country__code\">;\n limit?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"package_id\">;\n regionCode?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"region__code\">;\n search?: OperationParameter<operations[\"locations_cities_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_cities_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListCitiesResponse = OperationResult<operations[\"locations_cities_list\"]>;\n\nexport interface LocationsGetCityOptions {\n id: OperationParameter<operations[\"locations_cities_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_cities_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_cities_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetCityResponse = OperationResult<operations[\"locations_cities_retrieve\"]>;\n\nexport interface LocationsListContinentsOptions {\n code?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"code\">;\n limit?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_continents_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_continents_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListContinentsResponse = OperationResult<\n operations[\"locations_continents_list\"]\n>;\n\nexport interface LocationsGetContinentOptions {\n id: OperationParameter<operations[\"locations_continents_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_continents_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_continents_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetContinentResponse = OperationResult<\n operations[\"locations_continents_retrieve\"]\n>;\n\nexport interface LocationsListCountriesOptions {\n code?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"code\">;\n limit?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_countries_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_countries_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListCountriesResponse = OperationResult<\n operations[\"locations_countries_list\"]\n>;\n\nexport interface LocationsGetCountryOptions {\n id: OperationParameter<operations[\"locations_countries_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_countries_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_countries_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetCountryResponse = OperationResult<\n operations[\"locations_countries_retrieve\"]\n>;\n\nexport interface LocationsListIspsOptions {\n code?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"country__code\">;\n limit?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_isps_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_isps_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListIspsResponse = OperationResult<operations[\"locations_isps_list\"]>;\n\nexport interface LocationsListRegionsOptions {\n code?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"code\">;\n countryCode?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"country__code\">;\n limit?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"limit\">;\n name?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"name\">;\n offset?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"ordering\">;\n packageId: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"package_id\">;\n search?: OperationParameter<operations[\"locations_regions_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_regions_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsListRegionsResponse = OperationResult<operations[\"locations_regions_list\"]>;\n\nexport interface LocationsGetRegionOptions {\n id: OperationParameter<operations[\"locations_regions_retrieve\"], \"path\", \"id\">;\n packageId: OperationParameter<operations[\"locations_regions_retrieve\"], \"query\", \"package_id\">;\n acceptLanguage?: OperationParameter<\n operations[\"locations_regions_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type LocationsGetRegionResponse = OperationResult<operations[\"locations_regions_retrieve\"]>;\n\nexport class LocationsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List available autonomous systems */\n async listAsns(options: LocationsListAsnsOptions): Promise<LocationsListAsnsResponse> {\n return (await this.listAsnsWithResponse(options)).data;\n }\n\n /** List available autonomous systems; include response metadata. */\n async listAsnsWithResponse(\n options: LocationsListAsnsOptions,\n ): Promise<ApiResponse<LocationsListAsnsResponse>> {\n return this.#client._callWithResponse<LocationsListAsnsResponse>(\n {\n operationId: \"locations_asn_list\",\n method: \"GET\",\n path: \"/locations/asn\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n global: options.global,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available cities */\n async listCities(options: LocationsListCitiesOptions): Promise<LocationsListCitiesResponse> {\n return (await this.listCitiesWithResponse(options)).data;\n }\n\n /** List available cities; include response metadata. */\n async listCitiesWithResponse(\n options: LocationsListCitiesOptions,\n ): Promise<ApiResponse<LocationsListCitiesResponse>> {\n return this.#client._callWithResponse<LocationsListCitiesResponse>(\n {\n operationId: \"locations_cities_list\",\n method: \"GET\",\n path: \"/locations/cities\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n region__code: options.regionCode,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a city */\n async getCity(options: LocationsGetCityOptions): Promise<LocationsGetCityResponse> {\n return (await this.getCityWithResponse(options)).data;\n }\n\n /** Get a city; include response metadata. */\n async getCityWithResponse(\n options: LocationsGetCityOptions,\n ): Promise<ApiResponse<LocationsGetCityResponse>> {\n return this.#client._callWithResponse<LocationsGetCityResponse>(\n {\n operationId: \"locations_cities_retrieve\",\n method: \"GET\",\n path: \"/locations/cities/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available continents */\n async listContinents(\n options: LocationsListContinentsOptions,\n ): Promise<LocationsListContinentsResponse> {\n return (await this.listContinentsWithResponse(options)).data;\n }\n\n /** List available continents; include response metadata. */\n async listContinentsWithResponse(\n options: LocationsListContinentsOptions,\n ): Promise<ApiResponse<LocationsListContinentsResponse>> {\n return this.#client._callWithResponse<LocationsListContinentsResponse>(\n {\n operationId: \"locations_continents_list\",\n method: \"GET\",\n path: \"/locations/continents\",\n },\n {\n query: {\n code: options.code,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a continent */\n async getContinent(\n options: LocationsGetContinentOptions,\n ): Promise<LocationsGetContinentResponse> {\n return (await this.getContinentWithResponse(options)).data;\n }\n\n /** Get a continent; include response metadata. */\n async getContinentWithResponse(\n options: LocationsGetContinentOptions,\n ): Promise<ApiResponse<LocationsGetContinentResponse>> {\n return this.#client._callWithResponse<LocationsGetContinentResponse>(\n {\n operationId: \"locations_continents_retrieve\",\n method: \"GET\",\n path: \"/locations/continents/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available countries */\n async listCountries(\n options: LocationsListCountriesOptions,\n ): Promise<LocationsListCountriesResponse> {\n return (await this.listCountriesWithResponse(options)).data;\n }\n\n /** List available countries; include response metadata. */\n async listCountriesWithResponse(\n options: LocationsListCountriesOptions,\n ): Promise<ApiResponse<LocationsListCountriesResponse>> {\n return this.#client._callWithResponse<LocationsListCountriesResponse>(\n {\n operationId: \"locations_countries_list\",\n method: \"GET\",\n path: \"/locations/countries\",\n },\n {\n query: {\n code: options.code,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a country */\n async getCountry(options: LocationsGetCountryOptions): Promise<LocationsGetCountryResponse> {\n return (await this.getCountryWithResponse(options)).data;\n }\n\n /** Get a country; include response metadata. */\n async getCountryWithResponse(\n options: LocationsGetCountryOptions,\n ): Promise<ApiResponse<LocationsGetCountryResponse>> {\n return this.#client._callWithResponse<LocationsGetCountryResponse>(\n {\n operationId: \"locations_countries_retrieve\",\n method: \"GET\",\n path: \"/locations/countries/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available internet service providers */\n async listIsps(options: LocationsListIspsOptions): Promise<LocationsListIspsResponse> {\n return (await this.listIspsWithResponse(options)).data;\n }\n\n /** List available internet service providers; include response metadata. */\n async listIspsWithResponse(\n options: LocationsListIspsOptions,\n ): Promise<ApiResponse<LocationsListIspsResponse>> {\n return this.#client._callWithResponse<LocationsListIspsResponse>(\n {\n operationId: \"locations_isps_list\",\n method: \"GET\",\n path: \"/locations/isps\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List available regions */\n async listRegions(options: LocationsListRegionsOptions): Promise<LocationsListRegionsResponse> {\n return (await this.listRegionsWithResponse(options)).data;\n }\n\n /** List available regions; include response metadata. */\n async listRegionsWithResponse(\n options: LocationsListRegionsOptions,\n ): Promise<ApiResponse<LocationsListRegionsResponse>> {\n return this.#client._callWithResponse<LocationsListRegionsResponse>(\n {\n operationId: \"locations_regions_list\",\n method: \"GET\",\n path: \"/locations/regions\",\n },\n {\n query: {\n code: options.code,\n country__code: options.countryCode,\n limit: options.limit,\n name: options.name,\n offset: options.offset,\n ordering: options.ordering,\n package_id: options.packageId,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a region */\n async getRegion(options: LocationsGetRegionOptions): Promise<LocationsGetRegionResponse> {\n return (await this.getRegionWithResponse(options)).data;\n }\n\n /** Get a region; include response metadata. */\n async getRegionWithResponse(\n options: LocationsGetRegionOptions,\n ): Promise<ApiResponse<LocationsGetRegionResponse>> {\n return this.#client._callWithResponse<LocationsGetRegionResponse>(\n {\n operationId: \"locations_regions_retrieve\",\n method: \"GET\",\n path: \"/locations/regions/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n query: {\n package_id: options.packageId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface NewsListOptions {\n limit?: OperationParameter<operations[\"news_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"news_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"news_list\"], \"query\", \"ordering\">;\n search?: OperationParameter<operations[\"news_list\"], \"query\", \"search\">;\n acceptLanguage?: OperationParameter<operations[\"news_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type NewsListResponse = OperationResult<operations[\"news_list\"]>;\n\nexport class NewsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List product announcements */\n async list(options: NewsListOptions = {}): Promise<NewsListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List product announcements; include response metadata. */\n async listWithResponse(options: NewsListOptions = {}): Promise<ApiResponse<NewsListResponse>> {\n return this.#client._callWithResponse<NewsListResponse>(\n {\n operationId: \"news_list\",\n method: \"GET\",\n path: \"/news\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n search: options.search,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface OrdersListOptions {\n limit?: OperationParameter<operations[\"orders_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"orders_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"orders_list\"], \"query\", \"ordering\">;\n packageAlias?: OperationParameter<operations[\"orders_list\"], \"query\", \"package__alias\">;\n packageId?: OperationParameter<operations[\"orders_list\"], \"query\", \"package__id\">;\n packageType?: OperationParameter<operations[\"orders_list\"], \"query\", \"package__type\">;\n search?: OperationParameter<operations[\"orders_list\"], \"query\", \"search\">;\n userEmail?: OperationParameter<operations[\"orders_list\"], \"query\", \"user__email\">;\n userId?: OperationParameter<operations[\"orders_list\"], \"query\", \"user__id\">;\n acceptLanguage?: OperationParameter<operations[\"orders_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type OrdersListResponse = OperationResult<operations[\"orders_list\"]>;\n\nexport interface OrdersGetOptions {\n id: OperationParameter<operations[\"orders_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"orders_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type OrdersGetResponse = OperationResult<operations[\"orders_retrieve\"]>;\n\nexport interface OrdersUpdateAutoRenewalOptions {\n id: OperationParameter<operations[\"orders_partial_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"orders_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"orders_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"orders_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type OrdersUpdateAutoRenewalResponse = OperationResult<operations[\"orders_partial_update\"]>;\n\nexport interface OrdersDeleteOptions {\n id: OperationParameter<operations[\"orders_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"orders_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"orders_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"orders_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type OrdersDeleteResponse = OperationResult<operations[\"orders_destroy\"]>;\n\nexport interface OrdersResetPasswordOptions {\n acceptLanguage?: OperationParameter<\n operations[\"reset_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"reset_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type OrdersResetPasswordResponse = OperationResult<operations[\"reset_password_create\"]>;\n\nexport class OrdersResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List active orders */\n async list(options: OrdersListOptions = {}): Promise<OrdersListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List active orders; include response metadata. */\n async listWithResponse(\n options: OrdersListOptions = {},\n ): Promise<ApiResponse<OrdersListResponse>> {\n return this.#client._callWithResponse<OrdersListResponse>(\n {\n operationId: \"orders_list\",\n method: \"GET\",\n path: \"/orders\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package__alias: options.packageAlias,\n package__id: options.packageId,\n package__type: options.packageType,\n search: options.search,\n user__email: options.userEmail,\n user__id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get an order */\n async get(options: OrdersGetOptions): Promise<OrdersGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get an order; include response metadata. */\n async getWithResponse(options: OrdersGetOptions): Promise<ApiResponse<OrdersGetResponse>> {\n return this.#client._callWithResponse<OrdersGetResponse>(\n {\n operationId: \"orders_retrieve\",\n method: \"GET\",\n path: \"/orders/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update order auto-renewal */\n async updateAutoRenewal(\n options: OrdersUpdateAutoRenewalOptions,\n ): Promise<OrdersUpdateAutoRenewalResponse> {\n return (await this.updateAutoRenewalWithResponse(options)).data;\n }\n\n /** Update order auto-renewal; include response metadata. */\n async updateAutoRenewalWithResponse(\n options: OrdersUpdateAutoRenewalOptions,\n ): Promise<ApiResponse<OrdersUpdateAutoRenewalResponse>> {\n return this.#client._callWithResponse<OrdersUpdateAutoRenewalResponse>(\n {\n operationId: \"orders_partial_update\",\n method: \"PATCH\",\n path: \"/orders/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a sub-user order */\n async delete(options: OrdersDeleteOptions): Promise<OrdersDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a sub-user order; include response metadata. */\n async deleteWithResponse(\n options: OrdersDeleteOptions,\n ): Promise<ApiResponse<OrdersDeleteResponse>> {\n return this.#client._callWithResponse<OrdersDeleteResponse>(\n {\n operationId: \"orders_destroy\",\n method: \"DELETE\",\n path: \"/orders/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Reset an order's proxy password */\n async resetPassword(options: OrdersResetPasswordOptions): Promise<OrdersResetPasswordResponse> {\n return (await this.resetPasswordWithResponse(options)).data;\n }\n\n /** Reset an order's proxy password; include response metadata. */\n async resetPasswordWithResponse(\n options: OrdersResetPasswordOptions,\n ): Promise<ApiResponse<OrdersResetPasswordResponse>> {\n return this.#client._callWithResponse<OrdersResetPasswordResponse>(\n {\n operationId: \"reset_password_create\",\n method: \"POST\",\n path: \"/reset-password\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface PackagesListOptions {\n alias?: OperationParameter<operations[\"packages_list\"], \"query\", \"alias\">;\n limit?: OperationParameter<operations[\"packages_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"packages_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"packages_list\"], \"query\", \"ordering\">;\n pricingUnit?: OperationParameter<operations[\"packages_list\"], \"query\", \"pricing_unit\">;\n search?: OperationParameter<operations[\"packages_list\"], \"query\", \"search\">;\n type?: OperationParameter<operations[\"packages_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<operations[\"packages_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type PackagesListResponse = OperationResult<operations[\"packages_list\"]>;\n\nexport interface PackagesListCommissionsOptions {\n alias?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"alias\">;\n limit?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"ordering\">;\n pricingUnit?: OperationParameter<\n operations[\"packages_commissions_list\"],\n \"query\",\n \"pricing_unit\"\n >;\n type?: OperationParameter<operations[\"packages_commissions_list\"], \"query\", \"type\">;\n acceptLanguage?: OperationParameter<\n operations[\"packages_commissions_list\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type PackagesListCommissionsResponse = OperationResult<\n operations[\"packages_commissions_list\"]\n>;\n\nexport class PackagesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List available proxy packages */\n async list(options: PackagesListOptions = {}): Promise<PackagesListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List available proxy packages; include response metadata. */\n async listWithResponse(\n options: PackagesListOptions = {},\n ): Promise<ApiResponse<PackagesListResponse>> {\n return this.#client._callWithResponse<PackagesListResponse>(\n {\n operationId: \"packages_list\",\n method: \"GET\",\n path: \"/packages\",\n },\n {\n query: {\n alias: options.alias,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n pricing_unit: options.pricingUnit,\n search: options.search,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List affiliate package commissions */\n async listCommissions(\n options: PackagesListCommissionsOptions = {},\n ): Promise<PackagesListCommissionsResponse> {\n return (await this.listCommissionsWithResponse(options)).data;\n }\n\n /** List affiliate package commissions; include response metadata. */\n async listCommissionsWithResponse(\n options: PackagesListCommissionsOptions = {},\n ): Promise<ApiResponse<PackagesListCommissionsResponse>> {\n return this.#client._callWithResponse<PackagesListCommissionsResponse>(\n {\n operationId: \"packages_commissions_list\",\n method: \"GET\",\n path: \"/packages/commissions\",\n },\n {\n query: {\n alias: options.alias,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n pricing_unit: options.pricingUnit,\n type: options.type,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface ProfileGetOptions {\n acceptLanguage?: OperationParameter<operations[\"profile_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type ProfileGetResponse = OperationResult<operations[\"profile_retrieve\"]>;\n\nexport interface ProfileUpdateOptions {\n ifMatch?: OperationParameter<operations[\"profile_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"profile_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"profile_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileUpdateResponse = OperationResult<operations[\"profile_partial_update\"]>;\n\nexport interface ProfileDeleteOptions {\n ifMatch?: OperationParameter<operations[\"profile_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"profile_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type ProfileDeleteResponse = OperationResult<operations[\"profile_destroy\"]>;\n\nexport interface ProfileConfirmTwoFactorOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_confirm_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"profile_2fa_confirm_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileConfirmTwoFactorResponse = OperationResult<\n operations[\"profile_2fa_confirm_create\"]\n>;\n\nexport interface ProfileDisableTwoFactorOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_disable_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"profile_2fa_disable_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileDisableTwoFactorResponse = OperationResult<\n operations[\"profile_2fa_disable_create\"]\n>;\n\nexport interface ProfileSetupTwoFactorOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_setup_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"profile_2fa_setup_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileSetupTwoFactorResponse = OperationResult<operations[\"profile_2fa_setup_create\"]>;\n\nexport interface ProfileGetTwoFactorStatusOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_2fa_status_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type ProfileGetTwoFactorStatusResponse = OperationResult<\n operations[\"profile_2fa_status_retrieve\"]\n>;\n\nexport interface ProfileChangePasswordOptions {\n acceptLanguage?: OperationParameter<\n operations[\"profile_change_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"profile_change_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProfileChangePasswordResponse = OperationResult<\n operations[\"profile_change_password_create\"]\n>;\n\nexport class ProfileResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Get the current profile */\n async get(options: ProfileGetOptions = {}): Promise<ProfileGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get the current profile; include response metadata. */\n async getWithResponse(options: ProfileGetOptions = {}): Promise<ApiResponse<ProfileGetResponse>> {\n return this.#client._callWithResponse<ProfileGetResponse>(\n {\n operationId: \"profile_retrieve\",\n method: \"GET\",\n path: \"/profile\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update the current profile */\n async update(options: ProfileUpdateOptions = {}): Promise<ProfileUpdateResponse> {\n return (await this.updateWithResponse(options)).data;\n }\n\n /** Update the current profile; include response metadata. */\n async updateWithResponse(\n options: ProfileUpdateOptions = {},\n ): Promise<ApiResponse<ProfileUpdateResponse>> {\n return this.#client._callWithResponse<ProfileUpdateResponse>(\n {\n operationId: \"profile_partial_update\",\n method: \"PATCH\",\n path: \"/profile\",\n },\n {\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete the current account */\n async delete(options: ProfileDeleteOptions = {}): Promise<ProfileDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete the current account; include response metadata. */\n async deleteWithResponse(\n options: ProfileDeleteOptions = {},\n ): Promise<ApiResponse<ProfileDeleteResponse>> {\n return this.#client._callWithResponse<ProfileDeleteResponse>(\n {\n operationId: \"profile_destroy\",\n method: \"DELETE\",\n path: \"/profile\",\n },\n {\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Confirm two-factor authentication */\n async confirmTwoFactor(\n options: ProfileConfirmTwoFactorOptions,\n ): Promise<ProfileConfirmTwoFactorResponse> {\n return (await this.confirmTwoFactorWithResponse(options)).data;\n }\n\n /** Confirm two-factor authentication; include response metadata. */\n async confirmTwoFactorWithResponse(\n options: ProfileConfirmTwoFactorOptions,\n ): Promise<ApiResponse<ProfileConfirmTwoFactorResponse>> {\n return this.#client._callWithResponse<ProfileConfirmTwoFactorResponse>(\n {\n operationId: \"profile_2fa_confirm_create\",\n method: \"POST\",\n path: \"/profile/2fa/confirm\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Disable two-factor authentication */\n async disableTwoFactor(\n options: ProfileDisableTwoFactorOptions,\n ): Promise<ProfileDisableTwoFactorResponse> {\n return (await this.disableTwoFactorWithResponse(options)).data;\n }\n\n /** Disable two-factor authentication; include response metadata. */\n async disableTwoFactorWithResponse(\n options: ProfileDisableTwoFactorOptions,\n ): Promise<ApiResponse<ProfileDisableTwoFactorResponse>> {\n return this.#client._callWithResponse<ProfileDisableTwoFactorResponse>(\n {\n operationId: \"profile_2fa_disable_create\",\n method: \"POST\",\n path: \"/profile/2fa/disable\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Prepare two-factor authentication */\n async setupTwoFactor(\n options: ProfileSetupTwoFactorOptions = {},\n ): Promise<ProfileSetupTwoFactorResponse> {\n return (await this.setupTwoFactorWithResponse(options)).data;\n }\n\n /** Prepare two-factor authentication; include response metadata. */\n async setupTwoFactorWithResponse(\n options: ProfileSetupTwoFactorOptions = {},\n ): Promise<ApiResponse<ProfileSetupTwoFactorResponse>> {\n return this.#client._callWithResponse<ProfileSetupTwoFactorResponse>(\n {\n operationId: \"profile_2fa_setup_create\",\n method: \"POST\",\n path: \"/profile/2fa/setup\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get two-factor status */\n async getTwoFactorStatus(\n options: ProfileGetTwoFactorStatusOptions = {},\n ): Promise<ProfileGetTwoFactorStatusResponse> {\n return (await this.getTwoFactorStatusWithResponse(options)).data;\n }\n\n /** Get two-factor status; include response metadata. */\n async getTwoFactorStatusWithResponse(\n options: ProfileGetTwoFactorStatusOptions = {},\n ): Promise<ApiResponse<ProfileGetTwoFactorStatusResponse>> {\n return this.#client._callWithResponse<ProfileGetTwoFactorStatusResponse>(\n {\n operationId: \"profile_2fa_status_retrieve\",\n method: \"GET\",\n path: \"/profile/2fa/status\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Change the account password */\n async changePassword(\n options: ProfileChangePasswordOptions,\n ): Promise<ProfileChangePasswordResponse> {\n return (await this.changePasswordWithResponse(options)).data;\n }\n\n /** Change the account password; include response metadata. */\n async changePasswordWithResponse(\n options: ProfileChangePasswordOptions,\n ): Promise<ApiResponse<ProfileChangePasswordResponse>> {\n return this.#client._callWithResponse<ProfileChangePasswordResponse>(\n {\n operationId: \"profile_change_password_create\",\n method: \"POST\",\n path: \"/profile/change-password\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface ProxiesGenerateOptions {\n acceptLanguage?: OperationParameter<\n operations[\"proxies_generate_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"proxies_generate_create\"]>;\n request?: RequestControls;\n}\n\nexport type ProxiesGenerateResponse = OperationResult<operations[\"proxies_generate_create\"]>;\n\nexport class ProxiesResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Generate proxy credentials */\n async generate(options: ProxiesGenerateOptions): Promise<ProxiesGenerateResponse> {\n return (await this.generateWithResponse(options)).data;\n }\n\n /** Generate proxy credentials; include response metadata. */\n async generateWithResponse(\n options: ProxiesGenerateOptions,\n ): Promise<ApiResponse<ProxiesGenerateResponse>> {\n return this.#client._callWithResponse<ProxiesGenerateResponse>(\n {\n operationId: \"proxies_generate_create\",\n method: \"POST\",\n path: \"/proxies/generate\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface RewardsListOptions {\n level?: OperationParameter<operations[\"rewards_list\"], \"query\", \"level\">;\n limit?: OperationParameter<operations[\"rewards_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"rewards_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"rewards_list\"], \"query\", \"ordering\">;\n userEmail?: OperationParameter<operations[\"rewards_list\"], \"query\", \"user__email\">;\n userId?: OperationParameter<operations[\"rewards_list\"], \"query\", \"user__id\">;\n acceptLanguage?: OperationParameter<operations[\"rewards_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type RewardsListResponse = OperationResult<operations[\"rewards_list\"]>;\n\nexport interface RewardsClaimOptions {\n acceptLanguage?: OperationParameter<\n operations[\"rewards_claim_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"rewards_claim_create\"]>;\n request?: RequestControls;\n}\n\nexport type RewardsClaimResponse = OperationResult<operations[\"rewards_claim_create\"]>;\n\nexport class RewardsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List account rewards */\n async list(options: RewardsListOptions = {}): Promise<RewardsListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List account rewards; include response metadata. */\n async listWithResponse(\n options: RewardsListOptions = {},\n ): Promise<ApiResponse<RewardsListResponse>> {\n return this.#client._callWithResponse<RewardsListResponse>(\n {\n operationId: \"rewards_list\",\n method: \"GET\",\n path: \"/rewards\",\n },\n {\n query: {\n level: options.level,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n user__email: options.userEmail,\n user__id: options.userId,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Claim available rewards */\n async claim(options: RewardsClaimOptions): Promise<RewardsClaimResponse> {\n return (await this.claimWithResponse(options)).data;\n }\n\n /** Claim available rewards; include response metadata. */\n async claimWithResponse(\n options: RewardsClaimOptions,\n ): Promise<ApiResponse<RewardsClaimResponse>> {\n return this.#client._callWithResponse<RewardsClaimResponse>(\n {\n operationId: \"rewards_claim_create\",\n method: \"POST\",\n path: \"/rewards/claim\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface SettingsGetOptions {\n acceptLanguage?: OperationParameter<operations[\"settings_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type SettingsGetResponse = OperationResult<operations[\"settings_retrieve\"]>;\n\nexport class SettingsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Get account settings */\n async get(options: SettingsGetOptions = {}): Promise<SettingsGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get account settings; include response metadata. */\n async getWithResponse(\n options: SettingsGetOptions = {},\n ): Promise<ApiResponse<SettingsGetResponse>> {\n return this.#client._callWithResponse<SettingsGetResponse>(\n {\n operationId: \"settings_retrieve\",\n method: \"GET\",\n path: \"/settings\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface TelegramDashboardGetConnectionOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_connection_retrieve\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardGetConnectionResponse = OperationResult<\n operations[\"integrations_telegram_connection_retrieve\"]\n>;\n\nexport interface TelegramDashboardUpdateConnectionOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_connection_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"integrations_telegram_connection_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardUpdateConnectionResponse = OperationResult<\n operations[\"integrations_telegram_connection_partial_update\"]\n>;\n\nexport interface TelegramDashboardDeleteConnectionOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_connection_destroy\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardDeleteConnectionResponse = OperationResult<\n operations[\"integrations_telegram_connection_destroy\"]\n>;\n\nexport interface TelegramDashboardCreateLinkOptions {\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_link_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n request?: RequestControls;\n}\n\nexport type TelegramDashboardCreateLinkResponse = OperationResult<\n operations[\"integrations_telegram_link_create\"]\n>;\n\nexport class TelegramDashboardResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Get the Telegram dashboard connection */\n async getConnection(\n options: TelegramDashboardGetConnectionOptions = {},\n ): Promise<TelegramDashboardGetConnectionResponse> {\n return (await this.getConnectionWithResponse(options)).data;\n }\n\n /** Get the Telegram dashboard connection; include response metadata. */\n async getConnectionWithResponse(\n options: TelegramDashboardGetConnectionOptions = {},\n ): Promise<ApiResponse<TelegramDashboardGetConnectionResponse>> {\n return this.#client._callWithResponse<TelegramDashboardGetConnectionResponse>(\n {\n operationId: \"integrations_telegram_connection_retrieve\",\n method: \"GET\",\n path: \"/integrations/telegram/connection\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update Telegram dashboard preferences */\n async updateConnection(\n options: TelegramDashboardUpdateConnectionOptions = {},\n ): Promise<TelegramDashboardUpdateConnectionResponse> {\n return (await this.updateConnectionWithResponse(options)).data;\n }\n\n /** Update Telegram dashboard preferences; include response metadata. */\n async updateConnectionWithResponse(\n options: TelegramDashboardUpdateConnectionOptions = {},\n ): Promise<ApiResponse<TelegramDashboardUpdateConnectionResponse>> {\n return this.#client._callWithResponse<TelegramDashboardUpdateConnectionResponse>(\n {\n operationId: \"integrations_telegram_connection_partial_update\",\n method: \"PATCH\",\n path: \"/integrations/telegram/connection\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Disconnect the Telegram dashboard */\n async deleteConnection(\n options: TelegramDashboardDeleteConnectionOptions = {},\n ): Promise<TelegramDashboardDeleteConnectionResponse> {\n return (await this.deleteConnectionWithResponse(options)).data;\n }\n\n /** Disconnect the Telegram dashboard; include response metadata. */\n async deleteConnectionWithResponse(\n options: TelegramDashboardDeleteConnectionOptions = {},\n ): Promise<ApiResponse<TelegramDashboardDeleteConnectionResponse>> {\n return this.#client._callWithResponse<TelegramDashboardDeleteConnectionResponse>(\n {\n operationId: \"integrations_telegram_connection_destroy\",\n method: \"DELETE\",\n path: \"/integrations/telegram/connection\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a Telegram account link */\n async createLink(\n options: TelegramDashboardCreateLinkOptions = {},\n ): Promise<TelegramDashboardCreateLinkResponse> {\n return (await this.createLinkWithResponse(options)).data;\n }\n\n /** Create a Telegram account link; include response metadata. */\n async createLinkWithResponse(\n options: TelegramDashboardCreateLinkOptions = {},\n ): Promise<ApiResponse<TelegramDashboardCreateLinkResponse>> {\n return this.#client._callWithResponse<TelegramDashboardCreateLinkResponse>(\n {\n operationId: \"integrations_telegram_link_create\",\n method: \"POST\",\n path: \"/integrations/telegram/link\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface UsersListOptions {\n email?: OperationParameter<operations[\"users_list\"], \"query\", \"email\">;\n id?: OperationParameter<operations[\"users_list\"], \"query\", \"id\">;\n limit?: OperationParameter<operations[\"users_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"users_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"users_list\"], \"query\", \"ordering\">;\n packageId?: OperationParameter<operations[\"users_list\"], \"query\", \"package__id\">;\n search?: OperationParameter<operations[\"users_list\"], \"query\", \"search\">;\n username?: OperationParameter<operations[\"users_list\"], \"query\", \"username\">;\n acceptLanguage?: OperationParameter<operations[\"users_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersListResponse = OperationResult<operations[\"users_list\"]>;\n\nexport interface UsersCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"users_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"users_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"users_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersCreateResponse = OperationResult<operations[\"users_create\"]>;\n\nexport interface UsersGetOptions {\n id: OperationParameter<operations[\"users_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"users_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersGetResponse = OperationResult<operations[\"users_retrieve\"]>;\n\nexport interface UsersUpdateOptions {\n id: OperationParameter<operations[\"users_partial_update\"], \"path\", \"id\">;\n ifMatch?: OperationParameter<operations[\"users_partial_update\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<\n operations[\"users_partial_update\"],\n \"header\",\n \"Accept-Language\"\n >;\n body?: OperationBody<operations[\"users_partial_update\"]>;\n request?: RequestControls;\n}\n\nexport type UsersUpdateResponse = OperationResult<operations[\"users_partial_update\"]>;\n\nexport interface UsersDeleteOptions {\n id: OperationParameter<operations[\"users_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"users_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"users_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"users_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersDeleteResponse = OperationResult<operations[\"users_destroy\"]>;\n\nexport interface UsersAddDataOptions {\n id: OperationParameter<operations[\"users_data_add_create\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<\n operations[\"users_data_add_create\"],\n \"header\",\n \"Idempotency-Key\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"users_data_add_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_data_add_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersAddDataResponse = OperationResult<operations[\"users_data_add_create\"]>;\n\nexport interface UsersSubtractDataOptions {\n id: OperationParameter<operations[\"users_data_subtract_create\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<\n operations[\"users_data_subtract_create\"],\n \"header\",\n \"Idempotency-Key\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"users_data_subtract_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_data_subtract_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersSubtractDataResponse = OperationResult<operations[\"users_data_subtract_create\"]>;\n\nexport interface UsersResetDataOptions {\n id: OperationParameter<operations[\"users_data_reset_create\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<\n operations[\"users_data_reset_create\"],\n \"header\",\n \"Idempotency-Key\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"users_data_reset_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_data_reset_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersResetDataResponse = OperationResult<operations[\"users_data_reset_create\"]>;\n\nexport interface UsersListOrdersOptions {\n email?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"email\">;\n idPath: OperationParameter<operations[\"users_orders_list\"], \"path\", \"id\">;\n idQuery?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"id\">;\n limit?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"offset\">;\n ordering?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"ordering\">;\n username?: OperationParameter<operations[\"users_orders_list\"], \"query\", \"username\">;\n acceptLanguage?: OperationParameter<operations[\"users_orders_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type UsersListOrdersResponse = OperationResult<operations[\"users_orders_list\"]>;\n\nexport interface UsersResetPasswordOptions {\n id: OperationParameter<operations[\"users_password_create\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<\n operations[\"users_password_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"users_password_create\"]>;\n request?: RequestControls;\n}\n\nexport type UsersResetPasswordResponse = OperationResult<operations[\"users_password_create\"]>;\n\nexport class UsersResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List users in the current account */\n async list(options: UsersListOptions = {}): Promise<UsersListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List users in the current account; include response metadata. */\n async listWithResponse(options: UsersListOptions = {}): Promise<ApiResponse<UsersListResponse>> {\n return this.#client._callWithResponse<UsersListResponse>(\n {\n operationId: \"users_list\",\n method: \"GET\",\n path: \"/users\",\n },\n {\n query: {\n email: options.email,\n id: options.id,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n package__id: options.packageId,\n search: options.search,\n username: options.username,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a customer account */\n async create(options: UsersCreateOptions): Promise<UsersCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a customer account; include response metadata. */\n async createWithResponse(options: UsersCreateOptions): Promise<ApiResponse<UsersCreateResponse>> {\n return this.#client._callWithResponse<UsersCreateResponse>(\n {\n operationId: \"users_create\",\n method: \"POST\",\n path: \"/users\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a user */\n async get(options: UsersGetOptions): Promise<UsersGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get a user; include response metadata. */\n async getWithResponse(options: UsersGetOptions): Promise<ApiResponse<UsersGetResponse>> {\n return this.#client._callWithResponse<UsersGetResponse>(\n {\n operationId: \"users_retrieve\",\n method: \"GET\",\n path: \"/users/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Update a user */\n async update(options: UsersUpdateOptions): Promise<UsersUpdateResponse> {\n return (await this.updateWithResponse(options)).data;\n }\n\n /** Update a user; include response metadata. */\n async updateWithResponse(options: UsersUpdateOptions): Promise<ApiResponse<UsersUpdateResponse>> {\n return this.#client._callWithResponse<UsersUpdateResponse>(\n {\n operationId: \"users_partial_update\",\n method: \"PATCH\",\n path: \"/users/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.body === undefined ? {} : { body: options.body }),\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a user */\n async delete(options: UsersDeleteOptions): Promise<UsersDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a user; include response metadata. */\n async deleteWithResponse(options: UsersDeleteOptions): Promise<ApiResponse<UsersDeleteResponse>> {\n return this.#client._callWithResponse<UsersDeleteResponse>(\n {\n operationId: \"users_destroy\",\n method: \"DELETE\",\n path: \"/users/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Add data to a sub-user order */\n async addData(options: UsersAddDataOptions): Promise<UsersAddDataResponse> {\n return (await this.addDataWithResponse(options)).data;\n }\n\n /** Add data to a sub-user order; include response metadata. */\n async addDataWithResponse(\n options: UsersAddDataOptions,\n ): Promise<ApiResponse<UsersAddDataResponse>> {\n return this.#client._callWithResponse<UsersAddDataResponse>(\n {\n operationId: \"users_data_add_create\",\n method: \"POST\",\n path: \"/users/{id}/data/add\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Subtract data from a sub-user order */\n async subtractData(options: UsersSubtractDataOptions): Promise<UsersSubtractDataResponse> {\n return (await this.subtractDataWithResponse(options)).data;\n }\n\n /** Subtract data from a sub-user order; include response metadata. */\n async subtractDataWithResponse(\n options: UsersSubtractDataOptions,\n ): Promise<ApiResponse<UsersSubtractDataResponse>> {\n return this.#client._callWithResponse<UsersSubtractDataResponse>(\n {\n operationId: \"users_data_subtract_create\",\n method: \"POST\",\n path: \"/users/{id}/data/subtract\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Reset a user's remaining data */\n async resetData(options: UsersResetDataOptions): Promise<UsersResetDataResponse> {\n return (await this.resetDataWithResponse(options)).data;\n }\n\n /** Reset a user's remaining data; include response metadata. */\n async resetDataWithResponse(\n options: UsersResetDataOptions,\n ): Promise<ApiResponse<UsersResetDataResponse>> {\n return this.#client._callWithResponse<UsersResetDataResponse>(\n {\n operationId: \"users_data_reset_create\",\n method: \"POST\",\n path: \"/users/{id}/data/reset\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** List a sub-user's orders */\n async listOrders(options: UsersListOrdersOptions): Promise<UsersListOrdersResponse> {\n return (await this.listOrdersWithResponse(options)).data;\n }\n\n /** List a sub-user's orders; include response metadata. */\n async listOrdersWithResponse(\n options: UsersListOrdersOptions,\n ): Promise<ApiResponse<UsersListOrdersResponse>> {\n return this.#client._callWithResponse<UsersListOrdersResponse>(\n {\n operationId: \"users_orders_list\",\n method: \"GET\",\n path: \"/users/{id}/orders\",\n },\n {\n path: {\n id: options.idPath,\n },\n query: {\n email: options.email,\n id: options.idQuery,\n limit: options.limit,\n offset: options.offset,\n ordering: options.ordering,\n username: options.username,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Rotate a sub-user proxy password */\n async resetPassword(options: UsersResetPasswordOptions): Promise<UsersResetPasswordResponse> {\n return (await this.resetPasswordWithResponse(options)).data;\n }\n\n /** Rotate a sub-user proxy password; include response metadata. */\n async resetPasswordWithResponse(\n options: UsersResetPasswordOptions,\n ): Promise<ApiResponse<UsersResetPasswordResponse>> {\n return this.#client._callWithResponse<UsersResetPasswordResponse>(\n {\n operationId: \"users_password_create\",\n method: \"POST\",\n path: \"/users/{id}/password\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface WebhooksListOptions {\n limit?: OperationParameter<operations[\"webhooks_list\"], \"query\", \"limit\">;\n offset?: OperationParameter<operations[\"webhooks_list\"], \"query\", \"offset\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type WebhooksListResponse = OperationResult<operations[\"webhooks_list\"]>;\n\nexport interface WebhooksCreateOptions {\n idempotencyKey?: OperationParameter<operations[\"webhooks_create\"], \"header\", \"Idempotency-Key\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_create\"], \"header\", \"Accept-Language\">;\n body: OperationBody<operations[\"webhooks_create\"]>;\n request?: RequestControls;\n}\n\nexport type WebhooksCreateResponse = OperationResult<operations[\"webhooks_create\"]>;\n\nexport interface WebhooksGetOptions {\n id: OperationParameter<operations[\"webhooks_retrieve\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_retrieve\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type WebhooksGetResponse = OperationResult<operations[\"webhooks_retrieve\"]>;\n\nexport interface WebhooksDeleteOptions {\n id: OperationParameter<operations[\"webhooks_destroy\"], \"path\", \"id\">;\n idempotencyKey?: OperationParameter<operations[\"webhooks_destroy\"], \"header\", \"Idempotency-Key\">;\n ifMatch?: OperationParameter<operations[\"webhooks_destroy\"], \"header\", \"If-Match\">;\n acceptLanguage?: OperationParameter<operations[\"webhooks_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type WebhooksDeleteResponse = OperationResult<operations[\"webhooks_destroy\"]>;\n\nexport class WebhooksResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List customer webhooks */\n async list(options: WebhooksListOptions = {}): Promise<WebhooksListResponse> {\n return (await this.listWithResponse(options)).data;\n }\n\n /** List customer webhooks; include response metadata. */\n async listWithResponse(\n options: WebhooksListOptions = {},\n ): Promise<ApiResponse<WebhooksListResponse>> {\n return this.#client._callWithResponse<WebhooksListResponse>(\n {\n operationId: \"webhooks_list\",\n method: \"GET\",\n path: \"/webhooks\",\n },\n {\n query: {\n limit: options.limit,\n offset: options.offset,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a customer webhook */\n async create(options: WebhooksCreateOptions): Promise<WebhooksCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a customer webhook; include response metadata. */\n async createWithResponse(\n options: WebhooksCreateOptions,\n ): Promise<ApiResponse<WebhooksCreateResponse>> {\n return this.#client._callWithResponse<WebhooksCreateResponse>(\n {\n operationId: \"webhooks_create\",\n method: \"POST\",\n path: \"/webhooks\",\n idempotent: true,\n },\n {\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Get a customer webhook */\n async get(options: WebhooksGetOptions): Promise<WebhooksGetResponse> {\n return (await this.getWithResponse(options)).data;\n }\n\n /** Get a customer webhook; include response metadata. */\n async getWithResponse(options: WebhooksGetOptions): Promise<ApiResponse<WebhooksGetResponse>> {\n return this.#client._callWithResponse<WebhooksGetResponse>(\n {\n operationId: \"webhooks_retrieve\",\n method: \"GET\",\n path: \"/webhooks/{id}\",\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Delete a customer webhook */\n async delete(options: WebhooksDeleteOptions): Promise<WebhooksDeleteResponse> {\n return (await this.deleteWithResponse(options)).data;\n }\n\n /** Delete a customer webhook; include response metadata. */\n async deleteWithResponse(\n options: WebhooksDeleteOptions,\n ): Promise<ApiResponse<WebhooksDeleteResponse>> {\n return this.#client._callWithResponse<WebhooksDeleteResponse>(\n {\n operationId: \"webhooks_destroy\",\n method: \"DELETE\",\n path: \"/webhooks/{id}\",\n idempotent: true,\n },\n {\n path: {\n id: options.id,\n },\n headers: {\n \"Idempotency-Key\": options.idempotencyKey,\n \"If-Match\": options.ifMatch,\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n}\n\nexport interface ResourceCollection {\n readonly apiKeys: APIKeysResource;\n readonly affiliates: AffiliatesResource;\n readonly analytics: AnalyticsResource;\n readonly authorization: AuthorizationResource;\n readonly coupons: CouponsResource;\n readonly invoices: InvoicesResource;\n readonly locations: LocationsResource;\n readonly news: NewsResource;\n readonly orders: OrdersResource;\n readonly packages: PackagesResource;\n readonly profile: ProfileResource;\n readonly proxies: ProxiesResource;\n readonly rewards: RewardsResource;\n readonly settings: SettingsResource;\n readonly telegram: TelegramDashboardResource;\n readonly users: UsersResource;\n readonly webhooks: WebhooksResource;\n}\n\nexport function createResourceCollection(client: ResourceClient): ResourceCollection {\n return {\n apiKeys: new APIKeysResource(client),\n affiliates: new AffiliatesResource(client),\n analytics: new AnalyticsResource(client),\n authorization: new AuthorizationResource(client),\n coupons: new CouponsResource(client),\n invoices: new InvoicesResource(client),\n locations: new LocationsResource(client),\n news: new NewsResource(client),\n orders: new OrdersResource(client),\n packages: new PackagesResource(client),\n profile: new ProfileResource(client),\n proxies: new ProxiesResource(client),\n rewards: new RewardsResource(client),\n settings: new SettingsResource(client),\n telegram: new TelegramDashboardResource(client),\n users: new UsersResource(client),\n webhooks: new WebhooksResource(client),\n };\n}\n","import { PaginationError } from \"./errors.js\";\n\nexport interface PageParameters {\n limit: number;\n offset: number;\n}\n\nexport interface PaginatedPage<Item> {\n count?: number;\n next?: string | null;\n previous?: string | null;\n results: Item[];\n}\n\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n maxPages?: number;\n}\n\nexport async function* paginate<Item>(\n pageFetcher: (parameters: PageParameters) => Promise<PaginatedPage<Item>>,\n options: PaginationOptions = {},\n): AsyncGenerator<Item, void, undefined> {\n const limit = options.limit ?? 100;\n let offset = options.offset ?? 0;\n const maxPages = options.maxPages ?? 10_000;\n if (limit <= 0 || offset < 0 || maxPages <= 0) {\n throw new RangeError(\"limit and maxPages must be positive; offset must not be negative.\");\n }\n\n const visited = new Set<string>();\n for (let pageNumber = 0; pageNumber < maxPages; pageNumber += 1) {\n const page = await pageFetcher({ limit, offset });\n if (!Array.isArray(page.results)) {\n throw new PaginationError(\"A page object must expose an array in results.\");\n }\n yield* page.results;\n if (page.next === null || page.next === undefined) return;\n if (visited.has(page.next)) {\n throw new PaginationError(\"Pagination stopped because the API returned a repeated next URL.\");\n }\n visited.add(page.next);\n const nextOffset = offsetFromUrl(page.next);\n offset = nextOffset ?? offset + page.results.length;\n if (page.results.length === 0 && nextOffset === undefined) {\n throw new PaginationError(\"Pagination cannot advance from an empty page.\");\n }\n }\n throw new PaginationError(\"Pagination stopped after the configured maximum number of pages.\");\n}\n\nfunction offsetFromUrl(url: string): number | undefined {\n try {\n const value = new URL(url, \"https://api.proxyrequest.com\").searchParams.get(\"offset\");\n if (value === null) return undefined;\n const offset = Number(value);\n return Number.isInteger(offset) && offset >= 0 ? offset : undefined;\n } catch {\n return undefined;\n }\n}\n","import createClient, { type Middleware, type Client as OpenApiClient } from \"openapi-fetch\";\nimport { parseFeedResponse } from \"./analytics.js\";\nimport { ApiError } from \"./errors.js\";\nimport { FileDownload } from \"./files.js\";\nimport { createResourceCollection, type ResourceCollection } from \"./generated/resources.js\";\nimport type { paths } from \"./generated/schema.js\";\nimport type {\n ApiResponse,\n OperationCallData,\n OperationCallSpec,\n RequestControls,\n ResourceClient,\n} from \"./internal.js\";\nimport {\n type PageParameters,\n type PaginatedPage,\n type PaginationOptions,\n paginate,\n} from \"./pagination.js\";\n\nexport const DEFAULT_BASE_URL = \"https://api.proxyrequest.com/api/v1\";\nexport const SDK_VERSION = \"4.0.0\";\n\nexport interface ClientCommonOptions {\n baseUrl?: string;\n language?: string;\n timeoutMs?: number;\n fetch?: typeof globalThis.fetch;\n headers?: HeadersInit;\n /** Automatically protect supported mutations with an Idempotency-Key. */\n idempotency?: boolean;\n}\n\nexport type ClientOptions = ClientCommonOptions &\n (\n | { apiKey: string; bearerToken?: never }\n | { bearerToken: string; apiKey?: never }\n | { apiKey?: undefined; bearerToken?: undefined }\n );\n\nexport interface RawRequestOptions extends RequestControls {\n query?: Record<string, unknown>;\n body?: unknown;\n}\n\nexport class ProxyRequestClient implements ResourceClient, ResourceCollection {\n readonly apiKeys: ResourceCollection[\"apiKeys\"];\n readonly affiliates: ResourceCollection[\"affiliates\"];\n readonly analytics: ResourceCollection[\"analytics\"];\n readonly authorization: ResourceCollection[\"authorization\"];\n readonly coupons: ResourceCollection[\"coupons\"];\n readonly invoices: ResourceCollection[\"invoices\"];\n readonly locations: ResourceCollection[\"locations\"];\n readonly news: ResourceCollection[\"news\"];\n readonly orders: ResourceCollection[\"orders\"];\n readonly packages: ResourceCollection[\"packages\"];\n readonly profile: ResourceCollection[\"profile\"];\n readonly proxies: ResourceCollection[\"proxies\"];\n readonly rewards: ResourceCollection[\"rewards\"];\n readonly settings: ResourceCollection[\"settings\"];\n readonly telegram: ResourceCollection[\"telegram\"];\n readonly users: ResourceCollection[\"users\"];\n readonly webhooks: ResourceCollection[\"webhooks\"];\n\n readonly baseUrl: string;\n readonly language: string;\n readonly timeoutMs: number;\n readonly idempotency: boolean;\n readonly #fetch: typeof globalThis.fetch;\n readonly #headers: Headers;\n readonly #openapi: OpenApiClient<paths, `${string}/${string}`>;\n\n constructor(options: ClientOptions = {}) {\n this.baseUrl = normalizeBaseUrl(options.baseUrl ?? DEFAULT_BASE_URL);\n this.language = options.language ?? \"en\";\n this.timeoutMs = options.timeoutMs ?? 15_000;\n this.idempotency = options.idempotency ?? true;\n if (!Number.isFinite(this.timeoutMs) || this.timeoutMs < 0) {\n throw new RangeError(\"timeoutMs must be a non-negative finite number.\");\n }\n this.#fetch = options.fetch ?? globalThis.fetch;\n if (typeof this.#fetch !== \"function\") {\n throw new TypeError(\"A Fetch API implementation is required.\");\n }\n this.#headers = new Headers(options.headers);\n this.#headers.set(\"Accept-Language\", this.language);\n if (options.apiKey !== undefined)\n this.#headers.set(\"Authorization\", `Static ${options.apiKey}`);\n if (options.bearerToken !== undefined) {\n this.#headers.set(\"Authorization\", `Bearer ${options.bearerToken}`);\n }\n\n this.#openapi = createClient<paths>({\n baseUrl: this.baseUrl,\n fetch: this.#fetch,\n headers: this.#headers,\n });\n const errorMiddleware: Middleware = {\n async onResponse({ response }) {\n if (!response.ok) throw await ApiError.fromResponse(response);\n return undefined;\n },\n onError({ error }) {\n return error instanceof ApiError ? error : ApiError.network(error);\n },\n };\n this.#openapi.use(errorMiddleware);\n\n const resources = createResourceCollection(this);\n this.apiKeys = resources.apiKeys;\n this.affiliates = resources.affiliates;\n this.analytics = resources.analytics;\n this.authorization = resources.authorization;\n this.coupons = resources.coupons;\n this.invoices = resources.invoices;\n this.locations = resources.locations;\n this.news = resources.news;\n this.orders = resources.orders;\n this.packages = resources.packages;\n this.profile = resources.profile;\n this.proxies = resources.proxies;\n this.rewards = resources.rewards;\n this.settings = resources.settings;\n this.telegram = resources.telegram;\n this.users = resources.users;\n this.webhooks = resources.webhooks;\n }\n\n static withApiKey(apiKey: string, options: ClientCommonOptions = {}): ProxyRequestClient {\n return new ProxyRequestClient({ ...options, apiKey });\n }\n\n static withBearerToken(\n bearerToken: string,\n options: ClientCommonOptions = {},\n ): ProxyRequestClient {\n return new ProxyRequestClient({ ...options, bearerToken });\n }\n\n static anonymous(options: ClientCommonOptions = {}): ProxyRequestClient {\n return new ProxyRequestClient(options);\n }\n\n async _call<Result>(spec: OperationCallSpec, data: OperationCallData = {}): Promise<Result> {\n return (await this._callWithResponse<Result>(spec, data)).data;\n }\n\n async _callWithResponse<Result>(\n spec: OperationCallSpec,\n data: OperationCallData = {},\n ): Promise<ApiResponse<Result>> {\n const controls = data.request ?? {};\n const controlHeaders = new Headers(controls.headers);\n const parameterKey = stringHeader(data.headers?.[\"Idempotency-Key\"]);\n const controlKey = controlHeaders.get(\"Idempotency-Key\") ?? undefined;\n const idempotencyKey = spec.idempotent\n ? (parameterKey ?? controlKey ?? (this.idempotency ? newIdempotencyKey() : undefined))\n : undefined;\n if (spec.idempotent) controlHeaders.delete(\"Idempotency-Key\");\n const operationHeaders = {\n ...data.headers,\n ...(idempotencyKey === undefined ? {} : { \"Idempotency-Key\": idempotencyKey }),\n };\n const method = this.#openapi[spec.method] as (\n path: string,\n options: unknown,\n ) => Promise<{ data?: unknown; error?: unknown; response: Response }>;\n\n for (let attempt = 0; attempt < 3; attempt += 1) {\n const timeout = requestSignal(controls.signal, controls.timeoutMs ?? this.timeoutMs);\n try {\n const result = await method(spec.path, {\n params: {\n ...(data.path === undefined ? {} : { path: data.path }),\n ...(data.query === undefined ? {} : { query: data.query }),\n ...(Object.keys(operationHeaders).length === 0 ? {} : { header: operationHeaders }),\n },\n ...(data.body === undefined ? {} : { body: data.body }),\n ...([...controlHeaders].length === 0 ? {} : { headers: controlHeaders }),\n signal: timeout.signal,\n ...(spec.binary\n ? { parseAs: \"arrayBuffer\" as const }\n : spec.operationId === \"analytics_feed_retrieve\"\n ? { parseAs: \"text\" as const }\n : {}),\n });\n if (result.error !== undefined) {\n throw ApiError.unexpected(\n `ProxyRequest returned an undocumented error for ${spec.operationId}.`,\n result.error,\n );\n }\n const dataValue = spec.binary\n ? binaryResult<Result>(spec, result.data, result.response.headers)\n : spec.operationId === \"analytics_feed_retrieve\"\n ? (parseFeedResponse(result.data as string) as Result)\n : (result.data as Result);\n const headers = headersToRecord(result.response.headers);\n const etag = headers.etag;\n return {\n data: dataValue,\n statusCode: result.response.status,\n headers,\n ...(etag === undefined ? {} : { etag }),\n idempotencyReplayed: headers[\"idempotency-replayed\"]?.toLowerCase() === \"true\",\n };\n } catch (error) {\n const apiError = (\n error instanceof ApiError\n ? error\n : ApiError.unexpected(\n `Unable to process the ProxyRequest response for ${spec.operationId}.`,\n error,\n )\n ).withIdempotencyKey(idempotencyKey);\n const delay = retryDelay(apiError, attempt);\n if (\n attempt >= 2 ||\n idempotencyKey === undefined ||\n controls.signal?.aborted ||\n delay === undefined\n ) {\n throw apiError;\n }\n await wait(delay, controls.signal);\n } finally {\n timeout.cleanup();\n }\n }\n throw ApiError.unexpected(`Unable to complete ${spec.operationId}.`);\n }\n\n async request(method: string, path: string, options: RawRequestOptions = {}): Promise<Response> {\n const url = new URL(path.replace(/^\\//u, \"\"), `${this.baseUrl}/`);\n appendQuery(url.searchParams, options.query);\n const headers = new Headers(this.#headers);\n new Headers(options.headers).forEach((value, key) => {\n headers.set(key, value);\n });\n let body: BodyInit | undefined;\n if (options.body !== undefined) {\n if (isBodyInit(options.body)) {\n body = options.body;\n } else {\n headers.set(\"Content-Type\", \"application/json\");\n body = JSON.stringify(options.body);\n }\n }\n const timeout = requestSignal(options.signal, options.timeoutMs ?? this.timeoutMs);\n try {\n const response = await this.#fetch(url, {\n method: method.toUpperCase(),\n headers,\n ...(body === undefined ? {} : { body }),\n signal: timeout.signal,\n });\n if (!response.ok) throw await ApiError.fromResponse(response);\n return response;\n } catch (error) {\n if (error instanceof ApiError) throw error;\n throw ApiError.network(error);\n } finally {\n timeout.cleanup();\n }\n }\n\n paginate<Item>(\n pageFetcher: (parameters: PageParameters) => Promise<PaginatedPage<Item>>,\n options: PaginationOptions = {},\n ): AsyncGenerator<Item, void, undefined> {\n return paginate(pageFetcher, options);\n }\n\n downloadInvoicePdf(id: string, request?: RequestControls): Promise<FileDownload> {\n return this.invoices.downloadPdf({ id, ...(request === undefined ? {} : { request }) });\n }\n}\n\nexport { ProxyRequestClient as Client };\n\nfunction normalizeBaseUrl(value: string): string {\n const url = new URL(value);\n if (url.protocol !== \"https:\" && url.protocol !== \"http:\") {\n throw new TypeError(\"baseUrl must use http or https.\");\n }\n return url.toString().replace(/\\/$/u, \"\");\n}\n\nfunction requestSignal(\n input: AbortSignal | undefined,\n timeoutMs: number,\n): { signal: AbortSignal; cleanup: () => void } {\n if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {\n throw new RangeError(\"timeoutMs must be a non-negative finite number.\");\n }\n const controller = new AbortController();\n const abortFromInput = (): void => controller.abort(input?.reason);\n if (input?.aborted) abortFromInput();\n else input?.addEventListener(\"abort\", abortFromInput, { once: true });\n const timer =\n timeoutMs === 0\n ? undefined\n : setTimeout(\n () => controller.abort(new DOMException(\"Request timed out.\", \"TimeoutError\")),\n timeoutMs,\n );\n return {\n signal: controller.signal,\n cleanup: () => {\n if (timer !== undefined) clearTimeout(timer);\n input?.removeEventListener(\"abort\", abortFromInput);\n },\n };\n}\n\nfunction appendQuery(search: URLSearchParams, query: Record<string, unknown> | undefined): void {\n if (query === undefined) return;\n for (const [key, value] of Object.entries(query)) {\n if (value === undefined || value === null) continue;\n if (Array.isArray(value)) {\n for (const item of value) search.append(key, String(item));\n } else {\n search.set(key, String(value));\n }\n }\n}\n\nfunction isBodyInit(value: unknown): value is BodyInit {\n return (\n typeof value === \"string\" ||\n value instanceof Blob ||\n value instanceof ArrayBuffer ||\n ArrayBuffer.isView(value) ||\n value instanceof FormData ||\n value instanceof URLSearchParams ||\n value instanceof ReadableStream\n );\n}\n\nfunction stringHeader(value: unknown): string | undefined {\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction newIdempotencyKey(): string {\n if (typeof globalThis.crypto?.randomUUID !== \"function\") {\n throw new Error(\"crypto.randomUUID() is required for automatic idempotency keys.\");\n }\n return globalThis.crypto.randomUUID();\n}\n\nfunction binaryResult<Result>(spec: OperationCallSpec, data: unknown, headers: Headers): Result {\n if (!(data instanceof ArrayBuffer)) {\n throw ApiError.unexpected(`ProxyRequest returned an invalid file for ${spec.operationId}.`);\n }\n return FileDownload.fromResponse(data, headers) as Result;\n}\n\nfunction headersToRecord(headers: Headers): Readonly<Record<string, string>> {\n return Object.freeze(Object.fromEntries(headers.entries()));\n}\n\nfunction retryDelay(error: ApiError, attempt: number): number | undefined {\n if (error.kind === \"network\") return attempt === 0 ? 100 : 200;\n if (\n error.statusCode === 409 &&\n error.retryAfter !== undefined &&\n error.retryAfter >= 0 &&\n error.retryAfter <= 5\n ) {\n return error.retryAfter * 1_000;\n }\n return undefined;\n}\n\nfunction wait(milliseconds: number, signal: AbortSignal | undefined): Promise<void> {\n if (signal?.aborted) return Promise.reject(ApiError.network(signal.reason));\n return new Promise((resolvePromise, reject) => {\n const timer = setTimeout(() => {\n signal?.removeEventListener(\"abort\", abort);\n resolvePromise();\n }, milliseconds);\n const abort = () => {\n clearTimeout(timer);\n reject(ApiError.network(signal?.reason));\n };\n signal?.addEventListener(\"abort\", abort, { once: true });\n });\n}\n","import { InvalidSignatureError } from \"./errors.js\";\n\nconst encoder = new TextEncoder();\n\nexport class WebhookVerifier {\n /** Verify X-Signature against the exact raw request body. */\n static async verify(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n ): Promise<boolean> {\n if (!signature || !secret) return false;\n const candidate = parseBase64Signature(signature);\n if (candidate === undefined) return false;\n\n try {\n const key = await globalThis.crypto.subtle.importKey(\n \"raw\",\n encoder.encode(secret),\n { name: \"HMAC\", hash: \"SHA-256\" },\n false,\n [\"verify\"],\n );\n return globalThis.crypto.subtle.verify(\n \"HMAC\",\n key,\n candidate.slice().buffer,\n bodyBytes(rawBody).slice().buffer,\n );\n } catch {\n return false;\n }\n }\n\n static async verifyOrThrow(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n ): Promise<void> {\n if (!(await WebhookVerifier.verify(rawBody, signature, secret))) {\n throw new InvalidSignatureError(\"The ProxyRequest webhook signature is invalid.\");\n }\n }\n\n static async decodeVerifiedJson<Payload = Record<string, unknown>>(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n ): Promise<Payload> {\n await WebhookVerifier.verifyOrThrow(rawBody, signature, secret);\n const text =\n typeof rawBody === \"string\" ? rawBody : new TextDecoder().decode(bodyBytes(rawBody));\n try {\n const payload: unknown = JSON.parse(text);\n if (typeof payload !== \"object\" || payload === null || Array.isArray(payload)) {\n throw new TypeError(\"The verified webhook payload must be a JSON object.\");\n }\n return payload as Payload;\n } catch (error) {\n if (error instanceof TypeError) throw error;\n throw new TypeError(\"The verified webhook body is not valid JSON.\", { cause: error });\n }\n }\n}\n\nfunction bodyBytes(value: string | Uint8Array | ArrayBuffer): Uint8Array {\n if (typeof value === \"string\") return encoder.encode(value);\n return value instanceof Uint8Array ? value : new Uint8Array(value);\n}\n\nfunction parseBase64Signature(signature: string): Uint8Array | undefined {\n if (!/^[A-Za-z0-9+/]{43}=$/u.test(signature)) return undefined;\n const decoded = atob(signature);\n if (decoded.length !== 32 || btoa(decoded) !== signature) return undefined;\n return Uint8Array.from(decoded, (character) => character.charCodeAt(0));\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;AAAA,MAAM,gBAAgB;AACtB,MAAM,+BAA+B;CACnC,OAAO,OAAO,YAAY,YAAY,OAAO,SAAS,SAAS,UAAU,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,MAAM,QAAQ,SAAS;AAC5H;AACA,SAAS,WAAW;CAClB,OAAO,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,GAAG,EAAE;AAC/C;AACA,SAAS,aAAa,eAAe;CACnC,IAAI,EACF,UAAU,IACV,SAAS,gBAAgB,WAAW,SACpC,OAAO,YAAY,WAAW,OAC9B,iBAAiB,uBACjB,gBAAgB,sBAChB,gBAAgB,sBAChB,SAAS,aACT,iBAAiB,KAAK,GACtB,GAAG,gBACD,EAAE,GAAG,cAAc;CACvB,iBAAiB,uBAAuB,IAAI,iBAAiB,KAAK;CAClE,UAAU,oBAAoB,OAAO;CACrC,MAAM,oBAAoB,CAAC;CAC3B,eAAe,UAAU,YAAY,cAAc;EACjD,MAAM,EACJ,SAAS,cACT,QAAQ,WACR,UAAU,eACV,SACA,SAAS,CAAC,GACV,UAAU,QACV,iBAAiB,wBACjB,iBAAiB,wBAAwB,uBACzC,gBAAgB,uBAChB,MACA,YAAY,qBAAqB,CAAC,GAClC,GAAG,SACD,gBAAgB,CAAC;EACrB,IAAI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