@hazeljs/flow-runtime 0.7.8 → 0.8.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/README.md +11 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,23 +51,23 @@ import { OrderFlow } from './flows/OrderFlow';
|
|
|
51
51
|
|
|
52
52
|
await runFlowRuntime({
|
|
53
53
|
port: 3000,
|
|
54
|
-
databaseUrl: process.env.DATABASE_URL,
|
|
54
|
+
databaseUrl: process.env.DATABASE_URL, // optional; in-memory if omitted or connection fails
|
|
55
55
|
flows: [buildFlowDefinition(OrderFlow)],
|
|
56
|
-
services: { logger: myLogger, slack: slackClient },
|
|
56
|
+
services: { logger: myLogger, slack: slackClient }, // optional; injected into flow context
|
|
57
57
|
});
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## API
|
|
61
61
|
|
|
62
|
-
| Method | Path
|
|
63
|
-
|
|
64
|
-
| `POST` | `/v1/runs/start`
|
|
65
|
-
| `POST` | `/v1/runs/:runId/tick`
|
|
66
|
-
| `POST` | `/v1/runs/:runId/resume`
|
|
67
|
-
| `GET`
|
|
68
|
-
| `GET`
|
|
69
|
-
| `GET`
|
|
70
|
-
| `GET`
|
|
62
|
+
| Method | Path | Description |
|
|
63
|
+
| ------ | -------------------------- | ----------------------------------------------------- |
|
|
64
|
+
| `POST` | `/v1/runs/start` | Start a flow run (body: `flowId`, `version`, `input`) |
|
|
65
|
+
| `POST` | `/v1/runs/:runId/tick` | Advance a running run one step |
|
|
66
|
+
| `POST` | `/v1/runs/:runId/resume` | Resume a waiting run (body: payload for the wait) |
|
|
67
|
+
| `GET` | `/v1/runs/:runId` | Get run status |
|
|
68
|
+
| `GET` | `/v1/runs/:runId/timeline` | Get run event timeline |
|
|
69
|
+
| `GET` | `/v1/flows` | List registered flows |
|
|
70
|
+
| `GET` | `/health` | Health check |
|
|
71
71
|
|
|
72
72
|
## Example
|
|
73
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazeljs/flow-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Standalone deployable flow runtime service (HazelJS)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=20.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e0ed98ca074dd4f7472816d3c32ef576900dcca6"
|
|
53
53
|
}
|