chore: perform dependencies scan and fix all dependencies (#9296)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { CreateApiKeyDTO, IApiKeyModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
CreateApiKeyDTO,
|
||||
IApiKeyModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type CreateApiKeysStepInput = {
|
||||
api_keys: CreateApiKeyDTO[]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IApiKeyModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { IApiKeyModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const deleteApiKeysStepId = "delete-api-keys"
|
||||
/**
|
||||
|
||||
+7
-3
@@ -1,6 +1,10 @@
|
||||
import { LinkWorkflowInput } from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys, Modules, promiseAll } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { LinkWorkflowInput } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
Modules,
|
||||
promiseAll,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const linkSalesChannelsToApiKeyStepId = "link-sales-channels-to-api-key"
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
FilterableApiKeyProps,
|
||||
IApiKeyModuleService,
|
||||
RevokeApiKeyDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type RevokeApiKeysStepInput = {
|
||||
selector: FilterableApiKeyProps
|
||||
|
||||
@@ -2,9 +2,12 @@ import {
|
||||
FilterableApiKeyProps,
|
||||
IApiKeyModuleService,
|
||||
UpdateApiKeyDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, getSelectsAndRelationsFromObjectArray } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
getSelectsAndRelationsFromObjectArray,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type UpdateApiKeysStepInput = {
|
||||
selector: FilterableApiKeyProps
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { ISalesChannelModuleService } from "@medusajs/types"
|
||||
import { MedusaError, Modules, arrayDifference } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { ISalesChannelModuleService } from "@medusajs/framework/types"
|
||||
import {
|
||||
MedusaError,
|
||||
Modules,
|
||||
arrayDifference,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ValidateSalesChannelsExistStepInput {
|
||||
sales_channel_ids: string[]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ApiKeyDTO, CreateApiKeyDTO } from "@medusajs/types"
|
||||
import { ApiKeyDTO, CreateApiKeyDTO } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { createApiKeysStep } from "../steps"
|
||||
|
||||
export type CreateApiKeysWorkflowInput = { api_keys: CreateApiKeyDTO[] }
|
||||
@@ -14,7 +14,9 @@ export const createApiKeysWorkflowId = "create-api-keys"
|
||||
*/
|
||||
export const createApiKeysWorkflow = createWorkflow(
|
||||
createApiKeysWorkflowId,
|
||||
(input: WorkflowData<CreateApiKeysWorkflowInput>): WorkflowResponse<ApiKeyDTO[]> => {
|
||||
(
|
||||
input: WorkflowData<CreateApiKeysWorkflowInput>
|
||||
): WorkflowResponse<ApiKeyDTO[]> => {
|
||||
return new WorkflowResponse(createApiKeysStep(input))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createWorkflow, WorkflowData } from "@medusajs/workflows-sdk"
|
||||
import { createWorkflow, WorkflowData } from "@medusajs/framework/workflows-sdk"
|
||||
import { removeRemoteLinkStep } from "../../common/steps/remove-remote-links"
|
||||
import { deleteApiKeysStep } from "../steps"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export type DeleteApiKeysWorkflowInput = { ids: string[] }
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { LinkWorkflowInput } from "@medusajs/types"
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk"
|
||||
import { LinkWorkflowInput } from "@medusajs/framework/types"
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/framework/workflows-sdk"
|
||||
import {
|
||||
linkSalesChannelsToApiKeyStep,
|
||||
validateSalesChannelsExistStep,
|
||||
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
ApiKeyDTO,
|
||||
FilterableApiKeyProps,
|
||||
RevokeApiKeyDTO,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { revokeApiKeysStep } from "../steps"
|
||||
|
||||
export type RevokeApiKeysWorkflowInput = {
|
||||
@@ -21,7 +21,9 @@ export const revokeApiKeysWorkflowId = "revoke-api-keys"
|
||||
*/
|
||||
export const revokeApiKeysWorkflow = createWorkflow(
|
||||
revokeApiKeysWorkflowId,
|
||||
(input: WorkflowData<RevokeApiKeysWorkflowInput>): WorkflowResponse<ApiKeyDTO[]> => {
|
||||
(
|
||||
input: WorkflowData<RevokeApiKeysWorkflowInput>
|
||||
): WorkflowResponse<ApiKeyDTO[]> => {
|
||||
return new WorkflowResponse(revokeApiKeysStep(input))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
ApiKeyDTO,
|
||||
FilterableApiKeyProps,
|
||||
UpdateApiKeyDTO,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { updateApiKeysStep } from "../steps"
|
||||
|
||||
export type UpdateApiKeysWorkflowInput = {
|
||||
@@ -21,7 +21,9 @@ export const updateApiKeysWorkflowId = "update-api-keys"
|
||||
*/
|
||||
export const updateApiKeysWorkflow = createWorkflow(
|
||||
updateApiKeysWorkflowId,
|
||||
(input: WorkflowData<UpdateApiKeysWorkflowInput>): WorkflowResponse<ApiKeyDTO[]> => {
|
||||
(
|
||||
input: WorkflowData<UpdateApiKeysWorkflowInput>
|
||||
): WorkflowResponse<ApiKeyDTO[]> => {
|
||||
return new WorkflowResponse(updateApiKeysStep(input))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
import { IAuthModuleService } from "@medusajs/types"
|
||||
import { isDefined, Modules } from "@medusajs/utils"
|
||||
import { IAuthModuleService } from "@medusajs/framework/types"
|
||||
import { isDefined, Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export type SetAuthAppMetadataStepInput = {
|
||||
authIdentityId: string
|
||||
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
AuthWorkflowEvents,
|
||||
generateJwtToken,
|
||||
MedusaError,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
createWorkflow,
|
||||
transform,
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { emitEventStep, useRemoteQueryStep } from "../../common"
|
||||
|
||||
export const generateResetPasswordTokenWorkflow = createWorkflow(
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { CreateShippingMethodDTO, ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
CreateShippingMethodDTO,
|
||||
ICartModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface AddShippingMethodToCartStepInput {
|
||||
shipping_methods: CreateShippingMethodDTO[]
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { MathBN, MedusaError, Modules, promiseAll } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import {
|
||||
MathBN,
|
||||
MedusaError,
|
||||
Modules,
|
||||
promiseAll,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ConfirmVariantInventoryStepInput {
|
||||
items: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CreateCartDTO, ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { CreateCartDTO, ICartModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const createCartsStepId = "create-carts"
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
CreateLineItemAdjustmentDTO,
|
||||
ICartModuleService,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface CreateLineItemAdjustmentsCartStepInput {
|
||||
lineItemAdjustmentsToCreate: CreateLineItemAdjustmentDTO[]
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { CreateLineItemForCartDTO, ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
CreateLineItemForCartDTO,
|
||||
ICartModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface CreateLineItemsCartStepInput {
|
||||
id: string
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { BigNumberInput, IPaymentModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
BigNumberInput,
|
||||
IPaymentModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type CreatePaymentCollectionCartStepInput = {
|
||||
region_id: string
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
CreateShippingMethodAdjustmentDTO,
|
||||
ICartModuleService,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface CreateShippingMethodAdjustmentsStepInput {
|
||||
shippingMethodAdjustmentsToCreate: CreateShippingMethodAdjustmentDTO[]
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { IRegionModuleService, IStoreModuleService } from "@medusajs/types"
|
||||
import { MedusaError, Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
IRegionModuleService,
|
||||
IStoreModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { MedusaError, Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const findOneOrAnyRegionStepId = "find-one-or-any-region"
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CustomerDTO, ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules, validateEmail } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { CustomerDTO, ICustomerModuleService } from "@medusajs/framework/types"
|
||||
import { Modules, validateEmail } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface FindOrCreateCustomerStepInput {
|
||||
customerId?: string | null
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
ISalesChannelModuleService,
|
||||
IStoreModuleService,
|
||||
SalesChannelDTO,
|
||||
} from "@medusajs/types"
|
||||
import { MedusaError, Modules, isDefined } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { MedusaError, Modules, isDefined } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface FindSalesChannelStepInput {
|
||||
salesChannelId?: string | null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CartDTO, IPromotionModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { CartDTO, IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface GetActionsToComputeFromPromotionsStepInput {
|
||||
cart: CartDTO
|
||||
|
||||
@@ -8,9 +8,9 @@ import {
|
||||
TaxCalculationContext,
|
||||
TaxableItemDTO,
|
||||
TaxableShippingDTO,
|
||||
} from "@medusajs/types"
|
||||
import { MedusaError, Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { MedusaError, Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface GetItemTaxLinesStepInput {
|
||||
cart: CartWorkflowDTO
|
||||
|
||||
@@ -3,9 +3,14 @@ import {
|
||||
CreateLineItemForCartDTO,
|
||||
ICartModuleService,
|
||||
UpdateLineItemWithSelectorDTO,
|
||||
} from "@medusajs/types"
|
||||
import { MathBN, Modules, deepEqualObj, isPresent } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
MathBN,
|
||||
Modules,
|
||||
deepEqualObj,
|
||||
isPresent,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface GetLineItemActionsStepInput {
|
||||
id: string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { Modules, PromotionActions } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import { Modules, PromotionActions } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface GetPromotionCodesToApplyStepInput {
|
||||
cart: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IPricingModuleService } from "@medusajs/types"
|
||||
import { MedusaError, Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { IPricingModuleService } from "@medusajs/framework/types"
|
||||
import { MedusaError, Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface GetVariantPriceSetsStepInput {
|
||||
variantIds: string[]
|
||||
|
||||
@@ -3,9 +3,9 @@ import {
|
||||
FindConfig,
|
||||
IProductModuleService,
|
||||
ProductVariantDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface GetVariantsStepInput {
|
||||
filter?: FilterableProductVariantProps
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@ import {
|
||||
PromotionDTO,
|
||||
RemoveItemAdjustmentAction,
|
||||
RemoveShippingMethodAdjustment,
|
||||
} from "@medusajs/types"
|
||||
import { ComputedActions, Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { ComputedActions, Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface PrepareAdjustmentsFromPromotionActionsStepInput {
|
||||
actions: ComputeActions[]
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
CartDTO,
|
||||
ICartModuleService,
|
||||
IFulfillmentModuleService,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, arrayDifference } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, arrayDifference } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface RefreshCartShippingMethodsStepInput {
|
||||
cart: CartDTO
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { ICartModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface RemoveLineItemAdjustmentsStepInput {
|
||||
lineItemAdjustmentIdsToRemove: string[]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { ICartModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface RemoveShippingMethodAdjustmentsStepInput {
|
||||
shippingMethodAdjustmentIdsToRemove: string[]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { ICartModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface RemoveShippingMethodFromCartStepInput {
|
||||
shipping_method_ids: string[]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IInventoryService } from "@medusajs/types"
|
||||
import { MathBN, Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { IInventoryService } from "@medusajs/framework/types"
|
||||
import { MathBN, Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ReserveVariantInventoryStepInput {
|
||||
items: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CartWorkflowDTO } from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys, isObject } from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { CartWorkflowDTO } from "@medusajs/framework/types"
|
||||
import { ContainerRegistrationKeys, isObject } from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface RetrieveCartWithLinksStepInput {
|
||||
cart_or_cart_id: string | CartWorkflowDTO
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { CartDTO, FindConfig, ICartModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
CartDTO,
|
||||
FindConfig,
|
||||
ICartModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface RetrieveCartStepInput {
|
||||
id: string
|
||||
|
||||
@@ -5,9 +5,9 @@ import {
|
||||
ICartModuleService,
|
||||
ItemTaxLineDTO,
|
||||
ShippingTaxLineDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface SetTaxLinesForItemsStepInput {
|
||||
cart: CartWorkflowDTO
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
Modules,
|
||||
PromotionActions,
|
||||
} from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface UpdateCartPromotionStepInput {
|
||||
id: string
|
||||
|
||||
@@ -2,9 +2,12 @@ import {
|
||||
ICartModuleService,
|
||||
UpdateCartDTO,
|
||||
UpdateCartWorkflowInputDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, getSelectsAndRelationsFromObjectArray } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
getSelectsAndRelationsFromObjectArray,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const updateCartsStepId = "update-carts"
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import {
|
||||
ICartModuleService,
|
||||
UpdateLineItemWithSelectorDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, getSelectsAndRelationsFromObjectArray } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
getSelectsAndRelationsFromObjectArray,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface UpdateLineItemsStepInput {
|
||||
id: string
|
||||
@@ -17,7 +20,7 @@ export const updateLineItemsStepId = "update-line-items-step"
|
||||
export const updateLineItemsStep = createStep(
|
||||
updateLineItemsStepId,
|
||||
async (input: UpdateLineItemsStepInput, { container }) => {
|
||||
const { id, items = [] } = input
|
||||
const { items = [] } = input
|
||||
|
||||
if (!items?.length) {
|
||||
return new StepResponse([], [])
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { CartWorkflowDTO } from "@medusajs/types"
|
||||
import { isPresent, MedusaError, PaymentSessionStatus } from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { CartWorkflowDTO } from "@medusajs/framework/types"
|
||||
import {
|
||||
isPresent,
|
||||
MedusaError,
|
||||
PaymentSessionStatus,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ValidateCartPaymentsStepInput {
|
||||
cart: CartWorkflowDTO
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { CartDTO, IFulfillmentModuleService } from "@medusajs/types"
|
||||
import { MedusaError, Modules, arrayDifference } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { CartDTO, IFulfillmentModuleService } from "@medusajs/framework/types"
|
||||
import {
|
||||
MedusaError,
|
||||
Modules,
|
||||
arrayDifference,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ValidateCartShippingOptionsStepInput {
|
||||
cart: CartDTO
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CartDTO, CartWorkflowDTO } from "@medusajs/types"
|
||||
import { MedusaError, isPresent } from "@medusajs/utils"
|
||||
import { createStep } from "@medusajs/workflows-sdk"
|
||||
import { CartDTO, CartWorkflowDTO } from "@medusajs/framework/types"
|
||||
import { MedusaError, isPresent } from "@medusajs/framework/utils"
|
||||
import { createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ValidateCartStepInput {
|
||||
cart: CartWorkflowDTO | CartDTO
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumberInput } from "@medusajs/types"
|
||||
import { MedusaError, isPresent } from "@medusajs/utils"
|
||||
import { createStep } from "@medusajs/workflows-sdk"
|
||||
import { BigNumberInput } from "@medusajs/framework/types"
|
||||
import { MedusaError, isPresent } from "@medusajs/framework/utils"
|
||||
import { createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface ValidateVariantPricesStepInput {
|
||||
variants: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
BigNumberInput,
|
||||
ConfirmVariantInventoryWorkflowInputDTO,
|
||||
} from "@medusajs/types"
|
||||
import { MedusaError, deepFlatMap } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { MedusaError, deepFlatMap } from "@medusajs/framework/utils"
|
||||
|
||||
interface ConfirmInventoryPreparationInput {
|
||||
product_variant_inventory_items: {
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
CreateOrderLineItemTaxLineDTO,
|
||||
InventoryItemDTO,
|
||||
ProductVariantDTO,
|
||||
} from "@medusajs/types"
|
||||
import { isDefined } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { isDefined } from "@medusajs/framework/utils"
|
||||
|
||||
interface Input {
|
||||
item?: CartLineItemDTO
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
WorkflowData,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
import {
|
||||
addShippingMethodToCartStep,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {
|
||||
AddToCartWorkflowInputDTO,
|
||||
CreateLineItemForCartDTO,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
import {
|
||||
createLineItemsStep,
|
||||
|
||||
@@ -2,15 +2,19 @@ import {
|
||||
CartWorkflowDTO,
|
||||
OrderDTO,
|
||||
UsageComputedActions,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, OrderStatus, OrderWorkflowEvents } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
OrderStatus,
|
||||
OrderWorkflowEvents,
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import {
|
||||
createRemoteLinkStep,
|
||||
emitEventStep,
|
||||
@@ -61,28 +65,25 @@ export const completeCartWorkflow = createWorkflow(
|
||||
context: { cart_id: cart.id },
|
||||
})
|
||||
|
||||
const { variants, items, sales_channel_id } = transform(
|
||||
{ cart },
|
||||
(data) => {
|
||||
const allItems: any[] = []
|
||||
const allVariants: any[] = []
|
||||
const { variants, sales_channel_id } = transform({ cart }, (data) => {
|
||||
const allItems: any[] = []
|
||||
const allVariants: any[] = []
|
||||
|
||||
data.cart?.items?.forEach((item) => {
|
||||
allItems.push({
|
||||
id: item.id,
|
||||
variant_id: item.variant_id,
|
||||
quantity: item.quantity,
|
||||
})
|
||||
allVariants.push(item.variant)
|
||||
data.cart?.items?.forEach((item) => {
|
||||
allItems.push({
|
||||
id: item.id,
|
||||
variant_id: item.variant_id,
|
||||
quantity: item.quantity,
|
||||
})
|
||||
allVariants.push(item.variant)
|
||||
})
|
||||
|
||||
return {
|
||||
variants: allVariants,
|
||||
items: allItems,
|
||||
sales_channel_id: data.cart.sales_channel_id,
|
||||
}
|
||||
return {
|
||||
variants: allVariants,
|
||||
items: allItems,
|
||||
sales_channel_id: data.cart.sales_channel_id,
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
const finalCart = useRemoteQueryStep({
|
||||
entry_point: "cart",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ConfirmVariantInventoryWorkflowInputDTO } from "@medusajs/types"
|
||||
import { ConfirmVariantInventoryWorkflowInputDTO } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { confirmInventoryStep } from "../steps"
|
||||
import { prepareConfirmInventoryInput } from "../utils/prepare-confirm-inventory-input"
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { AdditionalData, CreateCartWorkflowInputDTO } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import {
|
||||
AdditionalData,
|
||||
CreateCartWorkflowInputDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
@@ -7,7 +10,7 @@ import {
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
import {
|
||||
createCartsStep,
|
||||
@@ -126,9 +129,11 @@ export const createCartWorkflow = createWorkflow(
|
||||
|
||||
return prepareLineItemData({
|
||||
variant: variant,
|
||||
unitPrice: item.unit_price ||
|
||||
unitPrice:
|
||||
item.unit_price ||
|
||||
data.priceSets[item.variant_id].calculated_amount,
|
||||
isTaxInclusive: item.is_tax_inclusive ||
|
||||
isTaxInclusive:
|
||||
item.is_tax_inclusive ||
|
||||
data.priceSets[item.variant_id].is_calculated_price_tax_inclusive,
|
||||
quantity: item.quantity,
|
||||
metadata: item?.metadata ?? {},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {
|
||||
CartDTO,
|
||||
CreatePaymentCollectionForCartWorkflowInputDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { createRemoteLinkStep } from "../../common/steps/create-remote-links"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
import { createPaymentCollectionsStep } from "../steps/create-payment-collection"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ListShippingOptionsForCartWorkflowInputDTO } from "@medusajs/types"
|
||||
import { deepFlatMap, isPresent, MedusaError } from "@medusajs/utils"
|
||||
import { ListShippingOptionsForCartWorkflowInputDTO } from "@medusajs/framework/types"
|
||||
import { deepFlatMap, isPresent, MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
createWorkflow,
|
||||
transform,
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
|
||||
export const listShippingOptionsForCartWorkflowId =
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { MathBN, isPresent } from "@medusajs/utils"
|
||||
import { MathBN, isPresent } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
when,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
import { updatePaymentCollectionStep } from "../../payment-collection"
|
||||
import { deletePaymentSessionsWorkflow } from "../../payment-collection/workflows/delete-payment-sessions"
|
||||
@@ -21,7 +21,9 @@ export const refreshPaymentCollectionForCartWorkflowId =
|
||||
*/
|
||||
export const refreshPaymentCollectionForCartWorkflow = createWorkflow(
|
||||
refreshPaymentCollectionForCartWorkflowId,
|
||||
(input: WorkflowData<RefreshPaymentCollectionForCartWorklowInput>): WorkflowData<void> => {
|
||||
(
|
||||
input: WorkflowData<RefreshPaymentCollectionForCartWorklowInput>
|
||||
): WorkflowData<void> => {
|
||||
const cart = useRemoteQueryStep({
|
||||
entry_point: "cart",
|
||||
fields: [
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { PromotionActions } from "@medusajs/utils"
|
||||
import { PromotionActions } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common"
|
||||
import {
|
||||
createLineItemAdjustmentsStep,
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import { AdditionalData, UpdateCartWorkflowInputDTO } from "@medusajs/types"
|
||||
import { MedusaError, PromotionActions, isPresent } from "@medusajs/utils"
|
||||
import {
|
||||
AdditionalData,
|
||||
UpdateCartWorkflowInputDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
MedusaError,
|
||||
PromotionActions,
|
||||
isPresent,
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
@@ -7,7 +14,7 @@ import {
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common"
|
||||
import {
|
||||
findOneOrAnyRegionStep,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { UpdateLineItemInCartWorkflowInputDTO } from "@medusajs/types"
|
||||
import { UpdateLineItemInCartWorkflowInputDTO } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common/steps/use-remote-query"
|
||||
import { updateLineItemsStepWithSelector } from "../../line-item/steps"
|
||||
import { refreshCartShippingMethodsStep } from "../steps"
|
||||
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
CartLineItemDTO,
|
||||
CartShippingMethodDTO,
|
||||
CartWorkflowDTO,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import {
|
||||
getItemTaxLinesStep,
|
||||
retrieveCartWithLinksStep,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface CreateEntitiesStepType {
|
||||
moduleRegistrationName: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { RemoteLink } from "@medusajs/modules-sdk"
|
||||
import { LinkDefinition } from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys } from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { RemoteLink } from "@medusajs/framework/modules-sdk"
|
||||
import { LinkDefinition } from "@medusajs/framework/types"
|
||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const createLinksStepId = "create-remote-links"
|
||||
/**
|
||||
@@ -12,13 +12,13 @@ export const createLinksStepId = "create-remote-links"
|
||||
* @example
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* createRemoteLinkStep
|
||||
* } from "@medusajs/core-flows"
|
||||
* import {
|
||||
* Modules
|
||||
* } from "@medusajs/utils"
|
||||
* } from "@medusajs/framework/utils"
|
||||
*
|
||||
* const helloWorldWorkflow = createWorkflow(
|
||||
* "hello-world",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export interface DeleteEntitiesStepType {
|
||||
moduleRegistrationName: string
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { RemoteLink } from "@medusajs/modules-sdk"
|
||||
import { LinkDefinition } from "@medusajs/types"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { RemoteLink } from "@medusajs/framework/modules-sdk"
|
||||
import { LinkDefinition } from "@medusajs/framework/types"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
import { ContainerRegistrationKeys } from "@medusajs/utils"
|
||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
||||
|
||||
export type DismissRemoteLinksStepInput = LinkDefinition | LinkDefinition[]
|
||||
|
||||
@@ -16,13 +16,13 @@ export const dismissRemoteLinkStepId = "dismiss-remote-links"
|
||||
* @example
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* dismissRemoteLinkStep
|
||||
* } from "@medusajs/core-flows"
|
||||
* import {
|
||||
* Modules
|
||||
* } from "@medusajs/utils"
|
||||
* } from "@medusajs/framework/utils"
|
||||
*
|
||||
* const helloWorldWorkflow = createWorkflow(
|
||||
* "hello-world",
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import { EventBusTypes, IEventBusModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepExecutionContext, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
EventBusTypes,
|
||||
IEventBusModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import {
|
||||
StepExecutionContext,
|
||||
createStep,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
/**
|
||||
* The event's details.
|
||||
@@ -37,7 +43,7 @@ export const emitEventStepId = "emit-event-step"
|
||||
* @example
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* emitEventStep
|
||||
* } from "@medusajs/core-flows"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { createStep } from "@medusajs/workflows-sdk"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const releaseEventsStepId = "release-events-step"
|
||||
export const releaseEventsStep = createStep(
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { DeleteEntityInput, RemoteLink } from "@medusajs/modules-sdk"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { DeleteEntityInput, RemoteLink } from "@medusajs/framework/modules-sdk"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
import { ContainerRegistrationKeys } from "@medusajs/utils"
|
||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
||||
|
||||
type RemoveRemoteLinksStepInput = DeleteEntityInput | DeleteEntityInput[]
|
||||
|
||||
export const removeRemoteLinkStepId = "remove-remote-links"
|
||||
/**
|
||||
* This step deletes linked records of a record.
|
||||
*
|
||||
*
|
||||
* Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* removeRemoteLinkStep
|
||||
* } from "@medusajs/core-flows"
|
||||
* import {
|
||||
* Modules
|
||||
* } from "@medusajs/utils"
|
||||
*
|
||||
* } from "@medusajs/framework/utils"
|
||||
*
|
||||
* const helloWorldWorkflow = createWorkflow(
|
||||
* "hello-world",
|
||||
* () => {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { RemoteLink } from "@medusajs/modules-sdk"
|
||||
import { LinkDefinition } from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys, MedusaError } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import { RemoteLink } from "@medusajs/framework/modules-sdk"
|
||||
import { LinkDefinition } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const updateRemoteLinksStepId = "update-remote-links-step"
|
||||
export const updateRemoteLinksStep = createStep(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
/**
|
||||
* The remote query's details.
|
||||
@@ -59,7 +59,7 @@ export const useRemoteQueryStepId = "use-remote-query"
|
||||
* ```ts
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* useRemoteQueryStep
|
||||
* } from "@medusajs/core-flows"
|
||||
@@ -83,7 +83,7 @@ export const useRemoteQueryStepId = "use-remote-query"
|
||||
* ```ts
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* useRemoteQueryStep
|
||||
* } from "@medusajs/core-flows"
|
||||
@@ -113,7 +113,7 @@ export const useRemoteQueryStepId = "use-remote-query"
|
||||
* ```ts
|
||||
* import {
|
||||
* createWorkflow
|
||||
* } from "@medusajs/workflows-sdk"
|
||||
* } from "@medusajs/framework/workflows-sdk"
|
||||
* import {
|
||||
* useRemoteQueryStep
|
||||
* } from "@medusajs/core-flows"
|
||||
@@ -155,8 +155,6 @@ export const useRemoteQueryStep = createStep(
|
||||
service: !isUsingEntryPoint ? data.service : undefined,
|
||||
} as Parameters<typeof remoteQueryObjectFromString>[0]
|
||||
|
||||
const queryObject = remoteQueryObjectFromString(queryObjectConfig)
|
||||
|
||||
const config = {
|
||||
throwIfKeyNotFound: !!data.throw_if_key_not_found,
|
||||
throwIfRelationNotFound: data.throw_if_key_not_found
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { BatchWorkflowInput, LinkDefinition } from "@medusajs/types"
|
||||
import { BatchWorkflowInput, LinkDefinition } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { createRemoteLinkStep } from "../steps/create-remote-links"
|
||||
import { dismissRemoteLinkStep } from "../steps/dismiss-remote-links"
|
||||
import { updateRemoteLinksStep } from "../steps/update-remote-links"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { LinkDefinition } from "@medusajs/types"
|
||||
import { LinkDefinition } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { createRemoteLinkStep } from "../steps/create-remote-links"
|
||||
|
||||
export const createLinksWorkflowId = "create-link"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { LinkDefinition } from "@medusajs/types"
|
||||
import { LinkDefinition } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { dismissRemoteLinkStep } from "../steps/dismiss-remote-links"
|
||||
|
||||
export const dismissLinksWorkflowId = "dismiss-link"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { LinkDefinition } from "@medusajs/types"
|
||||
import { LinkDefinition } from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { updateRemoteLinksStep } from "../steps/update-remote-links"
|
||||
|
||||
export const updateLinksWorkflowId = "update-link"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { CreateCustomerGroupDTO, ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
CreateCustomerGroupDTO,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const createCustomerGroupsStepId = "create-customer-groups"
|
||||
/**
|
||||
|
||||
+6
-3
@@ -1,6 +1,9 @@
|
||||
import { GroupCustomerPair, ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
GroupCustomerPair,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const deleteCustomerGroupCustomersStepId =
|
||||
"delete-customer-group-customers"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { ICustomerModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const deleteCustomerGroupStepId = "delete-customer-groups"
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { ICustomerModuleService, LinkWorkflowInput } from "@medusajs/types"
|
||||
import { Modules, promiseAll } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
ICustomerModuleService,
|
||||
LinkWorkflowInput,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, promiseAll } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const linkCustomersToCustomerGroupStepId =
|
||||
"link-customers-to-customer-group"
|
||||
|
||||
@@ -2,13 +2,13 @@ import {
|
||||
CustomerGroupUpdatableFields,
|
||||
FilterableCustomerGroupProps,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
getSelectsAndRelationsFromObjectArray,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type UpdateCustomerGroupStepInput = {
|
||||
selector: FilterableCustomerGroupProps
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import { CustomerGroupDTO, CreateCustomerGroupDTO } from "@medusajs/types"
|
||||
import {
|
||||
CustomerGroupDTO,
|
||||
CreateCustomerGroupDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { createCustomerGroupsStep } from "../steps"
|
||||
|
||||
export type CreateCustomerGroupsWorkflowInput = { customersData: CreateCustomerGroupDTO[] }
|
||||
export type CreateCustomerGroupsWorkflowInput = {
|
||||
customersData: CreateCustomerGroupDTO[]
|
||||
}
|
||||
|
||||
export const createCustomerGroupsWorkflowId = "create-customer-groups"
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk"
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/framework/workflows-sdk"
|
||||
import { deleteCustomerGroupStep } from "../steps"
|
||||
|
||||
export type DeleteCustomerGroupsWorkflowInput = { ids: string[] }
|
||||
@@ -9,7 +9,9 @@ export const deleteCustomerGroupsWorkflowId = "delete-customer-groups"
|
||||
*/
|
||||
export const deleteCustomerGroupsWorkflow = createWorkflow(
|
||||
deleteCustomerGroupsWorkflowId,
|
||||
(input: WorkflowData<DeleteCustomerGroupsWorkflowInput>): WorkflowData<void> => {
|
||||
(
|
||||
input: WorkflowData<DeleteCustomerGroupsWorkflowInput>
|
||||
): WorkflowData<void> => {
|
||||
return deleteCustomerGroupStep(input.ids)
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { LinkWorkflowInput } from "@medusajs/types"
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/workflows-sdk"
|
||||
import { LinkWorkflowInput } from "@medusajs/framework/types"
|
||||
import { WorkflowData, createWorkflow } from "@medusajs/framework/workflows-sdk"
|
||||
import { linkCustomersToCustomerGroupStep } from "../steps"
|
||||
|
||||
export const linkCustomersToCustomerGroupWorkflowId =
|
||||
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
CustomerGroupDTO,
|
||||
FilterableCustomerGroupProps,
|
||||
CustomerGroupUpdatableFields,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { updateCustomerGroupsStep } from "../steps"
|
||||
|
||||
export type UpdateCustomerGroupsWorkflowInput = {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
CreateCustomerAddressDTO,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const createCustomerAddressesStepId = "create-customer-addresses"
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { CreateCustomerDTO, ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
CreateCustomerDTO,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const createCustomersStepId = "create-customers"
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { ICustomerModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const deleteCustomerAddressesStepId = "delete-customer-addresses"
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ICustomerModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { ICustomerModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const deleteCustomersStepId = "delete-customers"
|
||||
/**
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@ import {
|
||||
FilterableCustomerAddressProps,
|
||||
ICustomerModuleService,
|
||||
UpdateCustomerAddressDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, isDefined } from "@medusajs/utils"
|
||||
import { createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, isDefined } from "@medusajs/framework/utils"
|
||||
import { createStep } from "@medusajs/framework/workflows-sdk"
|
||||
import { unsetForCreate, unsetForUpdate } from "./utils"
|
||||
|
||||
export type MaybeUnsetDefaultBillingAddressStepInput = {
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@ import {
|
||||
FilterableCustomerAddressProps,
|
||||
ICustomerModuleService,
|
||||
UpdateCustomerAddressDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, isDefined } from "@medusajs/utils"
|
||||
import { createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, isDefined } from "@medusajs/framework/utils"
|
||||
import { createStep } from "@medusajs/framework/workflows-sdk"
|
||||
import { unsetForCreate, unsetForUpdate } from "./utils"
|
||||
|
||||
export type MaybeUnsetDefaultShippingAddressesStepInput = {
|
||||
|
||||
@@ -2,13 +2,13 @@ import {
|
||||
FilterableCustomerAddressProps,
|
||||
ICustomerModuleService,
|
||||
UpdateCustomerAddressDTO,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
getSelectsAndRelationsFromObjectArray,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type UpdateCustomerAddresseStepInput = {
|
||||
selector: FilterableCustomerAddressProps
|
||||
|
||||
@@ -2,13 +2,13 @@ import {
|
||||
CustomerUpdatableFields,
|
||||
FilterableCustomerProps,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Modules,
|
||||
getSelectsAndRelationsFromObjectArray,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export type UpdateCustomersStepInput = {
|
||||
selector: FilterableCustomerProps
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
CreateCustomerAddressDTO,
|
||||
ICustomerModuleService,
|
||||
} from "@medusajs/types"
|
||||
import { StepResponse } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const unsetForCreate = async (
|
||||
data: CreateCustomerAddressDTO[],
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
FilterableCustomerAddressProps,
|
||||
ICustomerModuleService,
|
||||
UpdateCustomerAddressDTO,
|
||||
} from "@medusajs/types"
|
||||
import { StepResponse } from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/types"
|
||||
import { StepResponse } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const unsetForUpdate = async (
|
||||
data: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MedusaError, Modules } from "@medusajs/utils"
|
||||
import { createStep } from "@medusajs/workflows-sdk"
|
||||
import { MedusaError, Modules } from "@medusajs/framework/utils"
|
||||
import { createStep } from "@medusajs/framework/workflows-sdk"
|
||||
import { CreateCustomerAccountWorkflowInput } from "../workflows"
|
||||
|
||||
export const validateCustomerAccountCreationStepId =
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { AdditionalData, CreateCustomerAddressDTO } from "@medusajs/types"
|
||||
import {
|
||||
AdditionalData,
|
||||
CreateCustomerAddressDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
@@ -6,14 +9,16 @@ import {
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import {
|
||||
createCustomerAddressesStep,
|
||||
maybeUnsetDefaultBillingAddressesStep,
|
||||
maybeUnsetDefaultShippingAddressesStep,
|
||||
} from "../steps"
|
||||
|
||||
export type CreateCustomerAddressesWorkflowInput = { addresses: CreateCustomerAddressDTO[] } & AdditionalData
|
||||
export type CreateCustomerAddressesWorkflowInput = {
|
||||
addresses: CreateCustomerAddressDTO[]
|
||||
} & AdditionalData
|
||||
|
||||
export const createCustomerAddressesWorkflowId = "create-customer-addresses"
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { CreateCustomerDTO, CustomerDTO } from "@medusajs/types"
|
||||
import { CreateCustomerDTO, CustomerDTO } from "@medusajs/framework/types"
|
||||
import {
|
||||
createWorkflow,
|
||||
transform,
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setAuthAppMetadataStep } from "../../auth"
|
||||
import { createCustomersStep } from "../steps"
|
||||
import { validateCustomerAccountCreation } from "../steps/validate-customer-account-creation"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { AdditionalData, CreateCustomerDTO } from "@medusajs/types"
|
||||
import { CustomerWorkflowEvents } from "@medusajs/utils"
|
||||
import { AdditionalData, CreateCustomerDTO } from "@medusajs/framework/types"
|
||||
import { CustomerWorkflowEvents } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createHook,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { emitEventStep } from "../../common/steps/emit-event"
|
||||
import { createCustomersStep } from "../steps"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
WorkflowResponse,
|
||||
createHook,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { deleteCustomerAddressesStep } from "../steps"
|
||||
|
||||
export type DeleteCustomerAddressesWorkflowInput = { ids: string[] }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { CustomerWorkflowEvents } from "@medusajs/utils"
|
||||
import { CustomerWorkflowEvents } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createHook,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { emitEventStep } from "../../common/steps/emit-event"
|
||||
import { deleteCustomersStep } from "../steps"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createWorkflow,
|
||||
transform,
|
||||
when,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setAuthAppMetadataStep } from "../../auth"
|
||||
import { useRemoteQueryStep } from "../../common"
|
||||
import { deleteCustomersWorkflow } from "./delete-customers"
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
FilterableCustomerAddressProps,
|
||||
UpdateCustomerAddressDTO,
|
||||
AdditionalData,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import {
|
||||
maybeUnsetDefaultBillingAddressesStep,
|
||||
maybeUnsetDefaultShippingAddressesStep,
|
||||
|
||||
@@ -2,15 +2,15 @@ import {
|
||||
AdditionalData,
|
||||
CustomerUpdatableFields,
|
||||
FilterableCustomerProps,
|
||||
} from "@medusajs/types"
|
||||
import { CustomerWorkflowEvents } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { CustomerWorkflowEvents } from "@medusajs/framework/utils"
|
||||
import {
|
||||
WorkflowData,
|
||||
WorkflowResponse,
|
||||
createHook,
|
||||
createWorkflow,
|
||||
transform,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { emitEventStep } from "../../common/steps/emit-event"
|
||||
import { updateCustomersStep } from "../steps"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user