@medusajs/workflows-sdk 0.1.3 → 0.1.4-next-20240221072935

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./helper";
2
2
  export * from "./medusa-workflow";
3
3
  export * as WorkflowOrchestratorTypes from "./types";
4
+ export { IWorkflowEngineService } from "./types/service";
4
5
  export * from "./utils/composer";
5
6
  export * as Composer from "./utils/composer";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,oDAAiC;AACjC,qEAAoD;AACpD,mDAAgC;AAChC,6DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,oDAAiC;AACjC,qEAAoD;AAEpD,mDAAgC;AAChC,6DAA4C"}
@@ -1,4 +1,4 @@
1
- import { BaseFilterable } from "@medusajs/types";
1
+ import { BaseFilterable, OperatorMap } from "@medusajs/types";
2
2
  export interface WorkflowExecutionDTO {
3
3
  id: string;
4
4
  workflow_id: string;
@@ -11,8 +11,8 @@ export interface WorkflowExecutionDTO {
11
11
  deleted_at: Date;
12
12
  }
13
13
  export interface FilterableWorkflowExecutionProps extends BaseFilterable<FilterableWorkflowExecutionProps> {
14
- id?: string[];
15
- workflow_id?: string[];
16
- transaction_id?: string[];
17
- state?: any[];
14
+ id?: string | string[] | OperatorMap<string>;
15
+ workflow_id?: string | string[] | OperatorMap<string>;
16
+ transaction_id?: string | string[] | OperatorMap<string>;
17
+ state?: string | string[] | OperatorMap<string>;
18
18
  }
@@ -18,7 +18,11 @@ export type IdempotencyKeyParts = {
18
18
  stepId: string;
19
19
  action: "invoke" | "compensate";
20
20
  };
21
- export interface IWorkflowsModuleService extends IModuleService {
21
+ export interface IWorkflowEngineService extends IModuleService {
22
+ retrieveWorkflowExecution(idOrObject: string | {
23
+ workflow_id: string;
24
+ transaction_id: string;
25
+ }, config?: FindConfig<WorkflowExecutionDTO>, sharedContext?: Context): Promise<WorkflowExecutionDTO>;
22
26
  listWorkflowExecution(filters?: FilterableWorkflowExecutionProps, config?: FindConfig<WorkflowExecutionDTO>, sharedContext?: Context): Promise<WorkflowExecutionDTO[]>;
23
27
  listAndCountWorkflowExecution(filters?: FilterableWorkflowExecutionProps, config?: FindConfig<WorkflowExecutionDTO>, sharedContext?: Context): Promise<[WorkflowExecutionDTO[], number]>;
24
28
  run<TWorkflow extends ReturnWorkflow<any, any, any> = ReturnWorkflow<any, any, any>, TData = UnwrapWorkflowInputDataType<TWorkflow>>(workflowId: string, options?: WorkflowOrchestratorRunDTO, sharedContext?: Context): Promise<{
@@ -34,7 +38,7 @@ export interface IWorkflowsModuleService extends IModuleService {
34
38
  options?: Record<string, any>;
35
39
  }, sharedContext?: Context): any;
36
40
  setStepFailure({ idempotencyKey, stepResponse, options, }: {
37
- idempotencyKey: string | object;
41
+ idempotencyKey: string | IdempotencyKeyParts;
38
42
  stepResponse: unknown;
39
43
  options?: Record<string, any>;
40
44
  }, sharedContext?: Context): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/workflows-sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.4-next-20240221072935",
4
4
  "description": "Set of workflows tooling for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "author": "Medusa",
22
22
  "license": "MIT",
23
23
  "devDependencies": {
24
- "@medusajs/types": "^1.11.12",
24
+ "@medusajs/types": "1.11.14-next-20240221072935",
25
25
  "cross-env": "^5.2.1",
26
26
  "jest": "^29.6.3",
27
27
  "rimraf": "^5.0.1",
@@ -29,9 +29,9 @@
29
29
  "typescript": "^5.1.6"
30
30
  },
31
31
  "dependencies": {
32
- "@medusajs/modules-sdk": "^1.12.8",
32
+ "@medusajs/modules-sdk": "1.12.9-next-20240221072935",
33
33
  "@medusajs/orchestration": "^0.5.4",
34
- "@medusajs/utils": "^1.11.5",
34
+ "@medusajs/utils": "1.11.7-next-20240221072935",
35
35
  "awilix": "^8.0.1",
36
36
  "ulid": "^2.3.0"
37
37
  },