anbaric-tsapi 1.14.2 → 1.16.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anbaric-tsapi",
3
- "version": "1.14.2",
3
+ "version": "1.16.0",
4
4
  "description": "These are the shared libraries - types, classes, etc - that both the public state-machine and hosting services share",
5
5
  "license": "MIT",
6
6
  "author": "chris@anbaric.ai",
@@ -0,0 +1,19 @@
1
+ /* The serialisable graph of a state machine: its states, each state's actions
2
+ (identity only — the run/predicate bodies aren't persistable) and
3
+ transitions. Recorded as the details of an audit record when a state machine
4
+ initialises. */
5
+ type WorkflowDefinition = {
6
+
7
+ workflowId : string,
8
+ startState : string,
9
+ dataSchema : Array<{ id : string, required : boolean }>,
10
+ states : Array<{
11
+ id : string,
12
+ isTerminal : boolean,
13
+ actions : Array<{ name : string, description : string, actor : { id : string, type : string, role : string } }>,
14
+ transitions : Array<{ to : string }>,
15
+ }>,
16
+
17
+ };
18
+
19
+ export type { WorkflowDefinition }
package/src/index.ts CHANGED
@@ -21,4 +21,5 @@ export * from "./api/documents/JsonSchema"
21
21
  export * from "./api/state-machine/Queue"
22
22
  export * from "./api/state-machine/Consumer"
23
23
  export * from "./api/cloud/QueueMessage"
24
+ export * from "./api/cloud/WorkflowDefinition"
24
25
  export * from "./api/cloud/AuditRecord"