@nocobase/plugin-workflow 1.7.0-beta.8 → 1.7.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.
Files changed (95) hide show
  1. package/dist/client/3c67def1831d0b23.js +10 -0
  2. package/dist/client/WorkflowCategoryTabs.d.ts +10 -0
  3. package/dist/client/WorkflowCollectionsProvider.d.ts +10 -0
  4. package/dist/client/WorkflowTasks.d.ts +12 -3
  5. package/dist/client/a4111333ce86663c.js +10 -0
  6. package/dist/client/a54c8c009524b6da.js +10 -0
  7. package/dist/client/components/EmunerationField.d.ts +9 -0
  8. package/dist/client/f9eeb46e5c6a9ffe.js +10 -0
  9. package/dist/client/index.d.ts +1 -0
  10. package/dist/client/index.js +1 -1
  11. package/dist/client/locale/index.d.ts +2 -1
  12. package/dist/client/schemas/executions.d.ts +126 -125
  13. package/dist/client/triggers/schedule/RepeatField.d.ts +2 -1
  14. package/dist/common/collections/executions.d.ts +136 -0
  15. package/dist/common/collections/executions.js +125 -0
  16. package/dist/common/collections/flow_nodes.d.ts +65 -0
  17. package/dist/common/collections/flow_nodes.js +94 -0
  18. package/dist/common/collections/jobs.d.ts +37 -0
  19. package/dist/common/collections/jobs.js +74 -0
  20. package/dist/common/collections/userWorkflowTasks.d.ts +37 -0
  21. package/dist/common/collections/userWorkflowTasks.js +65 -0
  22. package/dist/common/collections/workflowCategories.d.ts +65 -0
  23. package/dist/common/collections/workflowCategories.js +68 -0
  24. package/dist/common/collections/workflowCategoryRelations.d.ts +21 -0
  25. package/dist/common/collections/workflowCategoryRelations.js +51 -0
  26. package/dist/common/collections/workflowStats.d.ts +37 -0
  27. package/dist/common/collections/workflowStats.js +59 -0
  28. package/dist/common/collections/workflowTasks.d.ts +10 -0
  29. package/dist/common/collections/workflowTasks.js +64 -0
  30. package/dist/common/collections/workflowVersionStats.d.ts +37 -0
  31. package/dist/common/collections/workflowVersionStats.js +59 -0
  32. package/dist/common/collections/workflows.d.ts +263 -0
  33. package/dist/common/collections/workflows.js +244 -0
  34. package/dist/common/constants.d.ts +9 -0
  35. package/dist/{server/actions/workflowTasks.js → common/constants.js} +6 -17
  36. package/dist/externalVersion.js +15 -14
  37. package/dist/locale/en-US.json +127 -15
  38. package/dist/locale/zh-CN.json +10 -1
  39. package/dist/node_modules/cron-parser/package.json +1 -1
  40. package/dist/node_modules/lru-cache/package.json +1 -1
  41. package/dist/node_modules/nodejs-snowflake/LICENSE +201 -0
  42. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.d.ts +62 -0
  43. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -0
  44. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake_bg.wasm +0 -0
  45. package/dist/node_modules/nodejs-snowflake/package.json +1 -0
  46. package/dist/server/Dispatcher.d.ts +11 -0
  47. package/dist/server/Dispatcher.js +35 -0
  48. package/dist/server/Plugin.d.ts +12 -2
  49. package/dist/server/Plugin.js +143 -105
  50. package/dist/server/Processor.d.ts +4 -11
  51. package/dist/server/Processor.js +50 -45
  52. package/dist/server/actions/index.js +2 -2
  53. package/dist/server/actions/nodes.js +7 -5
  54. package/dist/server/actions/{workflowTasks.d.ts → userWorkflowTasks.d.ts} +1 -1
  55. package/dist/server/actions/userWorkflowTasks.js +54 -0
  56. package/dist/server/actions/workflows.js +6 -3
  57. package/dist/server/collections/executions.js +12 -44
  58. package/dist/server/collections/flow_nodes.js +12 -57
  59. package/dist/server/collections/jobs.js +12 -36
  60. package/dist/server/collections/userWorkflowTasks.d.ts +11 -0
  61. package/dist/server/collections/userWorkflowTasks.js +43 -0
  62. package/dist/server/collections/workflowCategories.d.ts +11 -0
  63. package/dist/server/collections/workflowCategories.js +43 -0
  64. package/dist/server/collections/workflowCategoryRelations.d.ts +11 -0
  65. package/dist/server/collections/workflowCategoryRelations.js +43 -0
  66. package/dist/server/collections/workflowStats.d.ts +11 -0
  67. package/dist/server/collections/workflowStats.js +43 -0
  68. package/dist/server/collections/workflowTasks.d.ts +2 -1
  69. package/dist/server/collections/workflowTasks.js +12 -33
  70. package/dist/server/collections/workflowVersionStats.d.ts +11 -0
  71. package/dist/server/collections/workflowVersionStats.js +43 -0
  72. package/dist/server/collections/workflows.d.ts +2 -1
  73. package/dist/server/collections/workflows.js +12 -101
  74. package/dist/server/migrations/20250320223415-stats.d.ts +14 -0
  75. package/dist/server/migrations/20250320223415-stats.js +82 -0
  76. package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.d.ts +14 -0
  77. package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.js +57 -0
  78. package/dist/server/repositories/WorkflowRepository.js +3 -2
  79. package/dist/server/triggers/CollectionTrigger.js +3 -2
  80. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +5 -3
  81. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +39 -36
  82. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +4 -2
  83. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +26 -24
  84. package/dist/server/triggers/ScheduleTrigger/index.d.ts +2 -1
  85. package/dist/server/triggers/ScheduleTrigger/index.js +4 -8
  86. package/dist/server/triggers/index.d.ts +1 -1
  87. package/dist/server/types/Workflow.d.ts +0 -2
  88. package/dist/swagger/index.d.ts +0 -14
  89. package/dist/swagger/index.js +0 -14
  90. package/package.json +6 -4
  91. package/dist/client/4d75ef32f02d7285.js +0 -10
  92. package/dist/client/56ce448358002e64.js +0 -10
  93. package/dist/client/58bb427e05b600de.js +0 -10
  94. package/dist/client/739d458621edf81f.js +0 -10
  95. package/dist/client/nodes/output.d.ts +0 -31
