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

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,60 +21,39 @@ const ConnectElementCustomMethodConfig = {
24
21
  setCollectionOptions: _collectionOptions => {},
25
22
  setOnNotificationsChange: _listener => {}
26
23
  },
27
- "issuing-card": {
28
- setDefaultCard: _defaultCard => {},
29
- setCardArtFileLink: _cardArtFileLink => {},
30
- setCardSwitching: _cardSwitching => {},
31
- setFetchEphemeralKey: _fetchEphemeralKey => {}
32
- },
33
- "issuing-cards-list": {
34
- setCardArtFileLink: _cardArtFileLink => {},
35
- setFetchEphemeralKey: _fetchEphemeralKey => {}
36
- },
37
- "financial-account": {
38
- setFinancialAccount: _financialAccount => {}
39
- },
40
- "financial-account-transactions": {
41
- setFinancialAccount: _financialAccount => {}
24
+ "payment-details": {
25
+ setPayment: _payment => {},
26
+ setOnClose: _listener => {}
42
27
  },
43
- "app-install": {
44
- setApp: _app => {},
45
- setOnAppInstallStateFetched: _listener => {},
46
- setOnAppInstallStateChanged: _listener => {}
28
+ "tax-settings": {
29
+ setHideProductTaxCodeSelector: _hidden => {},
30
+ setDisplayHeadOfficeCountries: _countries => {},
31
+ setOnTaxSettingsUpdated: _listener => {}
47
32
  },
48
- "app-viewport": {
49
- setApp: _app => {},
50
- setAppData: _appData => {}
33
+ "tax-registrations": {
34
+ setOnAfterTaxRegistrationAdded: _listener => {},
35
+ setDisplayCountries: _countries => {}
51
36
  }
52
37
  };
53
38
 
54
39
  const componentNameMapping = {
40
+ "account-onboarding": "stripe-connect-account-onboarding",
55
41
  payments: "stripe-connect-payments",
56
- payouts: "stripe-connect-payouts",
57
42
  "payment-details": "stripe-connect-payment-details",
58
- "account-onboarding": "stripe-connect-account-onboarding",
59
- "payment-method-settings": "stripe-connect-payment-method-settings",
43
+ payouts: "stripe-connect-payouts",
44
+ "payouts-list": "stripe-connect-payouts-list",
45
+ balances: "stripe-connect-balances",
60
46
  "account-management": "stripe-connect-account-management",
61
47
  "notification-banner": "stripe-connect-notification-banner",
62
- "instant-payouts": "stripe-connect-instant-payouts",
63
- "issuing-card": "stripe-connect-issuing-card",
64
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
65
- "financial-account": "stripe-connect-financial-account",
66
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
67
- "capital-overview": "stripe-connect-capital-overview",
68
48
  documents: "stripe-connect-documents",
69
49
  "tax-registrations": "stripe-connect-tax-registrations",
70
- "tax-settings": "stripe-connect-tax-settings",
71
- balances: "stripe-connect-balances",
72
- "payouts-list": "stripe-connect-payouts-list",
73
- "app-install": "stripe-connect-app-install",
74
- "app-viewport": "stripe-connect-app-viewport"
50
+ "tax-settings": "stripe-connect-tax-settings"
75
51
  };
76
52
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
77
53
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
78
54
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
79
55
  const findScript = () => {
80
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
56
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
81
57
  };
82
58
  const injectScript = () => {
83
59
  const script = document.createElement("script");
@@ -214,7 +190,7 @@ const createWrapper = stripeConnect => {
214
190
  sdk: true,
215
191
  sdkOptions: {
216
192
  // This will be replaced by the npm package version when bundling
217
- sdkVersion: "3.3.14-beta-1"
193
+ sdkVersion: "3.3.14"
218
194
  }
219
195
  })
220
196
  }));
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,60 +25,39 @@ const ConnectElementCustomMethodConfig = {
28
25
  setCollectionOptions: _collectionOptions => {},
29
26
  setOnNotificationsChange: _listener => {}
30
27
  },
