@antelopejs/dms-automation 0.2.6 → 0.3.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 +46 -2
- package/dist/data/procedures-table.d.ts +38 -4
- package/dist/data/procedures-table.js +264 -82
- package/dist/data/procedures-table.js.map +1 -1
- package/dist/data/runs-table.d.ts +19 -3
- package/dist/data/runs-table.js +254 -19
- package/dist/data/runs-table.js.map +1 -1
- package/dist/db/index.d.ts +1 -2
- package/dist/db/index.js +1 -2
- package/dist/db/index.js.map +1 -1
- package/dist/db/models/automation_template.model.d.ts +16 -1
- package/dist/db/models/automation_template.model.js +31 -11
- package/dist/db/models/automation_template.model.js.map +1 -1
- package/dist/db/models/index.d.ts +1 -1
- package/dist/db/models/index.js +1 -1
- package/dist/db/models/procedure.model.d.ts +1 -0
- package/dist/db/models/procedure.model.js +7 -0
- package/dist/db/models/procedure.model.js.map +1 -1
- package/dist/db/models/procedure_run.model.d.ts +16 -9
- package/dist/db/models/procedure_run.model.js +96 -17
- package/dist/db/models/procedure_run.model.js.map +1 -1
- package/dist/db/models/stats.model.d.ts +60 -61
- package/dist/db/models/stats.model.js +189 -236
- package/dist/db/models/stats.model.js.map +1 -1
- package/dist/db/models/type_switch.model.d.ts +25 -0
- package/dist/db/models/type_switch.model.js +25 -0
- package/dist/db/models/type_switch.model.js.map +1 -0
- package/dist/db/tables/index.d.ts +1 -2
- package/dist/db/tables/index.js +1 -2
- package/dist/db/tables/index.js.map +1 -1
- package/dist/db/tables/procedure.table.d.ts +6 -0
- package/dist/db/tables/procedure.table.js +24 -0
- package/dist/db/tables/procedure.table.js.map +1 -1
- package/dist/db/tables/procedure_run.table.d.ts +15 -1
- package/dist/db/tables/procedure_run.table.js +54 -0
- package/dist/db/tables/procedure_run.table.js.map +1 -1
- package/dist/db/tables/type_switch.table.d.ts +8 -0
- package/dist/db/tables/{trigger_type_config.table.js → type_switch.table.js} +16 -15
- package/dist/db/tables/type_switch.table.js.map +1 -0
- package/dist/displays/index.d.ts +14 -0
- package/dist/displays/index.js +23 -0
- package/dist/displays/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/pages/builder.d.ts +1 -1
- package/dist/pages/builder.js +10 -3
- package/dist/pages/builder.js.map +1 -1
- package/dist/pages/index.d.ts +2 -1
- package/dist/pages/index.js +2 -1
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/library.d.ts +2 -1
- package/dist/pages/library.js +54 -4
- package/dist/pages/library.js.map +1 -1
- package/dist/pages/overview.d.ts +6 -1
- package/dist/pages/overview.js +121 -2
- package/dist/pages/overview.js.map +1 -1
- package/dist/pages/procedures.js +106 -16
- package/dist/pages/procedures.js.map +1 -1
- package/dist/pages/runs.d.ts +4 -1
- package/dist/pages/runs.js +109 -13
- package/dist/pages/runs.js.map +1 -1
- package/dist/pages/shared.d.ts +18 -0
- package/dist/pages/shared.js +238 -0
- package/dist/pages/shared.js.map +1 -0
- package/dist/pages/trace.d.ts +10 -0
- package/dist/pages/trace.js +41 -0
- package/dist/pages/trace.js.map +1 -0
- package/dist/realtime.d.ts +3 -0
- package/dist/realtime.js +14 -0
- package/dist/realtime.js.map +1 -0
- package/dist/routes/action-types.d.ts +2 -14
- package/dist/routes/action-types.js +2 -32
- package/dist/routes/action-types.js.map +1 -1
- package/dist/routes/deleteConfirm.d.ts +3 -0
- package/dist/routes/deleteConfirm.js +64 -0
- package/dist/routes/deleteConfirm.js.map +1 -0
- package/dist/routes/graphSchema.d.ts +3 -90
- package/dist/routes/graphSchema.js +36 -9
- package/dist/routes/graphSchema.js.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/library.d.ts +40 -0
- package/dist/routes/library.js +147 -0
- package/dist/routes/library.js.map +1 -0
- package/dist/routes/procedureChecks.d.ts +16 -0
- package/dist/routes/procedureChecks.js +72 -0
- package/dist/routes/procedureChecks.js.map +1 -0
- package/dist/routes/procedureRuns.d.ts +21 -0
- package/dist/routes/procedureRuns.js +45 -0
- package/dist/routes/procedureRuns.js.map +1 -0
- package/dist/routes/procedureSchemas.d.ts +107 -0
- package/dist/routes/procedureSchemas.js +61 -0
- package/dist/routes/procedureSchemas.js.map +1 -0
- package/dist/routes/procedures.d.ts +125 -7
- package/dist/routes/procedures.js +363 -67
- package/dist/routes/procedures.js.map +1 -1
- package/dist/routes/requests.d.ts +15 -0
- package/dist/routes/requests.js +35 -0
- package/dist/routes/requests.js.map +1 -0
- package/dist/routes/runs.d.ts +107 -2
- package/dist/routes/runs.js +340 -37
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/stats.d.ts +19 -1
- package/dist/routes/stats.js +160 -4
- package/dist/routes/stats.js.map +1 -1
- package/dist/routes/templates.d.ts +6 -2
- package/dist/routes/templates.js +106 -36
- package/dist/routes/templates.js.map +1 -1
- package/dist/routes/trigger-types.d.ts +2 -15
- package/dist/routes/trigger-types.js +2 -32
- package/dist/routes/trigger-types.js.map +1 -1
- package/dist/routes/typeConfigShared.d.ts +7 -11
- package/dist/routes/typeConfigShared.js +25 -15
- package/dist/routes/typeConfigShared.js.map +1 -1
- package/dist/runtime/armErrors.d.ts +16 -0
- package/dist/runtime/armErrors.js +69 -0
- package/dist/runtime/armErrors.js.map +1 -0
- package/dist/runtime/boundRunLog.d.ts +24 -0
- package/dist/runtime/boundRunLog.js +202 -10
- package/dist/runtime/boundRunLog.js.map +1 -1
- package/dist/runtime/builtins/actions/http.d.ts +10 -1
- package/dist/runtime/builtins/actions/http.js +306 -19
- package/dist/runtime/builtins/actions/http.js.map +1 -1
- package/dist/runtime/builtins/actions/log.js +2 -2
- package/dist/runtime/builtins/actions/log.js.map +1 -1
- package/dist/runtime/builtins/data/boolean.d.ts +1 -0
- package/dist/runtime/builtins/data/boolean.js +18 -10
- package/dist/runtime/builtins/data/boolean.js.map +1 -1
- package/dist/runtime/builtins/data/compare.js +60 -11
- package/dist/runtime/builtins/data/compare.js.map +1 -1
- package/dist/runtime/builtins/data/constant.js +9 -12
- package/dist/runtime/builtins/data/constant.js.map +1 -1
- package/dist/runtime/builtins/data/json.js +4 -4
- package/dist/runtime/builtins/data/json.js.map +1 -1
- package/dist/runtime/builtins/data/math.js +44 -24
- package/dist/runtime/builtins/data/math.js.map +1 -1
- package/dist/runtime/builtins/data/object.js +10 -10
- package/dist/runtime/builtins/data/object.js.map +1 -1
- package/dist/runtime/builtins/data/string.js +31 -20
- package/dist/runtime/builtins/data/string.js.map +1 -1
- package/dist/runtime/builtins/nodes/action.js +4 -0
- package/dist/runtime/builtins/nodes/action.js.map +1 -1
- package/dist/runtime/builtins/nodes/delay.js +1 -1
- package/dist/runtime/builtins/nodes/delay.js.map +1 -1
- package/dist/runtime/builtins/nodes/forRange.d.ts +1 -1
- package/dist/runtime/builtins/nodes/forRange.js +10 -4
- package/dist/runtime/builtins/nodes/forRange.js.map +1 -1
- package/dist/runtime/builtins/nodes/if.js +2 -1
- package/dist/runtime/builtins/nodes/if.js.map +1 -1
- package/dist/runtime/builtins/nodes/parallel.js +9 -2
- package/dist/runtime/builtins/nodes/parallel.js.map +1 -1
- package/dist/runtime/builtins/nodes/retry.js +1 -1
- package/dist/runtime/builtins/nodes/retry.js.map +1 -1
- package/dist/runtime/builtins/nodes/setVariable.js +1 -3
- package/dist/runtime/builtins/nodes/setVariable.js.map +1 -1
- package/dist/runtime/builtins/triggers/cron.d.ts +3 -0
- package/dist/runtime/builtins/triggers/cron.js +21 -7
- package/dist/runtime/builtins/triggers/cron.js.map +1 -1
- package/dist/runtime/builtins/triggers/manual.js +2 -2
- package/dist/runtime/builtins/triggers/manual.js.map +1 -1
- package/dist/runtime/builtins/triggers/webhook.d.ts +14 -1
- package/dist/runtime/builtins/triggers/webhook.js +116 -30
- package/dist/runtime/builtins/triggers/webhook.js.map +1 -1
- package/dist/runtime/describe.d.ts +23 -0
- package/dist/runtime/describe.js +114 -0
- package/dist/runtime/describe.js.map +1 -0
- package/dist/runtime/executionResult.d.ts +1 -0
- package/dist/runtime/executor.js +82 -5
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/graphIssues.d.ts +20 -0
- package/dist/runtime/graphIssues.js +290 -0
- package/dist/runtime/graphIssues.js.map +1 -0
- package/dist/runtime/graphVersion.d.ts +2 -0
- package/dist/runtime/graphVersion.js +43 -0
- package/dist/runtime/graphVersion.js.map +1 -0
- package/dist/runtime/nodeKinds.d.ts +4 -4
- package/dist/runtime/nodeKinds.js +1 -2
- package/dist/runtime/nodeKinds.js.map +1 -1
- package/dist/runtime/registry.d.ts +2 -1
- package/dist/runtime/registry.js +1 -2
- package/dist/runtime/registry.js.map +1 -1
- package/dist/runtime/resolveInputs.d.ts +3 -1
- package/dist/runtime/resolveInputs.js +12 -2
- package/dist/runtime/resolveInputs.js.map +1 -1
- package/dist/runtime/resolveSubgraph.d.ts +12 -1
- package/dist/runtime/resolveSubgraph.js +36 -0
- package/dist/runtime/resolveSubgraph.js.map +1 -1
- package/dist/runtime/retention.d.ts +6 -0
- package/dist/runtime/retention.js +54 -0
- package/dist/runtime/retention.js.map +1 -0
- package/dist/runtime/runProcedure.d.ts +12 -0
- package/dist/runtime/runProcedure.js +130 -0
- package/dist/runtime/runProcedure.js.map +1 -0
- package/dist/runtime/schedule.d.ts +2 -0
- package/dist/runtime/schedule.js +139 -0
- package/dist/runtime/schedule.js.map +1 -0
- package/dist/runtime/subscriptions.d.ts +11 -1
- package/dist/runtime/subscriptions.js +91 -125
- package/dist/runtime/subscriptions.js.map +1 -1
- package/dist/runtime/subwalk.js +2 -3
- package/dist/runtime/subwalk.js.map +1 -1
- package/dist/runtime/templateUsages.d.ts +4 -0
- package/dist/runtime/templateUsages.js +102 -0
- package/dist/runtime/templateUsages.js.map +1 -0
- package/dist/runtime/topo.d.ts +1 -0
- package/dist/runtime/topo.js +23 -0
- package/dist/runtime/topo.js.map +1 -1
- package/dist/runtime/trace.d.ts +44 -0
- package/dist/runtime/trace.js +240 -0
- package/dist/runtime/trace.js.map +1 -0
- package/dist/runtime/typeSwitches.d.ts +3 -0
- package/dist/runtime/typeSwitches.js +27 -0
- package/dist/runtime/typeSwitches.js.map +1 -0
- package/dist/runtime/validate.d.ts +11 -0
- package/dist/runtime/validate.js +118 -61
- package/dist/runtime/validate.js.map +1 -1
- package/dist/runtime/webhookRoutes.d.ts +4 -0
- package/dist/runtime/webhookRoutes.js +68 -0
- package/dist/runtime/webhookRoutes.js.map +1 -0
- package/dist/runtime/withTimeout.d.ts +1 -0
- package/dist/runtime/withTimeout.js +17 -0
- package/dist/runtime/withTimeout.js.map +1 -0
- package/dist/runtime/wording.d.ts +10 -0
- package/dist/runtime/wording.js +118 -0
- package/dist/runtime/wording.js.map +1 -0
- package/dist/stats/health-banner.d.ts +13 -0
- package/dist/stats/health-banner.js +149 -0
- package/dist/stats/health-banner.js.map +1 -0
- package/dist/stats/health.d.ts +49 -0
- package/dist/stats/health.js +130 -0
- package/dist/stats/health.js.map +1 -0
- package/dist/stats/kpi.d.ts +21 -0
- package/dist/stats/kpi.js +101 -0
- package/dist/stats/kpi.js.map +1 -0
- package/dist/stats/overview.d.ts +94 -0
- package/dist/stats/overview.js +244 -0
- package/dist/stats/overview.js.map +1 -0
- package/dist/types/constants.d.ts +0 -1
- package/dist/types/constants.js +1 -2
- package/dist/types/constants.js.map +1 -1
- package/dist/types/runLog.d.ts +2 -0
- package/dist/types/runLog.js +4 -0
- package/dist/types/runLog.js.map +1 -1
- package/frontend-vue/app/components/AttentionList.vue +276 -0
- package/frontend-vue/app/components/Catalog/SchemaTable.vue +127 -0
- package/frontend-vue/app/components/Catalog.vue +457 -0
- package/frontend-vue/app/components/Editor/BottomDock.vue +188 -0
- package/frontend-vue/app/components/Editor/BuilderPalette.vue +105 -44
- package/frontend-vue/app/components/Editor/GraphCanvas.vue +822 -207
- package/frontend-vue/app/components/Editor/GroupPortEditor.vue +29 -18
- package/frontend-vue/app/components/Editor/JsonField.vue +3 -3
- package/frontend-vue/app/components/Editor/NewProcedureDialog.vue +108 -0
- package/frontend-vue/app/components/Editor/NodeInspector.vue +382 -104
- package/frontend-vue/app/components/Editor/ProcedureSwitcher.vue +147 -0
- package/frontend-vue/app/components/Editor/RunNowDialog.vue +145 -0
- package/frontend-vue/app/components/Editor/WiredField.vue +3 -3
- package/frontend-vue/app/components/Editor/nodes/GenericNode.vue +97 -91
- package/frontend-vue/app/components/Editor/nodes/GroupNode.vue +5 -6
- package/frontend-vue/app/components/Editor/nodes/GroupSentinel.vue +3 -2
- package/frontend-vue/app/components/Editor/nodes/styles.ts +14 -18
- package/frontend-vue/app/components/Editor.vue +1894 -705
- package/frontend-vue/app/components/IconPicker.vue +122 -0
- package/frontend-vue/app/components/LiveTopics.vue +20 -0
- package/frontend-vue/app/components/Run/RunCompare.vue +115 -0
- package/frontend-vue/app/components/Run/RunFailure.vue +54 -0
- package/frontend-vue/app/components/Run/RunLogList.vue +167 -0
- package/frontend-vue/app/components/Run/RunPathTaken.vue +139 -0
- package/frontend-vue/app/components/Run/RunPayload.vue +85 -0
- package/frontend-vue/app/components/Run/RunWaterfall.vue +374 -0
- package/frontend-vue/app/components/RunPeek.vue +132 -0
- package/frontend-vue/app/components/RunTrace.vue +462 -0
- package/frontend-vue/app/components/Templates.vue +382 -537
- package/frontend-vue/app/components/WebhookEndpoint.vue +81 -0
- package/frontend-vue/app/composables/useAutomationNodeKinds.ts +23 -6
- package/frontend-vue/app/composables/useAutomationRuns.ts +160 -25
- package/frontend-vue/app/composables/useGraphConnect.ts +103 -51
- package/frontend-vue/app/composables/useRunActions.ts +60 -0
- package/frontend-vue/app/plugins/cell-displays.ts +169 -0
- package/frontend-vue/app/utils/automation.ts +4 -36
- package/frontend-vue/app/utils/describe.ts +252 -0
- package/frontend-vue/app/utils/redactedHeaders.ts +31 -0
- package/frontend-vue/dms.frontend.build.ts +7 -0
- package/frontend-vue/dms.frontend.ts +7 -4
- package/frontend-vue/i18n/locales/dms-automation-en-GB.json +1149 -309
- package/frontend-vue/i18n/locales/dms-automation-fr-FR.json +1154 -314
- package/frontend-vue/package.json +1 -1
- package/package.json +8 -5
- package/dist/db/models/type_config.model.d.ts +0 -47
- package/dist/db/models/type_config.model.js +0 -51
- package/dist/db/models/type_config.model.js.map +0 -1
- package/dist/db/tables/action_type_config.table.d.ts +0 -7
- package/dist/db/tables/action_type_config.table.js +0 -35
- package/dist/db/tables/action_type_config.table.js.map +0 -1
- package/dist/db/tables/trigger_type_config.table.d.ts +0 -7
- package/dist/db/tables/trigger_type_config.table.js.map +0 -1
- package/frontend-vue/app/components/Actions.vue +0 -151
- package/frontend-vue/app/components/Catalog/TypeConfigForm.vue +0 -166
- package/frontend-vue/app/components/Catalog/TypeList.vue +0 -198
- package/frontend-vue/app/components/DataNodes.vue +0 -272
- package/frontend-vue/app/components/Editor/ProcedureList.vue +0 -156
- package/frontend-vue/app/components/Editor/RunsDrawer.vue +0 -312
- package/frontend-vue/app/components/Library.vue +0 -69
- package/frontend-vue/app/components/Overview.vue +0 -503
- package/frontend-vue/app/components/RunDetailDrawer.vue +0 -165
- package/frontend-vue/app/components/RunFireTree.vue +0 -170
- package/frontend-vue/app/components/RunTraceDrawer.vue +0 -59
- package/frontend-vue/app/components/RunsStats.vue +0 -126
- package/frontend-vue/app/components/RunsTimelineDisplay.vue +0 -287
- package/frontend-vue/app/components/Triggers.vue +0 -147
- package/frontend-vue/app/plugins/runs-timeline-display.client.ts +0 -16
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TracePageController = void 0;
|
|
10
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
11
|
+
const custom_1 = require("@antelopejs/interface-dms/base/custom");
|
|
12
|
+
const layouts_1 = require("@antelopejs/interface-dms/base/layouts");
|
|
13
|
+
const shared_1 = require("./shared");
|
|
14
|
+
require("./category");
|
|
15
|
+
let TracePageController = class TracePageController extends (0, page_1.PageController)("trace", {
|
|
16
|
+
urlSlug: "trace",
|
|
17
|
+
displayName: "$dms_automation.trace.title",
|
|
18
|
+
description: "$dms_automation.trace.description",
|
|
19
|
+
icon: "i-ph-path",
|
|
20
|
+
module: "automation",
|
|
21
|
+
order: 2,
|
|
22
|
+
hidden: true,
|
|
23
|
+
}, (0, layouts_1.DefaultLayout)({ hideHeader: true })) {
|
|
24
|
+
static trace = (0, custom_1.CustomComponent)("dms-automation-run-trace")
|
|
25
|
+
.options({
|
|
26
|
+
apiUrl: shared_1.API_URL,
|
|
27
|
+
runsUrl: shared_1.RUNS_URL,
|
|
28
|
+
builderUrl: shared_1.BUILDER_URL,
|
|
29
|
+
traceUrl: shared_1.TRACE_URL,
|
|
30
|
+
})
|
|
31
|
+
.meta({
|
|
32
|
+
name: "$dms_automation.permissions.trace.name",
|
|
33
|
+
description: "$dms_automation.permissions.trace.description",
|
|
34
|
+
icon: "i-ph-path",
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
exports.TracePageController = TracePageController;
|
|
38
|
+
exports.TracePageController = TracePageController = __decorate([
|
|
39
|
+
(0, page_1.RegisterPage)()
|
|
40
|
+
], TracePageController);
|
|
41
|
+
//# sourceMappingURL=trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../src/pages/trace.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,qCAAqE;AACrE,sBAAoB;AASb,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,IAAA,qBAAc,EACrD,OAAO,EACP;IACE,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,IAAI;CACb,EACD,IAAA,uBAAa,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACpC;IACC,MAAM,CAAC,KAAK,GAAG,IAAA,wBAAe,EAAC,0BAA0B,CAAC;SACvD,OAAO,CAAC;QACP,MAAM,EAAE,gBAAO;QACf,OAAO,EAAE,iBAAQ;QACjB,UAAU,EAAE,oBAAW;QACvB,QAAQ,EAAE,kBAAS;KACpB,CAAC;SACD,IAAI,CAAC;QACJ,IAAI,EAAE,wCAAwC;QAC9C,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;;AAxBM,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAY,GAAE;GACF,mBAAmB,CAyB/B"}
|
package/dist/realtime.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PROCEDURES_TOPIC = exports.RUNS_TOPIC = void 0;
|
|
4
|
+
exports.notifyTopic = notifyTopic;
|
|
5
|
+
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
6
|
+
const interface_dms_1 = require("@antelopejs/interface-dms");
|
|
7
|
+
exports.RUNS_TOPIC = "automation.runs";
|
|
8
|
+
exports.PROCEDURES_TOPIC = "automation.procedures";
|
|
9
|
+
function notifyTopic(topic, type, payload) {
|
|
10
|
+
(0, interface_dms_1.PublishMessage)(topic, type, payload ? { payload } : undefined).catch((err) => {
|
|
11
|
+
logging_1.Logging.Warn(`[dms-automation] could not publish on ${topic}:`, err);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=realtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.js","sourceRoot":"","sources":["../src/realtime.ts"],"names":[],"mappings":";;;AAiBA,kCAUC;AA3BD,gEAA6D;AAC7D,6DAA2D;AAO9C,QAAA,UAAU,GAAG,iBAAiB,CAAC;AAG/B,QAAA,gBAAgB,GAAG,uBAAuB,CAAC;AAMxD,SAAgB,WAAW,CACzB,KAAa,EACb,IAAY,EACZ,OAAiC;IAEjC,IAAA,8BAAc,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAClE,CAAC,GAAY,EAAE,EAAE;QACf,iBAAO,CAAC,IAAI,CAAC,yCAAyC,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC;IACvE,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
2
|
declare const ActionTypesController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
3
3
|
export declare class ActionTypesController extends ActionTypesController_base {
|
|
4
|
-
list(_user: User): Promise<{
|
|
5
|
-
globalConfig: string;
|
|
4
|
+
list(_user: User): Promise<(Omit<import("@antelopejs/interface-dms-automation").ActionType<unknown, unknown>, "execute"> & import("../runtime/typeOrigin").TypeOrigin & {
|
|
6
5
|
enabled: boolean;
|
|
7
|
-
|
|
8
|
-
description: string;
|
|
9
|
-
icon: string;
|
|
10
|
-
id: string;
|
|
11
|
-
inputSchema: import("@antelopejs/interface-dms-automation").JsonSchema;
|
|
12
|
-
outputSchema: import("@antelopejs/interface-dms-automation").JsonSchema;
|
|
13
|
-
module?: string;
|
|
14
|
-
}[]>;
|
|
15
|
-
getConfig(_user: User, id: string): Promise<{
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
config: string;
|
|
18
|
-
}>;
|
|
6
|
+
})[]>;
|
|
19
7
|
setConfig(_user: User, id: string, body: unknown): Promise<{
|
|
20
8
|
id: string;
|
|
21
9
|
}>;
|
|
@@ -14,39 +14,17 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ActionTypesController = void 0;
|
|
16
16
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
-
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
18
17
|
const guards_1 = require("@antelopejs/interface-dms/guards");
|
|
19
18
|
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
20
|
-
const type_config_model_1 = require("../db/models/type_config.model");
|
|
21
19
|
const library_1 = require("../pages/library");
|
|
22
20
|
const registry_1 = require("../runtime/registry");
|
|
23
|
-
const constants_1 = require("../types/constants");
|
|
24
21
|
const typeConfigShared_1 = require("./typeConfigShared");
|
|
25
22
|
let ActionTypesController = class ActionTypesController extends (0, interface_api_1.Controller)("/api/automation/action-types") {
|
|
26
23
|
async list(_user) {
|
|
27
|
-
|
|
28
|
-
const actions = registry_1.registry.listActions();
|
|
29
|
-
return Promise.all(actions.map(async (a) => {
|
|
30
|
-
const cfg = await model.getByTypeId(a.id);
|
|
31
|
-
return {
|
|
32
|
-
...(0, typeConfigShared_1.serializeAction)(a),
|
|
33
|
-
globalConfig: cfg?.config ?? "{}",
|
|
34
|
-
enabled: cfg?.enabled ?? true,
|
|
35
|
-
};
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
async getConfig(_user, id) {
|
|
39
|
-
const model = (0, interface_database_decorators_1.GetModel)(type_config_model_1.ActionTypeConfigModel, constants_1.DATABASE_NAME);
|
|
40
|
-
const cfg = await model.getByTypeId(id);
|
|
41
|
-
if (!cfg) {
|
|
42
|
-
return { enabled: true, config: "{}" };
|
|
43
|
-
}
|
|
44
|
-
return { enabled: cfg.enabled, config: cfg.config };
|
|
24
|
+
return await (0, typeConfigShared_1.listWithSwitches)("action", registry_1.registry.listActions(), typeConfigShared_1.serializeAction);
|
|
45
25
|
}
|
|
46
26
|
async setConfig(_user, id, body) {
|
|
47
|
-
|
|
48
|
-
await model.upsertByTypeId(id, (0, typeConfigShared_1.parseConfigBody)(body));
|
|
49
|
-
return { id };
|
|
27
|
+
return await (0, typeConfigShared_1.switchType)("action", registry_1.registry.getAction(id), id, body);
|
|
50
28
|
}
|
|
51
29
|
};
|
|
52
30
|
exports.ActionTypesController = ActionTypesController;
|
|
@@ -57,14 +35,6 @@ __decorate([
|
|
|
57
35
|
__metadata("design:paramtypes", [Function]),
|
|
58
36
|
__metadata("design:returntype", Promise)
|
|
59
37
|
], ActionTypesController.prototype, "list", null);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, interface_api_1.Get)("/:id/config"),
|
|
62
|
-
__param(0, (0, auth_1.AuthRawUser)()),
|
|
63
|
-
__param(1, (0, interface_api_1.Parameter)("id", "param")),
|
|
64
|
-
__metadata("design:type", Function),
|
|
65
|
-
__metadata("design:paramtypes", [Function, String]),
|
|
66
|
-
__metadata("design:returntype", Promise)
|
|
67
|
-
], ActionTypesController.prototype, "getConfig", null);
|
|
68
38
|
__decorate([
|
|
69
39
|
(0, interface_api_1.Put)("/:id/config"),
|
|
70
40
|
__param(0, (0, guards_1.AuthUserWithPermission)(library_1.LibraryPageController)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-types.js","sourceRoot":"","sources":["../../src/routes/action-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAMmC;AACnC,
|
|
1
|
+
{"version":3,"file":"action-types.js","sourceRoot":"","sources":["../../src/routes/action-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAMmC;AACnC,6DAA0E;AAC1E,yDAA4E;AAE5E,8CAAyD;AACzD,kDAA+C;AAC/C,yDAI4B;AAGrB,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAA,0BAAU,EACnD,8BAA8B,CAC/B;IAEO,AAAN,KAAK,CAAC,IAAI,CAAgB,KAAW;QACnC,OAAO,MAAM,IAAA,mCAAgB,EAC3B,QAAQ,EACR,mBAAQ,CAAC,WAAW,EAAE,EACtB,kCAAe,CAChB,CAAC;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CACkC,KAAW,EAChC,EAAU,EACxB,IAAa;QAEzB,OAAO,MAAM,IAAA,6BAAU,EAAC,QAAQ,EAAE,mBAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;CACF,CAAA;AApBY,sDAAqB;AAI1B;IADL,IAAA,mBAAG,EAAC,EAAE,CAAC;IACI,WAAA,IAAA,kBAAW,GAAE,CAAA;;;;iDAMxB;AAGK;IADL,IAAA,mBAAG,EAAC,aAAa,CAAC;IAEhB,WAAA,IAAA,+BAAsB,EAAC,+BAAqB,CAAC,CAAA;IAC7C,WAAA,IAAA,yBAAS,EAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACxB,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;sDAGZ;gCAnBU,qBAAqB;IADjC,IAAA,oBAAa,GAAE;GACH,qBAAqB,CAoBjC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteDialogOf = deleteDialogOf;
|
|
4
|
+
const describe_1 = require("../runtime/describe");
|
|
5
|
+
const wording_1 = require("../runtime/wording");
|
|
6
|
+
const requests_1 = require("./requests");
|
|
7
|
+
const WEEKDAY_KEY = /\.days\.(\w+)$/;
|
|
8
|
+
function scheduleImpact(cron, params) {
|
|
9
|
+
const text = (0, wording_1.cronText)(cron);
|
|
10
|
+
if (typeof text === "string")
|
|
11
|
+
return text;
|
|
12
|
+
const own = { ...text.params };
|
|
13
|
+
let key = text.key;
|
|
14
|
+
const day = own.day;
|
|
15
|
+
if (day && typeof day === "object") {
|
|
16
|
+
const weekday = WEEKDAY_KEY.exec(day.key ?? "")?.[1];
|
|
17
|
+
if (!weekday)
|
|
18
|
+
return cron;
|
|
19
|
+
key = `${requests_1.API_MESSAGES.slice(1)}.weekly.${weekday}`;
|
|
20
|
+
delete own.day;
|
|
21
|
+
}
|
|
22
|
+
if (Object.keys(own).some((name) => name in params))
|
|
23
|
+
return cron;
|
|
24
|
+
Object.assign(params, own);
|
|
25
|
+
return `$${key}`;
|
|
26
|
+
}
|
|
27
|
+
function stopImpact(graph, params) {
|
|
28
|
+
return (graph ? (0, describe_1.triggersOf)(graph) : [])
|
|
29
|
+
.filter((t) => t.path || t.cron)
|
|
30
|
+
.map((t) => t.path
|
|
31
|
+
? {
|
|
32
|
+
icon: "i-ph-webhooks-logo",
|
|
33
|
+
label: `${requests_1.API_MESSAGES}.deleteImpact.webhook`,
|
|
34
|
+
count: `${t.method} ${t.path}`,
|
|
35
|
+
}
|
|
36
|
+
: {
|
|
37
|
+
icon: "i-ph-clock",
|
|
38
|
+
label: "$dms_automation.procedures.deleteImpact.schedule",
|
|
39
|
+
count: scheduleImpact(t.cron ?? "", params),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function deleteDialogOf(procedure, runCount) {
|
|
43
|
+
const params = {
|
|
44
|
+
name: procedure.name,
|
|
45
|
+
count: runCount,
|
|
46
|
+
};
|
|
47
|
+
const dialog = {
|
|
48
|
+
title: "$dms_automation.procedures.deleteTitle",
|
|
49
|
+
description: procedure.enabled
|
|
50
|
+
? `${requests_1.API_MESSAGES}.deleteEnabledDescription`
|
|
51
|
+
: `${requests_1.API_MESSAGES}.deleteDescription`,
|
|
52
|
+
params,
|
|
53
|
+
icon: "i-ph-trash",
|
|
54
|
+
color: "error",
|
|
55
|
+
confirmLabel: "$dms_automation.procedures.deleteConfirm",
|
|
56
|
+
impact: procedure.enabled
|
|
57
|
+
? stopImpact((0, describe_1.parseGraphSafe)(procedure.graph), params)
|
|
58
|
+
: [],
|
|
59
|
+
};
|
|
60
|
+
if (procedure.enabled)
|
|
61
|
+
dialog.confirmText = procedure.name;
|
|
62
|
+
return dialog;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=deleteConfirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteConfirm.js","sourceRoot":"","sources":["../../src/routes/deleteConfirm.ts"],"names":[],"mappings":";;AA8DA,wCAwBC;AAjFD,kDAAiE;AACjE,gDAA8C;AAE9C,yCAA0C;AAE1C,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAOrC,SAAS,cAAc,CAAC,IAAY,EAAE,MAA+B;IACnE,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,GAAG,GAA4B,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IACxD,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAEnB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAmC,CAAC;IACpD,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,GAAG,GAAG,GAAG,uBAAY,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,OAAO,EAAE,CAAC;QACnD,OAAO,GAAG,CAAC,GAAG,CAAC;IACjB,CAAC;IACD,IAAI,MAA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E,YAAY;QAClB,KAAK,EAAE,OAAO;QACd,YAAY,EAAE,0CAA0C;QACxD,MAAM,EAAE,SAAS,CAAC,OAAO;YACvB,CAAC,CAAC,UAAU,CAAC,IAAA,yBAAc,EAAC,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YACrD,CAAC,CAAC,EAAE;KACP,CAAC;IAEF,IAAI,SAAS,CAAC,OAAO;QAAE,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC;IAC3D,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,92 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GroupPort, ProcedureGraph } from "../types/graph";
|
|
3
3
|
export declare const groupPortSchema: z.ZodType<GroupPort>;
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
from: z.ZodObject<{
|
|
7
|
-
node: z.ZodString;
|
|
8
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
node: string;
|
|
11
|
-
branch?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
node: string;
|
|
14
|
-
branch?: string | undefined;
|
|
15
|
-
}>;
|
|
16
|
-
to: z.ZodObject<{
|
|
17
|
-
node: z.ZodString;
|
|
18
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
node: string;
|
|
21
|
-
branch?: string | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
node: string;
|
|
24
|
-
branch?: string | undefined;
|
|
25
|
-
}>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
id: string;
|
|
28
|
-
from: {
|
|
29
|
-
node: string;
|
|
30
|
-
branch?: string | undefined;
|
|
31
|
-
};
|
|
32
|
-
to: {
|
|
33
|
-
node: string;
|
|
34
|
-
branch?: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
}, {
|
|
37
|
-
id: string;
|
|
38
|
-
from: {
|
|
39
|
-
node: string;
|
|
40
|
-
branch?: string | undefined;
|
|
41
|
-
};
|
|
42
|
-
to: {
|
|
43
|
-
node: string;
|
|
44
|
-
branch?: string | undefined;
|
|
45
|
-
};
|
|
46
|
-
}>;
|
|
47
|
-
export declare const dataEdgeSchema: z.ZodObject<{
|
|
48
|
-
id: z.ZodString;
|
|
49
|
-
from: z.ZodObject<{
|
|
50
|
-
node: z.ZodString;
|
|
51
|
-
port: z.ZodString;
|
|
52
|
-
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
port: string;
|
|
54
|
-
node: string;
|
|
55
|
-
}, {
|
|
56
|
-
port: string;
|
|
57
|
-
node: string;
|
|
58
|
-
}>;
|
|
59
|
-
to: z.ZodObject<{
|
|
60
|
-
node: z.ZodString;
|
|
61
|
-
field: z.ZodString;
|
|
62
|
-
}, "strip", z.ZodTypeAny, {
|
|
63
|
-
node: string;
|
|
64
|
-
field: string;
|
|
65
|
-
}, {
|
|
66
|
-
node: string;
|
|
67
|
-
field: string;
|
|
68
|
-
}>;
|
|
69
|
-
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
id: string;
|
|
71
|
-
from: {
|
|
72
|
-
port: string;
|
|
73
|
-
node: string;
|
|
74
|
-
};
|
|
75
|
-
to: {
|
|
76
|
-
node: string;
|
|
77
|
-
field: string;
|
|
78
|
-
};
|
|
79
|
-
}, {
|
|
80
|
-
id: string;
|
|
81
|
-
from: {
|
|
82
|
-
port: string;
|
|
83
|
-
node: string;
|
|
84
|
-
};
|
|
85
|
-
to: {
|
|
86
|
-
node: string;
|
|
87
|
-
field: string;
|
|
88
|
-
};
|
|
89
|
-
}>;
|
|
90
|
-
export declare const procedureGraphSchema: z.ZodType<ProcedureGraph>;
|
|
91
|
-
export declare const graphNodeSchema: z.ZodType<GraphNode>;
|
|
92
|
-
export declare function parseAndValidate<T>(schema: z.ZodType<T>, body: unknown, graphSelector: (data: T) => ProcedureGraph): T;
|
|
4
|
+
export declare const procedureGraphSchema: z.ZodType<ProcedureGraph, z.ZodTypeDef, unknown>;
|
|
5
|
+
export declare function parseAndValidate<T>(schema: z.ZodType<T, z.ZodTypeDef, unknown>, body: unknown, graphSelector: (data: T) => ProcedureGraph): T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.procedureGraphSchema = exports.groupPortSchema = void 0;
|
|
4
4
|
exports.parseAndValidate = parseAndValidate;
|
|
5
5
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -13,22 +13,49 @@ exports.groupPortSchema = zod_1.z.object({
|
|
|
13
13
|
direction: zod_1.z.enum(["in", "out"]),
|
|
14
14
|
schema: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
15
15
|
});
|
|
16
|
-
|
|
16
|
+
const triggerEdgeSchema = zod_1.z.object({
|
|
17
17
|
id: zod_1.z.string(),
|
|
18
18
|
from: zod_1.z.object({ node: zod_1.z.string(), branch: zod_1.z.string().optional() }),
|
|
19
19
|
to: zod_1.z.object({ node: zod_1.z.string(), branch: zod_1.z.string().optional() }),
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
const dataEdgeSchema = zod_1.z.object({
|
|
22
22
|
id: zod_1.z.string(),
|
|
23
23
|
from: zod_1.z.object({ node: zod_1.z.string(), port: zod_1.z.string() }),
|
|
24
24
|
to: zod_1.z.object({ node: zod_1.z.string(), field: zod_1.z.string() }),
|
|
25
25
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
function groupDepthOf(value, max) {
|
|
27
|
+
let deepest = 0;
|
|
28
|
+
const pending = [
|
|
29
|
+
{ graph: value, depth: 0 },
|
|
30
|
+
];
|
|
31
|
+
while (pending.length > 0) {
|
|
32
|
+
const { graph, depth } = pending.pop();
|
|
33
|
+
deepest = Math.max(deepest, depth);
|
|
34
|
+
if (deepest > max)
|
|
35
|
+
return deepest;
|
|
36
|
+
const nodes = graph?.nodes;
|
|
37
|
+
if (!Array.isArray(nodes))
|
|
38
|
+
continue;
|
|
39
|
+
for (const node of nodes) {
|
|
40
|
+
const subgraph = node?.subgraph;
|
|
41
|
+
if (subgraph)
|
|
42
|
+
pending.push({ graph: subgraph, depth: depth + 1 });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return deepest;
|
|
46
|
+
}
|
|
47
|
+
const graphShapeSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
48
|
+
nodes: zod_1.z.array(graphNodeSchema),
|
|
49
|
+
triggerEdges: zod_1.z.array(triggerEdgeSchema),
|
|
50
|
+
dataEdges: zod_1.z.array(dataEdgeSchema),
|
|
30
51
|
}));
|
|
31
|
-
exports.
|
|
52
|
+
exports.procedureGraphSchema = zod_1.z
|
|
53
|
+
.unknown()
|
|
54
|
+
.refine((graph) => groupDepthOf(graph, validate_1.MAX_GROUP_DEPTH) <= validate_1.MAX_GROUP_DEPTH, {
|
|
55
|
+
message: `groups are nested more than ${validate_1.MAX_GROUP_DEPTH} levels deep`,
|
|
56
|
+
})
|
|
57
|
+
.pipe(graphShapeSchema);
|
|
58
|
+
const graphNodeSchema = zod_1.z.lazy(() => zod_1.z
|
|
32
59
|
.object({
|
|
33
60
|
id: zod_1.z.string(),
|
|
34
61
|
kind: nodeKindSchema,
|
|
@@ -37,7 +64,7 @@ exports.graphNodeSchema = zod_1.z.lazy(() => zod_1.z
|
|
|
37
64
|
position: zod_1.z.object({ x: zod_1.z.number(), y: zod_1.z.number() }),
|
|
38
65
|
templateId: zod_1.z.string().optional(),
|
|
39
66
|
ports: zod_1.z.array(zod_1.z.lazy(() => exports.groupPortSchema)).optional(),
|
|
40
|
-
subgraph:
|
|
67
|
+
subgraph: graphShapeSchema.optional(),
|
|
41
68
|
})
|
|
42
69
|
.passthrough());
|
|
43
70
|
function parseAndValidate(schema, body, graphSelector) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphSchema.js","sourceRoot":"","sources":["../../src/routes/graphSchema.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"graphSchema.js","sourceRoot":"","sources":["../../src/routes/graphSchema.ts"],"names":[],"mappings":";;;AA2GA,4CAoBC;AA/HD,6DAAuD;AACvD,6BAAwB;AACxB,oDAAyD;AACzD,kDAI6B;AAW7B,MAAM,cAAc,GAAG,IAAA,6BAAiB,GAAE,CAAC;AAE9B,QAAA,eAAe,GAAyB,OAAC,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChC,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IAGnE,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;CAClE,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,OAAC,CA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AAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,0BAAU,CAAC,GAAG,EAAE;YACxB,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,MAAM,OAAO,GAAmB,IAAA,wBAAa,EAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1E,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAChB,MAAM,IAAI,0BAAU,CAAC,GAAG,EAAE;YACxB,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
package/dist/routes/index.d.ts
CHANGED
package/dist/routes/index.js
CHANGED
package/dist/routes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;AAAA,wBAAsB;AACtB,2BAAyB;AACzB,0BAAwB;AACxB,6BAA2B;AAC3B,wBAAsB;AACtB,kBAAgB;AAChB,mBAAiB;AACjB,uBAAqB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;AAAA,wBAAsB;AACtB,2BAAyB;AACzB,0BAAwB;AACxB,6BAA2B;AAC3B,wBAAsB;AACtB,kBAAgB;AAChB,mBAAiB;AACjB,uBAAqB;AACrB,qBAAmB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type RequestContext } from "@antelopejs/interface-api";
|
|
2
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
3
|
+
import type { BlockText } from "@antelopejs/interface-dms/base/types";
|
|
4
|
+
import type { GraphNode } from "../types/graph";
|
|
5
|
+
interface TypeUsage {
|
|
6
|
+
procedureId: string;
|
|
7
|
+
procedureName: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
state: string;
|
|
10
|
+
nodeId: string;
|
|
11
|
+
nodeLabel: string | null;
|
|
12
|
+
groupPath: string[];
|
|
13
|
+
groupLabel: string | null;
|
|
14
|
+
viaTemplate: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
} | null;
|
|
18
|
+
method?: string;
|
|
19
|
+
path?: string;
|
|
20
|
+
cron?: string;
|
|
21
|
+
timeZone?: string;
|
|
22
|
+
cronText?: BlockText;
|
|
23
|
+
}
|
|
24
|
+
export declare function triggerUsageOf(node: GraphNode): Pick<TypeUsage, "method" | "path" | "cron" | "timeZone" | "cronText">;
|
|
25
|
+
declare const LibraryController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
26
|
+
export declare class LibraryController extends LibraryController_base {
|
|
27
|
+
counts(_user: User): Promise<{
|
|
28
|
+
triggers: number;
|
|
29
|
+
actions: number;
|
|
30
|
+
dataNodes: number;
|
|
31
|
+
templates: number;
|
|
32
|
+
flow: number;
|
|
33
|
+
}>;
|
|
34
|
+
webhookBase(_user: User, context: RequestContext): Promise<{
|
|
35
|
+
url: string;
|
|
36
|
+
configured: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
usage(_user: User, catalog: string): Promise<Record<string, TypeUsage[]>>;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.LibraryController = void 0;
|
|
16
|
+
exports.triggerUsageOf = triggerUsageOf;
|
|
17
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
18
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
19
|
+
const api_base_url_1 = require("@antelopejs/interface-dms/api-base-url");
|
|
20
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
21
|
+
const automation_template_model_1 = require("../db/models/automation_template.model");
|
|
22
|
+
const stats_model_1 = require("../db/models/stats.model");
|
|
23
|
+
const describe_1 = require("../runtime/describe");
|
|
24
|
+
const nodeKinds_1 = require("../runtime/nodeKinds");
|
|
25
|
+
const registry_1 = require("../runtime/registry");
|
|
26
|
+
const resolveSubgraph_1 = require("../runtime/resolveSubgraph");
|
|
27
|
+
const wording_1 = require("../runtime/wording");
|
|
28
|
+
const constants_1 = require("../types/constants");
|
|
29
|
+
const FLOW_CATEGORIES = new Set(["flow", "helper"]);
|
|
30
|
+
function isFlowKind(kind) {
|
|
31
|
+
const category = nodeKinds_1.nodeKinds.metaOf(kind)?.ui?.category;
|
|
32
|
+
return !!category && FLOW_CATEGORIES.has(category);
|
|
33
|
+
}
|
|
34
|
+
const ENTRY_OF_CATALOG = new Map([
|
|
35
|
+
["triggers", (node) => (node.kind === "trigger" ? node.typeId : undefined)],
|
|
36
|
+
["actions", (node) => (node.kind === "action" ? node.typeId : undefined)],
|
|
37
|
+
["dataNodes", (node) => (node.kind === "data" ? node.typeId : undefined)],
|
|
38
|
+
["flow", (node) => (isFlowKind(node.kind) ? node.kind : undefined)],
|
|
39
|
+
]);
|
|
40
|
+
function triggerUsageOf(node) {
|
|
41
|
+
const { method, path, cron, timeZone } = (0, describe_1.summarizeTrigger)(node);
|
|
42
|
+
return {
|
|
43
|
+
method,
|
|
44
|
+
path,
|
|
45
|
+
cron,
|
|
46
|
+
timeZone,
|
|
47
|
+
cronText: cron ? (0, wording_1.cronText)(cron, timeZone) : undefined,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
let LibraryController = class LibraryController extends (0, interface_api_1.Controller)("/api/automation/library") {
|
|
51
|
+
async counts(_user) {
|
|
52
|
+
const templates = await (0, interface_database_decorators_1.GetModel)(automation_template_model_1.AutomationTemplateModel, constants_1.DATABASE_NAME)
|
|
53
|
+
.table.count()
|
|
54
|
+
.run();
|
|
55
|
+
return {
|
|
56
|
+
triggers: registry_1.registry.listTriggers().length,
|
|
57
|
+
actions: registry_1.registry.listActions().length,
|
|
58
|
+
dataNodes: registry_1.registry.listDataNodes().length,
|
|
59
|
+
templates,
|
|
60
|
+
flow: nodeKinds_1.nodeKinds.listAll().filter(({ kind }) => isFlowKind(kind)).length,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
async webhookBase(_user, context) {
|
|
64
|
+
const base = (await (0, api_base_url_1.GetApiBaseUrl)())?.trim().replace(/\/+$/, "");
|
|
65
|
+
if (!base)
|
|
66
|
+
return { url: context.url.origin, configured: false };
|
|
67
|
+
return { url: base, configured: !isLoopback(base) };
|
|
68
|
+
}
|
|
69
|
+
async usage(_user, catalog) {
|
|
70
|
+
const entryOf = ENTRY_OF_CATALOG.get(catalog);
|
|
71
|
+
if (!entryOf) {
|
|
72
|
+
throw new interface_api_1.HTTPResult(404, { error: `catalog "${catalog}" not found` });
|
|
73
|
+
}
|
|
74
|
+
const [ctx, templates] = await Promise.all([
|
|
75
|
+
(0, stats_model_1.loadStatsContext)(),
|
|
76
|
+
(0, interface_database_decorators_1.GetModel)(automation_template_model_1.AutomationTemplateModel, constants_1.DATABASE_NAME).listAll(),
|
|
77
|
+
]);
|
|
78
|
+
const templateById = new Map(templates.map((t) => [t._id, t]));
|
|
79
|
+
const health = (0, stats_model_1.healthByProcedure)(ctx);
|
|
80
|
+
const out = {};
|
|
81
|
+
for (const { procedure, graph } of ctx.procedures) {
|
|
82
|
+
if (!graph)
|
|
83
|
+
continue;
|
|
84
|
+
for (const { node, groups, viaTemplate } of (0, resolveSubgraph_1.walkPlacedNodes)(graph, templateById)) {
|
|
85
|
+
const entry = entryOf(node);
|
|
86
|
+
if (!entry)
|
|
87
|
+
continue;
|
|
88
|
+
const group = groups.at(-1);
|
|
89
|
+
const template = viaTemplate?.templateId
|
|
90
|
+
? templateById.get(viaTemplate.templateId)
|
|
91
|
+
: undefined;
|
|
92
|
+
const usage = {
|
|
93
|
+
procedureId: procedure._id,
|
|
94
|
+
procedureName: procedure.name,
|
|
95
|
+
enabled: procedure.enabled,
|
|
96
|
+
state: health.get(procedure._id)?.state ?? "draft",
|
|
97
|
+
nodeId: viaTemplate?.id ?? node.id,
|
|
98
|
+
nodeLabel: (0, describe_1.labelOf)(node) ?? null,
|
|
99
|
+
groupPath: groups.map((g) => g.id),
|
|
100
|
+
groupLabel: group ? ((0, describe_1.labelOf)(group) ?? null) : null,
|
|
101
|
+
viaTemplate: template
|
|
102
|
+
? { id: template._id, name: template.name }
|
|
103
|
+
: null,
|
|
104
|
+
};
|
|
105
|
+
if (node.kind === "trigger") {
|
|
106
|
+
Object.assign(usage, triggerUsageOf(node));
|
|
107
|
+
}
|
|
108
|
+
(out[entry] ??= []).push(usage);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return out;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
exports.LibraryController = LibraryController;
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, interface_api_1.Get)("/counts"),
|
|
117
|
+
__param(0, (0, auth_1.AuthRawUser)()),
|
|
118
|
+
__metadata("design:type", Function),
|
|
119
|
+
__metadata("design:paramtypes", [Function]),
|
|
120
|
+
__metadata("design:returntype", Promise)
|
|
121
|
+
], LibraryController.prototype, "counts", null);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, interface_api_1.Get)("/webhook-base"),
|
|
124
|
+
__param(0, (0, auth_1.AuthRawUser)()),
|
|
125
|
+
__param(1, (0, interface_api_1.Context)()),
|
|
126
|
+
__metadata("design:type", Function),
|
|
127
|
+
__metadata("design:paramtypes", [Function, Object]),
|
|
128
|
+
__metadata("design:returntype", Promise)
|
|
129
|
+
], LibraryController.prototype, "webhookBase", null);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, interface_api_1.Get)("/usage/:catalog"),
|
|
132
|
+
__param(0, (0, auth_1.AuthRawUser)()),
|
|
133
|
+
__param(1, (0, interface_api_1.Parameter)("catalog", "param")),
|
|
134
|
+
__metadata("design:type", Function),
|
|
135
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
136
|
+
__metadata("design:returntype", Promise)
|
|
137
|
+
], LibraryController.prototype, "usage", null);
|
|
138
|
+
exports.LibraryController = LibraryController = __decorate([
|
|
139
|
+
(0, auth_1.AuthOwnerOnly)()
|
|
140
|
+
], LibraryController);
|
|
141
|
+
function isLoopback(url) {
|
|
142
|
+
const { hostname } = new URL(url);
|
|
143
|
+
return (hostname === "localhost" ||
|
|
144
|
+
hostname === "[::1]" ||
|
|
145
|
+
hostname.startsWith("127."));
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=library.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/routes/library.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwEA,wCAWC;AAnFD,6DAOmC;AACnC,6FAAqE;AACrE,yEAAuE;AACvE,yDAA4E;AAG5E,sFAAiF;AACjF,0DA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