import type { ElementalContent } from "@/types/elemental.types"; import type { TemplateError } from "@/lib/utils/errors"; import type { ContentTransformer } from "../TemplateEditor/store"; import type { DuplicateTemplateOptions, DuplicateTemplateResult } from "./api/template"; import type { BrandColor } from "@/lib/utils/brandColors"; export type MessageRoutingMethod = "all" | "single"; export type MessageRoutingChannel = string | MessageRouting; export interface MessageRouting { method: MessageRoutingMethod; channels: MessageRoutingChannel[]; } export interface TenantData { data?: { tenant?: { tenantId?: string; name?: string; notification?: { createdAt?: string; publishedAt?: string | null; notificationId?: string; version?: string; data?: { content?: ElementalContent; routing?: MessageRouting; [key: string]: unknown; }; [key: string]: unknown; }; brand?: { brandId?: string; name?: string; settings?: { colors?: { primary?: string; secondary?: string; tertiary?: string; }; email?: { header?: { barColor?: string; logo?: { href?: string; image?: string; }; }; footer?: { content?: string; markdown?: string | null; social?: { facebook?: { url?: string; }; instagram?: { url?: string; }; linkedin?: { url?: string; }; medium?: { url?: string; }; twitter?: { url?: string; }; }; }; templateOverride?: { backgroundColor?: string; blocksBackgroundColor?: string; footerBackgroundColor?: string; }; }; [key: string]: unknown; }; [key: string]: unknown; }; [key: string]: unknown; }; [key: string]: unknown; }; [key: string]: unknown; } export declare const DEFAULT_ROUTING: MessageRouting; export declare const apiUrlAtom: import("jotai").PrimitiveAtom & { init: string; }; export declare const tokenAtom: import("jotai").PrimitiveAtom & { init: string; }; export declare const tenantIdAtom: import("jotai").PrimitiveAtom & { init: string; }; export declare const templateIdAtom: import("jotai").PrimitiveAtom & { init: string; }; export declare const routingAtom: import("jotai").PrimitiveAtom & { init: MessageRouting; }; export declare const templateDataAtom: import("jotai").PrimitiveAtom & { init: TenantData | null; }; export declare const brandColorsAtom: import("jotai").Atom; export declare const brandColorMapAtom: import("jotai").Atom>; export declare const isTemplateLoadingAtom: import("jotai").PrimitiveAtom & { init: boolean | null; }; export declare const isTemplateSavingAtom: import("jotai").PrimitiveAtom & { init: boolean | null; }; export declare const isTemplatePublishingAtom: import("jotai").PrimitiveAtom & { init: boolean | null; }; export declare const templateErrorAtom: import("jotai").PrimitiveAtom & { init: TemplateError | null; }; export declare const brandApplyAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const renderToasterAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export interface TemplateActions { getTemplate: (options?: { includeBrand?: boolean; }) => Promise; saveTemplate: (options?: MessageRouting) => Promise; publishTemplate: () => Promise; duplicateTemplate: (options?: DuplicateTemplateOptions) => Promise; isTemplateLoading: boolean | null; setIsTemplateLoading: (loading: boolean | null) => void; isTemplateSaving: boolean | null; setIsTemplateSaving: (saving: boolean | null) => void; isTemplatePublishing: boolean | null; setIsTemplatePublishing: (publishing: boolean | null) => void; templateError: TemplateError | null; setTemplateError: (error: string | TemplateError | null) => void; templateData: TenantData | null; setTemplateData: (data: TenantData | null) => void; templateEditorContent: ElementalContent | null | undefined; setTemplateEditorContent: (content: ElementalContent | null) => void; createCustomError: (message: string, details?: Record) => TemplateError; convertLegacyError: (error: string | TemplateError) => TemplateError; /** @internal Experimental API - subject to change */ contentTransformer: ContentTransformer | null; /** @internal Experimental API - subject to change */ setContentTransformer: (transformer: ContentTransformer | null) => void; }