31
- "issuing-card": {
32
- setDefaultCard: _defaultCard => {},
33
- setCardArtFileLink: _cardArtFileLink => {},
34
- setCardSwitching: _cardSwitching => {},
35
- setFetchEphemeralKey: _fetchEphemeralKey => {}
36
- },
37
- "issuing-cards-list": {
38
- setCardArtFileLink: _cardArtFileLink => {},
39
- setFetchEphemeralKey: _fetchEphemeralKey => {}
40
- },
41
- "financial-account": {
42
- setFinancialAccount: _financialAccount => {}
43
- },
44
- "financial-account-transactions": {
45
- setFinancialAccount: _financialAccount => {}
28
+ "payment-details": {
29
+ setPayment: _payment => {},
30
+ setOnClose: _listener => {}
46
31
  },
47
- "app-install": {
48
- setApp: _app => {},
49
- setOnAppInstallStateFetched: _listener => {},
50
- setOnAppInstallStateChanged: _listener => {}
32
+ "tax-settings": {
33
+ setHideProductTaxCodeSelector: _hidden => {},
34
+ setDisplayHeadOfficeCountries: _countries => {},
35
+ setOnTaxSettingsUpdated: _listener => {}
51
36
  },
52
- "app-viewport": {
53
- setApp: _app => {},
54
- setAppData: _appData => {}
37
+ "tax-registrations": {
38
+ setOnAfterTaxRegistrationAdded: _listener => {},
39
+ setDisplayCountries: _countries => {}
55
40
  }
56
41
  };
57
42
 
58
43
  const componentNameMapping = {
44
+ "account-onboarding": "stripe-connect-account-onboarding",
59
45
  payments: "stripe-connect-payments",
60
- payouts: "stripe-connect-payouts",
61
46
  "payment-details": "stripe-connect-payment-details",
62
- "account-onboarding": "stripe-connect-account-onboarding",
63
- "payment-method-settings": "stripe-connect-payment-method-settings",
47
+ payouts: "stripe-connect-payouts",
48
+ "payouts-list": "stripe-connect-payouts-list",
49
+ balances: "stripe-connect-balances",
64
50
  "account-management": "stripe-connect-account-management",
65
51
  "notification-banner": "stripe-connect-notification-banner",
66
- "instant-payouts": "stripe-connect-instant-payouts",
67
- "issuing-card": "stripe-connect-issuing-card",
68
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
69
- "financial-account": "stripe-connect-financial-account",
70
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
71
- "capital-overview": "stripe-connect-capital-overview",
72
52
  documents: "stripe-connect-documents",
73
53
  "tax-registrations": "stripe-connect-tax-registrations",
74
- "tax-settings": "stripe-connect-tax-settings",
75
- balances: "stripe-connect-balances",
76
- "payouts-list": "stripe-connect-payouts-list",
77
- "app-install": "stripe-connect-app-install",
78
- "app-viewport": "stripe-connect-app-viewport"
54
+ "tax-settings": "stripe-connect-tax-settings"
79
55
  };
80
56
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
81
57
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
82
58
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
83
59
  const findScript = () => {
84
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
60
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
85
61
  };
86
62
  const injectScript = () => {
87
63
  const script = document.createElement("script");
@@ -218,7 +194,7 @@ const createWrapper = stripeConnect => {
218
194
  sdk: true,
219
195
  sdkOptions: {
220
196
  // This will be replaced by the npm package version when bundling
221
- sdkVersion: "3.3.14-beta-1"
197
+ sdkVersion: "3.3.14"
222
198
  }
223
199
  })
224
200
  }));
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,60 +21,39 @@ const ConnectElementCustomMethodConfig = {
24
21
  setCollectionOptions: _collectionOptions => {},
25
22
  setOnNotificationsChange: _listener => {}
26
23
  },
