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

    The wire-file writer. Extends the reader, so its writes bust the very cache instance its own get / search read through.

    Hierarchy (View Summary)

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

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

    • Parameters

      • args: { ids: string[]; tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations> }

      Returns Promise<
          | { ok: true; value: { affectedBatchIds: string[] } }
          | { 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[]