@schematichq/schematic-components 2.37.0 → 2.39.0

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.
@@ -2273,6 +2273,12 @@ declare interface BillingProductForSubscriptionResponseData {
2273
2273
  * @memberof BillingProductForSubscriptionResponseData
2274
2274
  */
2275
2275
  subscriptionItemExternalId?: string | null;
2276
+ /**
2277
+ *
2278
+ * @type {BillingTiersMode}
2279
+ * @memberof BillingProductForSubscriptionResponseData
2280
+ */
2281
+ tiersMode?: BillingTiersMode | null;
2276
2282
  /**
2277
2283
  *
2278
2284
  * @type {Date}
@@ -5517,6 +5523,12 @@ declare interface CompanySubscriptionResponseData {
5517
5523
  * @memberof CompanySubscriptionResponseData
5518
5524
  */
5519
5525
  interval: string;
5526
+ /**
5527
+ * With interval, the subscription's billing period: 3 with month is quarterly. Read from the subscription's line items, since interval alone is month for monthly and quarterly alike.
5528
+ * @type {number}
5529
+ * @memberof CompanySubscriptionResponseData
5530
+ */
5531
+ intervalCount?: number | null;
5520
5532
  /**
5521
5533
  *
5522
5534
  * @type {boolean}
@@ -7494,7 +7506,7 @@ declare interface CustomPlanBillingResponseData {
7494
7506
  */
7495
7507
  daysUntilDue: number;
7496
7508
  /**
7497
- * When a custom plan that doesn't renew ends: the renewal the subscription stops on and the company moves to the default plan. Null for a plan that renews.
7509
+ * When a custom plan that doesn't renew ends: the renewal the subscription stops on and the company moves to the fallback plan. Null for a plan that renews.
7498
7510
  * @type {Date}
7499
7511
  * @memberof CustomPlanBillingResponseData
7500
7512
  */
@@ -8001,6 +8013,7 @@ export declare interface EmbedContextProps extends Omit<EmbedState, SettingsLaye
8001
8013
  getUpcomingInvoice: (id: string) => DebouncedApiPromise<HydrateUpcomingInvoiceResponse>;
8002
8014
  getCustomerBalance: () => DebouncedApiPromise<FetchCustomerBalanceResponse>;
8003
8015
  listInvoices: () => DebouncedApiPromise<ListInvoicesResponse>;
8016
+ getInvoiceLink: (billingInvoiceId: string) => Promise<GetInvoiceLinkResponse | undefined>;
8004
8017
  getCreditUsageByUser: (billingCreditId: string, limit?: number) => DebouncedApiPromise<GetCreditUsageByUserResponse>;
8005
8018
  getFeatureUsageByUser: (featureId: string, limit?: number) => DebouncedApiPromise<GetFeatureUsageByUserResponse>;
8006
8019
  createSetupIntent: () => DebouncedApiPromise<GetSetupIntentResponse>;
@@ -8385,6 +8398,19 @@ declare const en: {
8385
8398
  mo: string;
8386
8399
  qtr: string;
8387
8400
  yr: string;
8401
+ wk: string;
8402
+ "X days short": string;
8403
+ "X weeks short": string;
8404
+ "X months short": string;
8405
+ "X years short": string;
8406
+ "X days_one": string;
8407
+ "X days_other": string;
8408
+ "X weeks_one": string;
8409
+ "X weeks_other": string;
8410
+ "X months_one": string;
8411
+ "X months_other": string;
8412
+ "X years_one": string;
8413
+ "X years_other": string;
8388
8414
  "one time": string;
8389
8415
  "billing period": string;
8390
8416
  "billing period_one": string;
@@ -8394,6 +8420,7 @@ declare const en: {
8394
8420
  monthly: string;
8395
8421
  quarterly: string;
8396
8422
  yearly: string;
8423
+ "every period": string;
8397
8424
  "expires after purchase": string;
8398
8425
  "expires at the end of the billing period": string;
8399
8426
  "expires at the end of the next billing period": string;
@@ -10226,6 +10253,7 @@ declare interface FormatInvoiceOptions {
10226
10253
  }
10227
10254
 
10228
10255
  export declare function formatInvoices(invoices: InvoiceResponseData[] | undefined, locale: string, options?: FormatInvoiceOptions): {
10256
+ id: string;
10229
10257
  amount: string;
10230
10258
  amountDue: number;
10231
10259
  date: string;
@@ -10458,6 +10486,26 @@ declare interface GetFeatureUsageByUserResponse {
10458
10486
  params: GetFeatureUsageByUserParams;
10459
10487
  }
10460
10488
 
10489
+ /**
10490
+ *
10491
+ * @export
10492
+ * @interface GetInvoiceLinkResponse
10493
+ */
10494
+ declare interface GetInvoiceLinkResponse {
10495
+ /**
10496
+ *
10497
+ * @type {InvoiceLink}
10498
+ * @memberof GetInvoiceLinkResponse
10499
+ */
10500
+ data: InvoiceLink;
10501
+ /**
10502
+ * Input parameters
10503
+ * @type {object}
10504
+ * @memberof GetInvoiceLinkResponse
10505
+ */
10506
+ params: object;
10507
+ }
10508
+
10461
10509
  /**
10462
10510
  *
10463
10511
  * @export
@@ -10536,6 +10584,7 @@ export declare const initialContext: {
10536
10584
  getUpcomingInvoice: () => never;
10537
10585
  getCustomerBalance: () => never;
10538
10586
  listInvoices: () => never;
10587
+ getInvoiceLink: () => never;
10539
10588
  getCreditUsageByUser: () => never;
10540
10589
  getFeatureUsageByUser: () => never;
10541
10590
  createSetupIntent: () => never;
@@ -10585,6 +10634,37 @@ $color?: "primary" | "secondary" | "danger";
10585
10634
  $variant?: "filled" | "outline" | "ghost" | "text";
10586
10635
  }>> & string;
10587
10636
 
10637
+ /**
10638
+ * Components API
10639
+ * The browser-facing billing API behind the drop-in components and the schematic-react hooks. A temporary access token scopes every call to one company.
10640
+ *
10641
+ * The version of the OpenAPI document: 0.1
10642
+ *
10643
+ *
10644
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10645
+ * https://openapi-generator.tech
10646
+ * Do not edit the class manually.
10647
+ */
10648
+ /**
10649
+ *
10650
+ * @export
10651
+ * @interface InvoiceLink
10652
+ */
10653
+ declare interface InvoiceLink {
10654
+ /**
10655
+ *
10656
+ * @type {string}
10657
+ * @memberof InvoiceLink
10658
+ */
10659
+ id: string;
10660
+ /**
10661
+ *
10662
+ * @type {string}
10663
+ * @memberof InvoiceLink
10664
+ */
10665
+ url: string;
10666
+ }
10667
+
10588
10668
  /**
10589
10669
  *
10590
10670
  * @export
@@ -12932,6 +13012,12 @@ declare interface PlanVersionResponseData {
12932
13012
  * @memberof PlanVersionResponseData
12933
13013
  */
12934
13014
  planType: PlanType;
13015
+ /**
13016
+ * Where the company moves at term end when renewal_policy is migrate_to_plan. Null for any other policy.
13017
+ * @type {RenewalDestinationResponseData}
13018
+ * @memberof PlanVersionResponseData
13019
+ */
13020
+ renewalDestination?: RenewalDestinationResponseData | null;
12935
13021
  /**
12936
13022
  *
12937
13023
  * @type {RenewalPolicy}
@@ -13012,6 +13098,12 @@ declare interface PlanVersionResponseData_2 {
13012
13098
  * @memberof PlanVersionResponseData
13013
13099
  */
13014
13100
  planType: PlanType_2;
13101
+ /**
13102
+ * Where the company moves at term end when renewal_policy is migrate_to_plan. Null for any other policy.
13103
+ * @type {RenewalDestinationResponseData}
13104
+ * @memberof PlanVersionResponseData
13105
+ */
13106
+ renewalDestination?: RenewalDestinationResponseData_2 | null;
13015
13107
  /**
13016
13108
  *
13017
13109
  * @type {RenewalPolicy}
@@ -13626,6 +13718,12 @@ declare interface PreviewSubscriptionChangeResponseData {
13626
13718
  * @deprecated
13627
13719
  */
13628
13720
  trialEnd?: Date | null;
13721
+ /**
13722
+ * Features whose usage so far this billing period is not billed if this change is made, because the new plan does not charge for them and the billing period continues.
13723
+ * @type {Array<string>}
13724
+ * @memberof PreviewSubscriptionChangeResponseData
13725
+ */
13726
+ unbilledUsageFeatureIds: Array<string>;
13629
13727
  /**
13630
13728
  *
13631
13729
  * @type {Array<FeatureUsageResponseData>}
@@ -14129,6 +14227,46 @@ export declare interface RehydrateParams {
14129
14227
  includeAddOnIds?: string[];
14130
14228
  }
14131
14229
 
14230
+ /**
14231
+ *
14232
+ * @export
14233
+ * @interface RenewalDestinationResponseData
14234
+ */
14235
+ declare interface RenewalDestinationResponseData {
14236
+ /**
14237
+ *
14238
+ * @type {PlanPriceCadence}
14239
+ * @memberof RenewalDestinationResponseData
14240
+ */
14241
+ billingPeriod: PlanPriceCadence;
14242
+ /**
14243
+ *
14244
+ * @type {string}
14245
+ * @memberof RenewalDestinationResponseData
14246
+ */
14247
+ planId: string;
14248
+ }
14249
+
14250
+ /**
14251
+ *
14252
+ * @export
14253
+ * @interface RenewalDestinationResponseData
14254
+ */
14255
+ declare interface RenewalDestinationResponseData_2 {
14256
+ /**
14257
+ *
14258
+ * @type {PlanPriceCadence}
14259
+ * @memberof RenewalDestinationResponseData
14260
+ */
14261
+ billingPeriod: PlanPriceCadence_2;
14262
+ /**
14263
+ *
14264
+ * @type {string}
14265
+ * @memberof RenewalDestinationResponseData
14266
+ */
14267
+ planId: string;
14268
+ }
14269
+
14132
14270
  /**
14133
14271
  *
14134
14272
  * @export
@@ -14137,6 +14275,7 @@ declare const RenewalPolicy: {
14137
14275
  readonly AutoRenew: "auto_renew";
14138
14276
  readonly ExpireToDefault: "expire_to_default";
14139
14277
  readonly HoldWithGrace: "hold_with_grace";
14278
+ readonly MigrateToPlan: "migrate_to_plan";
14140
14279
  };
14141
14280
 
14142
14281
  declare type RenewalPolicy = (typeof RenewalPolicy)[keyof typeof RenewalPolicy];
@@ -14149,6 +14288,7 @@ declare const RenewalPolicy_2: {
14149
14288
  readonly AutoRenew: "auto_renew";
14150
14289
  readonly ExpireToDefault: "expire_to_default";
14151
14290
  readonly HoldWithGrace: "hold_with_grace";
14291
+ readonly MigrateToPlan: "migrate_to_plan";
14152
14292
  };
14153
14293
 
14154
14294
  declare type RenewalPolicy_2 = (typeof RenewalPolicy_2)[keyof typeof RenewalPolicy_2];
@@ -14935,12 +15075,24 @@ declare interface ScheduledDowngradeResponseData {
14935
15075
  * @memberof ScheduledDowngradeResponseData
14936
15076
  */
14937
15077
  interval: string;
15078
+ /**
15079
+ * With interval, the current subscription's billing period: 3 with month is quarterly.
15080
+ * @type {number}
15081
+ * @memberof ScheduledDowngradeResponseData
15082
+ */
15083
+ intervalCount: number;
14938
15084
  /**
14939
15085
  *
14940
15086
  * @type {string}
14941
15087
  * @memberof ScheduledDowngradeResponseData
14942
15088
  */
14943
15089
  scheduledInterval?: string | null;
15090
+ /**
15091
+ * With scheduled_interval, the scheduled price's billing period: 3 with month is quarterly. Null for a downgrade scheduled before the price was recorded.
15092
+ * @type {number}
15093
+ * @memberof ScheduledDowngradeResponseData
15094
+ */
15095
+ scheduledIntervalCount?: number | null;
14944
15096
  /**
14945
15097
  *
14946
15098
  * @type {number}
@@ -14978,7 +15130,7 @@ export declare const SchematicEmbed: ({ id, accessToken }: EmbedProps) => JSX.El
14978
15130
  export declare interface SchematicI18nInstance {
14979
15131
  language: string;
14980
15132
  resolvedLanguage?: string;
14981
- t(key: string, options?: Record<string, unknown>): string;
15133
+ t(key: string, options: Record<string, unknown>): string;
14982
15134
  exists(key: string, options?: Record<string, unknown>): boolean;
14983
15135
  on(event: string, listener: Listener): void;
14984
15136
  off(event: string, listener: Listener): void;
@@ -15859,6 +16011,7 @@ export declare function useAvailablePlans(activePeriod: string, options?: Availa
15859
16011
  plans: SelectedPlan[];
15860
16012
  addOns: SelectedPlan[];
15861
16013
  periods: string[];
16014
+ plansForPeriod: (period: string) => SelectedPlan[];
15862
16015
  };
15863
16016
 
15864
16017
  export declare function useCustomPlanBilling(): CustomPlanBillingState | undefined;