27
- "issuing-card": {
28
- setDefaultCard: _defaultCard => {},
29
- setCardArtFileLink: _cardArtFileLink => {},
30
- setCardSwitching: _cardSwitching => {},
31
- setFetchEphemeralKey: _fetchEphemeralKey => {}
32
- },
33
- "issuing-cards-list": {
34
- setCardArtFileLink: _cardArtFileLink => {},
35
- setFetchEphemeralKey: _fetchEphemeralKey => {}
36
- },
37
- "financial-account": {
38
- setFinancialAccount: _financialAccount => {}
39
- },
40
- "financial-account-transactions": {
41
- setFinancialAccount: _financialAccount => {}
24
+ "payment-details": {
25
+ setPayment: _payment => {},
26
+ setOnClose: _listener => {}
42
27
  },
43
- "app-install": {
44
- setApp: _app => {},
45
- setOnAppInstallStateFetched: _listener => {},
46
- setOnAppInstallStateChanged: _listener => {}
28
+ "tax-settings": {
29
+ setHideProductTaxCodeSelector: _hidden => {},
30
+ setDisplayHeadOfficeCountries: _countries => {},
31
+ setOnTaxSettingsUpdated: _listener => {}
47
32
  },
48
- "app-viewport": {
49
- setApp: _app => {},
50
- setAppData: _appData => {}
33
+ "tax-registrations": {
34
+ setOnAfterTaxRegistrationAdded: _listener => {},
35
+ setDisplayCountries: _countries => {}
51
36
  }
52
37
  };
53
38
 
54
39
  const componentNameMapping = {
40
+ "account-onboarding": "stripe-connect-account-onboarding",
55
41
  payments: "stripe-connect-payments",
56
- payouts: "stripe-connect-payouts",
57
42
  "payment-details": "stripe-connect-payment-details",
58
- "account-onboarding": "stripe-connect-account-onboarding",
59
- "payment-method-settings": "stripe-connect-payment-method-settings",
43
+ payouts: "stripe-connect-payouts",
44
+ "payouts-list": "stripe-connect-payouts-list",
45
+ balances: "stripe-connect-balances",
60
46
  "account-management": "stripe-connect-account-management",
61
47
  "notification-banner": "stripe-connect-notification-banner",
62
- "instant-payouts": "stripe-connect-instant-payouts",
63
- "issuing-card": "stripe-connect-issuing-card",
64
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
65
- "financial-account": "stripe-connect-financial-account",
66
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
67
- "capital-overview": "stripe-connect-capital-overview",
68
48
  documents: "stripe-connect-documents",
69
49
  "tax-registrations": "stripe-connect-tax-registrations",
70
- "tax-settings": "stripe-connect-tax-settings",
71
- balances: "stripe-connect-balances",
72
- "payouts-list": "stripe-connect-payouts-list",
73
- "app-install": "stripe-connect-app-install",
74
- "app-viewport": "stripe-connect-app-viewport"
50
+ "tax-settings": "stripe-connect-tax-settings"
75
51
  };
76
52
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
77
53
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
78
54
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
79
55
  const findScript = () => {
80
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
56
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
81
57
  };
82
58
  const injectScript = () => {
83
59
  const script = document.createElement("script");
@@ -214,7 +190,7 @@ const createWrapper = stripeConnect => {
214
190
  sdk: true,
215
191
  sdkOptions: {
216
192
  // This will be replaced by the npm package version when bundling
217
- sdkVersion: "3.3.14-beta-1"
193
+ sdkVersion: "3.3.14"
218
194
  }
219
195
  })
220
196
  }));
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,60 +25,39 @@ const ConnectElementCustomMethodConfig = {
28
25
  setCollectionOptions: _collectionOptions => {},
29
26
  setOnNotificationsChange: _listener => {}
30
27
  },
