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

    Admin reads and edits over product rows across all customers. Products are inserted by migration; only name and description are runtime-editable (see rules/cascade-product.md). update is the only runtime writer, so it alone busts the product-search cache and the product's record tag wherever another namespace's pages copy its columns.

    Hierarchy (View Summary)

    Index
    db: B2bDatabase
    routeService: ProductRouteService
    instance: (...args: []) => ProductAdminService = ...

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

    • The whole catalogue, unscoped. Always paginated (pageSize defaults to 50) — a caller that wants every row pages through with searchIterator, never by omitting the page size. An "unpaginated when you don't ask" mode is exactly the shape that let fetchVendorList silently truncate at 50 rows.

      Parameters

      • input: ProductAdminSearchInput = {}

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

    • Every live product as the route engine resolves it for one entity, or for an entity type alone (entity-specific fields absent), in one statement.

      Parameters

      • input: ProductFilters & (
            { customerId: string; page?: number | undefined; pageSize?: number | undefined; } & ProductAccessSubject
        )

      Returns Promise<
          | { error: ServiceError; ok: false }
          | {
              ok: true;
              value: { hasNext: boolean; items: ProductAccess[]; total: number };
          },
      >

    • Update mutable fields on a product. Only name and description are editable; id/externalId is immutable. Pass null for description to clear it.

      Parameters

      • input: { data: { description?: string | null; name?: string }; id: string }

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