@stripe/connect-js 3.3.33-preview-1 → 3.3.33
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 +39 -89
- package/dist/connect.js +39 -89
- package/dist/pure.esm.js +31 -81
- package/dist/pure.js +31 -81
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +31 -72
- package/package.json +3 -3
- package/src/shared.ts +26 -42
- package/types/config.ts +36 -110
- package/types/shared.d.ts +9 -19
package/types/config.ts
CHANGED
|
@@ -13,6 +13,13 @@ export type FetchEphemeralKeyFunction = (fetchParams: {
|
|
|
13
13
|
export type CollectionOptions = {
|
|
14
14
|
fields: "currently_due" | "eventually_due";
|
|
15
15
|
futureRequirements?: "omit" | "include";
|
|
16
|
+
requirements?:
|
|
17
|
+
| {
|
|
18
|
+
only: string[];
|
|
19
|
+
}
|
|
20
|
+
| {
|
|
21
|
+
exclude: string[];
|
|
22
|
+
};
|
|
16
23
|
};
|
|
17
24
|
|
|
18
25
|
export type Status =
|
|
@@ -134,11 +141,6 @@ export type NotificationCount = {
|
|
|
134
141
|
actionRequired: number;
|
|
135
142
|
};
|
|
136
143
|
|
|
137
|
-
export type InstallState = {
|
|
138
|
-
appId: string;
|
|
139
|
-
state: "INSTALLED" | "UNINSTALLED";
|
|
140
|
-
};
|
|
141
|
-
|
|
142
144
|
export type LoaderStart = {
|
|
143
145
|
elementTagName: string;
|
|
144
146
|
};
|
|
@@ -157,19 +159,6 @@ export type EmbeddedError = {
|
|
|
157
159
|
message?: string;
|
|
158
160
|
};
|
|
159
161
|
|
|
160
|
-
export type FinancingProductType = {
|
|
161
|
-
productType: "standard" | "refill" | "none";
|
|
162
|
-
activeFinancingCount: number;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
166
|
-
|
|
167
|
-
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
168
|
-
|
|
169
|
-
export type ReportName = "gross_volume" | "net_volume";
|
|
170
|
-
|
|
171
|
-
export type RecipientDataSource = "customers";
|
|
172
|
-
|
|
173
162
|
export type EmbeddedErrorType =
|
|
174
163
|
/**
|
|
175
164
|
* Failure to connect to Stripe's API.
|
|
@@ -191,6 +180,10 @@ export type EmbeddedErrorType =
|
|
|
191
180
|
* Too many requests hit the API too quickly.
|
|
192
181
|
*/
|
|
193
182
|
| "rate_limit_error"
|
|
183
|
+
/**
|
|
184
|
+
* Failure to render the component, typically caused by browser extensions or network issues
|
|
185
|
+
*/
|
|
186
|
+
| "render_error"
|
|
194
187
|
/**
|
|
195
188
|
* API errors covering any other type of problem (e.g., a temporary problem with Stripe's servers), and are extremely uncommon.
|
|
196
189
|
*/
|
|
@@ -206,21 +199,6 @@ export const ConnectElementCommonMethodConfig = {
|
|
|
206
199
|
};
|
|
207
200
|
|
|
208
201
|
export const ConnectElementCustomMethodConfig = {
|
|
209
|
-
payments: {
|
|
210
|
-
setDefaultFilters: (
|
|
211
|
-
_filters: PaymentsListDefaultFilters | undefined
|
|
212
|
-
): void => {},
|
|
213
|
-
},
|
|
214
|
-
"payment-details": {
|
|
215
|
-
setPayment: (_payment: string | undefined): void => {},
|
|
216
|
-
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
217
|
-
},
|
|
218
|
-
"payment-disputes": {
|
|
219
|
-
setPayment: (_payment: string | undefined): void => {},
|
|
220
|
-
setOnDisputesLoaded: (
|
|
221
|
-
_listener: (({ total }: { total: number }) => void) | undefined
|
|
222
|
-
): void => {},
|
|
223
|
-
},
|
|
224
202
|
"account-onboarding": {
|
|
225
203
|
setFullTermsOfServiceUrl: (
|
|
226
204
|
_termOfServiceUrl: string | undefined
|
|
@@ -255,6 +233,16 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
255
233
|
| undefined
|
|
256
234
|
): void => {},
|
|
257
235
|
},
|
|
236
|
+
"instant-payouts-promotion": {
|
|
237
|
+
setOnInstantPayoutsPromotionLoaded: (
|
|
238
|
+
_listener:
|
|
239
|
+
| (({ promotionShown }: { promotionShown: boolean }) => void)
|
|
240
|
+
| undefined
|
|
241
|
+
): void => {},
|
|
242
|
+
setOnInstantPayoutCreated: (
|
|
243
|
+
_listener: (({ payoutId }: { payoutId: string }) => void) | undefined
|
|
244
|
+
): void => {},
|
|
245
|
+
},
|
|
258
246
|
"issuing-card": {
|
|
259
247
|
setDefaultCard: (_defaultCard: string | undefined): void => {},
|
|
260
248
|
setCardSwitching: (_cardSwitching: boolean | undefined): void => {},
|
|
@@ -276,78 +264,21 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
276
264
|
"financial-account-transactions": {
|
|
277
265
|
setFinancialAccount: (_financialAccount: string): void => {},
|
|
278
266
|
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
"app-install": {
|
|
283
|
-
setApp: (_app: string | undefined): void => {},
|
|
284
|
-
setOnAppInstallStateFetched: (
|
|
285
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
286
|
-
): void => {},
|
|
287
|
-
setOnAppInstallStateChanged: (
|
|
288
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
267
|
+
payments: {
|
|
268
|
+
setDefaultFilters: (
|
|
269
|
+
_filters: PaymentsListDefaultFilters | undefined
|
|
289
270
|
): void => {},
|
|
290
271
|
},
|
|
291
|
-
"
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
},
|
|
295
|
-
"payment-method-settings": {
|
|
296
|
-
setPaymentMethodConfiguration: (
|
|
297
|
-
_paymentMethodConfiguration: string | undefined
|
|
298
|
-
): void => {},
|
|
272
|
+
"payment-details": {
|
|
273
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
274
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
299
275
|
},
|
|
300
|
-
"
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
): void => {},
|
|
304
|
-
setShowFinancingSelector: (
|
|
305
|
-
_showFinancingSelector: boolean | undefined
|
|
306
|
-
): void => {},
|
|
307
|
-
setHowCapitalWorksUrl: (
|
|
308
|
-
_howCapitalWorksUrl: string | undefined
|
|
309
|
-
): void => {},
|
|
310
|
-
setSupportUrl: (_supportUrl: string | undefined): void => {},
|
|
311
|
-
setOnFinancingsLoaded: (
|
|
276
|
+
"payment-disputes": {
|
|
277
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
278
|
+
setOnDisputesLoaded: (
|
|
312
279
|
_listener: (({ total }: { total: number }) => void) | undefined
|
|
313
280
|
): void => {},
|
|
314
281
|
},
|
|
315
|
-
"capital-financing-application": {
|
|
316
|
-
setOnApplicationSubmitted: (
|
|
317
|
-
_listener: (() => void) | undefined
|
|
318
|
-
): void => {},
|
|
319
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
320
|
-
setHowCapitalWorksUrl: (
|
|
321
|
-
_howCapitalWorksUrl: string | undefined
|
|
322
|
-
): void => {},
|
|
323
|
-
},
|
|
324
|
-
"capital-financing-promotion": {
|
|
325
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
|
|
326
|
-
setOnApplicationSubmitted: (
|
|
327
|
-
_listener: (() => void) | undefined
|
|
328
|
-
): void => {},
|
|
329
|
-
setOnEligibleFinancingOfferLoaded: (
|
|
330
|
-
_listener:
|
|
331
|
-
| (({
|
|
332
|
-
productType,
|
|
333
|
-
activeFinancingCount,
|
|
334
|
-
}: FinancingProductType) => void)
|
|
335
|
-
| undefined
|
|
336
|
-
): void => {},
|
|
337
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
338
|
-
setHowCapitalWorksUrl: (
|
|
339
|
-
_howCapitalWorksUrl: string | undefined
|
|
340
|
-
): void => {},
|
|
341
|
-
setEligibilityCriteriaUrl: (
|
|
342
|
-
_eligibilityCriteriaUrl: string | undefined
|
|
343
|
-
): void => {},
|
|
344
|
-
},
|
|
345
|
-
"reporting-chart": {
|
|
346
|
-
setReportName: (_reportName: ReportName): void => {},
|
|
347
|
-
setIntervalStart: (_intervalStart: Date | undefined): void => {},
|
|
348
|
-
setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
|
|
349
|
-
setIntervalType: (_intervalType: IntervalType | undefined): void => {},
|
|
350
|
-
},
|
|
351
282
|
"tax-settings": {
|
|
352
283
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
|
|
353
284
|
setDisplayHeadOfficeCountries: (
|
|
@@ -362,17 +293,12 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
362
293
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
363
294
|
): void => {},
|
|
364
295
|
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
368
|
-
},
|
|
369
|
-
"product-tax-code-selector": {
|
|
370
|
-
setOnTaxCodeSelect: (
|
|
371
|
-
_listener: ((taxCode: string) => void) | undefined
|
|
296
|
+
setOnAfterTaxRegistrationExpired: (
|
|
297
|
+
_listener: (({ id }: { id: string }) => void) | undefined
|
|
372
298
|
): void => {},
|
|
373
|
-
setHideDescription: (_hideDescription: boolean | undefined): void => {},
|
|
374
|
-
setDisabled: (_disabled: boolean | undefined): void => {},
|
|
375
|
-
setInitialTaxCode: (_initialTaxCode: string | undefined): void => {},
|
|
376
299
|
},
|
|
377
|
-
"
|
|
300
|
+
"payout-details": {
|
|
301
|
+
setPayout: (_payout: string | undefined): void => {},
|
|
302
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
303
|
+
},
|
|
378
304
|
};
|
package/types/shared.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
ConnectElementCustomMethodConfig,
|
|
3
3
|
ConnectElementCommonMethodConfig,
|
|
4
4
|
} from "./config";
|
|
5
|
+
|
|
5
6
|
export declare type LoadConnectAndInitialize = (
|
|
6
7
|
initParams: IStripeConnectInitParams
|
|
7
8
|
) => StripeConnectInstance;
|
|
@@ -487,33 +488,22 @@ export interface StripeConnectInstance {
|
|
|
487
488
|
* Tagnames to be used with the `create` method of the Connect instance.
|
|
488
489
|
*/
|
|
489
490
|
export type ConnectElementTagName =
|
|
491
|
+
| "account-onboarding"
|
|
492
|
+
| "disputes-list"
|
|
490
493
|
| "payments"
|
|
491
|
-
| "payouts"
|
|
492
494
|
| "payment-details"
|
|
493
495
|
| "payment-disputes"
|
|
494
|
-
| "disputes-list"
|
|
495
|
-
| "account-onboarding"
|
|
496
|
-
| "payment-method-settings"
|
|
497
496
|
| "account-management"
|
|
498
497
|
| "notification-banner"
|
|
499
|
-
| "instant-payouts"
|
|
498
|
+
| "instant-payouts-promotion"
|
|
500
499
|
| "issuing-card"
|
|
501
500
|
| "issuing-cards-list"
|
|
502
501
|
| "financial-account"
|
|
503
502
|
| "financial-account-transactions"
|
|
504
|
-
| "
|
|
505
|
-
| "
|
|
506
|
-
| "
|
|
507
|
-
| "
|
|
508
|
-
| "capital-overview"
|
|
503
|
+
| "payouts"
|
|
504
|
+
| "payouts-list"
|
|
505
|
+
| "payout-details"
|
|
506
|
+
| "balances"
|
|
509
507
|
| "documents"
|
|
510
|
-
| "product-tax-code-selector"
|
|
511
|
-
| "export-tax-transactions"
|
|
512
508
|
| "tax-registrations"
|
|
513
|
-
| "tax-settings"
|
|
514
|
-
| "tax-threshold-monitoring"
|
|
515
|
-
| "balances"
|
|
516
|
-
| "payouts-list"
|
|
517
|
-
| "app-install"
|
|
518
|
-
| "app-viewport"
|
|
519
|
-
| "reporting-chart";
|
|
509
|
+
| "tax-settings";
|