@@ -0,0 +1,94 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var flow_nodes_exports = {};
28
+ __export(flow_nodes_exports, {
29
+ default: () => flow_nodes_default
30
+ });
31
+ module.exports = __toCommonJS(flow_nodes_exports);
32
+ var flow_nodes_default = {
33
+ dumpRules: "required",
34
+ migrationRules: ["overwrite", "schema-only"],
35
+ name: "flow_nodes",
36
+ shared: true,
37
+ fields: [
38
+ {
39
+ type: "uid",
40
+ name: "key"
41
+ },
42
+ {
43
+ type: "string",
44
+ name: "title",
45
+ interface: "input",
46
+ uiSchema: {
47
+ type: "string",
48
+ title: '{{t("Title")}}',
49
+ "x-component": "Input"
50
+ }
51
+ },
52
+ // which workflow belongs to
53
+ {
54
+ name: "workflow",
55
+ type: "belongsTo"
56
+ },
57
+ {
58
+ name: "upstream",
59
+ type: "belongsTo",
60
+ target: "flow_nodes"
61
+ },
62
+ {
63
+ name: "branches",
64
+ type: "hasMany",
65
+ target: "flow_nodes",
66
+ sourceKey: "id",
67
+ foreignKey: "upstreamId"
68
+ },
69
+ // only works when upstream node is branching type, such as condition and parallel.
70
+ // put here because the design of flow-links model is not really necessary for now.
71
+ // or it should be put into flow-links model.
72
+ {
73
+ name: "branchIndex",
74
+ type: "integer"
75
+ },
76
+ // Note: for reasons:
77
+ // 1. redirect type node to solve cycle flow.
78
+ // 2. recognize as real next node after branches.
79
+ {
80
+ name: "downstream",
81
+ type: "belongsTo",
82
+ target: "flow_nodes"
83
+ },
84
+ {
85
+ type: "string",
86
+ name: "type"
87
+ },
88
+ {
89
+ type: "json",
90
+ name: "config",
91
+ defaultValue: {}
92
+ }
93
+ ]
94
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: {
11
+ group: string;
12
+ };
13
+ migrationRules: string[];
14
+ name: string;
15
+ shared: boolean;
16
+ autoGenId: boolean;
17
+ fields: ({
18
+ type: string;
19
+ name: string;
20
+ primaryKey: boolean;
21
+ autoIncrement: boolean;
22
+ target?: undefined;
23
+ } | {
24
+ type: string;
25
+ name: string;
26
+ primaryKey?: undefined;
27
+ autoIncrement?: undefined;
28
+ target?: undefined;
29
+ } | {
30
+ type: string;
31
+ name: string;
32
+ target: string;
33
+ primaryKey?: undefined;
34
+ autoIncrement?: undefined;
35
+ })[];
36
+ };
37
+ export default _default;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var jobs_exports = {};
28
+ __export(jobs_exports, {
29
+ default: () => jobs_default
30
+ });
31
+ module.exports = __toCommonJS(jobs_exports);
32
+ var jobs_default = {
33
+ dumpRules: {
34
+ group: "log"
35
+ },
36
+ migrationRules: ["schema-only"],
37
+ name: "jobs",
38
+ shared: true,
39
+ autoGenId: false,
40
+ fields: [
41
+ {
42
+ type: "bigInt",
43
+ name: "id",
44
+ primaryKey: true,
45
+ autoIncrement: false
46
+ },
47
+ {
48
+ type: "belongsTo",
49
+ name: "execution"
50
+ },
51
+ {
52
+ type: "belongsTo",
53
+ name: "node",
54
+ target: "flow_nodes"
55
+ },
56
+ {
57
+ type: "string",
58
+ name: "nodeKey"
59
+ },
60
+ {
61
+ type: "belongsTo",
62
+ name: "upstream",
63
+ target: "jobs"
64
+ },
65
+ {
66
+ type: "integer",
67
+ name: "status"
68
+ },
69
+ {
70
+ type: "json",
71
+ name: "result"
72
+ }
73
+ ]
74
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: {
11
+ group: string;
12
+ };
13
+ migrationRules: string[];
14
+ name: string;
15
+ shared: boolean;
16
+ fields: ({
17
+ name: string;
18
+ type: string;
19
+ foreignKey?: undefined;
20
+ defaultValue?: undefined;
21
+ } | {
22
+ name: string;
23
+ type: string;
24
+ foreignKey: string;
25
+ defaultValue?: undefined;
26
+ } | {
27
+ type: string;
28
+ name: string;
29
+ defaultValue: {};
30
+ foreignKey?: undefined;
31
+ })[];
32
+ indexes: {
33
+ unique: boolean;
34
+ fields: string[];
35
+ }[];
36
+ };
37
+ export default _default;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var userWorkflowTasks_exports = {};
28
+ __export(userWorkflowTasks_exports, {
29
+ default: () => userWorkflowTasks_default
30
+ });
31
+ module.exports = __toCommonJS(userWorkflowTasks_exports);
32
+ var userWorkflowTasks_default = {
33
+ dumpRules: {
34
+ group: "log"
35
+ },
36
+ migrationRules: ["schema-only"],
37
+ name: "userWorkflowTasks",
38
+ shared: true,
39
+ fields: [
40
+ {
41
+ name: "userId",
42
+ type: "bigInt"
43
+ },
44
+ {
45
+ name: "user",
46
+ type: "belongsTo",
47
+ foreignKey: "userId"
48
+ },
49
+ {
50
+ name: "type",
51
+ type: "string"
52
+ },
53
+ {
54
+ type: "json",
55
+ name: "stats",
56
+ defaultValue: {}
57
+ }
58
+ ],
59
+ indexes: [
60
+ {
61
+ unique: true,
62
+ fields: ["userId", "type"]
63
+ }
64
+ ]
65
+ };
@@ -0,0 +1,65 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: string;
11
+ migrationRules: string[];
12
+ name: string;
13
+ shared: boolean;
14
+ fields: ({
15
+ type: string;
16
+ name: string;
17
+ interface: string;
18
+ uiSchema: {
19
+ title: string;
20
+ type: string;
21
+ 'x-component': string;
22
+ required: boolean;
23
+ };
24
+ defaultValue?: undefined;
25
+ target?: undefined;
26
+ foreignKey?: undefined;
27
+ otherKey?: undefined;
28
+ targetKey?: undefined;
29
+ through?: undefined;
30
+ } | {
31
+ type: string;
32
+ name: string;
33
+ defaultValue: string;
34
+ interface?: undefined;
35
+ uiSchema?: undefined;
36
+ target?: undefined;
37
+ foreignKey?: undefined;
38
+ otherKey?: undefined;
39
+ targetKey?: undefined;
40
+ through?: undefined;
41
+ } | {
42
+ type: string;
43
+ name: string;
44
+ target: string;
45
+ foreignKey: string;
46
+ otherKey: string;
47
+ targetKey: string;
48
+ through: string;
49
+ interface?: undefined;
50
+ uiSchema?: undefined;
51
+ defaultValue?: undefined;
52
+ } | {
53
+ type: string;
54
+ name: string;
55
+ interface?: undefined;
56
+ uiSchema?: undefined;
57
+ defaultValue?: undefined;
58
+ target?: undefined;
59
+ foreignKey?: undefined;
60
+ otherKey?: undefined;
61
+ targetKey?: undefined;
62
+ through?: undefined;
63
+ })[];
64
+ };
65
+ export default _default;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var workflowCategories_exports = {};
28
+ __export(workflowCategories_exports, {
29
+ default: () => workflowCategories_default
30
+ });
31
+ module.exports = __toCommonJS(workflowCategories_exports);
32
+ var workflowCategories_default = {
33
+ dumpRules: "required",
34
+ migrationRules: ["overwrite", "schema-only"],
35
+ name: "workflowCategories",
36
+ shared: true,
37
+ fields: [
38
+ {
39
+ type: "string",
40
+ name: "title",
41
+ interface: "input",
42
+ uiSchema: {
43
+ title: '{{t("Title")}}',
44
+ type: "string",
45
+ "x-component": "Input",
46
+ required: true
47
+ }
48
+ },
49
+ {
50
+ type: "string",
51
+ name: "color",
52
+ defaultValue: "default"
53
+ },
54
+ {
55
+ type: "belongsToMany",
56
+ name: "workflows",
57
+ target: "workflows",
58
+ foreignKey: "categoryId",
59
+ otherKey: "workflowId",
60
+ targetKey: "id",
61
+ through: "workflowCategoryRelations"
62
+ },
63
+ {
64
+ type: "sort",
65
+ name: "sort"
66
+ }
67
+ ]
68
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: string;
11
+ migrationRules: string[];
12
+ name: string;
13
+ shared: boolean;
14
+ fields: {
15
+ type: string;
16
+ name: string;
17
+ target: string;
18
+ foreignKey: string;
19
+ }[];
20
+ };
21
+ export default _default;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var workflowCategoryRelations_exports = {};
28
+ __export(workflowCategoryRelations_exports, {
29
+ default: () => workflowCategoryRelations_default
30
+ });
31
+ module.exports = __toCommonJS(workflowCategoryRelations_exports);
32
+ var workflowCategoryRelations_default = {
33
+ dumpRules: "required",
34
+ migrationRules: ["overwrite", "schema-only"],
35
+ name: "workflowCategoryRelations",
36
+ shared: true,
37
+ fields: [
38
+ {
39
+ type: "belongsTo",
40
+ name: "workflow",
41
+ target: "workflows",
42
+ foreignKey: "workflowId"
43
+ },
44
+ {
45
+ type: "belongsTo",
46
+ name: "workflowCategory",
47
+ target: "workflowCategories",
48
+ foreignKey: "workflowCategoryId"
49
+ }
50
+ ]
51
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ dumpRules: {
11
+ group: string;
12
+ };
13
+ migrationRules: string[];
14
+ name: string;
15
+ shared: boolean;
16
+ autoGenId: boolean;
17
+ fields: ({
18
+ name: string;
19
+ type: string;
20
+ primaryKey: boolean;
21
+ defaultValue?: undefined;
22
+ interface?: undefined;
23
+ uiSchema?: undefined;
24
+ } | {
25
+ type: string;
26
+ name: string;
27
+ defaultValue: number;
28
+ interface: string;
29
+ uiSchema: {
30
+ title: string;
31
+ 'x-component': string;
32
+ 'x-read-pretty': boolean;
33
+ };
34
+ primaryKey?: undefined;
35
+ })[];
36
+ };
37
+ export default _default;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var workflowStats_exports = {};
28
+ __export(workflowStats_exports, {
29
+ default: () => workflowStats_default
30
+ });
31
+ module.exports = __toCommonJS(workflowStats_exports);
32
+ var import_constants = require("../constants");
33
+ var workflowStats_default = {
34
+ dumpRules: {
35
+ group: "log"
36
+ },
37
+ migrationRules: ["schema-only"],
38
+ name: "workflowStats",
39
+ shared: true,
40
+ autoGenId: false,
41
+ fields: [
42
+ {
43
+ name: "key",
44
+ type: "uid",
45
+ primaryKey: true
46
+ },
47
+ {
48
+ type: "bigInt",
49
+ name: "executed",
50
+ defaultValue: 0,
51
+ interface: "number",
52
+ uiSchema: {
53
+ title: `{{t("Executed", { ns: "${import_constants.NAMESPACE}" })}}`,
54
+ "x-component": "InputNumber",
55
+ "x-read-pretty": true
56
+ }
57
+ }
58
+ ]
59
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { CollectionOptions } from '@nocobase/database';
10
+ export default function (): CollectionOptions;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var workflowTasks_exports = {};
28
+ __export(workflowTasks_exports, {
29
+ default: () => workflowTasks_default
30
+ });
31
+ module.exports = __toCommonJS(workflowTasks_exports);
32
+ function workflowTasks_default() {
33
+ return {
34
+ dumpRules: "required",
35
+ migrationRules: ["overwrite", "schema-only"],
36
+ name: "workflowTasks",
37
+ shared: true,
38
+ repository: "WorkflowTasksRepository",
39
+ fields: [
40
+ {
41
+ name: "user",
42
+ type: "belongsTo"
43
+ },
44
+ {
45
+ name: "workflow",
46
+ type: "belongsTo"
47
+ },
48
+ {
49
+ type: "string",
50
+ name: "type"
51
+ },
52
+ {
53
+ type: "string",
54
+ name: "key"
55
+ }
56
+ ],
57
+ indexes: [
58
+ {
59
+ unique: true,
60
+ fields: ["type", "key"]
61
+ }
62
+ ]
63
+ };
64
+ }