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

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.
@@ -1,10 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-empty-function */
2
2
  /* eslint-disable @typescript-eslint/no-unused-vars */
3
3
  const ConnectElementCustomMethodConfig = {
4
- "payment-details": {
5
- setPayment: _payment => {},
6
- setOnClose: _listener => {}
7
- },
8
4
  "account-onboarding": {
9
5
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
10
6
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
@@ -13,33 +9,21 @@ const ConnectElementCustomMethodConfig = {
13
9
  setCollectionOptions: _collectionOptions => {},
14
10
  setOnExit: _listener => {}
15
11
  },
16
- "issuing-card": {
17
- setDefaultCard: _defaultCard => {},
18
- setCardArtFileLink: _cardArtFileLink => {},
19
- setCardSwitching: _cardSwitching => {},
20
- setFetchEphemeralKey: _fetchEphemeralKey => {}
21
- },
22
- "issuing-cards-list": {
23
- setCardArtFileLink: _cardArtFileLink => {},
24
- setFetchEphemeralKey: _fetchEphemeralKey => {}
12
+ "payment-details": {
13
+ setPayment: _payment => {},
14
+ setOnClose: _listener => {}
25
15
  }
26
16
  };
27
17
 
28
18
  const componentNameMapping = {
19
+ "account-onboarding": "stripe-connect-account-onboarding",
29
20
  payments: "stripe-connect-payments",
30
- payouts: "stripe-connect-payouts",
31
21
  "payment-details": "stripe-connect-payment-details",
32
- "account-onboarding": "stripe-connect-account-onboarding",
33
- "payment-method-settings": "stripe-connect-payment-method-settings",
34
- "account-management": "stripe-connect-account-management",
35
- "notification-banner": "stripe-connect-notification-banner",
36
- "instant-payouts": "stripe-connect-instant-payouts",
37
- "issuing-card": "stripe-connect-issuing-card",
38
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
22
+ payouts: "stripe-connect-payouts",
39
23
  documents: "stripe-connect-documents"
40
24
  };
41
25
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
42
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
26
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
43
27
  const findScript = () => {
44
28
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
45
29
  };
@@ -150,7 +134,7 @@ const createWrapper = stripeConnect => {
150
134
  sdk: true,
151
135
  sdkOptions: {
152
136
  // This will be replaced by the npm package version when bundling
153
- sdkVersion: "3.3.1-beta-1"
137
+ sdkVersion: "3.3.1"
154
138
  }
155
139
  })
156
140
  }));
package/dist/connect.js CHANGED
@@ -5,10 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  /* eslint-disable @typescript-eslint/no-empty-function */
6
6
  /* eslint-disable @typescript-eslint/no-unused-vars */
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 => {},
@@ -17,33 +13,21 @@ const ConnectElementCustomMethodConfig = {
17
13
  setCollectionOptions: _collectionOptions => {},
18
14
  setOnExit: _listener => {}
19
15
  },
20
- "issuing-card": {
21
- setDefaultCard: _defaultCard => {},
22
- setCardArtFileLink: _cardArtFileLink => {},
23
- setCardSwitching: _cardSwitching => {},
24
- setFetchEphemeralKey: _fetchEphemeralKey => {}
25
- },
26
- "issuing-cards-list": {
27
- setCardArtFileLink: _cardArtFileLink => {},
28
- setFetchEphemeralKey: _fetchEphemeralKey => {}
16
+ "payment-details": {
17
+ setPayment: _payment => {},
18
+ setOnClose: _listener => {}
29
19
  }
30
20
  };
31
21
 
32
22
  const componentNameMapping = {
23
+ "account-onboarding": "stripe-connect-account-onboarding",
33
24
  payments: "stripe-connect-payments",
34
- payouts: "stripe-connect-payouts",
35
25
  "payment-details": "stripe-connect-payment-details",
36
- "account-onboarding": "stripe-connect-account-onboarding",
37
- "payment-method-settings": "stripe-connect-payment-method-settings",
38
- "account-management": "stripe-connect-account-management",
39
- "notification-banner": "stripe-connect-notification-banner",
40
- "instant-payouts": "stripe-connect-instant-payouts",
41
- "issuing-card": "stripe-connect-issuing-card",
42
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
26
+ payouts: "stripe-connect-payouts",
43
27
  documents: "stripe-connect-documents"
44
28
  };
