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

    The read model the 11 sending apps use to look up stored email-template copy (docs/proposals/EMAIL_TEMPLATES.md §4.5). One cached search surface, keyed by the filters a caller actually passes; EmailTemplateAdminService busts it after every write through the shared email-template-search tag vocabulary.

    This service exposes the send projection (ActiveEmailTemplate, pinned to the active version). EmailTemplateAdminService exposes the authoring projection over the same namespace but a separate key prefix, because an identical filter object means a different value under the two definitions (CACHING.md §6).

    Index
    • The one cached read surface (§4.5, CACHING.md "One cached read surface").

      live: true (the sending path always passes it) returns only variants with a live version, joined to that version so template is the copy actually sending. Without it the query admits variants whose only version is a draft — an authoring view, kept out of the send path.

      An empty items for a requested key means that variant is switched off; the caller decides the fallback (hosted template before Phase 4, fail-at-lookup after).

      Parameters

      • input: {
            keys?: readonly (
                | "IDENTITY"
                | "ORGANIZATION"
                | "LEDGER_ACCOUNT"
                | "PAYMENT_INSTRUMENT"
                | "DEPOSIT"
                | "WITHDRAW"
                | "TRANSFER"
                | "CARD_TRANSACTION"
            )[];
            live?: boolean;
            page?: number;
            pageSize?: number;
            statusVariants?: readonly string[];
        }
        • Optionalkeys?: readonly (
              | "IDENTITY"
              | "ORGANIZATION"
              | "LEDGER_ACCOUNT"
              | "PAYMENT_INSTRUMENT"
              | "DEPOSIT"
              | "WITHDRAW"
              | "TRANSFER"
              | "CARD_TRANSACTION"
          )[]
        • Optionallive?: boolean

          Only variants with a live version. The sending path always passes true.

        • Optionalpage?: number
        • OptionalpageSize?: number
        • OptionalstatusVariants?: readonly string[]

      Returns Promise<{ ok: true; value: { hasNext: boolean; items: ActiveEmailTemplate[] } }>