@stripe/connect-js 3.3.24-preview-1 → 3.3.24

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/types/config.ts CHANGED
@@ -134,11 +134,6 @@ export type NotificationCount = {
134
134
  actionRequired: number;
135
135
  };
136
136
 
137
- export type InstallState = {
138
- appId: string;
139
- state: "INSTALLED" | "UNINSTALLED";
140
- };
141
-
142
137
  export type LoaderStart = {
143
138
  elementTagName: string;
144
139
  };
@@ -157,19 +152,6 @@ export type EmbeddedError = {
157
152
  message?: string;
158
153
  };
159
154
 
160
- export type FinancingProductType = {
161
- productType: "standard" | "refill" | "none";
162
- activeFinancingCount: number;
163
- };
164
-
165
- export type FinancingPromotionLayoutType = "full" | "banner";
166
-
167
- export type IntervalType = "day" | "week" | "month" | "quarter" | "year";
168
-
169
- export type ReportName = "gross_volume" | "net_volume";
170
-
171
- export type RecipientDataSource = "customers";
172
-
173
155
  export type EmbeddedErrorType =
174
156
  /**
175
157
  * Failure to connect to Stripe's API.
@@ -202,19 +184,10 @@ export const ConnectElementCommonMethodConfig = {
202
184
  ): void => {},
203
185
  setOnLoaderStart: (
204
186
  _listener: (({ elementTagName }: LoaderStart) => void) | undefined
205
- ): void => {}
187
+ ): void => {},
206
188
  };
207
189
 
208
190
  export const ConnectElementCustomMethodConfig = {
209
- payments: {
210
- setDefaultFilters: (
211
- _filters: PaymentsListDefaultFilters | undefined
212
- ): void => {}
213
- },
214
- "payment-details": {
215
- setPayment: (_payment: string | undefined): void => {},
216
- setOnClose: (_listener: (() => void) | undefined): void => {}
217
- },
218
191
  "account-onboarding": {
219
192
  setFullTermsOfServiceUrl: (
220
193
  _termOfServiceUrl: string | undefined
@@ -232,12 +205,12 @@ export const ConnectElementCustomMethodConfig = {
232
205
  setOnExit: (_listener: (() => void) | undefined): void => {},
233
206
  setOnStepChange: (
234
207
  _listener: (({ step }: StepChange) => void) | undefined
235
- ): void => {}
208
+ ): void => {},
236
209
  },
237
210
  "account-management": {
238
211
  setCollectionOptions: (
239
212
  _collectionOptions: CollectionOptions | undefined
240
- ): void => {}
213
+ ): void => {},
241
214
  },
242
215
  "notification-banner": {
243
216
  setCollectionOptions: (
@@ -247,7 +220,7 @@ export const ConnectElementCustomMethodConfig = {
247
220
  _listener:
248
221
  | (({ total, actionRequired }: NotificationCount) => void)
249
222
  | undefined
250
- ): void => {}
223
+ ): void => {},
251
224
  },
252
225
  "issuing-card": {
253
226
  setDefaultCard: (_defaultCard: string | undefined): void => {},
@@ -255,90 +228,35 @@ export const ConnectElementCustomMethodConfig = {
255
228
  setFetchEphemeralKey: (
256
229
  _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
257
230
  ): void => {},
258
- setShowSpendControls: (_showSpendControls: boolean | undefined): void => {}
231
+ setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
259
232
  },
260
233
  "issuing-cards-list": {
261
234
  setFetchEphemeralKey: (
262
235
  _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
263
236
  ): void => {},
264
237
  setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
265
- setIssuingProgram: (_issuingProgram: string | undefined): void => {}
238
+ setIssuingProgram: (_issuingProgram: string | undefined): void => {},
266
239
  },
267
240
  "financial-account": {
268
- setFinancialAccount: (_financialAccount: string): void => {}
241
+ setFinancialAccount: (_financialAccount: string): void => {},
269
242
  },
270
243
  "financial-account-transactions": {
271
- setFinancialAccount: (_financialAccount: string): void => {}
244
+ setFinancialAccount: (_financialAccount: string): void => {},
272
245
  },
273
- recipients: {
274
- setDataSource: (_dataSource: RecipientDataSource): void => {}
275
- },
276
- "app-install": {
277
- setApp: (_app: string | undefined): void => {},
278
- setOnAppInstallStateFetched: (
279
- _listener: (({ appId, state }: InstallState) => void) | undefined
246
+ payments: {
247
+ setDefaultFilters: (
248
+ _filters: PaymentsListDefaultFilters | undefined
280
249
  ): void => {},
281
- setOnAppInstallStateChanged: (
282
- _listener: (({ appId, state }: InstallState) => void) | undefined
283
- ): void => {}
284
- },
285
- "app-viewport": {
286
- setApp: (_app: string | undefined): void => {},
287
- setAppData: (_appData: Record<string, string> | undefined): void => {}
288
250
  },
289
- "payment-method-settings": {
290
- setPaymentMethodConfiguration: (
291
- _paymentMethodConfiguration: string | undefined
292
- ): void => {}
251
+ "payment-details": {
252
+ setPayment: (_payment: string | undefined): void => {},
253
+ setOnClose: (_listener: (() => void) | undefined): void => {},
293
254
  },
294
- "capital-financing": {
295
- setDefaultFinancingOffer: (
296
- _defaultFinancingOffer: string | undefined
297
- ): void => {},
298
- setShowFinancingSelector: (
299
- _showFinancingSelector: boolean | undefined
300
- ): void => {},
301
- setHowCapitalWorksUrl: (
302
- _howCapitalWorksUrl: string | undefined
303
- ): void => {},
304
- setSupportUrl: (_supportUrl: string | undefined): void => {},
305
- setOnFinancingsLoaded: (
255
+ "payment-disputes": {
256
+ setPayment: (_payment: string | undefined): void => {},
257
+ setOnDisputesLoaded: (
306
258
  _listener: (({ total }: { total: number }) => void) | undefined
307
- ): void => {}
308
- },
309
- "capital-financing-application": {
310
- setOnApplicationSubmitted: (
311
- _listener: (() => void) | undefined
312
259
  ): void => {},
313
- setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
314
- setHowCapitalWorksUrl: (_howCapitalWorksUrl: string | undefined): void => {}
315
- },
316
- "capital-financing-promotion": {
317
- setLayout: (_layout: FinancingPromotionLayoutType | undefined): void => {},
318
- setOnApplicationSubmitted: (
319
- _listener: (() => void) | undefined
320
- ): void => {},
321
- setOnEligibleFinancingOfferLoaded: (
322
- _listener:
323
- | (({
324
- productType,
325
- activeFinancingCount
326
- }: FinancingProductType) => void)
327
- | undefined
328
- ): void => {},
329
- setPrivacyPolicyUrl: (_privacyPolicyUrl: string | undefined): void => {},
330
- setHowCapitalWorksUrl: (
331
- _howCapitalWorksUrl: string | undefined
332
- ): void => {},
333
- setEligibilityCriteriaUrl: (
334
- _eligibilityCriteriaUrl: string | undefined
335
- ): void => {}
336
- },
337
- "reporting-chart": {
338
- setReportName: (_reportName: ReportName): void => {},
339
- setIntervalStart: (_intervalStart: Date | undefined): void => {},
340
- setIntervalEnd: (_intervalEnd: Date | undefined): void => {},
341
- setIntervalType: (_intervalType: IntervalType | undefined): void => {}
342
260
  },
343
261
  "tax-settings": {
344
262
  setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
@@ -347,12 +265,12 @@ export const ConnectElementCustomMethodConfig = {
347
265
  ): void => {},
348
266
  setOnTaxSettingsUpdated: (
349
267
  _listener: (({ id }: { id: string }) => void) | undefined
350
- ): void => {}
268
+ ): void => {},
351
269
  },
352
270
  "tax-registrations": {
353
271
  setOnAfterTaxRegistrationAdded: (
354
272
  _listener: (({ id }: { id: string }) => void) | undefined
355
273
  ): void => {},
356
- setDisplayCountries: (_countries: string[] | undefined): void => {}
357
- }
274
+ setDisplayCountries: (_countries: string[] | undefined): void => {},
275
+ },
358
276
  };
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IStripeConnectInitParams, StripeConnectInstance } from "../types";
1
+ import type { IStripeConnectInitParams, StripeConnectInstance } from "../types";
2
2
 
3
3
  export declare const loadConnectAndInitialize: (
4
4
  initParams: IStripeConnectInitParams
package/types/shared.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import {
1
+ import type {
2
2
  ConnectElementCustomMethodConfig,
3
- ConnectElementCommonMethodConfig
3
+ ConnectElementCommonMethodConfig,
4
4
  } from "./config";
5
+
5
6
  export declare type LoadConnectAndInitialize = (
6
7
  initParams: IStripeConnectInitParams
7
8
  ) => StripeConnectInstance;
@@ -487,28 +488,20 @@ export interface StripeConnectInstance {
487
488
  * Tagnames to be used with the `create` method of the Connect instance.
488
489
  */
489
490
  export type ConnectElementTagName =
491
+ | "account-onboarding"
492
+ | "disputes-list"
490
493
  | "payments"
491
- | "payouts"
492
494
  | "payment-details"
493
- | "account-onboarding"
494
- | "payment-method-settings"
495
+ | "payment-disputes"
495
496
  | "account-management"
496
497
  | "notification-banner"
497
- | "instant-payouts"
498
498
  | "issuing-card"
499
499
  | "issuing-cards-list"
500
500
  | "financial-account"
501
501
  | "financial-account-transactions"
502
- | "recipients"
503
- | "capital-financing"
504
- | "capital-financing-application"
505
- | "capital-financing-promotion"
506
- | "capital-overview"
502
+ | "payouts"
503
+ | "payouts-list"
504
+ | "balances"
507
505
  | "documents"
508
506
  | "tax-registrations"
509
- | "tax-settings"
510
- | "balances"
511
- | "payouts-list"
512
- | "app-install"
513
- | "app-viewport"
514
- | "reporting-chart";
507
+ | "tax-settings";