@schematichq/schematic-components 2.18.0 → 2.20.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.
@@ -318,7 +318,9 @@ declare type BillingCreditGrantReason = (typeof BillingCreditGrantReason)[keyof
318
318
  * @export
319
319
  */
320
320
  declare const BillingCreditGrantZeroedOutReason: {
321
+ readonly CustomerArchived: "customer_archived";
321
322
  readonly Expired: "expired";
323
+ readonly IntegrationUninstalled: "integration_uninstalled";
322
324
  readonly Manual: "manual";
323
325
  readonly PlanChange: "plan_change";
324
326
  readonly PlanPeriodReset: "plan_period_reset";
@@ -909,7 +911,9 @@ declare interface BillingLinkedResourceResponseData_2 {
909
911
  */
910
912
  declare const BillingPlanCreditGrantResetCadence: {
911
913
  readonly Daily: "daily";
914
+ readonly Every6Months: "every_6_months";
912
915
  readonly Monthly: "monthly";
916
+ readonly Quarterly: "quarterly";
913
917
  readonly Weekly: "weekly";
914
918
  readonly Yearly: "yearly";
915
919
  };
@@ -922,7 +926,9 @@ declare type BillingPlanCreditGrantResetCadence = (typeof BillingPlanCreditGrant
922
926
  */
923
927
  declare const BillingPlanCreditGrantResetCadence_2: {
924
928
  readonly Daily: "daily";
929
+ readonly Every6Months: "every_6_months";
925
930
  readonly Monthly: "monthly";
931
+ readonly Quarterly: "quarterly";
926
932
  readonly Weekly: "weekly";
927
933
  readonly Yearly: "yearly";
928
934
  };
@@ -2954,6 +2960,19 @@ export declare interface BypassConfig {
2954
2960
  * { planId: "plan_abc", payInAdvanceQuantities: { feat_seats: 3 } }
2955
2961
  */
2956
2962
  payInAdvanceQuantities?: Record<string, number>;
2963
+ /**
2964
+ * Promotion code to pre-apply to the checkout (a Stripe promotion code such
2965
+ * as "SUMMER20" — the customer-facing code, not the underlying coupon id).
2966
+ *
2967
+ * The discount is applied on load: the previewed charges reflect it and it is
2968
+ * sent with the final checkout request. The customer can still change or
2969
+ * clear it via the discount field in the checkout form. Invalid codes are
2970
+ * rejected by the backend the same way a manually entered code would be.
2971
+ *
2972
+ * @example
2973
+ * { planId: "plan_abc", promoCode: "SUMMER20" }
2974
+ */
2975
+ promoCode?: string;
2957
2976
  }
2958
2977
 
2959
2978
  export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement | null>>;
@@ -3079,7 +3098,7 @@ declare type ChargeType_2 = (typeof ChargeType_2)[keyof typeof ChargeType_2];
3079
3098
 
3080
3099
  export declare const Checkbox: IStyledComponentBase<"web", FastOmit<FastOmit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof ClassAttributes<HTMLInputElement> | keyof InputHTMLAttributes<HTMLInputElement>> & ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement>, "type"> & Partial<Pick<FastOmit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof ClassAttributes<HTMLInputElement> | keyof InputHTMLAttributes<HTMLInputElement>> & ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement>, "type">>> & string;
3081
3100
 
3082
- export declare const Checkout: ({ customCheckoutFields, customFieldValues, isPaymentMethodRequired, onCustomFieldChange, optInRequired, optInTitle, optInText, optInAccepted, setOptInAccepted, setPaymentMethodId, updatePromoCode, confirmPaymentIntentProps, financeData, onPaymentMethodSaved, }: CheckoutProps) => JSX.Element | null;
3101
+ export declare const Checkout: ({ customCheckoutFields, customFieldValues, isPaymentMethodRequired, onCustomFieldChange, optInRequired, optInTitle, optInText, optInAccepted, setOptInAccepted, setPaymentMethodId, promoCode, updatePromoCode, confirmPaymentIntentProps, financeData, onPaymentMethodSaved, }: CheckoutProps) => JSX.Element | null;
3083
3102
 
3084
3103
  /**
3085
3104
  * Host-provided initial values used to pre-populate the checkout payment form.
@@ -3216,6 +3235,7 @@ declare interface CheckoutProps {
3216
3235
  optInAccepted: boolean;
3217
3236
  setOptInAccepted: (accepted: boolean) => void;
3218
3237
  setPaymentMethodId: (id: string) => void;
3238
+ promoCode?: string | null;
3219
3239
  updatePromoCode: (code: string) => void;
3220
3240
  confirmPaymentIntentProps?: ConfirmPaymentIntentProps_2 | null | undefined;
3221
3241
  financeData?: PreviewSubscriptionFinanceResponseData | null;
@@ -3492,6 +3512,7 @@ export declare type CheckoutState = {
3492
3512
  showCurrencySelector?: boolean;
3493
3513
  startTrialIfAvailable?: boolean;
3494
3514
  payInAdvanceQuantities?: Record<string, number>;
3515
+ promoCode?: string;
3495
3516
  };
3496
3517
 
3497
3518
  /**
@@ -6442,6 +6463,7 @@ export declare interface EmbedContextProps extends EmbedState {
6442
6463
  setCheckoutState: (state: CheckoutState) => void;
6443
6464
  clearCheckoutState: () => void;
6444
6465
  initializeWithPlan: (config: string | BypassConfig) => void;
6466
+ requestUnsubscribe: () => void;
6445
6467
  setData: (data: HydrateDataWithCompanyContext) => void;
6446
6468
  updateSettings: (settings: DeepPartial<EmbedSettings>, options?: {
6447
6469
  update?: boolean;
@@ -8396,6 +8418,7 @@ export declare const initialContext: {
8396
8418
  setCheckoutState: () => never;
8397
8419
  clearCheckoutState: () => never;
8398
8420
  initializeWithPlan: () => never;
8421
+ requestUnsubscribe: () => never;
8399
8422
  setData: () => never;
8400
8423
  updateSettings: () => never;
8401
8424
  debug: () => never;
@@ -8484,6 +8507,12 @@ declare interface InvoiceResponseData {
8484
8507
  * @memberof InvoiceResponseData
8485
8508
  */
8486
8509
  dueDate?: Date | null;
8510
+ /**
8511
+ *
8512
+ * @type {number}
8513
+ * @memberof InvoiceResponseData
8514
+ */
8515
+ endingBalance: number;
8487
8516
  /**
8488
8517
  *
8489
8518
  * @type {string}
@@ -8514,6 +8543,12 @@ declare interface InvoiceResponseData {
8514
8543
  * @memberof InvoiceResponseData
8515
8544
  */
8516
8545
  providerType: BillingProviderType;
8546
+ /**
8547
+ *
8548
+ * @type {number}
8549
+ * @memberof InvoiceResponseData
8550
+ */
8551
+ startingBalance: number;
8517
8552
  /**
8518
8553
  *
8519
8554
  * @type {InvoiceStatus}
@@ -9862,6 +9897,12 @@ declare interface PlanEntitlementResponseData {
9862
9897
  * @memberof PlanEntitlementResponseData
9863
9898
  */
9864
9899
  valueType: EntitlementValueType;
9900
+ /**
9901
+ *
9902
+ * @type {Array<WarningTierResponseData>}
9903
+ * @memberof PlanEntitlementResponseData
9904
+ */
9905
+ warningTiers: Array<WarningTierResponseData>;
9865
9906
  }
9866
9907
 
9867
9908
  /**
@@ -10044,6 +10085,12 @@ declare interface PlanEntitlementResponseData_2 {
10044
10085
  * @memberof PlanEntitlementResponseData
10045
10086
  */
10046
10087
  valueType: EntitlementValueType_2;
10088
+ /**
10089
+ *
10090
+ * @type {Array<WarningTierResponseData>}
10091
+ * @memberof PlanEntitlementResponseData
10092
+ */
10093
+ warningTiers: Array<WarningTierResponseData_2>;
10047
10094
  }
10048
10095
 
10049
10096
  /**
@@ -11072,6 +11119,12 @@ declare interface PreviewSubscriptionFinanceResponseData {
11072
11119
  * @memberof PreviewSubscriptionFinanceResponseData
11073
11120
  */
11074
11121
  percentOff: number;
11122
+ /**
11123
+ *
11124
+ * @type {Date}
11125
+ * @memberof PreviewSubscriptionFinanceResponseData
11126
+ */
11127
+ periodEnd: Date;
11075
11128
  /**
11076
11129
  *
11077
11130
  * @type {Date}
@@ -12656,4 +12709,78 @@ export declare interface ViewportProps extends React.HTMLProps<HTMLDivElement> {
12656
12709
  portal?: HTMLElement | null;
12657
12710
  }
12658
12711
 
12712
+ /**
12713
+ * Schematic API
12714
+ * Schematic API
12715
+ *
12716
+ * The version of the OpenAPI document: 0.1
12717
+ *
12718
+ *
12719
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12720
+ * https://openapi-generator.tech
12721
+ * Do not edit the class manually.
12722
+ */
12723
+ /**
12724
+ *
12725
+ * @export
12726
+ * @interface WarningTierResponseData
12727
+ */
12728
+ declare interface WarningTierResponseData {
12729
+ /**
12730
+ *
12731
+ * @type {string}
12732
+ * @memberof WarningTierResponseData
12733
+ */
12734
+ id: string;
12735
+ /**
12736
+ *
12737
+ * @type {string}
12738
+ * @memberof WarningTierResponseData
12739
+ */
12740
+ key: string;
12741
+ /**
12742
+ *
12743
+ * @type {number}
12744
+ * @memberof WarningTierResponseData
12745
+ */
12746
+ value: number;
12747
+ }
12748
+
12749
+ /**
12750
+ * Schematic API
12751
+ * Schematic API
12752
+ *
12753
+ * The version of the OpenAPI document: 0.1
12754
+ *
12755
+ *
12756
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12757
+ * https://openapi-generator.tech
12758
+ * Do not edit the class manually.
12759
+ */
12760
+ /**
12761
+ *
12762
+ * @export
12763
+ * @interface WarningTierResponseData
12764
+ */
12765
+ declare interface WarningTierResponseData_2 {
12766
+ /**
12767
+ *
12768
+ * @type {string}
12769
+ * @memberof WarningTierResponseData
12770
+ */
12771
+ id: string;
12772
+ /**
12773
+ *
12774
+ * @type {string}
12775
+ * @memberof WarningTierResponseData
12776
+ */
12777
+ key: string;
12778
+ /**
12779
+ *
12780
+ * @type {number}
12781
+ * @memberof WarningTierResponseData
12782
+ */
12783
+ value: number;
12784
+ }
12785
+
12659
12786
  export { }