45
29
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
46
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
30
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
47
31
  const findScript = () => {
48
32
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
49
33
  };
@@ -154,7 +138,7 @@ const createWrapper = stripeConnect => {
154
138
  sdk: true,
155
139
  sdkOptions: {
156
140
  // This will be replaced by the npm package version when bundling
157
- sdkVersion: "3.3.1-beta-1"
141
+ sdkVersion: "3.3.1"
158
142
  }
159
143
  })
160
144
  }));
package/dist/pure.esm.js CHANGED
@@ -1,10 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-empty-function */
2
2
  /* eslint-disable @typescript-eslint/no-unused-vars */
3
3
  const ConnectElementCustomMethodConfig = {
4
- "payment-details": {
5
- setPayment: _payment => {},
6
- setOnClose: _listener => {}
7
- },
8
4
  "account-onboarding": {
9
5
  setFullTermsOfServiceUrl: _termOfServiceUrl => {},
10
6
  setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
@@ -13,33 +9,21 @@ const ConnectElementCustomMethodConfig = {
13
9
  setCollectionOptions: _collectionOptions => {},
14
10
  setOnExit: _listener => {}
15
11
  },
16
- "issuing-card": {
17
- setDefaultCard: _defaultCard => {},
18
- setCardArtFileLink: _cardArtFileLink => {},
19
- setCardSwitching: _cardSwitching => {},
20
- setFetchEphemeralKey: _fetchEphemeralKey => {}
21
- },
22
- "issuing-cards-list": {
23
- setCardArtFileLink: _cardArtFileLink => {},
24
- setFetchEphemeralKey: _fetchEphemeralKey => {}
12
+ "payment-details": {
13
+ setPayment: _payment => {},
14
+ setOnClose: _listener => {}
25
15
  }
26
16
  };
27
17
 
28
18
  const componentNameMapping = {
19
+ "account-onboarding": "stripe-connect-account-onboarding",
29
20
  payments: "stripe-connect-payments",
30
- payouts: "stripe-connect-payouts",
31
21
  "payment-details": "stripe-connect-payment-details",
32
- "account-onboarding": "stripe-connect-account-onboarding",
33
- "payment-method-settings": "stripe-connect-payment-method-settings",
34
- "account-management": "stripe-connect-account-management",
35
- "notification-banner": "stripe-connect-notification-banner",
36
- "instant-payouts": "stripe-connect-instant-payouts",
37
- "issuing-card": "stripe-connect-issuing-card",
38
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
22
+ payouts: "stripe-connect-payouts",
39
23
  documents: "stripe-connect-documents"
40
24
  };
41
25
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
42
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
26
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
43
27
  const findScript = () => {
44
28
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
45
29
  };
@@ -150,7 +134,7 @@ const createWrapper = stripeConnect => {
150
134
  sdk: true,
151
135
  sdkOptions: {
152
136
  // This will be replaced by the npm package version when bundling
153
- sdkVersion: "3.3.1-beta-1"
137
+ sdkVersion: "3.3.1"
154
138
  }
155
139
  })
156
140
  }));
package/dist/pure.js CHANGED
@@ -5,10 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  /* eslint-disable @typescript-eslint/no-empty-function */
6
6
  /* eslint-disable @typescript-eslint/no-unused-vars */
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 => {},
@@ -17,33 +13,21 @@ const ConnectElementCustomMethodConfig = {
17
13
  setCollectionOptions: _collectionOptions => {},
18
14
  setOnExit: _listener => {}
19
15
  },
