Publishes product.feeRule.*; 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).
OptionalfixedFeeAmount?: BigNumberOptionallabel?: stringOptionalmatcher?: MatcherOptionaltype?: "CUSTOMER" | "ADMIN"OptionalvariableFeeBps?: BigNumberClear 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.
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.
Admin-tier CRUD over
product_fee_rule. Accepts any rule type (admin-global, admin-for-customer, or customer).Identity / version split:
product_fee_ruleholds scope columns(routeId, customerId, type)plus acurrentVersionIdpointer; every mutable field (matcher, status, priority, fee values, label, description) lives onproduct_fee_rule_versionand is append-only. Editing means inserting a new version row, merged onto the version in effect now, and re-pointingcurrentVersionIdin one transaction.Duplicate-matcher detection is enforced by the partial unique index
product_fee_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.