@moostjs/event-wf 0.3.1 → 0.3.3

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,10 +1,11 @@
1
1
  import { Moost } from 'moost';
2
+ import { StepRetriableError } from '@prostojs/wf';
2
3
  import { TFlowOutput } from '@prostojs/wf';
3
4
  import { TMoostAdapter } from 'moost';
4
5
  import { TMoostAdapterOptions } from 'moost';
5
6
  import { TWooksWfOptions } from '@wooksjs/event-wf';
6
7
  import { TWorkflowSchema } from '@prostojs/wf';
7
- import { useCliContext } from '@wooksjs/event-cli';
8
+ import { useWFContext } from '@wooksjs/event-wf';
8
9
  import { WooksWf } from '@wooksjs/event-wf';
9
10
 
10
11
  export declare class MoostWf<T> implements TMoostAdapter<TWfHandlerMeta> {
@@ -15,11 +16,18 @@ export declare class MoostWf<T> implements TMoostAdapter<TWfHandlerMeta> {
15
16
  protected moost?: Moost;
16
17
  protected toInit: (() => void)[];
17
18
  onInit(moost: Moost): void;
18
- start<I>(schemaId: string, inputContext: T, input?: I): Promise<TFlowOutput<T, I>>;
19
- resume<I>(schemaId: string, inputContext: T, indexes: number[], input?: I): Promise<TFlowOutput<T, I>>;
19
+ start<I>(schemaId: string, initialContext: T, input?: I): Promise<TFlowOutput<T, I>>;
20
+ resume<I>(schemaId: string, state: {
21
+ context: T;
22
+ indexes: number[];
23
+ }, input?: I): Promise<TFlowOutput<T, I>>;
20
24
  bindHandler<T extends object = object>(opts: TMoostAdapterOptions<TWfHandlerMeta, T>): void;
21
25
  }
22
26
 
27
+ export { StepRetriableError }
28
+
29
+ export { TFlowOutput }
30
+
23
31
  export declare interface TMoostWfOpts<T> {
24
32
  /**
25
33
  * wooksWf options or instance
@@ -35,7 +43,9 @@ export declare interface TWfHandlerMeta {
35
43
  path: string;
36
44
  }
37
45
 
38
- export { useCliContext }
46
+ export { TWorkflowSchema }
47
+
48
+ export { useWFContext }
39
49
 
40
50
  export declare const WfCtx: (name?: string) => ParameterDecorator & PropertyDecorator;
41
51