@outseta/react 0.4.47 → 0.5.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.
@@ -19,6 +19,8 @@ import type {
19
19
  AccountAddAccountParams,
20
20
  AccountAddPersonToAccountBody,
21
21
  AccountCancelAccountBody,
22
+ AccountExpireCurrentSubscriptionBody,
23
+ AccountExtendRenewalBody,
22
24
  AccountExtendTrialBody,
23
25
  AccountGetAllAccounts200,
24
26
  AccountGetAllAccountsParams,
@@ -1491,6 +1493,94 @@ export const useAccountExtendTrial = <TError = void,
1491
1493
  return useMutation(mutationOptions);
1492
1494
  }
1493
1495
  /**
1496
+ * Acts on the account's current subscription. The account must be in the Subscribing,
1497
+ Cancelling, Trialing, CancellingTrial or PastDue stage, and the request is rejected when
1498
+ a future subscription (a scheduled plan change) is waiting to start on the account.
1499
+
1500
+ ToDate is the new renewal date. It must be after the subscription's start date, on or
1501
+ after the date of the subscription's latest invoice, and not later than ExpirationDate.
1502
+ Moving the renewal date earlier gives no credit for the rest of the current term.
1503
+
1504
+ ExpirationDate is the date the subscription ends. Outseta ends the subscription when it
1505
+ reaches this date and sets its EndDate to it. When only ExpirationDate is sent and it is
1506
+ before the current renewal date, the renewal date moves to the expiration date.
1507
+
1508
+ Every request sets the expiration date. If ExpirationDate is omitted, the subscription's
1509
+ existing expiration date is removed, except when ToDate is later than it: then the
1510
+ expiration date moves to ToDate. To remove the expiration date, send an empty body ({}).
1511
+ To keep an expiration date while changing the renewal date, send both.
1512
+
1513
+ Times of day: ExpirationDate is first set to the time of day of the subscription's start
1514
+ date, and the checks above compare ToDate with the time of day you send. For example, with
1515
+ a subscription that started at 12:00 UTC, ToDate 2027-03-31T18:00:00Z is later than
1516
+ ExpirationDate 2027-03-31T00:00:00Z and is rejected. Send ToDate with the time of day of the
1517
+ current RenewalDate to avoid this. The saved renewal date keeps the time of day of the
1518
+ current RenewalDate.
1519
+ * @summary Set the renewal date or expiration date of the current subscription.
1520
+ */
1521
+ export const accountExtendRenewal = (
1522
+ accountUid: string | null,
1523
+ accountExtendRenewalBody: AccountExtendRenewalBody,
1524
+ options?: SecondParameter<typeof customFetch>,) => {
1525
+
1526
+
1527
+ return customFetch<Blob>(
1528
+ {url: `/api/v1/crm/accounts/${accountUid}/extend-renewal`, method: 'PUT',
1529
+ headers: {'Content-Type': 'application/json', },
1530
+ data: accountExtendRenewalBody,
1531
+ responseType: 'blob'
1532
+ },
1533
+ options);
1534
+ }
1535
+
1536
+
1537
+
1538
+ export const getAccountExtendRenewalMutationOptions = <TError = void,
1539
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof accountExtendRenewal>>, TError,{accountUid: string | null;data: AccountExtendRenewalBody}, TContext>, request?: SecondParameter<typeof customFetch>}
1540
+ ): UseMutationOptions<Awaited<ReturnType<typeof accountExtendRenewal>>, TError,{accountUid: string | null;data: AccountExtendRenewalBody}, TContext> => {
1541
+
1542
+ const mutationKey = ['accountExtendRenewal'];
1543
+ const {mutation: mutationOptions, request: requestOptions} = options ?
1544
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
1545
+ options
1546
+ : {...options, mutation: {...options.mutation, mutationKey}}
1547
+ : {mutation: { mutationKey, }, request: undefined};
1548
+
1549
+
1550
+
1551
+
1552
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof accountExtendRenewal>>, {accountUid: string | null;data: AccountExtendRenewalBody}> = (props) => {
1553
+ const {accountUid,data} = props ?? {};
1554
+
1555
+ return accountExtendRenewal(accountUid,data,requestOptions)
1556
+ }
1557
+
1558
+
1559
+
1560
+
1561
+ return { mutationFn, ...mutationOptions }}
1562
+
1563
+ export type AccountExtendRenewalMutationResult = NonNullable<Awaited<ReturnType<typeof accountExtendRenewal>>>
1564
+ export type AccountExtendRenewalMutationBody = AccountExtendRenewalBody
1565
+ export type AccountExtendRenewalMutationError = void
1566
+
1567
+ /**
1568
+ * @summary Set the renewal date or expiration date of the current subscription.
1569
+ */
1570
+ export const useAccountExtendRenewal = <TError = void,
1571
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof accountExtendRenewal>>, TError,{accountUid: string | null;data: AccountExtendRenewalBody}, TContext>, request?: SecondParameter<typeof customFetch>}
1572
+ ): UseMutationResult<
1573
+ Awaited<ReturnType<typeof accountExtendRenewal>>,
1574
+ TError,
1575
+ {accountUid: string | null;data: AccountExtendRenewalBody},
1576
+ TContext
1577
+ > => {
1578
+
1579
+ const mutationOptions = getAccountExtendRenewalMutationOptions(options);
1580
+
1581
+ return useMutation(mutationOptions);
1582
+ }
1583
+ /**
1494
1584
  * Pass personUid as a query parameter to send to a specific person, or personUid=* to send
1495
1585
  to all people on the account. If no personUid is provided, the email is sent to the
1496
1586
  primary contact.
@@ -1556,6 +1646,86 @@ export const useAccountSendConfirmationEmail = <TError = void,
1556
1646
  return useMutation(mutationOptions);
1557
1647
  }
1558
1648
  /**
1649
+ * Applies to Outseta billing (v2) only. With Stripe Billing (v3), cancel the Stripe
1650
+ subscription instead: POST /billing/stripe/subscriptions/{subscriptionUid}/cancel with
1651
+ cancelImmediately=true.
1652
+
1653
+ The subscription and its add-ons end now, and the account moves to the Expired stage
1654
+ (TrialExpired if it was in the Trialing stage). Any future subscription (a scheduled plan
1655
+ change) is deleted. Unpaid invoices on the subscription are marked uncollectible, so no
1656
+ more automatic payment attempts are made on them. You can still record a payment against
1657
+ them. No call is made to Stripe, and the payment method is not changed.
1658
+
1659
+ The request is rejected when the account is already in the Expired or TrialExpired stage,
1660
+ or when the subscription's renewal date is in the past.
1661
+
1662
+ The body is optional. Send CancelationReason and Comment to record why the account was
1663
+ cancelled. Without a body, the reason records who made the request.
1664
+ * @summary Cancel an account's current subscription immediately.
1665
+ */
1666
+ export const accountExpireCurrentSubscription = (
1667
+ accountUid: string | null,
1668
+ accountExpireCurrentSubscriptionBody: NonReadonly<AccountExpireCurrentSubscriptionBody>,
1669
+ options?: SecondParameter<typeof customFetch>,) => {
1670
+
1671
+
1672
+ return customFetch<Blob>(
1673
+ {url: `/api/v1/crm/accounts/${accountUid}/expire-current-subscription`, method: 'PUT',
1674
+ headers: {'Content-Type': 'application/json', },
1675
+ data: accountExpireCurrentSubscriptionBody,
1676
+ responseType: 'blob'
1677
+ },
1678
+ options);
1679
+ }
1680
+
1681
+
1682
+
1683
+ export const getAccountExpireCurrentSubscriptionMutationOptions = <TError = void,
1684
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof accountExpireCurrentSubscription>>, TError,{accountUid: string | null;data: NonReadonly<AccountExpireCurrentSubscriptionBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
1685
+ ): UseMutationOptions<Awaited<ReturnType<typeof accountExpireCurrentSubscription>>, TError,{accountUid: string | null;data: NonReadonly<AccountExpireCurrentSubscriptionBody>}, TContext> => {
1686
+
1687
+ const mutationKey = ['accountExpireCurrentSubscription'];
1688
+ const {mutation: mutationOptions, request: requestOptions} = options ?
1689
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
1690
+ options
1691
+ : {...options, mutation: {...options.mutation, mutationKey}}
1692
+ : {mutation: { mutationKey, }, request: undefined};
1693
+
1694
+
1695
+
1696
+
1697
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof accountExpireCurrentSubscription>>, {accountUid: string | null;data: NonReadonly<AccountExpireCurrentSubscriptionBody>}> = (props) => {
1698
+ const {accountUid,data} = props ?? {};
1699
+
1700
+ return accountExpireCurrentSubscription(accountUid,data,requestOptions)
1701
+ }
1702
+
1703
+
1704
+
1705
+
1706
+ return { mutationFn, ...mutationOptions }}
1707
+
1708
+ export type AccountExpireCurrentSubscriptionMutationResult = NonNullable<Awaited<ReturnType<typeof accountExpireCurrentSubscription>>>
1709
+ export type AccountExpireCurrentSubscriptionMutationBody = NonReadonly<AccountExpireCurrentSubscriptionBody>
1710
+ export type AccountExpireCurrentSubscriptionMutationError = void
1711
+
1712
+ /**
1713
+ * @summary Cancel an account's current subscription immediately.
1714
+ */
1715
+ export const useAccountExpireCurrentSubscription = <TError = void,
1716
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof accountExpireCurrentSubscription>>, TError,{accountUid: string | null;data: NonReadonly<AccountExpireCurrentSubscriptionBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
1717
+ ): UseMutationResult<
1718
+ Awaited<ReturnType<typeof accountExpireCurrentSubscription>>,
1719
+ TError,
1720
+ {accountUid: string | null;data: NonReadonly<AccountExpireCurrentSubscriptionBody>},
1721
+ TContext
1722
+ > => {
1723
+
1724
+ const mutationOptions = getAccountExpireCurrentSubscriptionMutationOptions(options);
1725
+
1726
+ return useMutation(mutationOptions);
1727
+ }
1728
+ /**
1559
1729
  * Returns the people associated with your account.
1560
1730
  * @summary Retrieve all people.
1561
1731
  */
