interface DynamicValueMap { Boolean: boolean; String: string; } export type DynamicValue = { [Key in keyof DynamicValueMap]: { type: Key; value: DynamicValueMap[Key]; }; }[K]; export interface FetchResult { data: T; } export type SubscribeResult = FetchResult<{ id: number; email: string; firstName: string; lastName: string; phoneNumber: string; newsletterId: string; }>; export interface FormState { email: string; firstName?: string; lastName?: string; phoneNumber?: string; supportedDynamicValues: Record>; } export interface SubmitOptions { baseUrl?: string; } export type DeepRequired = { [P in keyof T]-?: T extends Record ? DeepRequired : T; }; export type RequireProperties = T & { [P in K]-?: T[P]; }; export interface SubmitOptions { baseUrl?: string; } interface InputTexts { label?: string; placeholder?: string; validationError?: string; hint?: string; } export interface SubmitOptionsBase { newsletterId: string; } export interface NorticNewsletterOptions extends SubmitOptionsBase { onSuccess?: () => void; onError?: (error: Error) => void; onReset?: () => void; onUpdate?: () => void; onDestroy?: () => void; demo?: boolean; showFirstNameInput?: boolean; showLastNameInput?: boolean; showPhoneInput?: boolean; hideSubmissionError?: boolean; hideAffiliation?: boolean; tags?: Array; texts?: { title?: string; description?: string; submit?: string; emailInput?: InputTexts; firstNameInput?: InputTexts; lastNameInput?: InputTexts; phoneInput?: InputTexts; acceptTermsLabel?: string; successTitle?: string; successDescription?: string; genericErrorMessage?: string; tagsTitle?: string; tags?: Record; }; requestOptions?: SubmitOptions; } export {};