Appearance
Rule.io SDK / rcml/src / EmailTheme
Interface: EmailTheme
Defined in: rcml/src/email/theme-types.ts:174
The typed theme object carried by rcml documents.
All fields are readonly to signal intent — the public API treats themes as immutable; the factory (createEmailTheme) and the applier (applyTheme) both return fresh themes / documents rather than mutating the input.
The sub-slotted fields (colors, links, images, fontStyles) use Partial<Record<Type, Entry>> shapes so callers can read theme.colors[Primary]?.hex directly without a helper.
Properties
brandStyleId?
readonlyoptionalbrandStyleId?:number
Defined in: rcml/src/email/theme-types.ts:176
Numeric brand-style id, or undefined when the theme is not tied to one.
colors
readonlycolors:Readonly<Partial<Record<EmailThemeColorType,EmailThemeColor>>>
Defined in: rcml/src/email/theme-types.ts:178
Colour palette keyed by slot type. Missing slots are intentionally absent.
fonts
readonlyfonts: readonlyEmailThemeFont[]
Defined in: rcml/src/email/theme-types.ts:184
Ordered list of web-font registrations. Empty when the theme uses only system fonts.
fontStyles
readonlyfontStyles:Readonly<Record<EmailThemeFontStyleType,EmailThemeFontStyle>>
Defined in: rcml/src/email/theme-types.ts:186
Font-style map — every one of the six slots is always populated.
images
readonlyimages:Readonly<Partial<Record<EmailThemeImageType,EmailThemeImage>>>
Defined in: rcml/src/email/theme-types.ts:182
Image map keyed by slot type. Missing slots are intentionally absent.
links
readonlylinks:Readonly<Partial<Record<EmailThemeSocialLinkType,EmailThemeSocialLink>>>
Defined in: rcml/src/email/theme-types.ts:180
Social-link map keyed by slot type. Missing slots are intentionally absent.