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

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,32 +9,20 @@ 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
  };
40
24
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
41
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
25
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
42
26
  const findScript = () => {
43
27
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
44
28
  };
@@ -149,7 +133,7 @@ const createWrapper = stripeConnect => {
149
133
  sdk: true,
150
134
  sdkOptions: {
151
135
  // This will be replaced by the npm package version when bundling
152
- sdkVersion: "3.3.0-beta-1"
136
+ sdkVersion: "3.3.0"
153
137
  }
154
138
  })
155
139
  }));
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,32 +13,20 @@ 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
  };
44
28
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
45
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
29
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
46
30
  const findScript = () => {
47
31
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
48
32
  };
@@ -153,7 +137,7 @@ const createWrapper = stripeConnect => {
153
137
  sdk: true,
154
138
  sdkOptions: {
155
139
  // This will be replaced by the npm package version when bundling
156
- sdkVersion: "3.3.0-beta-1"
140
+ sdkVersion: "3.3.0"
157
141
  }
158
142
  })
159
143
  }));
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,32 +9,20 @@ 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
  };
40
24
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
41
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
25
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
42
26
  const findScript = () => {
43
27
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
44
28
  };
@@ -149,7 +133,7 @@ const createWrapper = stripeConnect => {
149
133
  sdk: true,
150
134
  sdkOptions: {
151
135
  // This will be replaced by the npm package version when bundling
152
- sdkVersion: "3.3.0-beta-1"
136
+ sdkVersion: "3.3.0"
153
137
  }
154
138
  })
155
139
  }));
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,32 +13,20 @@ 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
  };
44
28
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
45
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
29
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
46
30
  const findScript = () => {
47
31
  return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
48
32
  };
@@ -153,7 +137,7 @@ const createWrapper = stripeConnect => {
153
137
  sdk: true,
154
138
  sdkOptions: {
155
139
  // This will be replaced by the npm package version when bundling
156
- sdkVersion: "3.3.0-beta-1"
140
+ sdkVersion: "3.3.0"
157
141
  }
158
142
  })
159
143
  }));
@@ -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";
3
+ type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-payouts";
4
4
  export declare const componentNameMapping: Record<ConnectElementTagName, ConnectElementHTMLName>;
5
5
  type StripeConnectInstanceExtended = StripeConnectInstance & {
6
6
  debugInstance: () => Promise<StripeConnectInstance>;
@@ -1,20 +1,8 @@
1
- type FetchEphemeralKeyFunction = (fetchParams: {
2
- issuingCard: string;
3
- nonce: string;
4
- }) => Promise<{
5
- issuingCard: string;
6
- nonce: string;
7
- ephemeralKeySecret: string;
8
- }>;
9
1
  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,15 +11,9 @@ 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
  };
37
19
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.3.0-beta-1",
3
+ "version": "3.3.0",
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,32 +10,20 @@ 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
 
25
19
  export const componentNameMapping: Record<
26
20
  ConnectElementTagName,
27
21
  ConnectElementHTMLName
28
22
  > = {
23
+ "account-onboarding": "stripe-connect-account-onboarding",
29
24
  payments: "stripe-connect-payments",
30
- payouts: "stripe-connect-payouts",
31
25
  "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"
26
+ payouts: "stripe-connect-payouts"
39
27
  };
40
28
 
41
29
  type StripeConnectInstanceExtended = StripeConnectInstance & {
@@ -48,7 +36,7 @@ interface StripeConnectWrapper {
48
36
 
49
37
  const EXISTING_SCRIPT_MESSAGE =
50
38
  "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
51
- const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
39
+ const V0_URL = "https://connect-js.stripe.com/v1.0/connect.js";
52
40
 
53
41
  export const findScript = (): HTMLScriptElement | null => {
54
42
  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
- type FetchEphemeralKeyFunction = (fetchParams: {
5
- issuingCard: string;
6
- nonce: string;
7
- }) => Promise<{
8
- issuingCard: string;
9
- nonce: string;
10
- ephemeralKeySecret: string;
11
- }>;
12
-
13
4
  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,13 +447,7 @@ 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";