feat: loosely typed container
This commit is contained in:
@@ -107,6 +107,7 @@ export const refetchBatchProducts = async (
|
||||
fields: remapKeysForProduct(fields ?? []),
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
created = remoteQuery(createdQuery)
|
||||
}
|
||||
|
||||
@@ -119,6 +120,7 @@ export const refetchBatchProducts = async (
|
||||
fields: remapKeysForProduct(fields ?? []),
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
updated = remoteQuery(updatedQuery)
|
||||
}
|
||||
|
||||
@@ -148,6 +150,7 @@ export const refetchBatchVariants = async (
|
||||
fields: remapKeysForVariant(fields ?? []),
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
created = remoteQuery(createdQuery)
|
||||
}
|
||||
|
||||
@@ -160,6 +163,7 @@ export const refetchBatchVariants = async (
|
||||
fields: remapKeysForVariant(fields ?? []),
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
updated = remoteQuery(updatedQuery)
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ export const refetchBatchRules = async (
|
||||
fields: fields,
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
created = remoteQuery(createdQuery)
|
||||
}
|
||||
|
||||
@@ -54,6 +55,7 @@ export const refetchBatchRules = async (
|
||||
fields: fields,
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
updated = remoteQuery(updatedQuery)
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ export const refetchBatchRules = async (
|
||||
fields: fields,
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
created = remoteQuery(createdQuery)
|
||||
}
|
||||
|
||||
@@ -57,6 +58,7 @@ export const refetchBatchRules = async (
|
||||
fields: fields,
|
||||
})
|
||||
|
||||
// @ts-expect-error "Remote query can return null"
|
||||
updated = remoteQuery(updatedQuery)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,9 +1,9 @@
|
||||
import { IWorkflowEngineService } from "@medusajs/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../../types/routing"
|
||||
|
||||
import { IWorkflowEngineService } from "@medusajs/workflows-sdk"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -4,9 +4,8 @@ import {
|
||||
} from "../../../../../types/routing"
|
||||
import {
|
||||
IWorkflowEngineService,
|
||||
WorkflowOrchestratorTypes,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
|
||||
WorkflowOrchestratorRunDTO,
|
||||
} from "@medusajs/types"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { AdminCreateWorkflowsRunType } from "../../validators"
|
||||
|
||||
@@ -28,7 +27,7 @@ export const POST = async (
|
||||
context: {
|
||||
requestId: req.requestId,
|
||||
},
|
||||
} as WorkflowOrchestratorTypes.WorkflowOrchestratorRunDTO
|
||||
} as WorkflowOrchestratorRunDTO
|
||||
|
||||
const { acknowledgement } = await workflowEngineService.run(
|
||||
workflow_id,
|
||||
|
||||
+2
-1
@@ -2,11 +2,12 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { IWorkflowEngineService, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { TransactionHandlerType, isDefined } from "@medusajs/utils"
|
||||
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { AdminCreateWorkflowsAsyncResponseType } from "../../../validators"
|
||||
import { IWorkflowEngineService } from "@medusajs/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminCreateWorkflowsAsyncResponseType>,
|
||||
|
||||
+2
-1
@@ -2,11 +2,12 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { IWorkflowEngineService, StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { StepResponse } from "@medusajs/workflows-sdk"
|
||||
import { TransactionHandlerType, isDefined } from "@medusajs/utils"
|
||||
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { AdminCreateWorkflowsAsyncResponseType } from "../../../validators"
|
||||
import { IWorkflowEngineService } from "@medusajs/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminCreateWorkflowsAsyncResponseType>,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { IWorkflowEngineService } from "@medusajs/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
|
||||
import { IWorkflowEngineService } from "@medusajs/workflows-sdk"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
Reference in New Issue
Block a user