@schematichq/schematic-components 2.16.3 → 2.18.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.
@@ -26,6 +26,8 @@ declare interface AddOnsProps {
26
26
  currency?: string;
27
27
  }
28
28
 
29
+ export declare const applyPrefilledQuantities: (entitlements: UsageBasedEntitlement[], prefill?: Record<string, number>) => UsageBasedEntitlement[];
30
+
29
31
  export declare const AutoTopup: ({ planCreditGrants, autoTopupConfigs, updateAutoTopupConfig, }: AutoTopupProps) => JSX.Element;
30
32
 
31
33
  declare type AutoTopupConfig = Pick<CompanyPlanCreditGrantView, "companyAutoTopupEnabled" | "companyAutoTopupThresholdCredits" | "companyAutoTopupAmount">;
@@ -47,6 +49,30 @@ declare interface AvailablePlanOptions {
47
49
  useSelectedPeriod?: boolean;
48
50
  }
49
51
 
52
+ /**
53
+ *
54
+ * @export
55
+ */
56
+ declare const BillingCreditAutoTopupAvailability: {
57
+ readonly Off: "off";
58
+ readonly Automatic: "automatic";
59
+ readonly UserControlled: "user_controlled";
60
+ };
61
+
62
+ declare type BillingCreditAutoTopupAvailability = (typeof BillingCreditAutoTopupAvailability)[keyof typeof BillingCreditAutoTopupAvailability];
63
+
64
+ /**
65
+ *
66
+ * @export
67
+ */
68
+ declare const BillingCreditAutoTopupAvailability_2: {
69
+ readonly Off: "off";
70
+ readonly Automatic: "automatic";
71
+ readonly UserControlled: "user_controlled";
72
+ };
73
+
74
+ declare type BillingCreditAutoTopupAvailability_2 = (typeof BillingCreditAutoTopupAvailability_2)[keyof typeof BillingCreditAutoTopupAvailability_2];
75
+
50
76
  /**
51
77
  *
52
78
  * @export
@@ -967,8 +993,15 @@ declare interface BillingPlanCreditGrantResponseData {
967
993
  autoTopupAmountType?: string | null;
968
994
  /**
969
995
  *
996
+ * @type {BillingCreditAutoTopupAvailability}
997
+ * @memberof BillingPlanCreditGrantResponseData
998
+ */
999
+ autoTopupAvailability: BillingCreditAutoTopupAvailability;
1000
+ /**
1001
+ * Derived from auto_topup_availability; use that instead.
970
1002
  * @type {boolean}
971
1003
  * @memberof BillingPlanCreditGrantResponseData
1004
+ * @deprecated
972
1005
  */
973
1006
  autoTopupEnabled: boolean;
974
1007
  /**
@@ -990,9 +1023,10 @@ declare interface BillingPlanCreditGrantResponseData {
990
1023
  */
991
1024
  autoTopupExpiryUnitCount?: number | null;
992
1025
  /**
993
- *
1026
+ * Derived from auto_topup_availability; use that instead.
994
1027
  * @type {boolean}
995
1028
  * @memberof BillingPlanCreditGrantResponseData
1029
+ * @deprecated
996
1030
  */
997
1031
  autoTopupSelfService: boolean;
998
1032
  /**
@@ -1007,6 +1041,12 @@ declare interface BillingPlanCreditGrantResponseData {
1007
1041
  * @memberof BillingPlanCreditGrantResponseData
1008
1042
  */
1009
1043
  autoTopupThresholdPercent?: number | null;
1044
+ /**
1045
+ * Whether buyers can purchase one-time credit bundles on this grant, independent of auto top-up availability.
1046
+ * @type {boolean}
1047
+ * @memberof BillingPlanCreditGrantResponseData
1048
+ */
1049
+ canBuyBundles: boolean;
1010
1050
  /**
1011
1051
  *
1012
1052
  * @type {Date}
@@ -2901,6 +2941,19 @@ export declare interface BypassConfig {
2901
2941
  * currency is locked (the selector is already hidden in those cases).
2902
2942
  */
2903
2943
  showCurrencySelector?: boolean;
2944
+ /**
2945
+ * Pre-fill pay-in-advance quantities, keyed by feature id.
2946
+ *
2947
+ * Only applies to entitlements whose price behavior is pay-in-advance; entries
2948
+ * for other features (or unknown feature ids) are ignored. Values are clamped
2949
+ * to whole numbers >= 0. Combine with `skipped.usageStage` /
2950
+ * `skipped.addOnUsageStage` to land the customer directly on the checkout step
2951
+ * with the quantities already set.
2952
+ *
2953
+ * @example
2954
+ * { planId: "plan_abc", payInAdvanceQuantities: { feat_seats: 3 } }
2955
+ */
2956
+ payInAdvanceQuantities?: Record<string, number>;
2904
2957
  }
