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

    Type Alias AdminProductQuote

    AdminProductQuote: Omit<
        SelectProductQuote,
        | "id"
        | "customerId"
        | "customerExternalId"
        | "identityId"
        | "identityExternalId"
        | "organizationId"
        | "organizationExternalId"
        | "productId"
        | "productExternalId"
        | PinnedVersionId,
    > & {
        activationRuleId: AdminProductActivationRule["id"]
        | null;
        activationRuleVersion: number | null;
        aggregateLimitRuleId: AdminProductLimitRule["id"] | null;
        aggregateLimitRuleVersion: number | null;
        customerId: string;
        customerName: string;
        entityName: string | null;
        feeRuleId: AdminProductFeeRule["id"] | null;
        feeRuleVersion: number | null;
        id: string;
        identityId: string | null;
        limitRuleId: AdminProductLimitRule["id"] | null;
        limitRuleVersion: number | null;
        organizationId: string | null;
        outcomeDescription: string;
        productId: Product["id"];
        productName: Product["name"];
        routeId: string;
        routeName: string;
        routeVersion: number;
        vendorId: Vendor;
    }

    product_quote row projected for admin consumers. Internal numeric ids are dropped in favour of the joined external ids. The route's external_id is exposed as routeId (joined through product_route_version → product_route) — the audit row pins to the version row, but admins reference routes by their identity-row external_id. productId comes from the joined product.external_id since the row's productId column is an internal FK. Each pinned route and rule version comes back as its parent's external id plus a *Version: 1 for the first version written for that parent, 2 for its second, DISABLED versions counted.

    Type Declaration

    • activationRuleId: AdminProductActivationRule["id"] | null

      NULL with its version when the quote pinned no activation rule; the same holds for the three rules below. A soft-deleted rule still reads.

    • activationRuleVersion: number | null
    • aggregateLimitRuleId: AdminProductLimitRule["id"] | null

      The category-scoped limit rule the aggregate evaluation picked.

    • aggregateLimitRuleVersion: number | null
    • customerId: string
    • customerName: string
    • entityName: string | null

      Display name of whichever entity the quote pinned — identity.full_name or organization.name. NULL only when neither FK is set.

    • feeRuleId: AdminProductFeeRule["id"] | null
    • feeRuleVersion: number | null
    • id: string
    • identityId: string | null
    • limitRuleId: AdminProductLimitRule["id"] | null

      The route-scoped limit rule.

    • limitRuleVersion: number | null
    • organizationId: string | null
    • outcomeDescription: string
    • productId: Product["id"]
    • productName: Product["name"]

      Human display name from product.name (NOT NULL) — the quote's product.

    • routeId: string
    • routeName: string

      Composed route display name: ${product.name} · ${product_vendor.name} for the quote's route (route product == quote product).

    • routeVersion: number
    • vendorId: Vendor