@stripe/connect-js 3.3.32-preview-1 → 3.3.32
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 +27 -6
- package/dist/connect.js +27 -6
- package/dist/pure.esm.js +27 -6
- package/dist/pure.js +27 -6
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +34 -1
- package/package.json +3 -3
- package/src/shared.ts +26 -40
- package/types/config.ts +36 -110
- package/types/shared.d.ts +9 -18
package/dist/connect.esm.js
CHANGED
|
@@ -32,6 +32,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
32
32
|
setCollectionOptions: _collectionOptions => {},
|
|
33
33
|
setOnNotificationsChange: _listener => {}
|
|
34
34
|
},
|
|
35
|
+
"instant-payouts-promotion": {
|
|
36
|
+
setOnInstantPayoutsPromotionLoaded: _listener => {},
|
|
37
|
+
setOnInstantPayoutCreated: _listener => {}
|
|
38
|
+
},
|
|
35
39
|
"issuing-card": {
|
|
36
40
|
setDefaultCard: _defaultCard => {},
|
|
37
41
|
setCardSwitching: _cardSwitching => {},
|
|
@@ -74,7 +78,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
74
78
|
"capital-financing-application": {
|
|
75
79
|
setOnApplicationSubmitted: _listener => {},
|
|
76
80
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
77
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
81
|
+
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
82
|
+
setOnApplicationStepChange: _listener => {}
|
|
78
83
|
},
|
|
79
84
|
"capital-financing-promotion": {
|
|
80
85
|
setLayout: _layout => {},
|
|
@@ -82,7 +87,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
82
87
|
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
83
88
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
84
89
|
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
85
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
90
|
+
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
91
|
+
setOnApplicationStepChange: _listener => {}
|
|
86
92
|
},
|
|
87
93
|
"reporting-chart": {
|
|
88
94
|
setReportName: _reportName => {},
|
|
@@ -97,7 +103,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
97
103
|
},
|
|
98
104
|
"tax-registrations": {
|
|
99
105
|
setOnAfterTaxRegistrationAdded: _listener => {},
|
|
100
|
-
setDisplayCountries: _countries => {}
|
|
106
|
+
setDisplayCountries: _countries => {},
|
|
107
|
+
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
101
108
|
},
|
|
102
109
|
"tax-threshold-monitoring": {
|
|
103
110
|
setDisplayCountries: _countries => {}
|
|
@@ -108,7 +115,14 @@ const ConnectElementCustomMethodConfig = {
|
|
|
108
115
|
setDisabled: _disabled => {},
|
|
109
116
|
setInitialTaxCode: _initialTaxCode => {}
|
|
110
117
|
},
|
|
111
|
-
"export-tax-transactions": {}
|
|
118
|
+
"export-tax-transactions": {},
|
|
119
|
+
"payout-details": {
|
|
120
|
+
setPayout: _payout => {},
|
|
121
|
+
setOnClose: _listener => {}
|
|
122
|
+
},
|
|
123
|
+
"check-scanning": {
|
|
124
|
+
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
125
|
+
}
|
|
112
126
|
};
|
|
113
127
|
|
|
114
128
|
const componentNameMapping = {
|
|
@@ -116,11 +130,13 @@ const componentNameMapping = {
|
|
|
116
130
|
payouts: "stripe-connect-payouts",
|
|
117
131
|
"payment-details": "stripe-connect-payment-details",
|
|
118
132
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
133
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
119
134
|
"account-onboarding": "stripe-connect-account-onboarding",
|
|
120
135
|
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
121
136
|
"account-management": "stripe-connect-account-management",
|
|
122
137
|
"notification-banner": "stripe-connect-notification-banner",
|
|
123
138
|
"instant-payouts": "stripe-connect-instant-payouts",
|
|
139
|
+
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
124
140
|
"issuing-card": "stripe-connect-issuing-card",
|
|
125
141
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
126
142
|
"financial-account": "stripe-connect-financial-account",
|
|
@@ -138,9 +154,11 @@ const componentNameMapping = {
|
|
|
138
154
|
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
139
155
|
balances: "stripe-connect-balances",
|
|
140
156
|
"payouts-list": "stripe-connect-payouts-list",
|
|
157
|
+
"payout-details": "stripe-connect-payout-details",
|
|
141
158
|
"app-install": "stripe-connect-app-install",
|
|
142
159
|
"app-viewport": "stripe-connect-app-viewport",
|
|
143
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
160
|
+
"reporting-chart": "stripe-connect-reporting-chart",
|
|
161
|
+
"check-scanning": "stripe-connect-check-scanning"
|
|
144
162
|
};
|
|
145
163
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
146
164
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
@@ -236,6 +254,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
236
254
|
for (const method in methods) {
|
|
237
255
|
element[method] = function (value) {
|
|
238
256
|
stripeConnectInstance.then(() => {
|
|
257
|
+
if (!this[`${method}InternalOnly`]) {
|
|
258
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.45-preview-1`);
|
|
259
|
+
}
|
|
239
260
|
this[`${method}InternalOnly`](value);
|
|
240
261
|
});
|
|
241
262
|
};
|
|
@@ -288,7 +309,7 @@ const createWrapper = stripeConnect => {
|
|
|
288
309
|
sdk: true,
|
|
289
310
|
sdkOptions: {
|
|
290
311
|
// This will be replaced by the npm package version when bundling
|
|
291
|
-
sdkVersion: "3.3.
|
|
312
|
+
sdkVersion: "3.3.45-preview-1"
|
|
292
313
|
}
|
|
293
314
|
})
|
|
294
315
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -36,6 +36,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
36
36
|
setCollectionOptions: _collectionOptions => {},
|
|
37
37
|
setOnNotificationsChange: _listener => {}
|
|
38
38
|
},
|
|
39
|
+
"instant-payouts-promotion": {
|
|
40
|
+
setOnInstantPayoutsPromotionLoaded: _listener => {},
|
|
41
|
+
setOnInstantPayoutCreated: _listener => {}
|
|
42
|
+
},
|
|
39
43
|
"issuing-card": {
|
|
40
44
|
setDefaultCard: _defaultCard => {},
|
|
41
45
|
setCardSwitching: _cardSwitching => {},
|
|
@@ -78,7 +82,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
78
82
|
"capital-financing-application": {
|
|
79
83
|
setOnApplicationSubmitted: _listener => {},
|
|
80
84
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
81
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
85
|
+
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
86
|
+
setOnApplicationStepChange: _listener => {}
|
|
82
87
|
},
|
|
83
88
|
"capital-financing-promotion": {
|
|
84
89
|
setLayout: _layout => {},
|
|
@@ -86,7 +91,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
86
91
|
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
87
92
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
88
93
|
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
89
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
94
|
+
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
95
|
+
setOnApplicationStepChange: _listener => {}
|
|
90
96
|
},
|
|
91
97
|
"reporting-chart": {
|
|
92
98
|
setReportName: _reportName => {},
|
|
@@ -101,7 +107,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
101
107
|
},
|
|
102
108
|
"tax-registrations": {
|
|
103
109
|
setOnAfterTaxRegistrationAdded: _listener => {},
|
|
104
|
-
setDisplayCountries: _countries => {}
|
|
110
|
+
setDisplayCountries: _countries => {},
|
|
111
|
+
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
105
112
|
},
|
|
106
113
|
"tax-threshold-monitoring": {
|
|
107
114
|
setDisplayCountries: _countries => {}
|
|
@@ -112,7 +119,14 @@ const ConnectElementCustomMethodConfig = {
|
|
|
112
119
|
setDisabled: _disabled => {},
|
|
113
120
|
setInitialTaxCode: _initialTaxCode => {}
|
|
114
121
|
},
|
|
115
|
-
"export-tax-transactions": {}
|
|
122
|
+
"export-tax-transactions": {},
|
|
123
|
+
"payout-details": {
|
|
124
|
+
setPayout: _payout => {},
|
|
125
|
+
setOnClose: _listener => {}
|
|
126
|
+
},
|
|
127
|
+
"check-scanning": {
|
|
128
|
+
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
129
|
+
}
|
|
116
130
|
};
|
|
117
131
|
|
|
118
132
|
const componentNameMapping = {
|
|
@@ -120,11 +134,13 @@ const componentNameMapping = {
|
|
|
120
134
|
payouts: "stripe-connect-payouts",
|
|
121
135
|
"payment-details": "stripe-connect-payment-details",
|
|
122
136
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
137
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
123
138
|
"account-onboarding": "stripe-connect-account-onboarding",
|
|
124
139
|
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
125
140
|
"account-management": "stripe-connect-account-management",
|
|
126
141
|
"notification-banner": "stripe-connect-notification-banner",
|
|
127
142
|
"instant-payouts": "stripe-connect-instant-payouts",
|
|
143
|
+
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
128
144
|
"issuing-card": "stripe-connect-issuing-card",
|
|
129
145
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
130
146
|
"financial-account": "stripe-connect-financial-account",
|
|
@@ -142,9 +158,11 @@ const componentNameMapping = {
|
|
|
142
158
|
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
143
159
|
balances: "stripe-connect-balances",
|
|
144
160
|
"payouts-list": "stripe-connect-payouts-list",
|
|
161
|
+
"payout-details": "stripe-connect-payout-details",
|
|
145
162
|
"app-install": "stripe-connect-app-install",
|
|
146
163
|
"app-viewport": "stripe-connect-app-viewport",
|
|
147
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
164
|
+
"reporting-chart": "stripe-connect-reporting-chart",
|
|
165
|
+
"check-scanning": "stripe-connect-check-scanning"
|
|
148
166
|
};
|
|
149
167
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
150
168
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
@@ -240,6 +258,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
240
258
|
for (const method in methods) {
|
|
241
259
|
element[method] = function (value) {
|
|
242
260
|
stripeConnectInstance.then(() => {
|
|
261
|
+
if (!this[`${method}InternalOnly`]) {
|
|
262
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.45-preview-1`);
|
|
263
|
+
}
|
|
243
264
|
this[`${method}InternalOnly`](value);
|
|
244
265
|
});
|
|
245
266
|
};
|
|
@@ -292,7 +313,7 @@ const createWrapper = stripeConnect => {
|
|
|
292
313
|
sdk: true,
|
|
293
314
|
sdkOptions: {
|
|
294
315
|
// This will be replaced by the npm package version when bundling
|
|
295
|
-
sdkVersion: "3.3.
|
|
316
|
+
sdkVersion: "3.3.45-preview-1"
|
|
296
317
|
}
|
|
297
318
|
})
|
|
298
319
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -32,6 +32,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
32
32
|
setCollectionOptions: _collectionOptions => {},
|
|
33
33
|
setOnNotificationsChange: _listener => {}
|
|
34
34
|
},
|
|
35
|
+
"instant-payouts-promotion": {
|
|
36
|
+
setOnInstantPayoutsPromotionLoaded: _listener => {},
|
|
37
|
+
setOnInstantPayoutCreated: _listener => {}
|
|
38
|
+
},
|
|
35
39
|
"issuing-card": {
|
|
36
40
|
setDefaultCard: _defaultCard => {},
|
|
37
41
|
setCardSwitching: _cardSwitching => {},
|
|
@@ -74,7 +78,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
74
78
|
"capital-financing-application": {
|
|
75
79
|
setOnApplicationSubmitted: _listener => {},
|
|
76
80
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
77
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
81
|
+
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
82
|
+
setOnApplicationStepChange: _listener => {}
|
|
78
83
|
},
|
|
79
84
|
"capital-financing-promotion": {
|
|
80
85
|
setLayout: _layout => {},
|
|
@@ -82,7 +87,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
82
87
|
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
83
88
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
84
89
|
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
85
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
90
|
+
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
91
|
+
setOnApplicationStepChange: _listener => {}
|
|
86
92
|
},
|
|
87
93
|
"reporting-chart": {
|
|
88
94
|
setReportName: _reportName => {},
|
|
@@ -97,7 +103,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
97
103
|
},
|
|
98
104
|
"tax-registrations": {
|
|
99
105
|
setOnAfterTaxRegistrationAdded: _listener => {},
|
|
100
|
-
setDisplayCountries: _countries => {}
|
|
106
|
+
setDisplayCountries: _countries => {},
|
|
107
|
+
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
101
108
|
},
|
|
102
109
|
"tax-threshold-monitoring": {
|
|
103
110
|
setDisplayCountries: _countries => {}
|
|
@@ -108,7 +115,14 @@ const ConnectElementCustomMethodConfig = {
|
|
|
108
115
|
setDisabled: _disabled => {},
|
|
109
116
|
setInitialTaxCode: _initialTaxCode => {}
|
|
110
117
|
},
|
|
111
|
-
"export-tax-transactions": {}
|
|
118
|
+
"export-tax-transactions": {},
|
|
119
|
+
"payout-details": {
|
|
120
|
+
setPayout: _payout => {},
|
|
121
|
+
setOnClose: _listener => {}
|
|
122
|
+
},
|
|
123
|
+
"check-scanning": {
|
|
124
|
+
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
125
|
+
}
|
|
112
126
|
};
|
|
113
127
|
|
|
114
128
|
const componentNameMapping = {
|
|
@@ -116,11 +130,13 @@ const componentNameMapping = {
|
|
|
116
130
|
payouts: "stripe-connect-payouts",
|
|
117
131
|
"payment-details": "stripe-connect-payment-details",
|
|
118
132
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
133
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
119
134
|
"account-onboarding": "stripe-connect-account-onboarding",
|
|
120
135
|
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
121
136
|
"account-management": "stripe-connect-account-management",
|
|
122
137
|
"notification-banner": "stripe-connect-notification-banner",
|
|
123
138
|
"instant-payouts": "stripe-connect-instant-payouts",
|
|
139
|
+
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
124
140
|
"issuing-card": "stripe-connect-issuing-card",
|
|
125
141
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
126
142
|
"financial-account": "stripe-connect-financial-account",
|
|
@@ -138,9 +154,11 @@ const componentNameMapping = {
|
|
|
138
154
|
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
139
155
|
balances: "stripe-connect-balances",
|
|
140
156
|
"payouts-list": "stripe-connect-payouts-list",
|
|
157
|
+
"payout-details": "stripe-connect-payout-details",
|
|
141
158
|
"app-install": "stripe-connect-app-install",
|
|
142
159
|
"app-viewport": "stripe-connect-app-viewport",
|
|
143
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
160
|
+
"reporting-chart": "stripe-connect-reporting-chart",
|
|
161
|
+
"check-scanning": "stripe-connect-check-scanning"
|
|
144
162
|
};
|
|
145
163
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
146
164
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
@@ -236,6 +254,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
236
254
|
for (const method in methods) {
|
|
237
255
|
element[method] = function (value) {
|
|
238
256
|
stripeConnectInstance.then(() => {
|
|
257
|
+
if (!this[`${method}InternalOnly`]) {
|
|
258
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.45-preview-1`);
|
|
259
|
+
}
|
|
239
260
|
this[`${method}InternalOnly`](value);
|
|
240
261
|
});
|
|
241
262
|
};
|
|
@@ -288,7 +309,7 @@ const createWrapper = stripeConnect => {
|
|
|
288
309
|
sdk: true,
|
|
289
310
|
sdkOptions: {
|
|
290
311
|
// This will be replaced by the npm package version when bundling
|
|
291
|
-
sdkVersion: "3.3.
|
|
312
|
+
sdkVersion: "3.3.45-preview-1"
|
|
292
313
|
}
|
|
293
314
|
})
|
|
294
315
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -36,6 +36,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
36
36
|
setCollectionOptions: _collectionOptions => {},
|
|
37
37
|
setOnNotificationsChange: _listener => {}
|
|
38
38
|
},
|
|
39
|
+
"instant-payouts-promotion": {
|
|
40
|
+
setOnInstantPayoutsPromotionLoaded: _listener => {},
|
|
41
|
+
setOnInstantPayoutCreated: _listener => {}
|
|
42
|
+
},
|
|
39
43
|
"issuing-card": {
|
|
40
44
|
setDefaultCard: _defaultCard => {},
|
|
41
45
|
setCardSwitching: _cardSwitching => {},
|
|
@@ -78,7 +82,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
78
82
|
"capital-financing-application": {
|
|
79
83
|
setOnApplicationSubmitted: _listener => {},
|
|
80
84
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
81
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
85
|
+
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
86
|
+
setOnApplicationStepChange: _listener => {}
|
|
82
87
|
},
|
|
83
88
|
"capital-financing-promotion": {
|
|
84
89
|
setLayout: _layout => {},
|
|
@@ -86,7 +91,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
86
91
|
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
87
92
|
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
88
93
|
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
89
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
94
|
+
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
95
|
+
setOnApplicationStepChange: _listener => {}
|
|
90
96
|
},
|
|
91
97
|
"reporting-chart": {
|
|
92
98
|
setReportName: _reportName => {},
|
|
@@ -101,7 +107,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
101
107
|
},
|
|
102
108
|
"tax-registrations": {
|
|
103
109
|
setOnAfterTaxRegistrationAdded: _listener => {},
|
|
104
|
-
setDisplayCountries: _countries => {}
|
|
110
|
+
setDisplayCountries: _countries => {},
|
|
111
|
+
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
105
112
|
},
|
|
106
113
|
"tax-threshold-monitoring": {
|
|
107
114
|
setDisplayCountries: _countries => {}
|
|
@@ -112,7 +119,14 @@ const ConnectElementCustomMethodConfig = {
|
|
|
112
119
|
setDisabled: _disabled => {},
|
|
113
120
|
setInitialTaxCode: _initialTaxCode => {}
|
|
114
121
|
},
|
|
115
|
-
"export-tax-transactions": {}
|
|
122
|
+
"export-tax-transactions": {},
|
|
123
|
+
"payout-details": {
|
|
124
|
+
setPayout: _payout => {},
|
|
125
|
+
setOnClose: _listener => {}
|
|
126
|
+
},
|
|
127
|
+
"check-scanning": {
|
|
128
|
+
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
129
|
+
}
|
|
116
130
|
};
|
|
117
131
|
|
|
118
132
|
const componentNameMapping = {
|
|
@@ -120,11 +134,13 @@ const componentNameMapping = {
|
|
|
120
134
|
payouts: "stripe-connect-payouts",
|
|
121
135
|
"payment-details": "stripe-connect-payment-details",
|
|
122
136
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
137
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
123
138
|
"account-onboarding": "stripe-connect-account-onboarding",
|
|
124
139
|
"payment-method-settings": "stripe-connect-payment-method-settings",
|
|
125
140
|
"account-management": "stripe-connect-account-management",
|
|
126
141
|
"notification-banner": "stripe-connect-notification-banner",
|
|
127
142
|
"instant-payouts": "stripe-connect-instant-payouts",
|
|
143
|
+
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
128
144
|
"issuing-card": "stripe-connect-issuing-card",
|
|
129
145
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
130
146
|
"financial-account": "stripe-connect-financial-account",
|
|
@@ -142,9 +158,11 @@ const componentNameMapping = {
|
|
|
142
158
|
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
143
159
|
balances: "stripe-connect-balances",
|
|
144
160
|
"payouts-list": "stripe-connect-payouts-list",
|
|
161
|
+
"payout-details": "stripe-connect-payout-details",
|
|
145
162
|
"app-install": "stripe-connect-app-install",
|
|
146
163
|
"app-viewport": "stripe-connect-app-viewport",
|
|
147
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
164
|
+
"reporting-chart": "stripe-connect-reporting-chart",
|
|
165
|
+
"check-scanning": "stripe-connect-check-scanning"
|
|
148
166
|
};
|
|
149
167
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
150
168
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
@@ -240,6 +258,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
240
258
|
for (const method in methods) {
|
|
241
259
|
element[method] = function (value) {
|
|
242
260
|
stripeConnectInstance.then(() => {
|
|
261
|
+
if (!this[`${method}InternalOnly`]) {
|
|
262
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.45-preview-1`);
|
|
263
|
+
}
|
|
243
264
|
this[`${method}InternalOnly`](value);
|
|
244
265
|
});
|
|
245
266
|
};
|
|
@@ -292,7 +313,7 @@ const createWrapper = stripeConnect => {
|
|
|
292
313
|
sdk: true,
|
|
293
314
|
sdkOptions: {
|
|
294
315
|
// This will be replaced by the npm package version when bundling
|
|
295
|
-
sdkVersion: "3.3.
|
|
316
|
+
sdkVersion: "3.3.45-preview-1"
|
|
296
317
|
}
|
|
297
318
|
})
|
|
298
319
|
}));
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
|
-
export type ConnectElementHTMLName = "stripe-connect-payments" | "stripe-connect-payouts" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "stripe-connect-account-onboarding" | "stripe-connect-payment-method-settings" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-recipients" | "stripe-connect-capital-financing" | "stripe-connect-capital-financing-application" | "stripe-connect-capital-financing-promotion" | "stripe-connect-capital-overview" | "stripe-connect-documents" | "stripe-connect-product-tax-code-selector" | "stripe-connect-export-tax-transactions" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-tax-threshold-monitoring" | "stripe-connect-balances" | "stripe-connect-payouts-list" | "stripe-connect-app-install" | "stripe-connect-app-viewport" | "stripe-connect-reporting-chart";
|
|
3
|
+
export type ConnectElementHTMLName = "stripe-connect-payments" | "stripe-connect-payouts" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "stripe-connect-disputes-list" | "stripe-connect-account-onboarding" | "stripe-connect-payment-method-settings" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts" | "stripe-connect-instant-payouts-promotion" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-recipients" | "stripe-connect-capital-financing" | "stripe-connect-capital-financing-application" | "stripe-connect-capital-financing-promotion" | "stripe-connect-capital-overview" | "stripe-connect-documents" | "stripe-connect-product-tax-code-selector" | "stripe-connect-export-tax-transactions" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-tax-threshold-monitoring" | "stripe-connect-balances" | "stripe-connect-payouts-list" | "stripe-connect-payout-details" | "stripe-connect-app-install" | "stripe-connect-app-viewport" | "stripe-connect-reporting-chart" | "stripe-connect-check-scanning";
|
|
4
4
|
export declare const componentNameMapping: Record<ConnectElementTagName, ConnectElementHTMLName>;
|
|
5
5
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
6
6
|
debugInstance: () => Promise<StripeConnectInstance>;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ export type FetchEphemeralKeyFunction = (fetchParams: {
|
|
|
9
9
|
export type CollectionOptions = {
|
|
10
10
|
fields: "currently_due" | "eventually_due";
|
|
11
11
|
futureRequirements?: "omit" | "include";
|
|
12
|
+
requirements?: {
|
|
13
|
+
only: string[];
|
|
14
|
+
} | {
|
|
15
|
+
exclude: string[];
|
|
16
|
+
};
|
|
12
17
|
};
|
|
13
18
|
export type Status = "blocked" | "canceled" | "disputed" | "early_fraud_warning" | "failed" | "incomplete" | "partially_refunded" | "pending" | "refund_pending" | "refunded" | "successful" | "uncaptured";
|
|
14
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";
|
|
@@ -89,6 +94,10 @@ export type EmbeddedErrorType =
|
|
|
89
94
|
* Too many requests hit the API too quickly.
|
|
90
95
|
*/
|
|
91
96
|
| "rate_limit_error"
|
|
97
|
+
/**
|
|
98
|
+
* Failure to render the component, typically caused by browser extensions or network issues
|
|
99
|
+
*/
|
|
100
|
+
| "render_error"
|
|
92
101
|
/**
|
|
93
102
|
* API errors covering any other type of problem (e.g., a temporary problem with Stripe's servers), and are extremely uncommon.
|
|
94
103
|
*/
|
|
@@ -127,6 +136,14 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
127
136
|
setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
|
|
128
137
|
setOnNotificationsChange: (_listener: (({ total, actionRequired }: NotificationCount) => void) | undefined) => void;
|
|
129
138
|
};
|
|
139
|
+
"instant-payouts-promotion": {
|
|
140
|
+
setOnInstantPayoutsPromotionLoaded: (_listener: (({ promotionShown }: {
|
|
141
|
+
promotionShown: boolean;
|
|
142
|
+
}) => void) | undefined) => void;
|
|
143
|
+
setOnInstantPayoutCreated: (_listener: (({ payoutId }: {
|
|
144
|
+
payoutId: string;
|
|
145
|
+
}) => void) | undefined) => void;
|
|
146
|
+
};
|
|
130
147
|
"issuing-card": {
|
|
131
148
|
setDefaultCard: (_defaultCard: string | undefined) => void;
|
|
132
149
|
setCardSwitching: (_cardSwitching: boolean | undefined) => void;
|
|
@@ -172,6 +189,7 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
172
189
|
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
173
190
|
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
174
191
|
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
192
|
+
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
175
193
|
};
|
|
176
194
|
"capital-financing-promotion": {
|
|
177
195
|
setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
|
|
@@ -180,6 +198,7 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
180
198
|
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
181
199
|
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
182
200
|
setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
|
|
201
|
+
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
183
202
|
};
|
|
184
203
|
"reporting-chart": {
|
|
185
204
|
setReportName: (_reportName: ReportName) => void;
|
|
@@ -199,15 +218,29 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
199
218
|
id: string;
|
|
200
219
|
}) => void) | undefined) => void;
|
|
201
220
|
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
221
|
+
setOnAfterTaxRegistrationExpired: (_listener: (({ id }: {
|
|
222
|
+
id: string;
|
|
223
|
+
}) => void) | undefined) => void;
|
|
202
224
|
};
|
|
203
225
|
"tax-threshold-monitoring": {
|
|
204
226
|
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
205
227
|
};
|
|
206
228
|
"product-tax-code-selector": {
|
|
207
|
-
setOnTaxCodeSelect: (_listener: ((taxCode: string
|
|
229
|
+
setOnTaxCodeSelect: (_listener: ((taxCode: string | null, _: {
|
|
230
|
+
analyticsName: string;
|
|
231
|
+
} | null) => void) | undefined) => void;
|
|
208
232
|
setHideDescription: (_hideDescription: boolean | undefined) => void;
|
|
209
233
|
setDisabled: (_disabled: boolean | undefined) => void;
|
|
210
234
|
setInitialTaxCode: (_initialTaxCode: string | undefined) => void;
|
|
211
235
|
};
|
|
212
236
|
"export-tax-transactions": {};
|
|
237
|
+
"payout-details": {
|
|
238
|
+
setPayout: (_payout: string | undefined) => void;
|
|
239
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
240
|
+
};
|
|
241
|
+
"check-scanning": {
|
|
242
|
+
setHandleCheckScanSubmitted: (_handleCheckScanSubmitted: ({ checkScanToken, }: {
|
|
243
|
+
checkScanToken: string;
|
|
244
|
+
}) => Promise<void>) => void;
|
|
245
|
+
};
|
|
213
246
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/connect-js",
|
|
3
|
-
"version": "3.3.32
|
|
3
|
+
"version": "3.3.32",
|
|
4
4
|
"description": "Connect.js loading utility package",
|
|
5
5
|
"main": "dist/connect.js",
|
|
6
6
|
"module": "dist/connect.esm.js",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"jest-environment-jsdom": "^29.5.0",
|
|
64
64
|
"prettier": "2.8.8",
|
|
65
65
|
"rimraf": "^2.6.2",
|
|
66
|
-
"rollup": "^
|
|
66
|
+
"rollup": "^2.79.2",
|
|
67
67
|
"rollup-plugin-babel": "^4.4.0",
|
|
68
68
|
"rollup-plugin-typescript2": "^0.25.3",
|
|
69
69
|
"ts-jest": "^29.1.0",
|
|
70
70
|
"typescript": "^4.1.2",
|
|
71
71
|
"yalc": "^1.0.0-pre.53",
|
|
72
|
-
"zx": "^
|
|
72
|
+
"zx": "^8.8.5"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {}
|
|
75
75
|
}
|
package/src/shared.ts
CHANGED
|
@@ -13,72 +13,51 @@ export type LoadConnectAndInitialize = (
|
|
|
13
13
|
initParams: IStripeConnectInitParams
|
|
14
14
|
) => StripeConnectInstance;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
type ConnectElementHTMLName =
|
|
17
|
+
| "stripe-connect-account-onboarding"
|
|
18
|
+
| "stripe-connect-disputes-list"
|
|
17
19
|
| "stripe-connect-payments"
|
|
18
|
-
| "stripe-connect-payouts"
|
|
19
20
|
| "stripe-connect-payment-details"
|
|
20
21
|
| "stripe-connect-payment-disputes"
|
|
21
|
-
| "stripe-connect-account-onboarding"
|
|
22
|
-
| "stripe-connect-payment-method-settings"
|
|
23
22
|
| "stripe-connect-account-management"
|
|
24
23
|
| "stripe-connect-notification-banner"
|
|
25
|
-
| "stripe-connect-instant-payouts"
|
|
24
|
+
| "stripe-connect-instant-payouts-promotion"
|
|
26
25
|
| "stripe-connect-issuing-card"
|
|
27
26
|
| "stripe-connect-issuing-cards-list"
|
|
28
27
|
| "stripe-connect-financial-account"
|
|
29
28
|
| "stripe-connect-financial-account-transactions"
|
|
30
|
-
| "stripe-connect-
|
|
31
|
-
| "stripe-connect-
|
|
32
|
-
| "stripe-connect-
|
|
33
|
-
| "stripe-connect-
|
|
34
|
-
| "stripe-connect-capital-overview"
|
|
29
|
+
| "stripe-connect-payouts"
|
|
30
|
+
| "stripe-connect-payouts-list"
|
|
31
|
+
| "stripe-connect-payout-details"
|
|
32
|
+
| "stripe-connect-balances"
|
|
35
33
|
| "stripe-connect-documents"
|
|
36
|
-
| "stripe-connect-product-tax-code-selector"
|
|
37
|
-
| "stripe-connect-export-tax-transactions"
|
|
38
34
|
| "stripe-connect-tax-registrations"
|
|
39
|
-
| "stripe-connect-tax-settings"
|
|
40
|
-
| "stripe-connect-tax-threshold-monitoring"
|
|
41
|
-
| "stripe-connect-balances"
|
|
42
|
-
| "stripe-connect-payouts-list"
|
|
43
|
-
| "stripe-connect-app-install"
|
|
44
|
-
| "stripe-connect-app-viewport"
|
|
45
|
-
| "stripe-connect-reporting-chart";
|
|
35
|
+
| "stripe-connect-tax-settings";
|
|
46
36
|
|
|
47
37
|
export const componentNameMapping: Record<
|
|
48
38
|
ConnectElementTagName,
|
|
49
39
|
ConnectElementHTMLName
|
|
50
40
|
> = {
|
|
41
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
42
|
+
"disputes-list": "stripe-connect-disputes-list",
|
|
51
43
|
payments: "stripe-connect-payments",
|
|
52
|
-
payouts: "stripe-connect-payouts",
|
|
53
44
|
"payment-details": "stripe-connect-payment-details",
|
|
54
45
|
"payment-disputes": "stripe-connect-payment-disputes",
|
|
55
|
-
|
|
56
|
-
"
|
|
46
|
+
payouts: "stripe-connect-payouts",
|
|
47
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
48
|
+
"payout-details": "stripe-connect-payout-details",
|
|
49
|
+
balances: "stripe-connect-balances",
|
|
57
50
|
"account-management": "stripe-connect-account-management",
|
|
58
51
|
"notification-banner": "stripe-connect-notification-banner",
|
|
59
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
52
|
+
"instant-payouts-promotion": "stripe-connect-instant-payouts-promotion",
|
|
60
53
|
"issuing-card": "stripe-connect-issuing-card",
|
|
61
54
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
62
55
|
"financial-account": "stripe-connect-financial-account",
|
|
63
|
-
recipients: "stripe-connect-recipients",
|
|
64
56
|
"financial-account-transactions":
|
|
65
57
|
"stripe-connect-financial-account-transactions",
|
|
66
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
67
|
-
"capital-financing-application":
|
|
68
|
-
"stripe-connect-capital-financing-application",
|
|
69
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
70
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
71
58
|
documents: "stripe-connect-documents",
|
|
72
|
-
"product-tax-code-selector": "stripe-connect-product-tax-code-selector",
|
|
73
|
-
"export-tax-transactions": "stripe-connect-export-tax-transactions",
|
|
74
59
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
75
60
|
"tax-settings": "stripe-connect-tax-settings",
|
|
76
|
-
"tax-threshold-monitoring": "stripe-connect-tax-threshold-monitoring",
|
|
77
|
-
balances: "stripe-connect-balances",
|
|
78
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
79
|
-
"app-install": "stripe-connect-app-install",
|
|
80
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
81
|
-
"reporting-chart": "stripe-connect-reporting-chart",
|
|
82
61
|
};
|
|
83
62
|
|
|
84
63
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
@@ -97,10 +76,10 @@ const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
|
97
76
|
export const findScript = (): HTMLScriptElement | null => {
|
|
98
77
|
return (
|
|
99
78
|
document.querySelectorAll<HTMLScriptElement>(
|
|
100
|
-
`script[src="${
|
|
79
|
+
`script[src="${V1_URL}"]`
|
|
101
80
|
)[0] ||
|
|
102
81
|
document.querySelectorAll<HTMLScriptElement>(
|
|
103
|
-
`script[src="${
|
|
82
|
+
`script[src="${V0_URL}"]`
|
|
104
83
|
)[0] ||
|
|
105
84
|
null
|
|
106
85
|
);
|
|
@@ -134,7 +113,8 @@ export const isWindowStripeConnectDefined = (stripeConnect: unknown) => {
|
|
|
134
113
|
stripeConnect &&
|
|
135
114
|
typeof stripeConnect === "object" &&
|
|
136
115
|
"init" in stripeConnect &&
|
|
137
|
-
typeof stripeConnect
|
|
116
|
+
typeof (stripeConnect as { init: unknown } & Record<string, unknown>)
|
|
117
|
+
.init === "function"
|
|
138
118
|
);
|
|
139
119
|
};
|
|
140
120
|
|
|
@@ -228,6 +208,12 @@ export const initStripeConnect = (
|
|
|
228
208
|
for (const method in methods) {
|
|
229
209
|
(element as any)[method] = function (value: any) {
|
|
230
210
|
stripeConnectInstance.then(() => {
|
|
211
|
+
if (!this[`${method}InternalOnly`]) {
|
|
212
|
+
throw new Error(
|
|
213
|
+
`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: _NPM_PACKAGE_VERSION_`
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
231
217
|
this[`${method}InternalOnly`](value);
|
|
232
218
|
});
|
|
233
219
|
};
|
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,32 +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
|
-
| "account-onboarding"
|
|
495
|
-
| "payment-method-settings"
|
|
496
496
|
| "account-management"
|
|
497
497
|
| "notification-banner"
|
|
498
|
-
| "instant-payouts"
|
|
498
|
+
| "instant-payouts-promotion"
|
|
499
499
|
| "issuing-card"
|
|
500
500
|
| "issuing-cards-list"
|
|
501
501
|
| "financial-account"
|
|
502
502
|
| "financial-account-transactions"
|
|
503
|
-
| "
|
|
504
|
-
| "
|
|
505
|
-
| "
|
|
506
|
-
| "
|
|
507
|
-
| "capital-overview"
|
|
503
|
+
| "payouts"
|
|
504
|
+
| "payouts-list"
|
|
505
|
+
| "payout-details"
|
|
506
|
+
| "balances"
|
|
508
507
|
| "documents"
|
|
509
|
-
| "product-tax-code-selector"
|
|
510
|
-
| "export-tax-transactions"
|
|
511
508
|
| "tax-registrations"
|
|
512
|
-
| "tax-settings"
|
|
513
|
-
| "tax-threshold-monitoring"
|
|
514
|
-
| "balances"
|
|
515
|
-
| "payouts-list"
|
|
516
|
-
| "app-install"
|
|
517
|
-
| "app-viewport"
|
|
518
|
-
| "reporting-chart";
|
|
509
|
+
| "tax-settings";
|