@nocobase/plugin-workflow 2.1.0-alpha.1 → 2.1.0-alpha.11

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 (136) hide show
  1. package/LICENSE +201 -661
  2. package/README.md +79 -10
  3. package/dist/client/93d3f3f8ced1c194.js +10 -0
  4. package/dist/client/AddNodeContext.d.ts +1 -0
  5. package/dist/client/NodeClipboardContext.d.ts +11 -0
  6. package/dist/client/NodeDragContext.d.ts +11 -0
  7. package/dist/client/c46a9a8d11a5be44.js +10 -0
  8. package/dist/client/cd221313681d6736.js +10 -0
  9. package/dist/client/e9463c8cd2a45481.js +10 -0
  10. package/dist/client/hooks/{useWorkflowFilterActionProps.d.ts → useResourceFilterActionProps.d.ts} +1 -1
  11. package/dist/client/index.d.ts +3 -0
  12. package/dist/client/index.js +1 -1
  13. package/dist/client/models/NodeDetailsGridModel.d.ts +13 -0
  14. package/dist/client/models/NodeDetailsModel.d.ts +34 -0
  15. package/dist/client/models/NodeValueModel.d.ts +15 -0
  16. package/dist/client/models/TaskCardCommonItemModel.d.ts +14 -0
  17. package/dist/client/models/index.d.ts +11 -0
  18. package/dist/client/nodeVariableUtils.d.ts +14 -0
  19. package/dist/client/nodes/calculation.d.ts +7 -0
  20. package/dist/client/nodes/create.d.ts +23 -0
  21. package/dist/client/nodes/destroy.d.ts +10 -0
  22. package/dist/client/nodes/index.d.ts +24 -0
  23. package/dist/client/nodes/output.d.ts +53 -0
  24. package/dist/client/nodes/query.d.ts +23 -0
  25. package/dist/client/nodes/update.d.ts +11 -0
  26. package/dist/client/schemas/executions.d.ts +41 -22
  27. package/dist/client/style.d.ts +4 -0
  28. package/dist/client/triggers/collection.d.ts +27 -1
  29. package/dist/client/triggers/index.d.ts +14 -0
  30. package/dist/client/triggers/schedule/constants.d.ts +4 -0
  31. package/dist/client/triggers/schedule/index.d.ts +28 -0
  32. package/dist/common/collections/executions.d.ts +22 -22
  33. package/dist/common/collections/executions.js +12 -0
  34. package/dist/common/collections/jobs.js +4 -0
  35. package/dist/common/collections/workflows.d.ts +22 -9
  36. package/dist/common/collections/workflows.js +9 -1
  37. package/dist/externalVersion.js +12 -12
  38. package/dist/locale/de-DE.json +10 -3
  39. package/dist/locale/en-US.json +22 -3
  40. package/dist/locale/es-ES.json +10 -3
  41. package/dist/locale/fr-FR.json +10 -3
  42. package/dist/locale/hu-HU.json +10 -2
  43. package/dist/locale/id-ID.json +10 -2
  44. package/dist/locale/it-IT.json +10 -3
  45. package/dist/locale/ja-JP.json +10 -5
  46. package/dist/locale/ko-KR.json +10 -3
  47. package/dist/locale/nl-NL.json +10 -3
  48. package/dist/locale/pt-BR.json +10 -3
  49. package/dist/locale/ru-RU.json +10 -3
  50. package/dist/locale/tr-TR.json +10 -3
  51. package/dist/locale/uk-UA.json +10 -3
  52. package/dist/locale/vi-VN.json +10 -2
  53. package/dist/locale/zh-CN.json +28 -5
  54. package/dist/locale/zh-TW.json +10 -3
  55. package/dist/node_modules/cron-parser/package.json +1 -1
  56. package/dist/node_modules/joi/dist/joi-browser.min.js +1 -0
  57. package/dist/node_modules/joi/lib/annotate.js +175 -0
  58. package/dist/node_modules/joi/lib/base.js +1069 -0
  59. package/dist/node_modules/joi/lib/cache.js +143 -0
  60. package/dist/node_modules/joi/lib/common.js +216 -0
  61. package/dist/node_modules/joi/lib/compile.js +283 -0
  62. package/dist/node_modules/joi/lib/errors.js +271 -0
  63. package/dist/node_modules/joi/lib/extend.js +312 -0
  64. package/dist/node_modules/joi/lib/index.d.ts +2365 -0
  65. package/dist/node_modules/joi/lib/index.js +1 -0
  66. package/dist/node_modules/joi/lib/manifest.js +476 -0
  67. package/dist/node_modules/joi/lib/messages.js +178 -0
  68. package/dist/node_modules/joi/lib/modify.js +267 -0
  69. package/dist/node_modules/joi/lib/ref.js +414 -0
  70. package/dist/node_modules/joi/lib/schemas.js +302 -0
  71. package/dist/node_modules/joi/lib/state.js +166 -0
  72. package/dist/node_modules/joi/lib/template.js +463 -0
  73. package/dist/node_modules/joi/lib/trace.js +346 -0
  74. package/dist/node_modules/joi/lib/types/alternatives.js +364 -0
  75. package/dist/node_modules/joi/lib/types/any.js +174 -0
  76. package/dist/node_modules/joi/lib/types/array.js +809 -0
  77. package/dist/node_modules/joi/lib/types/binary.js +100 -0
  78. package/dist/node_modules/joi/lib/types/boolean.js +150 -0
  79. package/dist/node_modules/joi/lib/types/date.js +233 -0
  80. package/dist/node_modules/joi/lib/types/function.js +93 -0
  81. package/dist/node_modules/joi/lib/types/keys.js +1067 -0
  82. package/dist/node_modules/joi/lib/types/link.js +168 -0
  83. package/dist/node_modules/joi/lib/types/number.js +363 -0
  84. package/dist/node_modules/joi/lib/types/object.js +22 -0
  85. package/dist/node_modules/joi/lib/types/string.js +850 -0
  86. package/dist/node_modules/joi/lib/types/symbol.js +102 -0
  87. package/dist/node_modules/joi/lib/validator.js +750 -0
  88. package/dist/node_modules/joi/lib/values.js +263 -0
  89. package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.d.ts +60 -0
  90. package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.js +225 -0
  91. package/dist/node_modules/joi/node_modules/@hapi/topo/package.json +30 -0
  92. package/dist/node_modules/joi/package.json +1 -0
  93. package/dist/node_modules/lru-cache/package.json +1 -1
  94. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  95. package/dist/server/Dispatcher.d.ts +3 -2
  96. package/dist/server/Dispatcher.js +76 -62
  97. package/dist/server/Plugin.d.ts +1 -0
  98. package/dist/server/Plugin.js +32 -1
  99. package/dist/server/Processor.d.ts +9 -0
  100. package/dist/server/Processor.js +6 -1
  101. package/dist/server/actions/index.js +2 -0
  102. package/dist/server/actions/nodes.d.ts +7 -0
  103. package/dist/server/actions/nodes.js +315 -4
  104. package/dist/server/actions/workflows.d.ts +6 -0
  105. package/dist/server/actions/workflows.js +38 -0
  106. package/dist/server/instructions/ConditionInstruction.js +4 -1
  107. package/dist/server/instructions/CreateInstruction.d.ts +3 -0
  108. package/dist/server/instructions/CreateInstruction.js +21 -0
  109. package/dist/server/instructions/DestroyInstruction.d.ts +3 -0
  110. package/dist/server/instructions/DestroyInstruction.js +22 -0
  111. package/dist/server/instructions/EndInstruction.d.ts +2 -0
  112. package/dist/server/instructions/EndInstruction.js +4 -0
  113. package/dist/server/instructions/OutputInstruction.d.ts +21 -0
  114. package/dist/server/instructions/OutputInstruction.js +54 -0
  115. package/dist/server/instructions/QueryInstruction.d.ts +3 -0
  116. package/dist/server/instructions/QueryInstruction.js +21 -0
  117. package/dist/server/instructions/UpdateInstruction.d.ts +3 -0
  118. package/dist/server/instructions/UpdateInstruction.js +22 -0
  119. package/dist/server/instructions/index.d.ts +4 -0
  120. package/dist/server/instructions/index.js +18 -0
  121. package/dist/server/repositories/WorkflowRepository.js +2 -1
  122. package/dist/server/triggers/CollectionTrigger.d.ts +3 -0
  123. package/dist/server/triggers/CollectionTrigger.js +23 -0
  124. package/dist/server/triggers/ScheduleTrigger/index.d.ts +3 -0
  125. package/dist/server/triggers/ScheduleTrigger/index.js +18 -3
  126. package/dist/server/triggers/index.d.ts +3 -0
  127. package/dist/server/triggers/index.js +18 -0
  128. package/dist/server/utils.d.ts +2 -0
  129. package/dist/server/utils.js +22 -2
  130. package/dist/swagger/index.d.ts +814 -62
  131. package/dist/swagger/index.js +975 -205
  132. package/package.json +4 -3
  133. package/dist/client/27bd65abee87cafa.js +0 -10
  134. package/dist/client/80d4cd8911e03c27.js +0 -10
  135. package/dist/client/bfc2a351589613e1.js +0 -10
  136. package/dist/client/e078314a62391f36.js +0 -10
