@stripe/connect-js 3.3.43-preview-1 → 3.3.43-preview-2
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/connect.esm.js +332 -0
- package/dist/connect.js +336 -0
- package/dist/pure.esm.js +326 -0
- package/dist/pure.js +330 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/pure.d.ts +2 -0
- package/dist/src/shared.d.ts +15 -0
- package/dist/src/utils/jestHelpers.d.ts +2 -0
- package/dist/src/utils/jestSetup.d.ts +1 -0
- package/dist/types/config.d.ts +237 -0
- package/package.json +1 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
export type FetchEphemeralKeyFunction = (fetchParams: {
|
|
2
|
+
issuingCard: string;
|
|
3
|
+
nonce: string;
|
|
4
|
+
}) => Promise<{
|
|
5
|
+
issuingCard: string;
|
|
6
|
+
nonce: string;
|
|
7
|
+
ephemeralKeySecret: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type CollectionOptions = {
|
|
10
|
+
fields: "currently_due" | "eventually_due";
|
|
11
|
+
futureRequirements?: "omit" | "include";
|
|
12
|
+
requirements?: {
|
|
13
|
+
only: string[];
|
|
14
|
+
} | {
|
|
15
|
+
exclude: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type Status = "blocked" | "canceled" | "disputed" | "early_fraud_warning" | "failed" | "incomplete" | "partially_refunded" | "pending" | "refund_pending" | "refunded" | "successful" | "uncaptured";
|
|
19
|
+
export type PaymentMethod = "ach_credit_transfer" | "ach_debit" | "acss_debit" | "affirm" | "afterpay_clearpay" | "alipay" | "alma" | "amazon_pay" | "amex_express_checkout" | "android_pay" | "apple_pay" | "au_becs_debit" | "nz_bank_account" | "bancontact" | "bacs_debit" | "bitcoin_source" | "bitcoin" | "blik" | "boleto" | "boleto_pilot" | "card_present" | "card" | "cashapp" | "crypto" | "customer_balance" | "demo_pay" | "dummy_passthrough_card" | "gbp_credit_transfer" | "google_pay" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "id_bank_transfer" | "id_credit_transfer" | "jp_credit_transfer" | "interac_present" | "kakao_pay" | "klarna" | "konbini" | "kr_card" | "kr_market" | "link" | "masterpass" | "mb_way" | "meta_pay" | "multibanco" | "mobilepay" | "naver_pay" | "netbanking" | "ng_bank" | "ng_bank_transfer" | "ng_card" | "ng_market" | "ng_ussd" | "vipps" | "oxxo" | "p24" | "payto" | "pay_by_bank" | "paper_check" | "payco" | "paynow" | "paypal" | "pix" | "promptpay" | "revolut_pay" | "samsung_pay" | "sepa_credit_transfer" | "sepa_debit" | "sofort" | "south_korea_market" | "swish" | "three_d_secure" | "three_d_secure_2" | "three_d_secure_2_eap" | "twint" | "upi" | "us_bank_account" | "visa_checkout" | "wechat" | "wechat_pay" | "zip";
|
|
20
|
+
export type PaymentsListDefaultFilters = {
|
|
21
|
+
amount?: {
|
|
22
|
+
equals: number;
|
|
23
|
+
} | {
|
|
24
|
+
greaterThan: number;
|
|
25
|
+
} | {
|
|
26
|
+
lessThan: number;
|
|
27
|
+
} | {
|
|
28
|
+
between: {
|
|
29
|
+
lowerBound: number;
|
|
30
|
+
upperBound: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
date?: {
|
|
34
|
+
before: Date;
|
|
35
|
+
} | {
|
|
36
|
+
after: Date;
|
|
37
|
+
} | {
|
|
38
|
+
between: {
|
|
39
|
+
start: Date;
|
|
40
|
+
end: Date;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
status?: Array<Status>;
|
|
44
|
+
paymentMethod?: PaymentMethod;
|
|
45
|
+
};
|
|
46
|
+
export type NotificationCount = {
|
|
47
|
+
total: number;
|
|
48
|
+
actionRequired: number;
|
|
49
|
+
};
|
|
50
|
+
export type InstallState = {
|
|
51
|
+
appId: string;
|
|
52
|
+
state: "INSTALLED" | "UNINSTALLED";
|
|
53
|
+
};
|
|
54
|
+
export type LoaderStart = {
|
|
55
|
+
elementTagName: string;
|
|
56
|
+
};
|
|
57
|
+
export type LoadError = {
|
|
58
|
+
elementTagName: string;
|
|
59
|
+
error: EmbeddedError;
|
|
60
|
+
};
|
|
61
|
+
export type StepChange = {
|
|
62
|
+
step: string;
|
|
63
|
+
};
|
|
64
|
+
export type EmbeddedError = {
|
|
65
|
+
type: EmbeddedErrorType;
|
|
66
|
+
message?: string;
|
|
67
|
+
};
|
|
68
|
+
export type FinancingProductType = {
|
|
69
|
+
productType: "standard" | "refill" | "none";
|
|
70
|
+
activeFinancingCount: number;
|
|
71
|
+
};
|
|
72
|
+
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
73
|
+
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
74
|
+
export type ReportName = "gross_volume" | "net_volume";
|
|
75
|
+
export type RecipientDataSource = "customers";
|
|
76
|
+
export type EmbeddedErrorType =
|
|
77
|
+
/**
|
|
78
|
+
* Failure to connect to Stripe's API.
|
|
79
|
+
*/
|
|
80
|
+
"api_connection_error"
|
|
81
|
+
/**
|
|
82
|
+
* Failure to perform the authentication flow within Connect Embedded Components
|
|
83
|
+
*/
|
|
84
|
+
| "authentication_error"
|
|
85
|
+
/**
|
|
86
|
+
* Account session create failed
|
|
87
|
+
*/
|
|
88
|
+
| "account_session_create_error"
|
|
89
|
+
/**
|
|
90
|
+
* Request failed with an 4xx status code, typically caused by platform configuration issues
|
|
91
|
+
*/
|
|
92
|
+
| "invalid_request_error"
|
|
93
|
+
/**
|
|
94
|
+
* Too many requests hit the API too quickly.
|
|
95
|
+
*/
|
|
96
|
+
| "rate_limit_error"
|
|
97
|
+
/**
|
|
98
|
+
* API errors covering any other type of problem (e.g., a temporary problem with Stripe's servers), and are extremely uncommon.
|
|
99
|
+
*/
|
|
100
|
+
| "api_error";
|
|
101
|
+
export declare const ConnectElementCommonMethodConfig: {
|
|
102
|
+
setOnLoadError: (_listener: (({ error, elementTagName }: LoadError) => void) | undefined) => void;
|
|
103
|
+
setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
|
|
104
|
+
};
|
|
105
|
+
export declare const ConnectElementCustomMethodConfig: {
|
|
106
|
+
payments: {
|
|
107
|
+
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
108
|
+
};
|
|
109
|
+
"payment-details": {
|
|
110
|
+
setPayment: (_payment: string | undefined) => void;
|
|
111
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
112
|
+
};
|
|
113
|
+
"payment-disputes": {
|
|
114
|
+
setPayment: (_payment: string | undefined) => void;
|
|
115
|
+
setOnDisputesLoaded: (_listener: (({ total }: {
|
|
116
|
+
total: number;
|
|
117
|
+
}) => void) | undefined) => void;
|
|
118
|
+
};
|
|
119
|
+
"account-onboarding": {
|
|
120
|
+
setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
|
|
121
|
+
setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
|
|
122
|
+
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
123
|
+
setSkipTermsOfServiceCollection: (_skipTermsOfServiceCollection: boolean | undefined) => void;
|
|
124
|
+
setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
|
|
125
|
+
setOnExit: (_listener: (() => void) | undefined) => void;
|
|
126
|
+
setOnStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
127
|
+
};
|
|
128
|
+
"account-management": {
|
|
129
|
+
setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
|
|
130
|
+
};
|
|
131
|
+
"notification-banner": {
|
|
132
|
+
setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
|
|
133
|
+
setOnNotificationsChange: (_listener: (({ total, actionRequired }: NotificationCount) => void) | undefined) => void;
|
|
134
|
+
};
|
|
135
|
+
"instant-payouts-promotion": {
|
|
136
|
+
setOnInstantPayoutsPromotionLoaded: (_listener: (({ promotionShown }: {
|
|
137
|
+
promotionShown: boolean;
|
|
138
|
+
}) => void) | undefined) => void;
|
|
139
|
+
setOnInstantPayoutCreated: (_listener: (({ payoutId }: {
|
|
140
|
+
payoutId: string;
|
|
141
|
+
}) => void) | undefined) => void;
|
|
142
|
+
};
|
|
143
|
+
"issuing-card": {
|
|
144
|
+
setDefaultCard: (_defaultCard: string | undefined) => void;
|
|
145
|
+
setCardSwitching: (_cardSwitching: boolean | undefined) => void;
|
|
146
|
+
setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
|
|
147
|
+
setShowSpendControls: (_showSpendControls: boolean | undefined) => void;
|
|
148
|
+
};
|
|
149
|
+
"issuing-cards-list": {
|
|
150
|
+
setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
|
|
151
|
+
setShowSpendControls: (_showSpendControls: boolean | undefined) => void;
|
|
152
|
+
setIssuingProgram: (_issuingProgram: string | undefined) => void;
|
|
153
|
+
};
|
|
154
|
+
"financial-account": {
|
|
155
|
+
setFinancialAccount: (_financialAccount: string) => void;
|
|
156
|
+
};
|
|
157
|
+
"financial-account-transactions": {
|
|
158
|
+
setFinancialAccount: (_financialAccount: string) => void;
|
|
159
|
+
};
|
|
160
|
+
recipients: {
|
|
161
|
+
setDataSource: (_dataSource: RecipientDataSource) => void;
|
|
162
|
+
};
|
|
163
|
+
"app-install": {
|
|
164
|
+
setApp: (_app: string | undefined) => void;
|
|
165
|
+
setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
166
|
+
setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
167
|
+
};
|
|
168
|
+
"app-viewport": {
|
|
169
|
+
setApp: (_app: string | undefined) => void;
|
|
170
|
+
setAppData: (_appData: Record<string, string> | undefined) => void;
|
|
171
|
+
};
|
|
172
|
+
"payment-method-settings": {
|
|
173
|
+
setPaymentMethodConfiguration: (_paymentMethodConfiguration: string | undefined) => void;
|
|
174
|
+
};
|
|
175
|
+
"capital-financing": {
|
|
176
|
+
setDefaultFinancingOffer: (_defaultFinancingOffer: string | undefined) => void;
|
|
177
|
+
setShowFinancingSelector: (_showFinancingSelector: boolean | undefined) => void;
|
|
178
|
+
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
179
|
+
setSupportUrl: (_supportUrl: string | undefined) => void;
|
|
180
|
+
setOnFinancingsLoaded: (_listener: (({ total }: {
|
|
181
|
+
total: number;
|
|
182
|
+
}) => void) | undefined) => void;
|
|
183
|
+
};
|
|
184
|
+
"capital-financing-application": {
|
|
185
|
+
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
186
|
+
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
187
|
+
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
188
|
+
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
189
|
+
};
|
|
190
|
+
"capital-financing-promotion": {
|
|
191
|
+
setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
|
|
192
|
+
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
193
|
+
setOnEligibleFinancingOfferLoaded: (_listener: (({ productType, activeFinancingCount, }: FinancingProductType) => void) | undefined) => void;
|
|
194
|
+
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
195
|
+
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
196
|
+
setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
|
|
197
|
+
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
198
|
+
};
|
|
199
|
+
"reporting-chart": {
|
|
200
|
+
setReportName: (_reportName: ReportName) => void;
|
|
201
|
+
setIntervalStart: (_intervalStart: Date | undefined) => void;
|
|
202
|
+
setIntervalEnd: (_intervalEnd: Date | undefined) => void;
|
|
203
|
+
setIntervalType: (_intervalType: IntervalType | undefined) => void;
|
|
204
|
+
};
|
|
205
|
+
"tax-settings": {
|
|
206
|
+
setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
|
|
207
|
+
setDisplayHeadOfficeCountries: (_countries: string[] | undefined) => void;
|
|
208
|
+
setOnTaxSettingsUpdated: (_listener: (({ id }: {
|
|
209
|
+
id: string;
|
|
210
|
+
}) => void) | undefined) => void;
|
|
211
|
+
};
|
|
212
|
+
"tax-registrations": {
|
|
213
|
+
setOnAfterTaxRegistrationAdded: (_listener: (({ id }: {
|
|
214
|
+
id: string;
|
|
215
|
+
}) => void) | undefined) => void;
|
|
216
|
+
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
217
|
+
setOnAfterTaxRegistrationExpired: (_listener: (({ id }: {
|
|
218
|
+
id: string;
|
|
219
|
+
}) => void) | undefined) => void;
|
|
220
|
+
};
|
|
221
|
+
"tax-threshold-monitoring": {
|
|
222
|
+
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
223
|
+
};
|
|
224
|
+
"product-tax-code-selector": {
|
|
225
|
+
setOnTaxCodeSelect: (_listener: ((taxCode: string | null, _: {
|
|
226
|
+
analyticsName: string;
|
|
227
|
+
} | null) => void) | undefined) => void;
|
|
228
|
+
setHideDescription: (_hideDescription: boolean | undefined) => void;
|
|
229
|
+
setDisabled: (_disabled: boolean | undefined) => void;
|
|
230
|
+
setInitialTaxCode: (_initialTaxCode: string | undefined) => void;
|
|
231
|
+
};
|
|
232
|
+
"export-tax-transactions": {};
|
|
233
|
+
"payout-details": {
|
|
234
|
+
setPayout: (_payout: string | undefined) => void;
|
|
235
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
236
|
+
};
|
|
237
|
+
};
|