@proxyrequest/sdk 1.0.0 → 2.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","#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 | \"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 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 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.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 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 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\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 === 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 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 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 this.#client._call<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 this.#client._call<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 this.#client._call<APIKeysDeleteResponse>(\n {\n operationId: \"api_keys_destroy\",\n method: \"DELETE\",\n path: \"/api-keys/{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\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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 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 this.#client._call<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 this.#client._call<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 /** Send a password recovery email */\n async recoverPassword(\n options: AuthorizationRecoverPasswordOptions,\n ): Promise<AuthorizationRecoverPasswordResponse> {\n return this.#client._call<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 this.#client._call<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 this.#client._call<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 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 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 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 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 this.#client._call<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 this.#client._call<CouponsCreateResponse>(\n {\n operationId: \"coupons_create\",\n method: \"POST\",\n path: \"/coupons\",\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 /** Get a coupon */\n async get(options: CouponsGetOptions): Promise<CouponsGetResponse> {\n return this.#client._call<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 this.#client._call<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 \"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 this.#client._call<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 \"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 this.#client._call<CouponsDeleteResponse>(\n {\n operationId: \"coupons_destroy\",\n method: \"DELETE\",\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 /** List coupon redemptions */\n async listRedeems(options: CouponsListRedeemsOptions): Promise<CouponsListRedeemsResponse> {\n return this.#client._call<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 this.#client._call<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 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 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 this.#client._call<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 this.#client._call<InvoicesCreateResponse>(\n {\n operationId: \"invoices_create\",\n method: \"POST\",\n path: \"/invoices\",\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 /** Get an invoice */\n async get(options: InvoicesGetOptions): Promise<InvoicesGetResponse> {\n return this.#client._call<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 this.#client._call<InvoicesDeleteResponse>(\n {\n operationId: \"invoices_destroy\",\n method: \"DELETE\",\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 /** Download an invoice PDF */\n async downloadPdf(options: InvoicesDownloadPdfOptions): Promise<InvoicesDownloadPdfResponse> {\n return this.#client._call<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 this.#client._call<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 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 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 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 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 this.#client._call<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 this.#client._call<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 this.#client._call<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 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 this.#client._call<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 this.#client._call<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 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 this.#client._call<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 this.#client._call<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 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 this.#client._call<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(\n options: LocationsListRegionsOptions = {},\n ): Promise<LocationsListRegionsResponse> {\n return this.#client._call<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 this.#client._call<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 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 this.#client._call<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 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 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 this.#client._call<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 this.#client._call<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 this.#client._call<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 \"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 this.#client._call<OrdersDeleteResponse>(\n {\n operationId: \"orders_destroy\",\n method: \"DELETE\",\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 /** Reset an order's proxy password */\n async resetPassword(options: OrdersResetPasswordOptions): Promise<OrdersResetPasswordResponse> {\n return this.#client._call<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 this.#client._call<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 this.#client._call<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 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 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 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 this.#client._call<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 this.#client._call<ProfileUpdateResponse>(\n {\n operationId: \"profile_partial_update\",\n method: \"PATCH\",\n path: \"/profile\",\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 /** Delete the current account */\n async delete(options: ProfileDeleteOptions = {}): Promise<ProfileDeleteResponse> {\n return this.#client._call<ProfileDeleteResponse>(\n {\n operationId: \"profile_destroy\",\n method: \"DELETE\",\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 /** Confirm two-factor setup */\n async confirmTwoFactor(\n options: ProfileConfirmTwoFactorOptions,\n ): Promise<ProfileConfirmTwoFactorResponse> {\n return this.#client._call<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 this.#client._call<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 /** Start two-factor setup */\n async setupTwoFactor(\n options: ProfileSetupTwoFactorOptions = {},\n ): Promise<ProfileSetupTwoFactorResponse> {\n return this.#client._call<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.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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 SessionsListOptions {\n acceptLanguage?: OperationParameter<operations[\"sessions_list\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type SessionsListResponse = OperationResult<operations[\"sessions_list\"]>;\n\nexport interface SessionsDeleteOptions {\n id: OperationParameter<operations[\"sessions_destroy\"], \"path\", \"id\">;\n acceptLanguage?: OperationParameter<operations[\"sessions_destroy\"], \"header\", \"Accept-Language\">;\n request?: RequestControls;\n}\n\nexport type SessionsDeleteResponse = OperationResult<operations[\"sessions_destroy\"]>;\n\nexport class SessionsResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** List active proxy sessions */\n async list(options: SessionsListOptions = {}): Promise<SessionsListResponse> {\n return this.#client._call<SessionsListResponse>(\n {\n operationId: \"sessions_list\",\n method: \"GET\",\n path: \"/sessions\",\n },\n {\n headers: {\n \"Accept-Language\": options.acceptLanguage,\n },\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Revoke a proxy session */\n async delete(options: SessionsDeleteOptions): Promise<SessionsDeleteResponse> {\n return this.#client._call<SessionsDeleteResponse>(\n {\n operationId: \"sessions_destroy\",\n method: \"DELETE\",\n path: \"/sessions/{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\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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 this.#client._call<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 TelegramServiceConsumeLinkOptions {\n serviceSecret: OperationParameter<\n operations[\"integrations_telegram_link_consume_create\"],\n \"header\",\n \"X-ProxyRequest-Telegram-Secret\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_link_consume_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"integrations_telegram_link_consume_create\"]>;\n request?: RequestControls;\n}\n\nexport type TelegramServiceConsumeLinkResponse = OperationResult<\n operations[\"integrations_telegram_link_consume_create\"]\n>;\n\nexport interface TelegramServiceCreateSessionOptions {\n serviceSecret: OperationParameter<\n operations[\"integrations_telegram_session_create\"],\n \"header\",\n \"X-ProxyRequest-Telegram-Secret\"\n >;\n acceptLanguage?: OperationParameter<\n operations[\"integrations_telegram_session_create\"],\n \"header\",\n \"Accept-Language\"\n >;\n body: OperationBody<operations[\"integrations_telegram_session_create\"]>;\n request?: RequestControls;\n}\n\nexport type TelegramServiceCreateSessionResponse = OperationResult<\n operations[\"integrations_telegram_session_create\"]\n>;\n\nexport class TelegramServiceResource {\n readonly #client: ResourceClient;\n\n constructor(client: ResourceClient) {\n this.#client = client;\n }\n\n /** Consume a Telegram account link */\n async consumeLink(\n options: TelegramServiceConsumeLinkOptions,\n ): Promise<TelegramServiceConsumeLinkResponse> {\n return this.#client._call<TelegramServiceConsumeLinkResponse>(\n {\n operationId: \"integrations_telegram_link_consume_create\",\n method: \"POST\",\n path: \"/integrations/telegram/link/consume\",\n },\n {\n headers: {\n \"X-ProxyRequest-Telegram-Secret\": options.serviceSecret,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\n ...(options.request === undefined ? {} : { request: options.request }),\n },\n );\n }\n\n /** Create a Telegram API session */\n async createSession(\n options: TelegramServiceCreateSessionOptions,\n ): Promise<TelegramServiceCreateSessionResponse> {\n return this.#client._call<TelegramServiceCreateSessionResponse>(\n {\n operationId: \"integrations_telegram_session_create\",\n method: \"POST\",\n path: \"/integrations/telegram/session\",\n },\n {\n headers: {\n \"X-ProxyRequest-Telegram-Secret\": options.serviceSecret,\n \"Accept-Language\": options.acceptLanguage,\n },\n body: options.body,\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 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 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 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 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 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 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 this.#client._call<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 sub-user */\n async create(options: UsersCreateOptions): Promise<UsersCreateResponse> {\n return this.#client._call<UsersCreateResponse>(\n {\n operationId: \"users_create\",\n method: \"POST\",\n path: \"/users\",\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 /** Get a user */\n async get(options: UsersGetOptions): Promise<UsersGetResponse> {\n return this.#client._call<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 this.#client._call<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 \"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 this.#client._call<UsersDeleteResponse>(\n {\n operationId: \"users_destroy\",\n method: \"DELETE\",\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 /** Add data to a sub-user order */\n async addData(options: UsersAddDataOptions): Promise<UsersAddDataResponse> {\n return this.#client._call<UsersAddDataResponse>(\n {\n operationId: \"users_data_add_create\",\n method: \"POST\",\n path: \"/users/{id}/data/add\",\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 /** Subtract data from a sub-user order */\n async subtractData(options: UsersSubtractDataOptions): Promise<UsersSubtractDataResponse> {\n return this.#client._call<UsersSubtractDataResponse>(\n {\n operationId: \"users_data_subtract_create\",\n method: \"POST\",\n path: \"/users/{id}/data/subtract\",\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 /** List a sub-user's orders */\n async listOrders(options: UsersListOrdersOptions): Promise<UsersListOrdersResponse> {\n return this.#client._call<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 this.#client._call<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 ...(options.body === undefined ? {} : { 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 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 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 this.#client._call<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 this.#client._call<WebhooksCreateResponse>(\n {\n operationId: \"webhooks_create\",\n method: \"POST\",\n path: \"/webhooks\",\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 /** Get a customer webhook */\n async get(options: WebhooksGetOptions): Promise<WebhooksGetResponse> {\n return this.#client._call<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 this.#client._call<WebhooksDeleteResponse>(\n {\n operationId: \"webhooks_destroy\",\n method: \"DELETE\",\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\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 sessions: SessionsResource;\n readonly settings: SettingsResource;\n readonly telegram: TelegramDashboardResource;\n readonly telegramService: TelegramServiceResource;\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 sessions: new SessionsResource(client),\n settings: new SettingsResource(client),\n telegram: new TelegramDashboardResource(client),\n telegramService: new TelegramServiceResource(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 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 = \"1.0.0\";\n\nexport interface ClientCommonOptions {\n baseUrl?: string;\n language?: string;\n timeoutMs?: number;\n fetch?: typeof globalThis.fetch;\n headers?: HeadersInit;\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 sessions: ResourceCollection[\"sessions\"];\n readonly settings: ResourceCollection[\"settings\"];\n readonly telegram: ResourceCollection[\"telegram\"];\n readonly telegramService: ResourceCollection[\"telegramService\"];\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 #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 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.sessions = resources.sessions;\n this.settings = resources.settings;\n this.telegram = resources.telegram;\n this.telegramService = resources.telegramService;\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 const controls = data.request ?? {};\n const timeout = requestSignal(controls.signal, controls.timeoutMs ?? this.timeoutMs);\n const options = {\n params: {\n ...(data.path === undefined ? {} : { path: data.path }),\n ...(data.query === undefined ? {} : { query: data.query }),\n ...(data.headers === undefined ? {} : { header: data.headers }),\n },\n ...(data.body === undefined ? {} : { body: data.body }),\n ...(controls.headers === undefined ? {} : { headers: controls.headers }),\n signal: timeout.signal,\n ...(spec.binary ? { parseAs: \"arrayBuffer\" as const } : {}),\n };\n\n try {\n const method = this.#openapi[spec.method] as (\n path: string,\n options: unknown,\n ) => Promise<{ data?: unknown; error?: unknown; response: Response }>;\n const result = await method(spec.path, options);\n if (result.error !== undefined) {\n throw ApiError.unexpected(\n `ProxyRequest returned an undocumented error for ${spec.operationId}.`,\n result.error,\n );\n }\n if (spec.binary) {\n if (!(result.data instanceof ArrayBuffer)) {\n throw ApiError.unexpected(\n `ProxyRequest returned an invalid file for ${spec.operationId}.`,\n );\n }\n return FileDownload.fromResponse(result.data, result.response.headers) as Result;\n }\n return result.data as Result;\n } catch (error) {\n if (error instanceof ApiError) throw error;\n throw ApiError.unexpected(\n `Unable to process the ProxyRequest response for ${spec.operationId}.`,\n error,\n );\n } finally {\n timeout.cleanup();\n }\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","import { InvalidSignatureError } from \"./errors.js\";\n\nconst encoder = new TextEncoder();\n\nexport interface WebhookVerificationOptions {\n timestampHeader?: string;\n tolerance?: number | null;\n now?: number;\n}\n\nexport class WebhookVerifier {\n static async verify(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n options: WebhookVerificationOptions = {},\n ): Promise<boolean> {\n const tolerance = options.tolerance === undefined ? 300 : options.tolerance;\n if (!signature || !secret || (tolerance !== null && tolerance < 0)) return false;\n const parsed = parseSignature(signature);\n if (parsed === undefined) return false;\n if (options.timestampHeader !== undefined) {\n const timestampHeader = options.timestampHeader.trim();\n if (!/^\\d+$/u.test(timestampHeader) || Number(timestampHeader) !== parsed.timestamp) {\n return false;\n }\n }\n const now = options.now ?? Math.floor(Date.now() / 1000);\n if (tolerance !== null && Math.abs(now - parsed.timestamp) > tolerance) return false;\n\n const body = bodyBytes(rawBody);\n const payload = concatBytes(encoder.encode(`${parsed.timestamp}.`), body);\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 [\"sign\"],\n );\n const expected = new Uint8Array(\n await globalThis.crypto.subtle.sign(\"HMAC\", key, payload.slice().buffer),\n );\n return parsed.signatures.some((candidate) => constantTimeHexEqual(expected, candidate));\n } catch {\n return false;\n }\n }\n\n static async verifyOrThrow(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n options: WebhookVerificationOptions = {},\n ): Promise<void> {\n if (!(await WebhookVerifier.verify(rawBody, signature, secret, options))) {\n throw new InvalidSignatureError(\"The ProxyRequest webhook signature is invalid or expired.\");\n }\n }\n\n static async decodeVerifiedJson<Payload = Record<string, unknown>>(\n rawBody: string | Uint8Array | ArrayBuffer,\n signature: string,\n secret: string,\n options: WebhookVerificationOptions = {},\n ): Promise<Payload> {\n await WebhookVerifier.verifyOrThrow(rawBody, signature, secret, options);\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 parseSignature(\n signature: string,\n): { timestamp: number; signatures: string[] } | undefined {\n let timestamp: number | undefined;\n const signatures: string[] = [];\n for (const part of signature.split(\",\")) {\n const [key, value] = part.trim().split(\"=\", 2);\n if (key === \"t\" && value !== undefined && /^\\d+$/u.test(value)) timestamp = Number(value);\n if (key === \"v1\" && value !== undefined && /^[a-f\\d]{64}$/iu.test(value)) {\n signatures.push(value.toLowerCase());\n }\n }\n if (timestamp === undefined || !Number.isSafeInteger(timestamp) || signatures.length === 0) {\n return undefined;\n }\n return { timestamp, signatures };\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 concatBytes(left: Uint8Array, right: Uint8Array): Uint8Array {\n const result = new Uint8Array(left.byteLength + right.byteLength);\n result.set(left, 0);\n result.set(right, left.byteLength);\n return result;\n}\n\nfunction constantTimeHexEqual(expected: Uint8Array, candidate: string): boolean {\n if (!/^[a-f\\d]+$/iu.test(candidate) || candidate.length !== expected.byteLength * 2) return false;\n let difference = 0;\n for (let index = 0; index < expected.byteLength; index += 1) {\n const byte = Number.parseInt(candidate.slice(index * 2, index * 2 + 2), 16);\n difference |= (expected[index] ?? 0) ^ byte;\n }\n return difference === 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAMA,YAAU,IAAI,YAAY;AAahC,IAAa,oBAAb,cAAuC,MAAM;CAC3C,AAAkB,OAAe;AACnC;AAeA,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,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;EAC1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AAU,WAAW,SAAS,aAAa,GAAG,OAAO;CAC5F,IAAI,aAAa;CACjB,KAAK,IAAI,QAAQ,GAAG,QAAQ,SAAS,YAAY,SAAS,GAAG;EAC3D,MAAM,OAAO,OAAO,SAAS,UAAU,MAAM,QAAQ,GAAG,QAAQ,IAAI,CAAC,GAAG,EAAE;EAC1E,eAAe,SAAS,UAAU,KAAK;CACzC;CACA,OAAO,eAAe;AACxB"}
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 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 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 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 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 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 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 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(\n options: LocationsListRegionsOptions = {},\n ): 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 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 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 sub-user */\n async create(options: UsersCreateOptions): Promise<UsersCreateResponse> {\n return (await this.createWithResponse(options)).data;\n }\n\n /** Create a sub-user; 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 /** 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 ...(options.body === undefined ? {} : { 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 = \"1.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 ? { 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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