2905
2958
 
2906
2959
  export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement | null>>;
@@ -2930,6 +2983,12 @@ declare interface ChangeSubscriptionRequestBody {
2930
2983
  * @memberof ChangeSubscriptionRequestBody
2931
2984
  */
2932
2985
  autoTopupOverrides: Array<UpdateAutoTopupOverrideRequestBody>;
2986
+ /**
2987
+ *
2988
+ * @type {string}
2989
+ * @memberof ChangeSubscriptionRequestBody
2990
+ */
2991
+ billingEntityId?: string | null;
2933
2992
  /**
2934
2993
  *
2935
2994
  * @type {string}
@@ -3399,6 +3458,20 @@ export declare interface CheckoutStageSkipConfig {
3399
3458
  * - undefined: Defaults to false (show stage)
3400
3459
  */
3401
3460
  creditStage?: boolean;
3461
+ /**
3462
+ * Skip the pay-in-advance quantity stage for the plan.
3463
+ * - true: Skip directly to next stage (uses prefilled or current quantities)
3464
+ * - false: Show quantity stage (user can review/change quantities)
3465
+ * - undefined: Defaults to false (show stage)
3466
+ */
3467
+ usageStage?: boolean;
3468
+ /**
3469
+ * Skip the pay-in-advance quantity stage for add-ons.
3470
+ * - true: Skip directly to next stage (uses prefilled or current quantities)
3471
+ * - false: Show add-on quantity stage (user can review/change quantities)
3472
+ * - undefined: Defaults to false (show stage)
3473
+ */
3474
+ addOnUsageStage?: boolean;
3402
3475
  }
3403
3476
 
