@nocobase/plugin-workflow 2.1.0-alpha.14 → 2.1.0-alpha.15

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.
@@ -11,8 +11,8 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.7",
13
13
  "@formily/react": "2.3.7",
14
- "@nocobase/client": "2.1.0-alpha.14",
15
- "@nocobase/utils": "2.1.0-alpha.14",
14
+ "@nocobase/client": "2.1.0-alpha.15",
15
+ "@nocobase/utils": "2.1.0-alpha.15",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
18
  "react-router-dom": "6.30.1",
@@ -20,18 +20,20 @@ module.exports = {
20
20
  "lodash": "4.17.21",
21
21
  "@dnd-kit/core": "6.1.0",
22
22
  "@formily/shared": "2.3.7",
23
- "@nocobase/flow-engine": "2.1.0-alpha.14",
24
- "@nocobase/plugin-mobile": "2.1.0-alpha.14",
23
+ "@nocobase/flow-engine": "2.1.0-alpha.15",
24
+ "@nocobase/plugin-mobile": "2.1.0-alpha.15",
25
25
  "sequelize": "6.35.2",
26
- "@nocobase/server": "2.1.0-alpha.14",
27
- "@nocobase/database": "2.1.0-alpha.14",
28
- "@nocobase/data-source-manager": "2.1.0-alpha.14",
29
- "@nocobase/logger": "2.1.0-alpha.14",
30
- "@nocobase/evaluators": "2.1.0-alpha.14",
26
+ "@nocobase/server": "2.1.0-alpha.15",
27
+ "@nocobase/database": "2.1.0-alpha.15",
28
+ "@nocobase/data-source-manager": "2.1.0-alpha.15",
29
+ "@nocobase/logger": "2.1.0-alpha.15",
30
+ "@nocobase/evaluators": "2.1.0-alpha.15",
31
31
  "@formily/antd-v5": "1.2.3",
32
32
  "@formily/reactive": "2.3.7",
33
- "@nocobase/actions": "2.1.0-alpha.14",
33
+ "@emotion/css": "11.13.0",
34
+ "@formily/json-schema": "2.3.7",
35
+ "@nocobase/actions": "2.1.0-alpha.15",
34
36
  "dayjs": "1.11.13",
35
- "@nocobase/plugin-workflow-test": "2.1.0-alpha.14",
36
- "@nocobase/test": "2.1.0-alpha.14"
37
+ "@nocobase/plugin-workflow-test": "2.1.0-alpha.15",
38
+ "@nocobase/test": "2.1.0-alpha.15"
37
39
  };