20
- "issuing-card": {
21
- setDefaultCard: _defaultCard => {},
22
- setCardArtFileLink: _cardArtFileLink => {},
23
- setCardSwitching: _cardSwitching => {},
24
- setFetchEphemeralKey: _fetchEphemeralKey => {}
25
- },
26
- "issuing-cards-list": {
27
- setCardArtFileLink: _cardArtFileLink => {},
28
- setFetchEphemeralKey: _fetchEphemeralKey => {}
16
+ "payment-details": {
17
+ setPayment: _payment => {},
18
+ setOnClose: _listener => {}
29
19
  }
30
20
  };
31
21
 
32
22
  const componentNameMapping = {
23
+ "account-onboarding": "stripe-connect-account-onboarding",
33
24
  payments: "stripe-connect-payments",
34
- payouts: "stripe-connect-payouts",
35
25
  "payment-details": "stripe-connect-payment-details",
36
- "account-onboarding": "stripe-connect-account-onboarding",
37
- "payment-method-settings": "stripe-connect-payment-method-settings",
38
- "account-management": "stripe-connect-account-management",
39
- "notification-banner": "stripe-connect-notification-banner",
40
- "instant-payouts": "stripe-connect-instant-payouts",
41
- "issuing-card": "stripe-connect-issuing-card",
42
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
26
+ payouts: "stripe-connect-payouts",
43
27
  documents: "stripe-connect-documents"
44
28
  };
45
29
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
46
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
30
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
47
31
  const findScript = () => {
48
32
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
49
33
  };
@@ -154,7 +138,7 @@ const createWrapper = stripeConnect => {
154
138
  sdk: true,
155
139
  sdkOptions: {
156
140
  // This will be replaced by the npm package version when bundling
157
- sdkVersion: "3.3.1-beta-1"
141
+ sdkVersion: "3.3.1"
158
142
  }
159
143
  })
160
144
  }));
@@ -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-documents";
3
+ type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-payouts" | "stripe-connect-documents";
4
4
  export declare const componentNameMapping: Record<ConnectElementTagName, ConnectElementHTMLName>;
5
5
  type StripeConnectInstanceExtended = StripeConnectInstance & {
6
6
  debugInstance: () => Promise<StripeConnectInstance>;
@@ -1,20 +1,8 @@
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
  };
