Publishes product.limitRule.*; null publishes nothing (scripts, tests).
Protected ReadonlycacheProtected ReadonlydbStaticinstanceThe process default: built from each dependency's own instance().
ProtectedbustAfter a committed write: the folded-get keys (a tag bust no-ops without
Valkey), then every page through the collection tag.
ProtectedcachedServes input's page from the cache, else runs query and caches it.
OptionalcustomerId?: stringOptionaldescription?: stringOptionaleffectiveFrom?: InstantWhen this version becomes effective. Defaults to now() at the
DB layer when omitted. Pass a future Temporal.Instant to
schedule a change (e.g. Reg E 30-day notice).
Optionallabel?: stringOptionalmatcher?: Matcher | undefinedOptionaltype?: "CUSTOMER" | "ADMIN"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.
OptionalcreatedAt?: DbTimestampCriteria<Instant>OptionalcustomerIds?: string[]Optionalids?: string[]OptionalorderBy?: RuleOrderByCriterion[]Optionalpage?: numberOptionalpageSize?: numberOptionalproductCategories?: ProductCategory[]Matches category rules only.
OptionalrouteIds?: string[]Matches route rules only.
Optionalstatuses?: ("ACTIVE" | "DISABLED")[]Optionaltypes?: ("CUSTOMER" | "ADMIN")[]OptionalupdatedAt?: DbTimestampCriteria<Instant>ProtectedsearchTags 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.
The rule's scope (route or category) is fixed at create.
Admin-tier CRUD over
product_limit_rule. Accepts any rule type (admin-global, admin-for-customer, or customer).Identity / version split: see ProductLimitRuleAdminService (this file). Edits insert a new version row and re-point
currentVersionIdin one transaction.Duplicate-matcher detection is enforced by the partial unique index
product_limit_rule_unique_tuple— seeProductActivationRuleAdminServicefor the rationale.matcherHashis denormalized onto the identity row; service code maintains identity.matcherHash = currentVersion.matcherHash on every version bump and translates the unique-violation back intoDUPLICATE_MATCHER.