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

    The Utila vaults, and which one each kind of wallet or operation uses. UtilaVaultAdminService adds the writes, each of which busts this cache.

    Hierarchy (View Summary)

    Index
    cache: ServiceCache<CachedSearchPage<UtilaVault>>
    db: B2bDatabase
    instance: (...args: []) => UtilaVaultService = ...

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

    • The vault customerId's sweep wallets are created in: its own live vault, else CFX's internal vault, else the generic vault. Null when none exists.

      Parameters

      • __namedParameters: { customerId: string }

      Returns Promise<UtilaVault | null>

      when two live vaults are owned by internal customers.

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

    • Stored rows only; the getFor* reads apply the fallbacks.

      Parameters

      • __namedParameters: UtilaVaultFilters & { includeDeleted?: boolean } = {}

      Returns Promise<
          {
              ok: true;
              value: { hasNext: boolean; items: UtilaVault[]; 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 UtilaVaultService.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>