create-windy 0.3.18 → 0.4.0
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/README.md +28 -13
- package/dist/cli.js +788 -280
- package/package.json +1 -1
- package/template/.agents/skills/windy-business-module/SKILL.md +34 -10
- package/template/.windy-template.json +2 -2
- package/template/AGENTS.md +18 -8
- package/template/README.md +32 -22
- package/template/apps/agent-server/src/southwind_agent_server/adk_debug.py +38 -5
- package/template/apps/agent-server/tests/test_adk_debug_result_polling.py +139 -0
- package/template/apps/server/Dockerfile +1 -0
- package/template/apps/server/package.json +1 -0
- package/template/apps/server/scripts/validate-module-composition-once.ts +4 -0
- package/template/apps/server/scripts/validate-module-composition.ts +28 -0
- package/template/apps/server/src/agent/data-scope-routes.test.ts +20 -5
- package/template/apps/server/src/agent/routes.test.ts +20 -7
- package/template/apps/server/src/agent/routes.ts +14 -0
- package/template/apps/server/src/agent/runtime-bootstrap.ts +22 -6
- package/template/apps/server/src/agent/sandbox-worker.ts +2 -2
- package/template/apps/server/src/agent/unavailable-routes.ts +33 -0
- package/template/apps/server/src/app/server-composition.ts +56 -0
- package/template/apps/server/src/application-services.ts +2 -0
- package/template/apps/server/src/bulk-data/service.ts +14 -0
- package/template/apps/server/src/data-governance/export/authorization-port.ts +1 -1
- package/template/apps/server/src/data-governance/export/postgres-api-fixture.ts +18 -2
- package/template/apps/server/src/data-governance/export/postgres-recovery.integration.test.ts +10 -9
- package/template/apps/server/src/data-governance/export/routes-test-fixture.ts +6 -8
- package/template/apps/server/src/data-governance/user-plaintext-routes.test.ts +4 -2
- package/template/apps/server/src/feature/routes.authorization.test.ts +26 -1
- package/template/apps/server/src/feature/routes.ts +33 -15
- package/template/apps/server/src/foundation-activation.test.ts +60 -0
- package/template/apps/server/src/foundation.ts +64 -5
- package/template/apps/server/src/guards.test.ts +23 -0
- package/template/apps/server/src/guards.ts +12 -0
- package/template/apps/server/src/index.ts +28 -34
- package/template/apps/server/src/installed-business-modules.ts +13 -24
- package/template/apps/server/src/jobs/legacy-adapter.integration.test.ts +1 -0
- package/template/apps/server/src/jobs/legacy-adapter.test.ts +106 -0
- package/template/apps/server/src/jobs/legacy-service-runtime.ts +40 -0
- package/template/apps/server/src/license/activation.test.ts +30 -0
- package/template/apps/server/src/license/activation.ts +26 -0
- package/template/apps/server/src/license/restriction.test.ts +16 -0
- package/template/apps/server/src/license/routes-offline-code.test.ts +6 -2
- package/template/apps/server/src/license/routes.ts +20 -4
- package/template/apps/server/src/license/runtime-service.test.ts +10 -2
- package/template/apps/server/src/module-bootstrap.ts +14 -23
- package/template/apps/server/src/module-composition.test.ts +43 -2
- package/template/apps/server/src/module-composition.ts +29 -0
- package/template/apps/server/src/module-host/durable-context-guard.test.ts +172 -0
- package/template/apps/server/src/module-host/durable-context-unavailable.test.ts +50 -1
- package/template/apps/server/src/module-host/durable-context.test.ts +42 -25
- package/template/apps/server/src/module-host/durable-context.ts +42 -2
- package/template/apps/server/src/module-host/durable-handler-registration.ts +96 -5
- package/template/apps/server/src/module-host/implementation-completeness.test.ts +185 -0
- package/template/apps/server/src/module-host/implementation-completeness.ts +132 -0
- package/template/apps/server/src/module-host/initialize-contracts.ts +14 -0
- package/template/apps/server/src/module-host/initialize.test.ts +78 -2
- package/template/apps/server/src/module-host/initialize.ts +15 -4
- package/template/apps/server/src/module-host/project-attachments.test.ts +92 -0
- package/template/apps/server/src/module-host/project-attachments.ts +58 -0
- package/template/apps/server/src/module-host/project-composition-package.test.ts +186 -0
- package/template/apps/server/src/module-host/project-composition.test.ts +260 -0
- package/template/apps/server/src/module-host/project-composition.ts +311 -0
- package/template/apps/server/src/module-host/request-context.ts +3 -0
- package/template/apps/server/src/module-host/route-declaration.ts +15 -6
- package/template/apps/server/src/module-host/route-installer.test.ts +15 -2
- package/template/apps/server/src/module-host/route-installer.ts +12 -2
- package/template/apps/server/src/module-host/route-registration.test.ts +13 -4
- package/template/apps/server/src/module-host/runtime-composition-compatibility.test.ts +63 -0
- package/template/apps/server/src/module-host/runtime-composition-compatibility.ts +46 -0
- package/template/apps/server/src/module-host/runtime-composition.ts +34 -0
- package/template/apps/server/src/module-host/search-provider-registration.test.ts +64 -0
- package/template/apps/server/src/module-host/search-provider-registration.ts +35 -0
- package/template/apps/server/src/module-host/static-route-authorization.test.ts +99 -0
- package/template/apps/server/src/module-host/static-route-authorization.ts +90 -0
- package/template/apps/server/src/module-host/task-definitions.ts +1 -0
- package/template/apps/server/src/module-host/user-directory-composition.test.ts +4 -1
- package/template/apps/server/src/module-host.test.ts +2 -0
- package/template/apps/server/src/module-preflight.test.ts +289 -0
- package/template/apps/server/src/module-preflight.ts +96 -0
- package/template/apps/server/src/module-runtime-validation.ts +1 -0
- package/template/apps/server/src/platform-app-bootstrap.ts +50 -0
- package/template/apps/server/src/platform-http-runtime.ts +32 -7
- package/template/apps/server/src/route-guards.test.ts +22 -0
- package/template/apps/server/src/route-guards.ts +10 -3
- package/template/apps/server/src/runtime-audit-query.ts +50 -0
- package/template/apps/server/src/runtime-feature.test.ts +46 -0
- package/template/apps/server/src/runtime-feature.ts +5 -0
- package/template/apps/server/src/runtime.ts +10 -49
- package/template/apps/server/src/scheduler/audit-action.test.ts +49 -0
- package/template/apps/server/src/scheduler/audit.ts +1 -1
- package/template/apps/server/src/scheduler/execution-recorder.ts +10 -5
- package/template/apps/server/src/scheduler/recovery-service.test.ts +4 -3
- package/template/apps/server/src/scheduler/service-idle.test.ts +4 -3
- package/template/apps/server/src/scheduler/service.test.ts +1 -0
- package/template/apps/server/src/scheduler/service.ts +18 -21
- package/template/apps/server/src/scheduler/types.ts +5 -1
- package/template/apps/server/src/startup-composition-validation.test.ts +35 -0
- package/template/apps/server/src/startup-composition-validation.ts +54 -0
- package/template/apps/server/src/startup-preflight.test.ts +36 -0
- package/template/apps/server/src/startup-preflight.ts +37 -0
- package/template/apps/server/src/system/audit-routes.test.ts +9 -3
- package/template/apps/server/src/system/department-routes.test.ts +5 -3
- package/template/apps/server/src/system/feature-routes.test.ts +4 -3
- package/template/apps/server/src/system/interface-catalog.test.ts +5 -3
- package/template/apps/server/src/system/interface-catalog.ts +3 -0
- package/template/apps/server/src/system/menu-routes.test.ts +5 -3
- package/template/apps/server/src/system/route-test-runtime.ts +24 -0
- package/template/apps/server/src/system/routes-validation.test.ts +7 -3
- package/template/apps/server/src/system/routes.test.ts +21 -11
- package/template/apps/server/src/system/routes.ts +11 -2
- package/template/apps/server/src/work-order/foundation-modules.test.ts +6 -4
- package/template/apps/server/src/work-order/routes.test.ts +8 -0
- package/template/apps/server/src/work-order/task.test.ts +6 -1
- package/template/apps/web/Dockerfile +5 -0
- package/template/apps/web/package.json +1 -0
- package/template/apps/web/scripts/validate-admin-ui-composition.ts +106 -0
- package/template/apps/web/src/app/web-composition.ts +24 -0
- package/template/apps/web/src/app/web-composition.webtest.ts +15 -0
- package/template/apps/web/src/layout/AppSidebar.vue +8 -1
- package/template/apps/web/src/layout/NavigationSearchDialog.vue +8 -1
- package/template/apps/web/src/layout/navigation.ts +29 -4
- package/template/apps/web/src/layout/navigation.webtest.ts +51 -0
- package/template/apps/web/src/pages/dashboard/dashboard-presenter.ts +6 -1
- package/template/apps/web/src/pages/work-orders/WorkOrderListPage.vue +202 -0
- package/template/apps/web/src/pages/work-orders/WorkOrderListPage.webtest.ts +51 -0
- package/template/apps/web/src/router/admin-extension-loader.ts +44 -0
- package/template/apps/web/src/router/admin-extension-loader.webtest.ts +49 -0
- package/template/apps/web/src/router/admin-ui-composition-plugin.ts +33 -0
- package/template/apps/web/src/router/admin-ui-composition-plugin.webtest.ts +20 -0
- package/template/apps/web/src/router/admin-ui-composition.ts +313 -0
- package/template/apps/web/src/router/admin-ui-composition.webtest.ts +225 -0
- package/template/apps/web/src/router/admin-ui-module-registry-plugin.ts +55 -0
- package/template/apps/web/src/router/admin-ui-module-registry-plugin.webtest.ts +46 -0
- package/template/apps/web/src/router/business-routes.ts +32 -45
- package/template/apps/web/src/router/business-routes.webtest.ts +40 -44
- package/template/apps/web/src/router/index.ts +64 -54
- package/template/apps/web/src/router/manifest-routes.ts +27 -7
- package/template/apps/web/src/router/manifest-routes.webtest.ts +10 -2
- package/template/apps/web/src/router/platform-admin-route-bindings.ts +58 -0
- package/template/apps/web/src/router/reserved-route-paths.ts +14 -0
- package/template/apps/web/src/router/shared-scaffold-neutrality.webtest.ts +10 -4
- package/template/apps/web/src/router/web-composition-host.ts +20 -0
- package/template/apps/web/src/services/work-order-api.ts +16 -0
- package/template/apps/web/src/services/work-order-api.webtest.ts +21 -0
- package/template/apps/web/src/virtual-admin-ui-modules.d.ts +5 -0
- package/template/apps/web/vite.config.ts +22 -1
- package/template/docs/architecture/migration-bundle.md +10 -7
- package/template/docs/architecture/module-manifest-composition.md +85 -3
- package/template/docs/architecture/search-provider-protocol.md +6 -1
- package/template/docs/architecture/server-module-interface.md +70 -7
- package/template/docs/development/business-web-routes.md +53 -50
- package/template/docs/development/module-lifecycle.md +48 -54
- package/template/docs/platform/agent-runtime.md +2 -0
- package/template/docs/platform/navigation-registry.md +5 -4
- package/template/package.json +1 -1
- package/template/packages/config/package.json +1 -1
- package/template/packages/database/package.json +1 -1
- package/template/packages/example-work-order/package.json +6 -0
- package/template/packages/example-work-order/src/admin-page.ts +78 -0
- package/template/packages/example-work-order/src/admin.ts +35 -0
- package/template/packages/example-work-order/src/manifest.test.ts +62 -5
- package/template/packages/example-work-order/src/manifest.ts +54 -7
- package/template/packages/example-work-order/src/migration-bundle.ts +8 -0
- package/template/packages/example-work-order/src/server-module.ts +2 -2
- package/template/packages/jobs/package.json +1 -1
- package/template/packages/modules/index.ts +4 -0
- package/template/packages/modules/package.json +3 -2
- package/template/packages/modules/src/admin-ui-entry.ts +8 -0
- package/template/packages/modules/src/admin-ui-manifest.test.ts +52 -0
- package/template/packages/modules/src/admin-ui-manifest.ts +53 -0
- package/template/packages/modules/src/capability-audit-validation.test.ts +127 -0
- package/template/packages/modules/src/capability-audit-validation.ts +38 -0
- package/template/packages/modules/src/capability-guard-validation.ts +148 -0
- package/template/packages/modules/src/capability-key-validation.test.ts +150 -0
- package/template/packages/modules/src/composition-fixtures.test-support.ts +7 -5
- package/template/packages/modules/src/composition.test.ts +74 -9
- package/template/packages/modules/src/composition.ts +8 -0
- package/template/packages/modules/src/manifest.ts +1 -0
- package/template/packages/modules/src/migration-bundle-validation.test.ts +23 -0
- package/template/packages/modules/src/module-host-range.test.ts +57 -0
- package/template/packages/modules/src/module-host-range.ts +125 -0
- package/template/packages/modules/src/project-module-assembly.test.ts +133 -0
- package/template/packages/modules/src/project-module-assembly.ts +126 -0
- package/template/packages/modules/src/system-admin-routes.ts +6 -5
- package/template/packages/modules/src/system-admin-ui-catalog.ts +72 -0
- package/template/packages/modules/src/system-agent-tools.ts +2 -2
- package/template/packages/modules/src/system-api-binding.ts +43 -9
- package/template/packages/modules/src/system-api-control-plane.ts +202 -0
- package/template/packages/modules/src/system-api-data-governance.ts +4 -2
- package/template/packages/modules/src/system-api-operational.ts +57 -8
- package/template/packages/modules/src/system-api-permissions.ts +115 -21
- package/template/packages/modules/src/system-api-watermark.ts +3 -0
- package/template/packages/modules/src/system-audit-actions.ts +7 -0
- package/template/packages/modules/src/system-data-governance.ts +5 -2
- package/template/packages/modules/src/system-features.ts +31 -0
- package/template/packages/modules/src/system-governed-export-bindings.ts +8 -4
- package/template/packages/modules/src/system-module-catalog.test.ts +39 -4
- package/template/packages/modules/src/system-module-catalog.ts +68 -7
- package/template/packages/modules/src/system-module-tasks.ts +8 -1
- package/template/packages/modules/src/system-modules-access.test.ts +4 -0
- package/template/packages/modules/src/system-modules.test.ts +10 -2
- package/template/packages/modules/src/system-modules.ts +6 -5
- package/template/packages/modules/src/system-permissions.ts +4 -0
- package/template/packages/modules/user/module.ts +19 -2
- package/template/packages/server-sdk/index.ts +8 -0
- package/template/packages/server-sdk/package.json +2 -1
- package/template/packages/server-sdk/src/durable-handler.ts +16 -1
- package/template/packages/server-sdk/src/module-adapter.test.ts +44 -0
- package/template/packages/server-sdk/src/module-adapter.ts +59 -0
- package/template/packages/server-sdk/src/route-definition.ts +3 -2
- package/template/packages/shared/package.json +1 -1
- package/template/packages/shared/src/audit.test.ts +7 -0
- package/template/packages/shared/src/audit.ts +16 -0
- package/template/packages/shared/src/migration-bundle-validation.ts +9 -11
- package/template/packages/shared/src/rbac.ts +2 -0
- package/template/apps/web/src/app/business-routes.ts +0 -22
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ApiPermissionBinding,
|
|
3
|
+
AuditActionType,
|
|
4
|
+
HttpMethod,
|
|
5
|
+
} from "@southwind-ai/shared";
|
|
2
6
|
|
|
3
7
|
interface ResourceBindingInput {
|
|
4
8
|
path: string;
|
|
5
9
|
permissionResource: string;
|
|
6
10
|
featureKey?: string;
|
|
7
11
|
backupExport?: boolean;
|
|
12
|
+
auditActions?: Partial<ResourceAuditActions>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface ResourceAuditActions {
|
|
16
|
+
list: AuditActionType;
|
|
17
|
+
export: AuditActionType;
|
|
18
|
+
detail: AuditActionType;
|
|
19
|
+
import: AuditActionType;
|
|
20
|
+
create: AuditActionType;
|
|
21
|
+
update: AuditActionType;
|
|
22
|
+
delete: AuditActionType;
|
|
8
23
|
}
|
|
9
24
|
|
|
10
25
|
export function resourceBindings(
|
|
@@ -13,16 +28,34 @@ export function resourceBindings(
|
|
|
13
28
|
const base = `/api/system/${input.path}`;
|
|
14
29
|
const read = `system.${input.permissionResource}.read`;
|
|
15
30
|
const manage = `system.${input.permissionResource}.manage`;
|
|
31
|
+
const audit = {
|
|
32
|
+
list: "data.read",
|
|
33
|
+
export: "data.export",
|
|
34
|
+
detail: "data.read",
|
|
35
|
+
import: "data.import",
|
|
36
|
+
create: "crud.create",
|
|
37
|
+
update: "crud.update",
|
|
38
|
+
delete: "crud.delete",
|
|
39
|
+
...input.auditActions,
|
|
40
|
+
} satisfies ResourceAuditActions;
|
|
16
41
|
return [
|
|
17
|
-
binding("GET", base, read, input.featureKey),
|
|
42
|
+
binding("GET", base, read, input.featureKey, audit.list),
|
|
18
43
|
...(input.backupExport === false
|
|
19
44
|
? []
|
|
20
|
-
: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
45
|
+
: [
|
|
46
|
+
binding(
|
|
47
|
+
"GET",
|
|
48
|
+
`${base}/export`,
|
|
49
|
+
read,
|
|
50
|
+
input.featureKey,
|
|
51
|
+
audit.export,
|
|
52
|
+
),
|
|
53
|
+
]),
|
|
54
|
+
binding("GET", `${base}/:id`, read, input.featureKey, audit.detail),
|
|
55
|
+
binding("POST", `${base}/import`, manage, input.featureKey, audit.import),
|
|
56
|
+
binding("POST", base, manage, input.featureKey, audit.create),
|
|
57
|
+
binding("PUT", `${base}/:id`, manage, input.featureKey, audit.update),
|
|
58
|
+
binding("DELETE", `${base}/:id`, manage, input.featureKey, audit.delete),
|
|
26
59
|
];
|
|
27
60
|
}
|
|
28
61
|
|
|
@@ -31,7 +64,8 @@ export function binding(
|
|
|
31
64
|
path: string,
|
|
32
65
|
permissionKey: string,
|
|
33
66
|
featureKey?: string,
|
|
67
|
+
auditAction?: AuditActionType,
|
|
34
68
|
anonymous?: boolean,
|
|
35
69
|
): ApiPermissionBinding {
|
|
36
|
-
return { method, path, permissionKey, featureKey, anonymous };
|
|
70
|
+
return { method, path, permissionKey, featureKey, auditAction, anonymous };
|
|
37
71
|
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { ApiPermissionBinding } from "@southwind-ai/shared";
|
|
2
|
+
import { binding } from "./system-api-binding.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 不走资源 CRUD 的平台入口仍必须进入 Manifest。
|
|
6
|
+
*
|
|
7
|
+
* 认证自服务 Route 使用 anonymous=true 表示不受 RBAC 权限点控制;Handler 仍会校验
|
|
8
|
+
* 登录态、当前会话和对象所有权。Swagger 等纯框架 Route 不在这里声明。
|
|
9
|
+
*/
|
|
10
|
+
export function systemControlPlaneApiPermissionBindings(): ApiPermissionBinding[] {
|
|
11
|
+
return [
|
|
12
|
+
...runtimeBindings(),
|
|
13
|
+
...sessionBindings(),
|
|
14
|
+
// @windy-module system.agent begin
|
|
15
|
+
...aiRuntimeBindings(),
|
|
16
|
+
// @windy-module system.agent end
|
|
17
|
+
// @windy-module system.license begin
|
|
18
|
+
binding(
|
|
19
|
+
"GET",
|
|
20
|
+
"/api/license/runtime",
|
|
21
|
+
"system.license.read",
|
|
22
|
+
"system.license",
|
|
23
|
+
"data.read",
|
|
24
|
+
),
|
|
25
|
+
binding(
|
|
26
|
+
"POST",
|
|
27
|
+
"/api/license/runtime/install",
|
|
28
|
+
"system.license.manage",
|
|
29
|
+
"system.license",
|
|
30
|
+
"license.update",
|
|
31
|
+
),
|
|
32
|
+
// @windy-module system.license end
|
|
33
|
+
// @windy-module system.agent begin
|
|
34
|
+
binding(
|
|
35
|
+
"GET",
|
|
36
|
+
"/api/agent/tools",
|
|
37
|
+
"system.agent.read",
|
|
38
|
+
"system.agent",
|
|
39
|
+
"data.read",
|
|
40
|
+
),
|
|
41
|
+
binding(
|
|
42
|
+
"POST",
|
|
43
|
+
"/api/agent/tools/:key/execute",
|
|
44
|
+
"system.agent.read",
|
|
45
|
+
"system.agent",
|
|
46
|
+
"agent.tool.execute",
|
|
47
|
+
),
|
|
48
|
+
// @windy-module system.agent end
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @windy-module system.agent begin
|
|
53
|
+
function aiRuntimeBindings(): ApiPermissionBinding[] {
|
|
54
|
+
const read = [
|
|
55
|
+
"/api/internal/ai/artifacts",
|
|
56
|
+
"/api/document/runs/:runId/events",
|
|
57
|
+
"/api/document/runs/:runId/result",
|
|
58
|
+
"/api/speech/runs/:runId/events",
|
|
59
|
+
"/api/speech/runs/:runId/result",
|
|
60
|
+
"/api/speech/runs/:runId/artifact",
|
|
61
|
+
"/api/agent/runs/:runId/events",
|
|
62
|
+
"/api/agent/runs/:runId/result",
|
|
63
|
+
].map((path) =>
|
|
64
|
+
binding(
|
|
65
|
+
"GET",
|
|
66
|
+
path,
|
|
67
|
+
"system.agent.read",
|
|
68
|
+
"system.agent",
|
|
69
|
+
"data.read",
|
|
70
|
+
path.startsWith("/api/internal/"),
|
|
71
|
+
),
|
|
72
|
+
);
|
|
73
|
+
const execute = [
|
|
74
|
+
"/api/document/runs",
|
|
75
|
+
"/api/document/runs/:runId/cancel",
|
|
76
|
+
"/api/speech/runs",
|
|
77
|
+
"/api/speech/runs/:runId/cancel",
|
|
78
|
+
"/api/embeddings",
|
|
79
|
+
"/api/agent/runs",
|
|
80
|
+
"/api/agent/runs/:runId/cancel",
|
|
81
|
+
"/api/agent/runs/:runId/attach",
|
|
82
|
+
"/api/internal/agent/tools/execute",
|
|
83
|
+
].map((path) =>
|
|
84
|
+
binding(
|
|
85
|
+
"POST",
|
|
86
|
+
path,
|
|
87
|
+
"system.agent.read",
|
|
88
|
+
"system.agent",
|
|
89
|
+
"agent.operation.execute",
|
|
90
|
+
path.startsWith("/api/internal/"),
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
return [...read, ...execute];
|
|
94
|
+
}
|
|
95
|
+
// @windy-module system.agent end
|
|
96
|
+
|
|
97
|
+
function runtimeBindings(): ApiPermissionBinding[] {
|
|
98
|
+
return ["/api/live", "/api/ready", "/api/health", "/api/metrics"].map(
|
|
99
|
+
(path) =>
|
|
100
|
+
binding(
|
|
101
|
+
"GET",
|
|
102
|
+
path,
|
|
103
|
+
"system.runtime.read",
|
|
104
|
+
"system.runtime",
|
|
105
|
+
undefined,
|
|
106
|
+
true,
|
|
107
|
+
),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function sessionBindings(): ApiPermissionBinding[] {
|
|
112
|
+
return [
|
|
113
|
+
binding(
|
|
114
|
+
"GET",
|
|
115
|
+
"/api/auth/session",
|
|
116
|
+
"system.auth.access",
|
|
117
|
+
"system.auth",
|
|
118
|
+
"data.read",
|
|
119
|
+
true,
|
|
120
|
+
),
|
|
121
|
+
binding(
|
|
122
|
+
"POST",
|
|
123
|
+
"/api/auth/login",
|
|
124
|
+
"system.auth.access",
|
|
125
|
+
"system.auth",
|
|
126
|
+
"auth.login",
|
|
127
|
+
true,
|
|
128
|
+
),
|
|
129
|
+
binding(
|
|
130
|
+
"POST",
|
|
131
|
+
"/api/auth/api/login",
|
|
132
|
+
"system.auth.access",
|
|
133
|
+
"system.auth",
|
|
134
|
+
"auth.login",
|
|
135
|
+
true,
|
|
136
|
+
),
|
|
137
|
+
binding(
|
|
138
|
+
"GET",
|
|
139
|
+
"/api/auth/sessions",
|
|
140
|
+
"system.profile.read",
|
|
141
|
+
"system.profile",
|
|
142
|
+
"data.read",
|
|
143
|
+
true,
|
|
144
|
+
),
|
|
145
|
+
binding(
|
|
146
|
+
"GET",
|
|
147
|
+
"/api/auth/login-events",
|
|
148
|
+
"system.profile.read",
|
|
149
|
+
"system.profile",
|
|
150
|
+
"data.read",
|
|
151
|
+
true,
|
|
152
|
+
),
|
|
153
|
+
binding(
|
|
154
|
+
"POST",
|
|
155
|
+
"/api/auth/sessions/revoke-all",
|
|
156
|
+
"system.profile.manage",
|
|
157
|
+
"system.profile",
|
|
158
|
+
"auth.session.revoke",
|
|
159
|
+
true,
|
|
160
|
+
),
|
|
161
|
+
binding(
|
|
162
|
+
"GET",
|
|
163
|
+
"/api/auth/password/policy",
|
|
164
|
+
"system.auth.access",
|
|
165
|
+
"system.auth",
|
|
166
|
+
"data.read",
|
|
167
|
+
true,
|
|
168
|
+
),
|
|
169
|
+
binding(
|
|
170
|
+
"POST",
|
|
171
|
+
"/api/auth/logout",
|
|
172
|
+
"system.auth.access",
|
|
173
|
+
"system.auth",
|
|
174
|
+
"auth.session.revoke",
|
|
175
|
+
true,
|
|
176
|
+
),
|
|
177
|
+
binding(
|
|
178
|
+
"POST",
|
|
179
|
+
"/api/auth/password/change",
|
|
180
|
+
"system.profile.manage",
|
|
181
|
+
"system.profile",
|
|
182
|
+
"auth.password.update",
|
|
183
|
+
true,
|
|
184
|
+
),
|
|
185
|
+
binding(
|
|
186
|
+
"POST",
|
|
187
|
+
"/api/auth/sessions/:id/revoke",
|
|
188
|
+
"system.profile.manage",
|
|
189
|
+
"system.profile",
|
|
190
|
+
"auth.session.revoke",
|
|
191
|
+
true,
|
|
192
|
+
),
|
|
193
|
+
binding(
|
|
194
|
+
"GET",
|
|
195
|
+
"/api/session/context",
|
|
196
|
+
"system.auth.access",
|
|
197
|
+
"system.auth",
|
|
198
|
+
"data.read",
|
|
199
|
+
true,
|
|
200
|
+
),
|
|
201
|
+
];
|
|
202
|
+
}
|
|
@@ -9,13 +9,15 @@ export function dataGovernanceApiPermissionBindings(): ApiPermissionBinding[] {
|
|
|
9
9
|
"GET",
|
|
10
10
|
"/api/system/users/:id/plaintext",
|
|
11
11
|
"system.user.reveal",
|
|
12
|
-
"system.
|
|
12
|
+
"system.user",
|
|
13
|
+
"data.plaintext.read",
|
|
13
14
|
),
|
|
14
15
|
binding(
|
|
15
16
|
"POST",
|
|
16
17
|
"/api/system/users/plaintext/batch",
|
|
17
18
|
"system.user.reveal",
|
|
18
|
-
"system.
|
|
19
|
+
"system.user",
|
|
20
|
+
"data.plaintext.batch-read",
|
|
19
21
|
),
|
|
20
22
|
];
|
|
21
23
|
}
|
|
@@ -10,47 +10,60 @@ export function systemOperationalApiPermissionBindings(): ApiPermissionBinding[]
|
|
|
10
10
|
"/api/system/storage/uploads",
|
|
11
11
|
"system.storage.create",
|
|
12
12
|
"system.storage",
|
|
13
|
+
"file.upload.create",
|
|
13
14
|
),
|
|
14
15
|
binding(
|
|
15
16
|
"GET",
|
|
16
17
|
"/api/system/storage/uploads/:id",
|
|
17
18
|
"system.storage.create",
|
|
18
19
|
"system.storage",
|
|
20
|
+
"data.read",
|
|
19
21
|
),
|
|
20
22
|
binding(
|
|
21
23
|
"PUT",
|
|
22
24
|
"/api/system/storage/uploads/:id/parts/:partNumber",
|
|
23
25
|
"system.storage.create",
|
|
24
26
|
"system.storage",
|
|
27
|
+
"file.upload.part.write",
|
|
25
28
|
),
|
|
26
29
|
binding(
|
|
27
30
|
"POST",
|
|
28
31
|
"/api/system/storage/uploads/:id/complete",
|
|
29
32
|
"system.storage.create",
|
|
30
33
|
"system.storage",
|
|
34
|
+
"file.upload.complete",
|
|
31
35
|
),
|
|
32
36
|
binding(
|
|
33
37
|
"DELETE",
|
|
34
38
|
"/api/system/storage/uploads/:id",
|
|
35
39
|
"system.storage.create",
|
|
36
40
|
"system.storage",
|
|
41
|
+
"file.upload.abort",
|
|
37
42
|
),
|
|
38
43
|
binding(
|
|
39
44
|
"GET",
|
|
40
45
|
"/api/system/storage/files/:id",
|
|
41
46
|
"system.storage.read",
|
|
42
47
|
"system.storage",
|
|
48
|
+
"file.download",
|
|
43
49
|
),
|
|
44
50
|
binding(
|
|
45
51
|
"GET",
|
|
46
52
|
"/api/platform/files/:id",
|
|
47
53
|
"system.settings.read",
|
|
48
54
|
"system.settings",
|
|
55
|
+
undefined,
|
|
49
56
|
true,
|
|
50
57
|
),
|
|
51
58
|
// @windy-module system.storage end
|
|
52
59
|
// @windy-module system.operations begin
|
|
53
|
-
binding(
|
|
60
|
+
binding(
|
|
61
|
+
"GET",
|
|
62
|
+
"/api/system/operations",
|
|
63
|
+
"system.ops.read",
|
|
64
|
+
"system.ops",
|
|
65
|
+
"data.read",
|
|
66
|
+
),
|
|
54
67
|
// @windy-module system.operations end
|
|
55
68
|
// @windy-module system.notification begin
|
|
56
69
|
binding(
|
|
@@ -58,78 +71,91 @@ export function systemOperationalApiPermissionBindings(): ApiPermissionBinding[]
|
|
|
58
71
|
"/api/notifications",
|
|
59
72
|
"system.notification.read",
|
|
60
73
|
"system.notification",
|
|
74
|
+
"data.read",
|
|
61
75
|
),
|
|
62
76
|
binding(
|
|
63
77
|
"GET",
|
|
64
78
|
"/api/notifications/preferences",
|
|
65
79
|
"system.notification.read",
|
|
66
80
|
"system.notification",
|
|
81
|
+
"data.read",
|
|
67
82
|
),
|
|
68
83
|
binding(
|
|
69
84
|
"PUT",
|
|
70
85
|
"/api/notifications/preferences",
|
|
71
86
|
"system.notification.read",
|
|
72
87
|
"system.notification",
|
|
88
|
+
"notification.preference.update",
|
|
73
89
|
),
|
|
74
90
|
binding(
|
|
75
91
|
"POST",
|
|
76
92
|
"/api/notifications/:id/read",
|
|
77
93
|
"system.notification.read",
|
|
78
94
|
"system.notification",
|
|
95
|
+
"notification.read",
|
|
79
96
|
),
|
|
80
97
|
binding(
|
|
81
98
|
"PUT",
|
|
82
99
|
"/api/notifications/:id/favorite",
|
|
83
100
|
"system.notification.read",
|
|
84
101
|
"system.notification",
|
|
102
|
+
"notification.favorite",
|
|
85
103
|
),
|
|
86
104
|
binding(
|
|
87
105
|
"DELETE",
|
|
88
106
|
"/api/notifications/:id/favorite",
|
|
89
107
|
"system.notification.read",
|
|
90
108
|
"system.notification",
|
|
109
|
+
"notification.unfavorite",
|
|
91
110
|
),
|
|
92
111
|
binding(
|
|
93
112
|
"GET",
|
|
94
113
|
"/api/system/notifications/audience-options",
|
|
95
114
|
"system.notification.manage",
|
|
96
115
|
"system.notification",
|
|
116
|
+
"data.read",
|
|
97
117
|
),
|
|
98
118
|
binding(
|
|
99
119
|
"GET",
|
|
100
120
|
"/api/system/notifications/:id/deliveries",
|
|
101
121
|
"system.notification.manage",
|
|
102
122
|
"system.notification",
|
|
123
|
+
"data.read",
|
|
103
124
|
),
|
|
104
125
|
binding(
|
|
105
126
|
"GET",
|
|
106
127
|
"/api/system/notifications",
|
|
107
128
|
"system.notification.manage",
|
|
108
129
|
"system.notification",
|
|
130
|
+
"data.read",
|
|
109
131
|
),
|
|
110
132
|
binding(
|
|
111
133
|
"POST",
|
|
112
134
|
"/api/system/notifications",
|
|
113
135
|
"system.notification.manage",
|
|
114
136
|
"system.notification",
|
|
137
|
+
"notification.publish",
|
|
115
138
|
),
|
|
116
139
|
binding(
|
|
117
140
|
"PUT",
|
|
118
141
|
"/api/system/notifications/:id",
|
|
119
142
|
"system.notification.update",
|
|
120
143
|
"system.notification",
|
|
144
|
+
"notification.update",
|
|
121
145
|
),
|
|
122
146
|
binding(
|
|
123
147
|
"GET",
|
|
124
148
|
"/api/system/notifications/:id/revisions",
|
|
125
149
|
"system.notification.manage",
|
|
126
150
|
"system.notification",
|
|
151
|
+
"data.read",
|
|
127
152
|
),
|
|
128
153
|
binding(
|
|
129
154
|
"DELETE",
|
|
130
155
|
"/api/system/notifications/:id",
|
|
131
156
|
"system.notification.manage",
|
|
132
157
|
"system.notification",
|
|
158
|
+
"notification.archive",
|
|
133
159
|
),
|
|
134
160
|
// @windy-module system.notification end
|
|
135
161
|
// @windy-module system.workflow begin
|
|
@@ -138,31 +164,44 @@ export function systemOperationalApiPermissionBindings(): ApiPermissionBinding[]
|
|
|
138
164
|
"/api/workflow/work-items",
|
|
139
165
|
"system.workflow.read",
|
|
140
166
|
"system.workflow",
|
|
167
|
+
"data.read",
|
|
141
168
|
),
|
|
142
169
|
binding(
|
|
143
170
|
"GET",
|
|
144
171
|
"/api/workflow/work-items/:id",
|
|
145
172
|
"system.workflow.read",
|
|
146
173
|
"system.workflow",
|
|
174
|
+
"data.read",
|
|
147
175
|
),
|
|
148
176
|
binding(
|
|
149
177
|
"GET",
|
|
150
178
|
"/api/workflow/work-items/:id/history",
|
|
151
179
|
"system.workflow.read",
|
|
152
180
|
"system.workflow",
|
|
181
|
+
"data.read",
|
|
153
182
|
),
|
|
154
183
|
binding(
|
|
155
184
|
"POST",
|
|
156
185
|
"/api/workflow/work-items",
|
|
157
186
|
"system.workflow.create",
|
|
158
187
|
"system.workflow",
|
|
159
|
-
|
|
160
|
-
|
|
188
|
+
"workflow.create",
|
|
189
|
+
),
|
|
190
|
+
...(
|
|
191
|
+
[
|
|
192
|
+
["claim", "workflow.claim"],
|
|
193
|
+
["transfer", "workflow.transfer"],
|
|
194
|
+
["approve", "workflow.decide"],
|
|
195
|
+
["reject", "workflow.decide"],
|
|
196
|
+
["cancel", "workflow.cancel"],
|
|
197
|
+
] as const
|
|
198
|
+
).map(([command, auditAction]) =>
|
|
161
199
|
binding(
|
|
162
200
|
"POST",
|
|
163
201
|
`/api/workflow/work-items/:id/${command}`,
|
|
164
202
|
"system.workflow.approve",
|
|
165
203
|
"system.workflow",
|
|
204
|
+
auditAction,
|
|
166
205
|
),
|
|
167
206
|
),
|
|
168
207
|
// @windy-module system.workflow end
|
|
@@ -172,62 +211,72 @@ export function systemOperationalApiPermissionBindings(): ApiPermissionBinding[]
|
|
|
172
211
|
"/api/system/scheduled-tasks",
|
|
173
212
|
"system.scheduler.read",
|
|
174
213
|
"system.scheduler",
|
|
214
|
+
"task.read",
|
|
175
215
|
),
|
|
176
216
|
binding(
|
|
177
217
|
"GET",
|
|
178
218
|
"/api/system/scheduled-task-runs",
|
|
179
219
|
"system.scheduler.read",
|
|
180
220
|
"system.scheduler",
|
|
221
|
+
"task.read",
|
|
181
222
|
),
|
|
182
223
|
binding(
|
|
183
224
|
"GET",
|
|
184
225
|
"/api/system/operations/scheduler",
|
|
185
226
|
"system.scheduler.read",
|
|
186
227
|
"system.scheduler",
|
|
228
|
+
"task.read",
|
|
187
229
|
),
|
|
188
230
|
binding(
|
|
189
231
|
"POST",
|
|
190
232
|
"/api/system/scheduled-tasks/:id/trigger",
|
|
191
233
|
"system.scheduler.manage",
|
|
192
234
|
"system.scheduler",
|
|
235
|
+
"task.trigger",
|
|
193
236
|
),
|
|
194
237
|
binding(
|
|
195
238
|
"POST",
|
|
196
239
|
"/api/system/scheduled-tasks/:id/runs/:runId/recover",
|
|
197
240
|
"system.scheduler.manage",
|
|
198
241
|
"system.scheduler",
|
|
242
|
+
"task.recover",
|
|
199
243
|
),
|
|
200
244
|
// @windy-module system.scheduler end
|
|
201
245
|
// @windy-module system.bulk-data begin
|
|
202
246
|
binding(
|
|
203
247
|
"GET",
|
|
204
248
|
"/api/system/bulk-data/jobs",
|
|
205
|
-
"system.
|
|
249
|
+
"system.bulk-data.manage",
|
|
206
250
|
"system.bulk-data",
|
|
251
|
+
"task.read",
|
|
207
252
|
),
|
|
208
253
|
binding(
|
|
209
254
|
"GET",
|
|
210
255
|
"/api/system/bulk-data/jobs/:id",
|
|
211
|
-
"system.
|
|
256
|
+
"system.bulk-data.manage",
|
|
212
257
|
"system.bulk-data",
|
|
258
|
+
"task.read",
|
|
213
259
|
),
|
|
214
260
|
binding(
|
|
215
261
|
"GET",
|
|
216
262
|
"/api/system/bulk-data/jobs/:id/artifacts/:kind",
|
|
217
|
-
"system.
|
|
263
|
+
"system.bulk-data.manage",
|
|
218
264
|
"system.bulk-data",
|
|
265
|
+
"data.bulk-artifact.download",
|
|
219
266
|
),
|
|
220
267
|
binding(
|
|
221
268
|
"POST",
|
|
222
269
|
"/api/system/bulk-data/dictionaries/import",
|
|
223
|
-
"system.
|
|
270
|
+
"system.bulk-data.manage",
|
|
224
271
|
"system.bulk-data",
|
|
272
|
+
"data.bulk-import.create",
|
|
225
273
|
),
|
|
226
274
|
binding(
|
|
227
275
|
"POST",
|
|
228
276
|
"/api/system/bulk-data/dictionaries/export",
|
|
229
|
-
"system.
|
|
277
|
+
"system.bulk-data.manage",
|
|
230
278
|
"system.bulk-data",
|
|
279
|
+
"data.bulk-export.create",
|
|
231
280
|
),
|
|
232
281
|
// @windy-module system.bulk-data end
|
|
233
282
|
];
|