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

    Admin-tier read + update over product_vendor. Vendors are seeded via migration; there is no create() — adding a new vendor requires a new Vendor literal in the schema and a follow-up seed. update() snaps a row into product_vendor_version capturing the post-update state in the same transaction.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Update vendor terms. Snapshots the post-update state into product_vendor_version in the same transaction so the audit log has a row per change. name and data fields are independently optional; only the fields actually present in data are touched.

      bankId agreement against the vendor slug is enforced — bank vendors (dart, metcap) require bankId to equal the slug; non-bank vendors require bankId === null.

      Parameters

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