@nocobase/plugin-workflow 2.1.0-beta.9 → 2.2.0-alpha.1

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 (197) hide show
  1. package/dist/client/214.7e602cfe7a8251b8.js +10 -0
  2. package/dist/client/618.19af7f84261c815d.js +10 -0
  3. package/dist/client/67.452743ce8ec30617.js +10 -0
  4. package/dist/client/964.ffbf5b47ed12bbdc.js +10 -0
  5. package/dist/client/Branch.d.ts +7 -3
  6. package/dist/client/BranchContext.d.ts +18 -0
  7. package/dist/client/components/TimeoutInput.d.ts +11 -0
  8. package/dist/client/constants.d.ts +13 -0
  9. package/dist/client/flows/triggerWorkflows.d.ts +14 -1
  10. package/dist/client/hooks/{useWorkflowFilterActionProps.d.ts → useResourceFilterActionProps.d.ts} +1 -1
  11. package/dist/client/index.js +1 -1
  12. package/dist/client/nodes/create.d.ts +10 -0
  13. package/dist/client/nodes/destroy.d.ts +10 -0
  14. package/dist/client/nodes/index.d.ts +5 -0
  15. package/dist/client/nodes/query.d.ts +18 -2
  16. package/dist/client/nodes/update.d.ts +10 -0
  17. package/dist/client/schemas/collection.d.ts +8 -2
  18. package/dist/client/schemas/executions.d.ts +63 -2
  19. package/dist/client/triggers/collection.d.ts +14 -1
  20. package/dist/client/triggers/index.d.ts +4 -0
  21. package/dist/client/triggers/schedule/constants.d.ts +4 -0
  22. package/dist/client/triggers/schedule/index.d.ts +15 -0
  23. package/dist/client/utils.d.ts +17 -0
  24. package/dist/common/collections/executions.d.ts +44 -1
  25. package/dist/common/collections/executions.js +63 -1
  26. package/dist/common/collections/flow_nodes.d.ts +1 -0
  27. package/dist/common/collections/flow_nodes.js +1 -0
  28. package/dist/common/collections/jobs.d.ts +1 -0
  29. package/dist/common/collections/jobs.js +8 -0
  30. package/dist/common/collections/userWorkflowTasks.d.ts +1 -0
  31. package/dist/common/collections/userWorkflowTasks.js +1 -0
  32. package/dist/common/collections/workflowCategories.d.ts +1 -0
  33. package/dist/common/collections/workflowCategories.js +1 -0
  34. package/dist/common/collections/workflowCategoryRelations.d.ts +1 -0
  35. package/dist/common/collections/workflowCategoryRelations.js +1 -0
  36. package/dist/common/collections/workflowStats.d.ts +1 -0
  37. package/dist/common/collections/workflowStats.js +1 -0
  38. package/dist/common/collections/workflowTasks.js +1 -0
  39. package/dist/common/collections/workflowVersionStats.d.ts +1 -0
  40. package/dist/common/collections/workflowVersionStats.js +1 -0
  41. package/dist/common/collections/workflows.d.ts +66 -11
  42. package/dist/common/collections/workflows.js +35 -2
  43. package/dist/common/constants.d.ts +5 -0
  44. package/dist/common/constants.js +7 -0
  45. package/dist/externalVersion.js +15 -13
  46. package/dist/locale/de-DE.json +4 -0
  47. package/dist/locale/en-US.json +7 -0
  48. package/dist/locale/es-ES.json +4 -0
  49. package/dist/locale/fr-FR.json +4 -0
  50. package/dist/locale/hu-HU.json +7 -3
  51. package/dist/locale/id-ID.json +4 -0
  52. package/dist/locale/it-IT.json +4 -0
  53. package/dist/locale/ja-JP.json +5 -1
  54. package/dist/locale/ko-KR.json +4 -0
  55. package/dist/locale/nl-NL.json +7 -3
  56. package/dist/locale/pt-BR.json +4 -0
  57. package/dist/locale/ru-RU.json +4 -0
  58. package/dist/locale/tr-TR.json +4 -0
  59. package/dist/locale/uk-UA.json +7 -3
  60. package/dist/locale/vi-VN.json +7 -3
  61. package/dist/locale/zh-CN.json +10 -0
  62. package/dist/locale/zh-TW.json +7 -3
  63. package/dist/node_modules/cron-parser/lib/parser.js +1 -1
  64. package/dist/node_modules/cron-parser/package.json +1 -1
  65. package/dist/node_modules/joi/dist/joi-browser.min.js +1 -0
  66. package/dist/node_modules/joi/lib/annotate.js +175 -0
  67. package/dist/node_modules/joi/lib/base.js +1069 -0
  68. package/dist/node_modules/joi/lib/cache.js +143 -0
  69. package/dist/node_modules/joi/lib/common.js +216 -0
  70. package/dist/node_modules/joi/lib/compile.js +283 -0
  71. package/dist/node_modules/joi/lib/errors.js +271 -0
  72. package/dist/node_modules/joi/lib/extend.js +312 -0
  73. package/dist/node_modules/joi/lib/index.d.ts +2365 -0
  74. package/dist/node_modules/joi/lib/index.js +1 -0
  75. package/dist/node_modules/joi/lib/manifest.js +476 -0
  76. package/dist/node_modules/joi/lib/messages.js +178 -0
  77. package/dist/node_modules/joi/lib/modify.js +267 -0
  78. package/dist/node_modules/joi/lib/ref.js +414 -0
  79. package/dist/node_modules/joi/lib/schemas.js +302 -0
  80. package/dist/node_modules/joi/lib/state.js +166 -0
  81. package/dist/node_modules/joi/lib/template.js +463 -0
  82. package/dist/node_modules/joi/lib/trace.js +346 -0
  83. package/dist/node_modules/joi/lib/types/alternatives.js +364 -0
  84. package/dist/node_modules/joi/lib/types/any.js +174 -0
  85. package/dist/node_modules/joi/lib/types/array.js +809 -0
  86. package/dist/node_modules/joi/lib/types/binary.js +100 -0
  87. package/dist/node_modules/joi/lib/types/boolean.js +150 -0
  88. package/dist/node_modules/joi/lib/types/date.js +233 -0
  89. package/dist/node_modules/joi/lib/types/function.js +93 -0
  90. package/dist/node_modules/joi/lib/types/keys.js +1067 -0
  91. package/dist/node_modules/joi/lib/types/link.js +168 -0
  92. package/dist/node_modules/joi/lib/types/number.js +363 -0
  93. package/dist/node_modules/joi/lib/types/object.js +22 -0
  94. package/dist/node_modules/joi/lib/types/string.js +850 -0
  95. package/dist/node_modules/joi/lib/types/symbol.js +102 -0
  96. package/dist/node_modules/joi/lib/validator.js +750 -0
  97. package/dist/node_modules/joi/lib/values.js +263 -0
  98. package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.d.ts +60 -0
  99. package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.js +225 -0
  100. package/dist/node_modules/joi/node_modules/@hapi/topo/package.json +30 -0
  101. package/dist/node_modules/joi/package.json +1 -0
  102. package/dist/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
  103. package/dist/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +10 -0
  104. package/dist/node_modules/lru-cache/dist/commonjs/index.d.ts +1381 -0
  105. package/dist/node_modules/lru-cache/dist/commonjs/index.js +1692 -0
  106. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +1 -0
  107. package/dist/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
  108. package/dist/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
  109. package/dist/node_modules/lru-cache/dist/esm/browser/index.d.ts +1381 -0
  110. package/dist/node_modules/lru-cache/dist/{mjs → esm/browser}/index.js +537 -179
  111. package/dist/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
  112. package/dist/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
  113. package/dist/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
  114. package/dist/node_modules/lru-cache/dist/esm/index.d.ts +1381 -0
  115. package/dist/node_modules/lru-cache/dist/{cjs → esm}/index.js +538 -184
  116. package/dist/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  117. package/dist/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
  118. package/dist/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +7 -0
  119. package/dist/node_modules/lru-cache/dist/esm/node/index.d.ts +1381 -0
  120. package/dist/node_modules/lru-cache/dist/esm/node/index.js +1688 -0
  121. package/dist/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
  122. package/dist/node_modules/lru-cache/package.json +1 -1
  123. package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -1
  124. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  125. package/dist/server/Dispatcher.d.ts +12 -6
  126. package/dist/server/Dispatcher.js +309 -190
  127. package/dist/server/ExecutionTimeoutManager.d.ts +46 -0
  128. package/dist/server/ExecutionTimeoutManager.js +320 -0
  129. package/dist/server/Plugin.d.ts +17 -3
  130. package/dist/server/Plugin.js +54 -12
  131. package/dist/server/Processor.d.ts +64 -12
  132. package/dist/server/Processor.js +286 -48
  133. package/dist/server/RunningExecutionRegistry.d.ts +18 -0
  134. package/dist/server/RunningExecutionRegistry.js +48 -0
  135. package/dist/server/actions/executions.d.ts +4 -3
  136. package/dist/server/actions/executions.js +42 -21
  137. package/dist/server/actions/jobs.d.ts +2 -1
  138. package/dist/server/actions/jobs.js +28 -1
  139. package/dist/server/actions/nodes.d.ts +5 -0
  140. package/dist/server/actions/nodes.js +38 -5
  141. package/dist/server/actions/workflows.d.ts +6 -0
  142. package/dist/server/actions/workflows.js +38 -0
  143. package/dist/server/constants.d.ts +2 -0
  144. package/dist/server/constants.js +3 -0
  145. package/dist/server/index.d.ts +2 -0
  146. package/dist/server/index.js +2 -0
  147. package/dist/server/instructions/ConditionInstruction.d.ts +2 -0
  148. package/dist/server/instructions/ConditionInstruction.js +17 -0
  149. package/dist/server/instructions/CreateInstruction.d.ts +3 -0
  150. package/dist/server/instructions/CreateInstruction.js +25 -0
  151. package/dist/server/instructions/DestroyInstruction.d.ts +3 -0
  152. package/dist/server/instructions/DestroyInstruction.js +25 -0
  153. package/dist/server/instructions/EndInstruction.d.ts +2 -0
  154. package/dist/server/instructions/EndInstruction.js +4 -0
  155. package/dist/server/instructions/MultiConditionsInstruction.d.ts +2 -0
  156. package/dist/server/instructions/MultiConditionsInstruction.js +23 -0
  157. package/dist/server/instructions/OutputInstruction.d.ts +2 -0
  158. package/dist/server/instructions/OutputInstruction.js +15 -1
  159. package/dist/server/instructions/QueryInstruction.d.ts +3 -0
  160. package/dist/server/instructions/QueryInstruction.js +32 -7
  161. package/dist/server/instructions/UpdateInstruction.d.ts +3 -0
  162. package/dist/server/instructions/UpdateInstruction.js +27 -0
  163. package/dist/server/instructions/index.d.ts +24 -4
  164. package/dist/server/instructions/index.js +18 -0
  165. package/dist/server/migrations/20260423225800-fill-workflow-created-updated-by.d.ts +13 -0
  166. package/dist/server/migrations/20260423225800-fill-workflow-created-updated-by.js +57 -0
  167. package/dist/server/migrations/20260501120000-workflow-timeout.d.ts +13 -0
  168. package/dist/server/migrations/20260501120000-workflow-timeout.js +63 -0
  169. package/dist/server/timeout-errors.d.ts +13 -0
  170. package/dist/server/timeout-errors.js +47 -0
  171. package/dist/server/triggers/CollectionTrigger.d.ts +3 -0
  172. package/dist/server/triggers/CollectionTrigger.js +34 -0
  173. package/dist/server/triggers/ScheduleTrigger/index.d.ts +3 -0
  174. package/dist/server/triggers/ScheduleTrigger/index.js +18 -3
  175. package/dist/server/triggers/index.d.ts +3 -0
  176. package/dist/server/triggers/index.js +18 -0
  177. package/dist/server/types/Execution.d.ts +6 -0
  178. package/dist/server/types/Job.d.ts +3 -3
  179. package/dist/server/types/Workflow.d.ts +6 -1
  180. package/dist/server/utils.d.ts +27 -0
  181. package/dist/server/utils.js +142 -2
  182. package/dist/swagger/index.d.ts +66 -75
  183. package/dist/swagger/index.js +58 -67
  184. package/package.json +5 -4
  185. package/dist/client/0e458d99e9fc5e65.js +0 -10
  186. package/dist/client/27bd65abee87cafa.js +0 -10
  187. package/dist/client/478692c1637f2742.js +0 -10
  188. package/dist/client/f39e94207f92e352.js +0 -10
  189. package/dist/node_modules/lru-cache/LICENSE +0 -15
  190. package/dist/node_modules/lru-cache/dist/cjs/index-cjs.d.ts +0 -7
  191. package/dist/node_modules/lru-cache/dist/cjs/index-cjs.js +0 -1
  192. package/dist/node_modules/lru-cache/dist/cjs/index.d.ts +0 -807
  193. package/dist/node_modules/lru-cache/dist/cjs/index.min.js +0 -2
  194. package/dist/node_modules/lru-cache/dist/mjs/index.d.ts +0 -807
  195. package/dist/node_modules/lru-cache/dist/mjs/index.min.js +0 -2
  196. /package/dist/node_modules/lru-cache/dist/{cjs → commonjs}/package.json +0 -0
  197. /package/dist/node_modules/lru-cache/dist/{mjs → esm}/package.json +0 -0
