Skip to content

Rule.io SDK


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?

readonly optional brandStyleId?: 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

readonly colors: 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

readonly fonts: readonly EmailThemeFont[]

Defined in: rcml/src/email/theme-types.ts:184

Ordered list of web-font registrations. Empty when the theme uses only system fonts.


fontStyles

readonly fontStyles: 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

readonly images: 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.


readonly links: 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.