fix(core-flows,types): general fixes to workflow types (#7392)
This commit is contained in:
@@ -8,7 +8,7 @@ export const createShippingProfilesWorkflow = createWorkflow(
|
||||
createShippingProfilesWorkflowId,
|
||||
(
|
||||
input: WorkflowData<FulfillmentWorkflow.CreateShippingProfilesWorkflowInput>
|
||||
): WorkflowData => {
|
||||
): WorkflowData<FulfillmentWorkflow.CreateShippingProfilesWorkflowOutput> => {
|
||||
const shippingProfiles = createShippingProfilesStep(input.data)
|
||||
|
||||
return shippingProfiles
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ProductTypes, PricingTypes } from "@medusajs/types"
|
||||
import { ProductTypes } from "@medusajs/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
createWorkflow,
|
||||
@@ -8,7 +8,7 @@ import { createProductsStep } from "../steps/create-products"
|
||||
import { createVariantPricingLinkStep } from "../steps/create-variant-pricing-link"
|
||||
import { createPriceSetsStep } from "../../pricing"
|
||||
import { associateProductsWithSalesChannelsStep } from "../../sales-channel"
|
||||
import { CreateProductWorkflowInputDTO } from "@medusajs/types/src"
|
||||
import { CreateProductWorkflowInputDTO } from "@medusajs/types"
|
||||
|
||||
type WorkflowInput = {
|
||||
products: CreateProductWorkflowInputDTO[]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShippingOptionPriceType } from "../../fulfillment"
|
||||
import { ShippingOptionDTO, ShippingOptionPriceType } from "../../fulfillment"
|
||||
import { RuleOperatorType } from "../../common"
|
||||
|
||||
export interface CreateShippingOptionsWorkflowInput {
|
||||
@@ -30,6 +30,4 @@ export interface CreateShippingOptionsWorkflowInput {
|
||||
}[]
|
||||
}
|
||||
|
||||
export type CreateShippingOptionsWorkflowOutput = {
|
||||
id: string
|
||||
}[]
|
||||
export type CreateShippingOptionsWorkflowOutput = ShippingOptionDTO[]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FilterableShippingProfileProps } from "../../fulfillment"
|
||||
import { FilterableShippingProfileProps, ShippingProfileDTO } from "../../fulfillment"
|
||||
|
||||
interface CreateShippingProfile {
|
||||
name: string
|
||||
@@ -9,6 +9,8 @@ export interface CreateShippingProfilesWorkflowInput {
|
||||
data: CreateShippingProfile[]
|
||||
}
|
||||
|
||||
export type CreateShippingProfilesWorkflowOutput = ShippingProfileDTO[]
|
||||
|
||||
interface UpdateShippingProfile {
|
||||
name?: string
|
||||
type?: string
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { CreateRegionDTO, RegionDTO } from "../../region"
|
||||
|
||||
export interface CreateRegionsWorkflowInput {
|
||||
regions: (CreateRegionDTO & {
|
||||
payment_providers?: string[]
|
||||
})[]
|
||||
regions: CreateRegionDTO[]
|
||||
}
|
||||
|
||||
export type CreateRegionsWorkflowOutput = RegionDTO[]
|
||||
|
||||
Reference in New Issue
Block a user