31
- "issuing-card": {
32
- setDefaultCard: _defaultCard => {},
33
- setCardArtFileLink: _cardArtFileLink => {},
34
- setCardSwitching: _cardSwitching => {},
35
- setFetchEphemeralKey: _fetchEphemeralKey => {}
36
- },
37
- "issuing-cards-list": {
38
- setCardArtFileLink: _cardArtFileLink => {},
39
- setFetchEphemeralKey: _fetchEphemeralKey => {}
40
- },
41
- "financial-account": {
42
- setFinancialAccount: _financialAccount => {}
43
- },
44
- "financial-account-transactions": {
45
- setFinancialAccount: _financialAccount => {}
28
+ "payment-details": {
29
+ setPayment: _payment => {},
30
+ setOnClose: _listener => {}
46
31
  },
47
- "app-install": {
48
- setApp: _app => {},
49
- setOnAppInstallStateFetched: _listener => {},
50
- setOnAppInstallStateChanged: _listener => {}
32
+ "tax-settings": {
33
+ setHideProductTaxCodeSelector: _hidden => {},
34
+ setDisplayHeadOfficeCountries: _countries => {},
35
+ setOnTaxSettingsUpdated: _listener => {}
51
36
  },
52
- "app-viewport": {
53
- setApp: _app => {},
54
- setAppData: _appData => {}
37
+ "tax-registrations": {
38
+ setOnAfterTaxRegistrationAdded: _listener => {},
39
+ setDisplayCountries: _countries => {}
55
40
  }
56
41
  };
57
42
 
58
43
  const componentNameMapping = {
44
+ "account-onboarding": "stripe-connect-account-onboarding",
59
45
  payments: "stripe-connect-payments",
60
- payouts: "stripe-connect-payouts",
61
46
  "payment-details": "stripe-connect-payment-details",
62
- "account-onboarding": "stripe-connect-account-onboarding",
63
- "payment-method-settings": "stripe-connect-payment-method-settings",
47
+ payouts: "stripe-connect-payouts",
48
+ "payouts-list": "stripe-connect-payouts-list",
49
+ balances: "stripe-connect-balances",
64
50
  "account-management": "stripe-connect-account-management",
65
51
  "notification-banner": "stripe-connect-notification-banner",
66
- "instant-payouts": "stripe-connect-instant-payouts",
67
- "issuing-card": "stripe-connect-issuing-card",
68
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
69
- "financial-account": "stripe-connect-financial-account",
70
- "financial-account-transactions": "stripe-connect-financial-account-transactions",
71
- "capital-overview": "stripe-connect-capital-overview",
72
52
  documents: "stripe-connect-documents",
73
53
  "tax-registrations": "stripe-connect-tax-registrations",
74
- "tax-settings": "stripe-connect-tax-settings",
75
- balances: "stripe-connect-balances",
76
- "payouts-list": "stripe-connect-payouts-list",
77
- "app-install": "stripe-connect-app-install",
78
- "app-viewport": "stripe-connect-app-viewport"
54
+ "tax-settings": "stripe-connect-tax-settings"
79
55
  };
80
56
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
81
57
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
82
58
  const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
83
59
  const findScript = () => {
84
- return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
60
+ return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
85
61
  };
86
62
  const injectScript = () => {
87
63
  const script = document.createElement("script");
@@ -218,7 +194,7 @@ const createWrapper = stripeConnect => {
218
194
  sdk: true,
219
195
  sdkOptions: {
220
196
  // This will be replaced by the npm package version when bundling
221
- sdkVersion: "3.3.14-beta-1"
197
+ sdkVersion: "3.3.14"
222
198
  }
223
199
  })
224
200
  }));
@@ -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-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,11 +1,3 @@
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";
@@ -14,10 +6,6 @@ export type NotificationCount = {
14
6
  total: number;
15
7
  actionRequired: number;
16
8
  };
17
- export type InstallState = {
18
- appId: string;
19
- state: "INSTALLED" | "UNINSTALLED";
20
- };
21
9
  export type LoaderStart = {
22
10
  elementTagName: string;
23
11
  };
@@ -25,6 +13,9 @@ export type LoadError = {
25
13
  elementTagName: string;
26
14
  error: EmbeddedError;
27
15
  };