13
5
  export declare const ConnectElementCustomMethodConfig: {
14
- "payment-details": {
15
- setPayment: (_payment: string | undefined) => void;
16
- setOnClose: (_listener: (() => void) | undefined) => void;
17
- };
18
6
  "account-onboarding": {
19
7
  setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
20
8
  setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
@@ -23,14 +11,8 @@ export declare const ConnectElementCustomMethodConfig: {
23
11
  setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
24
12
  setOnExit: (_listener: (() => void) | undefined) => void;
25
13
  };
26
- "issuing-card": {
27
- setDefaultCard: (_defaultCard: string | undefined) => void;
28
- setCardArtFileLink: (_cardArtFileLink: string | undefined) => void;
29
- setCardSwitching: (_cardSwitching: boolean | undefined) => void;
30
- setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
31
- };
32
- "issuing-cards-list": {
33
- setCardArtFileLink: (_cardArtFileLink: string | undefined) => void;
34
- setFetchEphemeralKey: (_fetchEphemeralKey: FetchEphemeralKeyFunction | undefined) => void;
14
+ "payment-details": {
15
+ setPayment: (_payment: string | undefined) => void;
16
+ setOnClose: (_listener: (() => void) | undefined) => void;
35
17
  };
36
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.3.1-beta-1",
3
+ "version": "3.3.1",
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
@@ -10,33 +10,21 @@ export type LoadConnectAndInitialize = (
10
10
  initParams: IStripeConnectInitParams
11
11
  ) => StripeConnectInstance;
12
12
 
13
- export type ConnectElementHTMLName =
13
+ type ConnectElementHTMLName =
14
+ | "stripe-connect-account-onboarding"
14
15
  | "stripe-connect-payments"
15
- | "stripe-connect-payouts"
16
16
  | "stripe-connect-payment-details"
17
- | "stripe-connect-account-onboarding"
18
- | "stripe-connect-payment-method-settings"
19
- | "stripe-connect-account-management"
20
- | "stripe-connect-notification-banner"
21
- | "stripe-connect-instant-payouts"
22
- | "stripe-connect-issuing-card"
23
- | "stripe-connect-issuing-cards-list"
17
+ | "stripe-connect-payouts"
24
18
  | "stripe-connect-documents";
25
19
 
26
20
  export const componentNameMapping: Record<
27
21
  ConnectElementTagName,
28
22
  ConnectElementHTMLName
29
23
  > = {
24
+ "account-onboarding": "stripe-connect-account-onboarding",
30
25
  payments: "stripe-connect-payments",
31
- payouts: "stripe-connect-payouts",
32
26
  "payment-details": "stripe-connect-payment-details",
33
- "account-onboarding": "stripe-connect-account-onboarding",
34
- "payment-method-settings": "stripe-connect-payment-method-settings",
35
- "account-management": "stripe-connect-account-management",
36
- "notification-banner": "stripe-connect-notification-banner",
37
- "instant-payouts": "stripe-connect-instant-payouts",
38
- "issuing-card": "stripe-connect-issuing-card",
39
- "issuing-cards-list": "stripe-connect-issuing-cards-list",
27
+ payouts: "stripe-connect-payouts",
40
28
  documents: "stripe-connect-documents"
41
29
  };
42
30
 
@@ -50,7 +38,7 @@ interface StripeConnectWrapper {
50
38
 
51
39
  const EXISTING_SCRIPT_MESSAGE =
52
40
  "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
53
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
41
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
54
42
 
55
43
  export const findScript = (): HTMLScriptElement | null => {
56
44
  return (
package/types/config.ts CHANGED
@@ -1,25 +1,12 @@
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
 
18
9
  export const ConnectElementCustomMethodConfig = {
19
- "payment-details": {
20
- setPayment: (_payment: string | undefined): void => {},
21
- setOnClose: (_listener: (() => void) | undefined): void => {}
22
- },
23
10
  "account-onboarding": {
24
11
  setFullTermsOfServiceUrl: (
25
12
  _termOfServiceUrl: string | undefined
@@ -36,18 +23,8 @@ export const ConnectElementCustomMethodConfig = {
36
23
  ): void => {},
37
24
  setOnExit: (_listener: (() => void) | undefined): void => {}
38
25
  },
39
- "issuing-card": {
40
- setDefaultCard: (_defaultCard: string | undefined): void => {},
41
- setCardArtFileLink: (_cardArtFileLink: string | undefined): void => {},
42
- setCardSwitching: (_cardSwitching: boolean | undefined): void => {},
43
- setFetchEphemeralKey: (
44
- _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
45
- ): void => {}
46
- },
47
- "issuing-cards-list": {
48
- setCardArtFileLink: (_cardArtFileLink: string | undefined): void => {},
49
- setFetchEphemeralKey: (
50
- _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
51
- ): void => {}
26
+ "payment-details": {
27
+ setPayment: (_payment: string | undefined): void => {},
28
+ setOnClose: (_listener: (() => void) | undefined): void => {}
52
29
  }
53
30
  };
package/types/shared.d.ts CHANGED
@@ -447,14 +447,8 @@ export interface StripeConnectInstance {
447
447
  * Tagnames to be used with the `create` method of the Connect instance.
448
448
  */
449
449
  export type ConnectElementTagName =
450
+ | "account-onboarding"
450
451
  | "payments"
451
- | "payouts"
452
452
  | "payment-details"
453
- | "account-onboarding"
454
- | "payment-method-settings"
455
- | "account-management"
456
- | "notification-banner"
457
- | "instant-payouts"
458
- | "issuing-card"
459
- | "issuing-cards-list"
453
+ | "payouts"
460
454
  | "documents";