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

    Reads the AiPrise verification templates in effect for a customer. Each type resolves to the customer's override when it has one, else the platform default.

    Reads through the verification-template-search cache it shares with VerificationTemplateCache's admin surface, whose writes bust it.

    Hierarchy

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

    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[]

    • The effective template of type for this customer.

      Parameters

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

      Returns Promise<VerificationTemplate>

      when type has no default row — every type needs one, so this is a deploy defect.

    • 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>

    • The effective template per type for this customer: its live override, else the live default (customerId: null). An unknown customerId gets the defaults, and customerId: null (no customer yet) gets only the defaults.

      Parameters

      • __namedParameters: { customerId: string | null } & VerificationTemplateFilters

      Returns Promise<
          {
              ok: true;
              value: { hasNext: boolean; items: VerificationTemplate[]; total: number };
          },
      >

    • 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>