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

    Class VerificationTemplateAdminService

    Cross-customer management of verification templates: the platform defaults and each customer's overrides. Reads project the external customerId and its customerName.

    The table's only writer: every write busts the verification-template-search namespace this reads through and VerificationTemplateService shares.

    Hierarchy

    • VerificationTemplateCache
      • VerificationTemplateAdminService
    Index
    cache: ServiceCache<CachedSearchPage<VerificationTemplate>>
    instance: (...args: []) => VerificationTemplateAdminService = ...

    The process default: built from each dependency's own instance().

    • Tags for a consumer page: its customer, if any, plus the defaults it resolves through.

      Parameters

      • customerId: string | null

      Returns string[]

    • A default for type when customerId is null, else that customer's override. One live row per (type, customer): replace one with update.

      Parameters

      • input: {
            aipriseTemplateId: string;
            customerId: string | null;
            type:
                | "ORGANIZATION_KYB"
                | "ORGANIZATION_DOCUMENT"
                | "IDENTITY_AML"
                | "IDENTITY_DOCUMENT"
                | "RELATED_PERSON_DOCUMENT"
                | "PAYMENT_INSTRUMENT_PERSON"
                | "PAYMENT_INSTRUMENT_BUSINESS";
        }

      Returns Promise<
          | { ok: true; value: VerificationTemplate }
          | { error: ServiceError; ok: false },
      >

    • Clear each customer's membership tag and each record tag wherever cached, and always this namespace's collection tag. keys are exact deletes in this instance's key space: the only bust a null client honours.

      Parameters

      • __namedParameters: {
            customerIds: readonly string[];
            keys?: readonly CacheKey[];
            records?: readonly string[];
        }

      Returns Promise<void>

    • Tags for a page: the scope its query searched (each customer's membership tag, else the collection tag), so an empty page is bustable too, plus the records it projects and the fields that chose or ordered its rows.

      Parameters

      • __namedParameters: {
            customerIds: readonly string[] | undefined;
            fields?: readonly string[];
            records?: readonly string[];
        }

      Returns string[]

    • The exact key VerificationTemplateAdminService.get reads through: the args it passes plus search's defaults. JCS drops the undefined filters. Writers delete it so read-after-write holds in memory mode.

      Parameters

      • __namedParameters: { id: string }

      Returns Record<string, unknown>