framepayments 2.1.8 → 2.3.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/dist/index.cjs +1178 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2071 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +2071 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1154 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +16 -4
- package/dist/api/accounts-api.d.ts +0 -22
- package/dist/api/accounts-api.d.ts.map +0 -1
- package/dist/api/accounts-api.js +0 -64
- package/dist/api/accounts-api.js.map +0 -1
- package/dist/api/billing-api.d.ts +0 -20
- package/dist/api/billing-api.d.ts.map +0 -1
- package/dist/api/billing-api.js +0 -58
- package/dist/api/billing-api.js.map +0 -1
- package/dist/api/capabilities-api.d.ts +0 -11
- package/dist/api/capabilities-api.d.ts.map +0 -1
- package/dist/api/capabilities-api.js +0 -22
- package/dist/api/capabilities-api.js.map +0 -1
- package/dist/api/charge_intents-api.d.ts +0 -17
- package/dist/api/charge_intents-api.d.ts.map +0 -1
- package/dist/api/charge_intents-api.js +0 -48
- package/dist/api/charge_intents-api.js.map +0 -1
- package/dist/api/charge_sessions-api.d.ts +0 -9
- package/dist/api/charge_sessions-api.d.ts.map +0 -1
- package/dist/api/charge_sessions-api.js +0 -14
- package/dist/api/charge_sessions-api.js.map +0 -1
- package/dist/api/charges-api.d.ts +0 -9
- package/dist/api/charges-api.d.ts.map +0 -1
- package/dist/api/charges-api.js +0 -14
- package/dist/api/charges-api.js.map +0 -1
- package/dist/api/configuration-api.d.ts +0 -10
- package/dist/api/configuration-api.d.ts.map +0 -1
- package/dist/api/configuration-api.js +0 -15
- package/dist/api/configuration-api.js.map +0 -1
- package/dist/api/coupons-api.d.ts +0 -12
- package/dist/api/coupons-api.d.ts.map +0 -1
- package/dist/api/coupons-api.js +0 -29
- package/dist/api/coupons-api.js.map +0 -1
- package/dist/api/customer_identity-api.d.ts +0 -14
- package/dist/api/customer_identity-api.d.ts.map +0 -1
- package/dist/api/customer_identity-api.js +0 -86
- package/dist/api/customer_identity-api.js.map +0 -1
- package/dist/api/customers-api.d.ts +0 -18
- package/dist/api/customers-api.d.ts.map +0 -1
- package/dist/api/customers-api.js +0 -61
- package/dist/api/customers-api.js.map +0 -1
- package/dist/api/device_attestation-api.d.ts +0 -10
- package/dist/api/device_attestation-api.d.ts.map +0 -1
- package/dist/api/device_attestation-api.js +0 -15
- package/dist/api/device_attestation-api.js.map +0 -1
- package/dist/api/discounts-api.d.ts +0 -11
- package/dist/api/discounts-api.d.ts.map +0 -1
- package/dist/api/discounts-api.js +0 -25
- package/dist/api/discounts-api.js.map +0 -1
- package/dist/api/disputes-api.d.ts +0 -11
- package/dist/api/disputes-api.d.ts.map +0 -1
- package/dist/api/disputes-api.js +0 -22
- package/dist/api/disputes-api.js.map +0 -1
- package/dist/api/geo_compliance-api.d.ts +0 -9
- package/dist/api/geo_compliance-api.d.ts.map +0 -1
- package/dist/api/geo_compliance-api.js +0 -11
- package/dist/api/geo_compliance-api.js.map +0 -1
- package/dist/api/geofences-api.d.ts +0 -12
- package/dist/api/geofences-api.d.ts.map +0 -1
- package/dist/api/geofences-api.js +0 -17
- package/dist/api/geofences-api.js.map +0 -1
- package/dist/api/invoice_line_item-api.d.ts +0 -13
- package/dist/api/invoice_line_item-api.d.ts.map +0 -1
- package/dist/api/invoice_line_item-api.js +0 -26
- package/dist/api/invoice_line_item-api.js.map +0 -1
- package/dist/api/invoices-api.d.ts +0 -13
- package/dist/api/invoices-api.d.ts.map +0 -1
- package/dist/api/invoices-api.js +0 -32
- package/dist/api/invoices-api.js.map +0 -1
- package/dist/api/onboarding-api.d.ts +0 -12
- package/dist/api/onboarding-api.d.ts.map +0 -1
- package/dist/api/onboarding-api.js +0 -26
- package/dist/api/onboarding-api.js.map +0 -1
- package/dist/api/onboarding_sessions-api.d.ts +0 -9
- package/dist/api/onboarding_sessions-api.d.ts.map +0 -1
- package/dist/api/onboarding_sessions-api.js +0 -16
- package/dist/api/onboarding_sessions-api.js.map +0 -1
- package/dist/api/payment_link_sessions-api.d.ts +0 -8
- package/dist/api/payment_link_sessions-api.d.ts.map +0 -1
- package/dist/api/payment_link_sessions-api.js +0 -10
- package/dist/api/payment_link_sessions-api.js.map +0 -1
- package/dist/api/payment_methods-api.d.ts +0 -23
- package/dist/api/payment_methods-api.d.ts.map +0 -1
- package/dist/api/payment_methods-api.js +0 -73
- package/dist/api/payment_methods-api.js.map +0 -1
- package/dist/api/payouts-api.d.ts +0 -8
- package/dist/api/payouts-api.d.ts.map +0 -1
- package/dist/api/payouts-api.js +0 -10
- package/dist/api/payouts-api.js.map +0 -1
- package/dist/api/phone_verifications-api.d.ts +0 -10
- package/dist/api/phone_verifications-api.d.ts.map +0 -1
- package/dist/api/phone_verifications-api.js +0 -15
- package/dist/api/phone_verifications-api.js.map +0 -1
- package/dist/api/product_phases-api.d.ts +0 -17
- package/dist/api/product_phases-api.d.ts.map +0 -1
- package/dist/api/product_phases-api.js +0 -37
- package/dist/api/product_phases-api.js.map +0 -1
- package/dist/api/products-api.d.ts +0 -14
- package/dist/api/products-api.d.ts.map +0 -1
- package/dist/api/products-api.js +0 -39
- package/dist/api/products-api.js.map +0 -1
- package/dist/api/promotion_codes-api.d.ts +0 -12
- package/dist/api/promotion_codes-api.d.ts.map +0 -1
- package/dist/api/promotion_codes-api.js +0 -29
- package/dist/api/promotion_codes-api.js.map +0 -1
- package/dist/api/refunds-api.d.ts +0 -11
- package/dist/api/refunds-api.d.ts.map +0 -1
- package/dist/api/refunds-api.js +0 -27
- package/dist/api/refunds-api.js.map +0 -1
- package/dist/api/sonar_sessions-api.d.ts +0 -9
- package/dist/api/sonar_sessions-api.d.ts.map +0 -1
- package/dist/api/sonar_sessions-api.js +0 -14
- package/dist/api/sonar_sessions-api.js.map +0 -1
- package/dist/api/subscription_change_logs-api.d.ts +0 -9
- package/dist/api/subscription_change_logs-api.d.ts.map +0 -1
- package/dist/api/subscription_change_logs-api.js +0 -17
- package/dist/api/subscription_change_logs-api.js.map +0 -1
- package/dist/api/subscription_phases-api.d.ts +0 -21
- package/dist/api/subscription_phases-api.d.ts.map +0 -1
- package/dist/api/subscription_phases-api.js +0 -39
- package/dist/api/subscription_phases-api.js.map +0 -1
- package/dist/api/subscriptions-api.d.ts +0 -14
- package/dist/api/subscriptions-api.d.ts.map +0 -1
- package/dist/api/subscriptions-api.js +0 -39
- package/dist/api/subscriptions-api.js.map +0 -1
- package/dist/api/terms_of_service-api.d.ts +0 -9
- package/dist/api/terms_of_service-api.d.ts.map +0 -1
- package/dist/api/terms_of_service-api.js +0 -14
- package/dist/api/terms_of_service-api.js.map +0 -1
- package/dist/api/three_ds-api.d.ts +0 -10
- package/dist/api/three_ds-api.d.ts.map +0 -1
- package/dist/api/three_ds-api.js +0 -18
- package/dist/api/three_ds-api.js.map +0 -1
- package/dist/api/transfer_billing_agreements-api.d.ts +0 -12
- package/dist/api/transfer_billing_agreements-api.d.ts.map +0 -1
- package/dist/api/transfer_billing_agreements-api.js +0 -29
- package/dist/api/transfer_billing_agreements-api.js.map +0 -1
- package/dist/api/transfer_fee_plans-api.d.ts +0 -11
- package/dist/api/transfer_fee_plans-api.d.ts.map +0 -1
- package/dist/api/transfer_fee_plans-api.js +0 -25
- package/dist/api/transfer_fee_plans-api.js.map +0 -1
- package/dist/api/transfers-api.d.ts +0 -12
- package/dist/api/transfers-api.d.ts.map +0 -1
- package/dist/api/transfers-api.js +0 -26
- package/dist/api/transfers-api.js.map +0 -1
- package/dist/api/wallet-api.d.ts +0 -9
- package/dist/api/wallet-api.d.ts.map +0 -1
- package/dist/api/wallet-api.js +0 -11
- package/dist/api/wallet-api.js.map +0 -1
- package/dist/api/webhook_endpoints-api.d.ts +0 -9
- package/dist/api/webhook_endpoints-api.d.ts.map +0 -1
- package/dist/api/webhook_endpoints-api.js +0 -17
- package/dist/api/webhook_endpoints-api.js.map +0 -1
- package/dist/client.d.ts +0 -14
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -111
- package/dist/client.js.map +0 -1
- package/dist/errors/frame_api_error.d.ts +0 -7
- package/dist/errors/frame_api_error.d.ts.map +0 -1
- package/dist/errors/frame_api_error.js +0 -10
- package/dist/errors/frame_api_error.js.map +0 -1
- package/dist/index.d.ts +0 -91
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -86
- package/dist/index.js.map +0 -1
- package/dist/types/accounts.d.ts +0 -105
- package/dist/types/accounts.d.ts.map +0 -1
- package/dist/types/accounts.js +0 -2
- package/dist/types/accounts.js.map +0 -1
- package/dist/types/billing.d.ts +0 -84
- package/dist/types/billing.d.ts.map +0 -1
- package/dist/types/billing.js +0 -2
- package/dist/types/billing.js.map +0 -1
- package/dist/types/capabilities.d.ts +0 -21
- package/dist/types/capabilities.d.ts.map +0 -1
- package/dist/types/capabilities.js +0 -2
- package/dist/types/capabilities.js.map +0 -1
- package/dist/types/charge_intents.d.ts +0 -133
- package/dist/types/charge_intents.d.ts.map +0 -1
- package/dist/types/charge_intents.js +0 -28
- package/dist/types/charge_intents.js.map +0 -1
- package/dist/types/charge_sessions.d.ts +0 -18
- package/dist/types/charge_sessions.d.ts.map +0 -1
- package/dist/types/charge_sessions.js +0 -2
- package/dist/types/charge_sessions.js.map +0 -1
- package/dist/types/charges.d.ts +0 -29
- package/dist/types/charges.d.ts.map +0 -1
- package/dist/types/charges.js +0 -2
- package/dist/types/charges.js.map +0 -1
- package/dist/types/configuration.d.ts +0 -9
- package/dist/types/configuration.d.ts.map +0 -1
- package/dist/types/configuration.js +0 -2
- package/dist/types/configuration.js.map +0 -1
- package/dist/types/coupons.d.ts +0 -33
- package/dist/types/coupons.d.ts.map +0 -1
- package/dist/types/coupons.js +0 -2
- package/dist/types/coupons.js.map +0 -1
- package/dist/types/customer_identity.d.ts +0 -49
- package/dist/types/customer_identity.d.ts.map +0 -1
- package/dist/types/customer_identity.js +0 -8
- package/dist/types/customer_identity.js.map +0 -1
- package/dist/types/customers.d.ts +0 -76
- package/dist/types/customers.d.ts.map +0 -1
- package/dist/types/customers.js +0 -6
- package/dist/types/customers.js.map +0 -1
- package/dist/types/device_attestation.d.ts +0 -13
- package/dist/types/device_attestation.d.ts.map +0 -1
- package/dist/types/device_attestation.js +0 -2
- package/dist/types/device_attestation.js.map +0 -1
- package/dist/types/discounts.d.ts +0 -22
- package/dist/types/discounts.d.ts.map +0 -1
- package/dist/types/discounts.js +0 -2
- package/dist/types/discounts.js.map +0 -1
- package/dist/types/disputes.d.ts +0 -67
- package/dist/types/disputes.d.ts.map +0 -1
- package/dist/types/disputes.js +0 -11
- package/dist/types/disputes.js.map +0 -1
- package/dist/types/events.d.ts +0 -129
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/events.js +0 -50
- package/dist/types/events.js.map +0 -1
- package/dist/types/geo_compliance.d.ts +0 -8
- package/dist/types/geo_compliance.d.ts.map +0 -1
- package/dist/types/geo_compliance.js +0 -2
- package/dist/types/geo_compliance.js.map +0 -1
- package/dist/types/geofences.d.ts +0 -16
- package/dist/types/geofences.d.ts.map +0 -1
- package/dist/types/geofences.js +0 -2
- package/dist/types/geofences.js.map +0 -1
- package/dist/types/invoice_line_items.d.ts +0 -22
- package/dist/types/invoice_line_items.d.ts.map +0 -1
- package/dist/types/invoice_line_items.js +0 -2
- package/dist/types/invoice_line_items.js.map +0 -1
- package/dist/types/invoices.d.ts +0 -80
- package/dist/types/invoices.d.ts.map +0 -1
- package/dist/types/invoices.js +0 -16
- package/dist/types/invoices.js.map +0 -1
- package/dist/types/onboarding.d.ts +0 -43
- package/dist/types/onboarding.d.ts.map +0 -1
- package/dist/types/onboarding.js +0 -2
- package/dist/types/onboarding.js.map +0 -1
- package/dist/types/onboarding_sessions.d.ts +0 -17
- package/dist/types/onboarding_sessions.d.ts.map +0 -1
- package/dist/types/onboarding_sessions.js +0 -2
- package/dist/types/onboarding_sessions.js.map +0 -1
- package/dist/types/payment_link_sessions.d.ts +0 -17
- package/dist/types/payment_link_sessions.d.ts.map +0 -1
- package/dist/types/payment_link_sessions.js +0 -2
- package/dist/types/payment_link_sessions.js.map +0 -1
- package/dist/types/payment_links.d.ts +0 -16
- package/dist/types/payment_links.d.ts.map +0 -1
- package/dist/types/payment_links.js +0 -6
- package/dist/types/payment_links.js.map +0 -1
- package/dist/types/payment_methods.d.ts +0 -158
- package/dist/types/payment_methods.d.ts.map +0 -1
- package/dist/types/payment_methods.js +0 -17
- package/dist/types/payment_methods.js.map +0 -1
- package/dist/types/payouts.d.ts +0 -20
- package/dist/types/payouts.d.ts.map +0 -1
- package/dist/types/payouts.js +0 -2
- package/dist/types/payouts.js.map +0 -1
- package/dist/types/phone_verifications.d.ts +0 -19
- package/dist/types/phone_verifications.d.ts.map +0 -1
- package/dist/types/phone_verifications.js +0 -2
- package/dist/types/phone_verifications.js.map +0 -1
- package/dist/types/product_phases.d.ts +0 -33
- package/dist/types/product_phases.d.ts.map +0 -1
- package/dist/types/product_phases.js +0 -2
- package/dist/types/product_phases.js.map +0 -1
- package/dist/types/products.d.ts +0 -69
- package/dist/types/products.d.ts.map +0 -1
- package/dist/types/products.js +0 -15
- package/dist/types/products.js.map +0 -1
- package/dist/types/promotion_codes.d.ts +0 -32
- package/dist/types/promotion_codes.d.ts.map +0 -1
- package/dist/types/promotion_codes.js +0 -2
- package/dist/types/promotion_codes.js.map +0 -1
- package/dist/types/refunds.d.ts +0 -44
- package/dist/types/refunds.d.ts.map +0 -1
- package/dist/types/refunds.js +0 -22
- package/dist/types/refunds.js.map +0 -1
- package/dist/types/sonar_sessions.d.ts +0 -18
- package/dist/types/sonar_sessions.d.ts.map +0 -1
- package/dist/types/sonar_sessions.js +0 -2
- package/dist/types/sonar_sessions.js.map +0 -1
- package/dist/types/subscription_change_logs.d.ts +0 -14
- package/dist/types/subscription_change_logs.d.ts.map +0 -1
- package/dist/types/subscription_change_logs.js +0 -2
- package/dist/types/subscription_change_logs.js.map +0 -1
- package/dist/types/subscription_phases.d.ts +0 -55
- package/dist/types/subscription_phases.d.ts.map +0 -1
- package/dist/types/subscription_phases.js +0 -11
- package/dist/types/subscription_phases.js.map +0 -1
- package/dist/types/subscriptions.d.ts +0 -81
- package/dist/types/subscriptions.d.ts.map +0 -1
- package/dist/types/subscriptions.js +0 -10
- package/dist/types/subscriptions.js.map +0 -1
- package/dist/types/terms_of_service.d.ts +0 -10
- package/dist/types/terms_of_service.d.ts.map +0 -1
- package/dist/types/terms_of_service.js +0 -2
- package/dist/types/terms_of_service.js.map +0 -1
- package/dist/types/three_ds.d.ts +0 -17
- package/dist/types/three_ds.d.ts.map +0 -1
- package/dist/types/three_ds.js +0 -2
- package/dist/types/three_ds.js.map +0 -1
- package/dist/types/transfer_billing_agreements.d.ts +0 -26
- package/dist/types/transfer_billing_agreements.d.ts.map +0 -1
- package/dist/types/transfer_billing_agreements.js +0 -2
- package/dist/types/transfer_billing_agreements.js.map +0 -1
- package/dist/types/transfer_fee_plans.d.ts +0 -25
- package/dist/types/transfer_fee_plans.d.ts.map +0 -1
- package/dist/types/transfer_fee_plans.js +0 -2
- package/dist/types/transfer_fee_plans.js.map +0 -1
- package/dist/types/transfers.d.ts +0 -30
- package/dist/types/transfers.d.ts.map +0 -1
- package/dist/types/transfers.js +0 -2
- package/dist/types/transfers.js.map +0 -1
- package/dist/types/wallet.d.ts +0 -7
- package/dist/types/wallet.d.ts.map +0 -1
- package/dist/types/wallet.js +0 -2
- package/dist/types/wallet.js.map +0 -1
- package/dist/types/webhook_endpoints.d.ts +0 -17
- package/dist/types/webhook_endpoints.d.ts.map +0 -1
- package/dist/types/webhook_endpoints.js +0 -2
- package/dist/types/webhook_endpoints.js.map +0 -1
- package/dist/utils/paginator.d.ts +0 -7
- package/dist/utils/paginator.d.ts.map +0 -1
- package/dist/utils/paginator.js +0 -13
- package/dist/utils/paginator.js.map +0 -1
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2071 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
|
+
|
|
3
|
+
//#region src/client.d.ts
|
|
4
|
+
interface ClientConfig {
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
publishableKey?: string;
|
|
7
|
+
baseURL?: string;
|
|
8
|
+
defaultHeaders?: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
interface RequestOptions {
|
|
11
|
+
usePublishableKey?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function withPublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig;
|
|
14
|
+
declare function maybePublishableKey(opts?: RequestOptions & AxiosRequestConfig): AxiosRequestConfig;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/types/payment_methods.d.ts
|
|
17
|
+
declare enum PaymentMethodStatus {
|
|
18
|
+
ACTIVE = "active",
|
|
19
|
+
BLOCKED = "blocked",
|
|
20
|
+
DETACHED = "detached"
|
|
21
|
+
}
|
|
22
|
+
declare enum PaymentAccountType {
|
|
23
|
+
CHECKING = "checking",
|
|
24
|
+
SAVINGS = "savings"
|
|
25
|
+
}
|
|
26
|
+
declare enum PaymentMethodType {
|
|
27
|
+
CARD = "card",
|
|
28
|
+
ACH = "ach"
|
|
29
|
+
}
|
|
30
|
+
interface PaymentCard {
|
|
31
|
+
brand: string;
|
|
32
|
+
exp_month: string;
|
|
33
|
+
exp_year: string;
|
|
34
|
+
issuer?: string;
|
|
35
|
+
currency?: string;
|
|
36
|
+
segment?: string;
|
|
37
|
+
type?: string;
|
|
38
|
+
last_four: string;
|
|
39
|
+
}
|
|
40
|
+
interface BankAccount {
|
|
41
|
+
account_type?: PaymentAccountType;
|
|
42
|
+
account_number?: string;
|
|
43
|
+
routing_number?: string;
|
|
44
|
+
last_four?: string;
|
|
45
|
+
bank_name?: string;
|
|
46
|
+
}
|
|
47
|
+
interface PaymentMethod {
|
|
48
|
+
id: string;
|
|
49
|
+
object?: string;
|
|
50
|
+
customer?: string | null;
|
|
51
|
+
account_id?: string | null;
|
|
52
|
+
billing?: Address;
|
|
53
|
+
type: string;
|
|
54
|
+
livemode: boolean;
|
|
55
|
+
created: number;
|
|
56
|
+
updated?: number;
|
|
57
|
+
status?: PaymentMethodStatus;
|
|
58
|
+
card?: PaymentCard;
|
|
59
|
+
ach?: BankAccount;
|
|
60
|
+
}
|
|
61
|
+
interface PaymentMethodListResponse {
|
|
62
|
+
data?: PaymentMethod[];
|
|
63
|
+
meta?: {
|
|
64
|
+
page?: number;
|
|
65
|
+
per_page?: number;
|
|
66
|
+
has_more?: boolean;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
interface CreateCardPaymentMethodParams {
|
|
70
|
+
customer?: string;
|
|
71
|
+
account?: string;
|
|
72
|
+
billing?: Address;
|
|
73
|
+
type: PaymentMethodType.CARD;
|
|
74
|
+
card_number: string;
|
|
75
|
+
exp_month: string;
|
|
76
|
+
exp_year: string;
|
|
77
|
+
cvc: string;
|
|
78
|
+
}
|
|
79
|
+
interface CreateACHPaymentMethodParams {
|
|
80
|
+
customer?: string;
|
|
81
|
+
account?: string;
|
|
82
|
+
billing?: Address;
|
|
83
|
+
type: PaymentMethodType.ACH;
|
|
84
|
+
account_type: PaymentAccountType;
|
|
85
|
+
account_number: string;
|
|
86
|
+
routing_number: string;
|
|
87
|
+
}
|
|
88
|
+
interface UpdatePaymentMethodParams {
|
|
89
|
+
billing?: Address;
|
|
90
|
+
exp_month?: number;
|
|
91
|
+
exp_year?: number;
|
|
92
|
+
}
|
|
93
|
+
interface ConnectPlaidParams {
|
|
94
|
+
account: string;
|
|
95
|
+
public_token: string;
|
|
96
|
+
account_id: string;
|
|
97
|
+
institution_name?: string;
|
|
98
|
+
subtype?: string;
|
|
99
|
+
}
|
|
100
|
+
interface ApplePayPaymentDataHeader {
|
|
101
|
+
ephemeralPublicKey: string;
|
|
102
|
+
publicKeyHash: string;
|
|
103
|
+
transactionId: string;
|
|
104
|
+
}
|
|
105
|
+
interface ApplePayPaymentData {
|
|
106
|
+
version: string;
|
|
107
|
+
data: string;
|
|
108
|
+
signature: string;
|
|
109
|
+
header: ApplePayPaymentDataHeader;
|
|
110
|
+
}
|
|
111
|
+
interface ApplePayPaymentMethodInfo {
|
|
112
|
+
displayName: string;
|
|
113
|
+
network: string;
|
|
114
|
+
type: string;
|
|
115
|
+
}
|
|
116
|
+
interface ApplePayToken {
|
|
117
|
+
paymentData: ApplePayPaymentData;
|
|
118
|
+
paymentMethod: ApplePayPaymentMethodInfo;
|
|
119
|
+
transactionIdentifier: string;
|
|
120
|
+
}
|
|
121
|
+
interface ApplePayBillingContact {
|
|
122
|
+
addressLines?: string[];
|
|
123
|
+
locality?: string;
|
|
124
|
+
administrativeArea?: string;
|
|
125
|
+
postalCode?: string;
|
|
126
|
+
countryCode?: string;
|
|
127
|
+
}
|
|
128
|
+
interface ApplePayTokenDetails {
|
|
129
|
+
token: ApplePayToken;
|
|
130
|
+
billingContact?: ApplePayBillingContact;
|
|
131
|
+
}
|
|
132
|
+
interface ApplePayDetails {
|
|
133
|
+
requestId: string;
|
|
134
|
+
methodName: string;
|
|
135
|
+
payerName?: string;
|
|
136
|
+
payerEmail?: string;
|
|
137
|
+
details: ApplePayTokenDetails;
|
|
138
|
+
device_key_id?: string;
|
|
139
|
+
device_assertion?: string;
|
|
140
|
+
device_client_data?: string;
|
|
141
|
+
}
|
|
142
|
+
interface ApplePayWalletEnvelope {
|
|
143
|
+
type: 'apple_pay';
|
|
144
|
+
apple_pay: ApplePayDetails;
|
|
145
|
+
}
|
|
146
|
+
type ExactlyOneOwner = {
|
|
147
|
+
customer: string;
|
|
148
|
+
account?: never;
|
|
149
|
+
} | {
|
|
150
|
+
account: string;
|
|
151
|
+
customer?: never;
|
|
152
|
+
};
|
|
153
|
+
type CreateApplePayPaymentMethodParams = {
|
|
154
|
+
type: 'card';
|
|
155
|
+
_wallet: ApplePayWalletEnvelope;
|
|
156
|
+
} & ExactlyOneOwner;
|
|
157
|
+
type GooglePayPaymentMethodData = Record<string, unknown>;
|
|
158
|
+
interface GooglePayWalletData {
|
|
159
|
+
apiVersion: number;
|
|
160
|
+
apiVersionMinor: number;
|
|
161
|
+
email?: string | null;
|
|
162
|
+
paymentMethodData: GooglePayPaymentMethodData;
|
|
163
|
+
}
|
|
164
|
+
interface GooglePayWalletEnvelope {
|
|
165
|
+
type: 'google_pay';
|
|
166
|
+
google_pay: GooglePayWalletData;
|
|
167
|
+
}
|
|
168
|
+
type CreateGooglePayPaymentMethodParams = {
|
|
169
|
+
type: 'card';
|
|
170
|
+
_wallet: GooglePayWalletEnvelope;
|
|
171
|
+
} & ExactlyOneOwner;
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/types/customers.d.ts
|
|
174
|
+
interface Address {
|
|
175
|
+
line_1?: string;
|
|
176
|
+
line_2?: string;
|
|
177
|
+
city?: string;
|
|
178
|
+
state?: string;
|
|
179
|
+
country?: string;
|
|
180
|
+
postal_code?: string;
|
|
181
|
+
}
|
|
182
|
+
declare enum CustomerStatus {
|
|
183
|
+
ACTIVE = "active",
|
|
184
|
+
BLOCKED = "blocked"
|
|
185
|
+
}
|
|
186
|
+
interface Customer {
|
|
187
|
+
id: string;
|
|
188
|
+
created: number;
|
|
189
|
+
updated: number;
|
|
190
|
+
livemode: boolean;
|
|
191
|
+
name: string;
|
|
192
|
+
email: string;
|
|
193
|
+
description?: string | null;
|
|
194
|
+
phone?: string | null;
|
|
195
|
+
date_of_birth?: string | null;
|
|
196
|
+
billing_address?: Address | null;
|
|
197
|
+
shipping_address?: Address | null;
|
|
198
|
+
status: CustomerStatus;
|
|
199
|
+
payment_methods: PaymentMethod[];
|
|
200
|
+
metadata: Record<string, any>;
|
|
201
|
+
object: string;
|
|
202
|
+
}
|
|
203
|
+
interface PaginationMeta$1 {
|
|
204
|
+
page: number;
|
|
205
|
+
url: string;
|
|
206
|
+
has_more: boolean;
|
|
207
|
+
prev: string | null;
|
|
208
|
+
next: string | null;
|
|
209
|
+
}
|
|
210
|
+
interface CustomerListResponse {
|
|
211
|
+
meta: PaginationMeta$1;
|
|
212
|
+
data: Customer[];
|
|
213
|
+
}
|
|
214
|
+
interface CreateCustomerParams {
|
|
215
|
+
name: string;
|
|
216
|
+
email: string;
|
|
217
|
+
description?: string;
|
|
218
|
+
phone?: string;
|
|
219
|
+
ssn?: string;
|
|
220
|
+
date_of_birth?: string;
|
|
221
|
+
billing_address?: Address;
|
|
222
|
+
shipping_address?: Address;
|
|
223
|
+
metadata?: Record<string, any>;
|
|
224
|
+
}
|
|
225
|
+
interface UpdateCustomerParams {
|
|
226
|
+
name?: string;
|
|
227
|
+
email?: string;
|
|
228
|
+
description?: string;
|
|
229
|
+
phone?: string;
|
|
230
|
+
ssn?: string;
|
|
231
|
+
date_of_birth?: string;
|
|
232
|
+
billing_address?: Address;
|
|
233
|
+
shipping_address?: Address;
|
|
234
|
+
metadata?: Record<string, any>;
|
|
235
|
+
}
|
|
236
|
+
interface SearchCustomerParams {
|
|
237
|
+
name?: string;
|
|
238
|
+
email?: string;
|
|
239
|
+
phone?: string;
|
|
240
|
+
created_before?: number;
|
|
241
|
+
created_after?: number;
|
|
242
|
+
}
|
|
243
|
+
interface DeleteResponse {
|
|
244
|
+
id: string;
|
|
245
|
+
object: string;
|
|
246
|
+
deleted: boolean;
|
|
247
|
+
}
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/types/accounts.d.ts
|
|
250
|
+
interface Account {
|
|
251
|
+
id: string;
|
|
252
|
+
object: string;
|
|
253
|
+
type: string;
|
|
254
|
+
status: string;
|
|
255
|
+
external_id?: string | null;
|
|
256
|
+
metadata?: Record<string, string>;
|
|
257
|
+
profile?: Record<string, unknown> | null;
|
|
258
|
+
capabilities?: unknown[];
|
|
259
|
+
terms_of_service?: TermsOfService | null;
|
|
260
|
+
steps?: Array<{
|
|
261
|
+
key: string;
|
|
262
|
+
status: string;
|
|
263
|
+
label: string;
|
|
264
|
+
fields: string[];
|
|
265
|
+
currently_due: string[];
|
|
266
|
+
}>;
|
|
267
|
+
created: number;
|
|
268
|
+
updated: number;
|
|
269
|
+
livemode: boolean;
|
|
270
|
+
}
|
|
271
|
+
interface AccountListResponse {
|
|
272
|
+
meta: PaginationMeta$1;
|
|
273
|
+
data: Account[];
|
|
274
|
+
}
|
|
275
|
+
interface ListAccountsParams {
|
|
276
|
+
page?: number;
|
|
277
|
+
per_page?: number;
|
|
278
|
+
status?: string;
|
|
279
|
+
type?: string;
|
|
280
|
+
external_id?: string;
|
|
281
|
+
include_disabled?: boolean;
|
|
282
|
+
}
|
|
283
|
+
interface TermsOfService {
|
|
284
|
+
token?: string;
|
|
285
|
+
ip_address?: string;
|
|
286
|
+
accepted_at?: string;
|
|
287
|
+
}
|
|
288
|
+
interface AccountProfileIndividualName {
|
|
289
|
+
first_name: string;
|
|
290
|
+
middle_name?: string;
|
|
291
|
+
last_name: string;
|
|
292
|
+
suffix?: string;
|
|
293
|
+
}
|
|
294
|
+
interface AccountProfileAddress {
|
|
295
|
+
line1?: string;
|
|
296
|
+
line2?: string;
|
|
297
|
+
city?: string;
|
|
298
|
+
state?: string;
|
|
299
|
+
postal_code?: string;
|
|
300
|
+
country?: string;
|
|
301
|
+
}
|
|
302
|
+
interface AccountProfilePhone {
|
|
303
|
+
number?: string;
|
|
304
|
+
country_code?: string;
|
|
305
|
+
}
|
|
306
|
+
interface AccountProfileIndividual {
|
|
307
|
+
name: AccountProfileIndividualName;
|
|
308
|
+
email: string;
|
|
309
|
+
phone?: AccountProfilePhone;
|
|
310
|
+
address?: AccountProfileAddress;
|
|
311
|
+
dob?: string;
|
|
312
|
+
ssn?: string;
|
|
313
|
+
}
|
|
314
|
+
interface AccountProfileBusiness {
|
|
315
|
+
legal_business_name: string;
|
|
316
|
+
doing_business_as?: string;
|
|
317
|
+
business_type: string;
|
|
318
|
+
email: string;
|
|
319
|
+
website?: string;
|
|
320
|
+
description?: string;
|
|
321
|
+
phone?: AccountProfilePhone;
|
|
322
|
+
address?: AccountProfileAddress;
|
|
323
|
+
ein?: string;
|
|
324
|
+
mcc?: string;
|
|
325
|
+
naics?: string;
|
|
326
|
+
}
|
|
327
|
+
interface CreateAccountProfile {
|
|
328
|
+
individual?: AccountProfileIndividual;
|
|
329
|
+
business?: AccountProfileBusiness;
|
|
330
|
+
}
|
|
331
|
+
interface CreateAccountParams {
|
|
332
|
+
type: string;
|
|
333
|
+
external_id?: string;
|
|
334
|
+
terms_of_service?: TermsOfService;
|
|
335
|
+
metadata?: Record<string, unknown>;
|
|
336
|
+
profile: CreateAccountProfile;
|
|
337
|
+
}
|
|
338
|
+
interface UpdateAccountParams {
|
|
339
|
+
external_id?: string;
|
|
340
|
+
metadata?: Record<string, unknown>;
|
|
341
|
+
profile?: Partial<CreateAccountProfile>;
|
|
342
|
+
}
|
|
343
|
+
interface SearchAccountsParams {
|
|
344
|
+
name?: string;
|
|
345
|
+
email?: string;
|
|
346
|
+
external_id?: string;
|
|
347
|
+
status?: string;
|
|
348
|
+
type?: string;
|
|
349
|
+
}
|
|
350
|
+
interface PlaidLinkTokenResponse {
|
|
351
|
+
link_token: string;
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region src/types/geo_compliance.d.ts
|
|
355
|
+
interface GeoComplianceStatus {
|
|
356
|
+
status: string;
|
|
357
|
+
reason?: string;
|
|
358
|
+
geofence?: Record<string, unknown>;
|
|
359
|
+
sonar_session_id?: string;
|
|
360
|
+
evaluated_at: number;
|
|
361
|
+
}
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/api/accounts-api.d.ts
|
|
364
|
+
declare class AccountsAPI {
|
|
365
|
+
private client;
|
|
366
|
+
constructor(client: AxiosInstance);
|
|
367
|
+
list(params?: ListAccountsParams): Promise<AccountListResponse>;
|
|
368
|
+
create(params: CreateAccountParams, opts?: RequestOptions): Promise<Account>;
|
|
369
|
+
get(id: string, opts?: RequestOptions): Promise<Account>;
|
|
370
|
+
update(id: string, params: UpdateAccountParams, opts?: RequestOptions): Promise<Account>;
|
|
371
|
+
disable(id: string): Promise<Account>;
|
|
372
|
+
search(params: SearchAccountsParams): Promise<AccountListResponse>;
|
|
373
|
+
getPaymentMethods(id: string, opts?: RequestOptions): Promise<PaymentMethodListResponse>;
|
|
374
|
+
restrict(id: string): Promise<Account>;
|
|
375
|
+
unrestrict(id: string): Promise<Account>;
|
|
376
|
+
getPlaidLinkToken(id: string, opts?: RequestOptions): Promise<PlaidLinkTokenResponse>;
|
|
377
|
+
getGeoCompliance(accountId: string): Promise<GeoComplianceStatus>;
|
|
378
|
+
iterateAllAccounts(per_page?: number): AsyncGenerator<Account>;
|
|
379
|
+
}
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region src/types/capabilities.d.ts
|
|
382
|
+
interface CapabilityRequirement {
|
|
383
|
+
id: string;
|
|
384
|
+
object: string;
|
|
385
|
+
type: string;
|
|
386
|
+
status: string;
|
|
387
|
+
source?: string;
|
|
388
|
+
}
|
|
389
|
+
interface Capability {
|
|
390
|
+
id: string;
|
|
391
|
+
object: string;
|
|
392
|
+
name: string;
|
|
393
|
+
status: string;
|
|
394
|
+
disabled_reason?: string | null;
|
|
395
|
+
requirements?: CapabilityRequirement[];
|
|
396
|
+
created_at?: string;
|
|
397
|
+
updated_at?: string;
|
|
398
|
+
}
|
|
399
|
+
interface RequestCapabilitiesParams {
|
|
400
|
+
capabilities: string[];
|
|
401
|
+
}
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/api/capabilities-api.d.ts
|
|
404
|
+
declare class CapabilitiesAPI {
|
|
405
|
+
private client;
|
|
406
|
+
constructor(client: AxiosInstance);
|
|
407
|
+
list(accountId: string): Promise<Capability[]>;
|
|
408
|
+
request(accountId: string, params: RequestCapabilitiesParams): Promise<Capability[]>;
|
|
409
|
+
get(accountId: string, name: string): Promise<Capability>;
|
|
410
|
+
disable(accountId: string, name: string): Promise<Capability>;
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/types/onboarding_sessions.d.ts
|
|
414
|
+
interface OnboardingSession$1 {
|
|
415
|
+
id: string;
|
|
416
|
+
object: string;
|
|
417
|
+
account_id: string;
|
|
418
|
+
client_secret: string;
|
|
419
|
+
steps: string[];
|
|
420
|
+
return_url?: string | null;
|
|
421
|
+
expires_at: number;
|
|
422
|
+
livemode: boolean;
|
|
423
|
+
url?: string;
|
|
424
|
+
}
|
|
425
|
+
interface CreateOnboardingSessionParams$1 {
|
|
426
|
+
account_id: string;
|
|
427
|
+
steps?: string[];
|
|
428
|
+
return_url?: string;
|
|
429
|
+
}
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/api/onboarding_sessions-api.d.ts
|
|
432
|
+
declare class OnboardingSessionsAPI {
|
|
433
|
+
private client;
|
|
434
|
+
constructor(client: AxiosInstance);
|
|
435
|
+
create(params: CreateOnboardingSessionParams$1): Promise<OnboardingSession$1>;
|
|
436
|
+
getByAccount(accountId: string): Promise<OnboardingSession$1>;
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/api/customers-api.d.ts
|
|
440
|
+
declare class CustomersAPI {
|
|
441
|
+
private client;
|
|
442
|
+
constructor(client: AxiosInstance);
|
|
443
|
+
create(params: CreateCustomerParams): Promise<Customer>;
|
|
444
|
+
update(id: string, params: UpdateCustomerParams): Promise<Customer>;
|
|
445
|
+
get(id: string): Promise<Customer>;
|
|
446
|
+
list(per_page?: number, page?: number): Promise<CustomerListResponse>;
|
|
447
|
+
iterateAllCustomers(per_page?: number): Promise<AsyncGenerator<Customer, any, any>>;
|
|
448
|
+
delete(id: string): Promise<DeleteResponse>;
|
|
449
|
+
search(params: SearchCustomerParams): Promise<CustomerListResponse>;
|
|
450
|
+
block(id: string): Promise<Customer>;
|
|
451
|
+
unblock(id: string): Promise<Customer>;
|
|
452
|
+
getPaymentMethods(id: string): Promise<PaymentMethod[]>;
|
|
453
|
+
}
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region src/api/payment_methods-api.d.ts
|
|
456
|
+
declare class PaymentMethodsAPI {
|
|
457
|
+
private client;
|
|
458
|
+
constructor(client: AxiosInstance);
|
|
459
|
+
createCard(params: CreateCardPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod>;
|
|
460
|
+
createACH(params: CreateACHPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod>;
|
|
461
|
+
createApplePayPaymentMethod(params: CreateApplePayPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod>;
|
|
462
|
+
createGooglePayPaymentMethod(params: CreateGooglePayPaymentMethodParams, opts?: RequestOptions): Promise<PaymentMethod>;
|
|
463
|
+
get(id: string): Promise<PaymentMethod>;
|
|
464
|
+
list(per_page?: number, page?: number): Promise<PaymentMethodListResponse>;
|
|
465
|
+
iterateAllPaymentMethods(per_page?: number): AsyncGenerator<PaymentMethod>;
|
|
466
|
+
listForCustomer(customerId: string, per_page?: number, page?: number): Promise<PaymentMethodListResponse>;
|
|
467
|
+
update(id: string, params: UpdatePaymentMethodParams): Promise<PaymentMethod>;
|
|
468
|
+
attach(id: string, customerId: string): Promise<PaymentMethod>;
|
|
469
|
+
detach(id: string): Promise<PaymentMethod>;
|
|
470
|
+
block(id: string): Promise<PaymentMethod>;
|
|
471
|
+
unblock(id: string): Promise<PaymentMethod>;
|
|
472
|
+
connectPlaid(params: ConnectPlaidParams, opts?: RequestOptions): Promise<PaymentMethod>;
|
|
473
|
+
connectPlaidBankAccount(params: ConnectPlaidParams, opts?: RequestOptions): Promise<PaymentMethod>;
|
|
474
|
+
}
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region src/types/charge_intents.d.ts
|
|
477
|
+
declare enum ChargeIntentStatus {
|
|
478
|
+
INCOMPLETE = "incomplete",
|
|
479
|
+
REQUIRES_CAPTURE = "requires_capture",
|
|
480
|
+
REQUIRES_CUSTOMER = "requires_customer",
|
|
481
|
+
REQUIRES_PAYMENT_METHOD = "requires_payment_method",
|
|
482
|
+
REQUIRES_CONFIRMATION = "requires_confirmation",
|
|
483
|
+
REQUIRES_3D_SECURE = "requires_3d_secure",
|
|
484
|
+
PENDING = "pending",
|
|
485
|
+
CANCELED = "canceled",
|
|
486
|
+
REFUNDED = "refunded",
|
|
487
|
+
REVERSED = "reversed",
|
|
488
|
+
EXPIRED = "expired",
|
|
489
|
+
FAILED = "failed",
|
|
490
|
+
DISPUTED = "disputed",
|
|
491
|
+
SUCCEEDED = "succeeded"
|
|
492
|
+
}
|
|
493
|
+
declare enum AuthorizationMode {
|
|
494
|
+
AUTOMATIC = "automatic",
|
|
495
|
+
MANUAL = "manual"
|
|
496
|
+
}
|
|
497
|
+
declare enum ChargeStatus {
|
|
498
|
+
SUCCEEDED = "succeeded",
|
|
499
|
+
FAILED = "failed"
|
|
500
|
+
}
|
|
501
|
+
interface Charge$1 {
|
|
502
|
+
id: string;
|
|
503
|
+
currency: string;
|
|
504
|
+
amount: number;
|
|
505
|
+
amount_captured: number;
|
|
506
|
+
amount_refunded: number;
|
|
507
|
+
captured: boolean;
|
|
508
|
+
disputed: boolean;
|
|
509
|
+
charge_intent: string;
|
|
510
|
+
refunded: boolean;
|
|
511
|
+
failure_code?: string | null;
|
|
512
|
+
failure_message?: string | null;
|
|
513
|
+
description?: string | null;
|
|
514
|
+
status: ChargeStatus;
|
|
515
|
+
payment_method_details: PaymentMethod;
|
|
516
|
+
customer: string;
|
|
517
|
+
account?: string | null;
|
|
518
|
+
payment_method: string;
|
|
519
|
+
acquirer_reference_number?: string | null;
|
|
520
|
+
authorization_code?: string | null;
|
|
521
|
+
refund_reason?: string | null;
|
|
522
|
+
net_amount?: number;
|
|
523
|
+
revenue_split?: Record<string, unknown> | null;
|
|
524
|
+
created: number;
|
|
525
|
+
updated: number;
|
|
526
|
+
livemode: boolean;
|
|
527
|
+
}
|
|
528
|
+
interface ChargeIntent {
|
|
529
|
+
id: string;
|
|
530
|
+
currency: string;
|
|
531
|
+
amount: number;
|
|
532
|
+
status: ChargeIntentStatus;
|
|
533
|
+
description?: string | null;
|
|
534
|
+
metadata?: Record<string, any>;
|
|
535
|
+
latest_charge?: Charge$1;
|
|
536
|
+
customer?: Customer;
|
|
537
|
+
payment_method?: PaymentMethod;
|
|
538
|
+
subscription?: string;
|
|
539
|
+
invoice?: string;
|
|
540
|
+
client_secret?: string;
|
|
541
|
+
authorization_mode?: string;
|
|
542
|
+
failure_description?: string | null;
|
|
543
|
+
shipping?: Address;
|
|
544
|
+
account?: Record<string, unknown> | null;
|
|
545
|
+
amount_captured?: number;
|
|
546
|
+
amount_voided?: number;
|
|
547
|
+
next_action?: Record<string, unknown> | null;
|
|
548
|
+
revenue_split?: Record<string, unknown> | null;
|
|
549
|
+
object?: string;
|
|
550
|
+
created?: number;
|
|
551
|
+
livemode: boolean;
|
|
552
|
+
}
|
|
553
|
+
interface PaginationMeta {
|
|
554
|
+
page: number;
|
|
555
|
+
url: string;
|
|
556
|
+
has_more: boolean;
|
|
557
|
+
prev: string | null;
|
|
558
|
+
next: number | null;
|
|
559
|
+
}
|
|
560
|
+
interface ChargeIntentListResponse {
|
|
561
|
+
meta: PaginationMeta;
|
|
562
|
+
data: ChargeIntent[];
|
|
563
|
+
}
|
|
564
|
+
interface UpdateChargeIntentParams {
|
|
565
|
+
amount?: number;
|
|
566
|
+
customer?: string;
|
|
567
|
+
account?: string;
|
|
568
|
+
description?: string;
|
|
569
|
+
payment_method?: string;
|
|
570
|
+
metadata?: Record<string, any>;
|
|
571
|
+
}
|
|
572
|
+
interface CaptureChargeIntentParams {
|
|
573
|
+
amount_captured_cents: number;
|
|
574
|
+
}
|
|
575
|
+
interface CreateChargeIntentParams {
|
|
576
|
+
amount: number;
|
|
577
|
+
currency: string;
|
|
578
|
+
customer?: string;
|
|
579
|
+
account?: string;
|
|
580
|
+
description?: string;
|
|
581
|
+
payment_method?: string;
|
|
582
|
+
confirm?: boolean;
|
|
583
|
+
receipt_email?: string;
|
|
584
|
+
metadata?: Record<string, any>;
|
|
585
|
+
authorization_mode?: AuthorizationMode;
|
|
586
|
+
customer_data?: CustomerDataParams;
|
|
587
|
+
payment_method_data?: PaymentMethodDataParams;
|
|
588
|
+
sonar_session_id?: string;
|
|
589
|
+
shipping?: Record<string, unknown>;
|
|
590
|
+
promotion_codes?: string[];
|
|
591
|
+
payment_method_options?: Record<string, unknown>;
|
|
592
|
+
revenue_split?: Record<string, unknown>;
|
|
593
|
+
}
|
|
594
|
+
interface CustomerDataParams {
|
|
595
|
+
name: string;
|
|
596
|
+
email: string;
|
|
597
|
+
}
|
|
598
|
+
interface PaymentMethodDataParams {
|
|
599
|
+
attach: boolean;
|
|
600
|
+
billing?: Address;
|
|
601
|
+
type: 'card';
|
|
602
|
+
card_number: string;
|
|
603
|
+
exp_month: string;
|
|
604
|
+
exp_year: string;
|
|
605
|
+
cvc: string;
|
|
606
|
+
}
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region src/api/charge_intents-api.d.ts
|
|
609
|
+
declare class ChargeIntentsAPI {
|
|
610
|
+
private client;
|
|
611
|
+
constructor(client: AxiosInstance);
|
|
612
|
+
create(params: CreateChargeIntentParams, opts?: RequestOptions): Promise<ChargeIntent>;
|
|
613
|
+
update(id: string, params: UpdateChargeIntentParams): Promise<ChargeIntent>;
|
|
614
|
+
get(id: string): Promise<ChargeIntent>;
|
|
615
|
+
list(per_page?: number, page?: number): Promise<ChargeIntentListResponse>;
|
|
616
|
+
iterateAllChargeIntents(per_page?: number): Promise<AsyncGenerator<ChargeIntent, any, any>>;
|
|
617
|
+
cancel(id: string): Promise<ChargeIntent>;
|
|
618
|
+
confirm(id: string, opts?: RequestOptions): Promise<ChargeIntent>;
|
|
619
|
+
capture(id: string, params?: CaptureChargeIntentParams): Promise<ChargeIntent>;
|
|
620
|
+
voidRemaining(id: string): Promise<ChargeIntent>;
|
|
621
|
+
}
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region src/types/refunds.d.ts
|
|
624
|
+
declare enum RefundStatus {
|
|
625
|
+
PENDING = "pending",
|
|
626
|
+
REQUIRES_ACTION = "requires_action",
|
|
627
|
+
SUCCEEDED = "succeeded",
|
|
628
|
+
FAILED = "failed",
|
|
629
|
+
CANCELED = "canceled"
|
|
630
|
+
}
|
|
631
|
+
declare enum RefundReason {
|
|
632
|
+
DUPLICATE = "duplicate",
|
|
633
|
+
FRADULENT = "fraudulent",
|
|
634
|
+
REQUESTED = "requested_by_customer",
|
|
635
|
+
EXPIRED = "expired_uncaptured_charge"
|
|
636
|
+
}
|
|
637
|
+
declare enum RefundReasonParam {
|
|
638
|
+
DUPLICATE = "duplicate",
|
|
639
|
+
FRADULENT = "fraudulent",
|
|
640
|
+
REQUESTED = "requested_by_customer"
|
|
641
|
+
}
|
|
642
|
+
interface Refund {
|
|
643
|
+
id: string;
|
|
644
|
+
currency: string;
|
|
645
|
+
status: RefundStatus | null;
|
|
646
|
+
amount: number;
|
|
647
|
+
reason: RefundReason | null;
|
|
648
|
+
charge_intent?: string | null;
|
|
649
|
+
object: string;
|
|
650
|
+
livemode: boolean;
|
|
651
|
+
created: number;
|
|
652
|
+
updated: number;
|
|
653
|
+
}
|
|
654
|
+
interface RefundListResponse {
|
|
655
|
+
data: Refund[];
|
|
656
|
+
meta?: {
|
|
657
|
+
page?: number;
|
|
658
|
+
per_page?: number;
|
|
659
|
+
has_more?: boolean;
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
interface CreateRefundParams {
|
|
663
|
+
charge_intent?: string;
|
|
664
|
+
amount?: number;
|
|
665
|
+
reason?: RefundReasonParam;
|
|
666
|
+
}
|
|
667
|
+
//#endregion
|
|
668
|
+
//#region src/api/refunds-api.d.ts
|
|
669
|
+
declare class RefundsAPI {
|
|
670
|
+
private client;
|
|
671
|
+
constructor(client: AxiosInstance);
|
|
672
|
+
create(params: CreateRefundParams): Promise<Refund>;
|
|
673
|
+
get(id: string): Promise<Refund>;
|
|
674
|
+
list(per_page?: number, page?: number): Promise<RefundListResponse>;
|
|
675
|
+
iterateAllRefunds(per_page?: number): Promise<AsyncGenerator<Refund, any, any>>;
|
|
676
|
+
}
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region src/types/subscriptions.d.ts
|
|
679
|
+
declare enum SubscriptionStatus {
|
|
680
|
+
PENDING = "pending",
|
|
681
|
+
ACTIVE = "active",
|
|
682
|
+
TERMINATED = "terminated",
|
|
683
|
+
CANCELED = "canceled",
|
|
684
|
+
PAST_DUE = "past_due",
|
|
685
|
+
UNPAID = "unpaid"
|
|
686
|
+
}
|
|
687
|
+
interface PlanDetails {
|
|
688
|
+
id: string;
|
|
689
|
+
interval: string;
|
|
690
|
+
interval_count: number;
|
|
691
|
+
product: string;
|
|
692
|
+
amount: number;
|
|
693
|
+
currency: string;
|
|
694
|
+
object: string;
|
|
695
|
+
active: boolean;
|
|
696
|
+
created: number;
|
|
697
|
+
livemode: boolean;
|
|
698
|
+
}
|
|
699
|
+
interface Subscription {
|
|
700
|
+
id: string;
|
|
701
|
+
description?: string;
|
|
702
|
+
current_period_start?: number;
|
|
703
|
+
current_period_end?: number;
|
|
704
|
+
livemode?: boolean;
|
|
705
|
+
currency?: string;
|
|
706
|
+
status?: SubscriptionStatus;
|
|
707
|
+
customer?: string;
|
|
708
|
+
default_payment_method?: string;
|
|
709
|
+
latest_charge?: Charge$1;
|
|
710
|
+
plan?: PlanDetails;
|
|
711
|
+
metadata?: Record<string, any>;
|
|
712
|
+
quantity?: number | null;
|
|
713
|
+
account?: string | null;
|
|
714
|
+
phases?: unknown[];
|
|
715
|
+
has_phases?: boolean;
|
|
716
|
+
current_phase?: Record<string, unknown> | null;
|
|
717
|
+
effective_amount?: number | null;
|
|
718
|
+
effective_interval?: string | null;
|
|
719
|
+
effective_interval_count?: number | null;
|
|
720
|
+
latest_charge_intent?: string | null;
|
|
721
|
+
object?: string;
|
|
722
|
+
created?: number;
|
|
723
|
+
updated?: number;
|
|
724
|
+
start_date?: number;
|
|
725
|
+
}
|
|
726
|
+
interface SubscriptionListResponse {
|
|
727
|
+
meta: {
|
|
728
|
+
page: number;
|
|
729
|
+
url: string;
|
|
730
|
+
has_more: boolean;
|
|
731
|
+
prev: string | null;
|
|
732
|
+
next: number | null;
|
|
733
|
+
};
|
|
734
|
+
subscriptions: Subscription[];
|
|
735
|
+
}
|
|
736
|
+
interface CreateSubscriptionParams {
|
|
737
|
+
customer: string;
|
|
738
|
+
product: string;
|
|
739
|
+
currency: string;
|
|
740
|
+
default_payment_method?: string;
|
|
741
|
+
account?: string;
|
|
742
|
+
description?: string;
|
|
743
|
+
proration_behavior?: string;
|
|
744
|
+
metadata?: Record<string, any>;
|
|
745
|
+
}
|
|
746
|
+
interface UpdateSubscriptionParams {
|
|
747
|
+
default_payment_method?: string;
|
|
748
|
+
product?: string;
|
|
749
|
+
update_interval?: string;
|
|
750
|
+
description?: string;
|
|
751
|
+
metadata?: Record<string, any>;
|
|
752
|
+
}
|
|
753
|
+
interface SearchSubscriptionParams {
|
|
754
|
+
status?: string;
|
|
755
|
+
created_before?: number;
|
|
756
|
+
created_after?: number;
|
|
757
|
+
}
|
|
758
|
+
//#endregion
|
|
759
|
+
//#region src/api/subscriptions-api.d.ts
|
|
760
|
+
declare class SubscriptionsAPI {
|
|
761
|
+
private client;
|
|
762
|
+
constructor(client: AxiosInstance);
|
|
763
|
+
create(params: CreateSubscriptionParams): Promise<Subscription>;
|
|
764
|
+
update(id: string, params: UpdateSubscriptionParams): Promise<Subscription>;
|
|
765
|
+
get(id: string): Promise<Subscription>;
|
|
766
|
+
list(per_page?: number, page?: number): Promise<SubscriptionListResponse>;
|
|
767
|
+
iterateAllSubscriptions(per_page?: number): Promise<AsyncGenerator<Subscription, any, any>>;
|
|
768
|
+
search(query: SearchSubscriptionParams): Promise<SubscriptionListResponse>;
|
|
769
|
+
cancel(id: string): Promise<Subscription>;
|
|
770
|
+
}
|
|
771
|
+
//#endregion
|
|
772
|
+
//#region src/types/customer_identity.d.ts
|
|
773
|
+
declare enum VerificationStatus {
|
|
774
|
+
INCOMPLETE = "incomplete",
|
|
775
|
+
PENDING = "pending",
|
|
776
|
+
VERIFIED = "verified",
|
|
777
|
+
FAILED = "failed"
|
|
778
|
+
}
|
|
779
|
+
interface CustomerIdentityVerification {
|
|
780
|
+
id: string;
|
|
781
|
+
object: string;
|
|
782
|
+
status: VerificationStatus;
|
|
783
|
+
verification_url: string | null;
|
|
784
|
+
customer?: Record<string, unknown> | null;
|
|
785
|
+
created: number;
|
|
786
|
+
updated: number;
|
|
787
|
+
pending: number | null;
|
|
788
|
+
verified: number | null;
|
|
789
|
+
failed: number | null;
|
|
790
|
+
}
|
|
791
|
+
interface CreateCustomerIdentityVerificationParams {
|
|
792
|
+
first_name: string;
|
|
793
|
+
last_name: string;
|
|
794
|
+
date_of_birth: string;
|
|
795
|
+
email: string;
|
|
796
|
+
phone_number: string;
|
|
797
|
+
ssn: string;
|
|
798
|
+
address: Address;
|
|
799
|
+
}
|
|
800
|
+
interface UploadDocumentsParams {
|
|
801
|
+
documents: Array<{
|
|
802
|
+
document_type: string;
|
|
803
|
+
file_id?: string;
|
|
804
|
+
metadata?: Record<string, unknown>;
|
|
805
|
+
}>;
|
|
806
|
+
}
|
|
807
|
+
interface ReactNativeFileDescriptor {
|
|
808
|
+
uri: string;
|
|
809
|
+
type?: string;
|
|
810
|
+
name?: string;
|
|
811
|
+
}
|
|
812
|
+
type NodeFilePayload = Buffer | NodeJS.ReadableStream | string;
|
|
813
|
+
interface IdentityDocumentUpload {
|
|
814
|
+
document_type: string;
|
|
815
|
+
field_name?: string;
|
|
816
|
+
file: NodeFilePayload | ReactNativeFileDescriptor;
|
|
817
|
+
content_type?: string;
|
|
818
|
+
file_name?: string;
|
|
819
|
+
}
|
|
820
|
+
//#endregion
|
|
821
|
+
//#region src/api/customer_identity-api.d.ts
|
|
822
|
+
declare class CustomerIdentityVerificationsAPI {
|
|
823
|
+
private client;
|
|
824
|
+
constructor(client: AxiosInstance);
|
|
825
|
+
create(params: CreateCustomerIdentityVerificationParams, opts?: RequestOptions): Promise<CustomerIdentityVerification>;
|
|
826
|
+
createForCustomer(customerId: string, opts?: RequestOptions): Promise<CustomerIdentityVerification>;
|
|
827
|
+
get(id: string, opts?: RequestOptions): Promise<CustomerIdentityVerification>;
|
|
828
|
+
submitForVerification(id: string, opts?: RequestOptions): Promise<CustomerIdentityVerification>;
|
|
829
|
+
uploadDocuments(id: string, params: UploadDocumentsParams, opts?: RequestOptions): Promise<CustomerIdentityVerification>;
|
|
830
|
+
uploadIdentityDocuments(id: string, documents: IdentityDocumentUpload[], opts?: RequestOptions): Promise<CustomerIdentityVerification>;
|
|
831
|
+
}
|
|
832
|
+
//#endregion
|
|
833
|
+
//#region src/types/subscription_phases.d.ts
|
|
834
|
+
declare enum PricingType {
|
|
835
|
+
STATIC = "static",
|
|
836
|
+
RELATIVE = "relative"
|
|
837
|
+
}
|
|
838
|
+
declare enum DurationType {
|
|
839
|
+
FINITE = "finite",
|
|
840
|
+
INFINITE = "infinite"
|
|
841
|
+
}
|
|
842
|
+
interface SubscriptionPhase {
|
|
843
|
+
id: string;
|
|
844
|
+
ordinal: number;
|
|
845
|
+
name?: string | null;
|
|
846
|
+
pricing_type: PricingType;
|
|
847
|
+
amount?: number | null;
|
|
848
|
+
currency: string;
|
|
849
|
+
discount_percentage?: number | null;
|
|
850
|
+
period_count?: number | null;
|
|
851
|
+
phaseable_type?: string | null;
|
|
852
|
+
phaseable_id?: string | null;
|
|
853
|
+
started_at?: number | null;
|
|
854
|
+
livemode: boolean;
|
|
855
|
+
created: number;
|
|
856
|
+
updated: number;
|
|
857
|
+
object: string;
|
|
858
|
+
}
|
|
859
|
+
interface SubscriptionPhaseListResponse {
|
|
860
|
+
phases: SubscriptionPhase[];
|
|
861
|
+
meta: {
|
|
862
|
+
subscription_id: string;
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
interface CreateSubscriptionPhaseParams {
|
|
866
|
+
ordinal: number;
|
|
867
|
+
pricing_type: PricingType;
|
|
868
|
+
duration_type: DurationType;
|
|
869
|
+
name?: string;
|
|
870
|
+
amount_cents?: number;
|
|
871
|
+
currency: string;
|
|
872
|
+
discount_percentage?: number;
|
|
873
|
+
period_count?: number;
|
|
874
|
+
interval?: string;
|
|
875
|
+
interval_count?: number;
|
|
876
|
+
}
|
|
877
|
+
interface UpdateSubscriptionPhaseParams {
|
|
878
|
+
ordinal?: number;
|
|
879
|
+
name?: string;
|
|
880
|
+
pricing_type?: PricingType;
|
|
881
|
+
duration_type?: DurationType;
|
|
882
|
+
amount_cents?: number;
|
|
883
|
+
discount_percentage?: number;
|
|
884
|
+
period_count?: number;
|
|
885
|
+
interval?: string;
|
|
886
|
+
interval_count?: number;
|
|
887
|
+
}
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region src/api/subscription_phases-api.d.ts
|
|
890
|
+
declare class SubscriptionPhasesAPI {
|
|
891
|
+
private client;
|
|
892
|
+
constructor(client: AxiosInstance);
|
|
893
|
+
list(subscriptionId: string): Promise<SubscriptionPhaseListResponse>;
|
|
894
|
+
iterateAllSubscriptionPhases(subscriptionId: string, per_page?: number): Promise<AsyncGenerator<SubscriptionPhase, any, any>>;
|
|
895
|
+
get(subscriptionId: string, phaseId: string): Promise<SubscriptionPhase>;
|
|
896
|
+
create(subscriptionId: string, params: CreateSubscriptionPhaseParams): Promise<SubscriptionPhase>;
|
|
897
|
+
update(subscriptionId: string, phaseId: string, params: UpdateSubscriptionPhaseParams): Promise<SubscriptionPhase>;
|
|
898
|
+
delete(subscriptionId: string, phaseId: string): Promise<{
|
|
899
|
+
id: string;
|
|
900
|
+
object: string;
|
|
901
|
+
deleted: boolean;
|
|
902
|
+
}>;
|
|
903
|
+
bulkUpdate(subscriptionId: string, phases: Array<{
|
|
904
|
+
id: string;
|
|
905
|
+
[key: string]: any;
|
|
906
|
+
}>): Promise<SubscriptionPhaseListResponse>;
|
|
907
|
+
}
|
|
908
|
+
//#endregion
|
|
909
|
+
//#region src/types/invoice_line_items.d.ts
|
|
910
|
+
interface InvoiceLineItem {
|
|
911
|
+
object: string;
|
|
912
|
+
id: string;
|
|
913
|
+
quantity: number;
|
|
914
|
+
description: string;
|
|
915
|
+
unit_amount_cents?: number;
|
|
916
|
+
unit_amount_currency?: number;
|
|
917
|
+
created?: number;
|
|
918
|
+
updated?: number;
|
|
919
|
+
}
|
|
920
|
+
interface InvoiceLineItemListResponse {
|
|
921
|
+
data: InvoiceLineItem[];
|
|
922
|
+
}
|
|
923
|
+
interface CreateInvoiceLineItemParams {
|
|
924
|
+
product: string;
|
|
925
|
+
quantity: number;
|
|
926
|
+
}
|
|
927
|
+
interface UpdateInvoiceLineItemParams {
|
|
928
|
+
product?: string;
|
|
929
|
+
quantity?: number;
|
|
930
|
+
}
|
|
931
|
+
//#endregion
|
|
932
|
+
//#region src/types/invoices.d.ts
|
|
933
|
+
declare enum InvoiceStatus {
|
|
934
|
+
DRAFT = "draft",
|
|
935
|
+
OUTSTANDING = "outstanding",
|
|
936
|
+
DUE = "due",
|
|
937
|
+
OVERDUE = "overdue",
|
|
938
|
+
PAID = "paid",
|
|
939
|
+
WRITTEN_OFF = "written_off",
|
|
940
|
+
VOIDED = "voided"
|
|
941
|
+
}
|
|
942
|
+
declare enum CollectionMethod {
|
|
943
|
+
AUTO_CHARGE = "auto_charge",
|
|
944
|
+
REQUEST_PAYMENT = "request_payment"
|
|
945
|
+
}
|
|
946
|
+
interface CustomerRef {
|
|
947
|
+
object: string;
|
|
948
|
+
id: string;
|
|
949
|
+
name?: string;
|
|
950
|
+
}
|
|
951
|
+
interface Invoice {
|
|
952
|
+
id: string;
|
|
953
|
+
customer: CustomerRef;
|
|
954
|
+
object: string;
|
|
955
|
+
total: number;
|
|
956
|
+
currency: string;
|
|
957
|
+
status: InvoiceStatus;
|
|
958
|
+
collection_method: CollectionMethod;
|
|
959
|
+
net_terms: number;
|
|
960
|
+
invoice_number?: string;
|
|
961
|
+
description?: string;
|
|
962
|
+
memo?: string;
|
|
963
|
+
livemode: boolean;
|
|
964
|
+
metadata?: Record<string, any>;
|
|
965
|
+
due_date?: string | null;
|
|
966
|
+
account?: Record<string, unknown> | null;
|
|
967
|
+
line_items: InvoiceLineItem[];
|
|
968
|
+
created: number;
|
|
969
|
+
updated: number;
|
|
970
|
+
}
|
|
971
|
+
interface InvoiceListResponse {
|
|
972
|
+
data: Invoice[];
|
|
973
|
+
meta?: {
|
|
974
|
+
page?: number;
|
|
975
|
+
has_more?: boolean;
|
|
976
|
+
url?: string;
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
interface DeleteInvoiceResponse {
|
|
980
|
+
object: string;
|
|
981
|
+
deleted: boolean;
|
|
982
|
+
}
|
|
983
|
+
interface CreateInvoiceParams {
|
|
984
|
+
customer: string;
|
|
985
|
+
collection_method: CollectionMethod;
|
|
986
|
+
account?: string;
|
|
987
|
+
payment_method?: string;
|
|
988
|
+
promotion_codes?: string[];
|
|
989
|
+
net_terms?: number;
|
|
990
|
+
number?: string;
|
|
991
|
+
description?: string;
|
|
992
|
+
memo?: string;
|
|
993
|
+
metadata?: Record<string, any>;
|
|
994
|
+
line_items?: Array<{
|
|
995
|
+
product: string;
|
|
996
|
+
quantity: number;
|
|
997
|
+
}>;
|
|
998
|
+
}
|
|
999
|
+
interface UpdateInvoiceParams {
|
|
1000
|
+
collection_method?: CollectionMethod;
|
|
1001
|
+
net_terms?: number;
|
|
1002
|
+
number?: string;
|
|
1003
|
+
description?: string;
|
|
1004
|
+
memo?: string;
|
|
1005
|
+
metadata?: Record<string, any>;
|
|
1006
|
+
line_items?: Array<{
|
|
1007
|
+
product: string;
|
|
1008
|
+
quantity: number;
|
|
1009
|
+
}>;
|
|
1010
|
+
}
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/api/invoices-api.d.ts
|
|
1013
|
+
declare class InvoicesAPI {
|
|
1014
|
+
private client;
|
|
1015
|
+
constructor(client: AxiosInstance);
|
|
1016
|
+
create(params: CreateInvoiceParams): Promise<Invoice>;
|
|
1017
|
+
update(id: string, params: UpdateInvoiceParams): Promise<Invoice>;
|
|
1018
|
+
get(id: string): Promise<Invoice>;
|
|
1019
|
+
list(per_page?: number, page?: number, customer?: string, status?: string): Promise<InvoiceListResponse>;
|
|
1020
|
+
delete(id: string): Promise<DeleteInvoiceResponse>;
|
|
1021
|
+
issue(id: string): Promise<Invoice>;
|
|
1022
|
+
}
|
|
1023
|
+
//#endregion
|
|
1024
|
+
//#region src/api/invoice_line_item-api.d.ts
|
|
1025
|
+
declare class InvoiceLineItemsAPI {
|
|
1026
|
+
private client;
|
|
1027
|
+
constructor(client: AxiosInstance);
|
|
1028
|
+
list(invoiceId: string): Promise<InvoiceLineItemListResponse>;
|
|
1029
|
+
create(invoiceId: string, params: CreateInvoiceLineItemParams): Promise<InvoiceLineItem>;
|
|
1030
|
+
update(invoiceId: string, lineItemId: string, params: UpdateInvoiceLineItemParams): Promise<InvoiceLineItem>;
|
|
1031
|
+
get(invoiceId: string, lineItemId: string): Promise<InvoiceLineItem>;
|
|
1032
|
+
delete(invoiceId: string, lineItemId: string): Promise<DeleteInvoiceResponse>;
|
|
1033
|
+
}
|
|
1034
|
+
//#endregion
|
|
1035
|
+
//#region src/types/disputes.d.ts
|
|
1036
|
+
declare enum DisputeStatus {
|
|
1037
|
+
WARNING_NEEDS_RESPONSE = "warning_needs_response",
|
|
1038
|
+
WARNING_UNDER_REVIEW = "warning_under_review",
|
|
1039
|
+
WARNING_CLOSED = "warning_closed",
|
|
1040
|
+
NEEDS_RESPONSE = "needs_response",
|
|
1041
|
+
UNDER_REVIEW = "under_review",
|
|
1042
|
+
WON = "won",
|
|
1043
|
+
LOST = "lost"
|
|
1044
|
+
}
|
|
1045
|
+
interface DisputeEvidence {
|
|
1046
|
+
access_activity_log?: string;
|
|
1047
|
+
billing_address?: string;
|
|
1048
|
+
cancellation_policy?: string;
|
|
1049
|
+
cancellation_policy_disclosure?: string;
|
|
1050
|
+
cancellation_rebuttal?: string;
|
|
1051
|
+
customer_email_address?: string;
|
|
1052
|
+
customer_name?: string;
|
|
1053
|
+
customer_purchase_ip?: string;
|
|
1054
|
+
duplicate_charge_explanation?: string;
|
|
1055
|
+
duplicate_charge_id?: string;
|
|
1056
|
+
product_description?: string;
|
|
1057
|
+
refund_policy_disclosure?: string;
|
|
1058
|
+
shipping_tracking_number?: string;
|
|
1059
|
+
uncategorized_text?: string;
|
|
1060
|
+
}
|
|
1061
|
+
interface Dispute {
|
|
1062
|
+
id: string;
|
|
1063
|
+
object: string;
|
|
1064
|
+
amount_cents: number;
|
|
1065
|
+
amount_currency: string;
|
|
1066
|
+
charge_intent?: Record<string, unknown> | null;
|
|
1067
|
+
reason?: {
|
|
1068
|
+
code: string;
|
|
1069
|
+
description: string;
|
|
1070
|
+
category: string;
|
|
1071
|
+
} | null;
|
|
1072
|
+
status: DisputeStatus;
|
|
1073
|
+
display_status?: string;
|
|
1074
|
+
acquirer_reference_number?: string | null;
|
|
1075
|
+
authorization_code?: string | null;
|
|
1076
|
+
livemode: boolean;
|
|
1077
|
+
created: number;
|
|
1078
|
+
updated: number;
|
|
1079
|
+
}
|
|
1080
|
+
interface DisputeListResponse {
|
|
1081
|
+
data: Dispute[];
|
|
1082
|
+
}
|
|
1083
|
+
interface UpdateDisputeParams {
|
|
1084
|
+
evidence?: DisputeEvidence;
|
|
1085
|
+
submit?: boolean;
|
|
1086
|
+
}
|
|
1087
|
+
interface CreateDisputeDocumentParams {
|
|
1088
|
+
file_id?: string;
|
|
1089
|
+
document_type?: string;
|
|
1090
|
+
metadata?: Record<string, unknown>;
|
|
1091
|
+
}
|
|
1092
|
+
interface DisputeDocument {
|
|
1093
|
+
id: string;
|
|
1094
|
+
object: string;
|
|
1095
|
+
dispute_id: string;
|
|
1096
|
+
file_id?: string;
|
|
1097
|
+
document_type?: string;
|
|
1098
|
+
metadata?: Record<string, unknown>;
|
|
1099
|
+
created: number;
|
|
1100
|
+
livemode: boolean;
|
|
1101
|
+
}
|
|
1102
|
+
//#endregion
|
|
1103
|
+
//#region src/api/disputes-api.d.ts
|
|
1104
|
+
declare class DisputesAPI {
|
|
1105
|
+
private client;
|
|
1106
|
+
constructor(client: AxiosInstance);
|
|
1107
|
+
update(id: string, params: UpdateDisputeParams): Promise<Dispute>;
|
|
1108
|
+
get(id: string): Promise<Dispute>;
|
|
1109
|
+
list(per_page?: number, page?: number, charge?: string, charge_intent?: string): Promise<DisputeListResponse>;
|
|
1110
|
+
createDocument(id: string, params: CreateDisputeDocumentParams): Promise<DisputeDocument>;
|
|
1111
|
+
}
|
|
1112
|
+
//#endregion
|
|
1113
|
+
//#region src/types/products.d.ts
|
|
1114
|
+
interface Product {
|
|
1115
|
+
id: string;
|
|
1116
|
+
name: string;
|
|
1117
|
+
livemode: boolean;
|
|
1118
|
+
image: string | null;
|
|
1119
|
+
description: string;
|
|
1120
|
+
url: string | null;
|
|
1121
|
+
shippable: boolean;
|
|
1122
|
+
active: boolean;
|
|
1123
|
+
default_price: number;
|
|
1124
|
+
purchase_type?: string;
|
|
1125
|
+
recurring?: {
|
|
1126
|
+
interval: string;
|
|
1127
|
+
interval_count: number;
|
|
1128
|
+
} | null;
|
|
1129
|
+
metadata: Record<string, string>;
|
|
1130
|
+
created: number;
|
|
1131
|
+
updated: number;
|
|
1132
|
+
object: string;
|
|
1133
|
+
}
|
|
1134
|
+
interface DeletedProduct {
|
|
1135
|
+
id: string;
|
|
1136
|
+
object: string;
|
|
1137
|
+
deleted: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
interface ProductListResponse {
|
|
1140
|
+
meta: {
|
|
1141
|
+
page: number;
|
|
1142
|
+
url: string;
|
|
1143
|
+
has_more: boolean;
|
|
1144
|
+
};
|
|
1145
|
+
data: Product[];
|
|
1146
|
+
}
|
|
1147
|
+
declare enum ProductRecurringInterval {
|
|
1148
|
+
DAILY = "daily",
|
|
1149
|
+
WEEKLY = "weekly",
|
|
1150
|
+
MONTHLY = "monthly",
|
|
1151
|
+
YEARLY = "yearly",
|
|
1152
|
+
EVERY_3_MONTHS = "every_3_months",
|
|
1153
|
+
EVERY_6_MONTHS = "every_6_months"
|
|
1154
|
+
}
|
|
1155
|
+
declare enum ProductPurchaseType {
|
|
1156
|
+
ONETIME = "one_time",
|
|
1157
|
+
RECURRING = "recurring"
|
|
1158
|
+
}
|
|
1159
|
+
interface CreateProductParams {
|
|
1160
|
+
name: string;
|
|
1161
|
+
description: string;
|
|
1162
|
+
default_price: number;
|
|
1163
|
+
purchase_type: ProductPurchaseType;
|
|
1164
|
+
recurring_interval?: ProductRecurringInterval | null;
|
|
1165
|
+
shippable?: boolean | null;
|
|
1166
|
+
url?: string | null;
|
|
1167
|
+
metadata?: Record<string, string> | null;
|
|
1168
|
+
}
|
|
1169
|
+
interface UpdateProductParams {
|
|
1170
|
+
name?: string;
|
|
1171
|
+
description?: string;
|
|
1172
|
+
default_price?: number;
|
|
1173
|
+
shippable?: boolean;
|
|
1174
|
+
url?: string;
|
|
1175
|
+
metadata?: Record<string, string>;
|
|
1176
|
+
}
|
|
1177
|
+
interface SearchProductParams {
|
|
1178
|
+
name?: string;
|
|
1179
|
+
active?: boolean;
|
|
1180
|
+
shippable?: boolean;
|
|
1181
|
+
}
|
|
1182
|
+
//#endregion
|
|
1183
|
+
//#region src/api/products-api.d.ts
|
|
1184
|
+
declare class ProductsAPI {
|
|
1185
|
+
private client;
|
|
1186
|
+
constructor(client: AxiosInstance);
|
|
1187
|
+
create(params: CreateProductParams): Promise<Product>;
|
|
1188
|
+
update(id: string, params: UpdateProductParams): Promise<Product>;
|
|
1189
|
+
get(id: string): Promise<Product>;
|
|
1190
|
+
list(per_page?: number, page?: number): Promise<ProductListResponse>;
|
|
1191
|
+
iterateAllProducts(per_page?: number): Promise<AsyncGenerator<Product, any, any>>;
|
|
1192
|
+
search(params: SearchProductParams): Promise<ProductListResponse>;
|
|
1193
|
+
delete(id: string): Promise<DeletedProduct>;
|
|
1194
|
+
}
|
|
1195
|
+
//#endregion
|
|
1196
|
+
//#region src/types/charges.d.ts
|
|
1197
|
+
interface Charge {
|
|
1198
|
+
id: string;
|
|
1199
|
+
object: string;
|
|
1200
|
+
amount: number;
|
|
1201
|
+
currency: string;
|
|
1202
|
+
status: string;
|
|
1203
|
+
charge_intent_id?: string;
|
|
1204
|
+
payment_method_id?: string;
|
|
1205
|
+
customer_id?: string;
|
|
1206
|
+
account?: string | null;
|
|
1207
|
+
acquirer_reference_number?: string | null;
|
|
1208
|
+
authorization_code?: string | null;
|
|
1209
|
+
refund_reason?: string | null;
|
|
1210
|
+
net_amount?: number;
|
|
1211
|
+
revenue_split?: Record<string, unknown> | null;
|
|
1212
|
+
metadata?: Record<string, unknown>;
|
|
1213
|
+
created: number;
|
|
1214
|
+
updated: number;
|
|
1215
|
+
livemode: boolean;
|
|
1216
|
+
}
|
|
1217
|
+
interface ChargeTrace {
|
|
1218
|
+
charge_id: string;
|
|
1219
|
+
events: Array<{
|
|
1220
|
+
type: string;
|
|
1221
|
+
created: number;
|
|
1222
|
+
data: Record<string, unknown>;
|
|
1223
|
+
}>;
|
|
1224
|
+
}
|
|
1225
|
+
//#endregion
|
|
1226
|
+
//#region src/api/charges-api.d.ts
|
|
1227
|
+
declare class ChargesAPI {
|
|
1228
|
+
private client;
|
|
1229
|
+
constructor(client: AxiosInstance);
|
|
1230
|
+
get(id: string): Promise<Charge>;
|
|
1231
|
+
trace(id: string): Promise<ChargeTrace>;
|
|
1232
|
+
}
|
|
1233
|
+
//#endregion
|
|
1234
|
+
//#region src/types/charge_sessions.d.ts
|
|
1235
|
+
interface ChargeSession {
|
|
1236
|
+
id: string;
|
|
1237
|
+
object: string;
|
|
1238
|
+
status: string;
|
|
1239
|
+
charge_intent_id?: string;
|
|
1240
|
+
created: number;
|
|
1241
|
+
updated: number;
|
|
1242
|
+
livemode: boolean;
|
|
1243
|
+
}
|
|
1244
|
+
interface CreateChargeSessionParams {
|
|
1245
|
+
charge_intent_id?: string;
|
|
1246
|
+
metadata?: Record<string, unknown>;
|
|
1247
|
+
}
|
|
1248
|
+
interface UpdateChargeSessionParams {
|
|
1249
|
+
status?: string;
|
|
1250
|
+
metadata?: Record<string, unknown>;
|
|
1251
|
+
}
|
|
1252
|
+
//#endregion
|
|
1253
|
+
//#region src/api/charge_sessions-api.d.ts
|
|
1254
|
+
declare class ChargeSessionsAPI {
|
|
1255
|
+
private client;
|
|
1256
|
+
constructor(client: AxiosInstance);
|
|
1257
|
+
create(params: CreateChargeSessionParams): Promise<ChargeSession>;
|
|
1258
|
+
update(id: string, params: UpdateChargeSessionParams): Promise<ChargeSession>;
|
|
1259
|
+
}
|
|
1260
|
+
//#endregion
|
|
1261
|
+
//#region src/types/sonar_sessions.d.ts
|
|
1262
|
+
interface SonarSession {
|
|
1263
|
+
id: string;
|
|
1264
|
+
object: string;
|
|
1265
|
+
status: string;
|
|
1266
|
+
charge_intent_id?: string;
|
|
1267
|
+
created: number;
|
|
1268
|
+
updated: number;
|
|
1269
|
+
livemode: boolean;
|
|
1270
|
+
}
|
|
1271
|
+
interface CreateSonarSessionParams {
|
|
1272
|
+
charge_intent_id?: string;
|
|
1273
|
+
metadata?: Record<string, unknown>;
|
|
1274
|
+
}
|
|
1275
|
+
interface UpdateSonarSessionParams {
|
|
1276
|
+
status?: string;
|
|
1277
|
+
metadata?: Record<string, unknown>;
|
|
1278
|
+
}
|
|
1279
|
+
//#endregion
|
|
1280
|
+
//#region src/api/sonar_sessions-api.d.ts
|
|
1281
|
+
declare class SonarSessionsAPI {
|
|
1282
|
+
private client;
|
|
1283
|
+
constructor(client: AxiosInstance);
|
|
1284
|
+
create(params: CreateSonarSessionParams): Promise<SonarSession>;
|
|
1285
|
+
update(id: string, params: UpdateSonarSessionParams): Promise<SonarSession>;
|
|
1286
|
+
}
|
|
1287
|
+
//#endregion
|
|
1288
|
+
//#region src/types/phone_verifications.d.ts
|
|
1289
|
+
interface PhoneVerification {
|
|
1290
|
+
id: string;
|
|
1291
|
+
object: string;
|
|
1292
|
+
status: string;
|
|
1293
|
+
phone_number: string;
|
|
1294
|
+
account_id: string;
|
|
1295
|
+
created: number;
|
|
1296
|
+
updated: number;
|
|
1297
|
+
livemode: boolean;
|
|
1298
|
+
prove_auth_token?: string;
|
|
1299
|
+
}
|
|
1300
|
+
interface CreatePhoneVerificationParams {
|
|
1301
|
+
phone_number: string;
|
|
1302
|
+
type?: string;
|
|
1303
|
+
}
|
|
1304
|
+
interface ConfirmPhoneVerificationParams {
|
|
1305
|
+
code: string;
|
|
1306
|
+
}
|
|
1307
|
+
//#endregion
|
|
1308
|
+
//#region src/api/phone_verifications-api.d.ts
|
|
1309
|
+
declare class PhoneVerificationsAPI {
|
|
1310
|
+
private client;
|
|
1311
|
+
constructor(client: AxiosInstance);
|
|
1312
|
+
create(accountId: string, params: CreatePhoneVerificationParams, opts?: RequestOptions): Promise<PhoneVerification>;
|
|
1313
|
+
confirm(accountId: string, id: string, params: ConfirmPhoneVerificationParams, opts?: RequestOptions): Promise<PhoneVerification>;
|
|
1314
|
+
}
|
|
1315
|
+
//#endregion
|
|
1316
|
+
//#region src/types/geofences.d.ts
|
|
1317
|
+
interface Geofence {
|
|
1318
|
+
id: string;
|
|
1319
|
+
object: string;
|
|
1320
|
+
name: string;
|
|
1321
|
+
geofence_type: string;
|
|
1322
|
+
active: boolean;
|
|
1323
|
+
geofence_rules?: unknown[];
|
|
1324
|
+
created: number;
|
|
1325
|
+
updated: number;
|
|
1326
|
+
}
|
|
1327
|
+
interface GeofenceListResponse {
|
|
1328
|
+
meta: PaginationMeta$1;
|
|
1329
|
+
data: Geofence[];
|
|
1330
|
+
}
|
|
1331
|
+
//#endregion
|
|
1332
|
+
//#region src/api/geofences-api.d.ts
|
|
1333
|
+
declare class GeofencesAPI {
|
|
1334
|
+
private client;
|
|
1335
|
+
constructor(client: AxiosInstance);
|
|
1336
|
+
list(params?: {
|
|
1337
|
+
per_page?: number;
|
|
1338
|
+
page?: number;
|
|
1339
|
+
}): Promise<GeofenceListResponse>;
|
|
1340
|
+
iterateAllGeofences(per_page?: number): Promise<AsyncGenerator<Geofence, any, any>>;
|
|
1341
|
+
}
|
|
1342
|
+
//#endregion
|
|
1343
|
+
//#region src/types/webhook_endpoints.d.ts
|
|
1344
|
+
interface WebhookEndpoint {
|
|
1345
|
+
id: string;
|
|
1346
|
+
object: string;
|
|
1347
|
+
url: string;
|
|
1348
|
+
status: string;
|
|
1349
|
+
enabled_events: string[];
|
|
1350
|
+
metadata?: Record<string, unknown>;
|
|
1351
|
+
created: number;
|
|
1352
|
+
updated: number;
|
|
1353
|
+
livemode: boolean;
|
|
1354
|
+
}
|
|
1355
|
+
interface WebhookEndpointListResponse {
|
|
1356
|
+
meta: PaginationMeta$1;
|
|
1357
|
+
data: WebhookEndpoint[];
|
|
1358
|
+
}
|
|
1359
|
+
//#endregion
|
|
1360
|
+
//#region src/api/webhook_endpoints-api.d.ts
|
|
1361
|
+
declare class WebhookEndpointsAPI {
|
|
1362
|
+
private client;
|
|
1363
|
+
constructor(client: AxiosInstance);
|
|
1364
|
+
list(per_page?: number, page?: number): Promise<WebhookEndpointListResponse>;
|
|
1365
|
+
iterateAllWebhookEndpoints(per_page?: number): Promise<AsyncGenerator<WebhookEndpoint, any, any>>;
|
|
1366
|
+
}
|
|
1367
|
+
//#endregion
|
|
1368
|
+
//#region src/types/payouts.d.ts
|
|
1369
|
+
interface Payout {
|
|
1370
|
+
id: string;
|
|
1371
|
+
object: string;
|
|
1372
|
+
amount: number;
|
|
1373
|
+
currency: string;
|
|
1374
|
+
status: string;
|
|
1375
|
+
payment_method_id?: string;
|
|
1376
|
+
account_id?: string;
|
|
1377
|
+
metadata?: Record<string, unknown>;
|
|
1378
|
+
created: number;
|
|
1379
|
+
updated: number;
|
|
1380
|
+
livemode: boolean;
|
|
1381
|
+
}
|
|
1382
|
+
interface CreatePayoutParams {
|
|
1383
|
+
amount: number;
|
|
1384
|
+
currency: string;
|
|
1385
|
+
payment_method_id: string;
|
|
1386
|
+
metadata?: Record<string, unknown>;
|
|
1387
|
+
}
|
|
1388
|
+
//#endregion
|
|
1389
|
+
//#region src/api/payouts-api.d.ts
|
|
1390
|
+
declare class PayoutsAPI {
|
|
1391
|
+
private client;
|
|
1392
|
+
constructor(client: AxiosInstance);
|
|
1393
|
+
create(params: CreatePayoutParams): Promise<Payout>;
|
|
1394
|
+
}
|
|
1395
|
+
//#endregion
|
|
1396
|
+
//#region src/types/transfers.d.ts
|
|
1397
|
+
interface Transfer {
|
|
1398
|
+
id: string;
|
|
1399
|
+
object: string;
|
|
1400
|
+
amount: number;
|
|
1401
|
+
currency?: string;
|
|
1402
|
+
status: string;
|
|
1403
|
+
account_id?: string;
|
|
1404
|
+
source_payment_method_id?: string;
|
|
1405
|
+
destination_payment_method_id?: string;
|
|
1406
|
+
description?: string;
|
|
1407
|
+
metadata?: Record<string, unknown>;
|
|
1408
|
+
created: number;
|
|
1409
|
+
updated: number;
|
|
1410
|
+
livemode: boolean;
|
|
1411
|
+
}
|
|
1412
|
+
interface TransferListResponse {
|
|
1413
|
+
meta: PaginationMeta$1;
|
|
1414
|
+
data: Transfer[];
|
|
1415
|
+
}
|
|
1416
|
+
interface CreateTransferParams {
|
|
1417
|
+
amount: number;
|
|
1418
|
+
account_id: string;
|
|
1419
|
+
currency?: string;
|
|
1420
|
+
source_payment_method_id?: string;
|
|
1421
|
+
destination_payment_method_id?: string;
|
|
1422
|
+
description?: string;
|
|
1423
|
+
metadata?: Record<string, unknown>;
|
|
1424
|
+
}
|
|
1425
|
+
//#endregion
|
|
1426
|
+
//#region src/api/transfers-api.d.ts
|
|
1427
|
+
declare class TransfersAPI {
|
|
1428
|
+
private client;
|
|
1429
|
+
constructor(client: AxiosInstance);
|
|
1430
|
+
list(per_page?: number, page?: number): Promise<TransferListResponse>;
|
|
1431
|
+
get(id: string): Promise<Transfer>;
|
|
1432
|
+
create(params: CreateTransferParams, opts?: RequestOptions): Promise<Transfer>;
|
|
1433
|
+
iterateAllTransfers(per_page?: number): Promise<AsyncGenerator<Transfer, any, any>>;
|
|
1434
|
+
}
|
|
1435
|
+
//#endregion
|
|
1436
|
+
//#region src/types/transfer_fee_plans.d.ts
|
|
1437
|
+
type FeeApplicationMode = 'deduct' | 'add_on' | 'absorb';
|
|
1438
|
+
type FeeType = 'flat_plus_percentage' | 'flat' | 'percentage';
|
|
1439
|
+
type BillableEventType = 'transfer.charge.card' | 'transfer.charge.ach' | 'transfer.payout.ach' | 'transfer.payout.push_to_card';
|
|
1440
|
+
interface TransferFeePlanItem {
|
|
1441
|
+
id: string;
|
|
1442
|
+
object: string;
|
|
1443
|
+
fee_type: FeeType;
|
|
1444
|
+
amount_fixed_cents: number;
|
|
1445
|
+
amount_fixed_currency: string;
|
|
1446
|
+
amount_percentage: string;
|
|
1447
|
+
billable_event_type: string;
|
|
1448
|
+
created: number;
|
|
1449
|
+
updated: number;
|
|
1450
|
+
}
|
|
1451
|
+
interface CreateTransferFeePlanItemParams {
|
|
1452
|
+
fee_type: FeeType;
|
|
1453
|
+
amount_fixed_cents?: number;
|
|
1454
|
+
amount_fixed_currency?: string;
|
|
1455
|
+
amount_percentage?: number;
|
|
1456
|
+
billable_event_type?: BillableEventType;
|
|
1457
|
+
}
|
|
1458
|
+
interface TransferFeePlan {
|
|
1459
|
+
id: string;
|
|
1460
|
+
object: string;
|
|
1461
|
+
name: string;
|
|
1462
|
+
fee_application_mode: FeeApplicationMode;
|
|
1463
|
+
items: TransferFeePlanItem[];
|
|
1464
|
+
created: number;
|
|
1465
|
+
updated: number;
|
|
1466
|
+
livemode: boolean;
|
|
1467
|
+
}
|
|
1468
|
+
interface TransferFeePlanListResponse {
|
|
1469
|
+
meta: PaginationMeta$1;
|
|
1470
|
+
data: TransferFeePlan[];
|
|
1471
|
+
}
|
|
1472
|
+
interface CreateTransferFeePlanParams {
|
|
1473
|
+
name: string;
|
|
1474
|
+
fee_application_mode?: FeeApplicationMode;
|
|
1475
|
+
items?: CreateTransferFeePlanItemParams[];
|
|
1476
|
+
}
|
|
1477
|
+
//#endregion
|
|
1478
|
+
//#region src/api/transfer_fee_plans-api.d.ts
|
|
1479
|
+
declare class TransferFeePlansAPI {
|
|
1480
|
+
private client;
|
|
1481
|
+
constructor(client: AxiosInstance);
|
|
1482
|
+
list(per_page?: number, page?: number): Promise<TransferFeePlanListResponse>;
|
|
1483
|
+
get(id: string): Promise<TransferFeePlan>;
|
|
1484
|
+
create(params: CreateTransferFeePlanParams): Promise<TransferFeePlan>;
|
|
1485
|
+
iterateAllTransferFeePlans(per_page?: number): Promise<AsyncGenerator<TransferFeePlan, any, any>>;
|
|
1486
|
+
}
|
|
1487
|
+
//#endregion
|
|
1488
|
+
//#region src/types/transfer_billing_agreements.d.ts
|
|
1489
|
+
type TransferBillingStatus = 'pending' | 'active' | 'inactive';
|
|
1490
|
+
type TransferBillingCategory = 'charge' | 'payout';
|
|
1491
|
+
interface TransferBillingAgreement {
|
|
1492
|
+
id: string;
|
|
1493
|
+
status: TransferBillingStatus;
|
|
1494
|
+
category: TransferBillingCategory;
|
|
1495
|
+
effective_date: string;
|
|
1496
|
+
object: string;
|
|
1497
|
+
account_id: string | null;
|
|
1498
|
+
fee_plan: TransferFeePlan | null;
|
|
1499
|
+
created: number;
|
|
1500
|
+
updated: number;
|
|
1501
|
+
livemode: boolean;
|
|
1502
|
+
}
|
|
1503
|
+
interface TransferBillingAgreementListResponse {
|
|
1504
|
+
meta: PaginationMeta$1;
|
|
1505
|
+
data: TransferBillingAgreement[];
|
|
1506
|
+
}
|
|
1507
|
+
interface CreateTransferBillingAgreementParams {
|
|
1508
|
+
account_id?: string;
|
|
1509
|
+
status?: TransferBillingStatus;
|
|
1510
|
+
transfer_fee_plan_id: string;
|
|
1511
|
+
effective_date: string;
|
|
1512
|
+
category: TransferBillingCategory;
|
|
1513
|
+
}
|
|
1514
|
+
interface UpdateTransferBillingAgreementParams {
|
|
1515
|
+
status: TransferBillingStatus;
|
|
1516
|
+
}
|
|
1517
|
+
//#endregion
|
|
1518
|
+
//#region src/api/transfer_billing_agreements-api.d.ts
|
|
1519
|
+
declare class TransferBillingAgreementsAPI {
|
|
1520
|
+
private client;
|
|
1521
|
+
constructor(client: AxiosInstance);
|
|
1522
|
+
list(per_page?: number, page?: number): Promise<TransferBillingAgreementListResponse>;
|
|
1523
|
+
get(id: string): Promise<TransferBillingAgreement>;
|
|
1524
|
+
create(params: CreateTransferBillingAgreementParams): Promise<TransferBillingAgreement>;
|
|
1525
|
+
update(id: string, params: UpdateTransferBillingAgreementParams): Promise<TransferBillingAgreement>;
|
|
1526
|
+
iterateAllTransferBillingAgreements(per_page?: number): Promise<AsyncGenerator<TransferBillingAgreement, any, any>>;
|
|
1527
|
+
}
|
|
1528
|
+
//#endregion
|
|
1529
|
+
//#region src/types/coupons.d.ts
|
|
1530
|
+
interface Coupon {
|
|
1531
|
+
id: string;
|
|
1532
|
+
object: string;
|
|
1533
|
+
name: string;
|
|
1534
|
+
discount_type: string;
|
|
1535
|
+
amount_off?: number;
|
|
1536
|
+
percent_off?: number;
|
|
1537
|
+
currency?: string;
|
|
1538
|
+
duration: string;
|
|
1539
|
+
metadata?: Record<string, unknown>;
|
|
1540
|
+
created: number;
|
|
1541
|
+
updated: number;
|
|
1542
|
+
livemode: boolean;
|
|
1543
|
+
}
|
|
1544
|
+
interface CouponListResponse {
|
|
1545
|
+
meta: PaginationMeta$1;
|
|
1546
|
+
data: Coupon[];
|
|
1547
|
+
}
|
|
1548
|
+
interface CreateCouponParams {
|
|
1549
|
+
name: string;
|
|
1550
|
+
discount_type: string;
|
|
1551
|
+
amount_off?: number;
|
|
1552
|
+
percent_off?: number;
|
|
1553
|
+
currency?: string;
|
|
1554
|
+
duration: string;
|
|
1555
|
+
metadata?: Record<string, unknown>;
|
|
1556
|
+
}
|
|
1557
|
+
interface UpdateCouponParams {
|
|
1558
|
+
name?: string;
|
|
1559
|
+
metadata?: Record<string, unknown>;
|
|
1560
|
+
}
|
|
1561
|
+
//#endregion
|
|
1562
|
+
//#region src/api/coupons-api.d.ts
|
|
1563
|
+
declare class CouponsAPI {
|
|
1564
|
+
private client;
|
|
1565
|
+
constructor(client: AxiosInstance);
|
|
1566
|
+
list(per_page?: number, page?: number): Promise<CouponListResponse>;
|
|
1567
|
+
get(id: string): Promise<Coupon>;
|
|
1568
|
+
create(params: CreateCouponParams): Promise<Coupon>;
|
|
1569
|
+
update(id: string, params: UpdateCouponParams): Promise<Coupon>;
|
|
1570
|
+
iterateAllCoupons(per_page?: number): Promise<AsyncGenerator<Coupon, any, any>>;
|
|
1571
|
+
}
|
|
1572
|
+
//#endregion
|
|
1573
|
+
//#region src/types/promotion_codes.d.ts
|
|
1574
|
+
interface PromotionCode {
|
|
1575
|
+
id: string;
|
|
1576
|
+
object: string;
|
|
1577
|
+
code: string;
|
|
1578
|
+
coupon_id: string;
|
|
1579
|
+
active: boolean;
|
|
1580
|
+
max_redemptions?: number;
|
|
1581
|
+
times_redeemed: number;
|
|
1582
|
+
expires_at?: number;
|
|
1583
|
+
metadata?: Record<string, unknown>;
|
|
1584
|
+
created: number;
|
|
1585
|
+
updated: number;
|
|
1586
|
+
livemode: boolean;
|
|
1587
|
+
}
|
|
1588
|
+
interface PromotionCodeListResponse {
|
|
1589
|
+
meta: PaginationMeta$1;
|
|
1590
|
+
data: PromotionCode[];
|
|
1591
|
+
}
|
|
1592
|
+
interface CreatePromotionCodeParams {
|
|
1593
|
+
code: string;
|
|
1594
|
+
coupon_id: string;
|
|
1595
|
+
active?: boolean;
|
|
1596
|
+
max_redemptions?: number;
|
|
1597
|
+
expires_at?: number;
|
|
1598
|
+
metadata?: Record<string, unknown>;
|
|
1599
|
+
}
|
|
1600
|
+
interface UpdatePromotionCodeParams {
|
|
1601
|
+
active?: boolean;
|
|
1602
|
+
metadata?: Record<string, unknown>;
|
|
1603
|
+
}
|
|
1604
|
+
//#endregion
|
|
1605
|
+
//#region src/api/promotion_codes-api.d.ts
|
|
1606
|
+
declare class PromotionCodesAPI {
|
|
1607
|
+
private client;
|
|
1608
|
+
constructor(client: AxiosInstance);
|
|
1609
|
+
list(per_page?: number, page?: number): Promise<PromotionCodeListResponse>;
|
|
1610
|
+
get(id: string): Promise<PromotionCode>;
|
|
1611
|
+
create(params: CreatePromotionCodeParams): Promise<PromotionCode>;
|
|
1612
|
+
update(id: string, params: UpdatePromotionCodeParams): Promise<PromotionCode>;
|
|
1613
|
+
iterateAllPromotionCodes(per_page?: number): Promise<AsyncGenerator<PromotionCode, any, any>>;
|
|
1614
|
+
}
|
|
1615
|
+
//#endregion
|
|
1616
|
+
//#region src/types/discounts.d.ts
|
|
1617
|
+
interface Discount {
|
|
1618
|
+
id: string;
|
|
1619
|
+
object: string;
|
|
1620
|
+
coupon_id: string;
|
|
1621
|
+
promotion_code_id?: string;
|
|
1622
|
+
customer_id?: string;
|
|
1623
|
+
subscription_id?: string;
|
|
1624
|
+
start?: number;
|
|
1625
|
+
end?: number;
|
|
1626
|
+
created: number;
|
|
1627
|
+
livemode: boolean;
|
|
1628
|
+
}
|
|
1629
|
+
interface DiscountListResponse {
|
|
1630
|
+
meta: PaginationMeta$1;
|
|
1631
|
+
data: Discount[];
|
|
1632
|
+
}
|
|
1633
|
+
interface ValidateDiscountsParams {
|
|
1634
|
+
promotion_codes: string[];
|
|
1635
|
+
customer_id?: string;
|
|
1636
|
+
}
|
|
1637
|
+
//#endregion
|
|
1638
|
+
//#region src/api/discounts-api.d.ts
|
|
1639
|
+
declare class DiscountsAPI {
|
|
1640
|
+
private client;
|
|
1641
|
+
constructor(client: AxiosInstance);
|
|
1642
|
+
list(per_page?: number, page?: number): Promise<DiscountListResponse>;
|
|
1643
|
+
get(id: string): Promise<Discount>;
|
|
1644
|
+
validate(params: ValidateDiscountsParams): Promise<Discount[]>;
|
|
1645
|
+
iterateAllDiscounts(per_page?: number): Promise<AsyncGenerator<Discount, any, any>>;
|
|
1646
|
+
}
|
|
1647
|
+
//#endregion
|
|
1648
|
+
//#region src/types/payment_link_sessions.d.ts
|
|
1649
|
+
interface PaymentLinkSession {
|
|
1650
|
+
id: string;
|
|
1651
|
+
object: string;
|
|
1652
|
+
url: string;
|
|
1653
|
+
status: string;
|
|
1654
|
+
metadata?: Record<string, unknown>;
|
|
1655
|
+
created: number;
|
|
1656
|
+
updated: number;
|
|
1657
|
+
livemode: boolean;
|
|
1658
|
+
}
|
|
1659
|
+
interface CreatePaymentLinkSessionParams {
|
|
1660
|
+
amount?: number;
|
|
1661
|
+
currency?: string;
|
|
1662
|
+
customer_id?: string;
|
|
1663
|
+
metadata?: Record<string, unknown>;
|
|
1664
|
+
}
|
|
1665
|
+
//#endregion
|
|
1666
|
+
//#region src/api/payment_link_sessions-api.d.ts
|
|
1667
|
+
declare class PaymentLinkSessionsAPI {
|
|
1668
|
+
private client;
|
|
1669
|
+
constructor(client: AxiosInstance);
|
|
1670
|
+
create(params: CreatePaymentLinkSessionParams): Promise<PaymentLinkSession>;
|
|
1671
|
+
}
|
|
1672
|
+
//#endregion
|
|
1673
|
+
//#region src/types/subscription_change_logs.d.ts
|
|
1674
|
+
interface SubscriptionChangeLog {
|
|
1675
|
+
id: string;
|
|
1676
|
+
object: string;
|
|
1677
|
+
subscription_id: string;
|
|
1678
|
+
change_type: string;
|
|
1679
|
+
changed_at: number;
|
|
1680
|
+
data?: Record<string, unknown>;
|
|
1681
|
+
}
|
|
1682
|
+
interface SubscriptionChangeLogListResponse {
|
|
1683
|
+
meta: PaginationMeta$1;
|
|
1684
|
+
data: SubscriptionChangeLog[];
|
|
1685
|
+
}
|
|
1686
|
+
//#endregion
|
|
1687
|
+
//#region src/api/subscription_change_logs-api.d.ts
|
|
1688
|
+
declare class SubscriptionChangeLogsAPI {
|
|
1689
|
+
private client;
|
|
1690
|
+
constructor(client: AxiosInstance);
|
|
1691
|
+
list(subscriptionId: string, per_page?: number, page?: number): Promise<SubscriptionChangeLogListResponse>;
|
|
1692
|
+
iterateAllSubscriptionChangeLogs(subscriptionId: string, per_page?: number): Promise<AsyncGenerator<SubscriptionChangeLog, any, any>>;
|
|
1693
|
+
}
|
|
1694
|
+
//#endregion
|
|
1695
|
+
//#region src/types/billing.d.ts
|
|
1696
|
+
interface Metering {
|
|
1697
|
+
id: string;
|
|
1698
|
+
object: string;
|
|
1699
|
+
event_name: string;
|
|
1700
|
+
customer_id?: string;
|
|
1701
|
+
value: number;
|
|
1702
|
+
timestamp?: number;
|
|
1703
|
+
metadata?: Record<string, unknown>;
|
|
1704
|
+
created: number;
|
|
1705
|
+
updated: number;
|
|
1706
|
+
livemode: boolean;
|
|
1707
|
+
}
|
|
1708
|
+
interface CreateMeteringParams {
|
|
1709
|
+
event_name: string;
|
|
1710
|
+
customer_id?: string;
|
|
1711
|
+
value: number;
|
|
1712
|
+
timestamp?: number;
|
|
1713
|
+
metadata?: Record<string, unknown>;
|
|
1714
|
+
}
|
|
1715
|
+
interface UpdateMeteringParams {
|
|
1716
|
+
value?: number;
|
|
1717
|
+
metadata?: Record<string, unknown>;
|
|
1718
|
+
}
|
|
1719
|
+
interface MeteringEvent {
|
|
1720
|
+
id: string;
|
|
1721
|
+
object: string;
|
|
1722
|
+
event_name: string;
|
|
1723
|
+
customer_id?: string;
|
|
1724
|
+
value: number;
|
|
1725
|
+
timestamp?: number;
|
|
1726
|
+
metadata?: Record<string, unknown>;
|
|
1727
|
+
created: number;
|
|
1728
|
+
updated: number;
|
|
1729
|
+
livemode: boolean;
|
|
1730
|
+
}
|
|
1731
|
+
interface CreateMeteringEventParams {
|
|
1732
|
+
event_name: string;
|
|
1733
|
+
customer_id?: string;
|
|
1734
|
+
value: number;
|
|
1735
|
+
timestamp?: number;
|
|
1736
|
+
metadata?: Record<string, unknown>;
|
|
1737
|
+
}
|
|
1738
|
+
interface UpdateMeteringEventParams {
|
|
1739
|
+
value?: number;
|
|
1740
|
+
metadata?: Record<string, unknown>;
|
|
1741
|
+
}
|
|
1742
|
+
interface BillingInvoice {
|
|
1743
|
+
id: string;
|
|
1744
|
+
object: string;
|
|
1745
|
+
customer_id?: string;
|
|
1746
|
+
amount: number;
|
|
1747
|
+
currency: string;
|
|
1748
|
+
status: string;
|
|
1749
|
+
created: number;
|
|
1750
|
+
updated: number;
|
|
1751
|
+
livemode: boolean;
|
|
1752
|
+
}
|
|
1753
|
+
interface CreateBillingInvoiceParams {
|
|
1754
|
+
customer_id?: string;
|
|
1755
|
+
subscription_id?: string;
|
|
1756
|
+
metadata?: Record<string, unknown>;
|
|
1757
|
+
}
|
|
1758
|
+
interface BillingCredit {
|
|
1759
|
+
id: string;
|
|
1760
|
+
object: string;
|
|
1761
|
+
customer_id?: string;
|
|
1762
|
+
amount: number;
|
|
1763
|
+
currency: string;
|
|
1764
|
+
metadata?: Record<string, unknown>;
|
|
1765
|
+
created: number;
|
|
1766
|
+
updated: number;
|
|
1767
|
+
livemode: boolean;
|
|
1768
|
+
}
|
|
1769
|
+
interface CreateBillingCreditParams {
|
|
1770
|
+
customer_id?: string;
|
|
1771
|
+
amount: number;
|
|
1772
|
+
currency: string;
|
|
1773
|
+
metadata?: Record<string, unknown>;
|
|
1774
|
+
}
|
|
1775
|
+
interface BillingReport {
|
|
1776
|
+
data: Record<string, unknown>[];
|
|
1777
|
+
meta?: Record<string, unknown>;
|
|
1778
|
+
}
|
|
1779
|
+
//#endregion
|
|
1780
|
+
//#region src/api/billing-api.d.ts
|
|
1781
|
+
declare class BillingAPI {
|
|
1782
|
+
private client;
|
|
1783
|
+
constructor(client: AxiosInstance);
|
|
1784
|
+
createMetering(params: CreateMeteringParams): Promise<Metering>;
|
|
1785
|
+
getMetering(id: string): Promise<Metering>;
|
|
1786
|
+
updateMetering(id: string, params: UpdateMeteringParams): Promise<Metering>;
|
|
1787
|
+
createMeteringEvent(params: CreateMeteringEventParams): Promise<MeteringEvent>;
|
|
1788
|
+
getMeteringEvent(id: string): Promise<MeteringEvent>;
|
|
1789
|
+
updateMeteringEvent(id: string, params: UpdateMeteringEventParams): Promise<MeteringEvent>;
|
|
1790
|
+
createBillingInvoice(params: CreateBillingInvoiceParams): Promise<BillingInvoice>;
|
|
1791
|
+
createBillingCredit(params: CreateBillingCreditParams): Promise<BillingCredit>;
|
|
1792
|
+
getBillingCredit(id: string): Promise<BillingCredit>;
|
|
1793
|
+
getCustomerReport(params?: Record<string, unknown>): Promise<BillingReport>;
|
|
1794
|
+
getEventReport(eventName: string, params?: Record<string, unknown>): Promise<BillingReport>;
|
|
1795
|
+
getEventsReport(params?: Record<string, unknown>): Promise<BillingReport>;
|
|
1796
|
+
getSubscriptionReport(params?: Record<string, unknown>): Promise<BillingReport>;
|
|
1797
|
+
}
|
|
1798
|
+
//#endregion
|
|
1799
|
+
//#region src/types/three_ds.d.ts
|
|
1800
|
+
interface ThreeDSIntent {
|
|
1801
|
+
id: string;
|
|
1802
|
+
object: string;
|
|
1803
|
+
status: string;
|
|
1804
|
+
charge_intent_id?: string;
|
|
1805
|
+
payment_method_id?: string;
|
|
1806
|
+
metadata?: Record<string, unknown>;
|
|
1807
|
+
created: number;
|
|
1808
|
+
updated: number;
|
|
1809
|
+
livemode: boolean;
|
|
1810
|
+
}
|
|
1811
|
+
interface CreateThreeDSIntentParams {
|
|
1812
|
+
charge_intent_id?: string;
|
|
1813
|
+
payment_method_id?: string;
|
|
1814
|
+
metadata?: Record<string, unknown>;
|
|
1815
|
+
}
|
|
1816
|
+
//#endregion
|
|
1817
|
+
//#region src/api/three_ds-api.d.ts
|
|
1818
|
+
declare class ThreeDSAPI {
|
|
1819
|
+
private client;
|
|
1820
|
+
constructor(client: AxiosInstance);
|
|
1821
|
+
create(params: CreateThreeDSIntentParams): Promise<ThreeDSIntent>;
|
|
1822
|
+
get(id: string): Promise<ThreeDSIntent>;
|
|
1823
|
+
resend(id: string): Promise<ThreeDSIntent>;
|
|
1824
|
+
}
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region src/types/product_phases.d.ts
|
|
1827
|
+
interface ProductPhase {
|
|
1828
|
+
id: string;
|
|
1829
|
+
object: string;
|
|
1830
|
+
product_id: string;
|
|
1831
|
+
name?: string;
|
|
1832
|
+
amount: number;
|
|
1833
|
+
currency: string;
|
|
1834
|
+
interval?: string;
|
|
1835
|
+
interval_count?: number;
|
|
1836
|
+
metadata?: Record<string, unknown>;
|
|
1837
|
+
created: number;
|
|
1838
|
+
updated: number;
|
|
1839
|
+
livemode: boolean;
|
|
1840
|
+
}
|
|
1841
|
+
interface ProductPhaseListResponse {
|
|
1842
|
+
meta: PaginationMeta$1;
|
|
1843
|
+
data: ProductPhase[];
|
|
1844
|
+
}
|
|
1845
|
+
interface CreateProductPhaseParams {
|
|
1846
|
+
name?: string;
|
|
1847
|
+
amount: number;
|
|
1848
|
+
currency: string;
|
|
1849
|
+
interval?: string;
|
|
1850
|
+
interval_count?: number;
|
|
1851
|
+
metadata?: Record<string, unknown>;
|
|
1852
|
+
}
|
|
1853
|
+
interface UpdateProductPhaseParams {
|
|
1854
|
+
name?: string;
|
|
1855
|
+
amount?: number;
|
|
1856
|
+
metadata?: Record<string, unknown>;
|
|
1857
|
+
}
|
|
1858
|
+
//#endregion
|
|
1859
|
+
//#region src/api/product_phases-api.d.ts
|
|
1860
|
+
declare class ProductPhasesAPI {
|
|
1861
|
+
private client;
|
|
1862
|
+
constructor(client: AxiosInstance);
|
|
1863
|
+
list(productId: string, per_page?: number, page?: number): Promise<ProductPhaseListResponse>;
|
|
1864
|
+
get(productId: string, phaseId: string): Promise<ProductPhase>;
|
|
1865
|
+
create(productId: string, params: CreateProductPhaseParams): Promise<ProductPhase>;
|
|
1866
|
+
update(productId: string, phaseId: string, params: UpdateProductPhaseParams): Promise<ProductPhase>;
|
|
1867
|
+
delete(productId: string, phaseId: string): Promise<ProductPhase>;
|
|
1868
|
+
bulkUpdate(productId: string, phases: Array<{
|
|
1869
|
+
id: string;
|
|
1870
|
+
[key: string]: unknown;
|
|
1871
|
+
}>): Promise<ProductPhaseListResponse>;
|
|
1872
|
+
iterateAllProductPhases(productId: string, per_page?: number): Promise<AsyncGenerator<ProductPhase, any, any>>;
|
|
1873
|
+
}
|
|
1874
|
+
//#endregion
|
|
1875
|
+
//#region src/types/terms_of_service.d.ts
|
|
1876
|
+
interface TermsOfServiceTokenResponse {
|
|
1877
|
+
token: string;
|
|
1878
|
+
}
|
|
1879
|
+
interface UpdateTermsOfServiceParams {
|
|
1880
|
+
token: string;
|
|
1881
|
+
accepted_at?: number;
|
|
1882
|
+
ip_address?: string;
|
|
1883
|
+
user_agent?: string;
|
|
1884
|
+
}
|
|
1885
|
+
//#endregion
|
|
1886
|
+
//#region src/api/terms_of_service-api.d.ts
|
|
1887
|
+
declare class TermsOfServiceAPI {
|
|
1888
|
+
private client;
|
|
1889
|
+
constructor(client: AxiosInstance);
|
|
1890
|
+
createToken(): Promise<TermsOfServiceTokenResponse>;
|
|
1891
|
+
update(params: UpdateTermsOfServiceParams): Promise<TermsOfServiceTokenResponse>;
|
|
1892
|
+
}
|
|
1893
|
+
//#endregion
|
|
1894
|
+
//#region src/types/onboarding.d.ts
|
|
1895
|
+
interface OnboardingSession {
|
|
1896
|
+
id: string;
|
|
1897
|
+
object: string;
|
|
1898
|
+
status: string;
|
|
1899
|
+
user_id?: string | null;
|
|
1900
|
+
customer_id?: string | null;
|
|
1901
|
+
entry_point?: string | null;
|
|
1902
|
+
steps?: Record<string, unknown>;
|
|
1903
|
+
client_secret?: string | null;
|
|
1904
|
+
expires_at?: number | null;
|
|
1905
|
+
livemode: boolean;
|
|
1906
|
+
created_at: number;
|
|
1907
|
+
updated_at?: number | null;
|
|
1908
|
+
completed_at?: number | null;
|
|
1909
|
+
metadata?: Record<string, unknown> | null;
|
|
1910
|
+
components?: Record<string, unknown> | null;
|
|
1911
|
+
}
|
|
1912
|
+
interface OnboardingSessionListResponse {
|
|
1913
|
+
object: string;
|
|
1914
|
+
data: OnboardingSession[];
|
|
1915
|
+
has_more: boolean;
|
|
1916
|
+
url: string;
|
|
1917
|
+
}
|
|
1918
|
+
interface ListOnboardingSessionsParams {
|
|
1919
|
+
customer_id?: string;
|
|
1920
|
+
status?: string;
|
|
1921
|
+
limit?: number;
|
|
1922
|
+
starting_after?: string;
|
|
1923
|
+
}
|
|
1924
|
+
interface CreateOnboardingSessionParams {
|
|
1925
|
+
customer_id?: string;
|
|
1926
|
+
entry_point?: string;
|
|
1927
|
+
metadata?: Record<string, unknown>;
|
|
1928
|
+
components?: Record<string, unknown>;
|
|
1929
|
+
}
|
|
1930
|
+
interface UpdateOnboardingSessionParams {
|
|
1931
|
+
steps?: Record<string, unknown>;
|
|
1932
|
+
status?: string;
|
|
1933
|
+
}
|
|
1934
|
+
interface OnboardingPayoutParams {
|
|
1935
|
+
payout_method_id: string;
|
|
1936
|
+
}
|
|
1937
|
+
//#endregion
|
|
1938
|
+
//#region src/api/onboarding-api.d.ts
|
|
1939
|
+
declare class OnboardingAPI {
|
|
1940
|
+
private client;
|
|
1941
|
+
constructor(client: AxiosInstance);
|
|
1942
|
+
list(params?: ListOnboardingSessionsParams): Promise<OnboardingSessionListResponse>;
|
|
1943
|
+
create(params: CreateOnboardingSessionParams): Promise<OnboardingSession>;
|
|
1944
|
+
get(sessionId: string): Promise<OnboardingSession>;
|
|
1945
|
+
update(sessionId: string, params: UpdateOnboardingSessionParams): Promise<OnboardingSession>;
|
|
1946
|
+
payout(sessionId: string, params: OnboardingPayoutParams): Promise<OnboardingSession>;
|
|
1947
|
+
}
|
|
1948
|
+
//#endregion
|
|
1949
|
+
//#region src/types/configuration.d.ts
|
|
1950
|
+
interface EvervaultConfiguration {
|
|
1951
|
+
app_id: string | null;
|
|
1952
|
+
team_id: string | null;
|
|
1953
|
+
}
|
|
1954
|
+
interface SiftConfiguration {
|
|
1955
|
+
account_id: string | null;
|
|
1956
|
+
beacon_key: string | null;
|
|
1957
|
+
}
|
|
1958
|
+
//#endregion
|
|
1959
|
+
//#region src/api/configuration-api.d.ts
|
|
1960
|
+
declare class ConfigurationAPI {
|
|
1961
|
+
private client;
|
|
1962
|
+
constructor(client: AxiosInstance);
|
|
1963
|
+
getEvervaultConfiguration(opts?: RequestOptions): Promise<EvervaultConfiguration>;
|
|
1964
|
+
getSiftConfiguration(opts?: RequestOptions): Promise<SiftConfiguration>;
|
|
1965
|
+
}
|
|
1966
|
+
//#endregion
|
|
1967
|
+
//#region src/types/device_attestation.d.ts
|
|
1968
|
+
interface ChallengeResponse {
|
|
1969
|
+
challenge: string;
|
|
1970
|
+
}
|
|
1971
|
+
interface AttestRequest {
|
|
1972
|
+
key_id: string;
|
|
1973
|
+
attestation_object: string;
|
|
1974
|
+
challenge: string;
|
|
1975
|
+
}
|
|
1976
|
+
interface AttestResponse {
|
|
1977
|
+
status: string;
|
|
1978
|
+
key_id: string;
|
|
1979
|
+
}
|
|
1980
|
+
//#endregion
|
|
1981
|
+
//#region src/api/device_attestation-api.d.ts
|
|
1982
|
+
declare class DeviceAttestationAPI {
|
|
1983
|
+
private client;
|
|
1984
|
+
constructor(client: AxiosInstance);
|
|
1985
|
+
getChallenge(opts?: RequestOptions): Promise<ChallengeResponse>;
|
|
1986
|
+
attest(params: AttestRequest, opts?: RequestOptions): Promise<AttestResponse>;
|
|
1987
|
+
}
|
|
1988
|
+
//#endregion
|
|
1989
|
+
//#region src/types/wallet.d.ts
|
|
1990
|
+
interface GooglePayConfiguration {
|
|
1991
|
+
identifier: string | null;
|
|
1992
|
+
environment: string | null;
|
|
1993
|
+
processor: string | null;
|
|
1994
|
+
processor_key: string | null;
|
|
1995
|
+
}
|
|
1996
|
+
//#endregion
|
|
1997
|
+
//#region src/api/wallet-api.d.ts
|
|
1998
|
+
declare class WalletAPI {
|
|
1999
|
+
private client;
|
|
2000
|
+
constructor(client: AxiosInstance);
|
|
2001
|
+
getGooglePayConfiguration(opts?: RequestOptions): Promise<GooglePayConfiguration>;
|
|
2002
|
+
}
|
|
2003
|
+
//#endregion
|
|
2004
|
+
//#region src/api/geo_compliance-api.d.ts
|
|
2005
|
+
declare class GeoComplianceAPI {
|
|
2006
|
+
private client;
|
|
2007
|
+
constructor(client: AxiosInstance);
|
|
2008
|
+
getAccountStatus(accountId: string, opts?: RequestOptions): Promise<GeoComplianceStatus>;
|
|
2009
|
+
}
|
|
2010
|
+
//#endregion
|
|
2011
|
+
//#region src/utils/paginator.d.ts
|
|
2012
|
+
declare function paginate<T>(fetchPage: (page: number) => Promise<{
|
|
2013
|
+
data: T[];
|
|
2014
|
+
meta?: {
|
|
2015
|
+
has_more?: boolean;
|
|
2016
|
+
};
|
|
2017
|
+
}>, pageSize?: number): AsyncGenerator<T>;
|
|
2018
|
+
//#endregion
|
|
2019
|
+
//#region src/errors/frame_api_error.d.ts
|
|
2020
|
+
declare class FrameAPIError extends Error {
|
|
2021
|
+
code: string;
|
|
2022
|
+
status: number;
|
|
2023
|
+
raw: any;
|
|
2024
|
+
constructor(message: string, code: string, status: number, raw: any);
|
|
2025
|
+
}
|
|
2026
|
+
//#endregion
|
|
2027
|
+
//#region src/index.d.ts
|
|
2028
|
+
declare class FrameSDK {
|
|
2029
|
+
accounts: AccountsAPI;
|
|
2030
|
+
capabilities: CapabilitiesAPI;
|
|
2031
|
+
onboardingSessions: OnboardingSessionsAPI;
|
|
2032
|
+
customers: CustomersAPI;
|
|
2033
|
+
paymentMethods: PaymentMethodsAPI;
|
|
2034
|
+
chargeIntents: ChargeIntentsAPI;
|
|
2035
|
+
refunds: RefundsAPI;
|
|
2036
|
+
subscriptions: SubscriptionsAPI;
|
|
2037
|
+
customerIdentityVerifications: CustomerIdentityVerificationsAPI;
|
|
2038
|
+
subscriptionPhases: SubscriptionPhasesAPI;
|
|
2039
|
+
invoices: InvoicesAPI;
|
|
2040
|
+
invoiceLineItems: InvoiceLineItemsAPI;
|
|
2041
|
+
disputes: DisputesAPI;
|
|
2042
|
+
products: ProductsAPI;
|
|
2043
|
+
charges: ChargesAPI;
|
|
2044
|
+
chargeSessions: ChargeSessionsAPI;
|
|
2045
|
+
sonarSessions: SonarSessionsAPI;
|
|
2046
|
+
phoneVerifications: PhoneVerificationsAPI;
|
|
2047
|
+
geofences: GeofencesAPI;
|
|
2048
|
+
webhookEndpoints: WebhookEndpointsAPI;
|
|
2049
|
+
payouts: PayoutsAPI;
|
|
2050
|
+
transfers: TransfersAPI;
|
|
2051
|
+
transferFeePlans: TransferFeePlansAPI;
|
|
2052
|
+
transferBillingAgreements: TransferBillingAgreementsAPI;
|
|
2053
|
+
coupons: CouponsAPI;
|
|
2054
|
+
promotionCodes: PromotionCodesAPI;
|
|
2055
|
+
discounts: DiscountsAPI;
|
|
2056
|
+
paymentLinkSessions: PaymentLinkSessionsAPI;
|
|
2057
|
+
subscriptionChangeLogs: SubscriptionChangeLogsAPI;
|
|
2058
|
+
billing: BillingAPI;
|
|
2059
|
+
threeDS: ThreeDSAPI;
|
|
2060
|
+
productPhases: ProductPhasesAPI;
|
|
2061
|
+
termsOfService: TermsOfServiceAPI;
|
|
2062
|
+
onboarding: OnboardingAPI;
|
|
2063
|
+
configuration: ConfigurationAPI;
|
|
2064
|
+
deviceAttestation: DeviceAttestationAPI;
|
|
2065
|
+
wallet: WalletAPI;
|
|
2066
|
+
geoCompliance: GeoComplianceAPI;
|
|
2067
|
+
constructor(config: ClientConfig);
|
|
2068
|
+
}
|
|
2069
|
+
//#endregion
|
|
2070
|
+
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 ReactNativeFileDescriptor, type RequestOptions, type SiftConfiguration, maybePublishableKey, paginate, withPublishableKey };
|
|
2071
|
+
//# sourceMappingURL=index.d.cts.map
|