feat: Create shipping options workflow (#6962)
**What** - Create main workflow - Update create pricing rule types step to be idempotent - update remote joiner to support granular isList confguration on field aliases - Add full workflow integration tests
This commit is contained in:
1 parent
5e30b8cce6
commit
65794f4bb5
20 files changed
+804
-20
No files matched your search
@@ -147,7 +147,8 @@ export type ModuleJoinerConfig = Omit<
|
||||
| string
|
||||
| {
|
||||
path: string
|
||||
forwardArgumentsOnPath: string[]
|
||||
forwardArgumentsOnPath?: string[]
|
||||
isList?: boolean
|
||||
}
|
||||
> // alias for deeper nested relationships (e.g. { 'price': 'prices.calculated_price_set.amount' })
|
||||
relationship: ModuleJoinerRelationship
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import { ShippingOptionPriceType } from "../../fulfillment"
|
||||
import { RuleOperatorType } from "../../common"
|
||||
|
||||
export interface CreateShippingOptionsWorkflowInput {
|
||||
name: string
|
||||
service_zone_id: string
|
||||
shipping_profile_id: string
|
||||
data?: Record<string, unknown>
|
||||
price_type: ShippingOptionPriceType
|
||||
provider_id: string
|
||||
type: {
|
||||
label: string
|
||||
description: string
|
||||
code: string
|
||||
}
|
||||
prices: (
|
||||
| {
|
||||
currency_code: string
|
||||
amount: number
|
||||
}
|
||||
| {
|
||||
region_id: string
|
||||
amount: number
|
||||
}
|
||||
)[]
|
||||
rules?: {
|
||||
attribute: string
|
||||
operator: RuleOperatorType
|
||||
value: string | string[]
|
||||
}[]
|
||||
}
|
||||
|
||||
export type CreateShippingOptionsWorkflowOutput = {
|
||||
id: string
|
||||
}[]
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./create-shipping-options"
|
||||
@@ -6,3 +6,4 @@ export * as PriceListWorkflow from "./price-list"
|
||||
export * as UserWorkflow from "./user"
|
||||
export * as RegionWorkflow from "./region"
|
||||
export * as InviteWorkflow from "./invite"
|
||||
export * as FulfillmentWorkflow from "./fulfillment"
|
||||
Reference in new issue
Block a user