@schematichq/schematic-components 2.14.0 → 2.15.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.
@@ -11,7 +11,7 @@ import { IconProps as IconProps_2 } from '@schematichq/schematic-icons';
11
11
  import { iconsList } from '@schematichq/schematic-icons';
12
12
  import { InputHTMLAttributes } from 'react';
13
13
  import { IStyledComponentBase } from 'styled-components/dist/types';
14
- import { JSX } from 'react/jsx-runtime';
14
+ import { JSX } from 'react';
15
15
  import { RefAttributes } from 'react';
16
16
  import { RuleSet } from 'styled-components';
17
17
  import type { Stripe } from '@stripe/stripe-js';
@@ -283,6 +283,7 @@ declare const BillingCreditGrantReason: {
283
283
  readonly Free: "free";
284
284
  readonly Plan: "plan";
285
285
  readonly Purchased: "purchased";
286
+ readonly Rollover: "rollover";
286
287
  };
287
288
 
288
289
  declare type BillingCreditGrantReason = (typeof BillingCreditGrantReason)[keyof typeof BillingCreditGrantReason];
@@ -300,6 +301,30 @@ declare const BillingCreditGrantZeroedOutReason: {
300
301
 
301
302
  declare type BillingCreditGrantZeroedOutReason = (typeof BillingCreditGrantZeroedOutReason)[keyof typeof BillingCreditGrantZeroedOutReason];
302
303
 
304
+ /**
305
+ *
306
+ * @export
307
+ */
308
+ declare const BillingCreditLedgerAuthority: {
309
+ readonly SchematicAuthoritative: "schematic_authoritative";
310
+ readonly ExternalMirror: "external_mirror";
311
+ readonly ExternalRated: "external_rated";
312
+ };
313
+
314
+ declare type BillingCreditLedgerAuthority = (typeof BillingCreditLedgerAuthority)[keyof typeof BillingCreditLedgerAuthority];
315
+
316
+ /**
317
+ *
318
+ * @export
319
+ */
320
+ declare const BillingCreditLedgerAuthority_2: {
321
+ readonly SchematicAuthoritative: "schematic_authoritative";
322
+ readonly ExternalMirror: "external_mirror";
323
+ readonly ExternalRated: "external_rated";
324
+ };
325
+
326
+ declare type BillingCreditLedgerAuthority_2 = (typeof BillingCreditLedgerAuthority_2)[keyof typeof BillingCreditLedgerAuthority_2];
327
+
303
328
  /**
304
329
  *
305
330
  * @export
@@ -610,6 +635,12 @@ declare interface BillingCreditView {
610
635
  * @memberof BillingCreditView
611
636
  */
612
637
  id: string;
638
+ /**
639
+ *
640
+ * @type {BillingCreditLedgerAuthority}
641
+ * @memberof BillingCreditView
642
+ */
643
+ ledgerAuthority: BillingCreditLedgerAuthority;
613
644
  /**
614
645
  *
615
646
  * @type {string}
@@ -738,6 +769,12 @@ declare interface BillingCreditView_2 {
738
769
  * @memberof BillingCreditView
739
770
  */
740
771
  id: string;
772
+ /**
773
+ *
774
+ * @type {BillingCreditLedgerAuthority}
775
+ * @memberof BillingCreditView
776
+ */
777
+ ledgerAuthority: BillingCreditLedgerAuthority_2;
741
778
  /**
742
779
  *
743
780
  * @type {string}
@@ -1082,6 +1119,12 @@ declare interface BillingPlanCreditGrantResponseData {
1082
1119
  * @memberof BillingPlanCreditGrantResponseData
1083
1120
  */
1084
1121
  resetType?: BillingPlanCreditGrantResetType | null;
1122
+ /**
1123
+ * Percentage of unused credits that carry over when this grant resets. Only meaningful when reset_type is plan_period.
1124
+ * @type {number}
1125
+ * @memberof BillingPlanCreditGrantResponseData
1126
+ */
1127
+ rolloverPercentage: number;
1085
1128
  /**
1086
1129
  *
1087
1130
  * @type {Date}
@@ -2325,6 +2368,7 @@ declare interface BillingProductResponseData_2 {
2325
2368
  * @export
2326
2369
  */
2327
2370
  declare const BillingProviderType: {
2371
+ readonly Metronome: "metronome";
2328
2372
  readonly Orb: "orb";
2329
2373
  readonly Schematic: "schematic";
2330
2374
  readonly Stripe: "stripe";
@@ -2337,6 +2381,7 @@ declare type BillingProviderType = (typeof BillingProviderType)[keyof typeof Bil
2337
2381
  * @export
2338
2382
  */
2339
2383
  declare const BillingProviderType_2: {
2384
+ readonly Metronome: "metronome";
2340
2385
  readonly Orb: "orb";
2341
2386
  readonly Schematic: "schematic";
2342
2387
  readonly Stripe: "stripe";
@@ -2837,6 +2882,25 @@ export declare interface BypassConfig {
2837
2882
  * is not eligible for a trial.
2838
2883
  */
2839
2884
  startTrialIfAvailable?: boolean;
2885
+ /**
2886
+ * Currency to pre-select (e.g. "EUR"). Case-insensitive.
2887
+ *
2888
+ * Useful for flows that skip the plan stage: the host can pin the checkout
2889
+ * to a currency the customer never had a chance to choose. Ignored when the
2890
+ * company already has an active subscription (its currency is locked), or
2891
+ * when the value is not among the available currencies — in which case the
2892
+ * checkout falls back to the first available currency.
2893
+ */
2894
+ currency?: string;
2895
+ /**
2896
+ * Whether to show the currency selector dropdown in checkout. Default: true.
2897
+ *
2898
+ * Set to false to hide the dropdown entirely — combine with `currency` to
2899
+ * pin checkout to a single currency the customer cannot change. Has no
2900
+ * effect when there is only one available currency or the subscription
2901
+ * currency is locked (the selector is already hidden in those cases).
2902
+ */
2903
+ showCurrencySelector?: boolean;
2840
2904
  }
2841
2905
 
2842
2906
  export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement | null>>;
@@ -2878,6 +2942,12 @@ declare interface ChangeSubscriptionRequestBody {
2878
2942
  * @memberof ChangeSubscriptionRequestBody
2879
2943
  */
2880
2944
  creditBundles: Array<UpdateCreditBundleRequestBody>;
2945
+ /**
2946
+ *
2947
+ * @type {Array<CheckoutFieldValue>}
2948
+ * @memberof ChangeSubscriptionRequestBody
2949
+ */
2950
+ customFieldValues: Array<CheckoutFieldValue>;
2881
2951
  /**
2882
2952
  *
2883
2953
  * @type {string}
@@ -2890,6 +2960,12 @@ declare interface ChangeSubscriptionRequestBody {
2890
2960
  * @memberof ChangeSubscriptionRequestBody
2891
2961
  */
2892
2962
  newPriceId: string;
2963
+ /**
2964
+ *
2965
+ * @type {boolean}
2966
+ * @memberof ChangeSubscriptionRequestBody
2967
+ */
2968
+ optInAccepted?: boolean | null;
2893
2969
  /**
2894
2970
  *
2895
2971
  * @type {Array<UpdatePayInAdvanceRequestBody>}
@@ -2963,6 +3039,98 @@ declare interface CheckoutDialogProps {
2963
3039
  top?: number;
2964
3040
  }
2965
3041
 
3042
+ /**
3043
+ * Schematic API
3044
+ * Schematic API
3045
+ *
3046
+ * The version of the OpenAPI document: 0.1
3047
+ *
3048
+ *
3049
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3050
+ * https://openapi-generator.tech
3051
+ * Do not edit the class manually.
3052
+ */
3053
+ /**
3054
+ *
3055
+ * @export
3056
+ * @interface CheckoutFieldValue
3057
+ */
3058
+ declare interface CheckoutFieldValue {
3059
+ /**
3060
+ *
3061
+ * @type {string}
3062
+ * @memberof CheckoutFieldValue
3063
+ */
3064
+ id: string;
3065
+ /**
3066
+ *
3067
+ * @type {string}
3068
+ * @memberof CheckoutFieldValue
3069
+ */
3070
+ value: string;
3071
+ }
3072
+
3073
+ /**
3074
+ * Schematic API
3075
+ * Schematic API
3076
+ *
3077
+ * The version of the OpenAPI document: 0.1
3078
+ *
3079
+ *
3080
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3081
+ * https://openapi-generator.tech
3082
+ * Do not edit the class manually.
3083
+ */
3084
+ /**
3085
+ *
3086
+ * @export
3087
+ * @interface CheckoutFieldWithValue
3088
+ */
3089
+ declare interface CheckoutFieldWithValue {
3090
+ /**
3091
+ *
3092
+ * @type {string}
3093
+ * @memberof CheckoutFieldWithValue
3094
+ */
3095
+ definitionId: string;
3096
+ /**
3097
+ *
3098
+ * @type {string}
3099
+ * @memberof CheckoutFieldWithValue
3100
+ */
3101
+ helperText?: string | null;
3102
+ /**
3103
+ *
3104
+ * @type {string}
3105
+ * @memberof CheckoutFieldWithValue
3106
+ */
3107
+ id: string;
3108
+ /**
3109
+ *
3110
+ * @type {string}
3111
+ * @memberof CheckoutFieldWithValue
3112
+ */
3113
+ name: string;
3114
+ /**
3115
+ *
3116
+ * @type {boolean}
3117
+ * @memberof CheckoutFieldWithValue
3118
+ */
3119
+ required: boolean;
3120
+ /**
3121
+ *
3122
+ * @type {string}
3123
+ * @memberof CheckoutFieldWithValue
3124
+ */
3125
+ stripeMetadataKey: string;
3126
+ /**
3127
+ *
3128
+ * @type {string}
3129
+ * @memberof CheckoutFieldWithValue
3130
+ */
3131
+ value?: string | null;
3132
+ }
3133
+
2966
3134
  /**
2967
3135
  * Configuration for pre-populating the checkout flow with host-provided values.
2968
3136
  *
@@ -3236,6 +3404,7 @@ export declare type CheckoutState = {
3236
3404
  addOnIds?: string[];
3237
3405
  hideSkippedStages?: boolean;
3238
3406
  selectedCurrency?: string;
3407
+ showCurrencySelector?: boolean;
3239
3408
  startTrialIfAvailable?: boolean;
3240
3409
  };
3241
3410
 
@@ -3880,6 +4049,12 @@ declare interface CompanyPlanCreditGrantView {
3880
4049
  * @memberof CompanyPlanCreditGrantView
3881
4050
  */
3882
4051
  resetType: BillingPlanCreditGrantResetType;
4052
+ /**
4053
+ *
4054
+ * @type {number}
4055
+ * @memberof CompanyPlanCreditGrantView
4056
+ */
4057
+ rolloverPercentage: number;
3883
4058
  /**
3884
4059
  * Deprecated field, will be removed in the future. Use Credit.SingularName instead.
3885
4060
  * @type {string}
@@ -4729,6 +4904,12 @@ declare interface ComponentHydrateResponseData {
4729
4904
  * @memberof ComponentHydrateResponseData
4730
4905
  */
4731
4906
  creditGrants: Array<CreditCompanyGrantView>;
4907
+ /**
4908
+ *
4909
+ * @type {Array<CheckoutFieldWithValue>}
4910
+ * @memberof ComponentHydrateResponseData
4911
+ */
4912
+ customCheckoutFields: Array<CheckoutFieldWithValue>;
4732
4913
  /**
4733
4914
  *
4734
4915
  * @type {PlanDetailResponseData}
@@ -5261,12 +5442,30 @@ declare interface CreditCompanyGrantView {
5261
5442
  * @memberof CreditCompanyGrantView
5262
5443
  */
5263
5444
  renewalPeriod?: BillingPlanCreditGrantResetCadence | null;
5445
+ /**
5446
+ *
5447
+ * @type {number}
5448
+ * @memberof CreditCompanyGrantView
5449
+ */
5450
+ reserved?: number | null;
5451
+ /**
5452
+ *
5453
+ * @type {number}
5454
+ * @memberof CreditCompanyGrantView
5455
+ */
5456
+ settled?: number | null;
5264
5457
  /**
5265
5458
  *
5266
5459
  * @type {string}
5267
5460
  * @memberof CreditCompanyGrantView
5268
5461
  */
5269
5462
  singularName?: string | null;
5463
+ /**
5464
+ *
5465
+ * @type {string}
5466
+ * @memberof CreditCompanyGrantView
5467
+ */
5468
+ sourceGrantId?: string | null;
5270
5469
  /**
5271
5470
  *
5272
5471
  * @type {string}
@@ -6740,11 +6939,23 @@ declare interface FeatureEntitlement {
6740
6939
  */
6741
6940
  creditId?: string | null;
6742
6941
  /**
6743
- * If the company has a credit-based entitlement for this feature, the remaining credit amount
6942
+ * If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead
6744
6943
  * @type {number}
6745
6944
  * @memberof FeatureEntitlement
6746
6945
  */
6747
6946
  creditRemaining?: number | null;
6947
+ /**
6948
+ * If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released
6949
+ * @type {number}
6950
+ * @memberof FeatureEntitlement
6951
+ */
6952
+ creditReserved?: number | null;
6953
+ /**
6954
+ * If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users
6955
+ * @type {number}
6956
+ * @memberof FeatureEntitlement
6957
+ */
6958
+ creditSettled?: number | null;
6748
6959
  /**
6749
6960
  * If the company has a credit-based entitlement for this feature, the total credit amount
6750
6961
  * @type {number}
@@ -8812,6 +9023,12 @@ declare interface PlanCreditGrantView {
8812
9023
  * @memberof PlanCreditGrantView
8813
9024
  */
8814
9025
  resetType: BillingPlanCreditGrantResetType;
9026
+ /**
9027
+ *
9028
+ * @type {number}
9029
+ * @memberof PlanCreditGrantView
9030
+ */
9031
+ rolloverPercentage: number;
8815
9032
  /**
8816
9033
  * Deprecated field, will be removed in the future. Use Credit.SingularName instead.
8817
9034
  * @type {string}
@@ -8999,6 +9216,12 @@ declare interface PlanCreditGrantView_2 {
8999
9216
  * @memberof PlanCreditGrantView
9000
9217
  */
9001
9218
  resetType: BillingPlanCreditGrantResetType_2;
9219
+ /**
9220
+ *
9221
+ * @type {number}
9222
+ * @memberof PlanCreditGrantView
9223
+ */
9224
+ rolloverPercentage: number;
9002
9225
  /**
9003
9226
  * Deprecated field, will be removed in the future. Use Credit.SingularName instead.
9004
9227
  * @type {string}
@@ -10568,6 +10791,24 @@ declare interface PreviewSubscriptionChangeResponseData {
10568
10791
  * @deprecated
10569
10792
  */
10570
10793
  newCharges: number;
10794
+ /**
10795
+ *
10796
+ * @type {boolean}
10797
+ * @memberof PreviewSubscriptionChangeResponseData
10798
+ */
10799
+ optInRequired: boolean;
10800
+ /**
10801
+ *
10802
+ * @type {string}
10803
+ * @memberof PreviewSubscriptionChangeResponseData
10804
+ */
10805
+ optInText?: string | null;
10806
+ /**
10807
+ *
10808
+ * @type {string}
10809
+ * @memberof PreviewSubscriptionChangeResponseData
10810
+ */
10811
+ optInTitle?: string | null;
10571
10812
  /**
10572
10813
  *
10573
10814
  * @type {boolean}