@stripe/connect-js 3.3.36-preview-1 → 3.3.36
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 +37 -89
- package/dist/connect.js +37 -89
- package/dist/pure.esm.js +29 -81
- package/dist/pure.js +29 -81
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +25 -73
- package/package.json +3 -3
- package/src/shared.ts +25 -40
- package/types/config.ts +28 -115
- package/types/shared.d.ts +97 -18
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
|
|
@@ -286,84 +264,21 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
286
264
|
"financial-account-transactions": {
|
|
287
265
|
setFinancialAccount: (_financialAccount: string): void => {},
|
|
288
266
|
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
"app-install": {
|
|
293
|
-
setApp: (_app: string | undefined): void => {},
|
|
294
|
-
setOnAppInstallStateFetched: (
|
|
295
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
296
|
-
): void => {},
|
|
297
|
-
setOnAppInstallStateChanged: (
|
|
298
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
267
|
+
payments: {
|
|
268
|
+
setDefaultFilters: (
|
|
269
|
+
_filters: PaymentsListDefaultFilters | undefined
|
|
299
270
|
): void => {},
|
|
300
271
|
},
|
|
301
|
-
"
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
"payment-method-settings": {
|
|
306
|
-
setPaymentMethodConfiguration: (
|
|
307
|
-
_paymentMethodConfiguration: string | undefined
|
|
308
|
-
): void => {},
|
|
272
|
+
"payment-details": {
|
|
273
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
274
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
309
275
|
},
|
|
310
|
-
"
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
): void => {},
|
|
314
|
-
setShowFinancingSelector: (
|
|
315
|
-
_showFinancingSelector: boolean | undefined
|
|
316
|
-
): void => {},
|
|
317
|
-
setHowCapitalWorksUrl: (
|
|
318
|
-
_howCapitalWorksUrl: string | undefined
|
|
319
|
-
): void => {},
|
|
320
|
-
setSupportUrl: (_supportUrl: string | undefined): void => {},
|
|
321
|
-
setOnFinancingsLoaded: (
|
|
276
|
+
"payment-disputes": {
|
|
277
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
278
|
+
setOnDisputesLoaded: (
|
|
322
279
|
_listener: (({ total }: { total: number }) => void) | undefined
|
|
323
280
|
): void => {},
|
|
324
281
|
},
|
|
325
|
-
"capital-financing-application": {
|
|
326
|
-
setOnApplicationSubmitted: (
|
|
327
|
-
_listener: (() => void) | undefined
|
|
328
|
-
): void => {},
|
|
329
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
330
|
-
setHowCapitalWorksUrl: (
|
|
331
|
-
_howCapitalWorksUrl: string | undefined
|
|
332
|
-
): void => {},
|
|
333
|
-
setOnApplicationStepChange: (
|
|
334
|
-
_listener: (({ step }: StepChange) => void) | undefined
|
|
335
|
-
): void => {},
|
|
336
|
-
},
|
|
337
|
-
"capital-financing-promotion": {
|
|
338
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
|
|
339
|
-
setOnApplicationSubmitted: (
|
|
340
|
-
_listener: (() => void) | undefined
|
|
341
|
-
): void => {},
|
|
342
|
-
setOnEligibleFinancingOfferLoaded: (
|
|
343
|
-
_listener:
|
|
344
|
-
| (({
|
|
345
|
-
productType,
|
|
346
|
-
activeFinancingCount,
|
|
347
|
-
}: FinancingProductType) => void)
|
|
348
|
-
| undefined
|
|
349
|
-
): void => {},
|
|
350
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
351
|
-
setHowCapitalWorksUrl: (
|
|
352
|
-
_howCapitalWorksUrl: string | undefined
|
|
353
|
-
): void => {},
|
|
354
|
-
setEligibilityCriteriaUrl: (
|
|
355
|
-
_eligibilityCriteriaUrl: string | undefined
|
|
356
|
-
): void => {},
|
|
357
|
-
setOnApplicationStepChange: (
|
|
358
|
-
_listener: (({ step }: StepChange) => void) | undefined
|
|
359
|
-
): void => {},
|
|
360
|
-
},
|
|
361
|
-
"reporting-chart": {
|
|
362
|
-
setReportName: (_reportName: ReportName): void => {},
|
|
363
|
-
setIntervalStart: (_intervalStart: Date | undefined): void => {},
|
|
364
|
-
setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
|
|
365
|
-
setIntervalType: (_intervalType: IntervalType | undefined): void => {},
|
|
366
|
-
},
|
|
367
282
|
"tax-settings": {
|
|
368
283
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
|
|
369
284
|
setDisplayHeadOfficeCountries: (
|
|
@@ -378,17 +293,15 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
378
293
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
379
294
|
): void => {},
|
|
380
295
|
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
296
|
+
setOnAfterTaxRegistrationExpired: (
|
|
297
|
+
_listener: (({ id }: { id: string }) => void) | undefined
|
|
298
|
+
): void => {},
|
|
381
299
|
},
|
|
382
|
-
"
|
|
383
|
-
|
|
300
|
+
"payout-details": {
|
|
301
|
+
setPayout: (_payout: string | undefined): void => {},
|
|
302
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
384
303
|
},
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
_listener: ((taxCode: string) => void) | undefined
|
|
388
|
-
): void => {},
|
|
389
|
-
setHideDescription: (_hideDescription: boolean | undefined): void => {},
|
|
390
|
-
setDisabled: (_disabled: boolean | undefined): void => {},
|
|
391
|
-
setInitialTaxCode: (_initialTaxCode: string | undefined): void => {},
|
|
304
|
+
payoutReconciliationReport: {
|
|
305
|
+
setOnNotAvailable: (_listener: (() => void) | undefined): void => {},
|
|
392
306
|
},
|
|
393
|
-
"export-tax-transactions": {},
|
|
394
307
|
};
|
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;
|
|
@@ -142,6 +143,44 @@ export declare type AppearanceVariables = {
|
|
|
142
143
|
*/
|
|
143
144
|
buttonSecondaryColorText?: string;
|
|
144
145
|
|
|
146
|
+
// Danger Button Colors
|
|
147
|
+
/**
|
|
148
|
+
* The color used as a background for danger buttons to indicate destructive actions. This accepts hex values or RGB/HSL strings.
|
|
149
|
+
*/
|
|
150
|
+
buttonDangerColorBackground?: string;
|
|
151
|
+
/**
|
|
152
|
+
* The color used as a border for danger buttons to indicate destructive actions. This accepts hex values or RGB/HSL strings.
|
|
153
|
+
*/
|
|
154
|
+
buttonDangerColorBorder?: string;
|
|
155
|
+
/**
|
|
156
|
+
* The text color used for danger buttons to indicate destructive actions. This accepts hex values or RGB/HSL strings.
|
|
157
|
+
*/
|
|
158
|
+
buttonDangerColorText?: string;
|
|
159
|
+
|
|
160
|
+
// Button Padding
|
|
161
|
+
/**
|
|
162
|
+
* The horizontal padding used for buttons. This supports pixel values only.
|
|
163
|
+
*/
|
|
164
|
+
buttonPaddingX?: string;
|
|
165
|
+
/**
|
|
166
|
+
* The vertical padding used for buttons. This supports pixel values only.
|
|
167
|
+
*/
|
|
168
|
+
buttonPaddingY?: string;
|
|
169
|
+
|
|
170
|
+
// Button Label Typography
|
|
171
|
+
/**
|
|
172
|
+
* The font size for button label typography. Button label typography variables accept a valid font size value ranging from 1px to 200px, 0.1em to 12em, and 0.1rem to 12rem.
|
|
173
|
+
*/
|
|
174
|
+
buttonLabelFontSize?: string;
|
|
175
|
+
/**
|
|
176
|
+
* The font weight for button label typography. Button label typography variables accept a valid font weight value.
|
|
177
|
+
*/
|
|
178
|
+
buttonLabelFontWeight?: string;
|
|
179
|
+
/**
|
|
180
|
+
* The text transform for button label typography. Button label typography variables accept a valid text transform value.
|
|
181
|
+
*/
|
|
182
|
+
buttonLabelTextTransform?: string;
|
|
183
|
+
|
|
145
184
|
/**
|
|
146
185
|
* The color used for secondary text. This accepts hex values or RGB/RGBA/HSL strings.
|
|
147
186
|
*/
|
|
@@ -166,6 +205,10 @@ export declare type AppearanceVariables = {
|
|
|
166
205
|
* The thickness of text decoration of primary actions and links. This accepts a valid text decoration thickness value.
|
|
167
206
|
*/
|
|
168
207
|
actionPrimaryTextDecorationThickness?: string;
|
|
208
|
+
/**
|
|
209
|
+
* The text transform for the primary actions and links. This accepts a valid text transform value.
|
|
210
|
+
*/
|
|
211
|
+
actionPrimaryTextTransform?: string;
|
|
169
212
|
/**
|
|
170
213
|
* The color used for secondary actions and links. This accepts hex values or RGB/HSL strings.
|
|
171
214
|
*/
|
|
@@ -186,6 +229,10 @@ export declare type AppearanceVariables = {
|
|
|
186
229
|
* The thickness of text decoration of secondary actions and links. This accepts a valid text decoration thickness value.
|
|
187
230
|
*/
|
|
188
231
|
actionSecondaryTextDecorationThickness?: string;
|
|
232
|
+
/**
|
|
233
|
+
* The text transform for the secondary actions and links. This accepts a valid text transform value.
|
|
234
|
+
*/
|
|
235
|
+
actionSecondaryTextTransform?: string;
|
|
189
236
|
|
|
190
237
|
// Neutral Badge Colors
|
|
191
238
|
/**
|
|
@@ -243,6 +290,30 @@ export declare type AppearanceVariables = {
|
|
|
243
290
|
*/
|
|
244
291
|
badgeDangerColorBorder?: string;
|
|
245
292
|
|
|
293
|
+
// Badge Padding
|
|
294
|
+
/**
|
|
295
|
+
* The horizontal padding used for badges. This supports pixel values only.
|
|
296
|
+
*/
|
|
297
|
+
badgePaddingX?: string;
|
|
298
|
+
/**
|
|
299
|
+
* The vertical padding used for badges. This supports pixel values only.
|
|
300
|
+
*/
|
|
301
|
+
badgePaddingY?: string;
|
|
302
|
+
|
|
303
|
+
// Badge Label Typography
|
|
304
|
+
/**
|
|
305
|
+
* The font size for badge label typography. Badge label typography variables accept a valid font size value ranging from 1px to 200px, 0.1em to 12em, and 0.1rem to 12rem.
|
|
306
|
+
*/
|
|
307
|
+
badgeLabelFontSize?: string;
|
|
308
|
+
/**
|
|
309
|
+
* The font weight for badge label typography. Badge label typography variables accept a valid font weight value.
|
|
310
|
+
*/
|
|
311
|
+
badgeLabelFontWeight?: string;
|
|
312
|
+
/**
|
|
313
|
+
* The text transform for badge label typography. Badge label typography variables accept a valid text transform value.
|
|
314
|
+
*/
|
|
315
|
+
badgeLabelTextTransform?: string;
|
|
316
|
+
|
|
246
317
|
// Background
|
|
247
318
|
/**
|
|
248
319
|
* The background color used when highlighting information, like the selected row on a table or particular piece of UI. This accepts hex values or RGB/HSL strings.
|
|
@@ -267,6 +338,24 @@ export declare type AppearanceVariables = {
|
|
|
267
338
|
* The color used for to fill in form items like checkboxes, radio buttons and switches. This accepts hex values or RGB/HSL strings.
|
|
268
339
|
*/
|
|
269
340
|
formAccentColor?: string;
|
|
341
|
+
/**
|
|
342
|
+
* The color used for placeholder text in form items. This accepts hex values or RGB/HSL strings.
|
|
343
|
+
*/
|
|
344
|
+
formPlaceholderTextColor?: string;
|
|
345
|
+
/**
|
|
346
|
+
* The horizontal padding used for input fields in forms. This supports pixel values only.
|
|
347
|
+
*/
|
|
348
|
+
inputFieldPaddingX?: string;
|
|
349
|
+
/**
|
|
350
|
+
* The vertical padding used for input fields in forms. This supports pixel values only.
|
|
351
|
+
*/
|
|
352
|
+
inputFieldPaddingY?: string;
|
|
353
|
+
|
|
354
|
+
// Table
|
|
355
|
+
/**
|
|
356
|
+
* The vertical padding used for table rows. This supports pixel values only.
|
|
357
|
+
*/
|
|
358
|
+
tableRowPaddingY?: string;
|
|
270
359
|
|
|
271
360
|
// Border Sizing
|
|
272
361
|
/**
|
|
@@ -487,34 +576,24 @@ export interface StripeConnectInstance {
|
|
|
487
576
|
* Tagnames to be used with the `create` method of the Connect instance.
|
|
488
577
|
*/
|
|
489
578
|
export type ConnectElementTagName =
|
|
579
|
+
| "account-onboarding"
|
|
580
|
+
| "disputes-list"
|
|
490
581
|
| "payments"
|
|
491
|
-
| "payouts"
|
|
492
582
|
| "payment-details"
|
|
493
583
|
| "payment-disputes"
|
|
494
|
-
| "disputes-list"
|
|
495
|
-
| "account-onboarding"
|
|
496
|
-
| "payment-method-settings"
|
|
497
584
|
| "account-management"
|
|
498
585
|
| "notification-banner"
|
|
499
|
-
| "instant-payouts"
|
|
500
586
|
| "instant-payouts-promotion"
|
|
501
587
|
| "issuing-card"
|
|
502
588
|
| "issuing-cards-list"
|
|
503
589
|
| "financial-account"
|
|
504
590
|
| "financial-account-transactions"
|
|
505
|
-
| "
|
|
506
|
-
| "
|
|
507
|
-
| "
|
|
508
|
-
| "
|
|
509
|
-
| "capital-overview"
|
|
591
|
+
| "payouts"
|
|
592
|
+
| "payouts-list"
|
|
593
|
+
| "payout-details"
|
|
594
|
+
| "balances"
|
|
510
595
|
| "documents"
|
|
511
|
-
| "product-tax-code-selector"
|
|
512
|
-
| "export-tax-transactions"
|
|
513
596
|
| "tax-registrations"
|
|
514
597
|
| "tax-settings"
|
|
515
|
-
| "
|
|
516
|
-
| "
|
|
517
|
-
| "payouts-list"
|
|
518
|
-
| "app-install"
|
|
519
|
-
| "app-viewport"
|
|
520
|
-
| "reporting-chart";
|
|
598
|
+
| "balanceReport"
|
|
599
|
+
| "payoutReconciliationReport";
|