UNPKG

@liquidcommerceteam/elements-sdk

Version:

LiquidCommerce Elements SDK

44 lines (43 loc) 1.66 kB
import type { IElementsConfigurations } from '@/interfaces/configs/configurations.interface'; import type { DeepPartial } from '@/interfaces/core.interface'; import type { IAddressComponent } from './address.interface'; import type { ICartComponent } from './cart.interface'; import type { ICheckoutComponent } from './checkout.interface'; import type { IProductComponent } from './product.interface'; export interface IFontFamily { name: string; weights: number[]; } export interface IGlobalTheme { buttonCornerRadius: string; cardCornerRadius: string; headingFont: IFontFamily; paragraphFont: IFontFamily; primaryColor: string; accentColor: string; defaultTextColor: string; selectedTextColor: string; errorColor: string; warningColor: string; successColor: string; drawerBackgroundColor: string; } export interface IGlobalLayout { enablePersonalization: boolean; allowPromoCodes: boolean; } export interface IComponentGlobalConfigs { theme: IGlobalTheme; layout: IGlobalLayout; } export type UpdateComponentGlobalConfigs = DeepPartial<IComponentGlobalConfigs>; export interface IAllConfigs { configurations: IElementsConfigurations; global: IComponentGlobalConfigs; product: IProductComponent; address: IAddressComponent; cart: ICartComponent; checkout: ICheckoutComponent; } export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout'; export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent;