@nocobase/plugin-flow-engine 2.1.0-beta.15 → 2.1.0-beta.17
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/dist/ai/ai-employees/nathan/index.d.ts +10 -0
- package/dist/ai/ai-employees/nathan/index.js +41 -0
- package/dist/ai/ai-employees/nathan/prompt.md +132 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +69 -0
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.js +2 -2
- package/dist/ai/docs/runjs/context/block-model.md +35 -35
- package/dist/ai/docs/runjs/context/collection-field.md +53 -51
- package/dist/ai/docs/runjs/context/collection.md +39 -39
- package/dist/ai/docs/runjs/context/data-source-manager.md +40 -30
- package/dist/ai/docs/runjs/context/data-source.md +52 -44
- package/dist/ai/docs/runjs/context/element.md +44 -38
- package/dist/ai/docs/runjs/context/exit-all.md +37 -35
- package/dist/ai/docs/runjs/context/exit.md +38 -35
- package/dist/ai/docs/runjs/context/filter-manager.md +36 -30
- package/dist/ai/docs/runjs/context/form.md +57 -57
- package/dist/ai/docs/runjs/context/get-model.md +22 -21
- package/dist/ai/docs/runjs/context/get-value.md +20 -19
- package/dist/ai/docs/runjs/context/get-var.md +61 -55
- package/dist/ai/docs/runjs/context/i18n.md +17 -14
- package/dist/ai/docs/runjs/context/import-async.md +333 -45
- package/dist/ai/docs/runjs/context/init-resource.md +20 -20
- package/dist/ai/docs/runjs/context/libs.md +31 -31
- package/dist/ai/docs/runjs/context/location.md +34 -31
- package/dist/ai/docs/runjs/context/logger.md +41 -40
- package/dist/ai/docs/runjs/context/make-resource.md +27 -26
- package/dist/ai/docs/runjs/context/message.md +42 -41
- package/dist/ai/docs/runjs/context/modal.md +44 -44
- package/dist/ai/docs/runjs/context/model.md +36 -33
- package/dist/ai/docs/runjs/context/notification.md +41 -40
- package/dist/ai/docs/runjs/context/off.md +14 -14
- package/dist/ai/docs/runjs/context/on.md +30 -29
- package/dist/ai/docs/runjs/context/open-view.md +40 -40
- package/dist/ai/docs/runjs/context/render.md +37 -32
- package/dist/ai/docs/runjs/context/request.md +46 -45
- package/dist/ai/docs/runjs/context/require-async.md +28 -25
- package/dist/ai/docs/runjs/context/resource.md +34 -34
- package/dist/ai/docs/runjs/context/route.md +36 -34
- package/dist/ai/docs/runjs/context/router.md +43 -31
- package/dist/ai/docs/runjs/context/set-value.md +18 -17
- package/dist/ai/docs/runjs/context/t.md +20 -17
- package/dist/ai/docs/runjs/context/view.md +49 -46
- package/dist/ai/docs/runjs/document.md +1 -0
- package/dist/ai/docs/runjs/import-modules.md +32 -32
- package/dist/ai/docs/runjs/index.md +13 -13
- package/dist/ai/docs/runjs/jsx.md +19 -19
- package/dist/ai/docs/runjs/model/form-block-model.md +1 -3
- package/dist/ai/docs/runjs/render.md +15 -15
- package/dist/ai/docs/runjs/resource/api-resource.md +53 -53
- package/dist/ai/docs/runjs/resource/multi-record-resource.md +64 -64
- package/dist/ai/docs/runjs/resource/single-record-resource.md +55 -55
- package/dist/ai/docs/runjs/resource/sql-resource.md +57 -57
- package/dist/ai/docs/runjs/window.md +5 -5
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +11 -10
- package/dist/node_modules/ses/dist/ses.cjs +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/index.cjs +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/action-scope.d.ts +38 -0
- package/dist/server/flow-surfaces/action-scope.js +152 -0
- package/dist/server/flow-surfaces/apply/compiler.d.ts +13 -0
- package/dist/server/flow-surfaces/apply/compiler.js +969 -0
- package/dist/server/flow-surfaces/apply/layout.d.ts +34 -0
- package/dist/server/flow-surfaces/apply/layout.js +175 -0
- package/dist/server/flow-surfaces/apply/matching.d.ts +16 -0
- package/dist/server/flow-surfaces/apply/matching.js +181 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.d.ts +84 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.js +589 -0
- package/dist/server/flow-surfaces/approval/blueprint.d.ts +21 -0
- package/dist/server/flow-surfaces/approval/blueprint.js +187 -0
- package/dist/server/flow-surfaces/approval/builder.d.ts +225 -0
- package/dist/server/flow-surfaces/approval/builder.js +384 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.d.ts +33 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.js +156 -0
- package/dist/server/flow-surfaces/approval/index.d.ts +14 -0
- package/dist/server/flow-surfaces/approval/index.js +40 -0
- package/dist/server/flow-surfaces/approval/runtime-config.d.ts +44 -0
- package/dist/server/flow-surfaces/approval/runtime-config.js +299 -0
- package/dist/server/flow-surfaces/approval/semantic-use.d.ts +23 -0
- package/dist/server/flow-surfaces/approval/semantic-use.js +155 -0
- package/dist/server/flow-surfaces/association-title-field.d.ts +20 -0
- package/dist/server/flow-surfaces/association-title-field.js +158 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.d.ts +14 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +1007 -0
- package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +13 -0
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +308 -0
- package/dist/server/flow-surfaces/blueprint/compile-reaction.d.ts +11 -0
- package/dist/server/flow-surfaces/blueprint/compile-reaction.js +72 -0
- package/dist/server/flow-surfaces/blueprint/defaults.d.ts +26 -0
- package/dist/server/flow-surfaces/blueprint/defaults.js +133 -0
- package/dist/server/flow-surfaces/blueprint/index.d.ts +12 -0
- package/dist/server/flow-surfaces/blueprint/index.js +44 -0
- package/dist/server/flow-surfaces/blueprint/normalize-document.d.ts +10 -0
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +416 -0
- package/dist/server/flow-surfaces/blueprint/private-utils.d.ts +26 -0
- package/dist/server/flow-surfaces/blueprint/private-utils.js +182 -0
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +193 -0
- package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
- package/dist/server/flow-surfaces/builder.d.ts +211 -0
- package/dist/server/flow-surfaces/builder.js +1029 -0
- package/dist/server/flow-surfaces/catalog-smart.d.ts +18 -0
- package/dist/server/flow-surfaces/catalog-smart.js +239 -0
- package/dist/server/flow-surfaces/catalog-smart.projector.d.ts +15 -0
- package/dist/server/flow-surfaces/catalog-smart.projector.js +157 -0
- package/dist/server/flow-surfaces/catalog-smart.types.d.ts +99 -0
- package/dist/server/flow-surfaces/catalog-smart.types.js +24 -0
- package/dist/server/flow-surfaces/catalog.d.ts +78 -0
- package/dist/server/flow-surfaces/catalog.js +3496 -0
- package/dist/server/flow-surfaces/chart-config.d.ts +121 -0
- package/dist/server/flow-surfaces/chart-config.js +1394 -0
- package/dist/server/flow-surfaces/compose-compiler.d.ts +108 -0
- package/dist/server/flow-surfaces/compose-compiler.js +167 -0
- package/dist/server/flow-surfaces/compose-runtime.d.ts +93 -0
- package/dist/server/flow-surfaces/compose-runtime.js +375 -0
- package/dist/server/flow-surfaces/configure-options.d.ts +23 -0
- package/dist/server/flow-surfaces/configure-options.js +827 -0
- package/dist/server/flow-surfaces/constants.d.ts +351 -0
- package/dist/server/flow-surfaces/constants.js +104 -0
- package/dist/server/flow-surfaces/context.d.ts +72 -0
- package/dist/server/flow-surfaces/context.js +556 -0
- package/dist/server/flow-surfaces/contract-guard.d.ts +19 -0
- package/dist/server/flow-surfaces/contract-guard.js +402 -0
- package/dist/server/flow-surfaces/default-action-popup.d.ts +63 -0
- package/dist/server/flow-surfaces/default-action-popup.js +322 -0
- package/dist/server/flow-surfaces/default-block-actions.d.ts +32 -0
- package/dist/server/flow-surfaces/default-block-actions.js +185 -0
- package/dist/server/flow-surfaces/errors.d.ts +47 -0
- package/dist/server/flow-surfaces/errors.js +145 -0
- package/dist/server/flow-surfaces/executor.d.ts +23 -0
- package/dist/server/flow-surfaces/executor.js +132 -0
- package/dist/server/flow-surfaces/field-binding-registry.d.ts +23 -0
- package/dist/server/flow-surfaces/field-binding-registry.js +391 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +15 -0
- package/dist/server/flow-surfaces/field-semantics.js +81 -0
- package/dist/server/flow-surfaces/filter-group.d.ts +15 -0
- package/dist/server/flow-surfaces/filter-group.js +94 -0
- package/dist/server/flow-surfaces/index.d.ts +11 -0
- package/dist/server/flow-surfaces/index.js +243 -0
- package/dist/server/flow-surfaces/locator.d.ts +28 -0
- package/dist/server/flow-surfaces/locator.js +240 -0
- package/dist/server/flow-surfaces/node-use-sets.d.ts +15 -0
- package/dist/server/flow-surfaces/node-use-sets.js +131 -0
- package/dist/server/flow-surfaces/payload-shape.d.ts +9 -0
- package/dist/server/flow-surfaces/payload-shape.js +61 -0
- package/dist/server/flow-surfaces/placement.d.ts +33 -0
- package/dist/server/flow-surfaces/placement.js +195 -0
- package/dist/server/flow-surfaces/planning/action-specs.d.ts +179 -0
- package/dist/server/flow-surfaces/planning/action-specs.js +190 -0
- package/dist/server/flow-surfaces/planning/compiler.d.ts +37 -0
- package/dist/server/flow-surfaces/planning/compiler.js +376 -0
- package/dist/server/flow-surfaces/planning/context.d.ts +30 -0
- package/dist/server/flow-surfaces/planning/context.js +139 -0
- package/dist/server/flow-surfaces/planning/created-keys.d.ts +34 -0
- package/dist/server/flow-surfaces/planning/created-keys.js +375 -0
- package/dist/server/flow-surfaces/planning/key-kind.d.ts +11 -0
- package/dist/server/flow-surfaces/planning/key-kind.js +88 -0
- package/dist/server/flow-surfaces/planning/key-persistence.d.ts +34 -0
- package/dist/server/flow-surfaces/planning/key-persistence.js +148 -0
- package/dist/server/flow-surfaces/planning/key-registry.d.ts +40 -0
- package/dist/server/flow-surfaces/planning/key-registry.js +206 -0
- package/dist/server/flow-surfaces/planning/runtime.d.ts +37 -0
- package/dist/server/flow-surfaces/planning/runtime.js +259 -0
- package/dist/server/flow-surfaces/planning/step-link.d.ts +14 -0
- package/dist/server/flow-surfaces/planning/step-link.js +104 -0
- package/dist/server/flow-surfaces/planning/types.d.ts +55 -0
- package/dist/server/flow-surfaces/planning/types.js +24 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.d.ts +20 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +111 -0
- package/dist/server/flow-surfaces/reaction/errors.d.ts +20 -0
- package/dist/server/flow-surfaces/reaction/errors.js +69 -0
- package/dist/server/flow-surfaces/reaction/field-value.d.ts +34 -0
- package/dist/server/flow-surfaces/reaction/field-value.js +181 -0
- package/dist/server/flow-surfaces/reaction/fingerprint.d.ts +16 -0
- package/dist/server/flow-surfaces/reaction/fingerprint.js +71 -0
- package/dist/server/flow-surfaces/reaction/linkage.d.ts +136 -0
- package/dist/server/flow-surfaces/reaction/linkage.js +882 -0
- package/dist/server/flow-surfaces/reaction/meta.d.ts +11 -0
- package/dist/server/flow-surfaces/reaction/meta.js +451 -0
- package/dist/server/flow-surfaces/reaction/registry.d.ts +156 -0
- package/dist/server/flow-surfaces/reaction/registry.js +206 -0
- package/dist/server/flow-surfaces/reaction/resolver.d.ts +22 -0
- package/dist/server/flow-surfaces/reaction/resolver.js +202 -0
- package/dist/server/flow-surfaces/reaction/types.d.ts +241 -0
- package/dist/server/flow-surfaces/reaction/types.js +24 -0
- package/dist/server/flow-surfaces/reaction/utils.d.ts +17 -0
- package/dist/server/flow-surfaces/reaction/utils.js +67 -0
- package/dist/server/flow-surfaces/reaction/value-expr.d.ts +15 -0
- package/dist/server/flow-surfaces/reaction/value-expr.js +209 -0
- package/dist/server/flow-surfaces/reference-guards.d.ts +19 -0
- package/dist/server/flow-surfaces/reference-guards.js +103 -0
- package/dist/server/flow-surfaces/route-sync.d.ts +47 -0
- package/dist/server/flow-surfaces/route-sync.js +392 -0
- package/dist/server/flow-surfaces/service-helpers.d.ts +42 -0
- package/dist/server/flow-surfaces/service-helpers.js +377 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +108 -0
- package/dist/server/flow-surfaces/service-utils.js +811 -0
- package/dist/server/flow-surfaces/service.d.ts +773 -0
- package/dist/server/flow-surfaces/service.js +13008 -0
- package/dist/server/flow-surfaces/support-matrix.d.ts +31 -0
- package/dist/server/flow-surfaces/support-matrix.js +259 -0
- package/dist/server/flow-surfaces/surface-context.d.ts +52 -0
- package/dist/server/flow-surfaces/surface-context.js +437 -0
- package/dist/server/flow-surfaces/template-compatibility.d.ts +42 -0
- package/dist/server/flow-surfaces/template-compatibility.js +189 -0
- package/dist/server/flow-surfaces/template-display.d.ts +20 -0
- package/dist/server/flow-surfaces/template-display.js +289 -0
- package/dist/server/flow-surfaces/template-service-utils.d.ts +62 -0
- package/dist/server/flow-surfaces/template-service-utils.js +281 -0
- package/dist/server/flow-surfaces/types.d.ts +288 -0
- package/dist/server/flow-surfaces/types.js +24 -0
- package/dist/server/plugin.js +2 -0
- package/dist/swagger/flow-surfaces.d.ts +5964 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +1533 -0
- package/dist/swagger/flow-surfaces.examples.js +1758 -0
- package/dist/swagger/flow-surfaces.js +5315 -0
- package/dist/swagger/flow-surfaces.template-action-docs.d.ts +62 -0
- package/dist/swagger/flow-surfaces.template-action-docs.js +121 -0
- package/dist/swagger/flow-surfaces.template-schemas.d.ts +239 -0
- package/dist/swagger/flow-surfaces.template-schemas.js +255 -0
- package/dist/swagger/index.d.ts +5969 -0
- package/dist/swagger/index.js +50 -0
- package/package.json +2 -2
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.d.ts +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
type FlowSurfaceActionDocBuilder = (schemaName: string, example?: Record<string, any>, description?: string) => any;
|
|
10
|
+
type FlowSurfaceActionResponsesBuilder = (schemaName: string, includeValidationError?: boolean) => any;
|
|
11
|
+
type FlowSurfaceValuesCompatibilityNoteBuilder = (description: string) => string;
|
|
12
|
+
export declare function createFlowSurfaceTemplateActionDocs(options: {
|
|
13
|
+
tag: string;
|
|
14
|
+
readAclNote: string;
|
|
15
|
+
requestBody: FlowSurfaceActionDocBuilder;
|
|
16
|
+
responses: FlowSurfaceActionResponsesBuilder;
|
|
17
|
+
valuesCompatibilityNote: FlowSurfaceValuesCompatibilityNoteBuilder;
|
|
18
|
+
}): {
|
|
19
|
+
listTemplates: {
|
|
20
|
+
tags: string[];
|
|
21
|
+
summary: string;
|
|
22
|
+
description: string;
|
|
23
|
+
requestBody: any;
|
|
24
|
+
responses: any;
|
|
25
|
+
};
|
|
26
|
+
getTemplate: {
|
|
27
|
+
tags: string[];
|
|
28
|
+
summary: string;
|
|
29
|
+
description: string;
|
|
30
|
+
requestBody: any;
|
|
31
|
+
responses: any;
|
|
32
|
+
};
|
|
33
|
+
saveTemplate: {
|
|
34
|
+
tags: string[];
|
|
35
|
+
summary: string;
|
|
36
|
+
description: string;
|
|
37
|
+
requestBody: any;
|
|
38
|
+
responses: any;
|
|
39
|
+
};
|
|
40
|
+
updateTemplate: {
|
|
41
|
+
tags: string[];
|
|
42
|
+
summary: string;
|
|
43
|
+
description: string;
|
|
44
|
+
requestBody: any;
|
|
45
|
+
responses: any;
|
|
46
|
+
};
|
|
47
|
+
destroyTemplate: {
|
|
48
|
+
tags: string[];
|
|
49
|
+
summary: string;
|
|
50
|
+
description: string;
|
|
51
|
+
requestBody: any;
|
|
52
|
+
responses: any;
|
|
53
|
+
};
|
|
54
|
+
convertTemplateToCopy: {
|
|
55
|
+
tags: string[];
|
|
56
|
+
summary: string;
|
|
57
|
+
description: string;
|
|
58
|
+
requestBody: any;
|
|
59
|
+
responses: any;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
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_surfaces_template_action_docs_exports = {};
|
|
28
|
+
__export(flow_surfaces_template_action_docs_exports, {
|
|
29
|
+
createFlowSurfaceTemplateActionDocs: () => createFlowSurfaceTemplateActionDocs
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(flow_surfaces_template_action_docs_exports);
|
|
32
|
+
function createFlowSurfaceTemplateActionDocs(options) {
|
|
33
|
+
const { tag, readAclNote, requestBody, responses, valuesCompatibilityNote } = options;
|
|
34
|
+
return {
|
|
35
|
+
listTemplates: {
|
|
36
|
+
tags: [tag],
|
|
37
|
+
summary: "Search saved flow surface templates for automation and CLI reuse",
|
|
38
|
+
description: valuesCompatibilityNote(
|
|
39
|
+
`Lists saved block / popup templates backed by FlowModel trees. Use \`search\` against \`name\` and required \`description\` to help humans and models choose the right template. ${readAclNote}`
|
|
40
|
+
),
|
|
41
|
+
requestBody: requestBody("FlowSurfaceListTemplatesRequest", {
|
|
42
|
+
target: {
|
|
43
|
+
uid: "employee-table-block"
|
|
44
|
+
},
|
|
45
|
+
type: "popup",
|
|
46
|
+
actionType: "view",
|
|
47
|
+
actionScope: "record",
|
|
48
|
+
search: "employee popup",
|
|
49
|
+
page: 1,
|
|
50
|
+
pageSize: 20
|
|
51
|
+
}),
|
|
52
|
+
responses: responses("FlowSurfaceListTemplatesResult")
|
|
53
|
+
},
|
|
54
|
+
getTemplate: {
|
|
55
|
+
tags: [tag],
|
|
56
|
+
summary: "Read one saved flow surface template by uid",
|
|
57
|
+
description: valuesCompatibilityNote(`Reads one saved template and its usage count. ${readAclNote}`),
|
|
58
|
+
requestBody: requestBody("FlowSurfaceGetTemplateRequest", {
|
|
59
|
+
uid: "employee-form-template"
|
|
60
|
+
}),
|
|
61
|
+
responses: responses("FlowSurfaceTemplateRow")
|
|
62
|
+
},
|
|
63
|
+
saveTemplate: {
|
|
64
|
+
tags: [tag],
|
|
65
|
+
summary: "Save a block or popup source as a reusable template",
|
|
66
|
+
description: valuesCompatibilityNote(
|
|
67
|
+
'Saves the current source as a FlowModel-backed template. Only supported block sources plus supported popup action/field openers may be saved. `description` is required so API callers can search and choose templates accurately. `saveMode="duplicate"` only creates the template. `saveMode="convert"` additionally rewrites the current source into a template reference when the source kind supports it.'
|
|
68
|
+
),
|
|
69
|
+
requestBody: requestBody("FlowSurfaceSaveTemplateRequest", {
|
|
70
|
+
target: {
|
|
71
|
+
uid: "employee-create-form"
|
|
72
|
+
},
|
|
73
|
+
name: "Employee create form",
|
|
74
|
+
description: "Reusable employee create form with common fields and popup behavior.",
|
|
75
|
+
saveMode: "duplicate"
|
|
76
|
+
}),
|
|
77
|
+
responses: responses("FlowSurfaceTemplateRow")
|
|
78
|
+
},
|
|
79
|
+
updateTemplate: {
|
|
80
|
+
tags: [tag],
|
|
81
|
+
summary: "Update template name and description",
|
|
82
|
+
description: valuesCompatibilityNote(
|
|
83
|
+
"Updates searchable template metadata only. Use this to refine template naming and required description without changing the stored FlowModel tree."
|
|
84
|
+
),
|
|
85
|
+
requestBody: requestBody("FlowSurfaceUpdateTemplateRequest", {
|
|
86
|
+
uid: "employee-form-template",
|
|
87
|
+
name: "Employee create form",
|
|
88
|
+
description: "Reusable employee create form with validated field order."
|
|
89
|
+
}),
|
|
90
|
+
responses: responses("FlowSurfaceTemplateRow")
|
|
91
|
+
},
|
|
92
|
+
destroyTemplate: {
|
|
93
|
+
tags: [tag],
|
|
94
|
+
summary: "Delete an unused template and its stored target tree",
|
|
95
|
+
description: valuesCompatibilityNote(
|
|
96
|
+
"Deletes the template record and its stored FlowModel tree. The backend rejects deletion while `usageCount > 0` so callers do not break existing references accidentally."
|
|
97
|
+
),
|
|
98
|
+
requestBody: requestBody("FlowSurfaceDestroyTemplateRequest", {
|
|
99
|
+
uid: "employee-form-template"
|
|
100
|
+
}),
|
|
101
|
+
responses: responses("FlowSurfaceDestroyTemplateResult")
|
|
102
|
+
},
|
|
103
|
+
convertTemplateToCopy: {
|
|
104
|
+
tags: [tag],
|
|
105
|
+
summary: "Convert a referenced block, fields template, or popup template to copy mode",
|
|
106
|
+
description: valuesCompatibilityNote(
|
|
107
|
+
"Converts the current template reference into a detached copy. Block and field references can only move from reference to copy. Popup template references can also be reconfigured separately through action/field openView updates, but this action gives an explicit detach path."
|
|
108
|
+
),
|
|
109
|
+
requestBody: requestBody("FlowSurfaceConvertTemplateToCopyRequest", {
|
|
110
|
+
target: {
|
|
111
|
+
uid: "employee-form-block"
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
responses: responses("FlowSurfaceConvertTemplateToCopyResult")
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
+
0 && (module.exports = {
|
|
120
|
+
createFlowSurfaceTemplateActionDocs
|
|
121
|
+
});
|
|
@@ -0,0 +1,239 @@
|
|
|
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
|
+
type FlowSurfaceSchemaRef = (name: string) => {
|
|
10
|
+
$ref: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function createFlowSurfaceTemplateSchemas(options: {
|
|
13
|
+
ref: FlowSurfaceSchemaRef;
|
|
14
|
+
stringOrIntegerSchema: Record<string, any>;
|
|
15
|
+
actionTypeEnum: string[];
|
|
16
|
+
}): {
|
|
17
|
+
FlowSurfaceTemplateRow: {
|
|
18
|
+
type: string;
|
|
19
|
+
required: string[];
|
|
20
|
+
properties: {
|
|
21
|
+
uid: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
name: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
description: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
type: {
|
|
31
|
+
type: string;
|
|
32
|
+
enum: string[];
|
|
33
|
+
};
|
|
34
|
+
targetUid: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
useModel: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
dataSourceKey: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
collectionName: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
associationName: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
filterByTk: Record<string, any>;
|
|
50
|
+
sourceId: Record<string, any>;
|
|
51
|
+
usageCount: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
available: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
disabledReason: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
additionalProperties: boolean;
|
|
62
|
+
};
|
|
63
|
+
FlowSurfaceListTemplatesRequest: {
|
|
64
|
+
type: string;
|
|
65
|
+
properties: {
|
|
66
|
+
target: {
|
|
67
|
+
$ref: string;
|
|
68
|
+
};
|
|
69
|
+
type: {
|
|
70
|
+
type: string;
|
|
71
|
+
enum: string[];
|
|
72
|
+
};
|
|
73
|
+
usage: {
|
|
74
|
+
type: string;
|
|
75
|
+
enum: string[];
|
|
76
|
+
};
|
|
77
|
+
actionType: {
|
|
78
|
+
type: string;
|
|
79
|
+
enum: string[];
|
|
80
|
+
};
|
|
81
|
+
actionScope: {
|
|
82
|
+
type: string;
|
|
83
|
+
enum: string[];
|
|
84
|
+
};
|
|
85
|
+
search: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
filter: {
|
|
89
|
+
type: string;
|
|
90
|
+
additionalProperties: boolean;
|
|
91
|
+
};
|
|
92
|
+
sort: {
|
|
93
|
+
oneOf: ({
|
|
94
|
+
type: string;
|
|
95
|
+
items?: undefined;
|
|
96
|
+
} | {
|
|
97
|
+
type: string;
|
|
98
|
+
items: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
})[];
|
|
102
|
+
};
|
|
103
|
+
page: {
|
|
104
|
+
type: string;
|
|
105
|
+
minimum: number;
|
|
106
|
+
};
|
|
107
|
+
pageSize: {
|
|
108
|
+
type: string;
|
|
109
|
+
minimum: number;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
additionalProperties: boolean;
|
|
113
|
+
};
|
|
114
|
+
FlowSurfaceListTemplatesResult: {
|
|
115
|
+
type: string;
|
|
116
|
+
required: string[];
|
|
117
|
+
properties: {
|
|
118
|
+
rows: {
|
|
119
|
+
type: string;
|
|
120
|
+
items: {
|
|
121
|
+
$ref: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
count: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
page: {
|
|
128
|
+
type: string;
|
|
129
|
+
};
|
|
130
|
+
pageSize: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
totalPage: {
|
|
134
|
+
type: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
additionalProperties: boolean;
|
|
138
|
+
};
|
|
139
|
+
FlowSurfaceGetTemplateRequest: {
|
|
140
|
+
type: string;
|
|
141
|
+
required: string[];
|
|
142
|
+
properties: {
|
|
143
|
+
uid: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
additionalProperties: boolean;
|
|
148
|
+
};
|
|
149
|
+
FlowSurfaceSaveTemplateRequest: {
|
|
150
|
+
type: string;
|
|
151
|
+
required: string[];
|
|
152
|
+
properties: {
|
|
153
|
+
target: {
|
|
154
|
+
$ref: string;
|
|
155
|
+
};
|
|
156
|
+
uid: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
name: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
description: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
saveMode: {
|
|
166
|
+
type: string;
|
|
167
|
+
enum: string[];
|
|
168
|
+
default: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
additionalProperties: boolean;
|
|
172
|
+
};
|
|
173
|
+
FlowSurfaceUpdateTemplateRequest: {
|
|
174
|
+
type: string;
|
|
175
|
+
required: string[];
|
|
176
|
+
properties: {
|
|
177
|
+
uid: {
|
|
178
|
+
type: string;
|
|
179
|
+
};
|
|
180
|
+
name: {
|
|
181
|
+
type: string;
|
|
182
|
+
};
|
|
183
|
+
description: {
|
|
184
|
+
type: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
additionalProperties: boolean;
|
|
188
|
+
};
|
|
189
|
+
FlowSurfaceDestroyTemplateRequest: {
|
|
190
|
+
type: string;
|
|
191
|
+
required: string[];
|
|
192
|
+
properties: {
|
|
193
|
+
uid: {
|
|
194
|
+
type: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
additionalProperties: boolean;
|
|
198
|
+
};
|
|
199
|
+
FlowSurfaceDestroyTemplateResult: {
|
|
200
|
+
type: string;
|
|
201
|
+
properties: {
|
|
202
|
+
uid: {
|
|
203
|
+
type: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
additionalProperties: boolean;
|
|
207
|
+
};
|
|
208
|
+
FlowSurfaceConvertTemplateToCopyRequest: {
|
|
209
|
+
type: string;
|
|
210
|
+
required: string[];
|
|
211
|
+
properties: {
|
|
212
|
+
target: {
|
|
213
|
+
$ref: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
additionalProperties: boolean;
|
|
217
|
+
};
|
|
218
|
+
FlowSurfaceConvertTemplateToCopyResult: {
|
|
219
|
+
type: string;
|
|
220
|
+
required: string[];
|
|
221
|
+
properties: {
|
|
222
|
+
uid: {
|
|
223
|
+
type: string;
|
|
224
|
+
};
|
|
225
|
+
type: {
|
|
226
|
+
type: string;
|
|
227
|
+
enum: string[];
|
|
228
|
+
};
|
|
229
|
+
gridUid: {
|
|
230
|
+
type: string;
|
|
231
|
+
};
|
|
232
|
+
popupUid: {
|
|
233
|
+
type: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
additionalProperties: boolean;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
export {};
|
|
@@ -0,0 +1,255 @@
|
|
|
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_surfaces_template_schemas_exports = {};
|
|
28
|
+
__export(flow_surfaces_template_schemas_exports, {
|
|
29
|
+
createFlowSurfaceTemplateSchemas: () => createFlowSurfaceTemplateSchemas
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(flow_surfaces_template_schemas_exports);
|
|
32
|
+
function createFlowSurfaceTemplateSchemas(options) {
|
|
33
|
+
const { ref, stringOrIntegerSchema, actionTypeEnum } = options;
|
|
34
|
+
return {
|
|
35
|
+
FlowSurfaceTemplateRow: {
|
|
36
|
+
type: "object",
|
|
37
|
+
required: ["uid", "name", "description", "type", "targetUid"],
|
|
38
|
+
properties: {
|
|
39
|
+
uid: {
|
|
40
|
+
type: "string"
|
|
41
|
+
},
|
|
42
|
+
name: {
|
|
43
|
+
type: "string"
|
|
44
|
+
},
|
|
45
|
+
description: {
|
|
46
|
+
type: "string"
|
|
47
|
+
},
|
|
48
|
+
type: {
|
|
49
|
+
type: "string",
|
|
50
|
+
enum: ["block", "popup"]
|
|
51
|
+
},
|
|
52
|
+
targetUid: {
|
|
53
|
+
type: "string"
|
|
54
|
+
},
|
|
55
|
+
useModel: {
|
|
56
|
+
type: "string"
|
|
57
|
+
},
|
|
58
|
+
dataSourceKey: {
|
|
59
|
+
type: "string"
|
|
60
|
+
},
|
|
61
|
+
collectionName: {
|
|
62
|
+
type: "string"
|
|
63
|
+
},
|
|
64
|
+
associationName: {
|
|
65
|
+
type: "string"
|
|
66
|
+
},
|
|
67
|
+
filterByTk: stringOrIntegerSchema,
|
|
68
|
+
sourceId: stringOrIntegerSchema,
|
|
69
|
+
usageCount: {
|
|
70
|
+
type: "integer"
|
|
71
|
+
},
|
|
72
|
+
available: {
|
|
73
|
+
type: "boolean"
|
|
74
|
+
},
|
|
75
|
+
disabledReason: {
|
|
76
|
+
type: "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
additionalProperties: false
|
|
80
|
+
},
|
|
81
|
+
FlowSurfaceListTemplatesRequest: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
target: ref("FlowSurfaceWriteTarget"),
|
|
85
|
+
type: {
|
|
86
|
+
type: "string",
|
|
87
|
+
enum: ["block", "popup"]
|
|
88
|
+
},
|
|
89
|
+
usage: {
|
|
90
|
+
type: "string",
|
|
91
|
+
enum: ["block", "fields"]
|
|
92
|
+
},
|
|
93
|
+
actionType: {
|
|
94
|
+
type: "string",
|
|
95
|
+
enum: actionTypeEnum
|
|
96
|
+
},
|
|
97
|
+
actionScope: {
|
|
98
|
+
type: "string",
|
|
99
|
+
enum: ["block", "record"]
|
|
100
|
+
},
|
|
101
|
+
search: {
|
|
102
|
+
type: "string"
|
|
103
|
+
},
|
|
104
|
+
filter: {
|
|
105
|
+
type: "object",
|
|
106
|
+
additionalProperties: true
|
|
107
|
+
},
|
|
108
|
+
sort: {
|
|
109
|
+
oneOf: [
|
|
110
|
+
{
|
|
111
|
+
type: "string"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: "array",
|
|
115
|
+
items: {
|
|
116
|
+
type: "string"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
page: {
|
|
122
|
+
type: "integer",
|
|
123
|
+
minimum: 1
|
|
124
|
+
},
|
|
125
|
+
pageSize: {
|
|
126
|
+
type: "integer",
|
|
127
|
+
minimum: 1
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
additionalProperties: false
|
|
131
|
+
},
|
|
132
|
+
FlowSurfaceListTemplatesResult: {
|
|
133
|
+
type: "object",
|
|
134
|
+
required: ["rows", "count", "page", "pageSize", "totalPage"],
|
|
135
|
+
properties: {
|
|
136
|
+
rows: {
|
|
137
|
+
type: "array",
|
|
138
|
+
items: ref("FlowSurfaceTemplateRow")
|
|
139
|
+
},
|
|
140
|
+
count: {
|
|
141
|
+
type: "integer"
|
|
142
|
+
},
|
|
143
|
+
page: {
|
|
144
|
+
type: "integer"
|
|
145
|
+
},
|
|
146
|
+
pageSize: {
|
|
147
|
+
type: "integer"
|
|
148
|
+
},
|
|
149
|
+
totalPage: {
|
|
150
|
+
type: "integer"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
additionalProperties: false
|
|
154
|
+
},
|
|
155
|
+
FlowSurfaceGetTemplateRequest: {
|
|
156
|
+
type: "object",
|
|
157
|
+
required: ["uid"],
|
|
158
|
+
properties: {
|
|
159
|
+
uid: {
|
|
160
|
+
type: "string"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
additionalProperties: false
|
|
164
|
+
},
|
|
165
|
+
FlowSurfaceSaveTemplateRequest: {
|
|
166
|
+
type: "object",
|
|
167
|
+
required: ["target", "name", "description"],
|
|
168
|
+
properties: {
|
|
169
|
+
target: ref("FlowSurfaceWriteTarget"),
|
|
170
|
+
uid: {
|
|
171
|
+
type: "string"
|
|
172
|
+
},
|
|
173
|
+
name: {
|
|
174
|
+
type: "string"
|
|
175
|
+
},
|
|
176
|
+
description: {
|
|
177
|
+
type: "string"
|
|
178
|
+
},
|
|
179
|
+
saveMode: {
|
|
180
|
+
type: "string",
|
|
181
|
+
enum: ["duplicate", "convert"],
|
|
182
|
+
default: "duplicate"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
additionalProperties: false
|
|
186
|
+
},
|
|
187
|
+
FlowSurfaceUpdateTemplateRequest: {
|
|
188
|
+
type: "object",
|
|
189
|
+
required: ["uid", "name", "description"],
|
|
190
|
+
properties: {
|
|
191
|
+
uid: {
|
|
192
|
+
type: "string"
|
|
193
|
+
},
|
|
194
|
+
name: {
|
|
195
|
+
type: "string"
|
|
196
|
+
},
|
|
197
|
+
description: {
|
|
198
|
+
type: "string"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
additionalProperties: false
|
|
202
|
+
},
|
|
203
|
+
FlowSurfaceDestroyTemplateRequest: {
|
|
204
|
+
type: "object",
|
|
205
|
+
required: ["uid"],
|
|
206
|
+
properties: {
|
|
207
|
+
uid: {
|
|
208
|
+
type: "string"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
additionalProperties: false
|
|
212
|
+
},
|
|
213
|
+
FlowSurfaceDestroyTemplateResult: {
|
|
214
|
+
type: "object",
|
|
215
|
+
properties: {
|
|
216
|
+
uid: {
|
|
217
|
+
type: "string"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
additionalProperties: false
|
|
221
|
+
},
|
|
222
|
+
FlowSurfaceConvertTemplateToCopyRequest: {
|
|
223
|
+
type: "object",
|
|
224
|
+
required: ["target"],
|
|
225
|
+
properties: {
|
|
226
|
+
target: ref("FlowSurfaceWriteTarget")
|
|
227
|
+
},
|
|
228
|
+
additionalProperties: false
|
|
229
|
+
},
|
|
230
|
+
FlowSurfaceConvertTemplateToCopyResult: {
|
|
231
|
+
type: "object",
|
|
232
|
+
required: ["uid", "type"],
|
|
233
|
+
properties: {
|
|
234
|
+
uid: {
|
|
235
|
+
type: "string"
|
|
236
|
+
},
|
|
237
|
+
type: {
|
|
238
|
+
type: "string",
|
|
239
|
+
enum: ["block", "fields", "popup"]
|
|
240
|
+
},
|
|
241
|
+
gridUid: {
|
|
242
|
+
type: "string"
|
|
243
|
+
},
|
|
244
|
+
popupUid: {
|
|
245
|
+
type: "string"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
additionalProperties: false
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
253
|
+
0 && (module.exports = {
|
|
254
|
+
createFlowSurfaceTemplateSchemas
|
|
255
|
+
});
|