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?: "ADMIN" | "CUSTOMER"OptionalvariableFeeBps?: BigNumber
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 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.