Workflow
Stored in the workflows collection. createdAt and updatedAt are maintained automatically.
Returned by DELETE /workflow, POST /workflow, DELETE /workflow/:id, GET /workflow/:id, PUT /workflow/:id, POST /workflow/:id/publish and 2 more.
| Field | Type | Notes |
|---|---|---|
name | string | required |
normalizedName | string | |
activeName | string | |
company | ObjectId -> Company | required |
triggerEventType | string | |
status | string | default draft · one of draft, published, paused, archived |
publishedVersion | number | default 0 |
latestVersion | number | default 1 |
config | any | default {} |
publishedSnapshot | any | default null |
publishedAt | date | |
schedule.minute | string | default * |
schedule.hour | string | default * |
schedule.dayOfMonth | string | default * |
schedule.month | string | default * |
schedule.dayOfWeek | string | default * |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
_id | ObjectId | default "6a95712f932657988a91c0fc" |
createdAt | date | set once |
updatedAt | date |