16
+ export type StepChange = {
17
+ step: string;
18
+ };
28
19
  export type EmbeddedError = {
29
20
  type: EmbeddedErrorType;
30
21
  message?: string;
@@ -59,10 +50,6 @@ export declare const ConnectElementCommonMethodConfig: {
59
50
  setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
60
51
  };
61
52
  export declare const ConnectElementCustomMethodConfig: {
62
- "payment-details": {
63
- setPayment: (_payment: string | undefined) => void;
64
- setOnClose: (_listener: (() => void) | undefined) => void;
65
- };
66
53
  "account-onboarding": {
67
54
  setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
68
55
  setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
@@ -70,6 +57,7 @@ export declare const ConnectElementCustomMethodConfig: {
70
57
  setSkipTermsOfServiceCollection: (_skipTermsOfServiceCollection: boolean | undefined) => void;
71
58
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
72
59
  setOnExit: (_listener: (() => void) | undefined) => void;
60
+ setOnStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
73
61
  };
74
62
  "account-management": {
75
63
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
@@ -78,29 +66,21 @@ export declare const ConnectElementCustomMethodConfig: {
78
66
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
79
67
  setOnNotificationsChange: (_listener: (({ total, actionRequired }: NotificationCount) => void) | undefined) => void;
80
68
  };
81
- "issuing-card": {
82
- setDefaultCard: (_defaultCard: string | undefined) => void;
83
- setCardArtFileLink: (_cardArtFileLink: string | undefined) => void;
84
- setCardSwitching: (_cardSwitching: boolean | undefined) => void;
85
- setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
86
- };
87
- "issuing-cards-list": {
88
- setCardArtFileLink: (_cardArtFileLink: string | undefined) => void;
89
- setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
90
- };
91
- "financial-account": {
92
- setFinancialAccount: (_financialAccount: string) => void;
93
- };
94
- "financial-account-transactions": {
95
- setFinancialAccount: (_financialAccount: string) => void;
69
+ "payment-details": {
70
+ setPayment: (_payment: string | undefined) => void;
71
+ setOnClose: (_listener: (() => void) | undefined) => void;
96
72
  };
97
- "app-install": {
98
- setApp: (_app: string | undefined) => void;
99
- setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
100
- setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
73
+ "tax-settings": {
74
+ setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
75
+ setDisplayHeadOfficeCountries: (_countries: string[] | undefined) => void;
76
+ setOnTaxSettingsUpdated: (_listener: (({ id }: {
77
+ id: string;
78
+ }) => void) | undefined) => void;
101
79
  };
102
- "app-viewport": {
103
- setApp: (_app: string | undefined) => void;
104
- setAppData: (_appData: Record<string, string> | undefined) => void;
80
+ "tax-registrations": {
81
+ setOnAfterTaxRegistrationAdded: (_listener: (({ id }: {
82
+ id: string;
83
+ }) => void) | undefined) => void;
84
+ setDisplayCountries: (_countries: string[] | undefined) => void;
105
85
  };
106
86
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.3.14-beta-1",
3
+ "version": "3.3.14",
4
4
  "description": "Connect.js loading utility package",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
package/src/shared.ts CHANGED
@@ -13,53 +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-overview"
22
+ | "stripe-connect-payouts"
23
+ | "stripe-connect-payouts-list"
24
+ | "stripe-connect-balances"
30
25
  | "stripe-connect-documents"
31
26
  | "stripe-connect-tax-registrations"
32
- | "stripe-connect-tax-settings"
33
- | "stripe-connect-balances"
34
- | "stripe-connect-payouts-list"
35
- | "stripe-connect-app-install"
36
- | "stripe-connect-app-viewport";
27
+ | "stripe-connect-tax-settings";
37
28
 
38
29
  export const componentNameMapping: Record<
39
30
  ConnectElementTagName,
40
31
  ConnectElementHTMLName
41
32
  > = {
33
+ "account-onboarding": "stripe-connect-account-onboarding",
42
34
  payments: "stripe-connect-payments",
43
- payouts: "stripe-connect-payouts",
44
35
  "payment-details": "stripe-connect-payment-details",
45
- "account-onboarding": "stripe-connect-account-onboarding",
46
- "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",
47
39
  "account-management": "stripe-connect-account-management",
48
40
  "notification-banner": "stripe-connect-notification-banner",
49
- "instant-payouts": "stripe-connect-instant-payouts",
50
- "issuing-card": "stripe-connect-issuing-card",
51
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
52
- "financial-account": "stripe-connect-financial-account",
53
- "financial-account-transactions":
54
- "stripe-connect-financial-account-transactions",
55
- "capital-overview": "stripe-connect-capital-overview",
56
41
  documents: "stripe-connect-documents",
57
42
  "tax-registrations": "stripe-connect-tax-registrations",
58
- "tax-settings": "stripe-connect-tax-settings",
59
- balances: "stripe-connect-balances",
60
- "payouts-list": "stripe-connect-payouts-list",
61
- "app-install": "stripe-connect-app-install",
62
- "app-viewport": "stripe-connect-app-viewport"
43
+ "tax-settings": "stripe-connect-tax-settings"
63
44
  };
64
45
 
65
46
  type StripeConnectInstanceExtended = StripeConnectInstance & {
@@ -78,10 +59,10 @@ const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
78
59
  export const findScript = (): HTMLScriptElement | null => {
79
60
  return (
80
61
  document.querySelectorAll<HTMLScriptElement>(
81
- `script[src="${V0_URL}"]`
62
+ `script[src="${V1_URL}"]`
82
63
  )[0] ||
83
64
  document.querySelectorAll<HTMLScriptElement>(
84
- `script[src="${V1_URL}"]`
65
+ `script[src="${V0_URL}"]`
85
66
  )[0] ||
86
67
  null
87
68
  );
package/types/config.ts CHANGED
@@ -1,15 +1,6 @@
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";
@@ -20,11 +11,6 @@ export type NotificationCount = {
20
11
  actionRequired: number;
21
12
  };
22
13
 
23
- export type InstallState = {
24
- appId: string;
25
- state: "INSTALLED" | "UNINSTALLED";
26
- };
27
-
28
14
  export type LoaderStart = {
29
15
  elementTagName: string;
30
16
  };
@@ -34,6 +20,10 @@ export type LoadError = {
34
20
  error: EmbeddedError;
35
21
  };
36
22
 
23
+ export type StepChange = {
24
+ step: string;
25
+ };
26
+
37
27
  export type EmbeddedError = {
38
28
  type: EmbeddedErrorType;
39
29
  message?: string;
@@ -75,10 +65,6 @@ export const ConnectElementCommonMethodConfig = {
75
65
  };
76
66
 
77
67
  export const ConnectElementCustomMethodConfig = {
78
- "payment-details": {
79
- setPayment: (_payment: string | undefined): void => {},
80
- setOnClose: (_listener: (() => void) | undefined): void => {}
81
- },
82
68
  "account-onboarding": {
83
69
  setFullTermsOfServiceUrl: (
84
70
  _termOfServiceUrl: string | undefined
@@ -93,7 +79,10 @@ export const ConnectElementCustomMethodConfig = {
93
79
  setCollectionOptions: (
94
80
  _collectionOptions: CollectionOptions | undefined
95
81
  ): void => {},
96
- setOnExit: (_listener: (() => void) | undefined): void => {}
82
+ setOnExit: (_listener: (() => void) | undefined): void => {},
83
+ setOnStepChange: (
84
+ _listener: (({ step }: StepChange) => void) | undefined
85
+ ): void => {}
97
86
  },
98
87
  "account-management": {
99
88
  setCollectionOptions: (
@@ -110,37 +99,23 @@ export const ConnectElementCustomMethodConfig = {
110
99
  | undefined
111
100
  ): void => {}
112
101
  },
113
- "issuing-card": {
114
- setDefaultCard: (_defaultCard: string | undefined): void => {},
115
- setCardArtFileLink: (_cardArtFileLink: string | undefined): void => {},
116
- setCardSwitching: (_cardSwitching: boolean | undefined): void => {},
117
- setFetchEphemeralKey: (
118
- _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
119
- ): void => {}
120
- },
121
- "issuing-cards-list": {
122
- setCardArtFileLink: (_cardArtFileLink: string | undefined): void => {},
123
- setFetchEphemeralKey: (
124
- _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
125
- ): void => {}
126
- },
127
- "financial-account": {
128
- setFinancialAccount: (_financialAccount: string): void => {}
129
- },
130
- "financial-account-transactions": {
131
- setFinancialAccount: (_financialAccount: string): void => {}
102
+ "payment-details": {
103
+ setPayment: (_payment: string | undefined): void => {},
104
+ setOnClose: (_listener: (() => void) | undefined): void => {}
132
105
  },
133
- "app-install": {
134
- setApp: (_app: string | undefined): void => {},
135
- setOnAppInstallStateFetched: (
136
- _listener: (({ appId, state }: InstallState) => void) | undefined
106
+ "tax-settings": {
107
+ setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
108
+ setDisplayHeadOfficeCountries: (
109
+ _countries: string[] | undefined
137
110
  ): void => {},
138
- setOnAppInstallStateChanged: (
139
- _listener: (({ appId, state }: InstallState) => void) | undefined
111
+ setOnTaxSettingsUpdated: (
112
+ _listener: (({ id }: { id: string }) => void) | undefined
140
113
  ): void => {}
141
114
  },
142
- "app-viewport": {
143
- setApp: (_app: string | undefined): void => {},
144
- setAppData: (_appData: Record<string, string> | undefined): void => {}
115
+ "tax-registrations": {
116
+ setOnAfterTaxRegistrationAdded: (
117
+ _listener: (({ id }: { id: string }) => void) | undefined
118
+ ): void => {},
119
+ setDisplayCountries: (_countries: string[] | undefined): void => {}
145
120
  }
146
121
  };
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;
@@ -451,23 +452,14 @@ export interface StripeConnectInstance {
451
452
  * Tagnames to be used with the `create` method of the Connect instance.
452
453
  */
453
454
  export type ConnectElementTagName =
455
+ | "account-onboarding"
454
456
  | "payments"
455
- | "payouts"
456
457
  | "payment-details"
457
- | "account-onboarding"
458
- | "payment-method-settings"
459
458
  | "account-management"
460
459
  | "notification-banner"
461
- | "instant-payouts"
462
- | "issuing-card"
463
- | "issuing-cards-list"
464
- | "financial-account"
465
- | "financial-account-transactions"
466
- | "capital-overview"
460
+ | "payouts"
461
+ | "payouts-list"
462
+ | "balances"
467
463
  | "documents"
468
464
  | "tax-registrations"
469
- | "tax-settings"
470
- | "balances"
471
- | "payouts-list"
472
- | "app-install"
473
- | "app-viewport";
465
+ | "tax-settings";