@@ -0,0 +1,13 @@
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 { DetailsGridModel } from '@nocobase/client';
10
+ import React from 'react';
11
+ export declare class NodeDetailsGridModel extends DetailsGridModel {
12
+ renderAddSubModelButton(): React.JSX.Element;
13
+ }
@@ -0,0 +1,34 @@
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 { BlockGridModel, CollectionBlockModel, DetailsGridModel } from '@nocobase/client';
10
+ import { SingleRecordResource } from '@nocobase/flow-engine';
11
+ import React from 'react';
12
+ export declare class NodeDetailsModel extends CollectionBlockModel<{
13
+ parent?: BlockGridModel;
14
+ subModels?: {
15
+ grid: DetailsGridModel;
16
+ };
17
+ }> {
18
+ isManualRefresh: boolean;
19
+ _defaultCustomModelClasses: {
20
+ RecordActionGroupModel: string;
21
+ DetailsItemModel: string;
22
+ DetailsAssociationFieldGroupModel: string;
23
+ DetailsCustomItemModel: string;
24
+ };
25
+ customModelClasses: {};
26
+ get dataSourceKey(): any;
27
+ get collectionName(): any;
28
+ get collection(): import("@nocobase/flow-engine").Collection;
29
+ get dataPath(): any;
30
+ createResource(ctx: any, params: any): SingleRecordResource<unknown>;
31
+ onInit(options: any): void;
32
+ getCurrentRecord(): any;
33
+ renderComponent(): React.JSX.Element;
34
+ }
@@ -0,0 +1,15 @@
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 { BlockModel } from '@nocobase/client';
10
+ export declare class NodeValueModel extends BlockModel {
11
+ get execution(): any;
12
+ get dataSource(): any;
13
+ get defaultValue(): any;
14
+ renderComponent(): any;
15
+ }
@@ -0,0 +1,14 @@
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 { DetailsCustomItemModel } from '@nocobase/client';
10
+ import { FlowModelContext, ModelRenderMode, SubModelItem } from '@nocobase/flow-engine';
11
+ export declare class TaskCardCommonItemModel extends DetailsCustomItemModel {
12
+ static renderMode: ModelRenderMode;
13
+ static defineChildren(ctx: FlowModelContext): Promise<SubModelItem[]> | SubModelItem[];
14
+ }
@@ -0,0 +1,11 @@
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
+ export { NodeDetailsModel } from './NodeDetailsModel';
10
+ export { NodeValueModel } from './NodeValueModel';
11
+ export { TaskCardCommonItemModel } from './TaskCardCommonItemModel';
@@ -0,0 +1,14 @@
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
+ export declare function extractDependencyKeys(config: Record<string, any>): Set<string>;
10
+ export declare function stripVariableReferences(value: any, keysToRemove: Set<string>): {
11
+ value: any;
12
+ changed: boolean;
13
+ };
14
+ export declare function collectUpstreams(node: any): Set<number>;
@@ -11,6 +11,7 @@ import { SchemaInitializerItemType } from '@nocobase/client';
11
11
  import { RadioWithTooltip } from '../components/RadioWithTooltip';
