Skip to content

Commit

Permalink
WIP: need fixing of few types
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Nov 12, 2024
1 parent 3e97353 commit 0521aea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/core/workflows-sdk/src/composer/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ type ComposerFunction<TData, TResult, THooks> = (
* This is a temporary backward compatible layer in order to provide the same API as the old create workflow function.
* In the future it wont be necessary to have the ability to pass the container to `MyWorkflow(container).run(...)` but instead directly `MyWorkflow.run({ ..., container })`
*/
type BackwardCompatibleWorkflowRunner<TData, TResult, THooks extends any[]> = {
export type BackwardCompatibleWorkflowRunner<
TData,
TResult,
THooks extends any[]
> = {
<TDataOverride = undefined, TResultOverride = undefined>(
container?: MedusaContainer
): WorkflowRunner<
Expand Down
10 changes: 10 additions & 0 deletions packages/core/workflows-sdk/src/composer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export * from "./helpers/create-step"
export { createWorkflow, BackwardCompatibleWorkflowRunner } from "./composer"
export * from "./helpers/resolve-value"
export * from "./helpers/step-response"
export * from "./helpers/workflow-response"
export * from "./helpers/create-hook"
export * from "./helpers/parallelize"
export * from "./helpers/transform"
export * from "./helpers/when"
export * from "./type"
4 changes: 2 additions & 2 deletions packages/core/workflows-sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./helper"
export * from "./medusa-workflow"
export * from "./utils/composer"
export * as Composer from "./utils/composer"
export * from "./composer"
export * as Composer from "./composer"

0 comments on commit 0521aea

Please sign in to comment.