@stripe/connect-js 3.3.0 → 3.3.1-beta-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.
- package/dist/connect.esm.js +24 -7
- package/dist/connect.js +24 -7
- package/dist/pure.esm.js +24 -7
- package/dist/pure.js +24 -7
- package/dist/src/shared.d.ts +1 -1
- package/dist/types/config.d.ts +22 -5
- package/package.json +3 -4
- package/src/shared.ts +20 -6
- package/types/config.ts +27 -4
- package/types/index.d.ts +1 -0
- package/types/shared.d.ts +10 -3
package/dist/connect.esm.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
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
|
+
},
|
|
4
8
|
"account-onboarding": {
|
|
5
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
6
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -9,20 +13,33 @@ const ConnectElementCustomMethodConfig = {
|
|
|
9
13
|
setCollectionOptions: _collectionOptions => {},
|
|
10
14
|
setOnExit: _listener => {}
|
|
11
15
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
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 => {}
|
|
15
25
|
}
|
|
16
26
|
};
|
|
17
27
|
|
|
18
28
|
const componentNameMapping = {
|
|
19
|
-
"account-onboarding": "stripe-connect-account-onboarding",
|
|
20
29
|
payments: "stripe-connect-payments",
|
|
30
|
+
payouts: "stripe-connect-payouts",
|
|
21
31
|
"payment-details": "stripe-connect-payment-details",
|
|
22
|
-
|
|
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",
|
|
39
|
+
documents: "stripe-connect-documents"
|
|
23
40
|
};
|
|
24
41
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
25
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
42
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
26
43
|
const findScript = () => {
|
|
27
44
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
28
45
|
};
|
|
@@ -133,7 +150,7 @@ const createWrapper = stripeConnect => {
|
|
|
133
150
|
sdk: true,
|
|
134
151
|
sdkOptions: {
|
|
135
152
|
// This will be replaced by the npm package version when bundling
|
|
136
|
-
sdkVersion: "3.3.
|
|
153
|
+
sdkVersion: "3.3.1-beta-1"
|
|
137
154
|
}
|
|
138
155
|
})
|
|
139
156
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -5,6 +5,10 @@ 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
|
+
},
|
|
8
12
|
"account-onboarding": {
|
|
9
13
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
10
14
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -13,20 +17,33 @@ const ConnectElementCustomMethodConfig = {
|
|
|
13
17
|
setCollectionOptions: _collectionOptions => {},
|
|
14
18
|
setOnExit: _listener => {}
|
|
15
19
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
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 => {}
|
|
19
29
|
}
|
|
20
30
|
};
|
|
21
31
|
|
|
22
32
|
const componentNameMapping = {
|
|
23
|
-
"account-onboarding": "stripe-connect-account-onboarding",
|
|
24
33
|
payments: "stripe-connect-payments",
|
|
34
|
+
payouts: "stripe-connect-payouts",
|
|
25
35
|
"payment-details": "stripe-connect-payment-details",
|
|
26
|
-
|
|
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",
|
|
43
|
+
documents: "stripe-connect-documents"
|
|
27
44
|
};
|
|
28
45
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
29
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
46
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
30
47
|
const findScript = () => {
|
|
31
48
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
32
49
|
};
|
|
@@ -137,7 +154,7 @@ const createWrapper = stripeConnect => {
|
|
|
137
154
|
sdk: true,
|
|
138
155
|
sdkOptions: {
|
|
139
156
|
// This will be replaced by the npm package version when bundling
|
|
140
|
-
sdkVersion: "3.3.
|
|
157
|
+
sdkVersion: "3.3.1-beta-1"
|
|
141
158
|
}
|
|
142
159
|
})
|
|
143
160
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
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
|
+
},
|
|
4
8
|
"account-onboarding": {
|
|
5
9
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
6
10
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -9,20 +13,33 @@ const ConnectElementCustomMethodConfig = {
|
|
|
9
13
|
setCollectionOptions: _collectionOptions => {},
|
|
10
14
|
setOnExit: _listener => {}
|
|
11
15
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
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 => {}
|
|
15
25
|
}
|
|
16
26
|
};
|
|
17
27
|
|
|
18
28
|
const componentNameMapping = {
|
|
19
|
-
"account-onboarding": "stripe-connect-account-onboarding",
|
|
20
29
|
payments: "stripe-connect-payments",
|
|
30
|
+
payouts: "stripe-connect-payouts",
|
|
21
31
|
"payment-details": "stripe-connect-payment-details",
|
|
22
|
-
|
|
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",
|
|
39
|
+
documents: "stripe-connect-documents"
|
|
23
40
|
};
|
|
24
41
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
25
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
42
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
26
43
|
const findScript = () => {
|
|
27
44
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
28
45
|
};
|
|
@@ -133,7 +150,7 @@ const createWrapper = stripeConnect => {
|
|
|
133
150
|
sdk: true,
|
|
134
151
|
sdkOptions: {
|
|
135
152
|
// This will be replaced by the npm package version when bundling
|
|
136
|
-
sdkVersion: "3.3.
|
|
153
|
+
sdkVersion: "3.3.1-beta-1"
|
|
137
154
|
}
|
|
138
155
|
})
|
|
139
156
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -5,6 +5,10 @@ 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
|
+
},
|
|
8
12
|
"account-onboarding": {
|
|
9
13
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
10
14
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -13,20 +17,33 @@ const ConnectElementCustomMethodConfig = {
|
|
|
13
17
|
setCollectionOptions: _collectionOptions => {},
|
|
14
18
|
setOnExit: _listener => {}
|
|
15
19
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
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 => {}
|
|
19
29
|
}
|
|
20
30
|
};
|
|
21
31
|
|
|
22
32
|
const componentNameMapping = {
|
|
23
|
-
"account-onboarding": "stripe-connect-account-onboarding",
|
|
24
33
|
payments: "stripe-connect-payments",
|
|
34
|
+
payouts: "stripe-connect-payouts",
|
|
25
35
|
"payment-details": "stripe-connect-payment-details",
|
|
26
|
-
|
|
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",
|
|
43
|
+
documents: "stripe-connect-documents"
|
|
27
44
|
};
|
|
28
45
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
29
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
46
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
30
47
|
const findScript = () => {
|
|
31
48
|
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
32
49
|
};
|
|
@@ -137,7 +154,7 @@ const createWrapper = stripeConnect => {
|
|
|
137
154
|
sdk: true,
|
|
138
155
|
sdkOptions: {
|
|
139
156
|
// This will be replaced by the npm package version when bundling
|
|
140
|
-
sdkVersion: "3.3.
|
|
157
|
+
sdkVersion: "3.3.1-beta-1"
|
|
141
158
|
}
|
|
142
159
|
})
|
|
143
160
|
}));
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IStripeConnectInitParams, StripeConnectInstance, ConnectElementTagName } from "../types";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
|
-
type ConnectElementHTMLName = "stripe-connect-account-onboarding" | "stripe-connect-
|
|
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";
|
|
4
4
|
export declare const componentNameMapping: Record<ConnectElementTagName, ConnectElementHTMLName>;
|
|
5
5
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
6
6
|
debugInstance: () => Promise<StripeConnectInstance>;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
type
|
|
1
|
+
export type FetchEphemeralKeyFunction = (fetchParams: {
|
|
2
|
+
issuingCard: string;
|
|
3
|
+
nonce: string;
|
|
4
|
+
}) => Promise<{
|
|
5
|
+
issuingCard: string;
|
|
6
|
+
nonce: string;
|
|
7
|
+
ephemeralKeySecret: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type CollectionOptions = {
|
|
2
10
|
fields: "currently_due" | "eventually_due";
|
|
3
11
|
futureRequirements?: "omit" | "include";
|
|
4
12
|
};
|
|
5
13
|
export declare const ConnectElementCustomMethodConfig: {
|
|
14
|
+
"payment-details": {
|
|
15
|
+
setPayment: (_payment: string | undefined) => void;
|
|
16
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
17
|
+
};
|
|
6
18
|
"account-onboarding": {
|
|
7
19
|
setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
|
|
8
20
|
setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
|
|
@@ -11,9 +23,14 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
11
23
|
setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
|
|
12
24
|
setOnExit: (_listener: (() => void) | undefined) => void;
|
|
13
25
|
};
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
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;
|
|
17
35
|
};
|
|
18
36
|
};
|
|
19
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/connect-js",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1-beta-1",
|
|
4
4
|
"description": "Connect.js loading utility package",
|
|
5
5
|
"main": "dist/connect.js",
|
|
6
6
|
"module": "dist/connect.esm.js",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/core": "^7.7.2",
|
|
44
44
|
"@babel/preset-env": "^7.7.1",
|
|
45
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
45
46
|
"@rollup/plugin-replace": "^2.3.1",
|
|
46
47
|
"@types/jest": "^24.0.25",
|
|
47
48
|
"@typescript-eslint/eslint-plugin": "^4.15.2",
|
|
@@ -66,7 +67,5 @@
|
|
|
66
67
|
"yalc": "^1.0.0-pre.53",
|
|
67
68
|
"zx": "^4.2.0"
|
|
68
69
|
},
|
|
69
|
-
"dependencies": {
|
|
70
|
-
"@rollup/plugin-json": "^6.0.0"
|
|
71
|
-
}
|
|
70
|
+
"dependencies": {}
|
|
72
71
|
}
|
package/src/shared.ts
CHANGED
|
@@ -10,20 +10,34 @@ export type LoadConnectAndInitialize = (
|
|
|
10
10
|
initParams: IStripeConnectInitParams
|
|
11
11
|
) => StripeConnectInstance;
|
|
12
12
|
|
|
13
|
-
type ConnectElementHTMLName =
|
|
14
|
-
| "stripe-connect-account-onboarding"
|
|
13
|
+
export type ConnectElementHTMLName =
|
|
15
14
|
| "stripe-connect-payments"
|
|
15
|
+
| "stripe-connect-payouts"
|
|
16
16
|
| "stripe-connect-payment-details"
|
|
17
|
-
| "stripe-connect-
|
|
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"
|
|
24
|
+
| "stripe-connect-documents";
|
|
18
25
|
|
|
19
26
|
export const componentNameMapping: Record<
|
|
20
27
|
ConnectElementTagName,
|
|
21
28
|
ConnectElementHTMLName
|
|
22
29
|
> = {
|
|
23
|
-
"account-onboarding": "stripe-connect-account-onboarding",
|
|
24
30
|
payments: "stripe-connect-payments",
|
|
31
|
+
payouts: "stripe-connect-payouts",
|
|
25
32
|
"payment-details": "stripe-connect-payment-details",
|
|
26
|
-
|
|
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",
|
|
40
|
+
documents: "stripe-connect-documents"
|
|
27
41
|
};
|
|
28
42
|
|
|
29
43
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
@@ -36,7 +50,7 @@ interface StripeConnectWrapper {
|
|
|
36
50
|
|
|
37
51
|
const EXISTING_SCRIPT_MESSAGE =
|
|
38
52
|
"loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
39
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
53
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
40
54
|
|
|
41
55
|
export const findScript = (): HTMLScriptElement | null => {
|
|
42
56
|
return (
|
package/types/config.ts
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
|
|
4
|
-
type
|
|
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
|
+
export type CollectionOptions = {
|
|
5
14
|
fields: "currently_due" | "eventually_due";
|
|
6
15
|
futureRequirements?: "omit" | "include";
|
|
7
16
|
};
|
|
8
17
|
|
|
9
18
|
export const ConnectElementCustomMethodConfig = {
|
|
19
|
+
"payment-details": {
|
|
20
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
21
|
+
setOnClose: (_listener: (() => void) | undefined): void => {}
|
|
22
|
+
},
|
|
10
23
|
"account-onboarding": {
|
|
11
24
|
setFullTermsOfServiceUrl: (
|
|
12
25
|
_termOfServiceUrl: string | undefined
|
|
@@ -23,8 +36,18 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
23
36
|
): void => {},
|
|
24
37
|
setOnExit: (_listener: (() => void) | undefined): void => {}
|
|
25
38
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
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 => {}
|
|
29
52
|
}
|
|
30
53
|
};
|
package/types/index.d.ts
CHANGED
package/types/shared.d.ts
CHANGED
|
@@ -413,7 +413,7 @@ export interface IStripeConnectInitParams {
|
|
|
413
413
|
|
|
414
414
|
type ConnectElementCustomMethods = typeof ConnectElementCustomMethodConfig;
|
|
415
415
|
|
|
416
|
-
type ConnectHTMLElementRecord = {
|
|
416
|
+
export type ConnectHTMLElementRecord = {
|
|
417
417
|
[K in keyof ConnectElementCustomMethods]: HTMLElement &
|
|
418
418
|
ConnectElementCustomMethods[K];
|
|
419
419
|
} & {
|
|
@@ -447,7 +447,14 @@ 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"
|
|
451
450
|
| "payments"
|
|
451
|
+
| "payouts"
|
|
452
452
|
| "payment-details"
|
|
453
|
-
| "
|
|
453
|
+
| "account-onboarding"
|
|
454
|
+
| "payment-method-settings"
|
|
455
|
+
| "account-management"
|
|
456
|
+
| "notification-banner"
|
|
457
|
+
| "instant-payouts"
|
|
458
|
+
| "issuing-card"
|
|
459
|
+
| "issuing-cards-list"
|
|
460
|
+
| "documents";
|