@stripe/connect-js 3.3.22-preview-2 → 3.3.22
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/README.md +3 -3
- package/dist/connect.esm.js +20 -71
- package/dist/connect.js +20 -71
- package/dist/pure.esm.js +12 -63
- package/dist/pure.js +12 -63
- package/dist/src/index.d.ts +1 -1
- package/dist/src/pure.d.ts +1 -1
- package/dist/src/shared.d.ts +2 -2
- package/dist/types/config.d.ts +5 -59
- package/package.json +14 -10
- package/src/index.ts +3 -6
- package/src/pure.test.ts +2 -2
- package/src/pure.ts +3 -6
- package/src/shared.ts +29 -50
- package/types/checks.ts +2 -2
- package/types/config.ts +17 -99
- package/types/index.d.ts +1 -1
- package/types/shared.d.ts +8 -17
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ const fetchClientSecret = async () => {
|
|
|
36
36
|
|
|
37
37
|
const instance = loadConnectAndInitialize({
|
|
38
38
|
publishableKey: "{{pk test123}}",
|
|
39
|
-
fetchClientSecret: fetchClientSecret
|
|
39
|
+
fetchClientSecret: fetchClientSecret,
|
|
40
40
|
});
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ test this code through your Connect account.
|
|
|
47
47
|
If you have deployed a
|
|
48
48
|
[Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP),
|
|
49
49
|
make sure to
|
|
50
|
-
[include Connect.js in your directives](https://stripe.com/docs/
|
|
50
|
+
[include Connect.js in your directives](https://stripe.com/docs/connect/get-started-connect-embedded-components?platform=web#csp-and-http-header-requirements).
|
|
51
51
|
|
|
52
52
|
### Import as a side effect
|
|
53
53
|
|
|
@@ -71,6 +71,6 @@ import { loadConnectAndInitialize } from "@stripe/connect-js/pure";
|
|
|
71
71
|
// Connect.js will not be loaded until `loadConnect` is called
|
|
72
72
|
const instance = loadConnectAndInitialize({
|
|
73
73
|
publishableKey: "{{pk test123}}",
|
|
74
|
-
fetchClientSecret: fetchClientSecret
|
|
74
|
+
fetchClientSecret: fetchClientSecret,
|
|
75
75
|
});
|
|
76
76
|
```
|
package/dist/connect.esm.js
CHANGED
|
@@ -5,13 +5,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
5
5
|
setOnLoaderStart: _listener => {}
|
|
6
6
|
};
|
|
7
7
|
const ConnectElementCustomMethodConfig = {
|
|
8
|
-
payments: {
|
|
9
|
-
setDefaultFilters: _filters => {}
|
|
10
|
-
},
|
|
11
|
-
"payment-details": {
|
|
12
|
-
setPayment: _payment => {},
|
|
13
|
-
setOnClose: _listener => {}
|
|
14
|
-
},
|
|
15
8
|
"account-onboarding": {
|
|
16
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
17
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -45,46 +38,12 @@ const ConnectElementCustomMethodConfig = {
|
|
|
45
38
|
"financial-account-transactions": {
|
|
46
39
|
setFinancialAccount: _financialAccount => {}
|
|
47
40
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
"app-install": {
|
|
52
|
-
setApp: _app => {},
|
|
53
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
54
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
55
|
-
},
|
|
56
|
-
"app-viewport": {
|
|
57
|
-
setApp: _app => {},
|
|
58
|
-
setAppData: _appData => {}
|
|
59
|
-
},
|
|
60
|
-
"payment-method-settings": {
|
|
61
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
62
|
-
},
|
|
63
|
-
"capital-financing": {
|
|
64
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
65
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
66
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
67
|
-
setSupportUrl: _supportUrl => {},
|
|
68
|
-
setOnFinancingsLoaded: _listener => {}
|
|
69
|
-
},
|
|
70
|
-
"capital-financing-application": {
|
|
71
|
-
setOnApplicationSubmitted: _listener => {},
|
|
72
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
73
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
74
|
-
},
|
|
75
|
-
"capital-financing-promotion": {
|
|
76
|
-
setLayout: _layout => {},
|
|
77
|
-
setOnApplicationSubmitted: _listener => {},
|
|
78
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
79
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
80
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
81
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
41
|
+
payments: {
|
|
42
|
+
setDefaultFilters: _filters => {}
|
|
82
43
|
},
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
setIntervalEnd: _intervalEnd => {},
|
|
87
|
-
setIntervalType: _intervalType => {}
|
|
44
|
+
"payment-details": {
|
|
45
|
+
setPayment: _payment => {},
|
|
46
|
+
setOnClose: _listener => {}
|
|
88
47
|
},
|
|
89
48
|
"tax-settings": {
|
|
90
49
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -98,37 +57,27 @@ const ConnectElementCustomMethodConfig = {
|
|
|
98
57
|
};
|
|
99
58
|
|
|
100
59
|
const componentNameMapping = {
|
|
60
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
101
61
|
payments: "stripe-connect-payments",
|
|
102
|
-
payouts: "stripe-connect-payouts",
|
|
103
62
|
"payment-details": "stripe-connect-payment-details",
|
|
104
|
-
|
|
105
|
-
"
|
|
63
|
+
payouts: "stripe-connect-payouts",
|
|
64
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
65
|
+
balances: "stripe-connect-balances",
|
|
106
66
|
"account-management": "stripe-connect-account-management",
|
|
107
67
|
"notification-banner": "stripe-connect-notification-banner",
|
|
108
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
109
68
|
"issuing-card": "stripe-connect-issuing-card",
|
|
110
69
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
111
70
|
"financial-account": "stripe-connect-financial-account",
|
|
112
|
-
recipients: "stripe-connect-recipients",
|
|
113
71
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
114
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
115
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
116
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
117
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
118
72
|
documents: "stripe-connect-documents",
|
|
119
73
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
120
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
121
|
-
balances: "stripe-connect-balances",
|
|
122
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
123
|
-
"app-install": "stripe-connect-app-install",
|
|
124
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
125
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
74
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
126
75
|
};
|
|
127
76
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
128
77
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
129
78
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
130
79
|
const findScript = () => {
|
|
131
|
-
return document.querySelectorAll(`script[src="${
|
|
80
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
132
81
|
};
|
|
133
82
|
const injectScript = () => {
|
|
134
83
|
const script = document.createElement("script");
|
|
@@ -140,13 +89,13 @@ const injectScript = () => {
|
|
|
140
89
|
document.head.appendChild(script);
|
|
141
90
|
return script;
|
|
142
91
|
};
|
|
143
|
-
let stripePromise = null;
|
|
92
|
+
let stripePromise$1 = null;
|
|
144
93
|
const loadScript = () => {
|
|
145
94
|
// Ensure that we only attempt to load Connect.js at most once
|
|
146
|
-
if (stripePromise !== null) {
|
|
147
|
-
return stripePromise;
|
|
95
|
+
if (stripePromise$1 !== null) {
|
|
96
|
+
return stripePromise$1;
|
|
148
97
|
}
|
|
149
|
-
stripePromise = new Promise((resolve, reject) => {
|
|
98
|
+
stripePromise$1 = new Promise((resolve, reject) => {
|
|
150
99
|
if (typeof window === "undefined") {
|
|
151
100
|
reject("ConnectJS won't load when rendering code in the server - it can only be loaded on a browser. This error is expected when loading ConnectJS in SSR environments, like NextJS. It will have no impact in the UI, however if you wish to avoid it, you can switch to the `pure` version of the connect.js loader: https://github.com/stripe/connect-js#importing-loadconnect-without-side-effects.");
|
|
152
101
|
return;
|
|
@@ -181,7 +130,7 @@ const loadScript = () => {
|
|
|
181
130
|
reject(error);
|
|
182
131
|
}
|
|
183
132
|
});
|
|
184
|
-
return stripePromise;
|
|
133
|
+
return stripePromise$1;
|
|
185
134
|
};
|
|
186
135
|
const hasCustomMethod = tagName => {
|
|
187
136
|
return tagName in ConnectElementCustomMethodConfig;
|
|
@@ -265,7 +214,7 @@ const createWrapper = stripeConnect => {
|
|
|
265
214
|
sdk: true,
|
|
266
215
|
sdkOptions: {
|
|
267
216
|
// This will be replaced by the npm package version when bundling
|
|
268
|
-
sdkVersion: "3.3.22
|
|
217
|
+
sdkVersion: "3.3.22"
|
|
269
218
|
}
|
|
270
219
|
})
|
|
271
220
|
}));
|
|
@@ -277,16 +226,16 @@ const createWrapper = stripeConnect => {
|
|
|
277
226
|
|
|
278
227
|
// Execute our own script injection after a tick to give users time to do their
|
|
279
228
|
// own script injection.
|
|
280
|
-
const stripePromise
|
|
229
|
+
const stripePromise = Promise.resolve().then(() => loadScript());
|
|
281
230
|
let loadCalled = false;
|
|
282
|
-
stripePromise
|
|
231
|
+
stripePromise.catch(err => {
|
|
283
232
|
if (!loadCalled) {
|
|
284
233
|
console.warn(err);
|
|
285
234
|
}
|
|
286
235
|
});
|
|
287
236
|
const loadConnectAndInitialize = initParams => {
|
|
288
237
|
loadCalled = true;
|
|
289
|
-
return initStripeConnect(stripePromise
|
|
238
|
+
return initStripeConnect(stripePromise, initParams);
|
|
290
239
|
};
|
|
291
240
|
|
|
292
241
|
export { loadConnectAndInitialize };
|
package/dist/connect.js
CHANGED
|
@@ -9,13 +9,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
9
9
|
setOnLoaderStart: _listener => {}
|
|
10
10
|
};
|
|
11
11
|
const ConnectElementCustomMethodConfig = {
|
|
12
|
-
payments: {
|
|
13
|
-
setDefaultFilters: _filters => {}
|
|
14
|
-
},
|
|
15
|
-
"payment-details": {
|
|
16
|
-
setPayment: _payment => {},
|
|
17
|
-
setOnClose: _listener => {}
|
|
18
|
-
},
|
|
19
12
|
"account-onboarding": {
|
|
20
13
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
21
14
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -49,46 +42,12 @@ const ConnectElementCustomMethodConfig = {
|
|
|
49
42
|
"financial-account-transactions": {
|
|
50
43
|
setFinancialAccount: _financialAccount => {}
|
|
51
44
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
"app-install": {
|
|
56
|
-
setApp: _app => {},
|
|
57
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
58
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
59
|
-
},
|
|
60
|
-
"app-viewport": {
|
|
61
|
-
setApp: _app => {},
|
|
62
|
-
setAppData: _appData => {}
|
|
63
|
-
},
|
|
64
|
-
"payment-method-settings": {
|
|
65
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
66
|
-
},
|
|
67
|
-
"capital-financing": {
|
|
68
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
69
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
70
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
71
|
-
setSupportUrl: _supportUrl => {},
|
|
72
|
-
setOnFinancingsLoaded: _listener => {}
|
|
73
|
-
},
|
|
74
|
-
"capital-financing-application": {
|
|
75
|
-
setOnApplicationSubmitted: _listener => {},
|
|
76
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
77
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
78
|
-
},
|
|
79
|
-
"capital-financing-promotion": {
|
|
80
|
-
setLayout: _layout => {},
|
|
81
|
-
setOnApplicationSubmitted: _listener => {},
|
|
82
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
83
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
84
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
85
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
45
|
+
payments: {
|
|
46
|
+
setDefaultFilters: _filters => {}
|
|
86
47
|
},
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
setIntervalEnd: _intervalEnd => {},
|
|
91
|
-
setIntervalType: _intervalType => {}
|
|
48
|
+
"payment-details": {
|
|
49
|
+
setPayment: _payment => {},
|
|
50
|
+
setOnClose: _listener => {}
|
|
92
51
|
},
|
|
93
52
|
"tax-settings": {
|
|
94
53
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -102,37 +61,27 @@ const ConnectElementCustomMethodConfig = {
|
|
|
102
61
|
};
|
|
103
62
|
|
|
104
63
|
const componentNameMapping = {
|
|
64
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
105
65
|
payments: "stripe-connect-payments",
|
|
106
|
-
payouts: "stripe-connect-payouts",
|
|
107
66
|
"payment-details": "stripe-connect-payment-details",
|
|
108
|
-
|
|
109
|
-
"
|
|
67
|
+
payouts: "stripe-connect-payouts",
|
|
68
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
69
|
+
balances: "stripe-connect-balances",
|
|
110
70
|
"account-management": "stripe-connect-account-management",
|
|
111
71
|
"notification-banner": "stripe-connect-notification-banner",
|
|
112
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
113
72
|
"issuing-card": "stripe-connect-issuing-card",
|
|
114
73
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
115
74
|
"financial-account": "stripe-connect-financial-account",
|
|
116
|
-
recipients: "stripe-connect-recipients",
|
|
117
75
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
118
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
119
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
120
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
121
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
122
76
|
documents: "stripe-connect-documents",
|
|
123
77
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
124
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
125
|
-
balances: "stripe-connect-balances",
|
|
126
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
127
|
-
"app-install": "stripe-connect-app-install",
|
|
128
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
129
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
78
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
130
79
|
};
|
|
131
80
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
132
81
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
133
82
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
134
83
|
const findScript = () => {
|
|
135
|
-
return document.querySelectorAll(`script[src="${
|
|
84
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
136
85
|
};
|
|
137
86
|
const injectScript = () => {
|
|
138
87
|
const script = document.createElement("script");
|
|
@@ -144,13 +93,13 @@ const injectScript = () => {
|
|
|
144
93
|
document.head.appendChild(script);
|
|
145
94
|
return script;
|
|
146
95
|
};
|
|
147
|
-
let stripePromise = null;
|
|
96
|
+
let stripePromise$1 = null;
|
|
148
97
|
const loadScript = () => {
|
|
149
98
|
// Ensure that we only attempt to load Connect.js at most once
|
|
150
|
-
if (stripePromise !== null) {
|
|
151
|
-
return stripePromise;
|
|
99
|
+
if (stripePromise$1 !== null) {
|
|
100
|
+
return stripePromise$1;
|
|
152
101
|
}
|
|
153
|
-
stripePromise = new Promise((resolve, reject) => {
|
|
102
|
+
stripePromise$1 = new Promise((resolve, reject) => {
|
|
154
103
|
if (typeof window === "undefined") {
|
|
155
104
|
reject("ConnectJS won't load when rendering code in the server - it can only be loaded on a browser. This error is expected when loading ConnectJS in SSR environments, like NextJS. It will have no impact in the UI, however if you wish to avoid it, you can switch to the `pure` version of the connect.js loader: https://github.com/stripe/connect-js#importing-loadconnect-without-side-effects.");
|
|
156
105
|
return;
|
|
@@ -185,7 +134,7 @@ const loadScript = () => {
|
|
|
185
134
|
reject(error);
|
|
186
135
|
}
|
|
187
136
|
});
|
|
188
|
-
return stripePromise;
|
|
137
|
+
return stripePromise$1;
|
|
189
138
|
};
|
|
190
139
|
const hasCustomMethod = tagName => {
|
|
191
140
|
return tagName in ConnectElementCustomMethodConfig;
|
|
@@ -269,7 +218,7 @@ const createWrapper = stripeConnect => {
|
|
|
269
218
|
sdk: true,
|
|
270
219
|
sdkOptions: {
|
|
271
220
|
// This will be replaced by the npm package version when bundling
|
|
272
|
-
sdkVersion: "3.3.22
|
|
221
|
+
sdkVersion: "3.3.22"
|
|
273
222
|
}
|
|
274
223
|
})
|
|
275
224
|
}));
|
|
@@ -281,16 +230,16 @@ const createWrapper = stripeConnect => {
|
|
|
281
230
|
|
|
282
231
|
// Execute our own script injection after a tick to give users time to do their
|
|
283
232
|
// own script injection.
|
|
284
|
-
const stripePromise
|
|
233
|
+
const stripePromise = Promise.resolve().then(() => loadScript());
|
|
285
234
|
let loadCalled = false;
|
|
286
|
-
stripePromise
|
|
235
|
+
stripePromise.catch(err => {
|
|
287
236
|
if (!loadCalled) {
|
|
288
237
|
console.warn(err);
|
|
289
238
|
}
|
|
290
239
|
});
|
|
291
240
|
const loadConnectAndInitialize = initParams => {
|
|
292
241
|
loadCalled = true;
|
|
293
|
-
return initStripeConnect(stripePromise
|
|
242
|
+
return initStripeConnect(stripePromise, initParams);
|
|
294
243
|
};
|
|
295
244
|
|
|
296
245
|
exports.loadConnectAndInitialize = loadConnectAndInitialize;
|
package/dist/pure.esm.js
CHANGED
|
@@ -5,13 +5,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
5
5
|
setOnLoaderStart: _listener => {}
|
|
6
6
|
};
|
|
7
7
|
const ConnectElementCustomMethodConfig = {
|
|
8
|
-
payments: {
|
|
9
|
-
setDefaultFilters: _filters => {}
|
|
10
|
-
},
|
|
11
|
-
"payment-details": {
|
|
12
|
-
setPayment: _payment => {},
|
|
13
|
-
setOnClose: _listener => {}
|
|
14
|
-
},
|
|
15
8
|
"account-onboarding": {
|
|
16
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
17
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -45,46 +38,12 @@ const ConnectElementCustomMethodConfig = {
|
|
|
45
38
|
"financial-account-transactions": {
|
|
46
39
|
setFinancialAccount: _financialAccount => {}
|
|
47
40
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
"app-install": {
|
|
52
|
-
setApp: _app => {},
|
|
53
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
54
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
55
|
-
},
|
|
56
|
-
"app-viewport": {
|
|
57
|
-
setApp: _app => {},
|
|
58
|
-
setAppData: _appData => {}
|
|
59
|
-
},
|
|
60
|
-
"payment-method-settings": {
|
|
61
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
62
|
-
},
|
|
63
|
-
"capital-financing": {
|
|
64
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
65
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
66
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
67
|
-
setSupportUrl: _supportUrl => {},
|
|
68
|
-
setOnFinancingsLoaded: _listener => {}
|
|
69
|
-
},
|
|
70
|
-
"capital-financing-application": {
|
|
71
|
-
setOnApplicationSubmitted: _listener => {},
|
|
72
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
73
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
74
|
-
},
|
|
75
|
-
"capital-financing-promotion": {
|
|
76
|
-
setLayout: _layout => {},
|
|
77
|
-
setOnApplicationSubmitted: _listener => {},
|
|
78
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
79
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
80
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
81
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
41
|
+
payments: {
|
|
42
|
+
setDefaultFilters: _filters => {}
|
|
82
43
|
},
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
setIntervalEnd: _intervalEnd => {},
|
|
87
|
-
setIntervalType: _intervalType => {}
|
|
44
|
+
"payment-details": {
|
|
45
|
+
setPayment: _payment => {},
|
|
46
|
+
setOnClose: _listener => {}
|
|
88
47
|
},
|
|
89
48
|
"tax-settings": {
|
|
90
49
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -98,37 +57,27 @@ const ConnectElementCustomMethodConfig = {
|
|
|
98
57
|
};
|
|
99
58
|
|
|
100
59
|
const componentNameMapping = {
|
|
60
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
101
61
|
payments: "stripe-connect-payments",
|
|
102
|
-
payouts: "stripe-connect-payouts",
|
|
103
62
|
"payment-details": "stripe-connect-payment-details",
|
|
104
|
-
|
|
105
|
-
"
|
|
63
|
+
payouts: "stripe-connect-payouts",
|
|
64
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
65
|
+
balances: "stripe-connect-balances",
|
|
106
66
|
"account-management": "stripe-connect-account-management",
|
|
107
67
|
"notification-banner": "stripe-connect-notification-banner",
|
|
108
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
109
68
|
"issuing-card": "stripe-connect-issuing-card",
|
|
110
69
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
111
70
|
"financial-account": "stripe-connect-financial-account",
|
|
112
|
-
recipients: "stripe-connect-recipients",
|
|
113
71
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
114
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
115
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
116
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
117
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
118
72
|
documents: "stripe-connect-documents",
|
|
119
73
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
120
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
121
|
-
balances: "stripe-connect-balances",
|
|
122
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
123
|
-
"app-install": "stripe-connect-app-install",
|
|
124
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
125
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
74
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
126
75
|
};
|
|
127
76
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
128
77
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
129
78
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
130
79
|
const findScript = () => {
|
|
131
|
-
return document.querySelectorAll(`script[src="${
|
|
80
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
132
81
|
};
|
|
133
82
|
const injectScript = () => {
|
|
134
83
|
const script = document.createElement("script");
|
|
@@ -265,7 +214,7 @@ const createWrapper = stripeConnect => {
|
|
|
265
214
|
sdk: true,
|
|
266
215
|
sdkOptions: {
|
|
267
216
|
// This will be replaced by the npm package version when bundling
|
|
268
|
-
sdkVersion: "3.3.22
|
|
217
|
+
sdkVersion: "3.3.22"
|
|
269
218
|
}
|
|
270
219
|
})
|
|
271
220
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -9,13 +9,6 @@ const ConnectElementCommonMethodConfig = {
|
|
|
9
9
|
setOnLoaderStart: _listener => {}
|
|
10
10
|
};
|
|
11
11
|
const ConnectElementCustomMethodConfig = {
|
|
12
|
-
payments: {
|
|
13
|
-
setDefaultFilters: _filters => {}
|
|
14
|
-
},
|
|
15
|
-
"payment-details": {
|
|
16
|
-
setPayment: _payment => {},
|
|
17
|
-
setOnClose: _listener => {}
|
|
18
|
-
},
|
|
19
12
|
"account-onboarding": {
|
|
20
13
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
21
14
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -49,46 +42,12 @@ const ConnectElementCustomMethodConfig = {
|
|
|
49
42
|
"financial-account-transactions": {
|
|
50
43
|
setFinancialAccount: _financialAccount => {}
|
|
51
44
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
"app-install": {
|
|
56
|
-
setApp: _app => {},
|
|
57
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
58
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
59
|
-
},
|
|
60
|
-
"app-viewport": {
|
|
61
|
-
setApp: _app => {},
|
|
62
|
-
setAppData: _appData => {}
|
|
63
|
-
},
|
|
64
|
-
"payment-method-settings": {
|
|
65
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
66
|
-
},
|
|
67
|
-
"capital-financing": {
|
|
68
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
69
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
70
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
71
|
-
setSupportUrl: _supportUrl => {},
|
|
72
|
-
setOnFinancingsLoaded: _listener => {}
|
|
73
|
-
},
|
|
74
|
-
"capital-financing-application": {
|
|
75
|
-
setOnApplicationSubmitted: _listener => {},
|
|
76
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
77
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {}
|
|
78
|
-
},
|
|
79
|
-
"capital-financing-promotion": {
|
|
80
|
-
setLayout: _layout => {},
|
|
81
|
-
setOnApplicationSubmitted: _listener => {},
|
|
82
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
83
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
84
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
85
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {}
|
|
45
|
+
payments: {
|
|
46
|
+
setDefaultFilters: _filters => {}
|
|
86
47
|
},
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
setIntervalEnd: _intervalEnd => {},
|
|
91
|
-
setIntervalType: _intervalType => {}
|
|
48
|
+
"payment-details": {
|
|
49
|
+
setPayment: _payment => {},
|
|
50
|
+
setOnClose: _listener => {}
|
|
92
51
|
},
|
|
93
52
|
"tax-settings": {
|
|
94
53
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -102,37 +61,27 @@ const ConnectElementCustomMethodConfig = {
|
|
|
102
61
|
};
|
|
103
62
|
|
|
104
63
|
const componentNameMapping = {
|
|
64
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
105
65
|
payments: "stripe-connect-payments",
|
|
106
|
-
payouts: "stripe-connect-payouts",
|
|
107
66
|
"payment-details": "stripe-connect-payment-details",
|
|
108
|
-
|
|
109
|
-
"
|
|
67
|
+
payouts: "stripe-connect-payouts",
|
|
68
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
69
|
+
balances: "stripe-connect-balances",
|
|
110
70
|
"account-management": "stripe-connect-account-management",
|
|
111
71
|
"notification-banner": "stripe-connect-notification-banner",
|
|
112
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
113
72
|
"issuing-card": "stripe-connect-issuing-card",
|
|
114
73
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
115
74
|
"financial-account": "stripe-connect-financial-account",
|
|
116
|
-
recipients: "stripe-connect-recipients",
|
|
117
75
|
"financial-account-transactions": "stripe-connect-financial-account-transactions",
|
|
118
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
119
|
-
"capital-financing-application": "stripe-connect-capital-financing-application",
|
|
120
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
121
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
122
76
|
documents: "stripe-connect-documents",
|
|
123
77
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
124
|
-
"tax-settings": "stripe-connect-tax-settings"
|
|
125
|
-
balances: "stripe-connect-balances",
|
|
126
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
127
|
-
"app-install": "stripe-connect-app-install",
|
|
128
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
129
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
78
|
+
"tax-settings": "stripe-connect-tax-settings"
|
|
130
79
|
};
|
|
131
80
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
132
81
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
133
82
|
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
134
83
|
const findScript = () => {
|
|
135
|
-
return document.querySelectorAll(`script[src="${
|
|
84
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
136
85
|
};
|
|
137
86
|
const injectScript = () => {
|
|
138
87
|
const script = document.createElement("script");
|
|
@@ -269,7 +218,7 @@ const createWrapper = stripeConnect => {
|
|
|
269
218
|
sdk: true,
|
|
270
219
|
sdkOptions: {
|
|
271
220
|
// This will be replaced by the npm package version when bundling
|
|
272
|
-
sdkVersion: "3.3.22
|
|
221
|
+
sdkVersion: "3.3.22"
|
|
273
222
|
}
|
|
274
223
|
})
|
|
275
224
|
}));
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LoadConnectAndInitialize } from "./shared";
|
|
1
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
2
2
|
export declare const loadConnectAndInitialize: LoadConnectAndInitialize;
|
package/dist/src/pure.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LoadConnectAndInitialize } from "./shared";
|
|
1
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
2
2
|
export declare const loadConnectAndInitialize: LoadConnectAndInitialize;
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
1
|
+
import type { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
|
-
|
|
3
|
+
type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-payouts" | "stripe-connect-payouts-list" | "stripe-connect-balances" | "stripe-connect-documents" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings";
|
|
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
|
@@ -42,10 +42,6 @@ export type NotificationCount = {
|
|
|
42
42
|
total: number;
|
|
43
43
|
actionRequired: number;
|
|
44
44
|
};
|
|
45
|
-
export type InstallState = {
|
|
46
|
-
appId: string;
|
|
47
|
-
state: "INSTALLED" | "UNINSTALLED";
|
|
48
|
-
};
|
|
49
45
|
export type LoaderStart = {
|
|
50
46
|
elementTagName: string;
|
|
51
47
|
};
|
|
@@ -60,13 +56,6 @@ export type EmbeddedError = {
|
|
|
60
56
|
type: EmbeddedErrorType;
|
|
61
57
|
message?: string;
|
|
62
58
|
};
|
|
63
|
-
export type FinancingProductType = {
|
|
64
|
-
productType: "standard" | "refill" | "none";
|
|
65
|
-
};
|
|
66
|
-
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
67
|
-
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
68
|
-
export type ReportName = "gross_volume" | "net_volume";
|
|
69
|
-
export type RecipientDataSource = "customers";
|
|
70
59
|
export type EmbeddedErrorType =
|
|
71
60
|
/**
|
|
72
61
|
* Failure to connect to Stripe's API.
|
|
@@ -97,13 +86,6 @@ export declare const ConnectElementCommonMethodConfig: {
|
|
|
97
86
|
setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
|
|
98
87
|
};
|
|
99
88
|
export declare const ConnectElementCustomMethodConfig: {
|
|
100
|
-
payments: {
|
|
101
|
-
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
102
|
-
};
|
|
103
|
-
"payment-details": {
|
|
104
|
-
setPayment: (_payment: string | undefined) => void;
|
|
105
|
-
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
106
|
-
};
|
|
107
89
|
"account-onboarding": {
|
|
108
90
|
setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
|
|
109
91
|
setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
|
|
@@ -137,48 +119,12 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
137
119
|
"financial-account-transactions": {
|
|
138
120
|
setFinancialAccount: (_financialAccount: string) => void;
|
|
139
121
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
};
|
|
143
|
-
"app-install": {
|
|
144
|
-
setApp: (_app: string | undefined) => void;
|
|
145
|
-
setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
146
|
-
setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
147
|
-
};
|
|
148
|
-
"app-viewport": {
|
|
149
|
-
setApp: (_app: string | undefined) => void;
|
|
150
|
-
setAppData: (_appData: Record<string, string> | undefined) => void;
|
|
151
|
-
};
|
|
152
|
-
"payment-method-settings": {
|
|
153
|
-
setPaymentMethodConfiguration: (_paymentMethodConfiguration: string | undefined) => void;
|
|
154
|
-
};
|
|
155
|
-
"capital-financing": {
|
|
156
|
-
setDefaultFinancingOffer: (_defaultFinancingOffer: string | undefined) => void;
|
|
157
|
-
setShowFinancingSelector: (_showFinancingSelector: boolean | undefined) => void;
|
|
158
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
159
|
-
setSupportUrl: (_supportUrl: string | undefined) => void;
|
|
160
|
-
setOnFinancingsLoaded: (_listener: (({ total }: {
|
|
161
|
-
total: number;
|
|
162
|
-
}) => void) | undefined) => void;
|
|
163
|
-
};
|
|
164
|
-
"capital-financing-application": {
|
|
165
|
-
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
166
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
167
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
168
|
-
};
|
|
169
|
-
"capital-financing-promotion": {
|
|
170
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
|
|
171
|
-
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
172
|
-
setOnEligibleFinancingOfferLoaded: (_listener: (({ productType }: FinancingProductType) => void) | undefined) => void;
|
|
173
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
174
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
175
|
-
setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
|
|
122
|
+
payments: {
|
|
123
|
+
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
176
124
|
};
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
setIntervalEnd: (_intervalEnd: Date | undefined) => void;
|
|
181
|
-
setIntervalType: (_intervalType: IntervalType | undefined) => void;
|
|
125
|
+
"payment-details": {
|
|
126
|
+
setPayment: (_payment: string | undefined) => void;
|
|
127
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
182
128
|
};
|
|
183
129
|
"tax-settings": {
|
|
184
130
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/connect-js",
|
|
3
|
-
"version": "3.3.22
|
|
3
|
+
"version": "3.3.22",
|
|
4
4
|
"description": "Connect.js loading utility package",
|
|
5
5
|
"main": "dist/connect.js",
|
|
6
6
|
"module": "dist/connect.esm.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"test:unit": "jest",
|
|
12
12
|
"test:types": "zx ./tests/types/scripts/test.mjs",
|
|
13
13
|
"lint": "eslint '{src,types}/**/*.{ts,js}' && yarn prettier-check",
|
|
14
|
+
"lint-fix": "eslint '{src,types}/**/*.{ts,js}' --fix && yarn prettier-check",
|
|
14
15
|
"typecheck": "tsc --noEmit",
|
|
15
16
|
"build": "yarn clean && rollup -c",
|
|
16
17
|
"validate-change": "yarn run test",
|
|
@@ -45,21 +46,24 @@
|
|
|
45
46
|
"@rollup/plugin-json": "^6.0.0",
|
|
46
47
|
"@rollup/plugin-replace": "^2.3.1",
|
|
47
48
|
"@types/jest": "^24.0.25",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
49
|
-
"@typescript-eslint/parser": "^
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^7",
|
|
50
|
+
"@typescript-eslint/parser": "^7",
|
|
51
|
+
"@typescript-eslint/rule-tester": "^7",
|
|
52
|
+
"@typescript-eslint/scope-manager": "^7",
|
|
53
|
+
"@typescript-eslint/utils": "^7",
|
|
50
54
|
"babel-eslint": "^10.0.3",
|
|
51
55
|
"babel-jest": "^24.9.0",
|
|
52
56
|
"conditional-type-checks": "^1.0.5",
|
|
53
|
-
"eslint": "
|
|
54
|
-
"eslint-config-prettier": "^
|
|
55
|
-
"eslint-plugin-import": "^2.
|
|
56
|
-
"eslint-plugin-jest": "^
|
|
57
|
-
"eslint-plugin-prettier": "^
|
|
57
|
+
"eslint": "8.56.0",
|
|
58
|
+
"eslint-config-prettier": "^8.3.0",
|
|
59
|
+
"eslint-plugin-import": "^2.20.1",
|
|
60
|
+
"eslint-plugin-jest": "^26.6.0",
|
|
61
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
58
62
|
"jest": "^29.5.0",
|
|
59
63
|
"jest-environment-jsdom": "^29.5.0",
|
|
60
|
-
"prettier": "
|
|
64
|
+
"prettier": "2.8.8",
|
|
61
65
|
"rimraf": "^2.6.2",
|
|
62
|
-
"rollup": "^
|
|
66
|
+
"rollup": "^2.79.2",
|
|
63
67
|
"rollup-plugin-babel": "^4.4.0",
|
|
64
68
|
"rollup-plugin-typescript2": "^0.25.3",
|
|
65
69
|
"ts-jest": "^29.1.0",
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
initStripeConnect,
|
|
5
|
-
LoadConnectAndInitialize
|
|
6
|
-
} from "./shared";
|
|
1
|
+
import type { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
3
|
+
import { loadScript, initStripeConnect } from "./shared";
|
|
7
4
|
|
|
8
5
|
// Execute our own script injection after a tick to give users time to do their
|
|
9
6
|
// own script injection.
|
package/src/pure.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
2
|
|
|
3
|
-
import { IStripeConnectInitParams } from "../types";
|
|
3
|
+
import type { IStripeConnectInitParams } from "../types";
|
|
4
4
|
import { SCRIPT_SELECTOR } from "./utils/jestHelpers";
|
|
5
5
|
|
|
6
6
|
describe("pure module", () => {
|
|
@@ -16,7 +16,7 @@ describe("pure module", () => {
|
|
|
16
16
|
publishableKey: "pk_123",
|
|
17
17
|
fetchClientSecret: async () => {
|
|
18
18
|
return "secret_123";
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
20
|
};
|
|
21
21
|
loadConnectAndInitialize(mockInitParams);
|
|
22
22
|
|
package/src/pure.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
initStripeConnect,
|
|
5
|
-
LoadConnectAndInitialize
|
|
6
|
-
} from "./shared";
|
|
1
|
+
import type { IStripeConnectInitParams, StripeConnectInstance } from "../types";
|
|
2
|
+
import type { LoadConnectAndInitialize } from "./shared";
|
|
3
|
+
import { loadScript, initStripeConnect } from "./shared";
|
|
7
4
|
|
|
8
5
|
export const loadConnectAndInitialize: LoadConnectAndInitialize = (
|
|
9
6
|
initParams: IStripeConnectInitParams
|
package/src/shared.ts
CHANGED
|
@@ -1,76 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
IStripeConnectInitParams,
|
|
3
3
|
StripeConnectInstance,
|
|
4
4
|
ConnectElementTagName,
|
|
5
|
-
ConnectHTMLElementRecord
|
|
5
|
+
ConnectHTMLElementRecord,
|
|
6
6
|
} from "../types";
|
|
7
7
|
import {
|
|
8
8
|
ConnectElementCommonMethodConfig,
|
|
9
|
-
ConnectElementCustomMethodConfig
|
|
9
|
+
ConnectElementCustomMethodConfig,
|
|
10
10
|
} from "../types/config";
|
|
11
11
|
|
|
12
12
|
export type LoadConnectAndInitialize = (
|
|
13
13
|
initParams: IStripeConnectInitParams
|
|
14
14
|
) => StripeConnectInstance;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
type ConnectElementHTMLName =
|
|
17
|
+
| "stripe-connect-account-onboarding"
|
|
17
18
|
| "stripe-connect-payments"
|
|
18
|
-
| "stripe-connect-payouts"
|
|
19
19
|
| "stripe-connect-payment-details"
|
|
20
|
-
| "stripe-connect-account-onboarding"
|
|
21
|
-
| "stripe-connect-payment-method-settings"
|
|
22
20
|
| "stripe-connect-account-management"
|
|
23
21
|
| "stripe-connect-notification-banner"
|
|
24
|
-
| "stripe-connect-instant-payouts"
|
|
25
22
|
| "stripe-connect-issuing-card"
|
|
26
23
|
| "stripe-connect-issuing-cards-list"
|
|
27
24
|
| "stripe-connect-financial-account"
|
|
28
25
|
| "stripe-connect-financial-account-transactions"
|
|
29
|
-
| "stripe-connect-
|
|
30
|
-
| "stripe-connect-
|
|
31
|
-
| "stripe-connect-
|
|
32
|
-
| "stripe-connect-capital-financing-promotion"
|
|
33
|
-
| "stripe-connect-capital-overview"
|
|
26
|
+
| "stripe-connect-payouts"
|
|
27
|
+
| "stripe-connect-payouts-list"
|
|
28
|
+
| "stripe-connect-balances"
|
|
34
29
|
| "stripe-connect-documents"
|
|
35
30
|
| "stripe-connect-tax-registrations"
|
|
36
|
-
| "stripe-connect-tax-settings"
|
|
37
|
-
| "stripe-connect-balances"
|
|
38
|
-
| "stripe-connect-payouts-list"
|
|
39
|
-
| "stripe-connect-app-install"
|
|
40
|
-
| "stripe-connect-app-viewport"
|
|
41
|
-
| "stripe-connect-reporting-chart";
|
|
31
|
+
| "stripe-connect-tax-settings";
|
|
42
32
|
|
|
43
33
|
export const componentNameMapping: Record<
|
|
44
34
|
ConnectElementTagName,
|
|
45
35
|
ConnectElementHTMLName
|
|
46
36
|
> = {
|
|
37
|
+
"account-onboarding": "stripe-connect-account-onboarding",
|
|
47
38
|
payments: "stripe-connect-payments",
|
|
48
|
-
payouts: "stripe-connect-payouts",
|
|
49
39
|
"payment-details": "stripe-connect-payment-details",
|
|
50
|
-
|
|
51
|
-
"
|
|
40
|
+
payouts: "stripe-connect-payouts",
|
|
41
|
+
"payouts-list": "stripe-connect-payouts-list",
|
|
42
|
+
balances: "stripe-connect-balances",
|
|
52
43
|
"account-management": "stripe-connect-account-management",
|
|
53
44
|
"notification-banner": "stripe-connect-notification-banner",
|
|
54
|
-
"instant-payouts": "stripe-connect-instant-payouts",
|
|
55
45
|
"issuing-card": "stripe-connect-issuing-card",
|
|
56
46
|
"issuing-cards-list": "stripe-connect-issuing-cards-list",
|
|
57
47
|
"financial-account": "stripe-connect-financial-account",
|
|
58
|
-
recipients: "stripe-connect-recipients",
|
|
59
48
|
"financial-account-transactions":
|
|
60
49
|
"stripe-connect-financial-account-transactions",
|
|
61
|
-
"capital-financing": "stripe-connect-capital-financing",
|
|
62
|
-
"capital-financing-application":
|
|
63
|
-
"stripe-connect-capital-financing-application",
|
|
64
|
-
"capital-financing-promotion": "stripe-connect-capital-financing-promotion",
|
|
65
|
-
"capital-overview": "stripe-connect-capital-overview",
|
|
66
50
|
documents: "stripe-connect-documents",
|
|
67
51
|
"tax-registrations": "stripe-connect-tax-registrations",
|
|
68
52
|
"tax-settings": "stripe-connect-tax-settings",
|
|
69
|
-
balances: "stripe-connect-balances",
|
|
70
|
-
"payouts-list": "stripe-connect-payouts-list",
|
|
71
|
-
"app-install": "stripe-connect-app-install",
|
|
72
|
-
"app-viewport": "stripe-connect-app-viewport",
|
|
73
|
-
"reporting-chart": "stripe-connect-reporting-chart"
|
|
74
53
|
};
|
|
75
54
|
|
|
76
55
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
@@ -89,10 +68,10 @@ const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
|
89
68
|
export const findScript = (): HTMLScriptElement | null => {
|
|
90
69
|
return (
|
|
91
70
|
document.querySelectorAll<HTMLScriptElement>(
|
|
92
|
-
`script[src="${
|
|
71
|
+
`script[src="${V1_URL}"]`
|
|
93
72
|
)[0] ||
|
|
94
73
|
document.querySelectorAll<HTMLScriptElement>(
|
|
95
|
-
`script[src="${
|
|
74
|
+
`script[src="${V0_URL}"]`
|
|
96
75
|
)[0] ||
|
|
97
76
|
null
|
|
98
77
|
);
|
|
@@ -188,18 +167,18 @@ export const initStripeConnect = (
|
|
|
188
167
|
}
|
|
189
168
|
})();
|
|
190
169
|
const metaOptions = (initParams as any).metaOptions ?? {};
|
|
191
|
-
const stripeConnectInstance = stripePromise.then(wrapper =>
|
|
170
|
+
const stripeConnectInstance = stripePromise.then((wrapper) =>
|
|
192
171
|
wrapper.initialize({
|
|
193
172
|
...initParams,
|
|
194
|
-
metaOptions: { ...metaOptions, eagerClientSecretPromise }
|
|
173
|
+
metaOptions: { ...metaOptions, eagerClientSecretPromise },
|
|
195
174
|
} as any)
|
|
196
175
|
);
|
|
197
176
|
|
|
198
177
|
return {
|
|
199
|
-
create: tagName => {
|
|
178
|
+
create: (tagName) => {
|
|
200
179
|
let htmlName = componentNameMapping[tagName];
|
|
201
180
|
if (!htmlName) {
|
|
202
|
-
htmlName =
|
|
181
|
+
htmlName = tagName as unknown as ConnectElementHTMLName;
|
|
203
182
|
}
|
|
204
183
|
const element = document.createElement(htmlName);
|
|
205
184
|
|
|
@@ -208,14 +187,14 @@ export const initStripeConnect = (
|
|
|
208
187
|
: {};
|
|
209
188
|
const methods = { ...customMethods, ...ConnectElementCommonMethodConfig };
|
|
210
189
|
for (const method in methods) {
|
|
211
|
-
(element as any)[method] = function(value: any) {
|
|
190
|
+
(element as any)[method] = function (value: any) {
|
|
212
191
|
stripeConnectInstance.then(() => {
|
|
213
192
|
this[`${method}InternalOnly`](value);
|
|
214
193
|
});
|
|
215
194
|
};
|
|
216
195
|
}
|
|
217
196
|
|
|
218
|
-
stripeConnectInstance.then(instance => {
|
|
197
|
+
stripeConnectInstance.then((instance) => {
|
|
219
198
|
if (!element.isConnected && !(element as any).setConnector) {
|
|
220
199
|
// If the element is not connected to the DOM and the `setConnector` method is not
|
|
221
200
|
// defined, this indicates the element was created before connect.js was loaded, and has
|
|
@@ -243,8 +222,8 @@ export const initStripeConnect = (
|
|
|
243
222
|
|
|
244
223
|
return element as ConnectHTMLElementRecord[typeof tagName];
|
|
245
224
|
},
|
|
246
|
-
update: updateOptions => {
|
|
247
|
-
stripeConnectInstance.then(instance => {
|
|
225
|
+
update: (updateOptions) => {
|
|
226
|
+
stripeConnectInstance.then((instance) => {
|
|
248
227
|
instance.update(updateOptions);
|
|
249
228
|
});
|
|
250
229
|
},
|
|
@@ -252,10 +231,10 @@ export const initStripeConnect = (
|
|
|
252
231
|
return stripeConnectInstance;
|
|
253
232
|
},
|
|
254
233
|
logout: () => {
|
|
255
|
-
return stripeConnectInstance.then(instance => {
|
|
234
|
+
return stripeConnectInstance.then((instance) => {
|
|
256
235
|
return instance.logout();
|
|
257
236
|
});
|
|
258
|
-
}
|
|
237
|
+
},
|
|
259
238
|
};
|
|
260
239
|
};
|
|
261
240
|
|
|
@@ -272,12 +251,12 @@ const createWrapper = (stripeConnect: any) => {
|
|
|
272
251
|
sdk: true,
|
|
273
252
|
sdkOptions: {
|
|
274
253
|
// This will be replaced by the npm package version when bundling
|
|
275
|
-
sdkVersion: "_NPM_PACKAGE_VERSION_"
|
|
276
|
-
}
|
|
277
|
-
}
|
|
254
|
+
sdkVersion: "_NPM_PACKAGE_VERSION_",
|
|
255
|
+
},
|
|
256
|
+
},
|
|
278
257
|
});
|
|
279
258
|
return stripeConnectInstance;
|
|
280
|
-
}
|
|
259
|
+
},
|
|
281
260
|
};
|
|
282
261
|
return wrapper;
|
|
283
262
|
};
|
package/types/checks.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectElementCustomMethodConfig } from "./config";
|
|
2
|
-
import { ConnectElementTagName } from "./shared.d";
|
|
1
|
+
import type { ConnectElementCustomMethodConfig } from "./config";
|
|
2
|
+
import type { ConnectElementTagName } from "./shared.d";
|
|
3
3
|
|
|
4
4
|
// ensure that keys of ConnectElementCustomMethodConfig are from ConnectElementTagName
|
|
5
5
|
export type HasType<T, Q extends T> = Q;
|
package/types/config.ts
CHANGED
|
@@ -134,11 +134,6 @@ export type NotificationCount = {
|
|
|
134
134
|
actionRequired: number;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
-
export type InstallState = {
|
|
138
|
-
appId: string;
|
|
139
|
-
state: "INSTALLED" | "UNINSTALLED";
|
|
140
|
-
};
|
|
141
|
-
|
|
142
137
|
export type LoaderStart = {
|
|
143
138
|
elementTagName: string;
|
|
144
139
|
};
|
|
@@ -157,18 +152,6 @@ export type EmbeddedError = {
|
|
|
157
152
|
message?: string;
|
|
158
153
|
};
|
|
159
154
|
|
|
160
|
-
export type FinancingProductType = {
|
|
161
|
-
productType: "standard" | "refill" | "none";
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
165
|
-
|
|
166
|
-
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
167
|
-
|
|
168
|
-
export type ReportName = "gross_volume" | "net_volume";
|
|
169
|
-
|
|
170
|
-
export type RecipientDataSource = "customers";
|
|
171
|
-
|
|
172
155
|
export type EmbeddedErrorType =
|
|
173
156
|
/**
|
|
174
157
|
* Failure to connect to Stripe's API.
|
|
@@ -201,19 +184,10 @@ export const ConnectElementCommonMethodConfig = {
|
|
|
201
184
|
): void => {},
|
|
202
185
|
setOnLoaderStart: (
|
|
203
186
|
_listener: (({ elementTagName }: LoaderStart) => void) | undefined
|
|
204
|
-
): void => {}
|
|
187
|
+
): void => {},
|
|
205
188
|
};
|
|
206
189
|
|
|
207
190
|
export const ConnectElementCustomMethodConfig = {
|
|
208
|
-
payments: {
|
|
209
|
-
setDefaultFilters: (
|
|
210
|
-
_filters: PaymentsListDefaultFilters | undefined
|
|
211
|
-
): void => {}
|
|
212
|
-
},
|
|
213
|
-
"payment-details": {
|
|
214
|
-
setPayment: (_payment: string | undefined): void => {},
|
|
215
|
-
setOnClose: (_listener: (() => void) | undefined): void => {}
|
|
216
|
-
},
|
|
217
191
|
"account-onboarding": {
|
|
218
192
|
setFullTermsOfServiceUrl: (
|
|
219
193
|
_termOfServiceUrl: string | undefined
|
|
@@ -231,12 +205,12 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
231
205
|
setOnExit: (_listener: (() => void) | undefined): void => {},
|
|
232
206
|
setOnStepChange: (
|
|
233
207
|
_listener: (({ step }: StepChange) => void) | undefined
|
|
234
|
-
): void => {}
|
|
208
|
+
): void => {},
|
|
235
209
|
},
|
|
236
210
|
"account-management": {
|
|
237
211
|
setCollectionOptions: (
|
|
238
212
|
_collectionOptions: CollectionOptions | undefined
|
|
239
|
-
): void => {}
|
|
213
|
+
): void => {},
|
|
240
214
|
},
|
|
241
215
|
"notification-banner": {
|
|
242
216
|
setCollectionOptions: (
|
|
@@ -246,7 +220,7 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
246
220
|
_listener:
|
|
247
221
|
| (({ total, actionRequired }: NotificationCount) => void)
|
|
248
222
|
| undefined
|
|
249
|
-
): void => {}
|
|
223
|
+
): void => {},
|
|
250
224
|
},
|
|
251
225
|
"issuing-card": {
|
|
252
226
|
setDefaultCard: (_defaultCard: string | undefined): void => {},
|
|
@@ -254,85 +228,29 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
254
228
|
setFetchEphemeralKey: (
|
|
255
229
|
_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
|
|
256
230
|
): void => {},
|
|
257
|
-
setShowSpendControls: (_showSpendControls: boolean | undefined): void => {}
|
|
231
|
+
setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
|
|
258
232
|
},
|
|
259
233
|
"issuing-cards-list": {
|
|
260
234
|
setFetchEphemeralKey: (
|
|
261
235
|
_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
|
|
262
236
|
): void => {},
|
|
263
237
|
setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
|
|
264
|
-
setIssuingProgram: (_issuingProgram: string | undefined): void => {}
|
|
238
|
+
setIssuingProgram: (_issuingProgram: string | undefined): void => {},
|
|
265
239
|
},
|
|
266
240
|
"financial-account": {
|
|
267
|
-
setFinancialAccount: (_financialAccount: string): void => {}
|
|
241
|
+
setFinancialAccount: (_financialAccount: string): void => {},
|
|
268
242
|
},
|
|
269
243
|
"financial-account-transactions": {
|
|
270
|
-
setFinancialAccount: (_financialAccount: string): void => {}
|
|
271
|
-
},
|
|
272
|
-
recipients: {
|
|
273
|
-
setDataSource: (_dataSource: RecipientDataSource): void => {}
|
|
244
|
+
setFinancialAccount: (_financialAccount: string): void => {},
|
|
274
245
|
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
279
|
-
): void => {},
|
|
280
|
-
setOnAppInstallStateChanged: (
|
|
281
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
282
|
-
): void => {}
|
|
283
|
-
},
|
|
284
|
-
"app-viewport": {
|
|
285
|
-
setApp: (_app: string | undefined): void => {},
|
|
286
|
-
setAppData: (_appData: Record<string, string> | undefined): void => {}
|
|
287
|
-
},
|
|
288
|
-
"payment-method-settings": {
|
|
289
|
-
setPaymentMethodConfiguration: (
|
|
290
|
-
_paymentMethodConfiguration: string | undefined
|
|
291
|
-
): void => {}
|
|
292
|
-
},
|
|
293
|
-
"capital-financing": {
|
|
294
|
-
setDefaultFinancingOffer: (
|
|
295
|
-
_defaultFinancingOffer: string | undefined
|
|
296
|
-
): void => {},
|
|
297
|
-
setShowFinancingSelector: (
|
|
298
|
-
_showFinancingSelector: boolean | undefined
|
|
299
|
-
): void => {},
|
|
300
|
-
setHowCapitalWorksUrl: (
|
|
301
|
-
_howCapitalWorksUrl: string | undefined
|
|
302
|
-
): void => {},
|
|
303
|
-
setSupportUrl: (_supportUrl: string | undefined): void => {},
|
|
304
|
-
setOnFinancingsLoaded: (
|
|
305
|
-
_listener: (({ total }: { total: number }) => void) | undefined
|
|
306
|
-
): void => {}
|
|
307
|
-
},
|
|
308
|
-
"capital-financing-application": {
|
|
309
|
-
setOnApplicationSubmitted: (
|
|
310
|
-
_listener: (() => void) | undefined
|
|
311
|
-
): void => {},
|
|
312
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
313
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined): void => {}
|
|
314
|
-
},
|
|
315
|
-
"capital-financing-promotion": {
|
|
316
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
|
|
317
|
-
setOnApplicationSubmitted: (
|
|
318
|
-
_listener: (() => void) | undefined
|
|
319
|
-
): void => {},
|
|
320
|
-
setOnEligibleFinancingOfferLoaded: (
|
|
321
|
-
_listener: (({ productType }: FinancingProductType) => void) | undefined
|
|
322
|
-
): void => {},
|
|
323
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
324
|
-
setHowCapitalWorksUrl: (
|
|
325
|
-
_howCapitalWorksUrl: string | undefined
|
|
246
|
+
payments: {
|
|
247
|
+
setDefaultFilters: (
|
|
248
|
+
_filters: PaymentsListDefaultFilters | undefined
|
|
326
249
|
): void => {},
|
|
327
|
-
setEligibilityCriteriaUrl: (
|
|
328
|
-
_eligibilityCriteriaUrl: string | undefined
|
|
329
|
-
): void => {}
|
|
330
250
|
},
|
|
331
|
-
"
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
|
|
335
|
-
setIntervalType: (_intervalType: IntervalType | undefined): void => {}
|
|
251
|
+
"payment-details": {
|
|
252
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
253
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
336
254
|
},
|
|
337
255
|
"tax-settings": {
|
|
338
256
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
|
|
@@ -341,12 +259,12 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
341
259
|
): void => {},
|
|
342
260
|
setOnTaxSettingsUpdated: (
|
|
343
261
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
344
|
-
): void => {}
|
|
262
|
+
): void => {},
|
|
345
263
|
},
|
|
346
264
|
"tax-registrations": {
|
|
347
265
|
setOnAfterTaxRegistrationAdded: (
|
|
348
266
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
349
267
|
): void => {},
|
|
350
|
-
setDisplayCountries: (_countries: string[] | undefined): void => {}
|
|
351
|
-
}
|
|
268
|
+
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
269
|
+
},
|
|
352
270
|
};
|
package/types/index.d.ts
CHANGED
package/types/shared.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
ConnectElementCustomMethodConfig,
|
|
3
|
-
ConnectElementCommonMethodConfig
|
|
3
|
+
ConnectElementCommonMethodConfig,
|
|
4
4
|
} from "./config";
|
|
5
|
+
|
|
5
6
|
export declare type LoadConnectAndInitialize = (
|
|
6
7
|
initParams: IStripeConnectInitParams
|
|
7
8
|
) => StripeConnectInstance;
|
|
@@ -487,28 +488,18 @@ 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"
|
|
490
492
|
| "payments"
|
|
491
|
-
| "payouts"
|
|
492
493
|
| "payment-details"
|
|
493
|
-
| "account-onboarding"
|
|
494
|
-
| "payment-method-settings"
|
|
495
494
|
| "account-management"
|
|
496
495
|
| "notification-banner"
|
|
497
|
-
| "instant-payouts"
|
|
498
496
|
| "issuing-card"
|
|
499
497
|
| "issuing-cards-list"
|
|
500
498
|
| "financial-account"
|
|
501
499
|
| "financial-account-transactions"
|
|
502
|
-
| "
|
|
503
|
-
| "
|
|
504
|
-
| "
|
|
505
|
-
| "capital-financing-promotion"
|
|
506
|
-
| "capital-overview"
|
|
500
|
+
| "payouts"
|
|
501
|
+
| "payouts-list"
|
|
502
|
+
| "balances"
|
|
507
503
|
| "documents"
|
|
508
504
|
| "tax-registrations"
|
|
509
|
-
| "tax-settings"
|
|
510
|
-
| "balances"
|
|
511
|
-
| "payouts-list"
|
|
512
|
-
| "app-install"
|
|
513
|
-
| "app-viewport"
|
|
514
|
-
| "reporting-chart";
|
|
505
|
+
| "tax-settings";
|