framepayments 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/index.cjs +81 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -14
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +40 -14
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +81 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["AxiosHeaders","G"],"sources":["../src/errors/frame_api_error.ts","../src/client.ts","../src/utils/paginator.ts","../src/api/accounts-api.ts","../src/api/capabilities-api.ts","../src/api/onboarding_sessions-api.ts","../src/api/customers-api.ts","../src/api/payment_methods-api.ts","../src/api/charge_intents-api.ts","../src/api/refunds-api.ts","../src/api/subscriptions-api.ts","../src/api/customer_identity-api.ts","../src/api/subscription_phases-api.ts","../src/api/invoices-api.ts","../src/api/invoice_line_item-api.ts","../src/api/disputes-api.ts","../src/api/products-api.ts","../src/api/charges-api.ts","../src/api/charge_sessions-api.ts","../src/api/sonar_sessions-api.ts","../src/api/phone_verifications-api.ts","../src/api/geofences-api.ts","../src/api/webhook_endpoints-api.ts","../src/api/payouts-api.ts","../src/api/transfers-api.ts","../src/api/transfer_fee_plans-api.ts","../src/api/transfer_billing_agreements-api.ts","../src/api/coupons-api.ts","../src/api/promotion_codes-api.ts","../src/api/discounts-api.ts","../src/api/payment_link_sessions-api.ts","../src/api/subscription_change_logs-api.ts","../src/api/billing-api.ts","../src/api/three_ds-api.ts","../src/api/product_phases-api.ts","../src/api/terms_of_service-api.ts","../src/api/onboarding-api.ts","../src/api/configuration-api.ts","../src/api/device_attestation-api.ts","../src/api/wallet-api.ts","../src/api/geo_compliance-api.ts","../src/index.ts"],"sourcesContent":["export class FrameAPIError extends Error {\n public code: string;\n public status: number;\n public raw: any;\n\n constructor(message: string, code: string, status: number, raw: any) {\n super(message);\n this.name = 'FrameAPIError';\n this.code = code;\n this.status = status;\n this.raw = raw;\n }\n}","import axios, { AxiosHeaders } from 'axios';\nimport type { AxiosInstance, AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';\nimport { FrameAPIError } from './errors/frame_api_error';\n\nexport interface ClientConfig {\n apiKey?: string;\n publishableKey?: string;\n // Override the API base URL. Defaults to https://api.framepayments.com.\n // Useful for pointing local development at a self-hosted Frame OS instance\n // (e.g. http://api.framepayments.test via puma-dev).\n baseURL?: string;\n // Headers to attach to every request from this client. Used by the React\n // Native SDK to forward the device IP via `ip_address` on each call (matches\n // the native Frame iOS / Frame Android behavior). The request interceptor\n // applies these *before* setting Authorization, so callers cannot use this\n // hook to override key routing.\n defaultHeaders?: Record<string, string>;\n}\n\nexport interface RequestOptions {\n usePublishableKey?: boolean;\n}\n\nconst PUBLISHABLE_FLAG_KEY = 'X-Frame-Use-Publishable-Key';\n\n// Strips the Authorization header before stashing axios's error config on\n// FrameAPIError.raw — without this, every network-layer failure would leak\n// the live Bearer token to anyone logging the error.\nfunction safeRawFromAxiosError(err: any): unknown {\n if (!err || typeof err !== 'object') return err;\n const cleanedConfig = err.config\n ? (() => {\n const { headers, ...restConfig } = err.config as { headers?: unknown } & Record<string, unknown>;\n const cleanedHeaders =\n headers && typeof headers === 'object'\n ? Object.fromEntries(\n Object.entries(headers as Record<string, unknown>).filter(\n ([k]) => k.toLowerCase() !== 'authorization' && k !== PUBLISHABLE_FLAG_KEY,\n ),\n )\n : headers;\n return { ...restConfig, headers: cleanedHeaders };\n })()\n : undefined;\n return {\n message: err.message,\n code: err.code,\n name: err.name,\n config: cleanedConfig,\n };\n}\n\nexport const createApiClient = (config: ClientConfig): AxiosInstance => {\n const { apiKey, publishableKey, defaultHeaders } = config;\n\n if (!apiKey && !publishableKey) {\n throw new Error(\n 'FrameSDK config requires at least one of: apiKey, publishableKey. ' +\n 'Mobile clients should ship publishableKey only; server code should use apiKey.',\n );\n }\n\n const baseURL = config.baseURL ?? 'https://api.framepayments.com';\n\n const client = axios.create({\n baseURL,\n headers: { 'Content-Type': 'application/json' },\n });\n\n client.interceptors.request.use((requestConfig: InternalAxiosRequestConfig) => {\n const headers = requestConfig.headers;\n const wantsPublishable = headers instanceof AxiosHeaders\n ? headers.has(PUBLISHABLE_FLAG_KEY)\n : Boolean((headers as Record<string, unknown> | undefined)?.[PUBLISHABLE_FLAG_KEY]);\n\n if (headers instanceof AxiosHeaders) {\n headers.delete(PUBLISHABLE_FLAG_KEY);\n } else if (headers && PUBLISHABLE_FLAG_KEY in (headers as Record<string, unknown>)) {\n delete (headers as Record<string, unknown>)[PUBLISHABLE_FLAG_KEY];\n }\n\n if (defaultHeaders) {\n for (const [name, value] of Object.entries(defaultHeaders)) {\n if (value == null) continue;\n if (headers instanceof AxiosHeaders) {\n if (!headers.has(name)) headers.set(name, value);\n } else if (headers) {\n const h = headers as Record<string, string>;\n if (h[name] === undefined) h[name] = value;\n }\n }\n }\n\n const keyToUse = wantsPublishable ? publishableKey : apiKey;\n if (!keyToUse) {\n throw new FrameAPIError(\n wantsPublishable\n ? 'Frame publishable key is not configured. Pass { publishableKey } to new FrameSDK(...) before calling endpoints with { usePublishableKey: true }.'\n : 'Frame API key is not configured. Pass { apiKey } to new FrameSDK(...) before calling secret-keyed endpoints.',\n wantsPublishable ? 'missing_publishable_key' : 'missing_api_key',\n 0,\n null,\n );\n }\n if (headers instanceof AxiosHeaders) {\n headers.set('Authorization', `Bearer ${keyToUse}`);\n } else if (headers) {\n (headers as Record<string, string>)['Authorization'] = `Bearer ${keyToUse}`;\n }\n return requestConfig;\n });\n\n client.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error instanceof FrameAPIError) {\n throw error;\n }\n if (error.response) {\n const { status, data } = error.response;\n const code = data?.code || 'unknown_error';\n const message = data?.message || 'An error occurred';\n throw new FrameAPIError(message, code, status, data);\n }\n throw new FrameAPIError(error.message, 'network_error', 0, safeRawFromAxiosError(error));\n },\n );\n\n return client;\n};\n\nexport function withPublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig {\n const { usePublishableKey = true, headers, ...rest } = opts ?? {};\n if (!usePublishableKey) {\n return headers ? { ...rest, headers } : { ...rest };\n }\n return {\n ...rest,\n headers: { ...(headers ?? {}), [PUBLISHABLE_FLAG_KEY]: '1' },\n };\n}\n\nexport function maybePublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig {\n const { usePublishableKey = false, headers, ...rest } = opts ?? {};\n if (!usePublishableKey) {\n return headers ? { ...rest, headers } : { ...rest };\n }\n return {\n ...rest,\n headers: { ...(headers ?? {}), [PUBLISHABLE_FLAG_KEY]: '1' },\n };\n}\n","export async function* paginate<T>(\n fetchPage: (page: number) => Promise<{ data: T[]; meta?: { has_more?: boolean } }>,\n pageSize = 20\n): AsyncGenerator<T> {\n let page = 1;\n let hasMore = true;\n\n while (hasMore) {\n const { data, meta } = await fetchPage(page);\n for (const item of data) {\n yield item;\n }\n\n hasMore = meta?.has_more ?? false;\n page += 1;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Account,\n AccountListResponse,\n ListAccountsParams,\n CreateAccountParams,\n UpdateAccountParams,\n SearchAccountsParams,\n PlaidLinkTokenResponse\n} from '../types/accounts';\nimport type { GeoComplianceStatus } from '../types/geo_compliance';\nimport type { PaymentMethodListResponse } from '../types/payment_methods';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class AccountsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(params?: ListAccountsParams): Promise<AccountListResponse> {\n const resp = await this.client.get('/v1/accounts', { params: params ?? {} });\n return resp.data;\n }\n\n async create(params: CreateAccountParams, opts?: RequestOptions): Promise<Account> {\n const resp = await this.client.post('/v1/accounts', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async get(id: string, opts?: RequestOptions): Promise<Account> {\n const resp = await this.client.get(`/v1/accounts/${id}`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async update(id: string, params: UpdateAccountParams, opts?: RequestOptions): Promise<Account> {\n const resp = await this.client.patch(`/v1/accounts/${id}`, params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async disable(id: string): Promise<Account> {\n const resp = await this.client.delete(`/v1/accounts/${id}`);\n return resp.data;\n }\n\n async search(params: SearchAccountsParams): Promise<AccountListResponse> {\n const resp = await this.client.get('/v1/accounts/search', { params });\n return resp.data;\n }\n\n // Returns the `{ meta?, data? }` envelope produced by\n // `GET /v1/accounts/{id}/payment_methods`. Matches Frame-iOS\n // `PaymentMethodResponses.ListPaymentMethodsResponse`. Callers that just\n // need the array should read `result.data ?? []`.\n async getPaymentMethods(id: string, opts?: RequestOptions): Promise<PaymentMethodListResponse> {\n const resp = await this.client.get(`/v1/accounts/${id}/payment_methods`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async restrict(id: string): Promise<Account> {\n const resp = await this.client.post(`/v1/accounts/${id}/restrict`);\n return resp.data;\n }\n\n async unrestrict(id: string): Promise<Account> {\n const resp = await this.client.post(`/v1/accounts/${id}/unrestrict`);\n return resp.data;\n }\n\n async getPlaidLinkToken(id: string, opts?: RequestOptions): Promise<PlaidLinkTokenResponse> {\n const resp = await this.client.get(`/v1/accounts/${id}/plaid_link_token`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async getGeoCompliance(accountId: string): Promise<GeoComplianceStatus> {\n const resp = await this.client.get(`/v1/accounts/${accountId}/geo_compliance`);\n return resp.data;\n }\n\n iterateAllAccounts(per_page = 20): AsyncGenerator<Account> {\n return paginate<Account>(async (page: number) => {\n const res = await this.client.get('/v1/accounts', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Capability, RequestCapabilitiesParams } from '../types/capabilities';\n\nexport class CapabilitiesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(accountId: string): Promise<Capability[]> {\n const resp = await this.client.get(`/v1/accounts/${accountId}/capabilities`);\n return resp.data;\n }\n\n async request(accountId: string, params: RequestCapabilitiesParams): Promise<Capability[]> {\n const resp = await this.client.post(`/v1/accounts/${accountId}/capabilities`, params);\n return resp.data;\n }\n\n async get(accountId: string, name: string): Promise<Capability> {\n const resp = await this.client.get(`/v1/accounts/${accountId}/capabilities/${name}`);\n return resp.data;\n }\n\n async disable(accountId: string, name: string): Promise<Capability> {\n const resp = await this.client.delete(`/v1/accounts/${accountId}/capabilities/${name}`);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { OnboardingSession, CreateOnboardingSessionParams } from '../types/onboarding_sessions';\n\nexport class OnboardingSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateOnboardingSessionParams): Promise<OnboardingSession> {\n const resp = await this.client.post('/v1/onboarding_sessions', params);\n return resp.data;\n }\n\n async getByAccount(accountId: string): Promise<OnboardingSession> {\n const resp = await this.client.get('/v1/onboarding_sessions', {\n params: { account_id: accountId }\n });\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport { paginate } from '../utils/paginator';\nimport type {\n Customer,\n CustomerListResponse,\n CreateCustomerParams,\n UpdateCustomerParams,\n DeleteResponse,\n SearchCustomerParams\n} from '../types/customers';\nimport type { PaymentMethod } from '../types/payment_methods';\n\nexport class CustomersAPI {\n constructor(private client: AxiosInstance) {}\n\n // Create\n async create(params: CreateCustomerParams): Promise<Customer> {\n const resp = await this.client.post('/v1/customers', params);\n return resp.data;\n }\n\n // Update\n async update(id: string, params: UpdateCustomerParams): Promise<Customer> {\n const resp = await this.client.patch(`/v1/customers/${id}`, params);\n return resp.data;\n }\n\n // Retrieve\n async get(id: string): Promise<Customer> {\n const resp = await this.client.get(`/v1/customers/${id}`);\n return resp.data;\n }\n\n // List, with pagination\n async list(per_page?: number, page?: number): Promise<CustomerListResponse> {\n const resp = await this.client.get('/v1/customers', {\n params: { per_page, page }\n });\n return resp.data;\n }\n\n async iterateAllCustomers(per_page = 20) {\n return paginate<Customer>(async (page: number) => {\n const res = await this.client.get('/v1/customers', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n // Delete\n async delete(id: string): Promise<DeleteResponse> {\n const resp = await this.client.delete(`/v1/customers/${id}`);\n return resp.data;\n }\n\n // Search\n async search(params: SearchCustomerParams): Promise<CustomerListResponse> {\n const resp = await this.client.get('/v1/customers/search', { params: params });\n return resp.data;\n }\n\n // Block\n async block(id: string): Promise<Customer> {\n const resp = await this.client.post(`/v1/customers/${id}/block`);\n return resp.data;\n }\n\n // Unblock\n async unblock(id: string): Promise<Customer> {\n const resp = await this.client.post(`/v1/customers/${id}/unblock`);\n return resp.data;\n }\n\n async getPaymentMethods(id: string): Promise<PaymentMethod[]> {\n const resp = await this.client.get(`/v1/customers/${id}/payment_methods`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n PaymentMethod,\n PaymentMethodListResponse,\n CreateCardPaymentMethodParams,\n CreateACHPaymentMethodParams,\n UpdatePaymentMethodParams,\n ConnectPlaidParams,\n CreateApplePayPaymentMethodParams,\n CreateGooglePayPaymentMethodParams\n} from '../types/payment_methods';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class PaymentMethodsAPI {\n constructor(private client: AxiosInstance) {}\n\n async createCard(params: CreateCardPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod> {\n const resp = await this.client.post('/v1/payment_methods', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async createACH(params: CreateACHPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod> {\n const resp = await this.client.post('/v1/payment_methods', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async createApplePayPaymentMethod(\n params: CreateApplePayPaymentMethodParams,\n opts?: RequestOptions,\n ): Promise<PaymentMethod> {\n const resp = await this.client.post(\n '/v1/payment_methods',\n params,\n maybePublishableKey({ usePublishableKey: true, ...opts }),\n );\n return resp.data;\n }\n\n async createGooglePayPaymentMethod(\n params: CreateGooglePayPaymentMethodParams,\n opts?: RequestOptions,\n ): Promise<PaymentMethod> {\n const resp = await this.client.post(\n '/v1/payment_methods',\n params,\n maybePublishableKey({ usePublishableKey: true, ...opts }),\n );\n return resp.data;\n }\n\n async get(id: string): Promise<PaymentMethod> {\n const resp = await this.client.get(`/v1/payment_methods/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<PaymentMethodListResponse> {\n const resp = await this.client.get('/v1/payment_methods', { params: { per_page, page } });\n return resp.data;\n }\n\n iterateAllPaymentMethods(per_page = 20): AsyncGenerator<PaymentMethod> {\n return paginate<PaymentMethod>(async (page: number) => {\n const res = await this.client.get('/v1/payment_methods', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async listForCustomer(customerId: string, per_page?: number, page?: number): Promise<PaymentMethodListResponse> {\n const resp = await this.client.get(`/v1/customers/${customerId}/payment_methods`, {\n params: { per_page, page }\n });\n return resp.data;\n }\n\n async update(id: string, params: UpdatePaymentMethodParams): Promise<PaymentMethod> {\n const resp = await this.client.patch(`/v1/payment_methods/${id}`, params);\n return resp.data;\n }\n\n async attach(id: string, customerId: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/attach`, { customer: customerId });\n return resp.data;\n }\n\n async detach(id: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/detach`);\n return resp.data;\n }\n\n async block(id: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/block`);\n return resp.data;\n }\n\n async unblock(id: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/unblock`);\n return resp.data;\n }\n\n async connectPlaid(params: ConnectPlaidParams, opts?: RequestOptions): Promise<PaymentMethod> {\n const resp = await this.client.post('/v1/payment_methods/connect_plaid', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async connectPlaidBankAccount(params: ConnectPlaidParams, opts?: RequestOptions): Promise<PaymentMethod> {\n return this.connectPlaid(params, opts);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n ChargeIntent,\n ChargeIntentListResponse,\n CaptureChargeIntentParams,\n CreateChargeIntentParams,\n UpdateChargeIntentParams\n} from '../types/charge_intents';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class ChargeIntentsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateChargeIntentParams, opts?: RequestOptions): Promise<ChargeIntent> {\n const resp = await this.client.post('/v1/charge_intents', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async update(id: string, params: UpdateChargeIntentParams): Promise<ChargeIntent> {\n const resp = await this.client.patch(`/v1/charge_intents/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<ChargeIntent> {\n const resp = await this.client.get(`/v1/charge_intents/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<ChargeIntentListResponse> {\n const resp = await this.client.get('/v1/charge_intents', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllChargeIntents(per_page = 20) {\n return paginate<ChargeIntent>(async (page: number) => {\n const res = await this.client.get('/v1/charge_intents', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async cancel(id: string): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/cancel`);\n return resp.data;\n }\n\n async confirm(id: string, opts?: RequestOptions): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/confirm`, undefined, maybePublishableKey(opts));\n return resp.data;\n }\n\n async capture(id: string, params?: CaptureChargeIntentParams): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/capture`, params);\n return resp.data;\n }\n\n async voidRemaining(id: string): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/void_remaining`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type { Refund, RefundListResponse, CreateRefundParams } from '../types/refunds';\nimport { paginate } from '../utils/paginator';\n\nexport class RefundsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateRefundParams): Promise<Refund> {\n const resp = await this.client.post('/v1/refunds', params);\n return resp.data;\n }\n\n async get(id: string): Promise<Refund> {\n const resp = await this.client.get(`/v1/refunds/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<RefundListResponse> {\n const resp = await this.client.get('/v1/refunds', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllRefunds(per_page = 20) {\n return paginate<Refund>(async (page: number) => {\n const res = await this.client.get('/v1/refunds', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Subscription,\n SubscriptionListResponse,\n CreateSubscriptionParams,\n UpdateSubscriptionParams,\n SearchSubscriptionParams\n} from '../types/subscriptions';\nimport { paginate } from '../utils/paginator';\n\nexport class SubscriptionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateSubscriptionParams): Promise<Subscription> {\n const resp = await this.client.post('/v1/subscriptions', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateSubscriptionParams): Promise<Subscription> {\n const resp = await this.client.patch(`/v1/subscriptions/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Subscription> {\n const resp = await this.client.get(`/v1/subscriptions/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<SubscriptionListResponse> {\n const resp = await this.client.get('/v1/subscriptions', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllSubscriptions(per_page = 20) {\n return paginate<Subscription>(async (page: number) => {\n const res = await this.client.get('/v1/subscriptions', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async search(query: SearchSubscriptionParams): Promise<SubscriptionListResponse> {\n const resp = await this.client.get('/v1/subscriptions/search', { params: query });\n return resp.data;\n }\n\n async cancel(id: string): Promise<Subscription> {\n const resp = await this.client.post(`/v1/subscriptions/${id}/cancel`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n CustomerIdentityVerification,\n CreateCustomerIdentityVerificationParams,\n UploadDocumentsParams,\n IdentityDocumentUpload,\n ReactNativeFileDescriptor,\n} from '../types/customer_identity';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class CustomerIdentityVerificationsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(\n params: CreateCustomerIdentityVerificationParams,\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post('/v1/customer_identity_verifications', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async createForCustomer(\n customerId: string,\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post(\n `/v1/customers/${customerId}/identity_verifications`,\n undefined,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async get(id: string, opts?: RequestOptions): Promise<CustomerIdentityVerification> {\n const resp = await this.client.get(`/v1/customer_identity_verifications/${id}`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async submitForVerification(id: string, opts?: RequestOptions): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post(\n `/v1/customer_identity_verifications/${id}/submit`,\n undefined,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async uploadDocuments(\n id: string,\n params: UploadDocumentsParams,\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post(\n `/v1/customer_identity_verifications/${id}/upload_documents`,\n params,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async uploadIdentityDocuments(\n id: string,\n documents: IdentityDocumentUpload[],\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n if (documents.length === 0) {\n throw new Error('uploadIdentityDocuments: documents array must not be empty');\n }\n\n const form = makeFormData();\n for (const doc of documents) {\n appendFile(form, doc);\n }\n\n const baseOpts = opts ?? {};\n const callerHeaders = (baseOpts as { headers?: Record<string, string> }).headers ?? {};\n return this.client\n .post(\n `/v1/customer_identity_verifications/${id}/upload_documents`,\n form,\n maybePublishableKey({\n ...baseOpts,\n headers: { ...callerHeaders, 'Content-Type': 'multipart/form-data' },\n }),\n )\n .then((resp) => resp.data);\n }\n}\n\ninterface FormDataLike {\n append(name: string, value: unknown, options?: { filename?: string; contentType?: string }): void;\n}\n\nfunction isReactNative(): boolean {\n const G: unknown = globalThis;\n if (typeof G !== 'object' || G === null) return false;\n const nav = (G as { navigator?: { product?: unknown } }).navigator;\n return typeof nav?.product === 'string' && nav.product === 'ReactNative';\n}\n\n// Pick FormData by runtime, not by whether `require('form-data')` succeeds:\n// form-data is a transitive dep of axios so the require succeeds on RN too,\n// but it doesn't accept RN's { uri, type, name } file shape.\nfunction makeFormData(): FormDataLike {\n if (isReactNative()) {\n const G: unknown = globalThis;\n const Ctor = (G as { FormData?: new () => FormDataLike }).FormData;\n if (typeof Ctor !== 'function') {\n throw new Error(\n 'React Native runtime detected but globalThis.FormData is missing. Polyfill required.',\n );\n }\n return new Ctor();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const FormDataCtor = require('form-data');\n return new FormDataCtor() as FormDataLike;\n}\n\nfunction isReactNativeFileDescriptor(file: unknown): file is ReactNativeFileDescriptor {\n return (\n typeof file === 'object' &&\n file !== null &&\n typeof (file as { uri?: unknown }).uri === 'string'\n );\n}\n\nfunction appendFile(form: FormDataLike, doc: IdentityDocumentUpload): void {\n const fieldName = doc.field_name ?? doc.document_type;\n const file = doc.file;\n\n if (isReactNativeFileDescriptor(file)) {\n form.append(fieldName, file);\n return;\n }\n\n const fileOptions: { filename?: string; contentType?: string } = {};\n if (doc.file_name !== undefined) fileOptions.filename = doc.file_name;\n if (doc.content_type !== undefined) fileOptions.contentType = doc.content_type;\n form.append(fieldName, file, fileOptions);\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n SubscriptionPhase,\n SubscriptionPhaseListResponse,\n CreateSubscriptionPhaseParams,\n UpdateSubscriptionPhaseParams\n} from '../types/subscription_phases';\nimport { paginate } from '../utils/paginator';\n\nexport class SubscriptionPhasesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(subscriptionId: string): Promise<SubscriptionPhaseListResponse> {\n const resp = await this.client.get(`/v1/subscriptions/${subscriptionId}/phases`);\n return resp.data;\n }\n\n async iterateAllSubscriptionPhases(subscriptionId: string, per_page = 20) {\n return paginate<SubscriptionPhase>(async (page: number) => {\n const res = await this.client.get(`/v1/subscriptions/${subscriptionId}/phases`, {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async get(subscriptionId: string, phaseId: string): Promise<SubscriptionPhase> {\n const resp = await this.client.get(`/v1/subscriptions/${subscriptionId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async create(subscriptionId: string, params: CreateSubscriptionPhaseParams): Promise<SubscriptionPhase> {\n const resp = await this.client.post(`/v1/subscriptions/${subscriptionId}/phases`, params);\n return resp.data;\n }\n\n async update(subscriptionId: string, phaseId: string, params: UpdateSubscriptionPhaseParams): Promise<SubscriptionPhase> {\n const resp = await this.client.patch(`/v1/subscriptions/${subscriptionId}/phases/${phaseId}`, params);\n return resp.data;\n }\n\n async delete(subscriptionId: string, phaseId: string): Promise<{ id: string; object: string; deleted: boolean }> {\n const resp = await this.client.delete(`/v1/subscriptions/${subscriptionId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async bulkUpdate(subscriptionId: string, phases: Array<{ id: string; [key: string]: any }>): Promise<SubscriptionPhaseListResponse> {\n const resp = await this.client.patch(`/v1/subscriptions/${subscriptionId}/phases/bulk_update`, { phases });\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Invoice,\n InvoiceListResponse,\n CreateInvoiceParams,\n UpdateInvoiceParams,\n DeleteInvoiceResponse\n} from '../types/invoices';\n\nexport class InvoicesAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateInvoiceParams): Promise<Invoice> {\n const resp = await this.client.post('/v1/invoices', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateInvoiceParams): Promise<Invoice> {\n const resp = await this.client.patch(`/v1/invoices/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Invoice> {\n const resp = await this.client.get(`/v1/invoices/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number, customer?: string, status?: string): Promise<InvoiceListResponse> {\n const resp = await this.client.get('/v1/invoices', {\n params: { per_page, page, customer, status }\n });\n return resp.data;\n }\n\n async delete(id: string): Promise<DeleteInvoiceResponse> {\n const resp = await this.client.delete(`/v1/invoices/${id}`);\n return resp.data;\n }\n\n async issue(id: string): Promise<Invoice> {\n const resp = await this.client.post(`/v1/invoices/${id}/issue`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n InvoiceLineItem,\n InvoiceLineItemListResponse,\n CreateInvoiceLineItemParams,\n UpdateInvoiceLineItemParams\n} from '../types/invoice_line_items';\nimport type { \n DeleteInvoiceResponse \n} from '../types/invoices';\n\nexport class InvoiceLineItemsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(invoiceId: string): Promise<InvoiceLineItemListResponse> {\n const resp = await this.client.get(`/v1/invoices/${invoiceId}/line_items`);\n return resp.data;\n }\n\n async create(invoiceId: string, params: CreateInvoiceLineItemParams): Promise<InvoiceLineItem> {\n const resp = await this.client.post(`/v1/invoices/${invoiceId}/line_items`, params);\n return resp.data;\n }\n\n async update(invoiceId: string, lineItemId: string, params: UpdateInvoiceLineItemParams): Promise<InvoiceLineItem> {\n const resp = await this.client.patch(`/v1/invoices/${invoiceId}/line_items/${lineItemId}`, params);\n return resp.data;\n }\n\n async get(invoiceId: string, lineItemId: string): Promise<InvoiceLineItem> {\n const resp = await this.client.get(`/v1/invoices/${invoiceId}/line_items/${lineItemId}`);\n return resp.data;\n }\n\n async delete(invoiceId: string, lineItemId: string): Promise<DeleteInvoiceResponse> {\n const resp = await this.client.delete(`/v1/invoices/${invoiceId}/line_items/${lineItemId}`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Dispute,\n DisputeListResponse,\n UpdateDisputeParams,\n CreateDisputeDocumentParams,\n DisputeDocument\n} from '../types/disputes';\n\nexport class DisputesAPI {\n constructor(private client: AxiosInstance) {}\n\n async update(id: string, params: UpdateDisputeParams): Promise<Dispute> {\n const resp = await this.client.patch(`/v1/disputes/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Dispute> {\n const resp = await this.client.get(`/v1/disputes/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number, charge?: string, charge_intent?: string): Promise<DisputeListResponse> {\n const resp = await this.client.get('/v1/disputes', { params: { per_page, page, charge, charge_intent } });\n return resp.data;\n }\n\n async createDocument(id: string, params: CreateDisputeDocumentParams): Promise<DisputeDocument> {\n const resp = await this.client.post(`/v1/disputes/${id}/documents`, params);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type { Product, ProductListResponse, CreateProductParams, UpdateProductParams, SearchProductParams, DeletedProduct } from '../types/products';\nimport { paginate } from '../utils/paginator';\n\nexport class ProductsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateProductParams): Promise<Product> {\n const resp = await this.client.post('/v1/products', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateProductParams): Promise<Product> {\n const resp = await this.client.patch(`/v1/products/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Product> {\n const resp = await this.client.get(`/v1/products/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<ProductListResponse> {\n const resp = await this.client.get('/v1/products', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllProducts(per_page = 20) {\n return paginate<Product>(async (page: number) => {\n const res = await this.client.get('/v1/products', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async search(params: SearchProductParams): Promise<ProductListResponse> {\n const resp = await this.client.get('/v1/products/search', { params });\n return resp.data;\n }\n\n async delete(id: string): Promise<DeletedProduct> {\n const resp = await this.client.delete(`/v1/products/${id}`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type { Charge, ChargeTrace } from '../types/charges';\n\nexport class ChargesAPI {\n constructor(private client: AxiosInstance) {}\n\n async get(id: string): Promise<Charge> {\n const resp = await this.client.get(`/v1/charges/${id}`);\n return resp.data;\n }\n\n async trace(id: string): Promise<ChargeTrace> {\n const resp = await this.client.get(`/v1/charges/${id}/trace`);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n ChargeSession,\n CreateChargeSessionParams,\n UpdateChargeSessionParams\n} from '../types/charge_sessions';\n\nexport class ChargeSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateChargeSessionParams): Promise<ChargeSession> {\n const resp = await this.client.post('/v1/charge_sessions', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateChargeSessionParams): Promise<ChargeSession> {\n const resp = await this.client.patch(`/v1/charge_sessions/${id}`, params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n SonarSession,\n CreateSonarSessionParams,\n UpdateSonarSessionParams\n} from '../types/sonar_sessions';\n\nexport class SonarSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateSonarSessionParams): Promise<SonarSession> {\n const resp = await this.client.post('/v1/sonar_sessions', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateSonarSessionParams): Promise<SonarSession> {\n const resp = await this.client.patch(`/v1/sonar_sessions/${id}`, params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n PhoneVerification,\n CreatePhoneVerificationParams,\n ConfirmPhoneVerificationParams\n} from '../types/phone_verifications';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class PhoneVerificationsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(\n accountId: string,\n params: CreatePhoneVerificationParams,\n opts?: RequestOptions,\n ): Promise<PhoneVerification> {\n const resp = await this.client.post(\n `/v1/accounts/${accountId}/phone_verifications`,\n params,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async confirm(\n accountId: string,\n id: string,\n params: ConfirmPhoneVerificationParams,\n opts?: RequestOptions,\n ): Promise<PhoneVerification> {\n const resp = await this.client.post(\n `/v1/accounts/${accountId}/phone_verifications/${id}/confirm`,\n params,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Geofence, GeofenceListResponse } from '../types/geofences';\nimport { paginate } from '../utils/paginator';\n\nexport class GeofencesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(params?: { per_page?: number; page?: number }): Promise<GeofenceListResponse> {\n const resp = await this.client.get('/v1/geofences', { params });\n return resp.data;\n }\n\n async iterateAllGeofences(per_page = 20) {\n return paginate<Geofence>(async (page: number) => {\n const res = await this.client.get('/v1/geofences', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { WebhookEndpoint, WebhookEndpointListResponse } from '../types/webhook_endpoints';\nimport { paginate } from '../utils/paginator';\n\nexport class WebhookEndpointsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<WebhookEndpointListResponse> {\n const resp = await this.client.get('/v1/webhook_endpoints', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllWebhookEndpoints(per_page = 20) {\n return paginate<WebhookEndpoint>(async (page: number) => {\n const res = await this.client.get('/v1/webhook_endpoints', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Payout, CreatePayoutParams } from '../types/payouts';\n\nexport class PayoutsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreatePayoutParams): Promise<Payout> {\n const resp = await this.client.post('/v1/payouts', params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Transfer, TransferListResponse, CreateTransferParams } from '../types/transfers';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class TransfersAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<TransferListResponse> {\n const resp = await this.client.get('/v1/transfers', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<Transfer> {\n const resp = await this.client.get(`/v1/transfers/${id}`);\n return resp.data;\n }\n\n async create(params: CreateTransferParams, opts?: RequestOptions): Promise<Transfer> {\n const resp = await this.client.post('/v1/transfers', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async iterateAllTransfers(per_page = 20) {\n return paginate<Transfer>(async (page: number) => {\n const res = await this.client.get('/v1/transfers', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n TransferFeePlan,\n TransferFeePlanListResponse,\n CreateTransferFeePlanParams\n} from '../types/transfer_fee_plans';\nimport { paginate } from '../utils/paginator';\n\nexport class TransferFeePlansAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<TransferFeePlanListResponse> {\n const resp = await this.client.get('/v1/transfer_fee_plans', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<TransferFeePlan> {\n const resp = await this.client.get(`/v1/transfer_fee_plans/${id}`);\n return resp.data;\n }\n\n async create(params: CreateTransferFeePlanParams): Promise<TransferFeePlan> {\n const resp = await this.client.post('/v1/transfer_fee_plans', params);\n return resp.data;\n }\n\n async iterateAllTransferFeePlans(per_page = 20) {\n return paginate<TransferFeePlan>(async (page: number) => {\n const res = await this.client.get('/v1/transfer_fee_plans', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n TransferBillingAgreement,\n TransferBillingAgreementListResponse,\n CreateTransferBillingAgreementParams,\n UpdateTransferBillingAgreementParams\n} from '../types/transfer_billing_agreements';\nimport { paginate } from '../utils/paginator';\n\nexport class TransferBillingAgreementsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<TransferBillingAgreementListResponse> {\n const resp = await this.client.get('/v1/transfer_billing_agreements', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<TransferBillingAgreement> {\n const resp = await this.client.get(`/v1/transfer_billing_agreements/${id}`);\n return resp.data;\n }\n\n async create(params: CreateTransferBillingAgreementParams): Promise<TransferBillingAgreement> {\n const resp = await this.client.post('/v1/transfer_billing_agreements', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateTransferBillingAgreementParams): Promise<TransferBillingAgreement> {\n const resp = await this.client.patch(`/v1/transfer_billing_agreements/${id}`, params);\n return resp.data;\n }\n\n async iterateAllTransferBillingAgreements(per_page = 20) {\n return paginate<TransferBillingAgreement>(async (page: number) => {\n const res = await this.client.get('/v1/transfer_billing_agreements', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n Coupon,\n CouponListResponse,\n CreateCouponParams,\n UpdateCouponParams\n} from '../types/coupons';\nimport { paginate } from '../utils/paginator';\n\nexport class CouponsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<CouponListResponse> {\n const resp = await this.client.get('/v1/coupons', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<Coupon> {\n const resp = await this.client.get(`/v1/coupons/${id}`);\n return resp.data;\n }\n\n async create(params: CreateCouponParams): Promise<Coupon> {\n const resp = await this.client.post('/v1/coupons', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateCouponParams): Promise<Coupon> {\n const resp = await this.client.patch(`/v1/coupons/${id}`, params);\n return resp.data;\n }\n\n async iterateAllCoupons(per_page = 20) {\n return paginate<Coupon>(async (page: number) => {\n const res = await this.client.get('/v1/coupons', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n PromotionCode,\n PromotionCodeListResponse,\n CreatePromotionCodeParams,\n UpdatePromotionCodeParams\n} from '../types/promotion_codes';\nimport { paginate } from '../utils/paginator';\n\nexport class PromotionCodesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<PromotionCodeListResponse> {\n const resp = await this.client.get('/v1/promotion_codes', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<PromotionCode> {\n const resp = await this.client.get(`/v1/promotion_codes/${id}`);\n return resp.data;\n }\n\n async create(params: CreatePromotionCodeParams): Promise<PromotionCode> {\n const resp = await this.client.post('/v1/promotion_codes', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdatePromotionCodeParams): Promise<PromotionCode> {\n const resp = await this.client.patch(`/v1/promotion_codes/${id}`, params);\n return resp.data;\n }\n\n async iterateAllPromotionCodes(per_page = 20) {\n return paginate<PromotionCode>(async (page: number) => {\n const res = await this.client.get('/v1/promotion_codes', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n Discount,\n DiscountListResponse,\n ValidateDiscountsParams\n} from '../types/discounts';\nimport { paginate } from '../utils/paginator';\n\nexport class DiscountsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<DiscountListResponse> {\n const resp = await this.client.get('/v1/discounts', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<Discount> {\n const resp = await this.client.get(`/v1/discounts/${id}`);\n return resp.data;\n }\n\n async validate(params: ValidateDiscountsParams): Promise<Discount[]> {\n const resp = await this.client.post('/v1/discounts/validate', params);\n return resp.data;\n }\n\n async iterateAllDiscounts(per_page = 20) {\n return paginate<Discount>(async (page: number) => {\n const res = await this.client.get('/v1/discounts', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n PaymentLinkSession,\n CreatePaymentLinkSessionParams\n} from '../types/payment_link_sessions';\n\nexport class PaymentLinkSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreatePaymentLinkSessionParams): Promise<PaymentLinkSession> {\n const resp = await this.client.post('/v1/payment_link_sessions', params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n SubscriptionChangeLog,\n SubscriptionChangeLogListResponse\n} from '../types/subscription_change_logs';\nimport { paginate } from '../utils/paginator';\n\nexport class SubscriptionChangeLogsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(subscriptionId: string, per_page?: number, page?: number): Promise<SubscriptionChangeLogListResponse> {\n const resp = await this.client.get(`/v1/subscriptions/${subscriptionId}/change_logs`, { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllSubscriptionChangeLogs(subscriptionId: string, per_page = 20) {\n return paginate<SubscriptionChangeLog>(async (page: number) => {\n const res = await this.client.get(`/v1/subscriptions/${subscriptionId}/change_logs`, { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n Metering,\n CreateMeteringParams,\n UpdateMeteringParams,\n MeteringEvent,\n CreateMeteringEventParams,\n UpdateMeteringEventParams,\n BillingInvoice,\n CreateBillingInvoiceParams,\n BillingCredit,\n CreateBillingCreditParams,\n BillingReport\n} from '../types/billing';\n\nexport class BillingAPI {\n constructor(private client: AxiosInstance) {}\n\n async createMetering(params: CreateMeteringParams): Promise<Metering> {\n const resp = await this.client.post('/v1/billing/metering', params);\n return resp.data;\n }\n\n async getMetering(id: string): Promise<Metering> {\n const resp = await this.client.get(`/v1/billing/metering/${id}`);\n return resp.data;\n }\n\n async updateMetering(id: string, params: UpdateMeteringParams): Promise<Metering> {\n const resp = await this.client.patch(`/v1/billing/metering/${id}`, params);\n return resp.data;\n }\n\n async createMeteringEvent(params: CreateMeteringEventParams): Promise<MeteringEvent> {\n const resp = await this.client.post('/v1/billing/metering_events', params);\n return resp.data;\n }\n\n async getMeteringEvent(id: string): Promise<MeteringEvent> {\n const resp = await this.client.get(`/v1/billing/metering_events/${id}`);\n return resp.data;\n }\n\n async updateMeteringEvent(id: string, params: UpdateMeteringEventParams): Promise<MeteringEvent> {\n const resp = await this.client.patch(`/v1/billing/metering_events/${id}`, params);\n return resp.data;\n }\n\n async createBillingInvoice(params: CreateBillingInvoiceParams): Promise<BillingInvoice> {\n const resp = await this.client.post('/v1/billing/billing_invoice', params);\n return resp.data;\n }\n\n async createBillingCredit(params: CreateBillingCreditParams): Promise<BillingCredit> {\n const resp = await this.client.post('/v1/billing/billing_credit', params);\n return resp.data;\n }\n\n async getBillingCredit(id: string): Promise<BillingCredit> {\n const resp = await this.client.get(`/v1/billing/billing_credit/${id}`);\n return resp.data;\n }\n\n async getCustomerReport(params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get('/v1/billing/report/customer', { params });\n return resp.data;\n }\n\n async getEventReport(eventName: string, params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get(`/v1/billing/report/event/${eventName}`, { params });\n return resp.data;\n }\n\n async getEventsReport(params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get('/v1/billing/report/events', { params });\n return resp.data;\n }\n\n async getSubscriptionReport(params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get('/v1/billing/report/subscription', { params });\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { ThreeDSIntent, CreateThreeDSIntentParams } from '../types/three_ds';\n\nexport class ThreeDSAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateThreeDSIntentParams): Promise<ThreeDSIntent> {\n const resp = await this.client.post('/v1/3ds/intents', params);\n return resp.data;\n }\n\n async get(id: string): Promise<ThreeDSIntent> {\n const resp = await this.client.get(`/v1/3ds/intents/${id}`);\n return resp.data;\n }\n\n async resend(id: string): Promise<ThreeDSIntent> {\n const resp = await this.client.post(`/v1/3ds/intents/${id}/resend`);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n ProductPhase,\n ProductPhaseListResponse,\n CreateProductPhaseParams,\n UpdateProductPhaseParams\n} from '../types/product_phases';\nimport { paginate } from '../utils/paginator';\n\nexport class ProductPhasesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(productId: string, per_page?: number, page?: number): Promise<ProductPhaseListResponse> {\n const resp = await this.client.get(`/v1/products/${productId}/phases`, { params: { per_page, page } });\n return resp.data;\n }\n\n async get(productId: string, phaseId: string): Promise<ProductPhase> {\n const resp = await this.client.get(`/v1/products/${productId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async create(productId: string, params: CreateProductPhaseParams): Promise<ProductPhase> {\n const resp = await this.client.post(`/v1/products/${productId}/phases`, params);\n return resp.data;\n }\n\n async update(productId: string, phaseId: string, params: UpdateProductPhaseParams): Promise<ProductPhase> {\n const resp = await this.client.patch(`/v1/products/${productId}/phases/${phaseId}`, params);\n return resp.data;\n }\n\n async delete(productId: string, phaseId: string): Promise<ProductPhase> {\n const resp = await this.client.delete(`/v1/products/${productId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async bulkUpdate(productId: string, phases: Array<{ id: string; [key: string]: unknown }>): Promise<ProductPhaseListResponse> {\n const resp = await this.client.patch(`/v1/products/${productId}/phases/bulk_update`, { phases });\n return resp.data;\n }\n\n async iterateAllProductPhases(productId: string, per_page = 20) {\n return paginate<ProductPhase>(async (page: number) => {\n const res = await this.client.get(`/v1/products/${productId}/phases`, { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { TermsOfServiceTokenResponse, UpdateTermsOfServiceParams } from '../types/terms_of_service';\n\nexport class TermsOfServiceAPI {\n constructor(private client: AxiosInstance) {}\n\n async createToken(): Promise<TermsOfServiceTokenResponse> {\n const resp = await this.client.post('/v1/terms_of_service', {});\n return resp.data;\n }\n\n async update(params: UpdateTermsOfServiceParams): Promise<TermsOfServiceTokenResponse> {\n const resp = await this.client.patch('/v1/terms_of_service', params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n OnboardingSession,\n OnboardingSessionListResponse,\n ListOnboardingSessionsParams,\n CreateOnboardingSessionParams,\n UpdateOnboardingSessionParams,\n OnboardingPayoutParams\n} from '../types/onboarding';\n\nexport class OnboardingAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(params?: ListOnboardingSessionsParams): Promise<OnboardingSessionListResponse> {\n const resp = await this.client.get('/v1/onboarding/sessions', { params });\n return resp.data;\n }\n\n async create(params: CreateOnboardingSessionParams): Promise<OnboardingSession> {\n const resp = await this.client.post('/v1/onboarding/sessions', params);\n return resp.data;\n }\n\n async get(sessionId: string): Promise<OnboardingSession> {\n const resp = await this.client.get(`/v1/onboarding/sessions/${sessionId}`);\n return resp.data;\n }\n\n async update(sessionId: string, params: UpdateOnboardingSessionParams): Promise<OnboardingSession> {\n const resp = await this.client.patch(`/v1/onboarding/sessions/${sessionId}`, params);\n return resp.data;\n }\n\n async payout(sessionId: string, params: OnboardingPayoutParams): Promise<OnboardingSession> {\n const resp = await this.client.post(`/v1/onboarding/sessions/${sessionId}/payout`, params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { EvervaultConfiguration, SiftConfiguration } from '../types/configuration';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class ConfigurationAPI {\n constructor(private client: AxiosInstance) {}\n\n async getEvervaultConfiguration(opts?: RequestOptions): Promise<EvervaultConfiguration> {\n const resp = await this.client.get('/v1/config/evervault', maybePublishableKey(opts));\n return resp.data;\n }\n\n async getSiftConfiguration(opts?: RequestOptions): Promise<SiftConfiguration> {\n const resp = await this.client.get('/v1/config/sift', maybePublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n AttestRequest,\n AttestResponse,\n ChallengeResponse,\n} from '../types/device_attestation';\nimport { withPublishableKey, type RequestOptions } from '../client';\n\nexport class DeviceAttestationAPI {\n constructor(private client: AxiosInstance) {}\n\n async getChallenge(opts?: RequestOptions): Promise<ChallengeResponse> {\n const resp = await this.client.post('/v1/client/device_attestation/challenge', undefined, withPublishableKey(opts));\n return resp.data;\n }\n\n async attest(params: AttestRequest, opts?: RequestOptions): Promise<AttestResponse> {\n const resp = await this.client.post('/v1/client/device_attestation/attest', params, withPublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { GooglePayConfiguration } from '../types/wallet';\nimport { withPublishableKey, type RequestOptions } from '../client';\n\nexport class WalletAPI {\n constructor(private client: AxiosInstance) {}\n\n async getGooglePayConfiguration(opts?: RequestOptions): Promise<GooglePayConfiguration> {\n const resp = await this.client.get('/v1/client/wallet/google_pay', withPublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { GeoComplianceStatus } from '../types/geo_compliance';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class GeoComplianceAPI {\n constructor(private client: AxiosInstance) {}\n\n async getAccountStatus(accountId: string, opts?: RequestOptions): Promise<GeoComplianceStatus> {\n const resp = await this.client.get(\n `/v1/accounts/${accountId}/geo_compliance`,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n}\n","import { createApiClient, type ClientConfig } from './client';\nimport { AccountsAPI } from './api/accounts-api';\nimport { CapabilitiesAPI } from './api/capabilities-api';\nimport { OnboardingSessionsAPI } from './api/onboarding_sessions-api';\nimport { CustomersAPI } from './api/customers-api';\nimport { PaymentMethodsAPI } from './api/payment_methods-api';\nimport { ChargeIntentsAPI } from './api/charge_intents-api';\nimport { RefundsAPI } from './api/refunds-api';\nimport { SubscriptionsAPI } from './api/subscriptions-api';\nimport { CustomerIdentityVerificationsAPI } from './api/customer_identity-api';\nimport { SubscriptionPhasesAPI } from './api/subscription_phases-api';\nimport { InvoicesAPI } from './api/invoices-api';\nimport { InvoiceLineItemsAPI } from './api/invoice_line_item-api';\nimport { DisputesAPI } from './api/disputes-api';\nimport { ProductsAPI } from './api/products-api';\nimport { ChargesAPI } from './api/charges-api';\nimport { ChargeSessionsAPI } from './api/charge_sessions-api';\nimport { SonarSessionsAPI } from './api/sonar_sessions-api';\nimport { PhoneVerificationsAPI } from './api/phone_verifications-api';\nimport { GeofencesAPI } from './api/geofences-api';\nimport { WebhookEndpointsAPI } from './api/webhook_endpoints-api';\nimport { PayoutsAPI } from './api/payouts-api';\nimport { TransfersAPI } from './api/transfers-api';\nimport { TransferFeePlansAPI } from './api/transfer_fee_plans-api';\nimport { TransferBillingAgreementsAPI } from './api/transfer_billing_agreements-api';\nimport { CouponsAPI } from './api/coupons-api';\nimport { PromotionCodesAPI } from './api/promotion_codes-api';\nimport { DiscountsAPI } from './api/discounts-api';\nimport { PaymentLinkSessionsAPI } from './api/payment_link_sessions-api';\nimport { SubscriptionChangeLogsAPI } from './api/subscription_change_logs-api';\nimport { BillingAPI } from './api/billing-api';\nimport { ThreeDSAPI } from './api/three_ds-api';\nimport { ProductPhasesAPI } from './api/product_phases-api';\nimport { TermsOfServiceAPI } from './api/terms_of_service-api';\nimport { OnboardingAPI } from './api/onboarding-api';\nimport { ConfigurationAPI } from './api/configuration-api';\nimport { DeviceAttestationAPI } from './api/device_attestation-api';\nimport { WalletAPI } from './api/wallet-api';\nimport { GeoComplianceAPI } from './api/geo_compliance-api';\n\nexport { paginate } from './utils/paginator';\nexport { FrameAPIError } from './errors/frame_api_error';\nexport { withPublishableKey, maybePublishableKey } from './client';\nexport type { ClientConfig, RequestOptions } from './client';\n\nexport type {\n EvervaultConfiguration,\n SiftConfiguration,\n} from './types/configuration';\nexport type {\n ChallengeResponse,\n AttestRequest,\n AttestResponse,\n} from './types/device_attestation';\nexport type { GooglePayConfiguration } from './types/wallet';\nexport type {\n ApplePayPaymentDataHeader,\n ApplePayPaymentData,\n ApplePayPaymentMethodInfo,\n ApplePayToken,\n ApplePayBillingContact,\n ApplePayTokenDetails,\n ApplePayDetails,\n ApplePayWalletEnvelope,\n CreateApplePayPaymentMethodParams,\n GooglePayPaymentMethodData,\n GooglePayWalletData,\n GooglePayWalletEnvelope,\n CreateGooglePayPaymentMethodParams,\n} from './types/payment_methods';\nexport type {\n IdentityDocumentUpload,\n ReactNativeFileDescriptor,\n NodeFilePayload,\n} from './types/customer_identity';\nexport type { GeoComplianceStatus } from './types/geo_compliance';\n\nexport class FrameSDK {\n public accounts: AccountsAPI;\n public capabilities: CapabilitiesAPI;\n public onboardingSessions: OnboardingSessionsAPI;\n public customers: CustomersAPI;\n public paymentMethods: PaymentMethodsAPI;\n public chargeIntents: ChargeIntentsAPI;\n public refunds: RefundsAPI;\n public subscriptions: SubscriptionsAPI;\n public customerIdentityVerifications: CustomerIdentityVerificationsAPI;\n public subscriptionPhases: SubscriptionPhasesAPI;\n public invoices: InvoicesAPI;\n public invoiceLineItems: InvoiceLineItemsAPI;\n public disputes: DisputesAPI;\n public products: ProductsAPI;\n public charges: ChargesAPI;\n public chargeSessions: ChargeSessionsAPI;\n public sonarSessions: SonarSessionsAPI;\n public phoneVerifications: PhoneVerificationsAPI;\n public geofences: GeofencesAPI;\n public webhookEndpoints: WebhookEndpointsAPI;\n public payouts: PayoutsAPI;\n public transfers: TransfersAPI;\n public transferFeePlans: TransferFeePlansAPI;\n public transferBillingAgreements: TransferBillingAgreementsAPI;\n public coupons: CouponsAPI;\n public promotionCodes: PromotionCodesAPI;\n public discounts: DiscountsAPI;\n public paymentLinkSessions: PaymentLinkSessionsAPI;\n public subscriptionChangeLogs: SubscriptionChangeLogsAPI;\n public billing: BillingAPI;\n public threeDS: ThreeDSAPI;\n public productPhases: ProductPhasesAPI;\n public termsOfService: TermsOfServiceAPI;\n public onboarding: OnboardingAPI;\n public configuration: ConfigurationAPI;\n public deviceAttestation: DeviceAttestationAPI;\n public wallet: WalletAPI;\n public geoCompliance: GeoComplianceAPI;\n\n constructor(config: ClientConfig) {\n const client = createApiClient(config);\n this.accounts = new AccountsAPI(client);\n this.capabilities = new CapabilitiesAPI(client);\n this.onboardingSessions = new OnboardingSessionsAPI(client);\n this.customers = new CustomersAPI(client);\n this.paymentMethods = new PaymentMethodsAPI(client);\n this.chargeIntents = new ChargeIntentsAPI(client);\n this.refunds = new RefundsAPI(client);\n this.subscriptions = new SubscriptionsAPI(client);\n this.customerIdentityVerifications = new CustomerIdentityVerificationsAPI(client);\n this.subscriptionPhases = new SubscriptionPhasesAPI(client);\n this.invoices = new InvoicesAPI(client);\n this.invoiceLineItems = new InvoiceLineItemsAPI(client);\n this.disputes = new DisputesAPI(client);\n this.products = new ProductsAPI(client);\n this.charges = new ChargesAPI(client);\n this.chargeSessions = new ChargeSessionsAPI(client);\n this.sonarSessions = new SonarSessionsAPI(client);\n this.phoneVerifications = new PhoneVerificationsAPI(client);\n this.geofences = new GeofencesAPI(client);\n this.webhookEndpoints = new WebhookEndpointsAPI(client);\n this.payouts = new PayoutsAPI(client);\n this.transfers = new TransfersAPI(client);\n this.transferFeePlans = new TransferFeePlansAPI(client);\n this.transferBillingAgreements = new TransferBillingAgreementsAPI(client);\n this.coupons = new CouponsAPI(client);\n this.promotionCodes = new PromotionCodesAPI(client);\n this.discounts = new DiscountsAPI(client);\n this.paymentLinkSessions = new PaymentLinkSessionsAPI(client);\n this.subscriptionChangeLogs = new SubscriptionChangeLogsAPI(client);\n this.billing = new BillingAPI(client);\n this.threeDS = new ThreeDSAPI(client);\n this.productPhases = new ProductPhasesAPI(client);\n this.termsOfService = new TermsOfServiceAPI(client);\n this.onboarding = new OnboardingAPI(client);\n this.configuration = new ConfigurationAPI(client);\n this.deviceAttestation = new DeviceAttestationAPI(client);\n this.wallet = new WalletAPI(client);\n this.geoCompliance = new GeoComplianceAPI(client);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa,gBAAb,cAAmC,MAAM;CAKvC,YAAY,SAAiB,MAAc,QAAgB,KAAU;EACnE,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,KAAK,MAAM;CACb;AACF;;;ACWA,MAAM,uBAAuB;AAK7B,SAAS,sBAAsB,KAAmB;CAChD,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,OA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K,WAAW,IAAI,YAAY,MAAM;EACtC,KAAK,mBAAmB,IAAI,oBAAoB,MAAM;EACtD,KAAK,WAAW,IAAI,YAAY,MAAM;EACtC,KAAK,WAAW,IAAI,YAAY,MAAM;EACtC,KAAK,UAAU,IAAI,WAAW,MAAM;EACpC,KAAK,iBAAiB,IAAI,kBAAkB,MAAM;EAClD,KAAK,gBAAgB,IAAI,iBAAiB,MAAM;EAChD,KAAK,qBAAqB,IAAI,sBAAsB,MAAM;EAC1D,KAAK,YAAY,IAAI,aAAa,MAAM;EACxC,KAAK,mBAAmB,IAAI,oBAAoB,MAAM;EACtD,KAAK,UAAU,IAAI,WAAW,MAAM;EACpC,KAAK,YAAY,IAAI,aAAa,MAAM;EACxC,KAAK,mBAAmB,IAAI,oBAAoB,MAAM;EACtD,KAAK,4BAA4B,IAAI,6BAA6B,MAAM;EACxE,KAAK,UAAU,IAAI,WAAW,MAAM;EACpC,KAAK,iBAAiB,IAAI,kBAAkB,MAAM;EAClD,KAAK,YAAY,IAAI,aAAa,MAAM;EACxC,KAAK,sBAAsB,IAAI,uBAAuB,MAAM;EAC5D,KAAK,yBAAyB,IAAI,0BAA0B,MAAM;EAClE,KAAK,UAAU,IAAI,WAAW,MAAM;EACpC,KAAK,UAAU,IAAI,WAAW,MAAM;EACpC,KAAK,gBAAgB,IAAI,iBAAiB,MAAM;EAChD,KAAK,iBAAiB,IAAI,kBAAkB,MAAM;EAClD,KAAK,aAAa,IAAI,cAAc,MAAM;EAC1C,KAAK,gBAAgB,IAAI,iBAAiB,MAAM;EAChD,KAAK,oBAAoB,IAAI,qBAAqB,MAAM;EACxD,KAAK,SAAS,IAAI,UAAU,MAAM;EAClC,KAAK,gBAAgB,IAAI,iBAAiB,MAAM;CAClD;AACF"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["AxiosHeaders","G"],"sources":["../src/errors/frame_api_error.ts","../src/client.ts","../src/utils/paginator.ts","../src/api/accounts-api.ts","../src/api/capabilities-api.ts","../src/api/onboarding_sessions-api.ts","../src/api/customers-api.ts","../src/api/payment_methods-api.ts","../src/api/charge_intents-api.ts","../src/api/refunds-api.ts","../src/api/subscriptions-api.ts","../src/api/customer_identity-api.ts","../src/api/subscription_phases-api.ts","../src/api/invoices-api.ts","../src/api/invoice_line_item-api.ts","../src/api/disputes-api.ts","../src/api/products-api.ts","../src/api/charges-api.ts","../src/api/charge_sessions-api.ts","../src/api/sonar_sessions-api.ts","../src/api/phone_verifications-api.ts","../src/api/geofences-api.ts","../src/api/webhook_endpoints-api.ts","../src/api/payouts-api.ts","../src/api/transfers-api.ts","../src/api/transfer_fee_plans-api.ts","../src/api/transfer_billing_agreements-api.ts","../src/api/coupons-api.ts","../src/api/promotion_codes-api.ts","../src/api/discounts-api.ts","../src/api/payment_link_sessions-api.ts","../src/api/subscription_change_logs-api.ts","../src/api/billing-api.ts","../src/api/three_ds-api.ts","../src/api/product_phases-api.ts","../src/api/terms_of_service-api.ts","../src/api/onboarding-api.ts","../src/api/configuration-api.ts","../src/api/device_attestation-api.ts","../src/api/wallet-api.ts","../src/api/geo_compliance-api.ts","../src/index.ts"],"sourcesContent":["export class FrameAPIError extends Error {\n public code: string;\n public status: number;\n public raw: any;\n\n constructor(message: string, code: string, status: number, raw: any) {\n super(message);\n this.name = 'FrameAPIError';\n this.code = code;\n this.status = status;\n this.raw = raw;\n }\n}","import axios, { AxiosHeaders } from 'axios';\nimport type { AxiosInstance, AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';\nimport { FrameAPIError } from './errors/frame_api_error';\n\nexport interface ClientConfig {\n apiKey?: string;\n publishableKey?: string;\n // Override the API base URL. Defaults to https://api.framepayments.com.\n // Useful for pointing local development at a self-hosted Frame OS instance\n // (e.g. http://api.framepayments.test via puma-dev).\n baseURL?: string;\n // Headers to attach to every request from this client. Used by the React\n // Native SDK to forward the device IP via `ip_address` on each call (matches\n // the native Frame iOS / Frame Android behavior). The request interceptor\n // applies these *before* setting Authorization, so callers cannot use this\n // hook to override key routing.\n defaultHeaders?: Record<string, string>;\n}\n\nexport interface RequestOptions {\n usePublishableKey?: boolean;\n // Per-request bearer override (e.g. an object `client_secret` such as\n // `ci_..._secret_...`). When present, it wins over both an active onboarding\n // session token and the configured pk_/sk_ keys. Mirrors the per-call\n // `client_secret` tier of the native iOS/Android auth resolvers.\n authToken?: string;\n}\n\n// Internal auth routing is carried on the axios request *config* (not on\n// headers). Axios passes unknown config fields straight through to the request\n// interceptor untouched and never serializes them onto the wire, so a secret\n// `frameAuthToken` can never leak as an HTTP header and there is nothing to\n// strip before the request leaves the process. Callers cannot reach these\n// fields through the public helpers' header path, so a raw header named like\n// the old smuggle keys can no longer override key routing.\ninterface FrameRequestConfig extends AxiosRequestConfig {\n frameUsePublishableKey?: boolean;\n frameAuthToken?: string;\n}\nconst FRAME_USE_PUBLISHABLE_KEY = 'frameUsePublishableKey';\nconst FRAME_AUTH_TOKEN = 'frameAuthToken';\n\n// Holds the active onboarding-session bearer token (e.g. `onb_sess_...`). The\n// request interceptor closes over a single instance of this so the token can be\n// set/cleared on the live client after construction, mirroring the native iOS\n// `beginOnboardingSession`/`endOnboardingSession` model. A mutable holder (vs.\n// recreating the client) keeps every already-wired API class pointed at the\n// same auth state.\nexport interface OnboardingSessionStore {\n token: string | null;\n}\n\nexport const createOnboardingSessionStore = (): OnboardingSessionStore => ({ token: null });\n\n// Strips the Authorization header and the per-request `frameAuthToken` (an\n// object client_secret) before stashing axios's error config on\n// FrameAPIError.raw — without this, every network-layer failure would leak the\n// live Bearer token / client_secret to anyone logging the error.\nfunction safeRawFromAxiosError(err: any): unknown {\n if (!err || typeof err !== 'object') return err;\n const cleanedConfig = err.config\n ? (() => {\n const {\n headers,\n [FRAME_AUTH_TOKEN]: _authToken,\n ...restConfig\n } = err.config as { headers?: unknown } & Record<string, unknown>;\n const cleanedHeaders =\n headers && typeof headers === 'object'\n ? Object.fromEntries(\n Object.entries(headers as Record<string, unknown>).filter(\n ([k]) => k.toLowerCase() !== 'authorization',\n ),\n )\n : headers;\n return { ...restConfig, headers: cleanedHeaders };\n })()\n : undefined;\n return {\n message: err.message,\n code: err.code,\n name: err.name,\n config: cleanedConfig,\n };\n}\n\nexport const createApiClient = (\n config: ClientConfig,\n sessionStore: OnboardingSessionStore = createOnboardingSessionStore(),\n): AxiosInstance => {\n const { apiKey, publishableKey, defaultHeaders } = config;\n\n if (!apiKey && !publishableKey) {\n throw new Error(\n 'FrameSDK config requires at least one of: apiKey, publishableKey. ' +\n 'Mobile clients should ship publishableKey only; server code should use apiKey.',\n );\n }\n\n const baseURL = config.baseURL ?? 'https://api.framepayments.com';\n\n const client = axios.create({\n baseURL,\n headers: { 'Content-Type': 'application/json' },\n });\n\n client.interceptors.request.use((requestConfig: InternalAxiosRequestConfig) => {\n const headers = requestConfig.headers;\n const cfg = requestConfig as FrameRequestConfig;\n const wantsPublishable = cfg.frameUsePublishableKey === true;\n // An explicitly-provided but empty authToken is a caller bug (e.g. an\n // unpopulated client_secret). Fail loudly rather than silently fall through\n // to the session/pk/sk bearer, which would send the request under a\n // broader-privilege credential than intended.\n const rawAuthToken = cfg.frameAuthToken;\n if (rawAuthToken === '') {\n throw new FrameAPIError(\n 'Frame authToken was provided but empty. Pass a non-empty client_secret (e.g. ci_..._secret_...), or omit authToken to use the configured key.',\n 'invalid_auth_token',\n 0,\n null,\n );\n }\n const perRequestAuthToken =\n typeof rawAuthToken === 'string' && rawAuthToken.length > 0 ? rawAuthToken : undefined;\n\n if (defaultHeaders) {\n for (const [name, value] of Object.entries(defaultHeaders)) {\n if (value == null) continue;\n if (headers instanceof AxiosHeaders) {\n if (!headers.has(name)) headers.set(name, value);\n } else if (headers) {\n const h = headers as Record<string, string>;\n if (h[name] === undefined) h[name] = value;\n }\n }\n }\n\n // Resolve the bearer with the same three-tier precedence as the native\n // iOS/Android `bearerToken()`:\n // 1. per-request authToken (an object client_secret), else\n // 2. active onboarding-session token, else\n // 3. publishableKey when usePublishableKey === true, else apiKey.\n const sessionToken = sessionStore.token;\n let bearer: string | undefined;\n if (perRequestAuthToken) {\n bearer = perRequestAuthToken;\n } else if (sessionToken) {\n bearer = sessionToken;\n } else {\n const keyToUse = wantsPublishable ? publishableKey : apiKey;\n if (!keyToUse) {\n throw new FrameAPIError(\n wantsPublishable\n ? 'Frame publishable key is not configured. Pass { publishableKey } to new FrameSDK(...) before calling endpoints with { usePublishableKey: true }.'\n : 'Frame API key is not configured. Pass { apiKey } to new FrameSDK(...) before calling secret-keyed endpoints.',\n wantsPublishable ? 'missing_publishable_key' : 'missing_api_key',\n 0,\n null,\n );\n }\n bearer = keyToUse;\n }\n if (headers instanceof AxiosHeaders) {\n headers.set('Authorization', `Bearer ${bearer}`);\n } else if (headers) {\n (headers as Record<string, string>)['Authorization'] = `Bearer ${bearer}`;\n }\n return requestConfig;\n });\n\n client.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error instanceof FrameAPIError) {\n throw error;\n }\n if (error.response) {\n const { status, data } = error.response;\n const code = data?.code || 'unknown_error';\n const message = data?.message || 'An error occurred';\n throw new FrameAPIError(message, code, status, data);\n }\n throw new FrameAPIError(error.message, 'network_error', 0, safeRawFromAxiosError(error));\n },\n );\n\n return client;\n};\n\n// Translates RequestOptions into the internal axios *config* fields the request\n// interceptor reads (frameUsePublishableKey / frameAuthToken). These never\n// become wire headers, so the per-request client_secret can't leak and a raw\n// caller-supplied header can't spoof key routing. `publishableDefault` differs\n// between the two public helpers (withPublishableKey opts in by default,\n// maybePublishableKey opts out).\nfunction buildRequestConfig(\n publishableDefault: boolean,\n opts?: RequestOptions & AxiosRequestConfig,\n): AxiosRequestConfig {\n const { usePublishableKey = publishableDefault, authToken, ...rest } = opts ?? {};\n const cfg: FrameRequestConfig = { ...rest };\n if (usePublishableKey) cfg[FRAME_USE_PUBLISHABLE_KEY] = true;\n // Pass authToken through verbatim (including '') so the interceptor — the\n // single chokepoint that always runs — can reject an empty value loudly.\n if (authToken !== undefined) cfg[FRAME_AUTH_TOKEN] = authToken;\n return cfg;\n}\n\nexport function withPublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig {\n return buildRequestConfig(true, opts);\n}\n\nexport function maybePublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig {\n return buildRequestConfig(false, opts);\n}\n","export async function* paginate<T>(\n fetchPage: (page: number) => Promise<{ data: T[]; meta?: { has_more?: boolean } }>,\n pageSize = 20\n): AsyncGenerator<T> {\n let page = 1;\n let hasMore = true;\n\n while (hasMore) {\n const { data, meta } = await fetchPage(page);\n for (const item of data) {\n yield item;\n }\n\n hasMore = meta?.has_more ?? false;\n page += 1;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Account,\n AccountListResponse,\n ListAccountsParams,\n CreateAccountParams,\n UpdateAccountParams,\n SearchAccountsParams,\n PlaidLinkTokenResponse\n} from '../types/accounts';\nimport type { GeoComplianceStatus } from '../types/geo_compliance';\nimport type { PaymentMethodListResponse } from '../types/payment_methods';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class AccountsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(params?: ListAccountsParams): Promise<AccountListResponse> {\n const resp = await this.client.get('/v1/accounts', { params: params ?? {} });\n return resp.data;\n }\n\n async create(params: CreateAccountParams, opts?: RequestOptions): Promise<Account> {\n const resp = await this.client.post('/v1/accounts', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async get(id: string, opts?: RequestOptions): Promise<Account> {\n const resp = await this.client.get(`/v1/accounts/${id}`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async update(id: string, params: UpdateAccountParams, opts?: RequestOptions): Promise<Account> {\n const resp = await this.client.patch(`/v1/accounts/${id}`, params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async disable(id: string): Promise<Account> {\n const resp = await this.client.delete(`/v1/accounts/${id}`);\n return resp.data;\n }\n\n async search(params: SearchAccountsParams): Promise<AccountListResponse> {\n const resp = await this.client.get('/v1/accounts/search', { params });\n return resp.data;\n }\n\n // Returns the `{ meta?, data? }` envelope produced by\n // `GET /v1/accounts/{id}/payment_methods`. Matches Frame-iOS\n // `PaymentMethodResponses.ListPaymentMethodsResponse`. Callers that just\n // need the array should read `result.data ?? []`.\n async getPaymentMethods(id: string, opts?: RequestOptions): Promise<PaymentMethodListResponse> {\n const resp = await this.client.get(`/v1/accounts/${id}/payment_methods`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async restrict(id: string): Promise<Account> {\n const resp = await this.client.post(`/v1/accounts/${id}/restrict`);\n return resp.data;\n }\n\n async unrestrict(id: string): Promise<Account> {\n const resp = await this.client.post(`/v1/accounts/${id}/unrestrict`);\n return resp.data;\n }\n\n async getPlaidLinkToken(id: string, opts?: RequestOptions): Promise<PlaidLinkTokenResponse> {\n const resp = await this.client.get(`/v1/accounts/${id}/plaid_link_token`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async getGeoCompliance(accountId: string): Promise<GeoComplianceStatus> {\n const resp = await this.client.get(`/v1/accounts/${accountId}/geo_compliance`);\n return resp.data;\n }\n\n iterateAllAccounts(per_page = 20): AsyncGenerator<Account> {\n return paginate<Account>(async (page: number) => {\n const res = await this.client.get('/v1/accounts', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Capability, RequestCapabilitiesParams } from '../types/capabilities';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class CapabilitiesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(accountId: string, opts?: RequestOptions): Promise<Capability[]> {\n const resp = await this.client.get(`/v1/accounts/${accountId}/capabilities`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async request(accountId: string, params: RequestCapabilitiesParams, opts?: RequestOptions): Promise<Capability[]> {\n const resp = await this.client.post(`/v1/accounts/${accountId}/capabilities`, params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async get(accountId: string, name: string): Promise<Capability> {\n const resp = await this.client.get(`/v1/accounts/${accountId}/capabilities/${name}`);\n return resp.data;\n }\n\n async disable(accountId: string, name: string): Promise<Capability> {\n const resp = await this.client.delete(`/v1/accounts/${accountId}/capabilities/${name}`);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { OnboardingSession, CreateOnboardingSessionParams } from '../types/onboarding_sessions';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class OnboardingSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateOnboardingSessionParams, opts?: RequestOptions): Promise<OnboardingSession> {\n const resp = await this.client.post('/v1/onboarding_sessions', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async getByAccount(accountId: string, opts?: RequestOptions): Promise<OnboardingSession> {\n const resp = await this.client.get('/v1/onboarding_sessions', {\n ...maybePublishableKey(opts),\n params: { account_id: accountId },\n });\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport { paginate } from '../utils/paginator';\nimport type {\n Customer,\n CustomerListResponse,\n CreateCustomerParams,\n UpdateCustomerParams,\n DeleteResponse,\n SearchCustomerParams\n} from '../types/customers';\nimport type { PaymentMethod } from '../types/payment_methods';\n\nexport class CustomersAPI {\n constructor(private client: AxiosInstance) {}\n\n // Create\n async create(params: CreateCustomerParams): Promise<Customer> {\n const resp = await this.client.post('/v1/customers', params);\n return resp.data;\n }\n\n // Update\n async update(id: string, params: UpdateCustomerParams): Promise<Customer> {\n const resp = await this.client.patch(`/v1/customers/${id}`, params);\n return resp.data;\n }\n\n // Retrieve\n async get(id: string): Promise<Customer> {\n const resp = await this.client.get(`/v1/customers/${id}`);\n return resp.data;\n }\n\n // List, with pagination\n async list(per_page?: number, page?: number): Promise<CustomerListResponse> {\n const resp = await this.client.get('/v1/customers', {\n params: { per_page, page }\n });\n return resp.data;\n }\n\n async iterateAllCustomers(per_page = 20) {\n return paginate<Customer>(async (page: number) => {\n const res = await this.client.get('/v1/customers', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n // Delete\n async delete(id: string): Promise<DeleteResponse> {\n const resp = await this.client.delete(`/v1/customers/${id}`);\n return resp.data;\n }\n\n // Search\n async search(params: SearchCustomerParams): Promise<CustomerListResponse> {\n const resp = await this.client.get('/v1/customers/search', { params: params });\n return resp.data;\n }\n\n // Block\n async block(id: string): Promise<Customer> {\n const resp = await this.client.post(`/v1/customers/${id}/block`);\n return resp.data;\n }\n\n // Unblock\n async unblock(id: string): Promise<Customer> {\n const resp = await this.client.post(`/v1/customers/${id}/unblock`);\n return resp.data;\n }\n\n async getPaymentMethods(id: string): Promise<PaymentMethod[]> {\n const resp = await this.client.get(`/v1/customers/${id}/payment_methods`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n PaymentMethod,\n PaymentMethodListResponse,\n CreateCardPaymentMethodParams,\n CreateACHPaymentMethodParams,\n UpdatePaymentMethodParams,\n ConnectPlaidParams,\n CreateApplePayPaymentMethodParams,\n CreateGooglePayPaymentMethodParams\n} from '../types/payment_methods';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class PaymentMethodsAPI {\n constructor(private client: AxiosInstance) {}\n\n async createCard(params: CreateCardPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod> {\n const resp = await this.client.post('/v1/payment_methods', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async createACH(params: CreateACHPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod> {\n const resp = await this.client.post('/v1/payment_methods', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async createApplePayPaymentMethod(\n params: CreateApplePayPaymentMethodParams,\n opts?: RequestOptions,\n ): Promise<PaymentMethod> {\n const resp = await this.client.post(\n '/v1/payment_methods',\n params,\n maybePublishableKey({ usePublishableKey: true, ...opts }),\n );\n return resp.data;\n }\n\n async createGooglePayPaymentMethod(\n params: CreateGooglePayPaymentMethodParams,\n opts?: RequestOptions,\n ): Promise<PaymentMethod> {\n const resp = await this.client.post(\n '/v1/payment_methods',\n params,\n maybePublishableKey({ usePublishableKey: true, ...opts }),\n );\n return resp.data;\n }\n\n async get(id: string): Promise<PaymentMethod> {\n const resp = await this.client.get(`/v1/payment_methods/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<PaymentMethodListResponse> {\n const resp = await this.client.get('/v1/payment_methods', { params: { per_page, page } });\n return resp.data;\n }\n\n iterateAllPaymentMethods(per_page = 20): AsyncGenerator<PaymentMethod> {\n return paginate<PaymentMethod>(async (page: number) => {\n const res = await this.client.get('/v1/payment_methods', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async listForCustomer(customerId: string, per_page?: number, page?: number): Promise<PaymentMethodListResponse> {\n const resp = await this.client.get(`/v1/customers/${customerId}/payment_methods`, {\n params: { per_page, page }\n });\n return resp.data;\n }\n\n async update(id: string, params: UpdatePaymentMethodParams): Promise<PaymentMethod> {\n const resp = await this.client.patch(`/v1/payment_methods/${id}`, params);\n return resp.data;\n }\n\n async attach(id: string, customerId: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/attach`, { customer: customerId });\n return resp.data;\n }\n\n async detach(id: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/detach`);\n return resp.data;\n }\n\n async block(id: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/block`);\n return resp.data;\n }\n\n async unblock(id: string): Promise<PaymentMethod> {\n const resp = await this.client.post(`/v1/payment_methods/${id}/unblock`);\n return resp.data;\n }\n\n async connectPlaid(params: ConnectPlaidParams, opts?: RequestOptions): Promise<PaymentMethod> {\n const resp = await this.client.post('/v1/payment_methods/connect_plaid', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async connectPlaidBankAccount(params: ConnectPlaidParams, opts?: RequestOptions): Promise<PaymentMethod> {\n return this.connectPlaid(params, opts);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n ChargeIntent,\n ChargeIntentListResponse,\n CaptureChargeIntentParams,\n CreateChargeIntentParams,\n UpdateChargeIntentParams\n} from '../types/charge_intents';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class ChargeIntentsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateChargeIntentParams, opts?: RequestOptions): Promise<ChargeIntent> {\n const resp = await this.client.post('/v1/charge_intents', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async update(id: string, params: UpdateChargeIntentParams): Promise<ChargeIntent> {\n const resp = await this.client.patch(`/v1/charge_intents/${id}`, params);\n return resp.data;\n }\n\n async get(id: string, opts?: RequestOptions): Promise<ChargeIntent> {\n const resp = await this.client.get(`/v1/charge_intents/${id}`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<ChargeIntentListResponse> {\n const resp = await this.client.get('/v1/charge_intents', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllChargeIntents(per_page = 20) {\n return paginate<ChargeIntent>(async (page: number) => {\n const res = await this.client.get('/v1/charge_intents', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async cancel(id: string): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/cancel`);\n return resp.data;\n }\n\n async confirm(id: string, opts?: RequestOptions): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/confirm`, undefined, maybePublishableKey(opts));\n return resp.data;\n }\n\n async capture(id: string, params?: CaptureChargeIntentParams): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/capture`, params);\n return resp.data;\n }\n\n async voidRemaining(id: string): Promise<ChargeIntent> {\n const resp = await this.client.post(`/v1/charge_intents/${id}/void_remaining`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type { Refund, RefundListResponse, CreateRefundParams } from '../types/refunds';\nimport { paginate } from '../utils/paginator';\n\nexport class RefundsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateRefundParams): Promise<Refund> {\n const resp = await this.client.post('/v1/refunds', params);\n return resp.data;\n }\n\n async get(id: string): Promise<Refund> {\n const resp = await this.client.get(`/v1/refunds/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<RefundListResponse> {\n const resp = await this.client.get('/v1/refunds', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllRefunds(per_page = 20) {\n return paginate<Refund>(async (page: number) => {\n const res = await this.client.get('/v1/refunds', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Subscription,\n SubscriptionListResponse,\n CreateSubscriptionParams,\n UpdateSubscriptionParams,\n SearchSubscriptionParams\n} from '../types/subscriptions';\nimport { paginate } from '../utils/paginator';\n\nexport class SubscriptionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateSubscriptionParams): Promise<Subscription> {\n const resp = await this.client.post('/v1/subscriptions', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateSubscriptionParams): Promise<Subscription> {\n const resp = await this.client.patch(`/v1/subscriptions/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Subscription> {\n const resp = await this.client.get(`/v1/subscriptions/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<SubscriptionListResponse> {\n const resp = await this.client.get('/v1/subscriptions', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllSubscriptions(per_page = 20) {\n return paginate<Subscription>(async (page: number) => {\n const res = await this.client.get('/v1/subscriptions', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async search(query: SearchSubscriptionParams): Promise<SubscriptionListResponse> {\n const resp = await this.client.get('/v1/subscriptions/search', { params: query });\n return resp.data;\n }\n\n async cancel(id: string): Promise<Subscription> {\n const resp = await this.client.post(`/v1/subscriptions/${id}/cancel`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n CustomerIdentityVerification,\n CreateCustomerIdentityVerificationParams,\n UploadDocumentsParams,\n IdentityDocumentUpload,\n ReactNativeFileDescriptor,\n} from '../types/customer_identity';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class CustomerIdentityVerificationsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(\n params: CreateCustomerIdentityVerificationParams,\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post('/v1/customer_identity_verifications', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async createForCustomer(\n customerId: string,\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post(\n `/v1/customers/${customerId}/identity_verifications`,\n undefined,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async get(id: string, opts?: RequestOptions): Promise<CustomerIdentityVerification> {\n const resp = await this.client.get(`/v1/customer_identity_verifications/${id}`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async submitForVerification(id: string, opts?: RequestOptions): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post(\n `/v1/customer_identity_verifications/${id}/submit`,\n undefined,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async uploadDocuments(\n id: string,\n params: UploadDocumentsParams,\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n const resp = await this.client.post(\n `/v1/customer_identity_verifications/${id}/upload_documents`,\n params,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async uploadIdentityDocuments(\n id: string,\n documents: IdentityDocumentUpload[],\n opts?: RequestOptions,\n ): Promise<CustomerIdentityVerification> {\n if (documents.length === 0) {\n throw new Error('uploadIdentityDocuments: documents array must not be empty');\n }\n\n const form = makeFormData();\n for (const doc of documents) {\n appendFile(form, doc);\n }\n\n const baseOpts = opts ?? {};\n const callerHeaders = (baseOpts as { headers?: Record<string, string> }).headers ?? {};\n return this.client\n .post(\n `/v1/customer_identity_verifications/${id}/upload_documents`,\n form,\n maybePublishableKey({\n ...baseOpts,\n headers: { ...callerHeaders, 'Content-Type': 'multipart/form-data' },\n }),\n )\n .then((resp) => resp.data);\n }\n}\n\ninterface FormDataLike {\n append(name: string, value: unknown, options?: { filename?: string; contentType?: string }): void;\n}\n\nfunction isReactNative(): boolean {\n const G: unknown = globalThis;\n if (typeof G !== 'object' || G === null) return false;\n const nav = (G as { navigator?: { product?: unknown } }).navigator;\n return typeof nav?.product === 'string' && nav.product === 'ReactNative';\n}\n\n// Pick FormData by runtime, not by whether `require('form-data')` succeeds:\n// form-data is a transitive dep of axios so the require succeeds on RN too,\n// but it doesn't accept RN's { uri, type, name } file shape.\nfunction makeFormData(): FormDataLike {\n if (isReactNative()) {\n const G: unknown = globalThis;\n const Ctor = (G as { FormData?: new () => FormDataLike }).FormData;\n if (typeof Ctor !== 'function') {\n throw new Error(\n 'React Native runtime detected but globalThis.FormData is missing. Polyfill required.',\n );\n }\n return new Ctor();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const FormDataCtor = require('form-data');\n return new FormDataCtor() as FormDataLike;\n}\n\nfunction isReactNativeFileDescriptor(file: unknown): file is ReactNativeFileDescriptor {\n return (\n typeof file === 'object' &&\n file !== null &&\n typeof (file as { uri?: unknown }).uri === 'string'\n );\n}\n\nfunction appendFile(form: FormDataLike, doc: IdentityDocumentUpload): void {\n const fieldName = doc.field_name ?? doc.document_type;\n const file = doc.file;\n\n if (isReactNativeFileDescriptor(file)) {\n form.append(fieldName, file);\n return;\n }\n\n const fileOptions: { filename?: string; contentType?: string } = {};\n if (doc.file_name !== undefined) fileOptions.filename = doc.file_name;\n if (doc.content_type !== undefined) fileOptions.contentType = doc.content_type;\n form.append(fieldName, file, fileOptions);\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n SubscriptionPhase,\n SubscriptionPhaseListResponse,\n CreateSubscriptionPhaseParams,\n UpdateSubscriptionPhaseParams\n} from '../types/subscription_phases';\nimport { paginate } from '../utils/paginator';\n\nexport class SubscriptionPhasesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(subscriptionId: string): Promise<SubscriptionPhaseListResponse> {\n const resp = await this.client.get(`/v1/subscriptions/${subscriptionId}/phases`);\n return resp.data;\n }\n\n async iterateAllSubscriptionPhases(subscriptionId: string, per_page = 20) {\n return paginate<SubscriptionPhase>(async (page: number) => {\n const res = await this.client.get(`/v1/subscriptions/${subscriptionId}/phases`, {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async get(subscriptionId: string, phaseId: string): Promise<SubscriptionPhase> {\n const resp = await this.client.get(`/v1/subscriptions/${subscriptionId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async create(subscriptionId: string, params: CreateSubscriptionPhaseParams): Promise<SubscriptionPhase> {\n const resp = await this.client.post(`/v1/subscriptions/${subscriptionId}/phases`, params);\n return resp.data;\n }\n\n async update(subscriptionId: string, phaseId: string, params: UpdateSubscriptionPhaseParams): Promise<SubscriptionPhase> {\n const resp = await this.client.patch(`/v1/subscriptions/${subscriptionId}/phases/${phaseId}`, params);\n return resp.data;\n }\n\n async delete(subscriptionId: string, phaseId: string): Promise<{ id: string; object: string; deleted: boolean }> {\n const resp = await this.client.delete(`/v1/subscriptions/${subscriptionId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async bulkUpdate(subscriptionId: string, phases: Array<{ id: string; [key: string]: any }>): Promise<SubscriptionPhaseListResponse> {\n const resp = await this.client.patch(`/v1/subscriptions/${subscriptionId}/phases/bulk_update`, { phases });\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Invoice,\n InvoiceListResponse,\n CreateInvoiceParams,\n UpdateInvoiceParams,\n DeleteInvoiceResponse\n} from '../types/invoices';\n\nexport class InvoicesAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateInvoiceParams): Promise<Invoice> {\n const resp = await this.client.post('/v1/invoices', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateInvoiceParams): Promise<Invoice> {\n const resp = await this.client.patch(`/v1/invoices/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Invoice> {\n const resp = await this.client.get(`/v1/invoices/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number, customer?: string, status?: string): Promise<InvoiceListResponse> {\n const resp = await this.client.get('/v1/invoices', {\n params: { per_page, page, customer, status }\n });\n return resp.data;\n }\n\n async delete(id: string): Promise<DeleteInvoiceResponse> {\n const resp = await this.client.delete(`/v1/invoices/${id}`);\n return resp.data;\n }\n\n async issue(id: string): Promise<Invoice> {\n const resp = await this.client.post(`/v1/invoices/${id}/issue`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n InvoiceLineItem,\n InvoiceLineItemListResponse,\n CreateInvoiceLineItemParams,\n UpdateInvoiceLineItemParams\n} from '../types/invoice_line_items';\nimport type { \n DeleteInvoiceResponse \n} from '../types/invoices';\n\nexport class InvoiceLineItemsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(invoiceId: string): Promise<InvoiceLineItemListResponse> {\n const resp = await this.client.get(`/v1/invoices/${invoiceId}/line_items`);\n return resp.data;\n }\n\n async create(invoiceId: string, params: CreateInvoiceLineItemParams): Promise<InvoiceLineItem> {\n const resp = await this.client.post(`/v1/invoices/${invoiceId}/line_items`, params);\n return resp.data;\n }\n\n async update(invoiceId: string, lineItemId: string, params: UpdateInvoiceLineItemParams): Promise<InvoiceLineItem> {\n const resp = await this.client.patch(`/v1/invoices/${invoiceId}/line_items/${lineItemId}`, params);\n return resp.data;\n }\n\n async get(invoiceId: string, lineItemId: string): Promise<InvoiceLineItem> {\n const resp = await this.client.get(`/v1/invoices/${invoiceId}/line_items/${lineItemId}`);\n return resp.data;\n }\n\n async delete(invoiceId: string, lineItemId: string): Promise<DeleteInvoiceResponse> {\n const resp = await this.client.delete(`/v1/invoices/${invoiceId}/line_items/${lineItemId}`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type {\n Dispute,\n DisputeListResponse,\n UpdateDisputeParams,\n CreateDisputeDocumentParams,\n DisputeDocument\n} from '../types/disputes';\n\nexport class DisputesAPI {\n constructor(private client: AxiosInstance) {}\n\n async update(id: string, params: UpdateDisputeParams): Promise<Dispute> {\n const resp = await this.client.patch(`/v1/disputes/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Dispute> {\n const resp = await this.client.get(`/v1/disputes/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number, charge?: string, charge_intent?: string): Promise<DisputeListResponse> {\n const resp = await this.client.get('/v1/disputes', { params: { per_page, page, charge, charge_intent } });\n return resp.data;\n }\n\n async createDocument(id: string, params: CreateDisputeDocumentParams): Promise<DisputeDocument> {\n const resp = await this.client.post(`/v1/disputes/${id}/documents`, params);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type { Product, ProductListResponse, CreateProductParams, UpdateProductParams, SearchProductParams, DeletedProduct } from '../types/products';\nimport { paginate } from '../utils/paginator';\n\nexport class ProductsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateProductParams): Promise<Product> {\n const resp = await this.client.post('/v1/products', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateProductParams): Promise<Product> {\n const resp = await this.client.patch(`/v1/products/${id}`, params);\n return resp.data;\n }\n\n async get(id: string): Promise<Product> {\n const resp = await this.client.get(`/v1/products/${id}`);\n return resp.data;\n }\n\n async list(per_page?: number, page?: number): Promise<ProductListResponse> {\n const resp = await this.client.get('/v1/products', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllProducts(per_page = 20) {\n return paginate<Product>(async (page: number) => {\n const res = await this.client.get('/v1/products', {\n params: { per_page, page }\n });\n return res.data;\n }, per_page);\n }\n\n async search(params: SearchProductParams): Promise<ProductListResponse> {\n const resp = await this.client.get('/v1/products/search', { params });\n return resp.data;\n }\n\n async delete(id: string): Promise<DeletedProduct> {\n const resp = await this.client.delete(`/v1/products/${id}`);\n return resp.data;\n }\n}","import type { AxiosInstance } from 'axios';\nimport type { Charge, ChargeTrace } from '../types/charges';\n\nexport class ChargesAPI {\n constructor(private client: AxiosInstance) {}\n\n async get(id: string): Promise<Charge> {\n const resp = await this.client.get(`/v1/charges/${id}`);\n return resp.data;\n }\n\n async trace(id: string): Promise<ChargeTrace> {\n const resp = await this.client.get(`/v1/charges/${id}/trace`);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n ChargeSession,\n CreateChargeSessionParams,\n UpdateChargeSessionParams\n} from '../types/charge_sessions';\n\nexport class ChargeSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateChargeSessionParams): Promise<ChargeSession> {\n const resp = await this.client.post('/v1/charge_sessions', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateChargeSessionParams): Promise<ChargeSession> {\n const resp = await this.client.patch(`/v1/charge_sessions/${id}`, params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n SonarSession,\n CreateSonarSessionParams,\n UpdateSonarSessionParams\n} from '../types/sonar_sessions';\n\nexport class SonarSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateSonarSessionParams): Promise<SonarSession> {\n const resp = await this.client.post('/v1/sonar_sessions', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateSonarSessionParams): Promise<SonarSession> {\n const resp = await this.client.patch(`/v1/sonar_sessions/${id}`, params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n PhoneVerification,\n CreatePhoneVerificationParams,\n ConfirmPhoneVerificationParams\n} from '../types/phone_verifications';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class PhoneVerificationsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(\n accountId: string,\n params: CreatePhoneVerificationParams,\n opts?: RequestOptions,\n ): Promise<PhoneVerification> {\n const resp = await this.client.post(\n `/v1/accounts/${accountId}/phone_verifications`,\n params,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n\n async confirm(\n accountId: string,\n id: string,\n params: ConfirmPhoneVerificationParams,\n opts?: RequestOptions,\n ): Promise<PhoneVerification> {\n const resp = await this.client.post(\n `/v1/accounts/${accountId}/phone_verifications/${id}/confirm`,\n params,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Geofence, GeofenceListResponse } from '../types/geofences';\nimport { paginate } from '../utils/paginator';\n\nexport class GeofencesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(params?: { per_page?: number; page?: number }): Promise<GeofenceListResponse> {\n const resp = await this.client.get('/v1/geofences', { params });\n return resp.data;\n }\n\n async iterateAllGeofences(per_page = 20) {\n return paginate<Geofence>(async (page: number) => {\n const res = await this.client.get('/v1/geofences', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { WebhookEndpoint, WebhookEndpointListResponse } from '../types/webhook_endpoints';\nimport { paginate } from '../utils/paginator';\n\nexport class WebhookEndpointsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<WebhookEndpointListResponse> {\n const resp = await this.client.get('/v1/webhook_endpoints', { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllWebhookEndpoints(per_page = 20) {\n return paginate<WebhookEndpoint>(async (page: number) => {\n const res = await this.client.get('/v1/webhook_endpoints', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Payout, CreatePayoutParams } from '../types/payouts';\n\nexport class PayoutsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreatePayoutParams): Promise<Payout> {\n const resp = await this.client.post('/v1/payouts', params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { Transfer, TransferListResponse, CreateTransferParams } from '../types/transfers';\nimport { paginate } from '../utils/paginator';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class TransfersAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<TransferListResponse> {\n const resp = await this.client.get('/v1/transfers', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<Transfer> {\n const resp = await this.client.get(`/v1/transfers/${id}`);\n return resp.data;\n }\n\n async create(params: CreateTransferParams, opts?: RequestOptions): Promise<Transfer> {\n const resp = await this.client.post('/v1/transfers', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async iterateAllTransfers(per_page = 20) {\n return paginate<Transfer>(async (page: number) => {\n const res = await this.client.get('/v1/transfers', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n TransferFeePlan,\n TransferFeePlanListResponse,\n CreateTransferFeePlanParams\n} from '../types/transfer_fee_plans';\nimport { paginate } from '../utils/paginator';\n\nexport class TransferFeePlansAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<TransferFeePlanListResponse> {\n const resp = await this.client.get('/v1/transfer_fee_plans', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<TransferFeePlan> {\n const resp = await this.client.get(`/v1/transfer_fee_plans/${id}`);\n return resp.data;\n }\n\n async create(params: CreateTransferFeePlanParams): Promise<TransferFeePlan> {\n const resp = await this.client.post('/v1/transfer_fee_plans', params);\n return resp.data;\n }\n\n async iterateAllTransferFeePlans(per_page = 20) {\n return paginate<TransferFeePlan>(async (page: number) => {\n const res = await this.client.get('/v1/transfer_fee_plans', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n TransferBillingAgreement,\n TransferBillingAgreementListResponse,\n CreateTransferBillingAgreementParams,\n UpdateTransferBillingAgreementParams\n} from '../types/transfer_billing_agreements';\nimport { paginate } from '../utils/paginator';\n\nexport class TransferBillingAgreementsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<TransferBillingAgreementListResponse> {\n const resp = await this.client.get('/v1/transfer_billing_agreements', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<TransferBillingAgreement> {\n const resp = await this.client.get(`/v1/transfer_billing_agreements/${id}`);\n return resp.data;\n }\n\n async create(params: CreateTransferBillingAgreementParams): Promise<TransferBillingAgreement> {\n const resp = await this.client.post('/v1/transfer_billing_agreements', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateTransferBillingAgreementParams): Promise<TransferBillingAgreement> {\n const resp = await this.client.patch(`/v1/transfer_billing_agreements/${id}`, params);\n return resp.data;\n }\n\n async iterateAllTransferBillingAgreements(per_page = 20) {\n return paginate<TransferBillingAgreement>(async (page: number) => {\n const res = await this.client.get('/v1/transfer_billing_agreements', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n Coupon,\n CouponListResponse,\n CreateCouponParams,\n UpdateCouponParams\n} from '../types/coupons';\nimport { paginate } from '../utils/paginator';\n\nexport class CouponsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<CouponListResponse> {\n const resp = await this.client.get('/v1/coupons', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<Coupon> {\n const resp = await this.client.get(`/v1/coupons/${id}`);\n return resp.data;\n }\n\n async create(params: CreateCouponParams): Promise<Coupon> {\n const resp = await this.client.post('/v1/coupons', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdateCouponParams): Promise<Coupon> {\n const resp = await this.client.patch(`/v1/coupons/${id}`, params);\n return resp.data;\n }\n\n async iterateAllCoupons(per_page = 20) {\n return paginate<Coupon>(async (page: number) => {\n const res = await this.client.get('/v1/coupons', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n PromotionCode,\n PromotionCodeListResponse,\n CreatePromotionCodeParams,\n UpdatePromotionCodeParams\n} from '../types/promotion_codes';\nimport { paginate } from '../utils/paginator';\n\nexport class PromotionCodesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<PromotionCodeListResponse> {\n const resp = await this.client.get('/v1/promotion_codes', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<PromotionCode> {\n const resp = await this.client.get(`/v1/promotion_codes/${id}`);\n return resp.data;\n }\n\n async create(params: CreatePromotionCodeParams): Promise<PromotionCode> {\n const resp = await this.client.post('/v1/promotion_codes', params);\n return resp.data;\n }\n\n async update(id: string, params: UpdatePromotionCodeParams): Promise<PromotionCode> {\n const resp = await this.client.patch(`/v1/promotion_codes/${id}`, params);\n return resp.data;\n }\n\n async iterateAllPromotionCodes(per_page = 20) {\n return paginate<PromotionCode>(async (page: number) => {\n const res = await this.client.get('/v1/promotion_codes', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n Discount,\n DiscountListResponse,\n ValidateDiscountsParams\n} from '../types/discounts';\nimport { paginate } from '../utils/paginator';\n\nexport class DiscountsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(per_page?: number, page?: number): Promise<DiscountListResponse> {\n const resp = await this.client.get('/v1/discounts', { params: { per_page, page } });\n return resp.data;\n }\n\n async get(id: string): Promise<Discount> {\n const resp = await this.client.get(`/v1/discounts/${id}`);\n return resp.data;\n }\n\n async validate(params: ValidateDiscountsParams): Promise<Discount[]> {\n const resp = await this.client.post('/v1/discounts/validate', params);\n return resp.data;\n }\n\n async iterateAllDiscounts(per_page = 20) {\n return paginate<Discount>(async (page: number) => {\n const res = await this.client.get('/v1/discounts', { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n PaymentLinkSession,\n CreatePaymentLinkSessionParams\n} from '../types/payment_link_sessions';\n\nexport class PaymentLinkSessionsAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreatePaymentLinkSessionParams): Promise<PaymentLinkSession> {\n const resp = await this.client.post('/v1/payment_link_sessions', params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n SubscriptionChangeLog,\n SubscriptionChangeLogListResponse\n} from '../types/subscription_change_logs';\nimport { paginate } from '../utils/paginator';\n\nexport class SubscriptionChangeLogsAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(subscriptionId: string, per_page?: number, page?: number): Promise<SubscriptionChangeLogListResponse> {\n const resp = await this.client.get(`/v1/subscriptions/${subscriptionId}/change_logs`, { params: { per_page, page } });\n return resp.data;\n }\n\n async iterateAllSubscriptionChangeLogs(subscriptionId: string, per_page = 20) {\n return paginate<SubscriptionChangeLog>(async (page: number) => {\n const res = await this.client.get(`/v1/subscriptions/${subscriptionId}/change_logs`, { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n Metering,\n CreateMeteringParams,\n UpdateMeteringParams,\n MeteringEvent,\n CreateMeteringEventParams,\n UpdateMeteringEventParams,\n BillingInvoice,\n CreateBillingInvoiceParams,\n BillingCredit,\n CreateBillingCreditParams,\n BillingReport\n} from '../types/billing';\n\nexport class BillingAPI {\n constructor(private client: AxiosInstance) {}\n\n async createMetering(params: CreateMeteringParams): Promise<Metering> {\n const resp = await this.client.post('/v1/billing/metering', params);\n return resp.data;\n }\n\n async getMetering(id: string): Promise<Metering> {\n const resp = await this.client.get(`/v1/billing/metering/${id}`);\n return resp.data;\n }\n\n async updateMetering(id: string, params: UpdateMeteringParams): Promise<Metering> {\n const resp = await this.client.patch(`/v1/billing/metering/${id}`, params);\n return resp.data;\n }\n\n async createMeteringEvent(params: CreateMeteringEventParams): Promise<MeteringEvent> {\n const resp = await this.client.post('/v1/billing/metering_events', params);\n return resp.data;\n }\n\n async getMeteringEvent(id: string): Promise<MeteringEvent> {\n const resp = await this.client.get(`/v1/billing/metering_events/${id}`);\n return resp.data;\n }\n\n async updateMeteringEvent(id: string, params: UpdateMeteringEventParams): Promise<MeteringEvent> {\n const resp = await this.client.patch(`/v1/billing/metering_events/${id}`, params);\n return resp.data;\n }\n\n async createBillingInvoice(params: CreateBillingInvoiceParams): Promise<BillingInvoice> {\n const resp = await this.client.post('/v1/billing/billing_invoice', params);\n return resp.data;\n }\n\n async createBillingCredit(params: CreateBillingCreditParams): Promise<BillingCredit> {\n const resp = await this.client.post('/v1/billing/billing_credit', params);\n return resp.data;\n }\n\n async getBillingCredit(id: string): Promise<BillingCredit> {\n const resp = await this.client.get(`/v1/billing/billing_credit/${id}`);\n return resp.data;\n }\n\n async getCustomerReport(params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get('/v1/billing/report/customer', { params });\n return resp.data;\n }\n\n async getEventReport(eventName: string, params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get(`/v1/billing/report/event/${eventName}`, { params });\n return resp.data;\n }\n\n async getEventsReport(params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get('/v1/billing/report/events', { params });\n return resp.data;\n }\n\n async getSubscriptionReport(params?: Record<string, unknown>): Promise<BillingReport> {\n const resp = await this.client.get('/v1/billing/report/subscription', { params });\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { ThreeDSIntent, CreateThreeDSIntentParams } from '../types/three_ds';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class ThreeDSAPI {\n constructor(private client: AxiosInstance) {}\n\n async create(params: CreateThreeDSIntentParams, opts?: RequestOptions): Promise<ThreeDSIntent> {\n const resp = await this.client.post('/v1/3ds/intents', params, maybePublishableKey(opts));\n return resp.data;\n }\n\n async get(id: string, opts?: RequestOptions): Promise<ThreeDSIntent> {\n const resp = await this.client.get(`/v1/3ds/intents/${id}`, maybePublishableKey(opts));\n return resp.data;\n }\n\n async resend(id: string, opts?: RequestOptions): Promise<ThreeDSIntent> {\n const resp = await this.client.post(`/v1/3ds/intents/${id}/resend`, undefined, maybePublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n ProductPhase,\n ProductPhaseListResponse,\n CreateProductPhaseParams,\n UpdateProductPhaseParams\n} from '../types/product_phases';\nimport { paginate } from '../utils/paginator';\n\nexport class ProductPhasesAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(productId: string, per_page?: number, page?: number): Promise<ProductPhaseListResponse> {\n const resp = await this.client.get(`/v1/products/${productId}/phases`, { params: { per_page, page } });\n return resp.data;\n }\n\n async get(productId: string, phaseId: string): Promise<ProductPhase> {\n const resp = await this.client.get(`/v1/products/${productId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async create(productId: string, params: CreateProductPhaseParams): Promise<ProductPhase> {\n const resp = await this.client.post(`/v1/products/${productId}/phases`, params);\n return resp.data;\n }\n\n async update(productId: string, phaseId: string, params: UpdateProductPhaseParams): Promise<ProductPhase> {\n const resp = await this.client.patch(`/v1/products/${productId}/phases/${phaseId}`, params);\n return resp.data;\n }\n\n async delete(productId: string, phaseId: string): Promise<ProductPhase> {\n const resp = await this.client.delete(`/v1/products/${productId}/phases/${phaseId}`);\n return resp.data;\n }\n\n async bulkUpdate(productId: string, phases: Array<{ id: string; [key: string]: unknown }>): Promise<ProductPhaseListResponse> {\n const resp = await this.client.patch(`/v1/products/${productId}/phases/bulk_update`, { phases });\n return resp.data;\n }\n\n async iterateAllProductPhases(productId: string, per_page = 20) {\n return paginate<ProductPhase>(async (page: number) => {\n const res = await this.client.get(`/v1/products/${productId}/phases`, { params: { per_page, page } });\n return res.data;\n }, per_page);\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { TermsOfServiceTokenResponse, UpdateTermsOfServiceParams } from '../types/terms_of_service';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class TermsOfServiceAPI {\n constructor(private client: AxiosInstance) {}\n\n async createToken(opts?: RequestOptions): Promise<TermsOfServiceTokenResponse> {\n const resp = await this.client.post('/v1/terms_of_service', {}, maybePublishableKey(opts));\n return resp.data;\n }\n\n async update(params: UpdateTermsOfServiceParams): Promise<TermsOfServiceTokenResponse> {\n const resp = await this.client.patch('/v1/terms_of_service', params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n OnboardingSession,\n OnboardingSessionListResponse,\n ListOnboardingSessionsParams,\n CreateOnboardingSessionParams,\n UpdateOnboardingSessionParams,\n OnboardingPayoutParams\n} from '../types/onboarding';\n\nexport class OnboardingAPI {\n constructor(private client: AxiosInstance) {}\n\n async list(params?: ListOnboardingSessionsParams): Promise<OnboardingSessionListResponse> {\n const resp = await this.client.get('/v1/onboarding/sessions', { params });\n return resp.data;\n }\n\n async create(params: CreateOnboardingSessionParams): Promise<OnboardingSession> {\n const resp = await this.client.post('/v1/onboarding/sessions', params);\n return resp.data;\n }\n\n async get(sessionId: string): Promise<OnboardingSession> {\n const resp = await this.client.get(`/v1/onboarding/sessions/${sessionId}`);\n return resp.data;\n }\n\n async update(sessionId: string, params: UpdateOnboardingSessionParams): Promise<OnboardingSession> {\n const resp = await this.client.patch(`/v1/onboarding/sessions/${sessionId}`, params);\n return resp.data;\n }\n\n async payout(sessionId: string, params: OnboardingPayoutParams): Promise<OnboardingSession> {\n const resp = await this.client.post(`/v1/onboarding/sessions/${sessionId}/payout`, params);\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { EvervaultConfiguration, SiftConfiguration } from '../types/configuration';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class ConfigurationAPI {\n constructor(private client: AxiosInstance) {}\n\n async getEvervaultConfiguration(opts?: RequestOptions): Promise<EvervaultConfiguration> {\n const resp = await this.client.get('/v1/config/evervault', maybePublishableKey(opts));\n return resp.data;\n }\n\n async getSiftConfiguration(opts?: RequestOptions): Promise<SiftConfiguration> {\n const resp = await this.client.get('/v1/config/sift', maybePublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type {\n AttestRequest,\n AttestResponse,\n ChallengeResponse,\n} from '../types/device_attestation';\nimport { withPublishableKey, type RequestOptions } from '../client';\n\nexport class DeviceAttestationAPI {\n constructor(private client: AxiosInstance) {}\n\n async getChallenge(opts?: RequestOptions): Promise<ChallengeResponse> {\n const resp = await this.client.post('/v1/client/device_attestation/challenge', undefined, withPublishableKey(opts));\n return resp.data;\n }\n\n async attest(params: AttestRequest, opts?: RequestOptions): Promise<AttestResponse> {\n const resp = await this.client.post('/v1/client/device_attestation/attest', params, withPublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { GooglePayConfiguration } from '../types/wallet';\nimport { withPublishableKey, type RequestOptions } from '../client';\n\nexport class WalletAPI {\n constructor(private client: AxiosInstance) {}\n\n async getGooglePayConfiguration(opts?: RequestOptions): Promise<GooglePayConfiguration> {\n const resp = await this.client.get('/v1/client/wallet/google_pay', withPublishableKey(opts));\n return resp.data;\n }\n}\n","import type { AxiosInstance } from 'axios';\nimport type { GeoComplianceStatus } from '../types/geo_compliance';\nimport { maybePublishableKey, type RequestOptions } from '../client';\n\nexport class GeoComplianceAPI {\n constructor(private client: AxiosInstance) {}\n\n async getAccountStatus(accountId: string, opts?: RequestOptions): Promise<GeoComplianceStatus> {\n const resp = await this.client.get(\n `/v1/accounts/${accountId}/geo_compliance`,\n maybePublishableKey(opts),\n );\n return resp.data;\n }\n}\n","import { createApiClient, createOnboardingSessionStore, type ClientConfig, type OnboardingSessionStore } from './client';\nimport { AccountsAPI } from './api/accounts-api';\nimport { CapabilitiesAPI } from './api/capabilities-api';\nimport { OnboardingSessionsAPI } from './api/onboarding_sessions-api';\nimport { CustomersAPI } from './api/customers-api';\nimport { PaymentMethodsAPI } from './api/payment_methods-api';\nimport { ChargeIntentsAPI } from './api/charge_intents-api';\nimport { RefundsAPI } from './api/refunds-api';\nimport { SubscriptionsAPI } from './api/subscriptions-api';\nimport { CustomerIdentityVerificationsAPI } from './api/customer_identity-api';\nimport { SubscriptionPhasesAPI } from './api/subscription_phases-api';\nimport { InvoicesAPI } from './api/invoices-api';\nimport { InvoiceLineItemsAPI } from './api/invoice_line_item-api';\nimport { DisputesAPI } from './api/disputes-api';\nimport { ProductsAPI } from './api/products-api';\nimport { ChargesAPI } from './api/charges-api';\nimport { ChargeSessionsAPI } from './api/charge_sessions-api';\nimport { SonarSessionsAPI } from './api/sonar_sessions-api';\nimport { PhoneVerificationsAPI } from './api/phone_verifications-api';\nimport { GeofencesAPI } from './api/geofences-api';\nimport { WebhookEndpointsAPI } from './api/webhook_endpoints-api';\nimport { PayoutsAPI } from './api/payouts-api';\nimport { TransfersAPI } from './api/transfers-api';\nimport { TransferFeePlansAPI } from './api/transfer_fee_plans-api';\nimport { TransferBillingAgreementsAPI } from './api/transfer_billing_agreements-api';\nimport { CouponsAPI } from './api/coupons-api';\nimport { PromotionCodesAPI } from './api/promotion_codes-api';\nimport { DiscountsAPI } from './api/discounts-api';\nimport { PaymentLinkSessionsAPI } from './api/payment_link_sessions-api';\nimport { SubscriptionChangeLogsAPI } from './api/subscription_change_logs-api';\nimport { BillingAPI } from './api/billing-api';\nimport { ThreeDSAPI } from './api/three_ds-api';\nimport { ProductPhasesAPI } from './api/product_phases-api';\nimport { TermsOfServiceAPI } from './api/terms_of_service-api';\nimport { OnboardingAPI } from './api/onboarding-api';\nimport { ConfigurationAPI } from './api/configuration-api';\nimport { DeviceAttestationAPI } from './api/device_attestation-api';\nimport { WalletAPI } from './api/wallet-api';\nimport { GeoComplianceAPI } from './api/geo_compliance-api';\n\nexport { paginate } from './utils/paginator';\nexport { FrameAPIError } from './errors/frame_api_error';\nexport { withPublishableKey, maybePublishableKey } from './client';\nexport type { ClientConfig, RequestOptions, OnboardingSessionStore } from './client';\n\nexport type {\n EvervaultConfiguration,\n SiftConfiguration,\n} from './types/configuration';\nexport type {\n ChallengeResponse,\n AttestRequest,\n AttestResponse,\n} from './types/device_attestation';\nexport type { GooglePayConfiguration } from './types/wallet';\nexport type {\n ApplePayPaymentDataHeader,\n ApplePayPaymentData,\n ApplePayPaymentMethodInfo,\n ApplePayToken,\n ApplePayBillingContact,\n ApplePayTokenDetails,\n ApplePayDetails,\n ApplePayWalletEnvelope,\n CreateApplePayPaymentMethodParams,\n GooglePayPaymentMethodData,\n GooglePayWalletData,\n GooglePayWalletEnvelope,\n CreateGooglePayPaymentMethodParams,\n} from './types/payment_methods';\nexport type {\n IdentityDocumentUpload,\n ReactNativeFileDescriptor,\n NodeFilePayload,\n} from './types/customer_identity';\nexport type { GeoComplianceStatus } from './types/geo_compliance';\n\nexport class FrameSDK {\n public accounts: AccountsAPI;\n public capabilities: CapabilitiesAPI;\n public onboardingSessions: OnboardingSessionsAPI;\n public customers: CustomersAPI;\n public paymentMethods: PaymentMethodsAPI;\n public chargeIntents: ChargeIntentsAPI;\n public refunds: RefundsAPI;\n public subscriptions: SubscriptionsAPI;\n public customerIdentityVerifications: CustomerIdentityVerificationsAPI;\n public subscriptionPhases: SubscriptionPhasesAPI;\n public invoices: InvoicesAPI;\n public invoiceLineItems: InvoiceLineItemsAPI;\n public disputes: DisputesAPI;\n public products: ProductsAPI;\n public charges: ChargesAPI;\n public chargeSessions: ChargeSessionsAPI;\n public sonarSessions: SonarSessionsAPI;\n public phoneVerifications: PhoneVerificationsAPI;\n public geofences: GeofencesAPI;\n public webhookEndpoints: WebhookEndpointsAPI;\n public payouts: PayoutsAPI;\n public transfers: TransfersAPI;\n public transferFeePlans: TransferFeePlansAPI;\n public transferBillingAgreements: TransferBillingAgreementsAPI;\n public coupons: CouponsAPI;\n public promotionCodes: PromotionCodesAPI;\n public discounts: DiscountsAPI;\n public paymentLinkSessions: PaymentLinkSessionsAPI;\n public subscriptionChangeLogs: SubscriptionChangeLogsAPI;\n public billing: BillingAPI;\n public threeDS: ThreeDSAPI;\n public productPhases: ProductPhasesAPI;\n public termsOfService: TermsOfServiceAPI;\n public onboarding: OnboardingAPI;\n public configuration: ConfigurationAPI;\n public deviceAttestation: DeviceAttestationAPI;\n public wallet: WalletAPI;\n public geoCompliance: GeoComplianceAPI;\n\n // Backs the active onboarding-session bearer token. Mutated in place by\n // setOnboardingSession / clearOnboardingSession so every wired API class keeps\n // sending the same auth without rebuilding the client.\n private onboardingSessionStore: OnboardingSessionStore;\n\n constructor(config: ClientConfig) {\n this.onboardingSessionStore = createOnboardingSessionStore();\n const client = createApiClient(config, this.onboardingSessionStore);\n this.accounts = new AccountsAPI(client);\n this.capabilities = new CapabilitiesAPI(client);\n this.onboardingSessions = new OnboardingSessionsAPI(client);\n this.customers = new CustomersAPI(client);\n this.paymentMethods = new PaymentMethodsAPI(client);\n this.chargeIntents = new ChargeIntentsAPI(client);\n this.refunds = new RefundsAPI(client);\n this.subscriptions = new SubscriptionsAPI(client);\n this.customerIdentityVerifications = new CustomerIdentityVerificationsAPI(client);\n this.subscriptionPhases = new SubscriptionPhasesAPI(client);\n this.invoices = new InvoicesAPI(client);\n this.invoiceLineItems = new InvoiceLineItemsAPI(client);\n this.disputes = new DisputesAPI(client);\n this.products = new ProductsAPI(client);\n this.charges = new ChargesAPI(client);\n this.chargeSessions = new ChargeSessionsAPI(client);\n this.sonarSessions = new SonarSessionsAPI(client);\n this.phoneVerifications = new PhoneVerificationsAPI(client);\n this.geofences = new GeofencesAPI(client);\n this.webhookEndpoints = new WebhookEndpointsAPI(client);\n this.payouts = new PayoutsAPI(client);\n this.transfers = new TransfersAPI(client);\n this.transferFeePlans = new TransferFeePlansAPI(client);\n this.transferBillingAgreements = new TransferBillingAgreementsAPI(client);\n this.coupons = new CouponsAPI(client);\n this.promotionCodes = new PromotionCodesAPI(client);\n this.discounts = new DiscountsAPI(client);\n this.paymentLinkSessions = new PaymentLinkSessionsAPI(client);\n this.subscriptionChangeLogs = new SubscriptionChangeLogsAPI(client);\n this.billing = new BillingAPI(client);\n this.threeDS = new ThreeDSAPI(client);\n this.productPhases = new ProductPhasesAPI(client);\n this.termsOfService = new TermsOfServiceAPI(client);\n this.onboarding = new OnboardingAPI(client);\n this.configuration = new ConfigurationAPI(client);\n this.deviceAttestation = new DeviceAttestationAPI(client);\n this.wallet = new WalletAPI(client);\n this.geoCompliance = new GeoComplianceAPI(client);\n }\n\n /**\n * Begin an onboarding session. While a session is active, every request sends\n * `Authorization: Bearer <token>` (e.g. an `onb_sess_...` token), overriding\n * the configured publishable/secret keys regardless of `usePublishableKey`.\n * A per-request `authToken` (object client_secret) still takes precedence.\n *\n * Mirrors the native iOS `beginOnboardingSession`.\n */\n setOnboardingSession(token: string): void {\n this.onboardingSessionStore.token = token;\n }\n\n /**\n * End the active onboarding session, reverting auth to the configured\n * publishable/secret keys.\n *\n * Safe-clear: when `token` is provided, the session is cleared only if it\n * matches the currently active token. This mirrors Android's guarded\n * teardown so a stale unmount cannot wipe a newer session. Omit `token` to\n * force-clear unconditionally.\n *\n * @returns true if a session was cleared, false if the guard prevented it.\n */\n clearOnboardingSession(token?: string): boolean {\n if (token !== undefined && this.onboardingSessionStore.token !== token) {\n return false;\n }\n this.onboardingSessionStore.token = null;\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa,gBAAb,cAAmC,MAAM;CAKvC,YAAY,SAAiB,MAAc,QAAgB,KAAU;EACnE,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,KAAK,MAAM;CACb;AACF;;;AC2BA,MAAM,4BAA4B;AAClC,MAAM,mBAAmB;AAYzB,MAAa,sCAA8D,EAAE,OAAO,KAAK;AAMzF,SAAS,sBAAsB,KAAmB;CAChD,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,OAAO;CAC5C,MAAM,gBAAgB,IAAI,gBACf;EACL,MAAM,EACJ,UACC,mBAAmB,YACpB,GAAG,eACD,IAAI;EACR,MAAM,iBACJ,WAAW,OAAO,YAAY,WAC1B,OAAO,YACL,OAAO,QAAQ,OAAkC,CAAC,CAAC,QAChD,CAAC,OAAO,EAAE,YAAY,MAAM,eAC/B,CACF,IACA;EACN,OAAO;GAAE,GAAG;GAAY,SAAS;EAAe;CAClD,EAAA,CAAG,IACH,KAAA;CACJ,OAAO;EACL,SAAS,IAAI;EACb,MAAM,IAAI;EACV,MA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.d.cts
CHANGED
|
@@ -9,6 +9,10 @@ interface ClientConfig {
|
|
|
9
9
|
}
|
|
10
10
|
interface RequestOptions {
|
|
11
11
|
usePublishableKey?: boolean;
|
|
12
|
+
authToken?: string;
|
|
13
|
+
}
|
|
14
|
+
interface OnboardingSessionStore {
|
|
15
|
+
token: string | null;
|
|
12
16
|
}
|
|
13
17
|
declare function withPublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig;
|
|
14
18
|
declare function maybePublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig;
|
|
@@ -404,8 +408,8 @@ interface RequestCapabilitiesParams {
|
|
|
404
408
|
declare class CapabilitiesAPI {
|
|
405
409
|
private client;
|
|
406
410
|
constructor(client: AxiosInstance);
|
|
407
|
-
list(accountId: string): Promise<Capability[]>;
|
|
408
|
-
request(accountId: string, params: RequestCapabilitiesParams): Promise<Capability[]>;
|
|
411
|
+
list(accountId: string, opts?: RequestOptions): Promise<Capability[]>;
|
|
412
|
+
request(accountId: string, params: RequestCapabilitiesParams, opts?: RequestOptions): Promise<Capability[]>;
|
|
409
413
|
get(accountId: string, name: string): Promise<Capability>;
|
|
410
414
|
disable(accountId: string, name: string): Promise<Capability>;
|
|
411
415
|
}
|
|
@@ -432,8 +436,8 @@ interface CreateOnboardingSessionParams$1 {
|
|
|
432
436
|
declare class OnboardingSessionsAPI {
|
|
433
437
|
private client;
|
|
434
438
|
constructor(client: AxiosInstance);
|
|
435
|
-
create(params: CreateOnboardingSessionParams$1): Promise<OnboardingSession$1>;
|
|
436
|
-
getByAccount(accountId: string): Promise<OnboardingSession$1>;
|
|
439
|
+
create(params: CreateOnboardingSessionParams$1, opts?: RequestOptions): Promise<OnboardingSession$1>;
|
|
440
|
+
getByAccount(accountId: string, opts?: RequestOptions): Promise<OnboardingSession$1>;
|
|
437
441
|
}
|
|
438
442
|
//#endregion
|
|
439
443
|
//#region src/api/customers-api.d.ts
|
|
@@ -611,7 +615,7 @@ declare class ChargeIntentsAPI {
|
|
|
611
615
|
constructor(client: AxiosInstance);
|
|
612
616
|
create(params: CreateChargeIntentParams, opts?: RequestOptions): Promise<ChargeIntent>;
|
|
613
617
|
update(id: string, params: UpdateChargeIntentParams): Promise<ChargeIntent>;
|
|
614
|
-
get(id: string): Promise<ChargeIntent>;
|
|
618
|
+
get(id: string, opts?: RequestOptions): Promise<ChargeIntent>;
|
|
615
619
|
list(per_page?: number, page?: number): Promise<ChargeIntentListResponse>;
|
|
616
620
|
iterateAllChargeIntents(per_page?: number): Promise<AsyncGenerator<ChargeIntent, any, any>>;
|
|
617
621
|
cancel(id: string): Promise<ChargeIntent>;
|
|
@@ -734,11 +738,11 @@ interface SubscriptionListResponse {
|
|
|
734
738
|
subscriptions: Subscription[];
|
|
735
739
|
}
|
|
736
740
|
interface CreateSubscriptionParams {
|
|
737
|
-
customer
|
|
741
|
+
customer?: string;
|
|
742
|
+
account?: string;
|
|
738
743
|
product: string;
|
|
739
744
|
currency: string;
|
|
740
745
|
default_payment_method?: string;
|
|
741
|
-
account?: string;
|
|
742
746
|
description?: string;
|
|
743
747
|
proration_behavior?: string;
|
|
744
748
|
metadata?: Record<string, any>;
|
|
@@ -1818,9 +1822,9 @@ interface CreateThreeDSIntentParams {
|
|
|
1818
1822
|
declare class ThreeDSAPI {
|
|
1819
1823
|
private client;
|
|
1820
1824
|
constructor(client: AxiosInstance);
|
|
1821
|
-
create(params: CreateThreeDSIntentParams): Promise<ThreeDSIntent>;
|
|
1822
|
-
get(id: string): Promise<ThreeDSIntent>;
|
|
1823
|
-
resend(id: string): Promise<ThreeDSIntent>;
|
|
1825
|
+
create(params: CreateThreeDSIntentParams, opts?: RequestOptions): Promise<ThreeDSIntent>;
|
|
1826
|
+
get(id: string, opts?: RequestOptions): Promise<ThreeDSIntent>;
|
|
1827
|
+
resend(id: string, opts?: RequestOptions): Promise<ThreeDSIntent>;
|
|
1824
1828
|
}
|
|
1825
1829
|
//#endregion
|
|
1826
1830
|
//#region src/types/product_phases.d.ts
|
|
@@ -1887,7 +1891,7 @@ interface UpdateTermsOfServiceParams {
|
|
|
1887
1891
|
declare class TermsOfServiceAPI {
|
|
1888
1892
|
private client;
|
|
1889
1893
|
constructor(client: AxiosInstance);
|
|
1890
|
-
createToken(): Promise<TermsOfServiceTokenResponse>;
|
|
1894
|
+
createToken(opts?: RequestOptions): Promise<TermsOfServiceTokenResponse>;
|
|
1891
1895
|
update(params: UpdateTermsOfServiceParams): Promise<TermsOfServiceTokenResponse>;
|
|
1892
1896
|
}
|
|
1893
1897
|
//#endregion
|
|
@@ -2064,8 +2068,30 @@ declare class FrameSDK {
|
|
|
2064
2068
|
deviceAttestation: DeviceAttestationAPI;
|
|
2065
2069
|
wallet: WalletAPI;
|
|
2066
2070
|
geoCompliance: GeoComplianceAPI;
|
|
2071
|
+
private onboardingSessionStore;
|
|
2067
2072
|
constructor(config: ClientConfig);
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2073
|
+
/**
|
|
2074
|
+
* Begin an onboarding session. While a session is active, every request sends
|
|
2075
|
+
* `Authorization: Bearer <token>` (e.g. an `onb_sess_...` token), overriding
|
|
2076
|
+
* the configured publishable/secret keys regardless of `usePublishableKey`.
|
|
2077
|
+
* A per-request `authToken` (object client_secret) still takes precedence.
|
|
2078
|
+
*
|
|
2079
|
+
* Mirrors the native iOS `beginOnboardingSession`.
|
|
2080
|
+
*/
|
|
2081
|
+
setOnboardingSession(token: string): void;
|
|
2082
|
+
/**
|
|
2083
|
+
* End the active onboarding session, reverting auth to the configured
|
|
2084
|
+
* publishable/secret keys.
|
|
2085
|
+
*
|
|
2086
|
+
* Safe-clear: when `token` is provided, the session is cleared only if it
|
|
2087
|
+
* matches the currently active token. This mirrors Android's guarded
|
|
2088
|
+
* teardown so a stale unmount cannot wipe a newer session. Omit `token` to
|
|
2089
|
+
* force-clear unconditionally.
|
|
2090
|
+
*
|
|
2091
|
+
* @returns true if a session was cleared, false if the guard prevented it.
|
|
2092
|
+
*/
|
|
2093
|
+
clearOnboardingSession(token?: string): boolean;
|
|
2094
|
+
}
|
|
2095
|
+
//#endregion
|
|
2096
|
+
export { type ApplePayBillingContact, type ApplePayDetails, type ApplePayPaymentData, type ApplePayPaymentDataHeader, type ApplePayPaymentMethodInfo, type ApplePayToken, type ApplePayTokenDetails, type ApplePayWalletEnvelope, type AttestRequest, type AttestResponse, type ChallengeResponse, type ClientConfig, type CreateApplePayPaymentMethodParams, type CreateGooglePayPaymentMethodParams, type EvervaultConfiguration, FrameAPIError, FrameSDK, type GeoComplianceStatus, type GooglePayConfiguration, type GooglePayPaymentMethodData, type GooglePayWalletData, type GooglePayWalletEnvelope, type IdentityDocumentUpload, type NodeFilePayload, type OnboardingSessionStore, type ReactNativeFileDescriptor, type RequestOptions, type SiftConfiguration, maybePublishableKey, paginate, withPublishableKey };
|
|
2071
2097
|
//# sourceMappingURL=index.d.cts.map
|