3404
3477
  export declare type CheckoutState = {
@@ -3411,11 +3484,14 @@ export declare type CheckoutState = {
3411
3484
  bypassPlanSelection?: boolean;
3412
3485
  bypassAddOnSelection?: boolean;
3413
3486
  bypassCreditsSelection?: boolean;
3487
+ bypassUsageSelection?: boolean;
3488
+ bypassAddOnUsageSelection?: boolean;
3414
3489
  addOnIds?: string[];
3415
3490
  hideSkippedStages?: boolean;
3416
3491
  selectedCurrency?: string;
3417
3492
  showCurrencySelector?: boolean;
3418
3493
  startTrialIfAvailable?: boolean;
3494
+ payInAdvanceQuantities?: Record<string, number>;
3419
3495
  };
3420
3496
 
3421
3497
  /**
@@ -3887,6 +3963,12 @@ declare interface CompanyPlanCreditGrantView {
3887
3963
  * @memberof CompanyPlanCreditGrantView
3888
3964
  */
3889
3965
  billingCreditAutoTopupAmountType?: string | null;
3966
+ /**
3967
+ *
3968
+ * @type {BillingCreditAutoTopupAvailability}
3969
+ * @memberof CompanyPlanCreditGrantView
3970
+ */
3971
+ billingCreditAutoTopupAvailability?: BillingCreditAutoTopupAvailability | null;
3890
3972
  /**
3891
3973
  *
3892
3974
  * @type {boolean}
@@ -3929,6 +4011,12 @@ declare interface CompanyPlanCreditGrantView {
3929
4011
  * @memberof CompanyPlanCreditGrantView
3930
4012
  */
3931
4013
  billingCreditAutoTopupThresholdPercent?: number | null;
4014
+ /**
4015
+ *
4016
+ * @type {boolean}
4017
+ * @memberof CompanyPlanCreditGrantView
4018
+ */
4019
+ billingCreditCanBuyBundles: boolean;
3932
4020
  /**
3933
4021
  *
3934
4022
  * @type {number}
@@ -4147,6 +4235,12 @@ declare interface CompanyPlanDetailResponseData {
4147
4235
  * @memberof CompanyPlanDetailResponseData
4148
4236
  */
4149
4237
  companyId?: string | null;
4238
+ /**
4239
+ *
4240
+ * @type {string}
4241
+ * @memberof CompanyPlanDetailResponseData
4242
+ */
4243
+ companyLogoUrl?: string | null;
4150
4244
  /**
4151
4245
  *
4152
4246
  * @type {string}
@@ -4177,6 +4271,12 @@ declare interface CompanyPlanDetailResponseData {
4177
4271
  * @memberof CompanyPlanDetailResponseData
4178
4272
  */
4179
4273
  createdAt: Date;
4274
+ /**
4275
+ *
4276
+ * @type {Array<BillingCreditResponseData>}
4277
+ * @memberof CompanyPlanDetailResponseData
4278
+ */
4279
+ credits: Array<BillingCreditResponseData>;
4180
4280
  /**
4181
4281
  *
4182
4282
  * @type {Array<PlanCurrencyPricesResponseData>}
@@ -8899,6 +8999,12 @@ declare interface PlanCreditGrantView {
8899
8999
  * @memberof PlanCreditGrantView
8900
9000
  */
8901
9001
  billingCreditAutoTopupAmountType?: string | null;
9002
+ /**
9003
+ *
9004
+ * @type {BillingCreditAutoTopupAvailability}
9005
+ * @memberof PlanCreditGrantView
9006
+ */
9007
+ billingCreditAutoTopupAvailability?: BillingCreditAutoTopupAvailability | null;
8902
9008
  /**
8903
9009
  *
8904
9010
  * @type {boolean}
@@ -8941,6 +9047,12 @@ declare interface PlanCreditGrantView {
8941
9047
  * @memberof PlanCreditGrantView
8942
9048
  */
8943
9049
  billingCreditAutoTopupThresholdPercent?: number | null;
9050
+ /**
9051
+ *
9052
+ * @type {boolean}
9053
+ * @memberof PlanCreditGrantView
9054
+ */
9055
+ billingCreditCanBuyBundles: boolean;
8944
9056
  /**
8945
9057
  *
8946
9058
  * @type {Date}
@@ -9092,6 +9204,12 @@ declare interface PlanCreditGrantView_2 {
9092
9204
  * @memberof PlanCreditGrantView
9093
9205
  */
9094
9206
  billingCreditAutoTopupAmountType?: string | null;
9207
+ /**
9208
+ *
9209
+ * @type {BillingCreditAutoTopupAvailability}
9210
+ * @memberof PlanCreditGrantView
9211
+ */
9212
+ billingCreditAutoTopupAvailability?: BillingCreditAutoTopupAvailability_2 | null;
9095
9213
  /**
9096
9214
  *
9097
9215
  * @type {boolean}
@@ -9134,6 +9252,12 @@ declare interface PlanCreditGrantView_2 {
9134
9252
  * @memberof PlanCreditGrantView
9135
9253
  */
9136
9254
  billingCreditAutoTopupThresholdPercent?: number | null;
9255
+ /**
9256
+ *
9257
+ * @type {boolean}
9258
+ * @memberof PlanCreditGrantView
9259
+ */
9260
+ billingCreditCanBuyBundles: boolean;
9137
9261
  /**
9138
9262
  *
9139
9263
  * @type {Date}
@@ -9398,6 +9522,12 @@ declare interface PlanDetailResponseData {
9398
9522
  * @memberof PlanDetailResponseData
9399
9523
  */
9400
9524
  companyId?: string | null;
9525
+ /**
9526
+ *
9527
+ * @type {string}
9528
+ * @memberof PlanDetailResponseData
9529
+ */
9530
+ companyLogoUrl?: string | null;
9401
9531
  /**
9402
9532
  *
9403
9533
  * @type {string}
@@ -9422,6 +9552,12 @@ declare interface PlanDetailResponseData {
9422
9552
  * @memberof PlanDetailResponseData
9423
9553
  */
9424
9554
  createdAt: Date;
9555
+ /**
9556
+ *
9557
+ * @type {Array<BillingCreditResponseData>}
9558
+ * @memberof PlanDetailResponseData
9559
+ */
9560
+ credits: Array<BillingCreditResponseData>;
9425
9561
  /**
9426
9562
  *
9427
9563
  * @type {Array<PlanCurrencyPricesResponseData>}
@@ -10416,6 +10552,12 @@ declare interface PlanViewPublicResponseData {
10416
10552
  * @memberof PlanViewPublicResponseData
10417
10553
  */
10418
10554
  companyId?: string | null;
10555
+ /**
10556
+ *
10557
+ * @type {string}
10558
+ * @memberof PlanViewPublicResponseData
10559
+ */
10560
+ companyLogoUrl?: string | null;
10419
10561
  /**
10420
10562
  *
10421
10563
  * @type {string}
@@ -10446,6 +10588,12 @@ declare interface PlanViewPublicResponseData {
10446
10588
  * @memberof PlanViewPublicResponseData
10447
10589
  */
10448
10590
  createdAt: Date;
10591
+ /**
10592
+ *
10593
+ * @type {Array<BillingCreditResponseData>}
10594
+ * @memberof PlanViewPublicResponseData
10595
+ */
10596
+ credits: Array<BillingCreditResponseData_2>;
10449
10597
  /**
10450
10598
  *
10451
10599
  * @type {Array<PlanCurrencyPricesResponseData>}