feat(core-flows,medusa,types,utils): add/remove fulfillment shipping option rules (#6698)

what:

- adds fulfillment shipping option rules batch endpoint
- remove fulfillment shipping option rules batch endpoint
- breaks my British based education to not call it fulfilment with a single "l"
This commit is contained in:
Riqwan Thamir
2024-03-14 16:02:50 +00:00
committed by GitHub
parent 480b4744af
commit cc1b66842c
24 changed files with 556 additions and 19 deletions
@@ -1,4 +1,5 @@
import { isContextValid, RuleOperator } from "../utils"
import { RuleOperator } from "@medusajs/utils"
import { isContextValid } from "../utils"
describe("isContextValidForRules", () => {
const context = {
+6 -12
View File
@@ -1,4 +1,9 @@
import { isString, MedusaError, pickValueFromObject } from "@medusajs/utils"
import {
isString,
MedusaError,
pickValueFromObject,
RuleOperator,
} from "@medusajs/utils"
/**
* The rule engine here is kept inside the module as of now, but it could be moved
@@ -14,17 +19,6 @@ export type Rule = {
value: string | string[] | null
}
export enum RuleOperator {
IN = "in",
EQ = "eq",
NE = "ne",
GT = "gt",
GTE = "gte",
LT = "lt",
LTE = "lte",
NIN = "nin",
}
export const availableOperators = Object.values(RuleOperator)
const isDate = (str: string) => {