@cfxlabsinc/b2b-services
    Preparing search index...

    One SMS template as both the senders and the editor read it: the registry entry merged with its row, if an operator has touched it. All fields are JSON-safe.

    type SmsTemplate = {
        audience: typeof SMS_TEMPLATE_REGISTRY[SmsTemplateKey]["audience"];
        body: string;
        defaultBody: string;
        draftVersion: number | null;
        group: typeof SMS_TEMPLATE_REGISTRY[SmsTemplateKey]["group"];
        groupDescription: string;
        id: string | null;
        invalidReason: string | null;
        liveBody: string;
        liveVersion: number | null;
        status: "ACTIVE" | "DISABLED";
        statusDescription: string;
        templateKey: SmsTemplateKey;
        templateKeyDescription: string;
    }
    Index
    audience: typeof SMS_TEMPLATE_REGISTRY[SmsTemplateKey]["audience"]
    body: string

    The working copy: the draft, else what sends.

    defaultBody: string
    draftVersion: number | null
    group: typeof SMS_TEMPLATE_REGISTRY[SmsTemplateKey]["group"]

    Which admin list section it sits in.

    groupDescription: string
    id: string | null

    smst_…; null until the first write creates the row.

    invalidReason: string | null

    The validator's verdict on what sends; null when valid.

    liveBody: string

    What sends: the live version's body, else the registry default.

    liveVersion: number | null
    status: "ACTIVE" | "DISABLED"

    DISABLED skips the send. A key with no row is ACTIVE.

    statusDescription: string
    templateKey: SmsTemplateKey
    templateKeyDescription: string