@stripe/connect-js 3.4.6-preview.0 → 3.4.6
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/components/componentsAndSetters.d.ts +9 -92
- package/dist/connect.esm.js +11 -74
- package/dist/connect.js +11 -74
- package/dist/exportedTypes/shared.d.ts +1 -68
- package/dist/init.d.ts +1 -1
- package/dist/pure.esm.js +11 -74
- package/dist/pure.js +11 -74
- package/package.json +4 -4
- package/src/components/componentsAndSetters.ts +15 -173
- package/src/exportedTypes/shared.ts +0 -69
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const connectElementTagNames: readonly ["
|
|
1
|
+
export declare const connectElementTagNames: readonly ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
|
|
2
2
|
export type FetchEphemeralKeyFunction = (fetchParams: {
|
|
3
3
|
issuingCard: string;
|
|
4
4
|
nonce: string;
|
|
@@ -48,10 +48,6 @@ export type NotificationCount = {
|
|
|
48
48
|
total: number;
|
|
49
49
|
actionRequired: number;
|
|
50
50
|
};
|
|
51
|
-
export type InstallState = {
|
|
52
|
-
appId: string;
|
|
53
|
-
state: "INSTALLED" | "UNINSTALLED";
|
|
54
|
-
};
|
|
55
51
|
export type LoaderStart = {
|
|
56
52
|
elementTagName: string;
|
|
57
53
|
};
|
|
@@ -69,14 +65,6 @@ export type EmbeddedError = {
|
|
|
69
65
|
type: EmbeddedErrorType;
|
|
70
66
|
message?: string;
|
|
71
67
|
};
|
|
72
|
-
export type FinancingProductType = {
|
|
73
|
-
productType: "standard" | "refill" | "none";
|
|
74
|
-
activeFinancingCount: number;
|
|
75
|
-
};
|
|
76
|
-
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
77
|
-
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
78
|
-
export type ReportName = "gross_volume" | "net_volume";
|
|
79
|
-
export type RecipientDataSource = "customers";
|
|
80
68
|
export type EmbeddedErrorType =
|
|
81
69
|
/**
|
|
82
70
|
* Failure to connect to Stripe's API.
|
|
@@ -111,19 +99,6 @@ export declare const ConnectElementCommonMethodConfig: {
|
|
|
111
99
|
setOnLoaderStart: (_listener: (({ elementTagName }: LoaderStart) => void) | undefined) => void;
|
|
112
100
|
};
|
|
113
101
|
export declare const ConnectElementCustomMethodConfig: {
|
|
114
|
-
payments: {
|
|
115
|
-
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
116
|
-
};
|
|
117
|
-
"payment-details": {
|
|
118
|
-
setPayment: (_payment: string | undefined) => void;
|
|
119
|
-
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
120
|
-
};
|
|
121
|
-
"payment-disputes": {
|
|
122
|
-
setPayment: (_payment: string | undefined) => void;
|
|
123
|
-
setOnDisputesLoaded: (_listener: (({ total }: {
|
|
124
|
-
total: number;
|
|
125
|
-
}) => void) | undefined) => void;
|
|
126
|
-
};
|
|
127
102
|
"account-onboarding": {
|
|
128
103
|
setFullTermsOfServiceUrl: (_termOfServiceUrl: string | undefined) => void;
|
|
129
104
|
setRecipientTermsOfServiceUrl: (_recipientTermsOfServiceUrl: string | undefined) => void;
|
|
@@ -166,52 +141,19 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
166
141
|
"financial-account-transactions": {
|
|
167
142
|
setFinancialAccount: (_financialAccount: string) => void;
|
|
168
143
|
};
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
};
|
|
172
|
-
"app-install": {
|
|
173
|
-
setApp: (_app: string | undefined) => void;
|
|
174
|
-
setOnAppInstallStateFetched: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
175
|
-
setOnAppInstallStateChanged: (_listener: (({ appId, state }: InstallState) => void) | undefined) => void;
|
|
176
|
-
};
|
|
177
|
-
"app-viewport": {
|
|
178
|
-
setApp: (_app: string | undefined) => void;
|
|
179
|
-
setAppData: (_appData: Record<string, string> | undefined) => void;
|
|
144
|
+
payments: {
|
|
145
|
+
setDefaultFilters: (_filters: PaymentsListDefaultFilters | undefined) => void;
|
|
180
146
|
};
|
|
181
|
-
"payment-
|
|
182
|
-
|
|
147
|
+
"payment-details": {
|
|
148
|
+
setPayment: (_payment: string | undefined) => void;
|
|
149
|
+
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
183
150
|
};
|
|
184
|
-
"
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
188
|
-
setSupportUrl: (_supportUrl: string | undefined) => void;
|
|
189
|
-
setOnFinancingsLoaded: (_listener: (({ total }: {
|
|
151
|
+
"payment-disputes": {
|
|
152
|
+
setPayment: (_payment: string | undefined) => void;
|
|
153
|
+
setOnDisputesLoaded: (_listener: (({ total }: {
|
|
190
154
|
total: number;
|
|
191
155
|
}) => void) | undefined) => void;
|
|
192
156
|
};
|
|
193
|
-
"capital-financing-application": {
|
|
194
|
-
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
195
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
196
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
197
|
-
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
198
|
-
setDefaultFinancingOffer: (_defaultFinancingOffer: string | undefined) => void;
|
|
199
|
-
};
|
|
200
|
-
"capital-financing-promotion": {
|
|
201
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined) => void;
|
|
202
|
-
setOnApplicationSubmitted: (_listener: (() => void) | undefined) => void;
|
|
203
|
-
setOnEligibleFinancingOfferLoaded: (_listener: (({ productType, activeFinancingCount, }: FinancingProductType) => void) | undefined) => void;
|
|
204
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined) => void;
|
|
205
|
-
setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined) => void;
|
|
206
|
-
setEligibilityCriteriaUrl: (_eligibilityCriteriaUrl: string | undefined) => void;
|
|
207
|
-
setOnApplicationStepChange: (_listener: (({ step }: StepChange) => void) | undefined) => void;
|
|
208
|
-
};
|
|
209
|
-
"reporting-chart": {
|
|
210
|
-
setReportName: (_reportName: ReportName) => void;
|
|
211
|
-
setIntervalStart: (_intervalStart: Date | undefined) => void;
|
|
212
|
-
setIntervalEnd: (_intervalEnd: Date | undefined) => void;
|
|
213
|
-
setIntervalType: (_intervalType: IntervalType | undefined) => void;
|
|
214
|
-
};
|
|
215
157
|
"tax-settings": {
|
|
216
158
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined) => void;
|
|
217
159
|
setDisplayHeadOfficeCountries: (_countries: string[] | undefined) => void;
|
|
@@ -228,35 +170,10 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
228
170
|
id: string;
|
|
229
171
|
}) => void) | undefined) => void;
|
|
230
172
|
};
|
|
231
|
-
"tax-threshold-monitoring": {
|
|
232
|
-
setDisplayCountries: (_countries: string[] | undefined) => void;
|
|
233
|
-
};
|
|
234
|
-
"product-tax-code-selector": {
|
|
235
|
-
setOnTaxCodeSelect: (_listener: ((taxCode: string | null, _: {
|
|
236
|
-
analyticsName: string;
|
|
237
|
-
} | null) => void) | undefined) => void;
|
|
238
|
-
setHideDescription: (_hideDescription: boolean | undefined) => void;
|
|
239
|
-
setDisabled: (_disabled: boolean | undefined) => void;
|
|
240
|
-
setInitialTaxCode: (_initialTaxCode: string | undefined) => void;
|
|
241
|
-
};
|
|
242
|
-
"export-tax-transactions": {};
|
|
243
173
|
"payout-details": {
|
|
244
174
|
setPayout: (_payout: string | undefined) => void;
|
|
245
175
|
setOnClose: (_listener: (() => void) | undefined) => void;
|
|
246
176
|
};
|
|
247
|
-
"check-scanning": {
|
|
248
|
-
setHandleCheckScanSubmitted: (_handleCheckScanSubmitted: ({ checkScanToken, }: {
|
|
249
|
-
checkScanToken: string;
|
|
250
|
-
}) => Promise<void>) => void;
|
|
251
|
-
};
|
|
252
|
-
"agentic-commerce-settings": {
|
|
253
|
-
setOnAgreementUpdated: (_listener: (({ agreementId }: {
|
|
254
|
-
agreementId: string;
|
|
255
|
-
}) => void) | undefined) => void;
|
|
256
|
-
};
|
|
257
|
-
"terminal-hardware-shop": {
|
|
258
|
-
setOnCheckoutFinished: (_listener: (() => void) | undefined) => void;
|
|
259
|
-
};
|
|
260
177
|
"payout-reconciliation-report": {
|
|
261
178
|
setOnReportAvailabilityLoaded: (_listener: (({ isReportAvailable }: {
|
|
262
179
|
isReportAvailable: boolean;
|
package/dist/connect.esm.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
// Source of truth for the entire list of components. When you add a new component, it should be added here.
|
|
3
|
-
const connectElementTagNames = ["
|
|
3
|
+
const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
|
|
4
4
|
const ConnectElementCommonMethodConfig = {
|
|
5
5
|
setOnLoadError: _listener => {},
|
|
6
6
|
setOnLoaderStart: _listener => {}
|
|
7
7
|
};
|
|
8
8
|
const ConnectElementCustomMethodConfig = {
|
|
9
|
-
payments: {
|
|
10
|
-
setDefaultFilters: _filters => {}
|
|
11
|
-
},
|
|
12
|
-
"payment-details": {
|
|
13
|
-
setPayment: _payment => {},
|
|
14
|
-
setOnClose: _listener => {}
|
|
15
|
-
},
|
|
16
|
-
"payment-disputes": {
|
|
17
|
-
setPayment: _payment => {},
|
|
18
|
-
setOnDisputesLoaded: _listener => {}
|
|
19
|
-
},
|
|
20
9
|
"account-onboarding": {
|
|
21
10
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
22
11
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -55,49 +44,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
55
44
|
"financial-account-transactions": {
|
|
56
45
|
setFinancialAccount: _financialAccount => {}
|
|
57
46
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
"app-install": {
|
|
62
|
-
setApp: _app => {},
|
|
63
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
64
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
65
|
-
},
|
|
66
|
-
"app-viewport": {
|
|
67
|
-
setApp: _app => {},
|
|
68
|
-
setAppData: _appData => {}
|
|
69
|
-
},
|
|
70
|
-
"payment-method-settings": {
|
|
71
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
72
|
-
},
|
|
73
|
-
"capital-financing": {
|
|
74
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
75
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
76
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
77
|
-
setSupportUrl: _supportUrl => {},
|
|
78
|
-
setOnFinancingsLoaded: _listener => {}
|
|
79
|
-
},
|
|
80
|
-
"capital-financing-application": {
|
|
81
|
-
setOnApplicationSubmitted: _listener => {},
|
|
82
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
83
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
84
|
-
setOnApplicationStepChange: _listener => {},
|
|
85
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {}
|
|
47
|
+
payments: {
|
|
48
|
+
setDefaultFilters: _filters => {}
|
|
86
49
|
},
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
91
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
92
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
93
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
94
|
-
setOnApplicationStepChange: _listener => {}
|
|
50
|
+
"payment-details": {
|
|
51
|
+
setPayment: _payment => {},
|
|
52
|
+
setOnClose: _listener => {}
|
|
95
53
|
},
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
setIntervalEnd: _intervalEnd => {},
|
|
100
|
-
setIntervalType: _intervalType => {}
|
|
54
|
+
"payment-disputes": {
|
|
55
|
+
setPayment: _payment => {},
|
|
56
|
+
setOnDisputesLoaded: _listener => {}
|
|
101
57
|
},
|
|
102
58
|
"tax-settings": {
|
|
103
59
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -109,29 +65,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
109
65
|
setDisplayCountries: _countries => {},
|
|
110
66
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
111
67
|
},
|
|
112
|
-
"tax-threshold-monitoring": {
|
|
113
|
-
setDisplayCountries: _countries => {}
|
|
114
|
-
},
|
|
115
|
-
"product-tax-code-selector": {
|
|
116
|
-
setOnTaxCodeSelect: _listener => {},
|
|
117
|
-
setHideDescription: _hideDescription => {},
|
|
118
|
-
setDisabled: _disabled => {},
|
|
119
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
120
|
-
},
|
|
121
|
-
"export-tax-transactions": {},
|
|
122
68
|
"payout-details": {
|
|
123
69
|
setPayout: _payout => {},
|
|
124
70
|
setOnClose: _listener => {}
|
|
125
71
|
},
|
|
126
|
-
"check-scanning": {
|
|
127
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
128
|
-
},
|
|
129
|
-
"agentic-commerce-settings": {
|
|
130
|
-
setOnAgreementUpdated: _listener => {}
|
|
131
|
-
},
|
|
132
|
-
"terminal-hardware-shop": {
|
|
133
|
-
setOnCheckoutFinished: _listener => {}
|
|
134
|
-
},
|
|
135
72
|
"payout-reconciliation-report": {
|
|
136
73
|
setOnReportAvailabilityLoaded: _listener => {}
|
|
137
74
|
}
|
|
@@ -237,7 +174,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
237
174
|
element[method] = function (value) {
|
|
238
175
|
stripeConnectInstance.then(() => {
|
|
239
176
|
if (!this[`${method}InternalOnly`]) {
|
|
240
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6
|
|
177
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6`);
|
|
241
178
|
}
|
|
242
179
|
this[`${method}InternalOnly`](value);
|
|
243
180
|
});
|
|
@@ -291,7 +228,7 @@ const createWrapper = stripeConnect => {
|
|
|
291
228
|
sdk: true,
|
|
292
229
|
sdkOptions: {
|
|
293
230
|
// This will be replaced by the npm package version when bundling
|
|
294
|
-
sdkVersion: "3.4.6
|
|
231
|
+
sdkVersion: "3.4.6"
|
|
295
232
|
}
|
|
296
233
|
})
|
|
297
234
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -4,23 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
// Source of truth for the entire list of components. When you add a new component, it should be added here.
|
|
7
|
-
const connectElementTagNames = ["
|
|
7
|
+
const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
|
|
8
8
|
const ConnectElementCommonMethodConfig = {
|
|
9
9
|
setOnLoadError: _listener => {},
|
|
10
10
|
setOnLoaderStart: _listener => {}
|
|
11
11
|
};
|
|
12
12
|
const ConnectElementCustomMethodConfig = {
|
|
13
|
-
payments: {
|
|
14
|
-
setDefaultFilters: _filters => {}
|
|
15
|
-
},
|
|
16
|
-
"payment-details": {
|
|
17
|
-
setPayment: _payment => {},
|
|
18
|
-
setOnClose: _listener => {}
|
|
19
|
-
},
|
|
20
|
-
"payment-disputes": {
|
|
21
|
-
setPayment: _payment => {},
|
|
22
|
-
setOnDisputesLoaded: _listener => {}
|
|
23
|
-
},
|
|
24
13
|
"account-onboarding": {
|
|
25
14
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
26
15
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -59,49 +48,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
59
48
|
"financial-account-transactions": {
|
|
60
49
|
setFinancialAccount: _financialAccount => {}
|
|
61
50
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
"app-install": {
|
|
66
|
-
setApp: _app => {},
|
|
67
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
68
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
69
|
-
},
|
|
70
|
-
"app-viewport": {
|
|
71
|
-
setApp: _app => {},
|
|
72
|
-
setAppData: _appData => {}
|
|
73
|
-
},
|
|
74
|
-
"payment-method-settings": {
|
|
75
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
76
|
-
},
|
|
77
|
-
"capital-financing": {
|
|
78
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
79
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
80
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
81
|
-
setSupportUrl: _supportUrl => {},
|
|
82
|
-
setOnFinancingsLoaded: _listener => {}
|
|
83
|
-
},
|
|
84
|
-
"capital-financing-application": {
|
|
85
|
-
setOnApplicationSubmitted: _listener => {},
|
|
86
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
87
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
88
|
-
setOnApplicationStepChange: _listener => {},
|
|
89
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {}
|
|
51
|
+
payments: {
|
|
52
|
+
setDefaultFilters: _filters => {}
|
|
90
53
|
},
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
95
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
96
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
97
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
98
|
-
setOnApplicationStepChange: _listener => {}
|
|
54
|
+
"payment-details": {
|
|
55
|
+
setPayment: _payment => {},
|
|
56
|
+
setOnClose: _listener => {}
|
|
99
57
|
},
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setIntervalEnd: _intervalEnd => {},
|
|
104
|
-
setIntervalType: _intervalType => {}
|
|
58
|
+
"payment-disputes": {
|
|
59
|
+
setPayment: _payment => {},
|
|
60
|
+
setOnDisputesLoaded: _listener => {}
|
|
105
61
|
},
|
|
106
62
|
"tax-settings": {
|
|
107
63
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -113,29 +69,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
113
69
|
setDisplayCountries: _countries => {},
|
|
114
70
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
115
71
|
},
|
|
116
|
-
"tax-threshold-monitoring": {
|
|
117
|
-
setDisplayCountries: _countries => {}
|
|
118
|
-
},
|
|
119
|
-
"product-tax-code-selector": {
|
|
120
|
-
setOnTaxCodeSelect: _listener => {},
|
|
121
|
-
setHideDescription: _hideDescription => {},
|
|
122
|
-
setDisabled: _disabled => {},
|
|
123
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
124
|
-
},
|
|
125
|
-
"export-tax-transactions": {},
|
|
126
72
|
"payout-details": {
|
|
127
73
|
setPayout: _payout => {},
|
|
128
74
|
setOnClose: _listener => {}
|
|
129
75
|
},
|
|
130
|
-
"check-scanning": {
|
|
131
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
132
|
-
},
|
|
133
|
-
"agentic-commerce-settings": {
|
|
134
|
-
setOnAgreementUpdated: _listener => {}
|
|
135
|
-
},
|
|
136
|
-
"terminal-hardware-shop": {
|
|
137
|
-
setOnCheckoutFinished: _listener => {}
|
|
138
|
-
},
|
|
139
76
|
"payout-reconciliation-report": {
|
|
140
77
|
setOnReportAvailabilityLoaded: _listener => {}
|
|
141
78
|
}
|
|
@@ -241,7 +178,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
241
178
|
element[method] = function (value) {
|
|
242
179
|
stripeConnectInstance.then(() => {
|
|
243
180
|
if (!this[`${method}InternalOnly`]) {
|
|
244
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6
|
|
181
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6`);
|
|
245
182
|
}
|
|
246
183
|
this[`${method}InternalOnly`](value);
|
|
247
184
|
});
|
|
@@ -295,7 +232,7 @@ const createWrapper = stripeConnect => {
|
|
|
295
232
|
sdk: true,
|
|
296
233
|
sdkOptions: {
|
|
297
234
|
// This will be replaced by the npm package version when bundling
|
|
298
|
-
sdkVersion: "3.4.6
|
|
235
|
+
sdkVersion: "3.4.6"
|
|
299
236
|
}
|
|
300
237
|
})
|
|
301
238
|
}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConnectElementCommonMethodConfig, ConnectElementCustomMethodConfig, connectElementTagNames
|
|
1
|
+
import type { ConnectElementCommonMethodConfig, ConnectElementCustomMethodConfig, connectElementTagNames } from "../components/componentsAndSetters";
|
|
2
2
|
export type LoadConnectAndInitialize = (initParams: IStripeConnectInitParams) => StripeConnectInstance;
|
|
3
3
|
export interface StripeConnectWrapper {
|
|
4
4
|
initialize: (params: IStripeConnectInitParams) => StripeConnectInstance;
|
|
@@ -435,68 +435,6 @@ export type IStripeConnectUpdateParams = {
|
|
|
435
435
|
*/
|
|
436
436
|
displayOptions?: IStripeConnectDisplayOptions;
|
|
437
437
|
};
|
|
438
|
-
/**
|
|
439
|
-
* Reasons why risk signals collection was skipped.
|
|
440
|
-
*/
|
|
441
|
-
export type RiskSignalsCollectionSkippedReason =
|
|
442
|
-
/**
|
|
443
|
-
* Required component (account_onboarding) not enabled.
|
|
444
|
-
*/
|
|
445
|
-
"required_component_not_enabled"
|
|
446
|
-
/**
|
|
447
|
-
* The account doesn't have a risk signals collection requirement.
|
|
448
|
-
*/
|
|
449
|
-
| "not_required"
|
|
450
|
-
/**
|
|
451
|
-
* The risk signals collection requirement has already been fulfilled.
|
|
452
|
-
*/
|
|
453
|
-
| "requirement_fulfilled";
|
|
454
|
-
/**
|
|
455
|
-
* Error types that can occur during risk signals collection.
|
|
456
|
-
*/
|
|
457
|
-
export type RiskSignalsCollectionErrorType = Extract<EmbeddedErrorType, "api_connection_error" | "invalid_request_error" | "rate_limit_error" | "api_error">;
|
|
458
|
-
/**
|
|
459
|
-
* Errors that can occur during risk signals collection.
|
|
460
|
-
*/
|
|
461
|
-
export type RiskSignalsCollectionError =
|
|
462
|
-
/**
|
|
463
|
-
* Error occurred during general Connect.js loading.
|
|
464
|
-
*/
|
|
465
|
-
{
|
|
466
|
-
type: "load_error";
|
|
467
|
-
loadError: EmbeddedError;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Error occurred during risk signals collection.
|
|
471
|
-
*/
|
|
472
|
-
| {
|
|
473
|
-
type: RiskSignalsCollectionErrorType;
|
|
474
|
-
message?: string;
|
|
475
|
-
};
|
|
476
|
-
/**
|
|
477
|
-
* Event emitted during risk signals collection.
|
|
478
|
-
*/
|
|
479
|
-
export declare type RiskSignalsCollectionEvent =
|
|
480
|
-
/**
|
|
481
|
-
* Risk signals collection completed and successfully received by Stripe.
|
|
482
|
-
*/
|
|
483
|
-
{
|
|
484
|
-
status: "completed";
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Risk signals collection skipped with reason.
|
|
488
|
-
*/
|
|
489
|
-
| {
|
|
490
|
-
status: "skipped";
|
|
491
|
-
skippedReason: RiskSignalsCollectionSkippedReason;
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Risk signals collection failed due to error and was not sent to Stripe server.
|
|
495
|
-
*/
|
|
496
|
-
| {
|
|
497
|
-
status: "failed";
|
|
498
|
-
error: RiskSignalsCollectionError;
|
|
499
|
-
};
|
|
500
438
|
export interface IStripeConnectDisplayOptions {
|
|
501
439
|
/**
|
|
502
440
|
* Whether embedded components should show object id's in the UI
|
|
@@ -529,11 +467,6 @@ export interface IStripeConnectInitParams {
|
|
|
529
467
|
* An array of custom fonts, which embedded components created from a ConnectInstance can use.
|
|
530
468
|
*/
|
|
531
469
|
fonts?: Array<CssFontSource | CustomFontSource>;
|
|
532
|
-
/**
|
|
533
|
-
* Callback for risk signals collection event
|
|
534
|
-
* @param {RiskSignalsCollectionEvent} event - The risk signals collection event containing status and additional details.
|
|
535
|
-
*/
|
|
536
|
-
onRiskSignalsCollection?: (event: RiskSignalsCollectionEvent) => void;
|
|
537
470
|
/**
|
|
538
471
|
* Options that affect how all embedded components under this instance render
|
|
539
472
|
*/
|
package/dist/init.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ConnectElementTagName, IStripeConnectInitParams, StripeConnectInstance, StripeConnectWrapper } from "./exportedTypes/shared";
|
|
2
2
|
export type ConnectElementHTMLName = `stripe-connect-${ConnectElementTagName}`;
|
|
3
|
-
export declare const componentNameMapping: Record<"
|
|
3
|
+
export declare const componentNameMapping: Record<"account-onboarding" | "disputes-list" | "payments" | "payment-details" | "payment-disputes" | "payouts" | "payouts-list" | "payout-details" | "balances" | "account-management" | "notification-banner" | "instant-payouts-promotion" | "issuing-card" | "issuing-cards-list" | "financial-account" | "financial-account-transactions" | "documents" | "tax-registrations" | "tax-settings" | "balance-report" | "payout-reconciliation-report", "stripe-connect-account-onboarding" | "stripe-connect-disputes-list" | "stripe-connect-payments" | "stripe-connect-payment-details" | "stripe-connect-payment-disputes" | "stripe-connect-payouts" | "stripe-connect-payouts-list" | "stripe-connect-payout-details" | "stripe-connect-balances" | "stripe-connect-account-management" | "stripe-connect-notification-banner" | "stripe-connect-instant-payouts-promotion" | "stripe-connect-issuing-card" | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" | "stripe-connect-documents" | "stripe-connect-tax-registrations" | "stripe-connect-tax-settings" | "stripe-connect-balance-report" | "stripe-connect-payout-reconciliation-report">;
|
|
4
4
|
type StripeConnectInstanceExtended = StripeConnectInstance & {
|
|
5
5
|
debugInstance: () => Promise<StripeConnectInstance>;
|
|
6
6
|
};
|
package/dist/pure.esm.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
// Source of truth for the entire list of components. When you add a new component, it should be added here.
|
|
3
|
-
const connectElementTagNames = ["
|
|
3
|
+
const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
|
|
4
4
|
const ConnectElementCommonMethodConfig = {
|
|
5
5
|
setOnLoadError: _listener => {},
|
|
6
6
|
setOnLoaderStart: _listener => {}
|
|
7
7
|
};
|
|
8
8
|
const ConnectElementCustomMethodConfig = {
|
|
9
|
-
payments: {
|
|
10
|
-
setDefaultFilters: _filters => {}
|
|
11
|
-
},
|
|
12
|
-
"payment-details": {
|
|
13
|
-
setPayment: _payment => {},
|
|
14
|
-
setOnClose: _listener => {}
|
|
15
|
-
},
|
|
16
|
-
"payment-disputes": {
|
|
17
|
-
setPayment: _payment => {},
|
|
18
|
-
setOnDisputesLoaded: _listener => {}
|
|
19
|
-
},
|
|
20
9
|
"account-onboarding": {
|
|
21
10
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
22
11
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -55,49 +44,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
55
44
|
"financial-account-transactions": {
|
|
56
45
|
setFinancialAccount: _financialAccount => {}
|
|
57
46
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
"app-install": {
|
|
62
|
-
setApp: _app => {},
|
|
63
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
64
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
65
|
-
},
|
|
66
|
-
"app-viewport": {
|
|
67
|
-
setApp: _app => {},
|
|
68
|
-
setAppData: _appData => {}
|
|
69
|
-
},
|
|
70
|
-
"payment-method-settings": {
|
|
71
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
72
|
-
},
|
|
73
|
-
"capital-financing": {
|
|
74
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
75
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
76
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
77
|
-
setSupportUrl: _supportUrl => {},
|
|
78
|
-
setOnFinancingsLoaded: _listener => {}
|
|
79
|
-
},
|
|
80
|
-
"capital-financing-application": {
|
|
81
|
-
setOnApplicationSubmitted: _listener => {},
|
|
82
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
83
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
84
|
-
setOnApplicationStepChange: _listener => {},
|
|
85
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {}
|
|
47
|
+
payments: {
|
|
48
|
+
setDefaultFilters: _filters => {}
|
|
86
49
|
},
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
91
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
92
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
93
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
94
|
-
setOnApplicationStepChange: _listener => {}
|
|
50
|
+
"payment-details": {
|
|
51
|
+
setPayment: _payment => {},
|
|
52
|
+
setOnClose: _listener => {}
|
|
95
53
|
},
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
setIntervalEnd: _intervalEnd => {},
|
|
100
|
-
setIntervalType: _intervalType => {}
|
|
54
|
+
"payment-disputes": {
|
|
55
|
+
setPayment: _payment => {},
|
|
56
|
+
setOnDisputesLoaded: _listener => {}
|
|
101
57
|
},
|
|
102
58
|
"tax-settings": {
|
|
103
59
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -109,29 +65,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
109
65
|
setDisplayCountries: _countries => {},
|
|
110
66
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
111
67
|
},
|
|
112
|
-
"tax-threshold-monitoring": {
|
|
113
|
-
setDisplayCountries: _countries => {}
|
|
114
|
-
},
|
|
115
|
-
"product-tax-code-selector": {
|
|
116
|
-
setOnTaxCodeSelect: _listener => {},
|
|
117
|
-
setHideDescription: _hideDescription => {},
|
|
118
|
-
setDisabled: _disabled => {},
|
|
119
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
120
|
-
},
|
|
121
|
-
"export-tax-transactions": {},
|
|
122
68
|
"payout-details": {
|
|
123
69
|
setPayout: _payout => {},
|
|
124
70
|
setOnClose: _listener => {}
|
|
125
71
|
},
|
|
126
|
-
"check-scanning": {
|
|
127
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
128
|
-
},
|
|
129
|
-
"agentic-commerce-settings": {
|
|
130
|
-
setOnAgreementUpdated: _listener => {}
|
|
131
|
-
},
|
|
132
|
-
"terminal-hardware-shop": {
|
|
133
|
-
setOnCheckoutFinished: _listener => {}
|
|
134
|
-
},
|
|
135
72
|
"payout-reconciliation-report": {
|
|
136
73
|
setOnReportAvailabilityLoaded: _listener => {}
|
|
137
74
|
}
|
|
@@ -237,7 +174,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
237
174
|
element[method] = function (value) {
|
|
238
175
|
stripeConnectInstance.then(() => {
|
|
239
176
|
if (!this[`${method}InternalOnly`]) {
|
|
240
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6
|
|
177
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6`);
|
|
241
178
|
}
|
|
242
179
|
this[`${method}InternalOnly`](value);
|
|
243
180
|
});
|
|
@@ -291,7 +228,7 @@ const createWrapper = stripeConnect => {
|
|
|
291
228
|
sdk: true,
|
|
292
229
|
sdkOptions: {
|
|
293
230
|
// This will be replaced by the npm package version when bundling
|
|
294
|
-
sdkVersion: "3.4.6
|
|
231
|
+
sdkVersion: "3.4.6"
|
|
295
232
|
}
|
|
296
233
|
})
|
|
297
234
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -4,23 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
// Source of truth for the entire list of components. When you add a new component, it should be added here.
|
|
7
|
-
const connectElementTagNames = ["
|
|
7
|
+
const connectElementTagNames = ["account-onboarding", "disputes-list", "payments", "payment-details", "payment-disputes", "payouts", "payouts-list", "payout-details", "balances", "account-management", "notification-banner", "instant-payouts-promotion", "issuing-card", "issuing-cards-list", "financial-account", "financial-account-transactions", "documents", "tax-registrations", "tax-settings", "balance-report", "payout-reconciliation-report"];
|
|
8
8
|
const ConnectElementCommonMethodConfig = {
|
|
9
9
|
setOnLoadError: _listener => {},
|
|
10
10
|
setOnLoaderStart: _listener => {}
|
|
11
11
|
};
|
|
12
12
|
const ConnectElementCustomMethodConfig = {
|
|
13
|
-
payments: {
|
|
14
|
-
setDefaultFilters: _filters => {}
|
|
15
|
-
},
|
|
16
|
-
"payment-details": {
|
|
17
|
-
setPayment: _payment => {},
|
|
18
|
-
setOnClose: _listener => {}
|
|
19
|
-
},
|
|
20
|
-
"payment-disputes": {
|
|
21
|
-
setPayment: _payment => {},
|
|
22
|
-
setOnDisputesLoaded: _listener => {}
|
|
23
|
-
},
|
|
24
13
|
"account-onboarding": {
|
|
25
14
|
setFullTermsOfServiceUrl: _termOfServiceUrl => {},
|
|
26
15
|
setRecipientTermsOfServiceUrl: _recipientTermsOfServiceUrl => {},
|
|
@@ -59,49 +48,16 @@ const ConnectElementCustomMethodConfig = {
|
|
|
59
48
|
"financial-account-transactions": {
|
|
60
49
|
setFinancialAccount: _financialAccount => {}
|
|
61
50
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
"app-install": {
|
|
66
|
-
setApp: _app => {},
|
|
67
|
-
setOnAppInstallStateFetched: _listener => {},
|
|
68
|
-
setOnAppInstallStateChanged: _listener => {}
|
|
69
|
-
},
|
|
70
|
-
"app-viewport": {
|
|
71
|
-
setApp: _app => {},
|
|
72
|
-
setAppData: _appData => {}
|
|
73
|
-
},
|
|
74
|
-
"payment-method-settings": {
|
|
75
|
-
setPaymentMethodConfiguration: _paymentMethodConfiguration => {}
|
|
76
|
-
},
|
|
77
|
-
"capital-financing": {
|
|
78
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {},
|
|
79
|
-
setShowFinancingSelector: _showFinancingSelector => {},
|
|
80
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
81
|
-
setSupportUrl: _supportUrl => {},
|
|
82
|
-
setOnFinancingsLoaded: _listener => {}
|
|
83
|
-
},
|
|
84
|
-
"capital-financing-application": {
|
|
85
|
-
setOnApplicationSubmitted: _listener => {},
|
|
86
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
87
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
88
|
-
setOnApplicationStepChange: _listener => {},
|
|
89
|
-
setDefaultFinancingOffer: _defaultFinancingOffer => {}
|
|
51
|
+
payments: {
|
|
52
|
+
setDefaultFilters: _filters => {}
|
|
90
53
|
},
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
setOnEligibleFinancingOfferLoaded: _listener => {},
|
|
95
|
-
setPrivacyPolicyUrl: _privacyPolicyUrl => {},
|
|
96
|
-
setHowCapitalWorksUrl: _howCapitalWorksUrl => {},
|
|
97
|
-
setEligibilityCriteriaUrl: _eligibilityCriteriaUrl => {},
|
|
98
|
-
setOnApplicationStepChange: _listener => {}
|
|
54
|
+
"payment-details": {
|
|
55
|
+
setPayment: _payment => {},
|
|
56
|
+
setOnClose: _listener => {}
|
|
99
57
|
},
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setIntervalEnd: _intervalEnd => {},
|
|
104
|
-
setIntervalType: _intervalType => {}
|
|
58
|
+
"payment-disputes": {
|
|
59
|
+
setPayment: _payment => {},
|
|
60
|
+
setOnDisputesLoaded: _listener => {}
|
|
105
61
|
},
|
|
106
62
|
"tax-settings": {
|
|
107
63
|
setHideProductTaxCodeSelector: _hidden => {},
|
|
@@ -113,29 +69,10 @@ const ConnectElementCustomMethodConfig = {
|
|
|
113
69
|
setDisplayCountries: _countries => {},
|
|
114
70
|
setOnAfterTaxRegistrationExpired: _listener => {}
|
|
115
71
|
},
|
|
116
|
-
"tax-threshold-monitoring": {
|
|
117
|
-
setDisplayCountries: _countries => {}
|
|
118
|
-
},
|
|
119
|
-
"product-tax-code-selector": {
|
|
120
|
-
setOnTaxCodeSelect: _listener => {},
|
|
121
|
-
setHideDescription: _hideDescription => {},
|
|
122
|
-
setDisabled: _disabled => {},
|
|
123
|
-
setInitialTaxCode: _initialTaxCode => {}
|
|
124
|
-
},
|
|
125
|
-
"export-tax-transactions": {},
|
|
126
72
|
"payout-details": {
|
|
127
73
|
setPayout: _payout => {},
|
|
128
74
|
setOnClose: _listener => {}
|
|
129
75
|
},
|
|
130
|
-
"check-scanning": {
|
|
131
|
-
setHandleCheckScanSubmitted: _handleCheckScanSubmitted => {}
|
|
132
|
-
},
|
|
133
|
-
"agentic-commerce-settings": {
|
|
134
|
-
setOnAgreementUpdated: _listener => {}
|
|
135
|
-
},
|
|
136
|
-
"terminal-hardware-shop": {
|
|
137
|
-
setOnCheckoutFinished: _listener => {}
|
|
138
|
-
},
|
|
139
76
|
"payout-reconciliation-report": {
|
|
140
77
|
setOnReportAvailabilityLoaded: _listener => {}
|
|
141
78
|
}
|
|
@@ -241,7 +178,7 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
241
178
|
element[method] = function (value) {
|
|
242
179
|
stripeConnectInstance.then(() => {
|
|
243
180
|
if (!this[`${method}InternalOnly`]) {
|
|
244
|
-
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6
|
|
181
|
+
throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.4.6`);
|
|
245
182
|
}
|
|
246
183
|
this[`${method}InternalOnly`](value);
|
|
247
184
|
});
|
|
@@ -295,7 +232,7 @@ const createWrapper = stripeConnect => {
|
|
|
295
232
|
sdk: true,
|
|
296
233
|
sdkOptions: {
|
|
297
234
|
// This will be replaced by the npm package version when bundling
|
|
298
|
-
sdkVersion: "3.4.6
|
|
235
|
+
sdkVersion: "3.4.6"
|
|
299
236
|
}
|
|
300
237
|
})
|
|
301
238
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/connect-js",
|
|
3
|
-
"version": "3.4.6
|
|
4
|
-
"description": "Connect.js loading utility package (
|
|
3
|
+
"version": "3.4.6",
|
|
4
|
+
"description": "Connect.js loading utility package (GA version)",
|
|
5
5
|
"main": "dist/connect.js",
|
|
6
6
|
"module": "dist/connect.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "
|
|
24
|
+
"url": "https://github.com/stripe/connect-js.git"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"Stripe",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"jest-environment-jsdom": "^29.5.0",
|
|
64
64
|
"prettier": "2.8.8",
|
|
65
65
|
"rimraf": "^2.6.2",
|
|
66
|
-
"rollup": "^2.
|
|
66
|
+
"rollup": "^2.79.2",
|
|
67
67
|
"rollup-plugin-babel": "^4.4.0",
|
|
68
68
|
"rollup-plugin-typescript2": "^0.25.3",
|
|
69
69
|
"ts-jest": "^29.1.0",
|
|
@@ -2,53 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
// Source of truth for the entire list of components. When you add a new component, it should be added here.
|
|
4
4
|
export const connectElementTagNames = [
|
|
5
|
+
"account-onboarding",
|
|
6
|
+
"disputes-list",
|
|
5
7
|
"payments",
|
|
6
|
-
"payouts",
|
|
7
8
|
"payment-details",
|
|
8
9
|
"payment-disputes",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"payouts",
|
|
11
|
+
"payouts-list",
|
|
12
|
+
"payout-details",
|
|
13
|
+
"balances",
|
|
12
14
|
"account-management",
|
|
13
15
|
"notification-banner",
|
|
14
|
-
"instant-payouts",
|
|
15
16
|
"instant-payouts-promotion",
|
|
16
17
|
"issuing-card",
|
|
17
18
|
"issuing-cards-list",
|
|
18
19
|
"financial-account",
|
|
19
20
|
"financial-account-transactions",
|
|
20
|
-
"recipients",
|
|
21
|
-
"capital-financing",
|
|
22
|
-
"capital-financing-application",
|
|
23
|
-
"capital-financing-promotion",
|
|
24
|
-
"capital-overview",
|
|
25
21
|
"documents",
|
|
26
|
-
"product-tax-code-selector",
|
|
27
|
-
"export-tax-transactions",
|
|
28
22
|
"tax-registrations",
|
|
29
23
|
"tax-settings",
|
|
30
|
-
"tax-threshold-monitoring",
|
|
31
|
-
"balances",
|
|
32
|
-
"payouts-list",
|
|
33
|
-
"payout-details",
|
|
34
|
-
"app-install",
|
|
35
|
-
"app-viewport",
|
|
36
|
-
"reporting-chart",
|
|
37
|
-
"check-scanning",
|
|
38
|
-
"agentic-commerce-settings",
|
|
39
|
-
"terminal-hardware-orders",
|
|
40
|
-
"terminal-hardware-shop",
|
|
41
|
-
"network-cost-passthrough-report",
|
|
42
24
|
"balance-report",
|
|
43
25
|
"payout-reconciliation-report",
|
|
44
|
-
"recipients-list",
|
|
45
|
-
"financial-accounts",
|
|
46
|
-
"financial-accounts-transactions",
|
|
47
|
-
"bills",
|
|
48
26
|
] as const;
|
|
49
27
|
|
|
50
28
|
// BEGIN: Setter definitions. All setters and their associated types are defined here. When adding a new component, if it has setters, they should be added here as well.
|
|
51
|
-
|
|
52
29
|
export type FetchEphemeralKeyFunction = (fetchParams: {
|
|
53
30
|
issuingCard: string;
|
|
54
31
|
nonce: string;
|
|
@@ -189,11 +166,6 @@ export type NotificationCount = {
|
|
|
189
166
|
actionRequired: number;
|
|
190
167
|
};
|
|
191
168
|
|
|
192
|
-
export type InstallState = {
|
|
193
|
-
appId: string;
|
|
194
|
-
state: "INSTALLED" | "UNINSTALLED";
|
|
195
|
-
};
|
|
196
|
-
|
|
197
169
|
export type LoaderStart = {
|
|
198
170
|
elementTagName: string;
|
|
199
171
|
};
|
|
@@ -216,19 +188,6 @@ export type EmbeddedError = {
|
|
|
216
188
|
message?: string;
|
|
217
189
|
};
|
|
218
190
|
|
|
219
|
-
export type FinancingProductType = {
|
|
220
|
-
productType: "standard" | "refill" | "none";
|
|
221
|
-
activeFinancingCount: number;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
export type FinancingPromotionLayoutType = "full" | "banner";
|
|
225
|
-
|
|
226
|
-
export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
|
|
227
|
-
|
|
228
|
-
export type ReportName = "gross_volume" | "net_volume";
|
|
229
|
-
|
|
230
|
-
export type RecipientDataSource = "customers";
|
|
231
|
-
|
|
232
191
|
export type EmbeddedErrorType =
|
|
233
192
|
/**
|
|
234
193
|
* Failure to connect to Stripe's API.
|
|
@@ -269,21 +228,6 @@ export const ConnectElementCommonMethodConfig = {
|
|
|
269
228
|
};
|
|
270
229
|
|
|
271
230
|
export const ConnectElementCustomMethodConfig = {
|
|
272
|
-
payments: {
|
|
273
|
-
setDefaultFilters: (
|
|
274
|
-
_filters: PaymentsListDefaultFilters | undefined
|
|
275
|
-
): void => {},
|
|
276
|
-
},
|
|
277
|
-
"payment-details": {
|
|
278
|
-
setPayment: (_payment: string | undefined): void => {},
|
|
279
|
-
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
280
|
-
},
|
|
281
|
-
"payment-disputes": {
|
|
282
|
-
setPayment: (_payment: string | undefined): void => {},
|
|
283
|
-
setOnDisputesLoaded: (
|
|
284
|
-
_listener: (({ total }: { total: number }) => void) | undefined
|
|
285
|
-
): void => {},
|
|
286
|
-
},
|
|
287
231
|
"account-onboarding": {
|
|
288
232
|
setFullTermsOfServiceUrl: (
|
|
289
233
|
_termOfServiceUrl: string | undefined
|
|
@@ -352,87 +296,21 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
352
296
|
"financial-account-transactions": {
|
|
353
297
|
setFinancialAccount: (_financialAccount: string): void => {},
|
|
354
298
|
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
"app-install": {
|
|
359
|
-
setApp: (_app: string | undefined): void => {},
|
|
360
|
-
setOnAppInstallStateFetched: (
|
|
361
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
362
|
-
): void => {},
|
|
363
|
-
setOnAppInstallStateChanged: (
|
|
364
|
-
_listener: (({ appId, state }: InstallState) => void) | undefined
|
|
299
|
+
payments: {
|
|
300
|
+
setDefaultFilters: (
|
|
301
|
+
_filters: PaymentsListDefaultFilters | undefined
|
|
365
302
|
): void => {},
|
|
366
303
|
},
|
|
367
|
-
"
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
},
|
|
371
|
-
"payment-method-settings": {
|
|
372
|
-
setPaymentMethodConfiguration: (
|
|
373
|
-
_paymentMethodConfiguration: string | undefined
|
|
374
|
-
): void => {},
|
|
304
|
+
"payment-details": {
|
|
305
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
306
|
+
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
375
307
|
},
|
|
376
|
-
"
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
): void => {},
|
|
380
|
-
setShowFinancingSelector: (
|
|
381
|
-
_showFinancingSelector: boolean | undefined
|
|
382
|
-
): void => {},
|
|
383
|
-
setHowCapitalWorksUrl: (
|
|
384
|
-
_howCapitalWorksUrl: string | undefined
|
|
385
|
-
): void => {},
|
|
386
|
-
setSupportUrl: (_supportUrl: string | undefined): void => {},
|
|
387
|
-
setOnFinancingsLoaded: (
|
|
308
|
+
"payment-disputes": {
|
|
309
|
+
setPayment: (_payment: string | undefined): void => {},
|
|
310
|
+
setOnDisputesLoaded: (
|
|
388
311
|
_listener: (({ total }: { total: number }) => void) | undefined
|
|
389
312
|
): void => {},
|
|
390
313
|
},
|
|
391
|
-
"capital-financing-application": {
|
|
392
|
-
setOnApplicationSubmitted: (
|
|
393
|
-
_listener: (() => void) | undefined
|
|
394
|
-
): void => {},
|
|
395
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
396
|
-
setHowCapitalWorksUrl: (
|
|
397
|
-
_howCapitalWorksUrl: string | undefined
|
|
398
|
-
): void => {},
|
|
399
|
-
setOnApplicationStepChange: (
|
|
400
|
-
_listener: (({ step }: StepChange) => void) | undefined
|
|
401
|
-
): void => {},
|
|
402
|
-
setDefaultFinancingOffer: (
|
|
403
|
-
_defaultFinancingOffer: string | undefined
|
|
404
|
-
): void => {},
|
|
405
|
-
},
|
|
406
|
-
"capital-financing-promotion": {
|
|
407
|
-
setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
|
|
408
|
-
setOnApplicationSubmitted: (
|
|
409
|
-
_listener: (() => void) | undefined
|
|
410
|
-
): void => {},
|
|
411
|
-
setOnEligibleFinancingOfferLoaded: (
|
|
412
|
-
_listener:
|
|
413
|
-
| (({
|
|
414
|
-
productType,
|
|
415
|
-
activeFinancingCount,
|
|
416
|
-
}: FinancingProductType) => void)
|
|
417
|
-
| undefined
|
|
418
|
-
): void => {},
|
|
419
|
-
setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
|
|
420
|
-
setHowCapitalWorksUrl: (
|
|
421
|
-
_howCapitalWorksUrl: string | undefined
|
|
422
|
-
): void => {},
|
|
423
|
-
setEligibilityCriteriaUrl: (
|
|
424
|
-
_eligibilityCriteriaUrl: string | undefined
|
|
425
|
-
): void => {},
|
|
426
|
-
setOnApplicationStepChange: (
|
|
427
|
-
_listener: (({ step }: StepChange) => void) | undefined
|
|
428
|
-
): void => {},
|
|
429
|
-
},
|
|
430
|
-
"reporting-chart": {
|
|
431
|
-
setReportName: (_reportName: ReportName): void => {},
|
|
432
|
-
setIntervalStart: (_intervalStart: Date | undefined): void => {},
|
|
433
|
-
setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
|
|
434
|
-
setIntervalType: (_intervalType: IntervalType | undefined): void => {},
|
|
435
|
-
},
|
|
436
314
|
"tax-settings": {
|
|
437
315
|
setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
|
|
438
316
|
setDisplayHeadOfficeCountries: (
|
|
@@ -451,46 +329,10 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
451
329
|
_listener: (({ id }: { id: string }) => void) | undefined
|
|
452
330
|
): void => {},
|
|
453
331
|
},
|
|
454
|
-
"tax-threshold-monitoring": {
|
|
455
|
-
setDisplayCountries: (_countries: string[] | undefined): void => {},
|
|
456
|
-
},
|
|
457
|
-
"product-tax-code-selector": {
|
|
458
|
-
setOnTaxCodeSelect: (
|
|
459
|
-
_listener:
|
|
460
|
-
| ((
|
|
461
|
-
taxCode: string | null,
|
|
462
|
-
_: { analyticsName: string } | null
|
|
463
|
-
) => void)
|
|
464
|
-
| undefined
|
|
465
|
-
): void => {},
|
|
466
|
-
setHideDescription: (_hideDescription: boolean | undefined): void => {},
|
|
467
|
-
setDisabled: (_disabled: boolean | undefined): void => {},
|
|
468
|
-
setInitialTaxCode: (_initialTaxCode: string | undefined): void => {},
|
|
469
|
-
},
|
|
470
|
-
"export-tax-transactions": {},
|
|
471
332
|
"payout-details": {
|
|
472
333
|
setPayout: (_payout: string | undefined): void => {},
|
|
473
334
|
setOnClose: (_listener: (() => void) | undefined): void => {},
|
|
474
335
|
},
|
|
475
|
-
"check-scanning": {
|
|
476
|
-
setHandleCheckScanSubmitted: (
|
|
477
|
-
_handleCheckScanSubmitted: ({
|
|
478
|
-
checkScanToken,
|
|
479
|
-
}: {
|
|
480
|
-
checkScanToken: string;
|
|
481
|
-
}) => Promise<void>
|
|
482
|
-
): void => {},
|
|
483
|
-
},
|
|
484
|
-
"agentic-commerce-settings": {
|
|
485
|
-
setOnAgreementUpdated: (
|
|
486
|
-
_listener:
|
|
487
|
-
| (({ agreementId }: { agreementId: string }) => void)
|
|
488
|
-
| undefined
|
|
489
|
-
): void => {},
|
|
490
|
-
},
|
|
491
|
-
"terminal-hardware-shop": {
|
|
492
|
-
setOnCheckoutFinished: (_listener: (() => void) | undefined): void => {},
|
|
493
|
-
},
|
|
494
336
|
"payout-reconciliation-report": {
|
|
495
337
|
setOnReportAvailabilityLoaded: (
|
|
496
338
|
_listener:
|
|
@@ -2,8 +2,6 @@ import type {
|
|
|
2
2
|
ConnectElementCommonMethodConfig,
|
|
3
3
|
ConnectElementCustomMethodConfig,
|
|
4
4
|
connectElementTagNames,
|
|
5
|
-
EmbeddedError,
|
|
6
|
-
EmbeddedErrorType,
|
|
7
5
|
} from "../components/componentsAndSetters";
|
|
8
6
|
|
|
9
7
|
export type LoadConnectAndInitialize = (
|
|
@@ -518,67 +516,6 @@ export type IStripeConnectUpdateParams = {
|
|
|
518
516
|
displayOptions?: IStripeConnectDisplayOptions;
|
|
519
517
|
};
|
|
520
518
|
|
|
521
|
-
/**
|
|
522
|
-
* Reasons why risk signals collection was skipped.
|
|
523
|
-
*/
|
|
524
|
-
export type RiskSignalsCollectionSkippedReason =
|
|
525
|
-
/**
|
|
526
|
-
* Required component (account_onboarding) not enabled.
|
|
527
|
-
*/
|
|
528
|
-
| "required_component_not_enabled"
|
|
529
|
-
/**
|
|
530
|
-
* The account doesn't have a risk signals collection requirement.
|
|
531
|
-
*/
|
|
532
|
-
| "not_required"
|
|
533
|
-
/**
|
|
534
|
-
* The risk signals collection requirement has already been fulfilled.
|
|
535
|
-
*/
|
|
536
|
-
| "requirement_fulfilled";
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Error types that can occur during risk signals collection.
|
|
540
|
-
*/
|
|
541
|
-
export type RiskSignalsCollectionErrorType = Extract<
|
|
542
|
-
EmbeddedErrorType,
|
|
543
|
-
| "api_connection_error"
|
|
544
|
-
| "invalid_request_error"
|
|
545
|
-
| "rate_limit_error"
|
|
546
|
-
| "api_error"
|
|
547
|
-
>;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Errors that can occur during risk signals collection.
|
|
551
|
-
*/
|
|
552
|
-
export type RiskSignalsCollectionError =
|
|
553
|
-
/**
|
|
554
|
-
* Error occurred during general Connect.js loading.
|
|
555
|
-
*/
|
|
556
|
-
| { type: "load_error"; loadError: EmbeddedError }
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* Error occurred during risk signals collection.
|
|
560
|
-
*/
|
|
561
|
-
| { type: RiskSignalsCollectionErrorType; message?: string };
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Event emitted during risk signals collection.
|
|
565
|
-
*/
|
|
566
|
-
export declare type RiskSignalsCollectionEvent =
|
|
567
|
-
/**
|
|
568
|
-
* Risk signals collection completed and successfully received by Stripe.
|
|
569
|
-
*/
|
|
570
|
-
| { status: "completed" }
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* Risk signals collection skipped with reason.
|
|
574
|
-
*/
|
|
575
|
-
| { status: "skipped"; skippedReason: RiskSignalsCollectionSkippedReason }
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Risk signals collection failed due to error and was not sent to Stripe server.
|
|
579
|
-
*/
|
|
580
|
-
| { status: "failed"; error: RiskSignalsCollectionError };
|
|
581
|
-
|
|
582
519
|
export interface IStripeConnectDisplayOptions {
|
|
583
520
|
/**
|
|
584
521
|
* Whether embedded components should show object id's in the UI
|
|
@@ -617,12 +554,6 @@ export interface IStripeConnectInitParams {
|
|
|
617
554
|
*/
|
|
618
555
|
fonts?: Array<CssFontSource | CustomFontSource>;
|
|
619
556
|
|
|
620
|
-
/**
|
|
621
|
-
* Callback for risk signals collection event
|
|
622
|
-
* @param {RiskSignalsCollectionEvent} event - The risk signals collection event containing status and additional details.
|
|
623
|
-
*/
|
|
624
|
-
onRiskSignalsCollection?: (event: RiskSignalsCollectionEvent) => void;
|
|
625
|
-
|
|
626
557
|
/**
|
|
627
558
|
* Options that affect how all embedded components under this instance render
|
|
628
559
|
*/
|