@schematichq/schematic-components 0.1.0 → 0.3.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.
@@ -9,7 +9,6 @@ import { IStyledComponentBase } from 'styled-components/dist/types';
9
9
  import { JSX as JSX_2 } from 'react/jsx-runtime';
10
10
  import { RefAttributes } from 'react';
11
11
  import { RefObject } from 'react';
12
- import { Stripe } from '@stripe/stripe-js';
13
12
  import { Substitute } from 'styled-components/dist/types';
14
13
 
15
14
  declare interface ApiResponse<T> {
@@ -134,6 +133,12 @@ declare interface BillingPlan {
134
133
  * @interface BillingPriceResponseData
135
134
  */
136
135
  declare interface BillingPriceResponseData {
136
+ /**
137
+ *
138
+ * @type {string}
139
+ * @memberof BillingPriceResponseData
140
+ */
141
+ currency: string;
137
142
  /**
138
143
  *
139
144
  * @type {string}
@@ -292,7 +297,7 @@ declare interface BillingProductForSubscriptionResponseData {
292
297
  * @type {string}
293
298
  * @memberof BillingProductForSubscriptionResponseData
294
299
  */
295
- interval?: string | null;
300
+ interval: string;
296
301
  /**
297
302
  *
298
303
  * @type {string}
@@ -310,7 +315,7 @@ declare interface BillingProductForSubscriptionResponseData {
310
315
  * @type {string}
311
316
  * @memberof BillingProductForSubscriptionResponseData
312
317
  */
313
- priceExternalId?: string | null;
318
+ priceExternalId: string;
314
319
  /**
315
320
  *
316
321
  * @type {number}
@@ -384,12 +389,13 @@ export declare const Box: IStyledComponentBase<"web", Substitute<DetailedHTMLPro
384
389
 
385
390
  export declare type BoxProps = ComponentProps;
386
391
 
387
- export declare const Button: ({ color, size, variant, disabled, children, ...props }: ButtonProps) => JSX_2.Element;
392
+ export declare const Button: ({ color, size, variant, disabled, isLoading, children, ...props }: ButtonProps) => JSX_2.Element;
388
393
 
389
394
  export declare interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
390
395
  color?: ButtonStyleTypes;
391
396
  size?: ButtonSizeTypes;
392
397
  variant?: ButtonVariantTypes;
398
+ isLoading?: boolean;
393
399
  }
394
400
 
395
401
  export declare type ButtonSizeTypes = "sm" | "md" | "lg";
@@ -472,6 +478,14 @@ declare class CheckoutApi extends runtime.BaseAPI {
472
478
  * Hydrate component
473
479
  */
474
480
  hydrateComponent(requestParameters: HydrateComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HydrateComponentResponse>;
481
+ /**
482
+ * List invoices
483
+ */
484
+ listInvoicesRaw(requestParameters: ListInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListInvoicesResponse>>;
485
+ /**
486
+ * List invoices
487
+ */
488
+ listInvoices(requestParameters?: ListInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListInvoicesResponse>;
475
489
  /**
476
490
  * Preview checkout
477
491
  */
@@ -480,6 +494,14 @@ declare class CheckoutApi extends runtime.BaseAPI {
480
494
  * Preview checkout
481
495
  */
482
496
  previewCheckout(requestParameters: PreviewCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewCheckoutResponse>;
497
+ /**
498
+ * Update payment method
499
+ */
500
+ updatePaymentMethodRaw(requestParameters: UpdatePaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdatePaymentMethodResponse>>;
501
+ /**
502
+ * Update payment method
503
+ */
504
+ updatePaymentMethod(requestParameters: UpdatePaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdatePaymentMethodResponse>;
483
505
  }
484
506
 
485
507
  declare interface CheckoutRequest {
@@ -531,6 +553,12 @@ declare interface CompanyDetailResponseData {
531
553
  * @memberof CompanyDetailResponseData
532
554
  */
533
555
  addOns: Array<BillingPlan>;
556
+ /**
557
+ *
558
+ * @type {Array<BillingSubscriptionResponseData>}
559
+ * @memberof CompanyDetailResponseData
560
+ */
561
+ billingSubscriptions: Array<BillingSubscriptionResponseData>;
534
562
  /**
535
563
  *
536
564
  * @type {Date}
@@ -727,6 +755,12 @@ declare interface CompanyPlanDetailResponseData {
727
755
  * @interface CompanySubscriptionResponseData
728
756
  */
729
757
  declare interface CompanySubscriptionResponseData {
758
+ /**
759
+ *
760
+ * @type {string}
761
+ * @memberof CompanySubscriptionResponseData
762
+ */
763
+ currency: string;
730
764
  /**
731
765
  *
732
766
  * @type {string}
@@ -763,6 +797,12 @@ declare interface CompanySubscriptionResponseData {
763
797
  * @memberof CompanySubscriptionResponseData
764
798
  */
765
799
  products: Array<BillingProductForSubscriptionResponseData>;
800
+ /**
801
+ *
802
+ * @type {string}
803
+ * @memberof CompanySubscriptionResponseData
804
+ */
805
+ status: string;
766
806
  /**
767
807
  *
768
808
  * @type {string}
@@ -1101,11 +1141,6 @@ declare interface DesignProps_3 {
1101
1141
  isVisible: boolean;
1102
1142
  fontStyle: FontStyle;
1103
1143
  };
1104
- callToAction: {
1105
- isVisible: boolean;
1106
- buttonSize: "sm" | "md" | "lg";
1107
- buttonStyle: "primary" | "secondary" | "tertiary";
1108
- };
1109
1144
  }
1110
1145
 
1111
1146
  declare interface DesignProps_4 {
@@ -1132,6 +1167,7 @@ declare interface DesignProps_5 {
1132
1167
  };
1133
1168
  functions: {
1134
1169
  allowEdit: boolean;
1170
+ showExpiration: boolean;
1135
1171
  };
1136
1172
  }
1137
1173
 
@@ -1158,6 +1194,11 @@ declare interface DesignProps_6 {
1158
1194
  };
1159
1195
  }
1160
1196
 
1197
+ declare const Element_2: IStyledComponentBase<"web", FastOmit<Omit<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof ComponentProps> & ComponentProps, "ref"> & {
1198
+ ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
1199
+ }, never>> & string;
1200
+ export { Element_2 as Element }
1201
+
1161
1202
  declare interface ElementProps {
1162
1203
  children?: React.ReactNode;
1163
1204
  className?: string;
@@ -1171,14 +1212,12 @@ export declare interface EmbedContextProps {
1171
1212
  data: ComponentHydrateResponseData;
1172
1213
  nodes: SerializedNodeWithChildren[];
1173
1214
  settings: EmbedSettings;
1174
- stripe: Promise<Stripe | null> | null;
1175
1215
  layout: EmbedLayout;
1176
1216
  error?: Error;
1177
1217
  isPending: boolean;
1178
1218
  hydrate: () => void;
1179
1219
  setData: (data: RecursivePartial<ComponentHydrateResponseData>) => void;
1180
1220
  updateSettings: (settings: RecursivePartial<EmbedSettings>) => void;
1181
- setStripe: (stripe: Promise<Stripe | null> | null) => void;
1182
1221
  setLayout: (layout: EmbedLayout) => void;
1183
1222
  }
1184
1223
 
@@ -2102,9 +2141,13 @@ declare interface InvoiceResponseData {
2102
2141
  updatedAt: Date;
2103
2142
  }
2104
2143
 
2105
- export declare const Invoices: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_6> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2144
+ export declare const Invoices: ForwardRefExoticComponent<ElementProps & DesignProps_6 & {
2145
+ data?: ListInvoicesResponse["data"];
2146
+ } & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2106
2147
 
2107
- export declare type InvoicesProps = DesignProps_6;
2148
+ export declare type InvoicesProps = DesignProps_6 & {
2149
+ data?: ListInvoicesResponse["data"];
2150
+ };
2108
2151
 
2109
2152
  declare type Json = any;
2110
2153
 
@@ -2115,7 +2158,67 @@ declare class JSONApiResponse<T> {
2115
2158
  value(): Promise<T>;
2116
2159
  }
2117
2160
 
2118
- export declare const Loader: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2161
+ /**
2162
+ * Schematic API
2163
+ * Schematic API
2164
+ *
2165
+ * The version of the OpenAPI document: 0.1
2166
+ *
2167
+ *
2168
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2169
+ * https://openapi-generator.tech
2170
+ * Do not edit the class manually.
2171
+ */
2172
+ /**
2173
+ * Input parameters
2174
+ * @export
2175
+ * @interface ListInvoicesParams
2176
+ */
2177
+ declare interface ListInvoicesParams {
2178
+ /**
2179
+ * Page limit (default 100)
2180
+ * @type {number}
2181
+ * @memberof ListInvoicesParams
2182
+ */
2183
+ limit?: number;
2184
+ /**
2185
+ * Page offset (default 0)
2186
+ * @type {number}
2187
+ * @memberof ListInvoicesParams
2188
+ */
2189
+ offset?: number;
2190
+ }
2191
+
2192
+ declare interface ListInvoicesRequest {
2193
+ limit?: number;
2194
+ offset?: number;
2195
+ }
2196
+
2197
+ /**
2198
+ *
2199
+ * @export
2200
+ * @interface ListInvoicesResponse
2201
+ */
2202
+ declare interface ListInvoicesResponse {
2203
+ /**
2204
+ * The returned resources
2205
+ * @type {Array<InvoiceResponseData>}
2206
+ * @memberof ListInvoicesResponse
2207
+ */
2208
+ data: Array<InvoiceResponseData>;
2209
+ /**
2210
+ *
2211
+ * @type {ListInvoicesParams}
2212
+ * @memberof ListInvoicesResponse
2213
+ */
2214
+ params: ListInvoicesParams;
2215
+ }
2216
+
2217
+ export declare const Loader: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2218
+ $size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
2219
+ $color?: string;
2220
+ $isLoading?: boolean;
2221
+ }>> & string;
2119
2222
 
2120
2223
  declare function mapValues(data: any, fn: (item: any) => any): {};
2121
2224
 
@@ -2147,6 +2250,14 @@ declare interface ModalProps {
2147
2250
 
2148
2251
  declare type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original";
2149
2252
 
2253
+ export declare const PaymentForm: ({ onConfirm }: PaymentFormProps) => JSX_2.Element;
2254
+
2255
+ declare interface PaymentFormProps {
2256
+ plan?: CompanyPlanDetailResponseData;
2257
+ period?: string;
2258
+ onConfirm?: (paymentMethodId: string) => void;
2259
+ }
2260
+
2150
2261
  export declare const PaymentMethod: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_5> & HTMLAttributes<HTMLDivElement> & {
2151
2262
  portal?: HTMLElement | null;
2152
2263
  } & RefAttributes<HTMLDivElement | null>>;
@@ -2165,7 +2276,7 @@ export declare type PaymentMethodProps = DesignProps_5;
2165
2276
  * Do not edit the class manually.
2166
2277
  */
2167
2278
  /**
2168
- *
2279
+ * The created resource
2169
2280
  * @export
2170
2281
  * @interface PaymentMethodResponseData
2171
2282
  */
@@ -2537,7 +2648,7 @@ export declare interface ProgressBarProps extends React.ComponentPropsWithoutRef
2537
2648
  progress: number;
2538
2649
  value: number;
2539
2650
  total?: number | string;
2540
- color?: "gray" | "orange" | "blue" | "red";
2651
+ color?: "gray" | "blue" | "yellow" | "orange" | "red";
2541
2652
  barWidth?: string | number;
2542
2653
  }
2543
2654
 
@@ -3004,7 +3115,9 @@ declare interface StripeEmbedInfo {
3004
3115
  setupIntentClientSecret?: string | null;
3005
3116
  }
3006
3117
 
3007
- declare const Text_2: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, TextProps>> & string;
3118
+ declare const Text_2: IStyledComponentBase<"web", Substitute<FastOmit<Substitute<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3119
+ ref?: ((instance: HTMLSpanElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement> | null | undefined;
3120
+ }>, never>, TextProps>> & string;
3008
3121
  export { Text_2 as Text }
3009
3122
 
3010
3123
  declare class TextApiResponse {
@@ -3037,6 +3150,55 @@ export declare const UpcomingBill: ForwardRefExoticComponent<ElementProps & Recu
3037
3150
 
3038
3151
  export declare type UpcomingBillProps = DesignProps_4;
3039
3152
 
3153
+ declare interface UpdatePaymentMethodRequest {
3154
+ updatePaymentMethodRequestBody: UpdatePaymentMethodRequestBody;
3155
+ }
3156
+
3157
+ /**
3158
+ * Schematic API
3159
+ * Schematic API
3160
+ *
3161
+ * The version of the OpenAPI document: 0.1
3162
+ *
3163
+ *
3164
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3165
+ * https://openapi-generator.tech
3166
+ * Do not edit the class manually.
3167
+ */
3168
+ /**
3169
+ *
3170
+ * @export
3171
+ * @interface UpdatePaymentMethodRequestBody
3172
+ */
3173
+ declare interface UpdatePaymentMethodRequestBody {
3174
+ /**
3175
+ *
3176
+ * @type {string}
3177
+ * @memberof UpdatePaymentMethodRequestBody
3178
+ */
3179
+ paymentMethodId: string;
3180
+ }
3181
+
3182
+ /**
3183
+ *
3184
+ * @export
3185
+ * @interface UpdatePaymentMethodResponse
3186
+ */
3187
+ declare interface UpdatePaymentMethodResponse {
3188
+ /**
3189
+ *
3190
+ * @type {PaymentMethodResponseData}
3191
+ * @memberof UpdatePaymentMethodResponse
3192
+ */
3193
+ data: PaymentMethodResponseData;
3194
+ /**
3195
+ * Input parameters
3196
+ * @type {object}
3197
+ * @memberof UpdatePaymentMethodResponse
3198
+ */
3199
+ params: object;
3200
+ }
3201
+
3040
3202
  export declare const useEmbed: () => EmbedContextProps;
3041
3203
 
3042
3204
  export declare const Viewport: ForwardRefExoticComponent<Omit<ViewportProps, "ref"> & RefAttributes<HTMLDivElement | null>>;