// Auto-generated by build-values-types.js. Do not edit manually. import type { AIImageProvider, AIProvider, ImageSource, InboxPreviewClientId } from './editor'; import type { PdfWatermarkOptions } from './export'; import type { Language } from './intl'; import type { Resolution } from './types'; export interface Image { id: number | string; location: string; filename?: string; contentType: string; size: number; width: number | null; height: number | null; source: ImageSource | null; optimistic?: boolean; } export type AICopilotModel = | `${AIProvider}/${string}` | (string & {}); export type AIFallbackModels = | boolean | AICopilotModel[]; export type AIImageModel = | `${AIImageProvider}/${string}` | (string & {}); export type AIImageFallbackModels = | boolean | AIImageModel[]; export interface AIBrand { companyName?: string; productDescription?: string; targetAudience?: string; colors?: { primary?: string; secondary?: string; accent?: string; }; fonts?: { heading?: string; body?: string; }; logos?: { primary?: string; secondary?: string; }; voice?: string; guidelines?: string; } export interface TextEditorCustomButton { name: string; icon: string; text: string; onSetup?: () => void; onAction: (data: { text: string; }, callback: (text: string) => void) => void; } export type ColorGroup = {} & ({ id: 'brand_colors' | 'common_colors' | 'recent_colors' | 'template_colors' | (string & {}); label?: string; colors?: string[]; default?: boolean; } | { id?: never; label: string; colors: string[]; default?: boolean; }); export interface ColorPicker { /** @deprecated Use colors: string[] or colors: [{ id: "common_colors", label: 'Common Colors', colors: string[] }] instead */ presets?: string[]; /** @deprecated Use colors: [{ id: "brand_colors", label: 'Brand Colors', colors: string[] }] instead */ brandColors?: string[]; colors?: string[] | ColorGroup[]; limit?: number; recentColors?: boolean | null; } export type ImageEditorToolConfig = | boolean | { enabled?: boolean; icon?: string; }; /** * An identifier from the current Inbox Previews email-client catalog. * * The literal members are the known IDs from the Inbox Previews catalog. The * catalog itself is dynamic, so the string intersection keeps configs * forward-compatible with newer IDs returned by the live clients endpoint. */ export type InboxPreviewsFeature = | boolean | { enabled?: boolean; /** * Email clients requested for runs from this editor instance. This * overrides the project default configured in Console or Cloud API v3. * Each time previews are generated, every selected email client or * device counts as one unit of Inbox Previews usage. The complete * selection is used or the request is rejected; devices are never * silently omitted. Accounts with credit enforcement enabled must have * enough credits for the complete selection. */ clients?: InboxPreviewClientId[]; /** * Data region for runs from this editor instance. This overrides the * project default configured in Console or Cloud API v3. */ dataRegion?: 'us' | 'eu'; /** * Optional template identifier recorded with Inbox Previews usage. This * labels usage reports only; it does not load a template. */ usageTemplateId?: number; }; export interface Features { audit?: boolean; beta?: boolean | { enabled?: boolean; feedback?: boolean; }; blocks?: boolean; collaboration?: boolean; preview?: boolean | { enabled?: boolean; cleanup?: boolean; deviceResolutions?: { showDefaultResolutions?: boolean; customResolutions?: { desktop?: Resolution[]; tablet?: Resolution[]; mobile?: Resolution[]; }; }; }; imageEditor?: { enabled?: boolean; /** * Pin a specific published image-editor bundle version. By default the * editor loads the latest image-editor, so fixes ship without an editor * release; set this to load an exact version (e.g. to reproduce a bug * or stage a risky change). Unknown versions fall forward to the latest. */ version?: string; /** * Side the tool tabs (and their properties panel) dock to. Defaults * to `'right'`. */ dock?: 'left' | 'right'; tools?: { crop?: ImageEditorToolConfig; /** Rounded-corners control (lives inside the Crop tool). */ corners?: ImageEditorToolConfig; resize?: ImageEditorToolConfig; filter?: ImageEditorToolConfig; draw?: ImageEditorToolConfig; text?: ImageEditorToolConfig; shapes?: ImageEditorToolConfig; stickers?: ImageEditorToolConfig; frame?: ImageEditorToolConfig; }; } | boolean; preheaderText?: boolean; headersAndFooters?: boolean; stockImages?: { enabled: true; safeSearch: true; defaultSearchTerm: string; } | boolean; userUploads?: boolean | { enabled: boolean; search?: boolean; }; devTab?: boolean; undoRedo?: boolean | { enabled: boolean; autoSelect?: boolean; autoFocus?: boolean; }; textEditor?: { spellChecker?: boolean; tables?: boolean; cleanPaste?: boolean | 'basic' | 'confirm'; emojis?: boolean; textDirection?: boolean | null; inlineColorGroups?: string[]; inlineFontControls?: boolean; defaultFontSize?: string; fontSizes?: string[]; customButtons?: TextEditorCustomButton[]; }; colorPicker?: ColorPicker; legacy?: { disableHoverButtonColors?: boolean; }; inboxPreviews?: InboxPreviewsFeature; pageAnchors?: boolean; svgImageUpload?: boolean; smartMergeTags?: boolean; multiLanguage?: boolean | { enabled: boolean; languages?: Language[]; }; styleGuide?: boolean; ai?: boolean | { enabled?: boolean; assistant?: boolean; /** @deprecated Use assistant instead. */ copilot?: boolean; models?: boolean; /** * Preferred AI model for the assistant. Accepts: * * - a `"/"` pair (e.g. `"openai/gpt-5.6-luna"`, * `"anthropic/claude-opus-5-5"`) — pins both provider and model, * unambiguous; * - a bare model id (e.g. `"gpt-5.6-luna"`); * - a provider name (e.g. `"openai"`, `"anthropic"`) — selects the * vendor and lets Unlayer pick that provider's default model. * * Forwarded to the v3 stream endpoint as the `model` body field. * Overridden when the user picks a model from the picker * (`models: true`). If unset, the server picks via its routing * policy. If the preferred model has a transient provider outage, * the server tries fallback models only when `fallbackModels` is * `true` or an explicit array. */ model?: AICopilotModel; /** * Transient-outage fallback controls for assistant text/design calls. * * - unset: use Unlayer's default picks only when `model` is unset; * - `true`: use Unlayer's default fallback picks even for a pinned * `model`; * - `false`: disable the default outage fallback tail; * - array: ordered fallback model list, replacing Unlayer defaults. * * The `model` field remains the first choice. Fallbacks are not used * for invalid requests, invalid API keys, credit exhaustion, or any * other error that requires user/input/configuration changes. */ fallbackModels?: AIFallbackModels; /** * Brand context applied to every AI Assistant text and design * generation. Invalid colors are ignored. Company and font names * are capped at 200 characters; other text fields at 2,000. Set to * `null` to explicitly disable the saved project Brand Context. */ brand?: AIBrand | null; /** * Disable full-template, page, and body generation in the AI * Assistant when set to `false` — usually for cost or latency * control. Per-row, per-content, and per-text edits stay * available. Defaults to `true` (enabled) when the AI Assistant * is enabled, and is also gated by the * `aiAssistant.fullTemplateGeneration` server-side entitlement. */ fullTemplateGeneration?: boolean; /** * Show the AI Template Importer action inside the AI Assistant. * This is an embedder-controlled UI flag, not an Unlayer-managed * entitlement or quota. Defaults to `false`. */ templateImporter?: boolean; /** Share session-only Assistant history across the design (default), or keep a thread per element. */ chatHistoryScope?: 'design' | 'element'; /** * Destination for AI Credit usage links shown inside an embedded * editor. Use this to send end-users to your own billing, usage, or * help page. A workspace billing URL supplied by Unlayer Console takes * precedence. When unset, external embeds link to Unlayer's AI Credits * documentation. Must be an absolute HTTP or HTTPS URL. */ creditsUrl?: string; /** @deprecated Use `image.enabled`. Explicit `false` still disables image chat. */ magicImage?: boolean; image?: { /** Enable image search, generation, editing, and attachments in AI Assistant. Defaults to true. */ enabled?: boolean; /** Allow image attachments, paste, and drop in AI Assistant. Pasted image URL edits also require editing. Defaults to true. */ upload?: boolean; /** Describe images added or changed through AI from their pixels using credits. Includes saved AI edits from the Image Editor modal. Ordinary uploads and manual edits are excluded. Defaults to true. */ altText?: boolean; /** Allow custom image generation in AI Assistant. Defaults to true. */ generation?: boolean; /** Allow image edits in AI Assistant. Defaults to true. */ editing?: boolean; /** Let AI identify existing design images and target image replacements or insertions. Defaults to true. */ enableDesignImageTargeting?: boolean; /** Allow online image search in AI Assistant. Also requires stockImages. Defaults to true. */ search?: boolean; /** Filter online image search results. Defaults to the stockImages safeSearch setting. */ safeSearch?: boolean; /** * Preferred AI image model for AI Assistant and image editing. * Accepts the same shapes as `features.ai.model`, but for image * providers: * * - a `"/"` pair (e.g. `"openai/gpt-image-2"`) * — pins both provider and model, unambiguous; * - a bare model id (e.g. `"gpt-image-2"`); * - a provider name (e.g. `"openai"`, `"google"`) — selects the * vendor and lets Unlayer pick that provider's default image * model. * * Forwarded to the image endpoints as the `model` body field. * If unset, the server picks via its image routing policy. If the * preferred image model has a transient provider outage, the * server tries fallback models only when `fallbackModels` is * `true` or an explicit array. */ model?: AIImageModel; /** * Transient-outage fallback controls for AI Assistant and image * editing. * * - unset: use Unlayer's default picks only when `model` is unset; * - `true`: use Unlayer's default fallback picks even for a pinned * `model`; * - `false`: disable the default outage fallback tail; * - array: ordered fallback model list, replacing Unlayer defaults. * * The `model` field remains the first choice. Fallbacks are not * used for invalid prompts, unsupported model IDs, invalid API * keys, credit exhaustion, or any other error that requires * user/input/configuration changes. */ fallbackModels?: AIImageFallbackModels; /** * Quality tier, uniform across providers. Higher tiers cost * more. Mapped internally per provider — OpenAI gpt-image-2 to * its `quality` field, Gemini to image resolution * (`low`→1K, `medium`→2K, `high`→4K). Defaults to `'medium'`. */ quality?: 'low' | 'medium' | 'high'; }; smartButtons?: boolean; smartHeadings?: boolean; smartImageAltText?: boolean; smartText?: boolean; smartParagraph?: boolean; }; sendTestEmail?: boolean; syncedBlocks?: boolean; minimap?: boolean; normalizeEmailLineHeights?: boolean; /** * Default watermark for every document PDF preview and `exportPdf` call, * also drawn on each page of the document canvas and its minimap. A call's * own `watermark` option overrides it. Requires a plan that includes * Document Watermarks. */ watermark?: PdfWatermarkOptions; } // ─────────────────────────────────────────────────────────────────────────── // Configuration // ───────────────────────────────────────────────────────────────────────────