autumn-js
Version:
Autumn JS Library
65 lines (62 loc) • 1.83 kB
TypeScript
import { C as CustomerData, b as Customer } from './cusTypes-sh5_cN7N.js';
import { E as Entity } from './entTypes-BDqnMLZ4.js';
interface ProductDetails {
id: string;
description?: string;
buttonText?: string;
buttonUrl?: string;
recommendText?: string;
}
interface PricingTableProduct {
id: string;
name: string;
buttonText: string;
price: {
primaryText: string;
secondaryText?: string;
};
items: {
primaryText: string;
secondaryText?: string;
}[];
}
declare class AutumnClientError extends Error {
code: string;
constructor({ message, code }: {
message: string;
code: string;
});
toString(): string;
toJSON(): {
message: string;
code: string;
};
}
interface AutumnContextParams {
encryptedCustomerId?: string;
customerData?: CustomerData;
authProvider?: "clerk" | "better-auth";
customer: Customer | null;
setCustomer: (customer: Customer | null) => void;
entity: Entity | null;
setEntity: (entity: Entity | null) => void;
entityId?: string;
prodChangeDialog: {
found: boolean;
setProps: (props: any) => void;
setOpen: (open: boolean) => void;
setComponent: (component: any) => void;
};
paywallDialog: {
found: boolean;
setProps: (props: any) => void;
setOpen: (open: boolean) => void;
setComponent: (component: any) => void;
};
pricingTableProducts: PricingTableProduct[] | null;
setPricingTableProducts: (products: PricingTableProduct[]) => void;
}
interface AutumnProviderProps extends AutumnContextParams {
children?: React.ReactNode;
}
export { AutumnClientError, type AutumnContextParams, type AutumnProviderProps, type PricingTableProduct, type ProductDetails };