@@ -990,16 +990,6 @@ export type StripeProductAllOf = {
990
990
  IsQuantityEditable?: boolean;
991
991
  /** @nullable */
992
992
  MaximumPeople?: number | null;
993
- /**
994
- * @maxLength 8
995
- * @nullable
996
- */
997
- MigratedAddOnUid?: string | null;
998
- /**
999
- * @maxLength 8
1000
- * @nullable
1001
- */
1002
- MigratedPlanUid?: string | null;
1003
993
  /** @nullable */
1004
994
  MinimumQuantity?: number | null;
1005
995
  /**
@@ -1018,7 +1008,6 @@ export type StripeProductAllOf = {
1018
1008
  TrialPeriodDays?: number;
1019
1009
  /** @nullable */
1020
1010
  TrialUntilDate?: string | null;
1021
- CanDelete?: boolean;
1022
1011
  NumberOfPurchases?: number;
1023
1012
  NumberOfSubscriptions?: number;
1024
1013
  /** @nullable */
@@ -3566,6 +3555,11 @@ export const QcountConfigSettingType = {
3566
3555
  StripeMigration_LastPreCutoverExportSubscriptionId: 579,
3567
3556
  } as const;
3568
3557
 
3558
+ export interface TeamTwoFactorSettings {
3559
+ Enabled?: boolean;
3560
+ Required?: boolean;
3561
+ }
3562
+
3569
3563
  export type DiscordServerAllOf = {
3570
3564
  /**
3571
3565
  * @maxLength 250
@@ -4875,9 +4869,17 @@ export interface ExtendTrialParams {
4875
4869
  }
4876
4870
 
4877
4871
  export interface ExtendRenewalParams {
4878
- /** @nullable */
4872
+ /**
4873
+ * The new renewal date of the subscription. Omit it to keep the current renewal date, unless
4874
+ ExpirationDate is earlier than it: then the renewal date moves to ExpirationDate.
4875
+ * @nullable
4876
+ */
4879
4877
  ToDate?: string | null;
4880
- /** @nullable */
4878
+ /**
4879
+ * The date the subscription ends. Omit it to remove the subscription's expiration date, unless
4880
+ ToDate is later than the existing expiration date: then the expiration date moves to ToDate.
4881
+ * @nullable
4882
+ */
4881
4883
  ExpirationDate?: string | null;
4882
4884
  }
4883
4885
 
@@ -5017,6 +5019,14 @@ export interface SessionFlowDataSubscriptionUpdateConfirmItemOptions {
5017
5019
  Quantity?: number | null;
5018
5020
  }
5019
5021
 
5022
+ export interface ImportResult {
5023
+ CountImported?: number;
5024
+ CountError?: number;
5025
+ CountTotal?: number;
5026
+ /** @nullable */
5027
+ ErrorMessages?: string[] | null;
5028
+ }
5029
+
5020
5030
  export interface InvoiceStatusChangeOptions {
5021
5031
  /** @nullable */
5022
5032
  NewStatus?: string | null;
@@ -6405,16 +6415,6 @@ export type AccountWebhookEntityCurrentStripeProductInstancesItem = {
6405
6415
  IsQuantityEditable?: boolean;
6406
6416
  /** @nullable */
6407
6417
  MaximumPeople?: number | null;
6408
- /**
6409
- * @maxLength 8
6410
- * @nullable
6411
- */
6412
- MigratedAddOnUid?: string | null;
6413
- /**
6414
- * @maxLength 8
6415
- * @nullable
6416
- */
6417
- MigratedPlanUid?: string | null;
6418
6418
  /** @nullable */
6419
6419
  MinimumQuantity?: number | null;
6420
6420
  /**
@@ -6431,7 +6431,6 @@ export type AccountWebhookEntityCurrentStripeProductInstancesItem = {
6431
6431
  TrialPeriodDays?: number;
6432
6432
  /** @nullable */
6433
6433
  TrialUntilDate?: string | null;
6434
- CanDelete?: boolean;
6435
6434
  NumberOfPurchases?: number;
6436
6435
  NumberOfSubscriptions?: number;
6437
6436
  /** @nullable */
@@ -10132,6 +10131,16 @@ export type AccountCancelAccountBody = AccountCancelation | null;
10132
10131
  */
10133
10132
  export type AccountExtendTrialBody = ExtendTrialParams | null;
10134
10133
 
10134
+ /**
10135
+ * @nullable
10136
+ */
10137
+ export type AccountExtendRenewalBody = ExtendRenewalParams | null;
10138
+
10139
+ /**
10140
+ * @nullable
10141
+ */
10142
+ export type AccountExpireCurrentSubscriptionBody = AccountCancelation | null;
10143
+
10135
10144
  export type PersonGetAllPeopleParams = {
10136
10145
  /**
10137
10146
  * Match on the person's first or last name or email address
@@ -10178,6 +10187,241 @@ export type PersonForgotPasswordBody = Person | null;
10178
10187
  */
10179
10188
  export type PersonRequestMagicLinkBody = Person | null;
10180
10189
 
10190
+ export type StripeInvoiceLineItemsGetAllParams = {
10191
+ /**
10192
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10193
+ */
10194
+ limit?: LimitParameter;
10195
+ /**
10196
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10197
+ */
10198
+ offset?: OffsetParameter;
10199
+ };
10200
+
10201
+ export type StripeInvoiceLineItemsGetAll200 = {
10202
+ metadata?: CollectionMetadata;
10203
+ items?: StripeInvoiceLineItem[];
10204
+ };
10205
+
10206
+ export type StripePaymentMethodsGetAllParams = {
10207
+ /**
10208
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10209
+ */
10210
+ limit?: LimitParameter;
10211
+ /**
10212
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10213
+ */
10214
+ offset?: OffsetParameter;
10215
+ };
10216
+
10217
+ export type StripePaymentMethodsGetAll200 = {
10218
+ metadata?: CollectionMetadata;
10219
+ items?: StripePaymentMethod[];
10220
+ };
10221
+
10222
+ export type StripePricesGetAllParams = {
10223
+ /**
10224
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10225
+ */
10226
+ limit?: LimitParameter;
10227
+ /**
10228
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10229
+ */
10230
+ offset?: OffsetParameter;
10231
+ };
10232
+
10233
+ export type StripePricesGetAll200 = {
10234
+ metadata?: CollectionMetadata;
10235
+ items?: StripePrice[];
10236
+ };
10237
+
10238
+ export type StripePromotionCodesGetAllParams = {
10239
+ /**
10240
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10241
+ */
10242
+ limit?: LimitParameter;
10243
+ /**
10244
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10245
+ */
10246
+ offset?: OffsetParameter;
10247
+ };
10248
+
10249
+ export type StripePromotionCodesGetAll200 = {
10250
+ metadata?: CollectionMetadata;
10251
+ items?: StripePromotionCode[];
10252
+ };
10253
+
10254
+ /**
10255
+ * @nullable
10256
+ */
10257
+ export type StripePromotionCodesCreateBody = StripePromotionCode | null;
10258
+
10259
+ /**
10260
+ * @nullable
10261
+ */
10262
+ export type StripePromotionCodesUpdateBody = StripePromotionCode | null;
10263
+
10264
+ export type StripeProductFamiliesGetAllParams = {
10265
+ /**
10266
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10267
+ */
10268
+ limit?: LimitParameter;
10269
+ /**
10270
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10271
+ */
10272
+ offset?: OffsetParameter;
10273
+ };
10274
+
10275
+ export type StripeProductFamiliesGetAll200 = {
10276
+ metadata?: CollectionMetadata;
10277
+ items?: StripeProductFamily[];
10278
+ };
10279
+
10280
+ /**
10281
+ * @nullable
10282
+ */
10283
+ export type StripeProductFamiliesPostBody = StripeProductFamily | null;
10284
+
10285
+ /**
10286
+ * @nullable
10287
+ */
10288
+ export type StripeProductFamiliesPutBody = StripeProductFamily | null;
10289
+
10290
+ export type StripeCouponsGetAllParams = {
10291
+ /**
10292
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10293
+ */
10294
+ limit?: LimitParameter;
10295
+ /**
10296
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10297
+ */
10298
+ offset?: OffsetParameter;
10299
+ };
10300
+
10301
+ export type StripeCouponsGetAll200 = {
10302
+ metadata?: CollectionMetadata;
10303
+ items?: StripeCoupon[];
10304
+ };
10305
+
10306
+ /**
10307
+ * @nullable
10308
+ */
10309
+ export type StripeCouponsCreateBody = StripeCoupon | null;
10310
+
10311
+ export type StripeCouponsGetRedemptionsParams = {
10312
+ /**
10313
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10314
+ */
10315
+ limit?: LimitParameter;
10316
+ /**
10317
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10318
+ */
10319
+ offset?: OffsetParameter;
10320
+ };
10321
+
10322
+ export type StripeCouponsGetRedemptions200 = {
10323
+ metadata?: CollectionMetadata;
10324
+ items?: StripeDiscount[];
10325
+ };
10326
+
10327
+ export type StripeInvoicesGetAllParams = {
10328
+ /**
10329
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10330
+ */
10331
+ limit?: LimitParameter;
10332
+ /**
10333
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10334
+ */
10335
+ offset?: OffsetParameter;
10336
+ };
10337
+
10338
+ export type StripeInvoicesGetAll200 = {
10339
+ metadata?: CollectionMetadata;
10340
+ items?: StripeInvoice[];
10341
+ };
10342
+
10343
+ /**
10344
+ * @nullable
10345
+ */
10346
+ export type StripeInvoicesPostBody = StripeInvoice | null;
10347
+
10348
+ /**
10349
+ * @nullable
10350
+ */
10351
+ export type StripeInvoicesChangeInvoiceStatusBody = InvoiceStatusChangeOptions | null;
10352
+
10353
+ /**
10354
+ * @nullable
10355
+ */
10356
+ export type StripeInvoicesIssueInvoiceCreditBody = InvoiceCreditOptions | null;
10357
+
10358
+ export type StripeSubscriptionsGetAllParams = {
10359
+ /**
10360
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10361
+ */
10362
+ limit?: LimitParameter;
10363
+ /**
10364
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10365
+ */
10366
+ offset?: OffsetParameter;
10367
+ };
10368
+
10369
+ export type StripeSubscriptionsGetAll200 = {
10370
+ metadata?: CollectionMetadata;
10371
+ items?: StripeSubscription[];
10372
+ };
10373
+
10374
+ /**
10375
+ * @nullable
10376
+ */
10377
+ export type StripeSubscriptionsCreateBody = StripeSubscription | null;
10378
+
10379
+ /**
10380
+ * @nullable
10381
+ */
10382
+ export type StripeSubscriptionsPauseCollectionBody = PauseCollectionOptions | null;
10383
+
10384
+ /**
10385
+ * @nullable
10386
+ */
10387
+ export type StripeSubscriptionsChangeBody = StripeSubscription | null;
10388
+
10389
+ /**
10390
+ * @nullable
10391
+ */
10392
+ export type StripeSubscriptionsPreviewChangeBody = StripeSubscription | null;
10393
+
10394
+ /**
10395
+ * @nullable
10396
+ */
10397
+ export type StripeSubscriptionsExtendTrialBody = ExtendSubscriptionOptions | null;
10398
+
10399
+ export type StripeProductsGetAllParams = {
10400
+ /**
10401
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
10402
+ */
10403
+ limit?: LimitParameter;
10404
+ /**
10405
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
10406
+ */
10407
+ offset?: OffsetParameter;
10408
+ };
10409
+
10410
+ export type StripeProductsGetAll200 = {
10411
+ metadata?: CollectionMetadata;
10412
+ items?: StripeProduct[];
10413
+ };
10414
+
10415
+ /**
10416
+ * @nullable
10417
+ */
10418
+ export type StripeProductsPostBody = StripeProduct | null;
10419
+
10420
+ /**
10421
+ * @nullable
10422
+ */
10423
+ export type StripeProductsPutBody = StripeProduct | null;
10424
+
10181
10425
  export type DiscountCouponGetDiscountCouponByCodeParams = {
10182
10426
  /**
10183
10427
  * The unique identifier of the plan to validate the coupon against
@@ -697,7 +697,33 @@ export const useTokenTwoFactorEnrollmentBeginEmail = <TError = string,
697
697
 
698
698
  return useMutation(mutationOptions);
699
699
  }
700
- export const tokenTwoFactorEnrollmentBeginTotp = (
700
+ /**
701
+ * Call this when `POST /api/v1/tokens` returned
702
+ `two_factor_enrollment_required` and the user chooses an authenticator
703
+ app. Post the enrollment token from that response:
704
+
705
+ { "enrollment_token": "eyJ..." }
706
+
707
+ A fresh shared secret is generated and returned in three forms so you
708
+ can present it however suits your client:
709
+
710
+ {
711
+ "challenge_token": "eyJ...",
712
+ "secret": "JBSWY3DPEHPK3PXP",
713
+ "otpauth_uri": "otpauth://totp/Acme:user@example.com?secret=...&issuer=Acme&...",
714
+ "qr_code_png_base64": "iVBORw0KGgo...",
715
+ "expires_in": 600
716
+ }
717
+
718
+ Have the user add the secret to their authenticator app (by scanning
719
+ `qr_code_png_base64`, opening `otpauth_uri`, or typing `secret`), then
720
+ confirm a code via `POST /api/v1/tokens/two-factor/enroll/totp/confirm`.
721
+ Returns `401` if the enrollment token is invalid/expired and `403` if
722
+ forced enrollment does not apply to this user. Rate limited to 5
723
+ requests per minute (`429`).
724
+ * @summary Begin authenticator-app (TOTP) enrollment during a forced-2FA login.
725
+ */
726
+ export const tokenTwoFactorEnrollmentBeginTotp = (
701
727
  params: TokenTwoFactorEnrollmentBeginTotpParams,
702
728
  options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
703
729
  ) => {
@@ -741,7 +767,10 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
741
767
 
742
768
  export type TokenTwoFactorEnrollmentBeginTotpMutationError = string
743
769
 
744
- export const useTokenTwoFactorEnrollmentBeginTotp = <TError = string,
770
+ /**
771
+ * @summary Begin authenticator-app (TOTP) enrollment during a forced-2FA login.
772
+ */
773
+ export const useTokenTwoFactorEnrollmentBeginTotp = <TError = string,
745
774
  TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof tokenTwoFactorEnrollmentBeginTotp>>, TError,{params: TokenTwoFactorEnrollmentBeginTotpParams}, TContext>, request?: SecondParameter<typeof customFetch>}
746
775
  ): UseMutationResult<
747
776
  Awaited<ReturnType<typeof tokenTwoFactorEnrollmentBeginTotp>>,
package/src/index.ts CHANGED
@@ -5,9 +5,12 @@ export type { OutsetaCredentials } from "@outseta/api-client";
5
5
  export * from "./components/index.js";
6
6
 
7
7
  // Generated React hooks and schema types
8
+ // BEGIN generated tag exports (scripts/post-generate.mjs)
8
9
  export * from "./generated/activity/activity.js";
9
- export * from "./generated/billing/billing.js";
10
+ export * from "./generated/billing-v2/billing-v2.js";
11
+ export * from "./generated/billing-v3/billing-v3.js";
10
12
  export * from "./generated/crm/crm.js";
11
13
  export * from "./generated/email/email.js";
12
14
  export * from "./generated/support/support.js";
15
+ // END generated tag exports
13
16
  export * from "./generated/outsetaAPI.schemas.js";