@schematichq/schematic-components 2.13.0 → 2.14.0-rc.3

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.
@@ -2944,12 +2944,38 @@ declare type ChargeType_2 = (typeof ChargeType_2)[keyof typeof ChargeType_2];
2944
2944
 
2945
2945
  export declare const Checkout: ({ isPaymentMethodRequired, setPaymentMethodId, updatePromoCode, confirmPaymentIntentProps, financeData, onPaymentMethodSaved, }: CheckoutProps) => JSX.Element | null;
2946
2946
 
2947
+ /**
2948
+ * Host-provided initial values used to pre-populate the checkout payment form.
2949
+ * Values come exclusively from the host application; nothing here is
2950
+ * auto-detected from backend/hydrate data.
2951
+ *
2952
+ * Only the fields we currently consume are present. Additional fields (e.g.
2953
+ * address, phone) can be added here as they are wired up.
2954
+ */
2955
+ export declare interface CheckoutBillingDetails {
2956
+ email?: string;
2957
+ name?: string;
2958
+ }
2959
+
2947
2960
  export declare const CheckoutDialog: ({ top }: CheckoutDialogProps) => JSX.Element | null;
2948
2961
 
2949
2962
  declare interface CheckoutDialogProps {
2950
2963
  top?: number;
2951
2964
  }
2952
2965
 
2966
+ /**
2967
+ * Configuration for pre-populating the checkout flow with host-provided values.
2968
+ *
2969
+ * @example
2970
+ * <EmbedProvider
2971
+ * apiKey={apiKey}
2972
+ * checkoutPrefill={{ billingDetails: { email: "a@b.com", name: "Ada Lovelace" } }}
2973
+ * >
2974
+ */
2975
+ export declare interface CheckoutPrefill {
2976
+ billingDetails?: CheckoutBillingDetails;
2977
+ }
2978
+
2953
2979
  declare interface CheckoutProps {
2954
2980
  isPaymentMethodRequired: boolean;
2955
2981
  setPaymentMethodId: (id: string) => void;
@@ -4007,7 +4033,7 @@ declare interface CompanyPlanDetailResponseData {
4007
4033
  * @type {Array<PlanEntitlementResponseData>}
4008
4034
  * @memberof CompanyPlanDetailResponseData
4009
4035
  */
4010
- entitlements: Array<PlanEntitlementResponseData>;
4036
+ entitlements?: Array<PlanEntitlementResponseData> | null;
4011
4037
  /**
4012
4038
  *
4013
4039
  * @type {Array<FeatureInPlanResponseData>}
@@ -5740,7 +5766,7 @@ declare interface CustomPlanConfig_2 {
5740
5766
  declare type DebouncedApiPromise<R> = Promise<R | undefined> | undefined;
5741
5767
 
5742
5768
  declare type DeepPartial<T> = {
5743
- [K in keyof T]?: T[K] extends (infer U)[] ? DeepPartial<U>[] : T[K] extends object | undefined ? DeepPartial<T[K]> : T[K];
5769
+ [K in keyof T]?: NonNullable<T[K]> extends (infer U)[] ? DeepPartial<U>[] : NonNullable<T[K]> extends object ? DeepPartial<NonNullable<T[K]>> : T[K];
5744
5770
  };
5745
5771
 
5746
5772
  export declare const defaultSettings: EmbedSettings;
@@ -6116,7 +6142,7 @@ export declare interface EmbedProps {
6116
6142
  accessToken?: string;
6117
6143
  }
6118
6144
 
6119
- export declare const EmbedProvider: ({ children, apiKey, apiConfig, currencyFilter, ...options }: EmbedProviderProps) => JSX.Element;
6145
+ export declare const EmbedProvider: ({ children, apiKey, apiConfig, currencyFilter, checkoutPrefill, ...options }: EmbedProviderProps) => JSX.Element;
6120
6146
 
6121
6147
  export declare interface EmbedProviderProps {
6122
6148
  children: React.ReactNode;
@@ -6130,6 +6156,7 @@ export declare interface EmbedProviderProps {
6130
6156
  * ISO-4217 codes; case-insensitive. Omit to disable filtering.
6131
6157
  */
6132
6158
  currencyFilter?: string[];
6159
+ checkoutPrefill?: CheckoutPrefill;
6133
6160
  }
6134
6161
 
6135
6162
  export declare type EmbedSettings = {
@@ -6151,6 +6178,7 @@ export declare interface EmbedState {
6151
6178
  layout: EmbedLayout;
6152
6179
  checkoutState?: CheckoutState;
6153
6180
  currencyFilter?: string[];
6181
+ checkoutPrefill?: CheckoutPrefill;
6154
6182
  }
6155
6183
 
6156
6184
  export declare const Entitlement: ({ portal, entitlement, period, credits, currency: selectedCurrency, }: EntitlementProps) => JSX.Element;
@@ -8040,6 +8068,7 @@ export declare const initialContext: {
8040
8068
  layout: EmbedLayout;
8041
8069
  checkoutState?: CheckoutState;
8042
8070
  currencyFilter?: string[];
8071
+ checkoutPrefill?: CheckoutPrefill;
8043
8072
  };
8044
8073
 
8045
8074
  export declare const initialState: EmbedState;
@@ -9158,6 +9187,12 @@ declare interface PlanDetailResponseData {
9158
9187
  * @memberof PlanDetailResponseData
9159
9188
  */
9160
9189
  draftVersion?: PlanVersionResponseData;
9190
+ /**
9191
+ *
9192
+ * @type {Array<PlanEntitlementResponseData>}
9193
+ * @memberof PlanDetailResponseData
9194
+ */
9195
+ entitlements?: Array<PlanEntitlementResponseData> | null;
9161
9196
  /**
9162
9197
  *
9163
9198
  * @type {Array<FeatureInPlanResponseData>}
@@ -10193,7 +10228,7 @@ declare interface PlanViewPublicResponseData {
10193
10228
  * @type {Array<PlanEntitlementResponseData>}
10194
10229
  * @memberof PlanViewPublicResponseData
10195
10230
  */
10196
- entitlements: Array<PlanEntitlementResponseData_2>;
10231
+ entitlements?: Array<PlanEntitlementResponseData_2> | null;
10197
10232
  /**
10198
10233
  *
10199
10234
  * @type {Array<FeatureInPlanResponseData>}