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:
@@ -1,4 +1,5 @@
|
||||
import { isContextValid, RuleOperator } from "../utils"
|
||||
import { RuleOperator } from "@medusajs/utils"
|
||||
import { isContextValid } from "../utils"
|
||||
|
||||
describe("isContextValidForRules", () => {
|
||||
const context = {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user