@nocobase/plugin-workflow 1.7.0-beta.2 → 1.7.0-beta.21

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 (76) hide show
  1. package/dist/client/3d24e559cfbba5d8.js +10 -0
  2. package/dist/client/90a4f6d29bd453a7.js +10 -0
  3. package/dist/client/WorkflowTasks.d.ts +11 -11
  4. package/dist/client/a2fc280565d1c746.js +10 -0
  5. package/dist/client/f4370978c40502d7.js +10 -0
  6. package/dist/client/index.d.ts +1 -0
  7. package/dist/client/index.js +1 -1
  8. package/dist/client/locale/index.d.ts +2 -1
  9. package/dist/client/schemas/executions.d.ts +126 -125
  10. package/dist/client/triggers/schedule/RepeatField.d.ts +2 -1
  11. package/dist/common/collections/executions.d.ts +136 -0
  12. package/dist/common/collections/executions.js +125 -0
  13. package/dist/common/collections/flow_nodes.d.ts +44 -0
  14. package/dist/common/collections/flow_nodes.js +88 -0
  15. package/dist/common/collections/jobs.d.ts +37 -0
  16. package/dist/common/collections/jobs.js +74 -0
  17. package/dist/common/collections/workflowStats.d.ts +37 -0
  18. package/dist/common/collections/workflowStats.js +59 -0
  19. package/dist/common/collections/workflowTasks.d.ts +10 -0
  20. package/dist/common/collections/workflowTasks.js +64 -0
  21. package/dist/common/collections/workflowVersionStats.d.ts +37 -0
  22. package/dist/common/collections/workflowVersionStats.js +59 -0
  23. package/dist/common/collections/workflows.d.ts +250 -0
  24. package/dist/common/collections/workflows.js +225 -0
  25. package/dist/common/constants.d.ts +9 -0
  26. package/dist/common/constants.js +36 -0
  27. package/dist/externalVersion.js +13 -13
  28. package/dist/locale/it-IT.json +123 -18
  29. package/dist/locale/zh-CN.json +4 -0
  30. package/dist/node_modules/cron-parser/package.json +1 -1
  31. package/dist/node_modules/lru-cache/package.json +1 -1
  32. package/dist/node_modules/nodejs-snowflake/LICENSE +201 -0
  33. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.d.ts +62 -0
  34. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -0
  35. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake_bg.wasm +0 -0
  36. package/dist/node_modules/nodejs-snowflake/package.json +1 -0
  37. package/dist/server/Dispatcher.d.ts +11 -0
  38. package/dist/server/Dispatcher.js +35 -0
  39. package/dist/server/Plugin.d.ts +8 -1
  40. package/dist/server/Plugin.js +118 -70
  41. package/dist/server/Processor.d.ts +4 -11
  42. package/dist/server/Processor.js +48 -45
  43. package/dist/server/actions/nodes.js +7 -5
  44. package/dist/server/actions/workflowTasks.js +4 -2
  45. package/dist/server/actions/workflows.js +5 -2
  46. package/dist/server/collections/executions.js +12 -44
  47. package/dist/server/collections/flow_nodes.js +12 -57
  48. package/dist/server/collections/jobs.js +12 -36
  49. package/dist/server/collections/workflowStats.d.ts +11 -0
  50. package/dist/server/collections/workflowStats.js +43 -0
  51. package/dist/server/collections/workflowTasks.d.ts +2 -1
  52. package/dist/server/collections/workflowTasks.js +12 -33
  53. package/dist/server/collections/workflowVersionStats.d.ts +11 -0
  54. package/dist/server/collections/workflowVersionStats.js +43 -0
  55. package/dist/server/collections/workflows.d.ts +2 -1
  56. package/dist/server/collections/workflows.js +12 -101
  57. package/dist/server/migrations/20250320223415-stats.d.ts +14 -0
  58. package/dist/server/migrations/20250320223415-stats.js +82 -0
  59. package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.d.ts +14 -0
  60. package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.js +57 -0
  61. package/dist/server/repositories/WorkflowRepository.js +1 -2
  62. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +5 -3
  63. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +39 -36
  64. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +4 -2
  65. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +26 -24
  66. package/dist/server/triggers/ScheduleTrigger/index.d.ts +2 -1
  67. package/dist/server/triggers/ScheduleTrigger/index.js +4 -8
  68. package/dist/server/triggers/index.d.ts +1 -1
  69. package/dist/server/types/Workflow.d.ts +0 -2
  70. package/dist/swagger/index.d.ts +0 -14
  71. package/dist/swagger/index.js +0 -14
  72. package/package.json +4 -3
  73. package/dist/client/4d75ef32f02d7285.js +0 -10
  74. package/dist/client/56ce448358002e64.js +0 -10
  75. package/dist/client/58bb427e05b600de.js +0 -10
  76. package/dist/client/739d458621edf81f.js +0 -10