@@ -22,6 +22,16 @@ export default class extends Instruction {
22
22
  group: string;
23
23
  description: string;
24
24
  icon: React.JSX.Element;
25
+ presetFieldset: {
26
+ collection: {
27
+ type: string;
28
+ title: string;
29
+ required: boolean;
30
+ 'x-reactions': any[];
31
+ 'x-decorator': string;
32
+ 'x-component': string;
33
+ };
34
+ };
25
35
  fieldset: {
26
36
  collection: {
27
37
  'x-disabled': string;
@@ -16,6 +16,16 @@ export default class extends Instruction {
16
16
  group: string;
17
17
  description: string;
18
18
  icon: React.JSX.Element;
19
+ presetFieldset: {
20
+ collection: {
21
+ type: string;
22
+ title: string;
23
+ required: boolean;
24
+ 'x-reactions': any[];
25
+ 'x-decorator': string;
26
+ 'x-component': string;
27
+ };
28
+ };
19
29
  fieldset: {
20
30
  collection: {
21
31
  'x-disabled': string;
@@ -17,6 +17,7 @@ export type NodeAvailableContext = {
17
17
  workflow: object;
18
18
  upstream: object;
19
19
  branchIndex: number;
20
+ syncOnly?: boolean;
20
21
  };
21
22
  type Config = Record<string, any>;
22
23
  type Options = {
@@ -29,6 +30,7 @@ export declare abstract class Instruction {
29
30
  group: string;
30
31
  description?: string;
31
32
  icon?: JSX.Element;
33
+ async?: boolean;
32
34
  /**
33
35
  * @deprecated migrate to `presetFieldset` instead
34
36
  */
@@ -107,5 +109,8 @@ export declare function Node({ data }: {
107
109
  }): React.JSX.Element;
108
110
  export declare function RemoveButton(): React.JSX.Element;
109
111
  export declare function JobButton(): React.JSX.Element;
112
+ export declare function LogCollapse({ value }: {
113
+ value: any;
114
+ }): React.JSX.Element;
110
115
  export declare function NodeDefaultView(props: any): React.JSX.Element;
111
116
  export {};
@@ -24,6 +24,16 @@ export default class extends Instruction {
24
24
  group: string;
25
25
  description: string;
26
26
  icon: React.JSX.Element;
27
+ presetFieldset: {
28
+ collection: {
29
+ type: string;
30
+ title: string;
31
+ required: boolean;
32
+ 'x-reactions': any[];
33
+ 'x-decorator': string;
34
+ 'x-component': string;
35
+ };
36
+ };
27
37
  fieldset: {
28
38
  collection: {
29
39
  'x-disabled': string;
@@ -149,7 +159,10 @@ export default class extends Instruction {
149
159
  'x-decorator': string;
150
160
  'x-component': string;
151
161
  'x-component-props': {
152
- useTypedConstant: string[];
162
+ nullable: boolean;
163
+ useTypedConstant: (string | {
164
+ min: number;
165
+ })[][];
153
166
  };
154
167
  default: number;
155
168
  };
@@ -165,7 +178,10 @@ export default class extends Instruction {
165
178
  'x-decorator': string;
166
179
  'x-component': string;
167
180
  'x-component-props': {
168
- min: number;
181
+ nullable: boolean;
182
+ useTypedConstant: (string | {
183
+ min: number;
184
+ })[][];
169
185
  };
170
186
  default: number;
171
187
  };
@@ -18,6 +18,16 @@ export default class extends Instruction {
18
18
  group: string;
19
19
  description: string;
20
20
  icon: React.JSX.Element;
21
+ presetFieldset: {
22
+ collection: {
23
+ type: string;
24
+ title: string;
25
+ required: boolean;
26
+ 'x-reactions': any[];
27
+ 'x-decorator': string;
28
+ 'x-component': string;
29
+ };
30
+ };
21
31
  fieldset: {
22
32
  collection: {
23
33
  'x-disabled': string;
@@ -121,7 +121,10 @@ export declare const pagination: {
121
121
  'x-decorator': string;
122
122
  'x-component': string;
123
123
  'x-component-props': {
124
- useTypedConstant: string[];
124
+ nullable: boolean;
125
+ useTypedConstant: (string | {
126
+ min: number;
127
+ })[][];
125
128
  };
126
129
  default: number;
127
130
  };
@@ -137,7 +140,10 @@ export declare const pagination: {
137
140
  'x-decorator': string;
138
141
  'x-component': string;
139
142
  'x-component-props': {
140
- min: number;
143
+ nullable: boolean;
144
+ useTypedConstant: (string | {
145
+ min: number;
146
+ })[][];
141
147
  };
142
148
  default: number;
143
149
  };
@@ -23,6 +23,7 @@ export declare const executionSchema: {
23
23
  };
24
24
  migrationRules: string[];
25
25
  name: string;
26
+ dataCategory: string;
26
27
  shared: boolean;
27
28
  fields: ({
28
29
  type: string;
@@ -46,6 +47,28 @@ export declare const executionSchema: {
46
47
  unique?: undefined;
47
48
  onDelete?: undefined;
48
49
  defaultValue?: undefined;
50
+ } | {
51
+ type: string;
52
+ name: string;
53
+ interface: string;
54
+ uiSchema: {
55
+ type: string;
56
+ title: string;
57
+ 'x-component': string;
58
+ 'x-component-props': {
59
+ fieldNames?: undefined;
60
+ };
61
+ 'x-read-pretty': boolean;
62
+ 'x-decorator'?: undefined;
63
+ enum?: undefined;
64
+ };
65
+ primaryKey?: undefined;
66
+ allowNull?: undefined;
67
+ target?: undefined;
68
+ foreignKey?: undefined;
69
+ unique?: undefined;
70
+ onDelete?: undefined;
71
+ defaultValue?: undefined;
49
72
  } | {
50
73
  type: string;
51
74
  name: string;
@@ -127,6 +150,26 @@ export declare const executionSchema: {
127
150
  unique?: undefined;
128
151
  onDelete?: undefined;
129
152
  defaultValue?: undefined;
153
+ } | {
154
+ type: string;
155
+ name: string;
156
+ uiSchema: {
157
+ title: string;
158
+ type: string;
159
+ 'x-component': string;
160
+ 'x-decorator': string;
161
+ enum: string;
162
+ 'x-component-props'?: undefined;
163
+ 'x-read-pretty'?: undefined;
164
+ };
165
+ interface?: undefined;
166
+ primaryKey?: undefined;
167
+ allowNull?: undefined;
168
+ target?: undefined;
169
+ foreignKey?: undefined;
170
+ unique?: undefined;
171
+ onDelete?: undefined;
172
+ defaultValue?: undefined;
130
173
  } | {
131
174
  type: string;
132
175
  name: string;
@@ -142,7 +185,6 @@ export declare const executionSchema: {
142
185
  } | {
143
186
  type: string;
144
187
  name: string;
145
- interface: string;
146
188
  uiSchema: {
147
189
  type: string;
148
190
  title: string;
@@ -154,6 +196,7 @@ export declare const executionSchema: {
154
196
  'x-decorator'?: undefined;
155
197
  enum?: undefined;
156
198
  };
199
+ interface?: undefined;
157
200
  primaryKey?: undefined;
158
201
  allowNull?: undefined;
159
202
  target?: undefined;
@@ -171,7 +214,6 @@ export declare const executionSchema: {
171
214
  resource: string;
172
215
  action: string;
173
216
  params: {
174
- appends: string[];
175
217
  pageSize: number;
176
218
  sort: string[];
177
219
  except: string[];
@@ -189,6 +231,25 @@ export declare const executionSchema: {
189
231
  };
190
232
  };
191
233
  properties: {
234
+ filter: {
235
+ type: string;
236
+ title: string;
237
+ 'x-action': string;
238
+ 'x-component': string;
239
+ 'x-use-component-props': string;
240
+ 'x-component-props': {
241
+ icon: string;
242
+ nonfilterable: string[];
243
+ };
244
+ 'x-align': string;
245
+ default: {
246
+ $and: {
247
+ status: {
248
+ $eq: any;
249
+ };
250
+ }[];
251
+ };
252
+ };
192
253
  refresher: {
193
254
  type: string;
194
255
  title: string;
@@ -16,9 +16,22 @@ declare function useVariables(config: any, options: any): import("../variable").
16
16
  export default class extends Trigger {
17
17
  title: string;
18
18
  description: string;
19
+ presetFieldset: {
20
+ collection: {
21
+ 'x-component-props': {
22
+ dataSourceFilter(item: any): any;
23
+ };
24
+ type: string;
25
+ title: string;
26
+ required: boolean;
27
+ 'x-reactions': any[];
28
+ 'x-decorator': string;
29
+ 'x-component': string;
30
+ };
31
+ };
19
32
  fieldset: {
20
33
  collection: {
21
- 'x-disabled': string;
34
+ 'x-disabled': boolean;
22
35
  'x-component-props': {
23
36
  dataSourceFilter(item: any): any;
24
37
  };
@@ -16,6 +16,10 @@ export declare abstract class Trigger {
16
16
  description?: string;
17
17
  useVariables?(config: Record<string, any>, options?: UseVariableOptions): VariableOption[];
18
18
  fieldset: Record<string, ISchema>;
19
+ /**
20
+ * @experimental
21
+ */
22
+ presetFieldset?: Record<string, ISchema>;
19
23
  triggerFieldset?: Record<string, ISchema>;
20
24
  validate(config: Record<string, any>): boolean;
21
25
  view?: ISchema;
@@ -10,3 +10,7 @@ export declare const SCHEDULE_MODE: {
10
10
  STATIC: number;
11
11
  DATE_FIELD: number;
12
12
  };
13
+ export declare const scheduleModeOptions: {
14
+ value: number;
15
+ label: string;
16
+ }[];
@@ -18,6 +18,21 @@ export default class extends Trigger {
18
18
  sync: boolean;
19
19
  title: string;
20
20
  description: string;
21
+ presetFieldset: {
22
+ mode: {
23
+ type: string;
24
+ title: string;
25
+ name: string;
26
+ 'x-decorator': string;
27
+ 'x-component': string;
28
+ enum: {
29
+ value: number;
30
+ label: string;
31
+ }[];
32
+ required: boolean;
33
+ default: number;
34
+ };
35
+ };
21
36
  fieldset: {
22
37
  config: {
23
38
  type: string;
@@ -6,7 +6,24 @@
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
+ import type { BranchContextValue } from './BranchContext';
9
10
  export declare function linkNodes(nodes: any): void;
10
11
  export declare function traverseSchema(schema: any, fn: any): void;
11
12
  export declare function getWorkflowDetailPath(id: string | number): string;
12
13
  export declare function getWorkflowExecutionsPath(id: string | number): string;
14
+ type WorkflowCapabilityContext = {
15
+ engine: {
16
+ isWorkflowSync(workflow: any): boolean;
17
+ };
18
+ workflow: any;
19
+ upstream: any;
20
+ branchIndex: number | null;
21
+ syncOnly?: boolean;
22
+ branchContext?: Pick<BranchContextValue, 'syncOnly'> | null;
23
+ };
24
+ type AvailableInstruction = {
25
+ async?: boolean;
26
+ isAvailable?(ctx: WorkflowCapabilityContext): boolean;
27
+ };
28
+ export declare function getInstructionAvailable(instruction: AvailableInstruction, ctx: WorkflowCapabilityContext): string;
29
+ export {};
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  };
13
13
  migrationRules: string[];
14
14
  name: string;
15
+ dataCategory: string;
15
16
  shared: boolean;
16
17
  fields: ({
17
18
  type: string;
@@ -35,6 +36,28 @@ declare const _default: {
35
36
  unique?: undefined;
36
37
  onDelete?: undefined;
37
38
  defaultValue?: undefined;
39
+ } | {
40
+ type: string;
41
+ name: string;
42
+ interface: string;
43
+ uiSchema: {
44
+ type: string;
45
+ title: string;
46
+ 'x-component': string;
47
+ 'x-component-props': {
48
+ fieldNames?: undefined;
49
+ };
50
+ 'x-read-pretty': boolean;
51
+ 'x-decorator'?: undefined;
52
+ enum?: undefined;
53
+ };
54
+ primaryKey?: undefined;
55
+ allowNull?: undefined;
56
+ target?: undefined;
57
+ foreignKey?: undefined;
58
+ unique?: undefined;
59
+ onDelete?: undefined;
60
+ defaultValue?: undefined;
38
61
  } | {
39
62
  type: string;
40
63
  name: string;
@@ -116,6 +139,26 @@ declare const _default: {
116
139
  unique?: undefined;
117
140
  onDelete?: undefined;
118
141
  defaultValue?: undefined;
142
+ } | {
143
+ type: string;
144
+ name: string;
145
+ uiSchema: {
146
+ title: string;
147
+ type: string;
148
+ 'x-component': string;
149
+ 'x-decorator': string;
150
+ enum: string;
151
+ 'x-component-props'?: undefined;
152
+ 'x-read-pretty'?: undefined;
153
+ };
154
+ interface?: undefined;
155
+ primaryKey?: undefined;
156
+ allowNull?: undefined;
157
+ target?: undefined;
158
+ foreignKey?: undefined;
159
+ unique?: undefined;
160
+ onDelete?: undefined;
161
+ defaultValue?: undefined;
119
162
  } | {
120
163
  type: string;
121
164
  name: string;
@@ -131,7 +174,6 @@ declare const _default: {
131
174
  } | {
132
175
  type: string;
133
176
  name: string;
134
- interface: string;
135
177
  uiSchema: {
136
178
  type: string;
137
179
  title: string;
@@ -143,6 +185,7 @@ declare const _default: {
143
185
  'x-decorator'?: undefined;
144
186
  enum?: undefined;
145
187
  };
188
+ interface?: undefined;
146
189
  primaryKey?: undefined;
147
190
  allowNull?: undefined;
148
191
  target?: undefined;
@@ -36,6 +36,7 @@ var executions_default = {
36
36
  },
37
37
  migrationRules: ["schema-only"],
38
38
  name: "executions",
39
+ dataCategory: "business",
39
40
  shared: true,
40
41
  fields: [
41
42
  {
@@ -52,6 +53,18 @@ var executions_default = {
52
53
  primaryKey: true,
53
54
  allowNull: false
54
55
  },
56
+ {
57
+ type: "bigInt",
58
+ name: "workflowId",
59
+ interface: "id",
60
+ uiSchema: {
61
+ type: "number",
62
+ title: `{{t("Version ID", { ns: "${import_constants.NAMESPACE}" })}}`,
63
+ "x-component": "InputNumber",
64
+ "x-component-props": {},
65
+ "x-read-pretty": true
66
+ }
67
+ },
55
68
  {
56
69
  type: "belongsTo",
57
70
  name: "workflow",
@@ -101,11 +114,34 @@ var executions_default = {
101
114
  enum: "{{ExecutionStatusOptions}}"
102
115
  }
103
116
  },
117
+ {
118
+ type: "string",
119
+ name: "reason",
120
+ uiSchema: {
121
+ title: `{{t("Reason", { ns: "${import_constants.NAMESPACE}" })}}`,
122
+ type: "string",
123
+ "x-component": "Select",
124
+ "x-decorator": "FormItem",
125
+ enum: "{{ExecutionReasonOptions}}"
126
+ }
127
+ },
104
128
  {
105
129
  type: "boolean",
106
130
  name: "dispatched",
107
131
  defaultValue: false
108
132
  },
133
+ {
134
+ type: "bigInt",
135
+ name: "parentExecutionId",
136
+ interface: "id",
137
+ uiSchema: {
138
+ type: "number",
139
+ title: `{{t("Parent execution ID", { ns: "${import_constants.NAMESPACE}" })}}`,
140
+ "x-component": "InputNumber",
141
+ "x-component-props": {},
142
+ "x-read-pretty": true
143
+ }
144
+ },
109
145
  {
110
146
  type: "json",
111
147
  name: "stack"
@@ -114,6 +150,28 @@ var executions_default = {
114
150
  type: "json",
115
151
  name: "output"
116
152
  },
153
+ {
154
+ type: "datetime",
155
+ name: "startedAt",
156
+ uiSchema: {
157
+ type: "datetime",
158
+ title: `{{t("Started at", { ns: "${import_constants.NAMESPACE}" })}}`,
159
+ "x-component": "DatePicker",
160
+ "x-component-props": {},
161
+ "x-read-pretty": true
162
+ }
163
+ },
164
+ {
165
+ type: "datetime",
166
+ name: "expiresAt",
167
+ uiSchema: {
168
+ type: "datetime",
169
+ title: `{{t("Expires at", { ns: "${import_constants.NAMESPACE}" })}}`,
170
+ "x-component": "DatePicker",
171
+ "x-component-props": {},
172
+ "x-read-pretty": true
173
+ }
174
+ },
117
175
  {
118
176
  type: "datetime",
119
177
  name: "createdAt",
@@ -139,5 +197,9 @@ var executions_default = {
139
197
  }
140
198
  }
141
199
  ],
142
- indexes: [{ fields: ["dispatched", "id"] }]
200
+ indexes: [
201
+ { fields: ["dispatched", "id"] },
202
+ { fields: ["status", "expiresAt"] },
203
+ { fields: ["parentExecutionId", "status"] }
204
+ ]
143
205
  };
@@ -10,6 +10,7 @@ declare const _default: {
10
10
  dumpRules: string;
11
11
  migrationRules: string[];
12
12
  name: string;
13
+ dataCategory: string;
13
14
  shared: boolean;
14
15
  fields: ({
15
16
  name: string;
@@ -33,6 +33,7 @@ var flow_nodes_default = {
33
33
  dumpRules: "required",
34
34
  migrationRules: ["overwrite", "schema-only"],
35
35
  name: "flow_nodes",
36
+ dataCategory: "system",
36
37
  shared: true,
37
38
  fields: [
38
39
  {
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  };
13
13
  migrationRules: string[];
14
14
  name: string;
15
+ dataCategory: string;
15
16
  shared: boolean;
16
17
  autoGenId: boolean;
17
18
  fields: ({
@@ -35,6 +35,7 @@ var jobs_default = {
35
35
  },
36
36
  migrationRules: ["schema-only"],
37
37
  name: "jobs",
38
+ dataCategory: "business",
38
39
  shared: true,
39
40
  autoGenId: false,
40
41
  fields: [
@@ -77,6 +78,13 @@ var jobs_default = {
77
78
  {
78
79
  type: "json",
79
80
  name: "meta"
81
+ },
82
+ /**
83
+ * @experimental
84
+ */
85
+ {
86
+ type: "text",
87
+ name: "log"
80
88
  }
81
89
  ]
82
90
  };
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  };
13
13
  migrationRules: string[];
14
14
  name: string;
15
+ dataCategory: string;
15
16
  shared: boolean;
16
17
  fields: ({
17
18
  name: string;
@@ -35,6 +35,7 @@ var userWorkflowTasks_default = {
35
35
  },
36
36
  migrationRules: ["schema-only"],
37
37
  name: "userWorkflowTasks",
38
+ dataCategory: "business",
38
39
  shared: true,
39
40
  fields: [
40
41
  {
@@ -10,6 +10,7 @@ declare const _default: {
10
10
  dumpRules: string;
11
11
  migrationRules: string[];
12
12
  name: string;
13
+ dataCategory: string;
13
14
  shared: boolean;
14
15
  fields: ({
15
16
  name: string;
@@ -33,6 +33,7 @@ var workflowCategories_default = {
33
33
  dumpRules: "required",
34
34
  migrationRules: ["overwrite", "schema-only"],
35
35
  name: "workflowCategories",
36
+ dataCategory: "business",
36
37
  shared: true,
37
38
  fields: [
38
39
  {
@@ -10,6 +10,7 @@ declare const _default: {
10
10
  dumpRules: string;
11
11
  migrationRules: string[];
12
12
  name: string;
13
+ dataCategory: string;
13
14
  shared: boolean;
14
15
  fields: {
15
16
  type: string;
@@ -33,6 +33,7 @@ var workflowCategoryRelations_default = {
33
33
  dumpRules: "required",
34
34
  migrationRules: ["overwrite", "schema-only"],
35
35
  name: "workflowCategoryRelations",
36
+ dataCategory: "business",
36
37
  shared: true,
37
38
  fields: [
38
39
  {
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  };
13
13
  migrationRules: string[];
14
14
  name: string;
15
+ dataCategory: string;
15
16
  shared: boolean;
16
17
  autoGenId: boolean;
17
18
  fields: ({
@@ -36,6 +36,7 @@ var workflowStats_default = {
36
36
  },
37
37
  migrationRules: ["schema-only"],
38
38
  name: "workflowStats",
39
+ dataCategory: "business",
39
40
  shared: true,
40
41
  autoGenId: false,
41
42
  fields: [
@@ -34,6 +34,7 @@ function workflowTasks_default() {
34
34
  dumpRules: "required",
35
35
  migrationRules: ["overwrite", "schema-only"],
36
36
  name: "workflowTasks",
37
+ dataCategory: "business",
37
38
  shared: true,
38
39
  repository: "WorkflowTasksRepository",
39
40
  fields: [
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  };
13
13
  migrationRules: string[];
14
14
  name: string;
15
+ dataCategory: string;
15
16
  shared: boolean;
16
17
  autoGenId: boolean;
17
18
  fields: ({
@@ -36,6 +36,7 @@ var workflowVersionStats_default = {
36
36
  },
37
37
  migrationRules: ["schema-only"],
38
38
  name: "workflowVersionStats",
39
+ dataCategory: "business",
39
40
  shared: true,
40
41
  autoGenId: false,
41
42
  fields: [