12
12
  import { WorkflowVariableTextArea } from '../variable';
13
13
  import { Instruction } from '.';
14
+ import { SubModelItem } from '@nocobase/flow-engine';
14
15
  export default class extends Instruction {
15
16
  title: string;
16
17
  type: string;
@@ -78,5 +79,11 @@ export default class extends Instruction {
78
79
  label: any;
79
80
  };
80
81
  useInitializers(node: any): SchemaInitializerItemType;
82
+ /**
83
+ * 2.0
84
+ */
85
+ getCreateModelMenuItem({ node }: {
86
+ node: any;
87
+ }): SubModelItem;
81
88
  testable: boolean;
82
89
  }
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
11
11
  import { AssignedFieldsFormSchemaConfig } from '../components/AssignedFieldsFormSchemaConfig';
12
12
  import { Instruction, useNodeSavedConfig } from '.';
13
+ import { SubModelItem } from '@nocobase/flow-engine';
13
14
  declare function useVariables({ key: name, title, config }: {
14
15
  key: any;
15
16
  title: any;
@@ -21,6 +22,16 @@ export default class extends Instruction {
21
22
  group: string;
22
23
  description: string;
23
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
+ };
24
35
  fieldset: {
25
36
  collection: {
26
37
  'x-disabled': string;
@@ -107,5 +118,17 @@ export default class extends Instruction {
107
118
  };
108
119
  useVariables: typeof useVariables;
109
120
  useInitializers(node: any): SchemaInitializerItemType | null;
121
+ /**
122
+ * 2.0
123
+ */
124
+ getCreateModelMenuItem({ node }: {
125
+ node: any;
126
+ }): SubModelItem;
127
+ useTempAssociationSource(node: any): {
128
+ collection: any;
129
+ nodeId: any;
130
+ nodeKey: any;
131
+ nodeType: "node";
132
+ };
110
133
  }
111
134
  export {};
@@ -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;
@@ -11,6 +11,7 @@ import React from 'react';
11
11
  import { SchemaInitializerItemType } from '@nocobase/client';
12
12
  import WorkflowPlugin from '..';
13
13
  import { UseVariableOptions, VariableOption } from '../variable';
14
+ import { SubModelItem } from '@nocobase/flow-engine';
14
15
  export type NodeAvailableContext = {
15
16
  engine: WorkflowPlugin;
16
17
  workflow: object;
@@ -66,7 +67,30 @@ export declare abstract class Instruction {
66
67
  isAvailable?(ctx: NodeAvailableContext): boolean;
67
68
  end?: boolean | ((node: any) => boolean);
68
69
  testable?: boolean;
70
+ /**
71
+ * 2.0
72
+ */
73
+ getCreateModelMenuItem?({ node, workflow }: {
74
+ node: any;
75
+ workflow: any;
76
+ }): SubModelItem | null;
77
+ /**
78
+ * @experimental
79
+ */
80
+ useTempAssociationSource?(node: any): TempAssociationSource | null;
69
81
  }
82
+ export type TempAssociationSource = {
83
+ collection: string;
84
+ nodeId: string | number;
85
+ nodeKey: string;
86
+ nodeType: 'workflow' | 'node';
87
+ };
88
+ export declare function updateNodeConfig({ api, nodeId, config, resourceName }: {
89
+ api: any;
90
+ nodeId: any;
91
+ config: any;
92
+ resourceName?: string;
93
+ }): Promise<void>;
70
94
  export declare const NodeContext: React.Context<any>;
71
95
  export declare function useNodeContext(): any;
72
96
  export declare function useNodeSavedConfig(keys?: any[]): boolean;
@@ -0,0 +1,53 @@
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 React from 'react';
10
+ import { Instruction } from '.';
11
+ import { WorkflowVariableInput } from '../variable';
12
+ export default class extends Instruction {
13
+ title: string;
14
+ type: string;
15
+ group: string;
16
+ description: string;
17
+ icon: React.JSX.Element;
18
+ fieldset: {
19
+ value: {
20
+ type: string;
21
+ 'x-decorator': string;
22
+ 'x-component': string;
23
+ 'x-component-props': {
24
+ changeOnSelect: boolean;
25
+ useTypedConstant: boolean;
26
+ nullable: boolean;
27
+ autoSize: {
28
+ minRows: number;
29
+ };
30
+ placeholder: string;
31
+ };
32
+ title: string;
33
+ };
34
+ };
35
+ scope: {};
36
+ components: {
37
+ ArrayItems: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
38
+ Item: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
39
+ type?: "divide" | "card";
40
+ }>;
41
+ };
42
+ WorkflowVariableInput: typeof WorkflowVariableInput;
43
+ };
44
+ useVariables({ key, title }: {
45
+ key: any;
46
+ title: any;
47
+ }, { types }: {
48
+ types: any;
49
+ }): {
50
+ value: any;
51
+ label: any;
52
+ };
53
+ }
@@ -12,6 +12,7 @@ import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
12
12
  import { WorkflowVariableInput } from '../variable';
13
13
  import { Instruction, useNodeSavedConfig } from '.';
14
14
  import { RadioWithTooltip } from '../components';
15
+ import { SubModelItem } from '@nocobase/flow-engine';
15
16
  declare function useVariables({ key: name, title, config }: {
16
17
  key: any;
17
18
  title: any;
@@ -23,6 +24,16 @@ export default class extends Instruction {
23
24
  group: string;
24
25
  description: string;
25
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
+ };
26
37
  fieldset: {
27
38
  collection: {
28
39
  'x-disabled': string;
@@ -232,5 +243,17 @@ export default class extends Instruction {
232
243
  };
233
244
  useVariables: typeof useVariables;
234
245
  useInitializers(node: any): SchemaInitializerItemType | null;
246
+ /**
247
+ * 2.0
248
+ */
249
+ getCreateModelMenuItem({ node }: {
250
+ node: any;
251
+ }): SubModelItem;
252
+ useTempAssociationSource(node: any): {
253
+ collection: any;
254
+ nodeId: any;
255
+ nodeKey: any;
256
+ nodeType: "node";
257
+ };
235
258
  }
236
259
  export {};
@@ -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;
@@ -112,4 +122,5 @@ export default class extends Instruction {
112
122
  AssignedFieldsFormSchemaConfig: typeof AssignedFieldsFormSchemaConfig;
113
123
  RadioWithTooltip: typeof RadioWithTooltip;
114
124
  };
125
+ useTempAssociationSource(node: any): any;
115
126
  }
@@ -46,6 +46,28 @@ export declare const executionSchema: {
46
46
  unique?: undefined;
47
47
  onDelete?: undefined;
48
48
  defaultValue?: undefined;
49
+ } | {
50
+ type: string;
51
+ name: string;
52
+ interface: string;
53
+ uiSchema: {
54
+ type: string;
55
+ title: string;
56
+ 'x-component': string;
57
+ 'x-component-props': {
58
+ fieldNames?: undefined;
59
+ };
60
+ 'x-read-pretty': boolean;
61
+ 'x-decorator'?: undefined;
62
+ enum?: undefined;
63
+ };
64
+ primaryKey?: undefined;
65
+ allowNull?: undefined;
66
+ target?: undefined;
67
+ foreignKey?: undefined;
68
+ unique?: undefined;
69
+ onDelete?: undefined;
70
+ defaultValue?: undefined;
49
71
  } | {
50
72
  type: string;
51
73
  name: string;
@@ -139,28 +161,6 @@ export declare const executionSchema: {
139
161
  foreignKey?: undefined;
140
162
  unique?: undefined;
141
163
  onDelete?: undefined;
142
- } | {
143
- type: string;
144
- name: string;
145
- interface: string;
146
- uiSchema: {
147
- type: string;
148
- title: string;
149
- 'x-component': string;
150
- 'x-component-props': {
151
- fieldNames?: undefined;
152
- };
153
- 'x-read-pretty': boolean;
154
- 'x-decorator'?: undefined;
155
- enum?: undefined;
156
- };
157
- primaryKey?: undefined;
158
- allowNull?: undefined;
159
- target?: undefined;
160
- foreignKey?: undefined;
161
- unique?: undefined;
162
- onDelete?: undefined;
163
- defaultValue?: undefined;
164
164
  })[];
165
165
  indexes: {
166
166
  fields: string[];
@@ -189,6 +189,25 @@ export declare const executionSchema: {
189
189
  };
190
190
  };
191
191
  properties: {
192
+ filter: {
193
+ type: string;
194
+ title: string;
195
+ 'x-action': string;
196
+ 'x-component': string;
197
+ 'x-use-component-props': string;
198
+ 'x-component-props': {
199
+ icon: string;
200
+ nonfilterable: string[];
201
+ };
202
+ 'x-align': string;
203
+ default: {
204
+ $and: {
205
+ status: {
206
+ $eq: any;
207
+ };
208
+ }[];
209
+ };
210
+ };
192
211
  refresher: {
193
212
  type: string;
194
213
  title: string;
@@ -23,6 +23,10 @@ declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<
23
23
  nodeSubtreeClass: import("antd-style").SerializedStyles;
24
24
  nodeJobResultClass: import("antd-style").SerializedStyles;
25
25
  addButtonClass: import("antd-style").SerializedStyles;
26
+ dropZoneClass: import("antd-style").SerializedStyles;
27
+ pasteButtonClass: import("antd-style").SerializedStyles;
28
+ dragPreviewClass: import("antd-style").SerializedStyles;
29
+ clipboardPreviewClass: import("antd-style").SerializedStyles;
26
30
  conditionClass: import("antd-style").SerializedStyles;
27
31
  loopLineClass: import("antd-style").SerializedStyles;
28
32
  terminalClass: import("antd-style").SerializedStyles;
@@ -11,13 +11,27 @@ import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/cl
11
11
  import { useWorkflowAnyExecuted } from '../hooks';
12
12
  import { Trigger } from '.';
13
13
  import { TriggerCollectionRecordSelect } from '../components/TriggerCollectionRecordSelect';
14
+ import { SubModelItem } from '@nocobase/flow-engine';
14
15
  declare function useVariables(config: any, options: any): import("../variable").VariableOption[];
15
16
  export default class extends Trigger {
16
17
  title: string;
17
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
+ };
18
32
  fieldset: {
19
33
  collection: {
20
- 'x-disabled': string;
34
+ 'x-disabled': boolean;
21
35
  'x-component-props': {
22
36
  dataSourceFilter(item: any): any;
23
37
  };
@@ -134,5 +148,17 @@ export default class extends Trigger {
134
148
  validate(values: any): any;
135
149
  useVariables: typeof useVariables;
136
150
  useInitializers(config: any): SchemaInitializerItemType | null;
151
+ /**
152
+ * 2.0
153
+ */
154
+ getCreateModelMenuItem({ config }: {
155
+ config: any;
156
+ }): SubModelItem;
157
+ useTempAssociationSource(config: any, workflow: any): {
158
+ collection: any;
159
+ nodeId: any;
160
+ nodeKey: string;
161
+ nodeType: "workflow";
162
+ };
137
163
  }
138
164
  export {};
@@ -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;
@@ -28,7 +32,17 @@ export declare abstract class Trigger {
28
32
  useInitializers?(config: any): SchemaInitializerItemType | null;
29
33
  initializers?: any;
30
34
  isActionTriggerable_deprecated?: boolean | ((config: object, context?: object) => boolean);
35
+ /**
36
+ * @experimental
37
+ */
38
+ useTempAssociationSource?(config: any, workflow: any): TriggerTempAssociationSource | null;
31
39
  }
40
+ export type TriggerTempAssociationSource = {
41
+ collection: string;
42
+ nodeId: string | number;
43
+ nodeKey: string;
44
+ nodeType: 'workflow';
45
+ };
32
46
  export declare const TriggerConfig: () => React.JSX.Element;
33
47
  /**
34
48
  * @experimental
@@ -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
+ }[];
@@ -12,11 +12,27 @@ import { Trigger } from '..';
12
12
  import { TriggerScheduleConfig } from './TriggerScheduleConfig';
13
13
  import { WorkflowVariableWrapper } from '../../variable';
14
14
  import { TriggerCollectionRecordSelect } from '../../components/TriggerCollectionRecordSelect';
15
+ import { SubModelItem } from '@nocobase/flow-engine';
15
16
  declare function useVariables(config: any, opts: any): any[];
16
17
  export default class extends Trigger {
17
18
  sync: boolean;
18
19
  title: string;
19
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
+ };
20
36
  fieldset: {
21
37
  config: {
22
38
  type: string;
@@ -42,5 +58,17 @@ export default class extends Trigger {
42
58
  };
43
59
  useVariables: typeof useVariables;
44
60
  useInitializers(config: any): SchemaInitializerItemType | null;
61
+ /**
62
+ * 2.0
63
+ */
64
+ getCreateModelMenuItem({ config }: {
65
+ config: any;
66
+ }): SubModelItem | null;
67
+ useTempAssociationSource(config: any, workflow: any): {
68
+ collection: any;
69
+ nodeId: any;
70
+ nodeKey: string;
71
+ nodeType: "workflow";
72
+ };
45
73
  }
46
74
  export {};
@@ -35,6 +35,28 @@ declare const _default: {
35
35
  unique?: undefined;
36
36
  onDelete?: undefined;
37
37
  defaultValue?: undefined;
38
+ } | {
39
+ type: string;
40
+ name: string;
41
+ interface: string;
42
+ uiSchema: {
43
+ type: string;
44
+ title: string;
45
+ 'x-component': string;
46
+ 'x-component-props': {
47
+ fieldNames?: undefined;
48
+ };
49
+ 'x-read-pretty': boolean;
50
+ 'x-decorator'?: undefined;
51
+ enum?: undefined;
52
+ };
53
+ primaryKey?: undefined;
54
+ allowNull?: undefined;
55
+ target?: undefined;
56
+ foreignKey?: undefined;
57
+ unique?: undefined;
58
+ onDelete?: undefined;
59
+ defaultValue?: undefined;
38
60
  } | {
39
61
  type: string;
40
62
  name: string;
@@ -128,28 +150,6 @@ declare const _default: {
128
150
  foreignKey?: undefined;
129
151
  unique?: undefined;
130
152
  onDelete?: undefined;
131
- } | {
132
- type: string;
133
- name: string;
134
- interface: string;
135
- uiSchema: {
136
- type: string;
137
- title: string;
138
- 'x-component': string;
139
- 'x-component-props': {
140
- fieldNames?: undefined;
141
- };
142
- 'x-read-pretty': boolean;
143
- 'x-decorator'?: undefined;
144
- enum?: undefined;
145
- };
146
- primaryKey?: undefined;
147
- allowNull?: undefined;
148
- target?: undefined;
149
- foreignKey?: undefined;
150
- unique?: undefined;
151
- onDelete?: undefined;
152
- defaultValue?: undefined;
153
153
  })[];
154
154
  indexes: {
155
155
  fields: string[];
@@ -52,6 +52,18 @@ var executions_default = {
52
52
  primaryKey: true,
53
53
  allowNull: false
54
54
  },
55
+ {
56
+ type: "bigInt",
57
+ name: "workflowId",
58
+ interface: "id",
59
+ uiSchema: {
60
+ type: "number",
61
+ title: `{{t("Version ID", { ns: "${import_constants.NAMESPACE}" })}}`,
62
+ "x-component": "InputNumber",
63
+ "x-component-props": {},
64
+ "x-read-pretty": true
65
+ }
66
+ },
55
67
  {
56
68
  type: "belongsTo",
57
69
  name: "workflow",
@@ -73,6 +73,10 @@ var jobs_default = {
73
73
  {
74
74
  type: "json",
75
75
  name: "result"
76
+ },
77
+ {
78
+ type: "json",
79
+ name: "meta"
76
80
  }
77
81
  ]
78
82
  };