@nocobase/plugin-workflow 2.1.0-alpha.1 → 2.1.0-alpha.10
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.
- package/LICENSE +201 -661
- package/README.md +79 -10
- package/dist/client/0e7da88f89e15485.js +10 -0
- package/dist/client/37560b46d530bcf9.js +10 -0
- package/dist/client/4464fed3a8411375.js +10 -0
- package/dist/client/973723cf75f1e4e9.js +10 -0
- package/dist/client/AddNodeContext.d.ts +1 -0
- package/dist/client/NodeClipboardContext.d.ts +11 -0
- package/dist/client/NodeDragContext.d.ts +11 -0
- package/dist/client/hooks/{useWorkflowFilterActionProps.d.ts → useResourceFilterActionProps.d.ts} +1 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +1 -1
- package/dist/client/models/NodeDetailsGridModel.d.ts +13 -0
- package/dist/client/models/NodeDetailsModel.d.ts +34 -0
- package/dist/client/models/NodeValueModel.d.ts +15 -0
- package/dist/client/models/TaskCardCommonItemModel.d.ts +14 -0
- package/dist/client/models/index.d.ts +11 -0
- package/dist/client/nodeVariableUtils.d.ts +14 -0
- package/dist/client/nodes/calculation.d.ts +7 -0
- package/dist/client/nodes/create.d.ts +13 -0
- package/dist/client/nodes/index.d.ts +24 -0
- package/dist/client/nodes/output.d.ts +53 -0
- package/dist/client/nodes/query.d.ts +13 -0
- package/dist/client/nodes/update.d.ts +1 -0
- package/dist/client/schemas/executions.d.ts +41 -22
- package/dist/client/style.d.ts +4 -0
- package/dist/client/triggers/collection.d.ts +13 -0
- package/dist/client/triggers/index.d.ts +10 -0
- package/dist/client/triggers/schedule/index.d.ts +13 -0
- package/dist/common/collections/executions.d.ts +22 -22
- package/dist/common/collections/executions.js +12 -0
- package/dist/common/collections/jobs.js +4 -0
- package/dist/common/collections/workflows.d.ts +22 -9
- package/dist/common/collections/workflows.js +9 -1
- package/dist/externalVersion.js +12 -12
- package/dist/locale/de-DE.json +10 -3
- package/dist/locale/en-US.json +22 -3
- package/dist/locale/es-ES.json +10 -3
- package/dist/locale/fr-FR.json +10 -3
- package/dist/locale/hu-HU.json +10 -2
- package/dist/locale/id-ID.json +10 -2
- package/dist/locale/it-IT.json +10 -3
- package/dist/locale/ja-JP.json +10 -5
- package/dist/locale/ko-KR.json +10 -3
- package/dist/locale/nl-NL.json +10 -3
- package/dist/locale/pt-BR.json +10 -3
- package/dist/locale/ru-RU.json +10 -3
- package/dist/locale/tr-TR.json +10 -3
- package/dist/locale/uk-UA.json +10 -3
- package/dist/locale/vi-VN.json +10 -2
- package/dist/locale/zh-CN.json +27 -5
- package/dist/locale/zh-TW.json +10 -3
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/server/Dispatcher.d.ts +3 -2
- package/dist/server/Dispatcher.js +76 -62
- package/dist/server/Plugin.js +6 -1
- package/dist/server/Processor.d.ts +9 -0
- package/dist/server/Processor.js +6 -1
- package/dist/server/actions/index.js +2 -0
- package/dist/server/actions/nodes.d.ts +2 -0
- package/dist/server/actions/nodes.js +281 -2
- package/dist/server/instructions/ConditionInstruction.js +4 -1
- package/dist/server/instructions/OutputInstruction.d.ts +21 -0
- package/dist/server/instructions/OutputInstruction.js +54 -0
- package/dist/server/repositories/WorkflowRepository.js +2 -1
- package/dist/swagger/index.d.ts +814 -62
- package/dist/swagger/index.js +975 -205
- package/package.json +3 -3
- package/dist/client/27bd65abee87cafa.js +0 -10
- package/dist/client/80d4cd8911e03c27.js +0 -10
- package/dist/client/bfc2a351589613e1.js +0 -10
- 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;
|
|
@@ -107,5 +108,17 @@ export default class extends Instruction {
|
|
|
107
108
|
};
|
|
108
109
|
useVariables: typeof useVariables;
|
|
109
110
|
useInitializers(node: any): SchemaInitializerItemType | null;
|
|
111
|
+
/**
|
|
112
|
+
* 2.0
|
|
113
|
+
*/
|
|
114
|
+
getCreateModelMenuItem({ node }: {
|
|
115
|
+
node: any;
|
|
116
|
+
}): SubModelItem;
|
|
117
|
+
useTempAssociationSource(node: any): {
|
|
118
|
+
collection: any;
|
|
119
|
+
nodeId: any;
|
|
120
|
+
nodeKey: any;
|
|
121
|
+
nodeType: "node";
|
|
122
|
+
};
|
|
110
123
|
}
|
|
111
124
|
export {};
|
|
@@ -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;
|
|
@@ -232,5 +233,17 @@ export default class extends Instruction {
|
|
|
232
233
|
};
|
|
233
234
|
useVariables: typeof useVariables;
|
|
234
235
|
useInitializers(node: any): SchemaInitializerItemType | null;
|
|
236
|
+
/**
|
|
237
|
+
* 2.0
|
|
238
|
+
*/
|
|
239
|
+
getCreateModelMenuItem({ node }: {
|
|
240
|
+
node: any;
|
|
241
|
+
}): SubModelItem;
|
|
242
|
+
useTempAssociationSource(node: any): {
|
|
243
|
+
collection: any;
|
|
244
|
+
nodeId: any;
|
|
245
|
+
nodeKey: any;
|
|
246
|
+
nodeType: "node";
|
|
247
|
+
};
|
|
235
248
|
}
|
|
236
249
|
export {};
|
|
@@ -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;
|
package/dist/client/style.d.ts
CHANGED
|
@@ -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,6 +11,7 @@ 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;
|
|
@@ -134,5 +135,17 @@ export default class extends Trigger {
|
|
|
134
135
|
validate(values: any): any;
|
|
135
136
|
useVariables: typeof useVariables;
|
|
136
137
|
useInitializers(config: any): SchemaInitializerItemType | null;
|
|
138
|
+
/**
|
|
139
|
+
* 2.0
|
|
140
|
+
*/
|
|
141
|
+
getCreateModelMenuItem({ config }: {
|
|
142
|
+
config: any;
|
|
143
|
+
}): SubModelItem;
|
|
144
|
+
useTempAssociationSource(config: any, workflow: any): {
|
|
145
|
+
collection: any;
|
|
146
|
+
nodeId: any;
|
|
147
|
+
nodeKey: string;
|
|
148
|
+
nodeType: "workflow";
|
|
149
|
+
};
|
|
137
150
|
}
|
|
138
151
|
export {};
|
|
@@ -28,7 +28,17 @@ export declare abstract class Trigger {
|
|
|
28
28
|
useInitializers?(config: any): SchemaInitializerItemType | null;
|
|
29
29
|
initializers?: any;
|
|
30
30
|
isActionTriggerable_deprecated?: boolean | ((config: object, context?: object) => boolean);
|
|
31
|
+
/**
|
|
32
|
+
* @experimental
|
|
33
|
+
*/
|
|
34
|
+
useTempAssociationSource?(config: any, workflow: any): TriggerTempAssociationSource | null;
|
|
31
35
|
}
|
|
36
|
+
export type TriggerTempAssociationSource = {
|
|
37
|
+
collection: string;
|
|
38
|
+
nodeId: string | number;
|
|
39
|
+
nodeKey: string;
|
|
40
|
+
nodeType: 'workflow';
|
|
41
|
+
};
|
|
32
42
|
export declare const TriggerConfig: () => React.JSX.Element;
|
|
33
43
|
/**
|
|
34
44
|
* @experimental
|
|
@@ -12,6 +12,7 @@ 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;
|
|
@@ -42,5 +43,17 @@ export default class extends Trigger {
|
|
|
42
43
|
};
|
|
43
44
|
useVariables: typeof useVariables;
|
|
44
45
|
useInitializers(config: any): SchemaInitializerItemType | null;
|
|
46
|
+
/**
|
|
47
|
+
* 2.0
|
|
48
|
+
*/
|
|
49
|
+
getCreateModelMenuItem({ config }: {
|
|
50
|
+
config: any;
|
|
51
|
+
}): SubModelItem | null;
|
|
52
|
+
useTempAssociationSource(config: any, workflow: any): {
|
|
53
|
+
collection: any;
|
|
54
|
+
nodeId: any;
|
|
55
|
+
nodeKey: string;
|
|
56
|
+
nodeType: "workflow";
|
|
57
|
+
};
|
|
45
58
|
}
|
|
46
59
|
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",
|
|
@@ -17,8 +17,21 @@ declare const _default: {
|
|
|
17
17
|
type: string;
|
|
18
18
|
primaryKey: boolean;
|
|
19
19
|
allowNull: boolean;
|
|
20
|
-
interface
|
|
21
|
-
uiSchema
|
|
20
|
+
interface: string;
|
|
21
|
+
uiSchema: {
|
|
22
|
+
type: string;
|
|
23
|
+
title: string;
|
|
24
|
+
'x-component': string;
|
|
25
|
+
'x-component-props': {
|
|
26
|
+
multiple?: undefined;
|
|
27
|
+
fieldNames?: undefined;
|
|
28
|
+
mode?: undefined;
|
|
29
|
+
};
|
|
30
|
+
'x-read-pretty': boolean;
|
|
31
|
+
required?: undefined;
|
|
32
|
+
enum?: undefined;
|
|
33
|
+
default?: undefined;
|
|
34
|
+
};
|
|
22
35
|
defaultValue?: undefined;
|
|
23
36
|
required?: undefined;
|
|
24
37
|
target?: undefined;
|
|
@@ -53,10 +66,10 @@ declare const _default: {
|
|
|
53
66
|
type: string;
|
|
54
67
|
'x-component': string;
|
|
55
68
|
required: boolean;
|
|
56
|
-
enum?: undefined;
|
|
57
|
-
default?: undefined;
|
|
58
69
|
'x-component-props'?: undefined;
|
|
59
70
|
'x-read-pretty'?: undefined;
|
|
71
|
+
enum?: undefined;
|
|
72
|
+
default?: undefined;
|
|
60
73
|
};
|
|
61
74
|
primaryKey?: undefined;
|
|
62
75
|
allowNull?: undefined;
|
|
@@ -88,9 +101,9 @@ declare const _default: {
|
|
|
88
101
|
})[];
|
|
89
102
|
'x-component': string;
|
|
90
103
|
default: boolean;
|
|
91
|
-
required?: undefined;
|
|
92
104
|
'x-component-props'?: undefined;
|
|
93
105
|
'x-read-pretty'?: undefined;
|
|
106
|
+
required?: undefined;
|
|
94
107
|
};
|
|
95
108
|
primaryKey?: undefined;
|
|
96
109
|
allowNull?: undefined;
|
|
@@ -110,11 +123,11 @@ declare const _default: {
|
|
|
110
123
|
title: string;
|
|
111
124
|
type: string;
|
|
112
125
|
'x-component': string;
|
|
126
|
+
'x-component-props'?: undefined;
|
|
127
|
+
'x-read-pretty'?: undefined;
|
|
113
128
|
required?: undefined;
|
|
114
129
|
enum?: undefined;
|
|
115
130
|
default?: undefined;
|
|
116
|
-
'x-component-props'?: undefined;
|
|
117
|
-
'x-read-pretty'?: undefined;
|
|
118
131
|
};
|
|
119
132
|
primaryKey?: undefined;
|
|
120
133
|
allowNull?: undefined;
|
|
@@ -138,9 +151,9 @@ declare const _default: {
|
|
|
138
151
|
'x-component': string;
|
|
139
152
|
enum: string;
|
|
140
153
|
required: boolean;
|
|
141
|
-
default?: undefined;
|
|
142
154
|
'x-component-props'?: undefined;
|
|
143
155
|
'x-read-pretty'?: undefined;
|
|
156
|
+
default?: undefined;
|
|
144
157
|
};
|
|
145
158
|
primaryKey?: undefined;
|
|
146
159
|
allowNull?: undefined;
|
|
@@ -215,9 +228,9 @@ declare const _default: {
|
|
|
215
228
|
color: string;
|
|
216
229
|
}[];
|
|
217
230
|
required: boolean;
|
|
218
|
-
default?: undefined;
|
|
219
231
|
'x-component-props'?: undefined;
|
|
220
232
|
'x-read-pretty'?: undefined;
|
|
233
|
+
default?: undefined;
|
|
221
234
|
};
|
|
222
235
|
primaryKey?: undefined;
|
|
223
236
|
allowNull?: undefined;
|
|
@@ -41,7 +41,15 @@ var workflows_default = {
|
|
|
41
41
|
name: "id",
|
|
42
42
|
type: "snowflakeId",
|
|
43
43
|
primaryKey: true,
|
|
44
|
-
allowNull: false
|
|
44
|
+
allowNull: false,
|
|
45
|
+
interface: "id",
|
|
46
|
+
uiSchema: {
|
|
47
|
+
type: "number",
|
|
48
|
+
title: '{{t("ID")}}',
|
|
49
|
+
"x-component": "InputNumber",
|
|
50
|
+
"x-component-props": {},
|
|
51
|
+
"x-read-pretty": true
|
|
52
|
+
}
|
|
45
53
|
},
|
|
46
54
|
{
|
|
47
55
|
name: "key",
|