@@ -1 +1 @@
1
- {"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2026-04-07T15:55:21.685Z"}
1
+ {"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2026-04-10T12:40:53.344Z"}
@@ -1 +1 @@
1
- {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-04-07T15:55:21.438Z"}
1
+ {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-04-10T12:40:53.091Z"}
@@ -1 +1 @@
1
- {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2026-04-07T15:55:20.673Z"}
1
+ {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2026-04-10T12:40:52.300Z"}
@@ -1 +1 @@
1
- {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-04-07T15:55:20.511Z"}
1
+ {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-04-10T12:40:52.139Z"}
@@ -7,5 +7,20 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import type { DataSourceManager } from '@nocobase/data-source-manager';
10
+ import type { WorkflowModel } from './types';
11
+ import Processor from './Processor';
10
12
  export declare function validateCollectionField(collection: string, dataSourceManager: DataSourceManager): Record<string, string> | null;
13
+ export declare function getExecutionStatusName(status: number | null | undefined): string;
14
+ export declare function getWorkflowExecutionLogMeta(workflow: WorkflowModel, processor?: Processor): {
15
+ workflowId: number;
16
+ workflowKey: string;
17
+ workflowTitle: string;
18
+ executionId: number;
19
+ executionStatus: number;
20
+ executionStatusName: string;
21
+ lastNodeId: number;
22
+ lastNodeType: string;
23
+ lastJobId: number;
24
+ lastJobStatus: number;
25
+ };
11
26
  export declare function toJSON(data: any): any;
@@ -26,12 +26,15 @@ var __copyProps = (to, from, except, desc) => {
26
26
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
27
  var utils_exports = {};
28
28
  __export(utils_exports, {
29
+ getExecutionStatusName: () => getExecutionStatusName,
30
+ getWorkflowExecutionLogMeta: () => getWorkflowExecutionLogMeta,
29
31
  toJSON: () => toJSON,
30
32
  validateCollectionField: () => validateCollectionField
31
33
  });
32
34
  module.exports = __toCommonJS(utils_exports);
33
35
  var import_database = require("@nocobase/database");
34
36
  var import_data_source_manager = require("@nocobase/data-source-manager");
37
+ var import_constants = require("./constants");
35
38
  function validateCollectionField(collection, dataSourceManager) {
36
39
  const [dataSourceName, collectionName] = (0, import_data_source_manager.parseCollectionName)(collection);
37
40
  if (collection.includes(":")) {
@@ -49,6 +52,30 @@ function validateCollectionField(collection, dataSourceManager) {
49
52
  }
50
53
  return null;
51
54
  }
55
+ const EXECUTION_STATUS_NAMES = new Map(Object.entries(import_constants.EXECUTION_STATUS).map(([name, value]) => [value, name]));
56
+ function getExecutionStatusName(status) {
57
+ if (typeof status === "undefined") {
58
+ return "UNKNOWN";
59
+ }
60
+ return EXECUTION_STATUS_NAMES.get(status) ?? `${status}`;
61
+ }
62
+ function getWorkflowExecutionLogMeta(workflow, processor) {
63
+ var _a, _b, _c, _d;
64
+ const lastSavedJob = processor == null ? void 0 : processor.lastSavedJob;
65
+ const lastNode = (_a = processor == null ? void 0 : processor.nodesMap) == null ? void 0 : _a.get(lastSavedJob == null ? void 0 : lastSavedJob.nodeId);
66
+ return {
67
+ workflowId: workflow.id,
68
+ workflowKey: workflow.key,
69
+ workflowTitle: workflow.title,
70
+ executionId: ((_b = processor == null ? void 0 : processor.execution) == null ? void 0 : _b.id) ?? null,
71
+ executionStatus: ((_c = processor == null ? void 0 : processor.execution) == null ? void 0 : _c.status) ?? null,
72
+ executionStatusName: getExecutionStatusName((_d = processor == null ? void 0 : processor.execution) == null ? void 0 : _d.status),
73
+ lastNodeId: (lastNode == null ? void 0 : lastNode.id) ?? (lastSavedJob == null ? void 0 : lastSavedJob.nodeId) ?? null,
74
+ lastNodeType: (lastNode == null ? void 0 : lastNode.type) ?? null,
75
+ lastJobId: (lastSavedJob == null ? void 0 : lastSavedJob.id) ?? null,
76
+ lastJobStatus: (lastSavedJob == null ? void 0 : lastSavedJob.status) ?? null
77
+ };
78
+ }
52
79
  function toJSON(data) {
53
80
  if (Array.isArray(data)) {
54
81
  return data.map(toJSON);
@@ -66,6 +93,8 @@ function toJSON(data) {
66
93
  }
67
94
  // Annotate the CommonJS export names for ESM import in node:
68
95
  0 && (module.exports = {
96
+ getExecutionStatusName,
97
+ getWorkflowExecutionLogMeta,
69
98
  toJSON,
70
99
  validateCollectionField
71
100
  });
@@ -329,24 +329,19 @@ declare const _default: {
329
329
  'application/json': {
330
330
  schema: {
331
331
  type: string;
332
+ description: string;
332
333
  properties: {
333
- values: {
334
+ title: {
335
+ type: string;
336
+ description: string;
337
+ };
338
+ enabled: {
339
+ type: string;
340
+ description: string;
341
+ };
342
+ current: {
334
343
  type: string;
335
344
  description: string;
336
- properties: {
337
- title: {
338
- type: string;
339
- description: string;
340
- };
341
- enabled: {
342
- type: string;
343
- description: string;
344
- };
345
- current: {
346
- type: string;
347
- description: string;
348
- };
349
- };
350
345
  };
351
346
  };
352
347
  };
@@ -417,13 +412,8 @@ declare const _default: {
417
412
  'application/json': {
418
413
  schema: {
419
414
  type: string;
420
- required: string[];
421
- properties: {
422
- values: {
423
- type: string;
424
- description: string;
425
- };
426
- };
415
+ description: string;
416
+ additionalProperties: boolean;
427
417
  };
428
418
  };
429
419
  };
@@ -704,21 +694,16 @@ declare const _default: {
704
694
  'application/json': {
705
695
  schema: {
706
696
  type: string;
697
+ description: string;
707
698
  properties: {
708
- values: {
709
- type: string;
710
- description: string;
711
- properties: {
712
- upstreamId: {
713
- $ref: string;
714
- };
715
- branchIndex: {
716
- $ref: string;
717
- };
718
- config: {
719
- $ref: string;
720
- };
721
- };
699
+ upstreamId: {
700
+ $ref: string;
701
+ };
702
+ branchIndex: {
703
+ $ref: string;
704
+ };
705
+ config: {
706
+ $ref: string;
722
707
  };
723
708
  };
724
709
  };
@@ -764,22 +749,17 @@ declare const _default: {
764
749
  'application/json': {
765
750
  schema: {
766
751
  type: string;
752
+ description: string;
767
753
  properties: {
768
- values: {
754
+ upstreamId: {
769
755
  type: string;
756
+ nullable: boolean;
757
+ description: string;
758
+ };
759
+ branchIndex: {
760
+ type: string;
761
+ nullable: boolean;
770
762
  description: string;
771
- properties: {
772
- upstreamId: {
773
- type: string;
774
- nullable: boolean;
775
- description: string;
776
- };
777
- branchIndex: {
778
- type: string;
779
- nullable: boolean;
780
- description: string;
781
- };
782
- };
783
763
  };
784
764
  };
785
765
  };
@@ -820,17 +800,11 @@ declare const _default: {
820
800
  type: string;
821
801
  required: string[];
822
802
  properties: {
823
- values: {
824
- type: string;
825
- required: string[];
826
- properties: {
827
- type: {
828
- $ref: string;
829
- };
830
- config: {
831
- $ref: string;
832
- };
833
- };
803
+ type: {
804
+ $ref: string;
805
+ };
806
+ config: {
807
+ $ref: string;
834
808
  };
835
809
  };
836
810
  };
@@ -1116,24 +1090,19 @@ declare const _default: {
1116
1090
  'application/json': {
1117
1091
  schema: {
1118
1092
  type: string;
1093
+ description: string;
1119
1094
  properties: {
1120
- values: {
1095
+ status: {
1096
+ type: string;
1097
+ description: string;
1098
+ };
1099
+ result: {
1100
+ type: string;
1101
+ description: string;
1102
+ };
1103
+ meta: {
1121
1104
  type: string;
1122
1105
  description: string;
1123
- properties: {
1124
- status: {
1125
- type: string;
1126
- description: string;
1127
- };
1128
- result: {
1129
- type: string;
1130
- description: string;
1131
- };
1132
- meta: {
1133
- type: string;
1134
- description: string;
1135
- };
1136
- };
1137
1106
  };
1138
1107
  };
1139
1108
  };
@@ -327,16 +327,11 @@ var swagger_default = {
327
327
  "application/json": {
328
328
  schema: {
329
329
  type: "object",
330
+ description: "Override fields for the new workflow/version",
330
331
  properties: {
331
- values: {
332
- type: "object",
333
- description: "Override fields for the new workflow/version",
334
- properties: {
335
- title: { type: "string", description: "Override title" },
336
- enabled: { type: "boolean", description: "Override enabled state" },
337
- current: { type: "boolean", description: "Set as current version" }
338
- }
339
- }
332
+ title: { type: "string", description: "Override title" },
333
+ enabled: { type: "boolean", description: "Override enabled state" },
334
+ current: { type: "boolean", description: "Set as current version" }
340
335
  }
341
336
  }
342
337
  }
@@ -394,7 +389,7 @@ var swagger_default = {
394
389
  "",
395
390
  "**Requirements:**",
396
391
  "- `filterByTk` (query param) is required.",
397
- "- `values` (request body) is required \u2014 provide the context/input data the trigger expects.",
392
+ "- Request body is required \u2014 the **entire JSON body** is treated as trigger context/input.",
398
393
  "",
399
394
  "**autoRevision:** When set to `1`, if the workflow has never been executed",
400
395
  "(`executed === 0`), a new revision is created automatically after execution.",
@@ -422,13 +417,8 @@ var swagger_default = {
422
417
  "application/json": {
423
418
  schema: {
424
419
  type: "object",
425
- required: ["values"],
426
- properties: {
427
- values: {
428
- type: "object",
429
- description: "Context/input data for the workflow trigger. Structure depends on the trigger type."
430
- }
431
- }
420
+ description: "Trigger context/input data. The body itself is mapped to `params.values` on the server. Structure depends on trigger type.",
421
+ additionalProperties: true
432
422
  }
433
423
  }
434
424
  }
@@ -459,7 +449,7 @@ var swagger_default = {
459
449
  }
460
450
  },
461
451
  400: {
462
- description: "Bad Request. `values` or `filterByTk` is missing, invalid, or workflow not triggered."
452
+ description: "Bad Request. Request body or `filterByTk` is missing/invalid, or workflow not triggered."
463
453
  },
464
454
  404: { description: "Not Found. Workflow does not exist." }
465
455
  }
@@ -713,16 +703,11 @@ var swagger_default = {
713
703
  "application/json": {
714
704
  schema: {
715
705
  type: "object",
706
+ description: "Target position and optional config override for the new node",
716
707
  properties: {
717
- values: {
718
- type: "object",
719
- description: "Target position and optional config override for the new node",
720
- properties: {
721
- upstreamId: { $ref: "#/components/schemas/node/properties/upstreamId" },
722
- branchIndex: { $ref: "#/components/schemas/node/properties/branchIndex" },
723
- config: { $ref: "#/components/schemas/node/properties/config" }
724
- }
725
- }
708
+ upstreamId: { $ref: "#/components/schemas/node/properties/upstreamId" },
709
+ branchIndex: { $ref: "#/components/schemas/node/properties/branchIndex" },
710
+ config: { $ref: "#/components/schemas/node/properties/config" }
726
711
  }
727
712
  }
728
713
  }
@@ -773,22 +758,17 @@ var swagger_default = {
773
758
  "application/json": {
774
759
  schema: {
775
760
  type: "object",
761
+ description: "Target position descriptor",
776
762
  properties: {
777
- values: {
778
- type: "object",
779
- description: "Target position descriptor",
780
- properties: {
781
- upstreamId: {
782
- type: "integer",
783
- nullable: true,
784
- description: "Target upstream node ID. `null` = move to head position."
785
- },
786
- branchIndex: {
787
- type: "integer",
788
- nullable: true,
789
- description: "Branch index at the target upstream. `null` = main chain."
790
- }
791
- }
763
+ upstreamId: {
764
+ type: "integer",
765
+ nullable: true,
766
+ description: "Target upstream node ID. `null` = move to head position."
767
+ },
768
+ branchIndex: {
769
+ type: "integer",
770
+ nullable: true,
771
+ description: "Branch index at the target upstream. `null` = main chain."
792
772
  }
793
773
  }
794
774
  }
@@ -828,16 +808,10 @@ var swagger_default = {
828
808
  "application/json": {
829
809
  schema: {
830
810
  type: "object",
831
- required: ["values"],
811
+ required: ["type", "config"],
832
812
  properties: {
833
- values: {
834
- type: "object",
835
- required: ["type"],
836
- properties: {
837
- type: { $ref: "#/components/schemas/node/properties/type" },
838
- config: { $ref: "#/components/schemas/node/properties/config" }
839
- }
840
- }
813
+ type: { $ref: "#/components/schemas/node/properties/type" },
814
+ config: { $ref: "#/components/schemas/node/properties/config" }
841
815
  }
842
816
  }
843
817
  }
@@ -1154,24 +1128,19 @@ var swagger_default = {
1154
1128
  "application/json": {
1155
1129
  schema: {
1156
1130
  type: "object",
1131
+ description: "Fields to update on the job before resuming",
1157
1132
  properties: {
1158
- values: {
1133
+ status: {
1134
+ type: "integer",
1135
+ description: "Job status: 1=RESOLVED, -1=FAILED, -3=ABORTED, -4=CANCELED, -5=REJECTED"
1136
+ },
1137
+ result: {
1159
1138
  type: "object",
1160
- description: "Fields to update on the job before resuming",
1161
- properties: {
1162
- status: {
1163
- type: "integer",
1164
- description: "Job status: 1=RESOLVED, -1=FAILED, -3=ABORTED, -4=CANCELED, -5=REJECTED"
1165
- },
1166
- result: {
1167
- type: "object",
1168
- description: "Result data to store on the job"
1169
- },
1170
- meta: {
1171
- type: "object",
1172
- description: "Metadata to store on the job"
1173
- }
1174
- }
1139
+ description: "Result data to store on the job"
1140
+ },
1141
+ meta: {
1142
+ type: "object",
1143
+ description: "Metadata to store on the job"
1175
1144
  }
1176
1145
  }
1177
1146
  }
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
7
7
  "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
8
8
  "description.ru-RU": "Мощный инструмент BPM, обеспечивающий базовую поддержку автоматизации бизнес-процессов с возможностью неограниченного расширения триггеров и узлов.",
9
- "version": "2.1.0-alpha.14",
9
+ "version": "2.1.0-alpha.15",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/workflow",
@@ -49,7 +49,7 @@
49
49
  "@nocobase/test": "2.x",
50
50
  "@nocobase/utils": "2.x"
51
51
  },
52
- "gitHead": "d8735b541de0ff9557bba704de49c799b4962672",
52
+ "gitHead": "7c86e75b0af4b9f532c8ebf5ef96a7423b0ab60e",
53
53
  "keywords": [
54
54
  "Workflow"
55
55
  ]