@stripe/connect-js 3.3.25-preview-1 → 3.3.26

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/checks.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ConnectElementCustomMethodConfig } from "./config";
2
- import { ConnectElementTagName } from "./shared.d";
1
+ import type { ConnectElementCustomMethodConfig } from "./config";
2
+ import type { ConnectElementTagName } from "./shared.d";
3
3
 
4
4
  // ensure that keys of ConnectElementCustomMethodConfig are from ConnectElementTagName
5
5
  export type HasType<T, Q extends T> = Q;
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,17 @@ export const ConnectElementCustomMethodConfig = {
247
220
  _listener:
248
221
  | (({ total, actionRequired }: NotificationCount) => void)
249
222
  | undefined
250
- ): void => {}
223
+ ): void => {},
224
+ },
225
+ "instant-payouts-promotion": {
226
+ setOnInstantPayoutsPromotionLoaded: (
227
+ _listener:
228
+ | (({ promotionShown }: { promotionShown: boolean }) => void)
229
+ | undefined
230
+ ): void => {},
231
+ setOnInstantPayoutCreated: (
232
+ _listener: (({ payoutId }: { payoutId: string }) => void) | undefined
233
+ ): void => {},
251
234
  },
252
235
  "issuing-card": {
253
236
  setDefaultCard: (_defaultCard: string | undefined): void => {},
@@ -255,90 +238,35 @@ export const ConnectElementCustomMethodConfig = {
255
238
  setFetchEphemeralKey: (
256
239
  _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
257
240
  ): void => {},
258
- setShowSpendControls: (_showSpendControls: boolean | undefined): void => {}
241
+ setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
259
242
  },
260
243
  "issuing-cards-list": {
261
244
  setFetchEphemeralKey: (
262
245
  _fetchEphemeralKey: FetchEphemeralKeyFunction | undefined
263
246
  ): void => {},
264
247
  setShowSpendControls: (_showSpendControls: boolean | undefined): void => {},
265
- setIssuingProgram: (_issuingProgram: string | undefined): void => {}
248
+ setIssuingProgram: (_issuingProgram: string | undefined): void => {},
266
249
  },
267
250
  "financial-account": {
268
- setFinancialAccount: (_financialAccount: string): void => {}
251
+ setFinancialAccount: (_financialAccount: string): void => {},
269
252
  },
270
253
  "financial-account-transactions": {
271
- setFinancialAccount: (_financialAccount: string): void => {}
272
- },
273
- recipients: {
274
- setDataSource: (_dataSource: RecipientDataSource): void => {}
254
+ setFinancialAccount: (_financialAccount: string): void => {},
275
255
  },
276
- "app-install": {
277
- setApp: (_app: string | undefined): void => {},
278
- setOnAppInstallStateFetched: (
279
- _listener: (({ appId, state }: InstallState) => void) | undefined
256
+ payments: {
257
+ setDefaultFilters: (
258
+ _filters: PaymentsListDefaultFilters | undefined
280
259
  ): 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
260
  },
289
- "payment-method-settings": {
290
- setPaymentMethodConfiguration: (
291
- _paymentMethodConfiguration: string | undefined
292
- ): void => {}
261
+ "payment-details": {
262
+ setPayment: (_payment: string | undefined): void => {},
263
+ setOnClose: (_listener: (() => void) | undefined): void => {},
293
264
  },
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: (
265
+ "payment-disputes": {
266
+ setPayment: (_payment: string | undefined): void => {},
267
+ setOnDisputesLoaded: (
306
268
  _listener: (({ total }: { total: number }) => void) | undefined
307
- ): void => {}
308
- },
309
- "capital-financing-application": {
310
- setOnApplicationSubmitted: (
311
- _listener: (() => void) | undefined
312
269
  ): 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
270
  },
343
271
  "tax-settings": {
344
272
  setHideProductTaxCodeSelector: (_hidden: boolean | undefined): void => {},
@@ -347,15 +275,12 @@ export const ConnectElementCustomMethodConfig = {
347
275
  ): void => {},
348
276
  setOnTaxSettingsUpdated: (
349
277
  _listener: (({ id }: { id: string }) => void) | undefined
350
- ): void => {}
278
+ ): void => {},
351
279
  },
352
280
  "tax-registrations": {
353
281
  setOnAfterTaxRegistrationAdded: (
354
282
  _listener: (({ id }: { id: string }) => void) | undefined
355
283
  ): void => {},
356
- setDisplayCountries: (_countries: string[] | undefined): void => {}
284
+ setDisplayCountries: (_countries: string[] | undefined): void => {},
357
285
  },
358
- "tax-threshold-monitoring": {
359
- setDisplayCountries: (_countries: string[] | undefined): void => {}
360
- }
361
286
  };
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,29 +488,21 @@ 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
+ | "instant-payouts-promotion"
498
499
  | "issuing-card"
499
500
  | "issuing-cards-list"
500
501
  | "financial-account"
501
502
  | "financial-account-transactions"
502
- | "recipients"
503
- | "capital-financing"
504
- | "capital-financing-application"
505
- | "capital-financing-promotion"
506
- | "capital-overview"
503
+ | "payouts"
504
+ | "payouts-list"
505
+ | "balances"
507
506
  | "documents"
508
507
  | "tax-registrations"
509
- | "tax-settings"
510
- | "tax-threshold-monitoring"
511
- | "balances"
512
- | "payouts-list"
513
- | "app-install"
514
- | "app-viewport"
515
- | "reporting-chart";
508
+ | "tax-settings";