@stripe/connect-js 3.3.17-beta-1 → 3.3.17

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 CHANGED
@@ -7,7 +7,7 @@ Calling `loadConnectAndInitialize` always loads the latest version of Connect.js
7
7
 
8
8
  The embedded onboarding component is generally available now. Please refer to our [documentation](https://stripe.com/docs/connect/supported-embedded-components#account-onboarding) for more information.
9
9
 
10
- Note: Majority of Connect embedded components are currently still in beta. Please [contact us](https://stripe.com/docs/connect/get-started-connect-embedded-components#access) to request beta access.
10
+ Note: Some Connect embedded components are currently still in preview. These can be [viewed on our doc site](https://docs.stripe.com/connect/supported-embedded-components), where you can also request preview access.
11
11
 
12
12
  ## Installation
13
13
 
@@ -20,8 +20,7 @@ npm install @stripe/connect-js
20
20
  ## Documentation
21
21
 
22
22
  - [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
23
- - [Quickstart guide for GA](https://stripe.com/docs/connect/connect-embedded-components/quickstart)
24
- - [Quickstart guide for beta](https://stripe.com/docs/connect/connect-embedded-components/beta-quickstart)
23
+ - [Quickstart guide](https://stripe.com/docs/connect/connect-embedded-components/quickstart)
25
24
 
26
25
  ## Usage
27
26
 
@@ -5,17 +5,14 @@ const ConnectElementCommonMethodConfig = {
5
5
  setOnLoaderStart: _listener => {}
6
6
  };
7
7
  const ConnectElementCustomMethodConfig = {
8
- "payment-details": {
9
- setPayment: _payment => {},
10
- setOnClose: _listener => {}
11
- },
12
8
  "account-onboarding": {
13
9
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
14
10
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
15
11
  setPrivacyPolicyUrl: _privacyPolicyUrl => {},
16
12
  setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
17
13
  setCollectionOptions: _collectionOptions => {},
18
- setOnExit: _listener => {}
14
+ setOnExit: _listener => {},
15
+ setOnStepChange: _listener => {}
19
16
  },
20
17
  "account-management": {
21
18
  setCollectionOptions: _collectionOptions => {}
@@ -24,79 +21,42 @@ const ConnectElementCustomMethodConfig = {
24
21
  setCollectionOptions: _collectionOptions => {},
25
22
  setOnNotificationsChange: _listener => {}
26
23
  },
27
- "issuing-card": {
28
- setDefaultCard: _defaultCard => {},
29
- setCardSwitching: _cardSwitching => {},
30
- setFetchEphemeralKey: _fetchEphemeralKey => {}
31
- },
32
- "issuing-cards-list": {
33
- setFetchEphemeralKey: _fetchEphemeralKey => {}
34
- },
35
- "financial-account": {
36
- setFinancialAccount: _financialAccount => {}
24
+ payments: {
25
+ setDefaultFilters: _filters => {}
37
26
  },
38
- "financial-account-transactions": {
39
- setFinancialAccount: _financialAccount => {}
40
- },
41
- "app-install": {
42
- setApp: _app => {},
43
- setOnAppInstallStateFetched: _listener => {},
44
- setOnAppInstallStateChanged: _listener => {}
45
- },
46
- "app-viewport": {
47
- setApp: _app => {},
48
- setAppData: _appData => {}
49
- },
50
- "payment-method-settings": {
51
- setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
52
- },
53
- "capital-financing": {
54
- setDefaultFinancingOffer: _defaultFinancingOffer => {},
55
- setShowFinancingSelector: _showFinancingSelector => {},
56
- setFaqUrl: _faqUrl => {},
57
- setSupportUrl: _supportUrl => {},
58
- setOnFinancingsLoaded: _listener => {}
27
+ "payment-details": {
28
+ setPayment: _payment => {},
29
+ setOnClose: _listener => {}
59
30
  },
60
- "capital-financing-application": {
61
- setOnApplicationSubmitted: _listener => {}
31
+ "tax-settings": {
32
+ setHideProductTaxCodeSelector: _hidden => {},
33
+ setDisplayHeadOfficeCountries: _countries => {},
34
+ setOnTaxSettingsUpdated: _listener => {}
62
35
  },
63
- "capital-financing-promotion": {
64
- setLayout: _layout => {},
65
- setOnApplicationSubmitted: _listener => {},
66
- setOnEligibleFinancingOfferLoaded: _listener => {}
36
+ "tax-registrations": {
37
+ setOnAfterTaxRegistrationAdded: _listener => {},
38
+ setDisplayCountries: _countries => {}
67
39
  }
68
40
  };
69
41
 
70
42
  const componentNameMapping = {
43
+ "account-onboarding": "stripe-connect-account-onboarding",
71
44
  payments: "stripe-connect-payments",
72
- payouts: "stripe-connect-payouts",
73
45
  "payment-details": "stripe-connect-payment-details",
74
- "account-onboarding": "stripe-connect-account-onboarding",
75
- "payment-method-settings": "stripe-connect-payment-method-settings",
46
+ payouts: "stripe-connect-payouts",
47
+ "payouts-list": "stripe-connect-payouts-list",
48
+ balances: "stripe-connect-balances",
76
49
  "account-management": "stripe-connect-account-management",
77
50
  "notification-banner": "stripe-connect-notification-banner",
78
- "instant-payouts": "stripe-connect-instant-payouts",
79
- "issuing-card": "stripe-connect-issuing-card",
80
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
81
- "financial-account": "stripe-connect-financial-account",
82
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
83
- "capital-financing": "stripe-connect-capital-financing",
84
- "capital-financing-application": "stripe-connect-capital-financing-application",
85
- "capital-financing-promotion": "stripe-connect-capital-financing-promotion",
86
- "capital-overview": "stripe-connect-capital-overview",
87
51
  documents: "stripe-connect-documents",
88
52
  "tax-registrations": "stripe-connect-tax-registrations",
89
- "tax-settings": "stripe-connect-tax-settings",
90
- balances: "stripe-connect-balances",
91
- "payouts-list": "stripe-connect-payouts-list",
92
- "app-install": "stripe-connect-app-install",
93
- "app-viewport": "stripe-connect-app-viewport"
53
+ "tax-settings": "stripe-connect-tax-settings"
94
54
  };
95
55
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
96
56
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
97
57
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
98
58
  const findScript = () => {
99
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
59
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
100
60
  };
101
61
  const injectScript = () => {
102
62
  const script = document.createElement("script");
@@ -108,13 +68,13 @@ const injectScript = () => {
108
68
  document.head.appendChild(script);
109
69
  return script;
110
70
  };
111
- let stripePromise = null;
71
+ let stripePromise$1 = null;
112
72
  const loadScript = () => {
113
73
  // Ensure that we only attempt to load Connect.js at most once
114
- if (stripePromise !== null) {
115
- return stripePromise;
74
+ if (stripePromise$1 !== null) {
75
+ return stripePromise$1;
116
76
  }
117
- stripePromise = new Promise((resolve, reject) => {
77
+ stripePromise$1 = new Promise((resolve, reject) => {
118
78
  if (typeof window === "undefined") {
119
79
  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.");
120
80
  return;
@@ -149,7 +109,7 @@ const loadScript = () => {
149
109
  reject(error);
150
110
  }
151
111
  });
152
- return stripePromise;
112
+ return stripePromise$1;
153
113
  };
154
114
  const hasCustomMethod = tagName => {
155
115
  return tagName in ConnectElementCustomMethodConfig;
@@ -233,7 +193,7 @@ const createWrapper = stripeConnect => {
233
193
  sdk: true,
234
194
  sdkOptions: {
235
195
  // This will be replaced by the npm package version when bundling
236
- sdkVersion: "3.3.17-beta-1"
196
+ sdkVersion: "3.3.16"
237
197
  }
238
198
  })
239
199
  }));
@@ -245,16 +205,16 @@ const createWrapper = stripeConnect => {
245
205
 
246
206
  // Execute our own script injection after a tick to give users time to do their
247
207
  // own script injection.
248
- const stripePromise$1 = Promise.resolve().then(() => loadScript());
208
+ const stripePromise = Promise.resolve().then(() => loadScript());
249
209
  let loadCalled = false;
250
- stripePromise$1.catch(err => {
210
+ stripePromise.catch(err => {
251
211
  if (!loadCalled) {
252
212
  console.warn(err);
253
213
  }
254
214
  });
255
215
  const loadConnectAndInitialize = initParams => {
256
216
  loadCalled = true;
257
- return initStripeConnect(stripePromise$1, initParams);
217
+ return initStripeConnect(stripePromise, initParams);
258
218
  };
259
219
 
260
220
  export { loadConnectAndInitialize };
package/dist/connect.js CHANGED
@@ -9,17 +9,14 @@ const ConnectElementCommonMethodConfig = {
9
9
  setOnLoaderStart: _listener => {}
10
10
  };
11
11
  const ConnectElementCustomMethodConfig = {
12
- "payment-details": {
13
- setPayment: _payment => {},
14
- setOnClose: _listener => {}
15
- },
16
12
  "account-onboarding": {
17
13
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
18
14
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
19
15
  setPrivacyPolicyUrl: _privacyPolicyUrl => {},
20
16
  setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
21
17
  setCollectionOptions: _collectionOptions => {},
22
- setOnExit: _listener => {}
18
+ setOnExit: _listener => {},
19
+ setOnStepChange: _listener => {}
23
20
  },
24
21
  "account-management": {
25
22
  setCollectionOptions: _collectionOptions => {}
@@ -28,79 +25,42 @@ const ConnectElementCustomMethodConfig = {
28
25
  setCollectionOptions: _collectionOptions => {},
29
26
  setOnNotificationsChange: _listener => {}
30
27
  },
31
- "issuing-card": {
32
- setDefaultCard: _defaultCard => {},
33
- setCardSwitching: _cardSwitching => {},
34
- setFetchEphemeralKey: _fetchEphemeralKey => {}
35
- },
36
- "issuing-cards-list": {
37
- setFetchEphemeralKey: _fetchEphemeralKey => {}
38
- },
39
- "financial-account": {
40
- setFinancialAccount: _financialAccount => {}
28
+ payments: {
29
+ setDefaultFilters: _filters => {}
41
30
  },
42
- "financial-account-transactions": {
43
- setFinancialAccount: _financialAccount => {}
44
- },
45
- "app-install": {
46
- setApp: _app => {},
47
- setOnAppInstallStateFetched: _listener => {},
48
- setOnAppInstallStateChanged: _listener => {}
49
- },
50
- "app-viewport": {
51
- setApp: _app => {},
52
- setAppData: _appData => {}
53
- },
54
- "payment-method-settings": {
55
- setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
56
- },
57
- "capital-financing": {
58
- setDefaultFinancingOffer: _defaultFinancingOffer => {},
59
- setShowFinancingSelector: _showFinancingSelector => {},
60
- setFaqUrl: _faqUrl => {},
61
- setSupportUrl: _supportUrl => {},
62
- setOnFinancingsLoaded: _listener => {}
31
+ "payment-details": {
32
+ setPayment: _payment => {},
33
+ setOnClose: _listener => {}
63
34
  },
64
- "capital-financing-application": {
65
- setOnApplicationSubmitted: _listener => {}
35
+ "tax-settings": {
36
+ setHideProductTaxCodeSelector: _hidden => {},
37
+ setDisplayHeadOfficeCountries: _countries => {},
38
+ setOnTaxSettingsUpdated: _listener => {}
66
39
  },
67
- "capital-financing-promotion": {
68
- setLayout: _layout => {},
69
- setOnApplicationSubmitted: _listener => {},
70
- setOnEligibleFinancingOfferLoaded: _listener => {}
40
+ "tax-registrations": {
41
+ setOnAfterTaxRegistrationAdded: _listener => {},
42
+ setDisplayCountries: _countries => {}
71
43
  }
72
44
  };
73
45
 
74
46
  const componentNameMapping = {
47
+ "account-onboarding": "stripe-connect-account-onboarding",
75
48
  payments: "stripe-connect-payments",
76
- payouts: "stripe-connect-payouts",
77
49
  "payment-details": "stripe-connect-payment-details",
78
- "account-onboarding": "stripe-connect-account-onboarding",
79
- "payment-method-settings": "stripe-connect-payment-method-settings",
50
+ payouts: "stripe-connect-payouts",
51
+ "payouts-list": "stripe-connect-payouts-list",
52
+ balances: "stripe-connect-balances",
80
53
  "account-management": "stripe-connect-account-management",
81
54
  "notification-banner": "stripe-connect-notification-banner",
82
- "instant-payouts": "stripe-connect-instant-payouts",
83
- "issuing-card": "stripe-connect-issuing-card",
84
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
85
- "financial-account": "stripe-connect-financial-account",
86
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
87
- "capital-financing": "stripe-connect-capital-financing",
88
- "capital-financing-application": "stripe-connect-capital-financing-application",
89
- "capital-financing-promotion": "stripe-connect-capital-financing-promotion",
90
- "capital-overview": "stripe-connect-capital-overview",
91
55
  documents: "stripe-connect-documents",
92
56
  "tax-registrations": "stripe-connect-tax-registrations",
93
- "tax-settings": "stripe-connect-tax-settings",
94
- balances: "stripe-connect-balances",
95
- "payouts-list": "stripe-connect-payouts-list",
96
- "app-install": "stripe-connect-app-install",
97
- "app-viewport": "stripe-connect-app-viewport"
57
+ "tax-settings": "stripe-connect-tax-settings"
98
58
  };
99
59
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
100
60
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
101
61
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
102
62
  const findScript = () => {
103
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
63
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
104
64
  };
105
65
  const injectScript = () => {
106
66
  const script = document.createElement("script");
@@ -112,13 +72,13 @@ const injectScript = () => {
112
72
  document.head.appendChild(script);
113
73
  return script;
114
74
  };
115
- let stripePromise = null;
75
+ let stripePromise$1 = null;
116
76
  const loadScript = () => {
117
77
  // Ensure that we only attempt to load Connect.js at most once
118
- if (stripePromise !== null) {
119
- return stripePromise;
78
+ if (stripePromise$1 !== null) {
79
+ return stripePromise$1;
120
80
  }
121
- stripePromise = new Promise((resolve, reject) => {
81
+ stripePromise$1 = new Promise((resolve, reject) => {
122
82
  if (typeof window === "undefined") {
123
83
  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.");
124
84
  return;
@@ -153,7 +113,7 @@ const loadScript = () => {
153
113
  reject(error);
154
114
  }
155
115
  });
156
- return stripePromise;
116
+ return stripePromise$1;
157
117
  };
158
118
  const hasCustomMethod = tagName => {
159
119
  return tagName in ConnectElementCustomMethodConfig;
@@ -237,7 +197,7 @@ const createWrapper = stripeConnect => {
237
197
  sdk: true,
238
198
  sdkOptions: {
239
199
  // This will be replaced by the npm package version when bundling
240
- sdkVersion: "3.3.17-beta-1"
200
+ sdkVersion: "3.3.16"
241
201
  }
242
202
  })
243
203
  }));
@@ -249,16 +209,16 @@ const createWrapper = stripeConnect => {
249
209
 
250
210
  // Execute our own script injection after a tick to give users time to do their
251
211
  // own script injection.
252
- const stripePromise$1 = Promise.resolve().then(() => loadScript());
212
+ const stripePromise = Promise.resolve().then(() => loadScript());
253
213
  let loadCalled = false;
254
- stripePromise$1.catch(err => {
214
+ stripePromise.catch(err => {
255
215
  if (!loadCalled) {
256
216
  console.warn(err);
257
217
  }
258
218
  });
259
219
  const loadConnectAndInitialize = initParams => {
260
220
  loadCalled = true;
261
- return initStripeConnect(stripePromise$1, initParams);
221
+ return initStripeConnect(stripePromise, initParams);
262
222
  };
263
223
 
264
224
  exports.loadConnectAndInitialize = loadConnectAndInitialize;
package/dist/pure.esm.js CHANGED
@@ -5,17 +5,14 @@ const ConnectElementCommonMethodConfig = {
5
5
  setOnLoaderStart: _listener => {}
6
6
  };
7
7
  const ConnectElementCustomMethodConfig = {
8
- "payment-details": {
9
- setPayment: _payment => {},
10
- setOnClose: _listener => {}
11
- },
12
8
  "account-onboarding": {
13
9
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
14
10
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
15
11
  setPrivacyPolicyUrl: _privacyPolicyUrl => {},
16
12
  setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
17
13
  setCollectionOptions: _collectionOptions => {},
18
- setOnExit: _listener => {}
14
+ setOnExit: _listener => {},
15
+ setOnStepChange: _listener => {}
19
16
  },
20
17
  "account-management": {
21
18
  setCollectionOptions: _collectionOptions => {}
@@ -24,79 +21,42 @@ const ConnectElementCustomMethodConfig = {
24
21
  setCollectionOptions: _collectionOptions => {},
25
22
  setOnNotificationsChange: _listener => {}
26
23
  },
27
- "issuing-card": {
28
- setDefaultCard: _defaultCard => {},
29
- setCardSwitching: _cardSwitching => {},
30
- setFetchEphemeralKey: _fetchEphemeralKey => {}
31
- },
32
- "issuing-cards-list": {
33
- setFetchEphemeralKey: _fetchEphemeralKey => {}
34
- },
35
- "financial-account": {
36
- setFinancialAccount: _financialAccount => {}
24
+ payments: {
25
+ setDefaultFilters: _filters => {}
37
26
  },
38
- "financial-account-transactions": {
39
- setFinancialAccount: _financialAccount => {}
40
- },
41
- "app-install": {
42
- setApp: _app => {},
43
- setOnAppInstallStateFetched: _listener => {},
44
- setOnAppInstallStateChanged: _listener => {}
45
- },
46
- "app-viewport": {
47
- setApp: _app => {},
48
- setAppData: _appData => {}
49
- },
50
- "payment-method-settings": {
51
- setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
52
- },
53
- "capital-financing": {
54
- setDefaultFinancingOffer: _defaultFinancingOffer => {},
55
- setShowFinancingSelector: _showFinancingSelector => {},
56
- setFaqUrl: _faqUrl => {},
57
- setSupportUrl: _supportUrl => {},
58
- setOnFinancingsLoaded: _listener => {}
27
+ "payment-details": {
28
+ setPayment: _payment => {},
29
+ setOnClose: _listener => {}
59
30
  },
60
- "capital-financing-application": {
61
- setOnApplicationSubmitted: _listener => {}
31
+ "tax-settings": {
32
+ setHideProductTaxCodeSelector: _hidden => {},
33
+ setDisplayHeadOfficeCountries: _countries => {},
34
+ setOnTaxSettingsUpdated: _listener => {}
62
35
  },
63
- "capital-financing-promotion": {
64
- setLayout: _layout => {},
65
- setOnApplicationSubmitted: _listener => {},
66
- setOnEligibleFinancingOfferLoaded: _listener => {}
36
+ "tax-registrations": {
37
+ setOnAfterTaxRegistrationAdded: _listener => {},
38
+ setDisplayCountries: _countries => {}
67
39
  }
68
40
  };
69
41
 
70
42
  const componentNameMapping = {
43
+ "account-onboarding": "stripe-connect-account-onboarding",
71
44
  payments: "stripe-connect-payments",
72
- payouts: "stripe-connect-payouts",
73
45
  "payment-details": "stripe-connect-payment-details",
74
- "account-onboarding": "stripe-connect-account-onboarding",
75
- "payment-method-settings": "stripe-connect-payment-method-settings",
46
+ payouts: "stripe-connect-payouts",
47
+ "payouts-list": "stripe-connect-payouts-list",
48
+ balances: "stripe-connect-balances",
76
49
  "account-management": "stripe-connect-account-management",
77
50
  "notification-banner": "stripe-connect-notification-banner",
78
- "instant-payouts": "stripe-connect-instant-payouts",
79
- "issuing-card": "stripe-connect-issuing-card",
80
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
81
- "financial-account": "stripe-connect-financial-account",
82
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
83
- "capital-financing": "stripe-connect-capital-financing",
84
- "capital-financing-application": "stripe-connect-capital-financing-application",
85
- "capital-financing-promotion": "stripe-connect-capital-financing-promotion",
86
- "capital-overview": "stripe-connect-capital-overview",
87
51
  documents: "stripe-connect-documents",
88
52
  "tax-registrations": "stripe-connect-tax-registrations",
89
- "tax-settings": "stripe-connect-tax-settings",
90
- balances: "stripe-connect-balances",
91
- "payouts-list": "stripe-connect-payouts-list",
92
- "app-install": "stripe-connect-app-install",
93
- "app-viewport": "stripe-connect-app-viewport"
53
+ "tax-settings": "stripe-connect-tax-settings"
94
54
  };
95
55
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
96
56
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
97
57
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
98
58
  const findScript = () => {
99
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
59
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
100
60
  };
101
61
  const injectScript = () => {
102
62
  const script = document.createElement("script");
@@ -233,7 +193,7 @@ const createWrapper = stripeConnect => {
233
193
  sdk: true,
234
194
  sdkOptions: {
235
195
  // This will be replaced by the npm package version when bundling
236
- sdkVersion: "3.3.17-beta-1"
196
+ sdkVersion: "3.3.16"
237
197
  }
238
198
  })
239
199
  }));
package/dist/pure.js CHANGED
@@ -9,17 +9,14 @@ const ConnectElementCommonMethodConfig = {
9
9
  setOnLoaderStart: _listener => {}
10
10
  };
11
11
  const ConnectElementCustomMethodConfig = {
12
- "payment-details": {
13
- setPayment: _payment => {},
14
- setOnClose: _listener => {}
15
- },
16
12
  "account-onboarding": {
17
13
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
18
14
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
19
15
  setPrivacyPolicyUrl: _privacyPolicyUrl => {},
20
16
  setSkipTermsOfServiceCollection: _skipTermsOfServiceCollection => {},
21
17
  setCollectionOptions: _collectionOptions => {},
22
- setOnExit: _listener => {}
18
+ setOnExit: _listener => {},
19
+ setOnStepChange: _listener => {}
23
20
  },
24
21
  "account-management": {
25
22
  setCollectionOptions: _collectionOptions => {}
@@ -28,79 +25,42 @@ const ConnectElementCustomMethodConfig = {
28
25
  setCollectionOptions: _collectionOptions => {},
29
26
  setOnNotificationsChange: _listener => {}
30
27
  },
31
- "issuing-card": {
32
- setDefaultCard: _defaultCard => {},
33
- setCardSwitching: _cardSwitching => {},
34
- setFetchEphemeralKey: _fetchEphemeralKey => {}
35
- },
36
- "issuing-cards-list": {
37
- setFetchEphemeralKey: _fetchEphemeralKey => {}
38
- },
39
- "financial-account": {
40
- setFinancialAccount: _financialAccount => {}
28
+ payments: {
29
+ setDefaultFilters: _filters => {}
41
30
  },
42
- "financial-account-transactions": {
43
- setFinancialAccount: _financialAccount => {}
44
- },
45
- "app-install": {
46
- setApp: _app => {},
47
- setOnAppInstallStateFetched: _listener => {},
48
- setOnAppInstallStateChanged: _listener => {}
49
- },
50
- "app-viewport": {
51
- setApp: _app => {},
52
- setAppData: _appData => {}
53
- },
54
- "payment-method-settings": {
55
- setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
56
- },
57
- "capital-financing": {
58
- setDefaultFinancingOffer: _defaultFinancingOffer => {},
59
- setShowFinancingSelector: _showFinancingSelector => {},
60
- setFaqUrl: _faqUrl => {},
61
- setSupportUrl: _supportUrl => {},
62
- setOnFinancingsLoaded: _listener => {}
31
+ "payment-details": {
32
+ setPayment: _payment => {},
33
+ setOnClose: _listener => {}
63
34
  },
64
- "capital-financing-application": {
65
- setOnApplicationSubmitted: _listener => {}
35
+ "tax-settings": {
36
+ setHideProductTaxCodeSelector: _hidden => {},
37
+ setDisplayHeadOfficeCountries: _countries => {},
38
+ setOnTaxSettingsUpdated: _listener => {}
66
39
  },
67
- "capital-financing-promotion": {
68
- setLayout: _layout => {},
69
- setOnApplicationSubmitted: _listener => {},
70
- setOnEligibleFinancingOfferLoaded: _listener => {}
40
+ "tax-registrations": {
41
+ setOnAfterTaxRegistrationAdded: _listener => {},
42
+ setDisplayCountries: _countries => {}
71
43
  }
72
44
  };
73
45
 
74
46
  const componentNameMapping = {
47
+ "account-onboarding": "stripe-connect-account-onboarding",
75
48
  payments: "stripe-connect-payments",
76
- payouts: "stripe-connect-payouts",
77
49
  "payment-details": "stripe-connect-payment-details",
78
- "account-onboarding": "stripe-connect-account-onboarding",
79
- "payment-method-settings": "stripe-connect-payment-method-settings",
50
+ payouts: "stripe-connect-payouts",
51
+ "payouts-list": "stripe-connect-payouts-list",
52
+ balances: "stripe-connect-balances",
80
53
  "account-management": "stripe-connect-account-management",
81
54
  "notification-banner": "stripe-connect-notification-banner",
82
- "instant-payouts": "stripe-connect-instant-payouts",
83
- "issuing-card": "stripe-connect-issuing-card",
84
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
85
- "financial-account": "stripe-connect-financial-account",
86
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
87
- "capital-financing": "stripe-connect-capital-financing",
88
- "capital-financing-application": "stripe-connect-capital-financing-application",
89
- "capital-financing-promotion": "stripe-connect-capital-financing-promotion",
90
- "capital-overview": "stripe-connect-capital-overview",
91
55
  documents: "stripe-connect-documents",
92
56
  "tax-registrations": "stripe-connect-tax-registrations",
93
- "tax-settings": "stripe-connect-tax-settings",
94
- balances: "stripe-connect-balances",
95
- "payouts-list": "stripe-connect-payouts-list",
96
- "app-install": "stripe-connect-app-install",
97
- "app-viewport": "stripe-connect-app-viewport"
57
+ "tax-settings": "stripe-connect-tax-settings"
98
58
  };
99
59
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
100
60
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
101
61
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
102
62
  const findScript = () => {
103
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
63
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
104
64
  };
105
65
  const injectScript = () => {
106
66
  const script = document.createElement("script");
@@ -237,7 +197,7 @@ const createWrapper = stripeConnect => {
237
197
  sdk: true,
238
198
  sdkOptions: {
239
199
  // This will be replaced by the npm package version when bundling
240
- sdkVersion: "3.3.17-beta-1"
200
+ sdkVersion: "3.3.16"
241
201
  }
242
202
  })
243
203
  }));
@@ -1,6 +1,6 @@
1
1
  import { 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-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-capital-financing" | "stripe-connect-capital-financing-application" | "stripe-connect-capital-financing-promotion" | "stripe-connect-capital-overview" | "stripe-connect-documents" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-balances" | "stripe-connect-payouts-list" | "stripe-connect-app-install" | "stripe-connect-app-viewport";
3
+ type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "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>;
@@ -1,23 +1,39 @@
1
- export type FetchEphemeralKeyFunction = (fetchParams: {
2
- issuingCard: string;
3
- nonce: string;
4
- }) => Promise<{
5
- issuingCard: string;
6
- nonce: string;
7
- ephemeralKeySecret: string;
8
- }>;
9
1
  export type CollectionOptions = {
10
2
  fields: "currently_due" | "eventually_due";
11
3
  futureRequirements?: "omit" | "include";
12
4
  };
5
+ export type Status = "blocked" | "canceled" | "disputed" | "early_fraud_warning" | "failed" | "incomplete" | "partially_refunded" | "pending" | "refund_pending" | "refunded" | "successful" | "uncaptured";
6
+ 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";
7
+ export type PaymentsListDefaultFilters = {
8
+ amount?: {
9
+ equals: number;
10
+ } | {
11
+ greaterThan: number;
12
+ } | {
13
+ lessThan: number;
14
+ } | {
15
+ between: {
16
+ lowerBound: number;
17
+ upperBound: number;
18
+ };
19
+ };
20
+ date?: {
21
+ before: Date;
22
+ } | {
23
+ after: Date;
24
+ } | {
25
+ between: {
26
+ start: Date;
27
+ end: Date;
28
+ };
29
+ };
30
+ status?: Array<Status>;
31
+ paymentMethod?: PaymentMethod;
32
+ };
13
33
  export type NotificationCount = {
14
34
  total: number;
15
35
  actionRequired: number;
16
36
  };
17
- export type InstallState = {
18
- appId: string;
19
- state: "INSTALLED" | "UNINSTALLED";
20
- };
21
37
  export type LoaderStart = {
22
38
  elementTagName: string;
23
39
  };
@@ -25,14 +41,13 @@ export type LoadError = {
25
41
  elementTagName: string;
26
42
  error: EmbeddedError;
27
43
  };
44
+ export type StepChange = {
45
+ step: string;
46
+ };
28
47
  export type EmbeddedError = {
29
48
  type: EmbeddedErrorType;
30
49
  message?: string;
31
50
  };
32
- export type FinancingProductType = {
33
- productType: "standard" | "refill" | "none";
34
- };
35
- export type FinancingPromotionLayoutType = "full" | "banner";
36
51
  export type EmbeddedErrorType =
37
52
  /**
38
53
  * Failure to connect to Stripe's API.
@@ -63,10 +78,6 @@ export declare const ConnectElementCommonMethodConfig: {
63
78
  setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
64
79
  };
65
80
  export declare const ConnectElementCustomMethodConfig: {
66
- "payment-details": {
67
- setPayment: (_payment: string | undefined) => void;
68
- setOnClose: (_listener: (() => void) | undefined) => void;
69
- };
70
81
  "account-onboarding": {
71
82
  setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
72
83
  setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
@@ -74,6 +85,7 @@ export declare const ConnectElementCustomMethodConfig: {
74
85
  setSkipTermsOfServiceCollection: (_skipTermsOfServiceCollection: boolean | undefined) => void;
75
86
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
76
87
  setOnExit: (_listener: (() => void) | undefined) => void;
88
+ setOnStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
77
89
  };
78
90
  "account-management": {
79
91
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
@@ -82,47 +94,24 @@ export declare const ConnectElementCustomMethodConfig: {
82
94
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
83
95
  setOnNotificationsChange: (_listener: (({ total, actionRequired }: NotificationCount) => void) | undefined) => void;
84
96
  };
85
- "issuing-card": {
86
- setDefaultCard: (_defaultCard: string | undefined) => void;
87
- setCardSwitching: (_cardSwitching: boolean | undefined) => void;
88
- setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
97
+ payments: {
98
+ setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
89
99
  };
90
- "issuing-cards-list": {
91
- setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
92
- };
93
- "financial-account": {
94
- setFinancialAccount: (_financialAccount: string) => void;
95
- };
96
- "financial-account-transactions": {
97
- setFinancialAccount: (_financialAccount: string) => void;
98
- };
99
- "app-install": {
100
- setApp: (_app: string | undefined) => void;
101
- setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
102
- setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
103
- };
104
- "app-viewport": {
105
- setApp: (_app: string | undefined) => void;
106
- setAppData: (_appData: Record<string, string> | undefined) => void;
107
- };
108
- "payment-method-settings": {
109
- setPaymentMethodConfiguration: (_paymentMethodConfiguration: string | undefined) => void;
100
+ "payment-details": {
101
+ setPayment: (_payment: string | undefined) => void;
102
+ setOnClose: (_listener: (() => void) | undefined) => void;
110
103
  };
111
- "capital-financing": {
112
- setDefaultFinancingOffer: (_defaultFinancingOffer: string | undefined) => void;
113
- setShowFinancingSelector: (_showFinancingSelector: boolean | undefined) => void;
114
- setFaqUrl: (_faqUrl: string | undefined) => void;
115
- setSupportUrl: (_supportUrl: string | undefined) => void;
116
- setOnFinancingsLoaded: (_listener: (({ total }: {
117
- total: number;
104
+ "tax-settings": {
105
+ setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
106
+ setDisplayHeadOfficeCountries: (_countries: string[] | undefined) => void;
107
+ setOnTaxSettingsUpdated: (_listener: (({ id }: {
108
+ id: string;
118
109
  }) => void) | undefined) => void;
119
110
  };
120
- "capital-financing-application": {
121
- setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
122
- };
123
- "capital-financing-promotion": {
124
- setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
125
- setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
126
- setOnEligibleFinancingOfferLoaded: (_listener: (({ productType }: FinancingProductType) => void) | undefined) => void;
111
+ "tax-registrations": {
112
+ setOnAfterTaxRegistrationAdded: (_listener: (({ id }: {
113
+ id: string;
114
+ }) => void) | undefined) => void;
115
+ setDisplayCountries: (_countries: string[] | undefined) => void;
127
116
  };
128
117
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.3.17-beta-1",
3
+ "version": "3.3.17",
4
4
  "description": "Connect.js loading utility package",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
@@ -59,7 +59,7 @@
59
59
  "jest-environment-jsdom": "^29.5.0",
60
60
  "prettier": "^1.19.1",
61
61
  "rimraf": "^2.6.2",
62
- "rollup": "^1.29.0",
62
+ "rollup": "^2.79.2",
63
63
  "rollup-plugin-babel": "^4.4.0",
64
64
  "rollup-plugin-typescript2": "^0.25.3",
65
65
  "ts-jest": "^29.1.0",
package/src/shared.ts CHANGED
@@ -13,60 +13,34 @@ export type LoadConnectAndInitialize = (
13
13
  initParams: IStripeConnectInitParams
14
14
  ) => StripeConnectInstance;
15
15
 
16
- export type ConnectElementHTMLName =
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
- | "stripe-connect-issuing-card"
26
- | "stripe-connect-issuing-cards-list"
27
- | "stripe-connect-financial-account"
28
- | "stripe-connect-financial-account-transactions"
29
- | "stripe-connect-capital-financing"
30
- | "stripe-connect-capital-financing-application"
31
- | "stripe-connect-capital-financing-promotion"
32
- | "stripe-connect-capital-overview"
22
+ | "stripe-connect-payouts"
23
+ | "stripe-connect-payouts-list"
24
+ | "stripe-connect-balances"
33
25
  | "stripe-connect-documents"
34
26
  | "stripe-connect-tax-registrations"
35
- | "stripe-connect-tax-settings"
36
- | "stripe-connect-balances"
37
- | "stripe-connect-payouts-list"
38
- | "stripe-connect-app-install"
39
- | "stripe-connect-app-viewport";
27
+ | "stripe-connect-tax-settings";
40
28
 
41
29
  export const componentNameMapping: Record<
42
30
  ConnectElementTagName,
43
31
  ConnectElementHTMLName
44
32
  > = {
33
+ "account-onboarding": "stripe-connect-account-onboarding",
45
34
  payments: "stripe-connect-payments",
46
- payouts: "stripe-connect-payouts",
47
35
  "payment-details": "stripe-connect-payment-details",
48
- "account-onboarding": "stripe-connect-account-onboarding",
49
- "payment-method-settings": "stripe-connect-payment-method-settings",
36
+ payouts: "stripe-connect-payouts",
37
+ "payouts-list": "stripe-connect-payouts-list",
38
+ balances: "stripe-connect-balances",
50
39
  "account-management": "stripe-connect-account-management",
51
40
  "notification-banner": "stripe-connect-notification-banner",
52
- "instant-payouts": "stripe-connect-instant-payouts",
53
- "issuing-card": "stripe-connect-issuing-card",
54
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
55
- "financial-account": "stripe-connect-financial-account",
56
- "financial-account-transactions":
57
- "stripe-connect-financial-account-transactions",
58
- "capital-financing": "stripe-connect-capital-financing",
59
- "capital-financing-application":
60
- "stripe-connect-capital-financing-application",
61
- "capital-financing-promotion": "stripe-connect-capital-financing-promotion",
62
- "capital-overview": "stripe-connect-capital-overview",
63
41
  documents: "stripe-connect-documents",
64
42
  "tax-registrations": "stripe-connect-tax-registrations",
65
- "tax-settings": "stripe-connect-tax-settings",
66
- balances: "stripe-connect-balances",
67
- "payouts-list": "stripe-connect-payouts-list",
68
- "app-install": "stripe-connect-app-install",
69
- "app-viewport": "stripe-connect-app-viewport"
43
+ "tax-settings": "stripe-connect-tax-settings"
70
44
  };
71
45
 
72
46
  type StripeConnectInstanceExtended = StripeConnectInstance & {
@@ -85,10 +59,10 @@ const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
85
59
  export const findScript = (): HTMLScriptElement | null => {
86
60
  return (
87
61
  document.querySelectorAll<HTMLScriptElement>(
88
- `script[src="${V0_URL}"]`
62
+ `script[src="${V1_URL}"]`
89
63
  )[0] ||
90
64
  document.querySelectorAll<HTMLScriptElement>(
91
- `script[src="${V1_URL}"]`
65
+ `script[src="${V0_URL}"]`
92
66
  )[0] ||
93
67
  null
94
68
  );
package/types/config.ts CHANGED
@@ -1,30 +1,130 @@
1
1
  /* eslint-disable @typescript-eslint/no-empty-function */
2
2
  /* eslint-disable @typescript-eslint/no-unused-vars */
3
3
 
4
- export type FetchEphemeralKeyFunction = (fetchParams: {
5
- issuingCard: string;
6
- nonce: string;
7
- }) => Promise<{
8
- issuingCard: string;
9
- nonce: string;
10
- ephemeralKeySecret: string;
11
- }>;
12
-
13
4
  export type CollectionOptions = {
14
5
  fields: "currently_due" | "eventually_due";
15
6
  futureRequirements?: "omit" | "include";
16
7
  };
17
8
 
9
+ export type Status =
10
+ | "blocked"
11
+ | "canceled"
12
+ | "disputed"
13
+ | "early_fraud_warning"
14
+ | "failed"
15
+ | "incomplete"
16
+ | "partially_refunded"
17
+ | "pending"
18
+ | "refund_pending"
19
+ | "refunded"
20
+ | "successful"
21
+ | "uncaptured";
22
+
23
+ export type PaymentMethod =
24
+ | "ach_credit_transfer"
25
+ | "ach_debit"
26
+ | "acss_debit"
27
+ | "affirm"
28
+ | "afterpay_clearpay"
29
+ | "alipay"
30
+ | "alma"
31
+ | "amazon_pay"
32
+ | "amex_express_checkout"
33
+ | "android_pay"
34
+ | "apple_pay"
35
+ | "au_becs_debit"
36
+ | "nz_bank_account"
37
+ | "bancontact"
38
+ | "bacs_debit"
39
+ | "bitcoin_source"
40
+ | "bitcoin"
41
+ | "blik"
42
+ | "boleto"
43
+ | "boleto_pilot"
44
+ | "card_present"
45
+ | "card"
46
+ | "cashapp"
47
+ | "crypto"
48
+ | "customer_balance"
49
+ | "demo_pay"
50
+ | "dummy_passthrough_card"
51
+ | "gbp_credit_transfer"
52
+ | "google_pay"
53
+ | "eps"
54
+ | "fpx"
55
+ | "giropay"
56
+ | "grabpay"
57
+ | "ideal"
58
+ | "id_bank_transfer"
59
+ | "id_credit_transfer"
60
+ | "jp_credit_transfer"
61
+ | "interac_present"
62
+ | "kakao_pay"
63
+ | "klarna"
64
+ | "konbini"
65
+ | "kr_card"
66
+ | "kr_market"
67
+ | "link"
68
+ | "masterpass"
69
+ | "mb_way"
70
+ | "meta_pay"
71
+ | "multibanco"
72
+ | "mobilepay"
73
+ | "naver_pay"
74
+ | "netbanking"
75
+ | "ng_bank"
76
+ | "ng_bank_transfer"
77
+ | "ng_card"
78
+ | "ng_market"
79
+ | "ng_ussd"
80
+ | "vipps"
81
+ | "oxxo"
82
+ | "p24"
83
+ | "payto"
84
+ | "pay_by_bank"
85
+ | "paper_check"
86
+ | "payco"
87
+ | "paynow"
88
+ | "paypal"
89
+ | "pix"
90
+ | "promptpay"
91
+ | "revolut_pay"
92
+ | "samsung_pay"
93
+ | "sepa_credit_transfer"
94
+ | "sepa_debit"
95
+ | "sofort"
96
+ | "south_korea_market"
97
+ | "swish"
98
+ | "three_d_secure"
99
+ | "three_d_secure_2"
100
+ | "three_d_secure_2_eap"
101
+ | "twint"
102
+ | "upi"
103
+ | "us_bank_account"
104
+ | "visa_checkout"
105
+ | "wechat"
106
+ | "wechat_pay"
107
+ | "zip";
108
+
109
+ export type PaymentsListDefaultFilters = {
110
+ amount?:
111
+ | { equals: number }
112
+ | { greaterThan: number }
113
+ | { lessThan: number }
114
+ | { between: { lowerBound: number; upperBound: number } };
115
+ date?:
116
+ | { before: Date }
117
+ | { after: Date }
118
+ | { between: { start: Date; end: Date } };
119
+ status?: Array<Status>;
120
+ paymentMethod?: PaymentMethod;
121
+ };
122
+
18
123
  export type NotificationCount = {
19
124
  total: number;
20
125
  actionRequired: number;
21
126
  };
22
127
 
23
- export type InstallState = {
24
- appId: string;
25
- state: "INSTALLED" | "UNINSTALLED";
26
- };
27
-
28
128
  export type LoaderStart = {
29
129
  elementTagName: string;
30
130
  };
@@ -34,17 +134,15 @@ export type LoadError = {
34
134
  error: EmbeddedError;
35
135
  };
36
136
 
137
+ export type StepChange = {
138
+ step: string;
139
+ };
140
+
37
141
  export type EmbeddedError = {
38
142
  type: EmbeddedErrorType;
39
143
  message?: string;
40
144
  };
41
145
 
42
- export type FinancingProductType = {
43
- productType: "standard" | "refill" | "none";
44
- };
45
-
46
- export type FinancingPromotionLayoutType = "full" | "banner";
47
-
48
146
  export type EmbeddedErrorType =
49
147
  /**
50
148
  * Failure to connect to Stripe's API.
@@ -81,10 +179,6 @@ export const ConnectElementCommonMethodConfig = {
81
179
  };
82
180
 
83
181
  export const ConnectElementCustomMethodConfig = {
84
- "payment-details": {
85
- setPayment: (_payment: string | undefined): void => {},
86
- setOnClose: (_listener: (() => void) | undefined): void => {}
87
- },
88
182
  "account-onboarding": {
89
183
  setFullTermsOfServiceUrl: (
90
184
  _termOfServiceUrl: string | undefined
@@ -99,7 +193,10 @@ export const ConnectElementCustomMethodConfig = {
99
193
  setCollectionOptions: (
100
194
  _collectionOptions: CollectionOptions | undefined
101
195
  ): void => {},
102
- setOnExit: (_listener: (() => void) | undefined): void => {}
196
+ setOnExit: (_listener: (() => void) | undefined): void => {},
197
+ setOnStepChange: (
198
+ _listener: (({ step }: StepChange) => void) | undefined
199
+ ): void => {}
103
200
  },
104
201
  "account-management": {
105
202
  setCollectionOptions: (
@@ -116,65 +213,28 @@ export const ConnectElementCustomMethodConfig = {
116
213
  | undefined
117
214
  ): void => {}
118
215
  },
119
- "issuing-card": {
120
- setDefaultCard: (_defaultCard: string | undefined): void => {},
121
- setCardSwitching: (_cardSwitching: boolean | undefined): void => {},
122
- setFetchEphemeralKey: (
123
- _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
124
- ): void => {}
125
- },
126
- "issuing-cards-list": {
127
- setFetchEphemeralKey: (
128
- _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
129
- ): void => {}
130
- },
131
- "financial-account": {
132
- setFinancialAccount: (_financialAccount: string): void => {}
133
- },
134
- "financial-account-transactions": {
135
- setFinancialAccount: (_financialAccount: string): void => {}
136
- },
137
- "app-install": {
138
- setApp: (_app: string | undefined): void => {},
139
- setOnAppInstallStateFetched: (
140
- _listener: (({ appId, state }: InstallState) => void) | undefined
141
- ): void => {},
142
- setOnAppInstallStateChanged: (
143
- _listener: (({ appId, state }: InstallState) => void) | undefined
216
+ payments: {
217
+ setDefaultFilters: (
218
+ _filters: PaymentsListDefaultFilters | undefined
144
219
  ): void => {}
145
220
  },
146
- "app-viewport": {
147
- setApp: (_app: string | undefined): void => {},
148
- setAppData: (_appData: Record<string, string> | undefined): void => {}
149
- },
150
- "payment-method-settings": {
151
- setPaymentMethodConfiguration: (
152
- _paymentMethodConfiguration: string | undefined
153
- ): void => {}
221
+ "payment-details": {
222
+ setPayment: (_payment: string | undefined): void => {},
223
+ setOnClose: (_listener: (() => void) | undefined): void => {}
154
224
  },
155
- "capital-financing": {
156
- setDefaultFinancingOffer: (
157
- _defaultFinancingOffer: string | undefined
158
- ): void => {},
159
- setShowFinancingSelector: (
160
- _showFinancingSelector: boolean | undefined
225
+ "tax-settings": {
226
+ setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
227
+ setDisplayHeadOfficeCountries: (
228
+ _countries: string[] | undefined
161
229
  ): void => {},
162
- setFaqUrl: (_faqUrl: string | undefined): void => {},
163
- setSupportUrl: (_supportUrl: string | undefined): void => {},
164
- setOnFinancingsLoaded: (
165
- _listener: (({ total }: { total: number }) => void) | undefined
230
+ setOnTaxSettingsUpdated: (
231
+ _listener: (({ id }: { id: string }) => void) | undefined
166
232
  ): void => {}
167
233
  },
168
- "capital-financing-application": {
169
- setOnApplicationSubmitted: (_listener: (() => void) | undefined): void => {}
170
- },
171
- "capital-financing-promotion": {
172
- setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
173
- setOnApplicationSubmitted: (
174
- _listener: (() => void) | undefined
234
+ "tax-registrations": {
235
+ setOnAfterTaxRegistrationAdded: (
236
+ _listener: (({ id }: { id: string }) => void) | undefined
175
237
  ): void => {},
176
- setOnEligibleFinancingOfferLoaded: (
177
- _listener: (({ productType }: FinancingProductType) => void) | undefined
178
- ): void => {}
238
+ setDisplayCountries: (_countries: string[] | undefined): void => {}
179
239
  }
180
240
  };
package/types/shared.d.ts CHANGED
@@ -2,6 +2,7 @@ import {
2
2
  ConnectElementCustomMethodConfig,
3
3
  ConnectElementCommonMethodConfig
4
4
  } from "./config";
5
+
5
6
  export declare type LoadConnectAndInitialize = (
6
7
  initParams: IStripeConnectInitParams
7
8
  ) => StripeConnectInstance;
@@ -150,10 +151,42 @@ export declare type AppearanceVariables = {
150
151
  * The color used for primary actions and links. This accepts hex values or RGB/HSL strings.
151
152
  */
152
153
  actionPrimaryColorText?: string;
154
+ /**
155
+ * The line type used for text decoration of primary actions and links. This accepts a valid text decoration line value.
156
+ */
157
+ actionPrimaryTextDecorationLine?: string;
158
+ /**
159
+ * The color used for text decoration of primary actions and links. This accepts hex values or RGB/HSL strings.
160
+ */
161
+ actionPrimaryTextDecorationColor?: string;
162
+ /**
163
+ * The style of text decoration of primary actions and links. This accepts a valid text decoration style value.
164
+ */
165
+ actionPrimaryTextDecorationStyle?: string;
166
+ /**
167
+ * The thickness of text decoration of primary actions and links. This accepts a valid text decoration thickness value.
168
+ */
169
+ actionPrimaryTextDecorationThickness?: string;
153
170
  /**
154
171
  * The color used for secondary actions and links. This accepts hex values or RGB/HSL strings.
155
172
  */
156
173
  actionSecondaryColorText?: string;
174
+ /**
175
+ * The line type used for text decoration of secondary actions and links. This accepts a valid text decoration line value.
176
+ */
177
+ actionSecondaryTextDecorationLine?: string;
178
+ /**
179
+ * The color used for text decoration of secondary actions and links. This accepts hex values or RGB/HSL strings.
180
+ */
181
+ actionSecondaryTextDecorationColor?: string;
182
+ /**
183
+ * The style of text decoration of secondary actions and links. This accepts a valid text decoration style value.
184
+ */
185
+ actionSecondaryTextDecorationStyle?: string;
186
+ /**
187
+ * The thickness of text decoration of secondary actions and links. This accepts a valid text decoration thickness value.
188
+ */
189
+ actionSecondaryTextDecorationThickness?: string;
157
190
 
158
191
  // Neutral Badge Colors
159
192
  /**
@@ -261,6 +294,10 @@ export declare type AppearanceVariables = {
261
294
  * A z-index to use for the overlay throughout embedded components. Set this number to control the z-order of the overlay.
262
295
  */
263
296
  overlayZIndex?: number;
297
+ /**
298
+ * The backdrop color when an overlay is opened. This accepts hex values or RGB/RGBA/HSL strings.
299
+ */
300
+ overlayBackdropColor?: string;
264
301
 
265
302
  // Body Typography
266
303
  /**
@@ -451,26 +488,14 @@ export interface StripeConnectInstance {
451
488
  * Tagnames to be used with the `create` method of the Connect instance.
452
489
  */
453
490
  export type ConnectElementTagName =
491
+ | "account-onboarding"
454
492
  | "payments"
455
- | "payouts"
456
493
  | "payment-details"
457
- | "account-onboarding"
458
- | "payment-method-settings"
459
494
  | "account-management"
460
495
  | "notification-banner"
461
- | "instant-payouts"
462
- | "issuing-card"
463
- | "issuing-cards-list"
464
- | "financial-account"
465
- | "financial-account-transactions"
466
- | "capital-financing"
467
- | "capital-financing-application"
468
- | "capital-financing-promotion"
469
- | "capital-overview"
496
+ | "payouts"
497
+ | "payouts-list"
498
+ | "balances"
470
499
  | "documents"
471
500
  | "tax-registrations"
472
- | "tax-settings"
473
- | "balances"
474
- | "payouts-list"
475
- | "app-install"
476
- | "app-viewport";
501
+ | "tax-settings";