@kubun/plugin-workflow-api 0.14.0 → 0.14.1

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +3 -0
  2. package/package.json +3 -3
package/lib/index.d.ts CHANGED
@@ -37,6 +37,7 @@ export type WorkflowDefinition<State extends Record<string, unknown> = Record<st
37
37
  queue?: string;
38
38
  retry?: RetryPolicy;
39
39
  onTerminal?: (info: TerminalInfo) => void;
40
+ managed?: boolean;
40
41
  };
41
42
  export type WorkflowEvents = {
42
43
  started: {
@@ -110,12 +111,14 @@ export type PeriodicSync = {
110
111
  };
111
112
  export type WorkflowAPI = {
112
113
  register<State extends Record<string, unknown>, Handlers extends HandlersRecord<State> = HandlersRecord<State>>(def: WorkflowDefinition<State, Handlers>): void;
114
+ isManagedWorkflow(name: string): boolean;
113
115
  defineQueue(name: string, opts: QueueOptions): void;
114
116
  enqueue(name: string, params?: unknown, opts?: EnqueueOptions): Promise<InstanceHandle>;
115
117
  schedule(name: string, params: unknown, when: ScheduleSpec): Promise<ScheduleHandle>;
116
118
  scheduleAdaptive(name: string, params: unknown, opts: {
117
119
  policy: AdaptivePolicy;
118
120
  subjectKey: string;
121
+ reactivate?: boolean;
119
122
  }): Promise<ScheduleHandle>;
120
123
  cancel(instanceID: string): Promise<void>;
121
124
  get(instanceID: string): Promise<InstanceStatus | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubun/plugin-workflow-api",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "keywords": [],
5
5
  "license": "see LICENSE.md",
6
6
  "sideEffects": false,
@@ -15,10 +15,10 @@
15
15
  "LICENSE.md"
16
16
  ],
17
17
  "dependencies": {
18
- "@kubun/store-workflow": "^0.14.0",
18
+ "@kubun/store-workflow": "^0.14.1",
19
19
  "@sozai/event": "^0.1.3",
20
20
  "@sozai/flow": "^0.3.1",
21
- "@sozai/schema": "^0.1.1"
21
+ "@sozai/schema": "^0.1.2"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"