@@ -6,6 +6,7 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- export declare const NAMESPACE = "workflow";
9
+ import { NAMESPACE } from '../../common/constants';
10
+ export { NAMESPACE };
10
11
  export declare function lang(key: string, options?: {}): string;
11
12
  export declare function useWorkflowTranslation(): import("react-i18next").UseTranslationResponse<"workflow", undefined>;
@@ -6,71 +6,7 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- export declare const executionCollection: {
10
- name: string;
11
- fields: {
12
- interface: string;
13
- type: string;
14
- name: string;
15
- uiSchema: import("@formily/react").Stringify<{
16
- [key: symbol]: any;
17
- [key: `x-${string}`]: any;
18
- [key: `x-${number}`]: any;
19
- version?: string;
20
- name?: import("@formily/react").SchemaKey;
21
- title?: any;
22
- description?: any;
23
- default?: any;
24
- readOnly?: boolean;
25
- writeOnly?: boolean;
26
- type?: import("@formily/react").SchemaTypes;
27
- enum?: import("@formily/react").SchemaEnum<any>;
28
- const?: any;
29
- multipleOf?: number;
30
- maximum?: number;
31
- exclusiveMaximum?: number;
32
- minimum?: number;
33
- exclusiveMinimum?: number;
34
- maxLength?: number;
35
- minLength?: number;
36
- pattern?: string | RegExp;
37
- maxItems?: number;
38
- minItems?: number;
39
- uniqueItems?: boolean;
40
- maxProperties?: number;
41
- minProperties?: number;
42
- required?: string | boolean | string[];
43
- format?: string;
44
- $ref?: string;
45
- $namespace?: string;
46
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
47
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
48
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
49
- additionalItems?: import("@formily/react").Stringify<any>;
50
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
51
- additionalProperties?: import("@formily/react").Stringify<any>;
52
- "x-value"?: any;
53
- "x-index"?: number;
54
- "x-pattern"?: any;
55
- "x-display"?: any;
56
- "x-validator"?: any;
57
- "x-decorator"?: any;
58
- "x-decorator-props"?: any;
59
- "x-component"?: any;
60
- "x-component-props"?: any;
61
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
62
- "x-content"?: any;
63
- "x-data"?: any;
64
- "x-visible"?: boolean;
65
- "x-hidden"?: boolean;
66
- "x-disabled"?: boolean;
67
- "x-editable"?: boolean;
68
- "x-read-only"?: boolean;
69
- "x-read-pretty"?: boolean;
70
- "x-compile-omitted"?: string[];
71
- }>;
72
- }[];
73
- };
9
+ import React from 'react';
74
10
  export declare const executionSchema: {
75
11
  type: string;
76
12
  name: string;
@@ -82,69 +18,131 @@ export declare const executionSchema: {
82
18
  'x-decorator': string;
83
19
  'x-decorator-props': {
84
20
  collection: {
21
+ dumpRules: {
22
+ group: string;
23
+ };
24
+ migrationRules: string[];
85
25
  name: string;
86
- fields: {
26
+ shared: boolean;
27
+ fields: ({
28
+ type: string;
29
+ name: string;
30
+ interface: string;
31
+ uiSchema: {
32
+ type: string;
33
+ title: string;
34
+ 'x-component': string;
35
+ 'x-component-props': {
36
+ fieldNames?: undefined;
37
+ };
38
+ 'x-read-pretty': boolean;
39
+ 'x-decorator'?: undefined;
40
+ enum?: undefined;
41
+ };
42
+ primaryKey: boolean;
43
+ autoIncrement: boolean;
44
+ target?: undefined;
45
+ foreignKey?: undefined;
46
+ unique?: undefined;
47
+ onDelete?: undefined;
48
+ } | {
49
+ type: string;
50
+ name: string;
51
+ target: string;
52
+ foreignKey: string;
53
+ interface: string;
54
+ uiSchema: {
55
+ type: string;
56
+ title: string;
57
+ 'x-component': string;
58
+ 'x-component-props': {
59
+ fieldNames: {
60
+ label: string;
61
+ value: string;
62
+ };
63
+ };
64
+ 'x-read-pretty': boolean;
65
+ 'x-decorator'?: undefined;
66
+ enum?: undefined;
67
+ };
68
+ primaryKey?: undefined;
69
+ autoIncrement?: undefined;
70
+ unique?: undefined;
71
+ onDelete?: undefined;
72
+ } | {
73
+ type: string;
74
+ name: string;
75
+ interface?: undefined;
76
+ uiSchema?: undefined;
77
+ primaryKey?: undefined;
78
+ autoIncrement?: undefined;
79
+ target?: undefined;
80
+ foreignKey?: undefined;
81
+ unique?: undefined;
82
+ onDelete?: undefined;
83
+ } | {
84
+ type: string;
85
+ name: string;
86
+ unique: boolean;
87
+ interface?: undefined;
88
+ uiSchema?: undefined;
89
+ primaryKey?: undefined;
90
+ autoIncrement?: undefined;
91
+ target?: undefined;
92
+ foreignKey?: undefined;
93
+ onDelete?: undefined;
94
+ } | {
95
+ type: string;
96
+ name: string;
97
+ onDelete: string;
98
+ interface?: undefined;
99
+ uiSchema?: undefined;
100
+ primaryKey?: undefined;
101
+ autoIncrement?: undefined;
102
+ target?: undefined;
103
+ foreignKey?: undefined;
104
+ unique?: undefined;
105
+ } | {
106
+ type: string;
107
+ name: string;
108
+ interface: string;
109
+ uiSchema: {
110
+ title: string;
111
+ type: string;
112
+ 'x-component': string;
113
+ 'x-decorator': string;
114
+ enum: string;
115
+ 'x-component-props'?: undefined;
116
+ 'x-read-pretty'?: undefined;
117
+ };
118
+ primaryKey?: undefined;
119
+ autoIncrement?: undefined;
120
+ target?: undefined;
121
+ foreignKey?: undefined;
122
+ unique?: undefined;
123
+ onDelete?: undefined;
124
+ } | {
87
125
  interface: string;
88
126
  type: string;
89
127
  name: string;
90
- uiSchema: import("@formily/react").Stringify<{
91
- [key: symbol]: any;
92
- [key: `x-${string}`]: any;
93
- [key: `x-${number}`]: any;
94
- version?: string;
95
- name?: import("@formily/react").SchemaKey;
96
- title?: any;
97
- description?: any;
98
- default?: any;
99
- readOnly?: boolean;
100
- writeOnly?: boolean;
101
- type?: import("@formily/react").SchemaTypes;
102
- enum?: import("@formily/react").SchemaEnum<any>;
103
- const?: any;
104
- multipleOf?: number;
105
- maximum?: number;
106
- exclusiveMaximum?: number;
107
- minimum?: number;
108
- exclusiveMinimum?: number;
109
- maxLength?: number;
110
- minLength?: number;
111
- pattern?: string | RegExp;
112
- maxItems?: number;
113
- minItems?: number;
114
- uniqueItems?: boolean;
115
- maxProperties?: number;
116
- minProperties?: number;
117
- required?: string | boolean | string[];
118
- format?: string;
119
- $ref?: string;
120
- $namespace?: string;
121
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
122
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
123
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
124
- additionalItems?: import("@formily/react").Stringify<any>;
125
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
126
- additionalProperties?: import("@formily/react").Stringify<any>;
127
- "x-value"?: any;
128
- "x-index"?: number;
129
- "x-pattern"?: any;
130
- "x-display"?: any;
131
- "x-validator"?: any;
132
- "x-decorator"?: any;
133
- "x-decorator-props"?: any;
134
- "x-component"?: any;
135
- "x-component-props"?: any;
136
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
137
- "x-content"?: any;
138
- "x-data"?: any;
139
- "x-visible"?: boolean;
140
- "x-hidden"?: boolean;
141
- "x-disabled"?: boolean;
142
- "x-editable"?: boolean;
143
- "x-read-only"?: boolean;
144
- "x-read-pretty"?: boolean;
145
- "x-compile-omitted"?: string[];
146
- }>;
147
- }[];
128
+ uiSchema: {
129
+ type: string;
130
+ title: string;
131
+ 'x-component': string;
132
+ 'x-component-props': {
133
+ fieldNames?: undefined;
134
+ };
135
+ 'x-read-pretty': boolean;
136
+ 'x-decorator'?: undefined;
137
+ enum?: undefined;
138
+ };
139
+ primaryKey?: undefined;
140
+ autoIncrement?: undefined;
141
+ target?: undefined;
142
+ foreignKey?: undefined;
143
+ unique?: undefined;
144
+ onDelete?: undefined;
145
+ })[];
148
146
  };
149
147
  resourceName: string;
150
148
  request: {
@@ -248,10 +246,13 @@ export declare const executionSchema: {
248
246
  type: string;
249
247
  'x-decorator': string;
250
248
  'x-component': string;
249
+ title: string;
251
250
  properties: {
252
251
  workflowId: {
253
252
  type: string;
254
- 'x-component': string;
253
+ "x-component"({ value }: {
254
+ value: any;
255
+ }): React.JSX.Element;
255
256
  'x-read-pretty': boolean;
256
257
  };
257
258
  };
@@ -7,7 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
- export declare function RepeatField({ value, onChange }: {
10
+ export declare function RepeatField({ value, onChange, disabled }: {
11
11
  value?: any;
12
12
  onChange: any;
13
+ disabled: any;
13
14
  }): React.JSX.Element;
@@ -0,0 +1,136 @@
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
+ type: string;
18
+ name: string;
19
+ interface: string;
20
+ uiSchema: {
21
+ type: string;
22
+ title: string;
23
+ 'x-component': string;
24
+ 'x-component-props': {
25
+ fieldNames?: undefined;
26
+ };
27
+ 'x-read-pretty': boolean;
28
+ 'x-decorator'?: undefined;
29
+ enum?: undefined;
30
+ };
31
+ primaryKey: boolean;
32
+ autoIncrement: boolean;
33
+ target?: undefined;
34
+ foreignKey?: undefined;
35
+ unique?: undefined;
36
+ onDelete?: undefined;
37
+ } | {
38
+ type: string;
39
+ name: string;
40
+ target: string;
41
+ foreignKey: string;
42
+ interface: string;
43
+ uiSchema: {
44
+ type: string;
45
+ title: string;
46
+ 'x-component': string;
47
+ 'x-component-props': {
48
+ fieldNames: {
49
+ label: string;
50
+ value: string;
51
+ };
52
+ };
53
+ 'x-read-pretty': boolean;
54
+ 'x-decorator'?: undefined;
55
+ enum?: undefined;
56
+ };
57
+ primaryKey?: undefined;
58
+ autoIncrement?: undefined;
59
+ unique?: undefined;
60
+ onDelete?: undefined;
61
+ } | {
62
+ type: string;
63
+ name: string;
64
+ interface?: undefined;
65
+ uiSchema?: undefined;
66
+ primaryKey?: undefined;
67
+ autoIncrement?: undefined;
68
+ target?: undefined;
69
+ foreignKey?: undefined;
70
+ unique?: undefined;
71
+ onDelete?: undefined;
72
+ } | {
73
+ type: string;
74
+ name: string;
75
+ unique: boolean;
76
+ interface?: undefined;
77
+ uiSchema?: undefined;
78
+ primaryKey?: undefined;
79
+ autoIncrement?: undefined;
80
+ target?: undefined;
81
+ foreignKey?: undefined;
82
+ onDelete?: undefined;
83
+ } | {
84
+ type: string;
85
+ name: string;
86
+ onDelete: string;
87
+ interface?: undefined;
88
+ uiSchema?: undefined;
89
+ primaryKey?: undefined;
90
+ autoIncrement?: undefined;
91
+ target?: undefined;
92
+ foreignKey?: undefined;
93
+ unique?: undefined;
94
+ } | {
95
+ type: string;
96
+ name: string;
97
+ interface: string;
98
+ uiSchema: {
99
+ title: string;
100
+ type: string;
101
+ 'x-component': string;
102
+ 'x-decorator': string;
103
+ enum: string;
104
+ 'x-component-props'?: undefined;
105
+ 'x-read-pretty'?: undefined;
106
+ };
107
+ primaryKey?: undefined;
108
+ autoIncrement?: undefined;
109
+ target?: undefined;
110
+ foreignKey?: undefined;
111
+ unique?: undefined;
112
+ onDelete?: undefined;
113
+ } | {
114
+ interface: string;
115
+ type: string;
116
+ name: string;
117
+ uiSchema: {
118
+ type: string;
119
+ title: string;
120
+ 'x-component': string;
121
+ 'x-component-props': {
122
+ fieldNames?: undefined;
123
+ };
124
+ 'x-read-pretty': boolean;
125
+ 'x-decorator'?: undefined;
126
+ enum?: undefined;
127
+ };
128
+ primaryKey?: undefined;
129
+ autoIncrement?: undefined;
130
+ target?: undefined;
131
+ foreignKey?: undefined;
132
+ unique?: undefined;
133
+ onDelete?: undefined;
134
+ })[];
135
+ };
136
+ export default _default;
@@ -0,0 +1,125 @@
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 executions_exports = {};
28
+ __export(executions_exports, {
29
+ default: () => executions_default
30
+ });
31
+ module.exports = __toCommonJS(executions_exports);
32
+ var import_constants = require("../constants");
33
+ var executions_default = {
34
+ dumpRules: {
35
+ group: "log"
36
+ },
37
+ migrationRules: ["schema-only"],
38
+ name: "executions",
39
+ shared: true,
40
+ fields: [
41
+ {
42
+ type: "bigInt",
43
+ name: "id",
44
+ interface: "id",
45
+ uiSchema: {
46
+ type: "number",
47
+ title: '{{t("ID")}}',
48
+ "x-component": "Input",
49
+ "x-component-props": {},
50
+ "x-read-pretty": true
51
+ },
52
+ primaryKey: true,
53
+ autoIncrement: true
54
+ },
55
+ {
56
+ type: "belongsTo",
57
+ name: "workflow",
58
+ target: "workflows",
59
+ foreignKey: "workflowId",
60
+ interface: "m2o",
61
+ uiSchema: {
62
+ type: "object",
63
+ title: `{{t("Version", { ns: "${import_constants.NAMESPACE}" })}}`,
64
+ "x-component": "AssociationField",
65
+ "x-component-props": {
66
+ fieldNames: {
67
+ label: "id",
68
+ value: "id"
69
+ }
70
+ },
71
+ "x-read-pretty": true
72
+ }
73
+ },
74
+ {
75
+ type: "string",
76
+ name: "key"
77
+ },
78
+ {
79
+ type: "string",
80
+ name: "eventKey",
81
+ unique: true
82
+ },
83
+ {
84
+ type: "hasMany",
85
+ name: "jobs",
86
+ onDelete: "CASCADE"
87
+ },
88
+ {
89
+ type: "json",
90
+ name: "context"
91
+ },
92
+ {
93
+ type: "integer",
94
+ name: "status",
95
+ interface: "select",
96
+ uiSchema: {
97
+ title: `{{t("Status", { ns: "${import_constants.NAMESPACE}" })}}`,
98
+ type: "string",
99
+ "x-component": "Select",
100
+ "x-decorator": "FormItem",
101
+ enum: "{{ExecutionStatusOptions}}"
102
+ }
103
+ },
104
+ {
105
+ type: "json",
106
+ name: "stack"
107
+ },
108
+ {
109
+ type: "json",
110
+ name: "output"
111
+ },
112
+ {
113
+ interface: "createdAt",
114
+ type: "datetime",
115
+ name: "createdAt",
116
+ uiSchema: {
117
+ type: "datetime",
118
+ title: `{{t("Triggered at", { ns: "${import_constants.NAMESPACE}" })}}`,
119
+ "x-component": "DatePicker",
120
+ "x-component-props": {},
121
+ "x-read-pretty": true
122
+ }
123
+ }
124
+ ]
125
+ };
@@ -0,0 +1,44 @@
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?: undefined;
18
+ sourceKey?: undefined;
19
+ foreignKey?: undefined;
20
+ defaultValue?: undefined;
21
+ } | {
22
+ name: string;
23
+ type: string;
24
+ target: string;
25
+ sourceKey?: undefined;
26
+ foreignKey?: undefined;
27
+ defaultValue?: undefined;
28
+ } | {
29
+ name: string;
30
+ type: string;
31
+ target: string;
32
+ sourceKey: string;
33
+ foreignKey: string;
34
+ defaultValue?: undefined;
35
+ } | {
36
+ type: string;
37
+ name: string;
38
+ defaultValue: {};
39
+ target?: undefined;
40
+ sourceKey?: undefined;
41
+ foreignKey?: undefined;
42
+ })[];
43
+ };
44
+ export default _default;
@@ -0,0 +1,88 @@
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
+ },
46
+ // which workflow belongs to
47
+ {
48
+ name: "workflow",
49
+ type: "belongsTo"
50
+ },
51
+ {
52
+ name: "upstream",
53
+ type: "belongsTo",
54
+ target: "flow_nodes"
55
+ },
56
+ {
57
+ name: "branches",
58
+ type: "hasMany",
59
+ target: "flow_nodes",
60
+ sourceKey: "id",
61
+ foreignKey: "upstreamId"
62
+ },
63
+ // only works when upstream node is branching type, such as condition and parallel.
64
+ // put here because the design of flow-links model is not really necessary for now.
65
+ // or it should be put into flow-links model.
66
+ {
67
+ name: "branchIndex",
68
+ type: "integer"
69
+ },
70
+ // Note: for reasons:
71
+ // 1. redirect type node to solve cycle flow.
72
+ // 2. recognize as real next node after branches.
73
+ {
74
+ name: "downstream",
75
+ type: "belongsTo",
76
+ target: "flow_nodes"
77
+ },
78
+ {
79
+ type: "string",
80
+ name: "type"
81
+ },
82
+ {
83
+ type: "json",
84
+ name: "config",
85
+ defaultValue: {}
86
+ }
87
+ ]
88
+ };