@thinkingai/ae-cli 6.0.52 → 6.0.53
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 +7 -1
- package/README.zh.md +7 -1
- package/dist/{auth-XZNXFRJS.js → auth-LHM7NQPR.js} +167 -7
- package/dist/{capability-RJZ4KRGP.js → capability-F2RIR5DS.js} +11 -6
- package/dist/{chunk-57RRFUEZ.js → chunk-5XRQ3CZR.js} +4 -4
- package/dist/{chunk-L2QUIZTS.js → chunk-647BRKZK.js} +3 -3
- package/dist/{chunk-EQ255HKO.js → chunk-7WZACOAI.js} +2 -2
- package/dist/{chunk-DX5CDO34.js → chunk-BW7JUDEI.js} +84 -19
- package/dist/{chunk-7XGFSUOM.js → chunk-DU72X2IO.js} +271 -76
- package/dist/{chunk-V2NUHPXF.js → chunk-GK7WDY7E.js} +1 -1
- package/dist/{chunk-7FTTULED.js → chunk-IG3DYEIR.js} +4 -1
- package/dist/{chunk-HBGADCKA.js → chunk-KJDOTPYU.js} +3 -3
- package/dist/{chunk-4NRCTUZJ.js → chunk-KS4DE3MX.js} +4 -4
- package/dist/{chunk-JOCDD4ON.js → chunk-N4BLPJC7.js} +1 -1
- package/dist/{chunk-WEPZ5M3Z.js → chunk-PGCIKZRE.js} +7 -4
- package/dist/{chunk-HFGZGYCG.js → chunk-QYXDJOLA.js} +252 -6
- package/dist/{chunk-DVMLWQD4.js → chunk-SO5LKIWP.js} +2 -2
- package/dist/{chunk-MAPZ7VB6.js → chunk-YVGXGTD6.js} +13 -0
- package/dist/{community-report-client-CU22W53K.js → community-report-client-6VJDDMJJ.js} +1 -1
- package/dist/{config-XO3LI3SA.js → config-XQWOPDHN.js} +25 -6
- package/dist/{context-IFJI3LIT.js → context-M3HDGEIR.js} +4 -4
- package/dist/{data-integration-HNGUKFIC.js → data-integration-XBTCGXQT.js} +6 -6
- package/dist/index.js +77 -40
- package/dist/{local-data-upload-client-GTRIT64F.js → local-data-upload-client-3P7NIVQ4.js} +1 -1
- package/dist/{memory-QGPSNCQS.js → memory-6APEB2JB.js} +4 -4
- package/dist/{metadata-JAQW7KGZ.js → metadata-V5ZDTKWZ.js} +7 -7
- package/dist/{model-RNPQXIBI.js → model-ZS7HVGKN.js} +4 -4
- package/dist/{personal-semantic-preference-QCZ2IZTK.js → personal-semantic-preference-2XANU3F6.js} +8 -6
- package/dist/{project-semantic-64JURXKF.js → project-semantic-LP3LY7QP.js} +7 -7
- package/dist/{sync-O45NXEQY.js → sync-EQLSTUS7.js} +7 -7
- package/dist/{te-agent-K5MSPNHJ.js → te-agent-Z3HCTKR7.js} +348 -55
- package/dist/{te-analysis-KQKCAI5H.js → te-analysis-3EVYQ3IO.js} +803 -57
- package/dist/{te-community-4OYU3BDA.js → te-community-Z7JACGF3.js} +3 -3
- package/dist/{te-dataops-NFIPB6FX.js → te-dataops-F7GQOIS6.js} +644 -276
- package/dist/{te-engage-HSVSRW22.js → te-engage-LFBU6WWH.js} +6 -6
- package/dist/{te-kb-3TS73NO6.js → te-kb-QJLJEX5K.js} +323 -181
- package/dist/{te-system-STMHLS5J.js → te-system-IXC43QHZ.js} +6 -6
- package/dist/{te-team-3I5AOX3N.js → te-team-BIZIKIHZ.js} +6 -6
- package/dist/{update-RZXLPCRH.js → update-W2SGQNKT.js} +4 -4
- package/package.json +11 -4
- package/skills/ae-agent/SKILL.md +9 -4
- package/skills/ae-agent/references/notification.md +40 -0
- package/skills/ae-analysis/SKILL.md +64 -12
- package/skills/ae-analysis/references/agent_review_submit_to_page.md +2 -0
- package/skills/ae-analysis/references/ai_models/event.md +6 -1
- package/skills/ae-analysis/references/ai_models/funnel.md +7 -1
- package/skills/ae-analysis/references/ai_models/heat_map.md +23 -0
- package/skills/ae-analysis/references/ai_models/interval.md +24 -0
- package/skills/ae-analysis/references/ai_models/path.md +20 -0
- package/skills/ae-analysis/references/ai_models/prop_analysis.md +2 -0
- package/skills/ae-analysis/references/ai_models/rank_list.md +30 -0
- package/skills/ae-analysis/references/ai_models/retention.md +45 -1
- package/skills/ae-analysis/references/ai_models/revenue.md +20 -2
- package/skills/ae-analysis/references/ai_models/tag.md +2 -0
- package/skills/ae-analysis/references/ai_models.md +69 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +4 -0
- package/skills/ae-analysis/references/asset_batch_info_export.md +10 -0
- package/skills/ae-analysis/references/asset_batch_sql_export.md +13 -1
- package/skills/ae-analysis/references/asset_export.md +12 -1
- package/skills/ae-analysis/references/asset_list.md +1 -0
- package/skills/ae-analysis/references/asset_search.md +11 -5
- package/skills/ae-analysis/references/bi_panel_list.md +1 -1
- package/skills/ae-analysis/references/catalog_list.md +1 -1
- package/skills/ae-analysis/references/collaboration.md +48 -0
- package/skills/ae-analysis/references/command_index.md +16 -15
- package/skills/ae-analysis/references/dashboard_list.md +4 -4
- package/skills/ae-analysis/references/dashboard_report_data_export.md +2 -0
- package/skills/ae-analysis/references/event_export.md +3 -1
- package/skills/ae-analysis/references/governance_recommendation_auto_review.md +71 -0
- package/skills/ae-analysis/references/governance_recommendation_export.md +11 -0
- package/skills/ae-analysis/references/metadata_resolution.md +3 -3
- package/skills/ae-analysis/references/metric_export.md +3 -1
- package/skills/ae-analysis/references/metric_list.md +1 -1
- package/skills/ae-analysis/references/operation_record_export.md +10 -0
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +2 -2
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +6 -4
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +5 -3
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +1 -1
- package/skills/ae-analysis/references/property_export.md +3 -1
- package/skills/ae-analysis/references/report_create.md +4 -0
- package/skills/ae-analysis/references/report_data_export.md +6 -0
- package/skills/ae-analysis/references/report_get.md +2 -0
- package/skills/ae-analysis/references/report_list.md +5 -5
- package/skills/ae-analysis/references/report_update.md +6 -0
- package/skills/ae-analysis/references/sql_table_columns.md +4 -4
- package/skills/ae-analysis/references/sql_table_list.md +5 -5
- package/skills/ae-analysis/references/user_cluster_models.md +8 -0
- package/skills/ae-analysis/references/user_tag_create.md +7 -1
- package/skills/ae-analysis/references/user_tag_get.md +1 -1
- package/skills/ae-analysis/references/user_tag_models.md +18 -2
- package/skills/ae-analysis/references/user_tag_refresh.md +1 -1
- package/skills/ae-analysis/references/user_tag_update.md +2 -2
- package/skills/ae-capability/SKILL.md +63 -1
- package/skills/ae-capability/references/collaboration.md +48 -0
- package/skills/ae-community/SKILL.md +5 -1
- package/skills/ae-community/references/collaboration.md +48 -0
- package/skills/ae-data-integration/SKILL.md +4 -0
- package/skills/ae-data-integration/references/collaboration.md +48 -0
- package/skills/ae-dataops/SKILL.md +54 -74
- package/skills/ae-dataops/references/collaboration.md +48 -0
- package/skills/ae-dataops/references/dataops-backfill.md +23 -18
- package/skills/ae-dataops/references/dataops-flow-create.md +74 -23
- package/skills/ae-dataops/references/dataops-flow-monitor.md +45 -13
- package/skills/ae-dataops/references/dataops-integration.md +57 -30
- package/skills/ae-dataops/references/dataops-query.md +21 -4
- package/skills/ae-dataops/references/dataops-table.md +143 -11
- package/skills/ae-engage/SKILL.md +21 -6
- package/skills/ae-engage/references/channel-mgmt.md +3 -3
- package/skills/ae-engage/references/collaboration.md +48 -0
- package/skills/ae-engage/references/scene-config-channel.md +4 -4
- package/skills/ae-generate-tracking-plan/SKILL.md +4 -0
- package/skills/ae-generate-tracking-plan/references/collaboration.md +48 -0
- package/skills/ae-kb/SKILL.md +9 -1
- package/skills/ae-kb/references/collaboration.md +48 -0
- package/skills/ae-kb/references/schema-import.md +30 -0
- package/skills/ae-kb-discovery/SKILL.md +7 -2
- package/skills/ae-kb-discovery/references/collaboration.md +48 -0
- package/skills/ae-metadata/SKILL.md +20 -12
- package/skills/ae-metadata/references/collaboration.md +48 -0
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveHost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-N4BLPJC7.js";
|
|
5
5
|
import {
|
|
6
6
|
printError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BW7JUDEI.js";
|
|
8
8
|
import {
|
|
9
9
|
internalCallSourceHeaders
|
|
10
10
|
} from "./chunk-Y74WTIKJ.js";
|
|
11
11
|
import {
|
|
12
12
|
SecureStoreAuthError,
|
|
13
13
|
getCliToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DU72X2IO.js";
|
|
15
15
|
import {
|
|
16
16
|
safeJsonParse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IG3DYEIR.js";
|
|
18
18
|
import {
|
|
19
|
+
CliApiError,
|
|
19
20
|
CliValidationError,
|
|
20
21
|
PermissionError,
|
|
21
22
|
logger
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YVGXGTD6.js";
|
|
23
24
|
|
|
24
25
|
// src/commands/te-dataops/shared.ts
|
|
25
26
|
import { randomBytes } from "crypto";
|
|
@@ -35,6 +36,12 @@ var TOOL_API_MAP = {
|
|
|
35
36
|
datatable_create_table: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/tables" },
|
|
36
37
|
datatable_create_view: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/views" },
|
|
37
38
|
datatable_publish_entity: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/publish" },
|
|
39
|
+
datatable_add_table_field: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/table-fields/add" },
|
|
40
|
+
datatable_modify_table_field: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/table-fields/modify" },
|
|
41
|
+
datatable_delete_table_field: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/table-fields/delete" },
|
|
42
|
+
datatable_recycle_entity: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/entities/recycle" },
|
|
43
|
+
datatable_list_recycle_bin: { method: "GET", path: "/api/cli/dataops/v1/gaia/datatable/recycle-bin" },
|
|
44
|
+
datatable_delete_recycled_entity: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/recycle-bin/delete" },
|
|
38
45
|
flow_list_flows: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flows" },
|
|
39
46
|
flow_get_flow_overview: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-overview" },
|
|
40
47
|
flow_list_high_frequency_release_flows: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-release/high-frequency" },
|
|
@@ -54,7 +61,10 @@ var TOOL_API_MAP = {
|
|
|
54
61
|
flow_update_task_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-instance-check-task-definition" },
|
|
55
62
|
flow_delete_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-deletion" },
|
|
56
63
|
flow_add_task_relation: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-relation" },
|
|
57
|
-
|
|
64
|
+
flow_get_flow_params: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-params" },
|
|
65
|
+
flow_create_flow_param: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-params" },
|
|
66
|
+
flow_update_flow_param: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-param-definition" },
|
|
67
|
+
flow_delete_flow_param: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-param-deletion" },
|
|
58
68
|
operations_search_flow_instances: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/search" },
|
|
59
69
|
operations_get_flow_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/detail" },
|
|
60
70
|
operations_get_task_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/task-instances/detail" },
|
|
@@ -97,23 +107,52 @@ var TOOL_API_MAP = {
|
|
|
97
107
|
ide_get_sql_query_status: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/sql-query-status" },
|
|
98
108
|
ide_cancel_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-cancel" }
|
|
99
109
|
};
|
|
100
|
-
async function callDataopsApi(ctx,
|
|
101
|
-
const spec = TOOL_API_MAP[
|
|
110
|
+
async function callDataopsApi(ctx, toolName77, args = {}) {
|
|
111
|
+
const spec = TOOL_API_MAP[toolName77];
|
|
102
112
|
if (!spec) {
|
|
103
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
113
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName77}`);
|
|
104
114
|
}
|
|
105
|
-
const params = compactArgs(args);
|
|
115
|
+
const params = compactArgs(args, toolName77);
|
|
106
116
|
if (spec.method === "GET") {
|
|
107
117
|
return dataopsRequest(ctx, spec.method, spec.path, params);
|
|
108
118
|
}
|
|
109
119
|
return dataopsRequest(ctx, spec.method, spec.path, {}, params);
|
|
110
120
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
121
|
+
async function callDataopsFieldMutationApi(ctx, toolName77, args) {
|
|
122
|
+
return callDataopsMutationApi(ctx, toolName77, args, "DataOps table field mutation failed.");
|
|
123
|
+
}
|
|
124
|
+
async function callDataopsMutationApi(ctx, toolName77, args, defaultMessage = "DataOps entity mutation failed.") {
|
|
125
|
+
const response = await callDataopsApi(ctx, toolName77, args);
|
|
126
|
+
const envelope = asRecord(response);
|
|
127
|
+
const result = asRecord(envelope?.result);
|
|
128
|
+
const outcome = result?.outcome;
|
|
129
|
+
const failed = envelope?.status === "FAILED" || result?.success === false || outcome === "FAILED" || outcome === "PARTIAL";
|
|
130
|
+
if (!failed) {
|
|
131
|
+
return response;
|
|
132
|
+
}
|
|
133
|
+
const errorType = result?.errorType;
|
|
134
|
+
const message = typeof result?.message === "string" && result.message ? result.message : defaultMessage;
|
|
135
|
+
const hint = typeof result?.hint === "string" && result.hint ? result.hint : void 0;
|
|
136
|
+
const meta = { ...result };
|
|
137
|
+
delete meta.success;
|
|
138
|
+
delete meta.errorType;
|
|
139
|
+
delete meta.message;
|
|
140
|
+
delete meta.hint;
|
|
141
|
+
if (typeof envelope?.action === "string") {
|
|
142
|
+
meta.action = envelope.action;
|
|
143
|
+
}
|
|
144
|
+
throw new CliApiError(message, {
|
|
145
|
+
code: typeof errorType === "string" || typeof errorType === "number" ? errorType : void 0,
|
|
146
|
+
hint,
|
|
147
|
+
meta
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function buildDataopsApiDryRun(ctx, toolName77, args = {}) {
|
|
151
|
+
const spec = TOOL_API_MAP[toolName77];
|
|
113
152
|
if (!spec) {
|
|
114
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
153
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName77}`);
|
|
115
154
|
}
|
|
116
|
-
const params = compactArgs(args);
|
|
155
|
+
const params = compactArgs(args, toolName77);
|
|
117
156
|
if (spec.method === "GET") {
|
|
118
157
|
return {
|
|
119
158
|
method: spec.method,
|
|
@@ -217,16 +256,19 @@ function buildUrl(host, path, params = {}) {
|
|
|
217
256
|
}
|
|
218
257
|
return url.toString();
|
|
219
258
|
}
|
|
220
|
-
function compactArgs(args) {
|
|
259
|
+
function compactArgs(args, toolName77) {
|
|
221
260
|
const result = {};
|
|
222
261
|
for (const [key, value] of Object.entries(args)) {
|
|
223
|
-
if (value === void 0 || value === null || value === "") {
|
|
262
|
+
if (value === void 0 || value === null || value === "" && !(toolName77 === "flow_update_flow_param" && key === "remark")) {
|
|
224
263
|
continue;
|
|
225
264
|
}
|
|
226
265
|
result[key] = value;
|
|
227
266
|
}
|
|
228
267
|
return result;
|
|
229
268
|
}
|
|
269
|
+
function asRecord(value) {
|
|
270
|
+
return typeof value === "object" && value !== null ? value : void 0;
|
|
271
|
+
}
|
|
230
272
|
function unwrapDataResponse(data) {
|
|
231
273
|
const returnCode = data?.returnCode ?? data?.return_code;
|
|
232
274
|
const returnMessage = data?.returnMessage ?? data?.return_message;
|
|
@@ -413,24 +455,221 @@ var publishEntity = {
|
|
|
413
455
|
}
|
|
414
456
|
};
|
|
415
457
|
|
|
458
|
+
// src/commands/te-dataops/datatable/add-table-field.ts
|
|
459
|
+
var toolName6 = "datatable_add_table_field";
|
|
460
|
+
function buildArgs6(ctx) {
|
|
461
|
+
return {
|
|
462
|
+
spaceCode: ctx.str("spaceCode"),
|
|
463
|
+
tableName: ctx.str("tableName"),
|
|
464
|
+
fieldName: ctx.str("fieldName"),
|
|
465
|
+
fieldType: ctx.str("fieldType"),
|
|
466
|
+
comment: ctx.str("comment") || void 0
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
var addTableField = {
|
|
470
|
+
service: "dataops_datatable",
|
|
471
|
+
command: "+add_table_field",
|
|
472
|
+
description: "Append one nullable ordinary field to a TASK_ENV Hive physical table in DEV. PROD is unchanged and must be published separately.",
|
|
473
|
+
helpText: "Use global --dry-run to request a server semantic preview without writing.",
|
|
474
|
+
flags: [
|
|
475
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
476
|
+
{ name: "tableName", type: "string", required: true, desc: "Exact TASK_ENV physical table name" },
|
|
477
|
+
{ name: "fieldName", type: "string", required: true, desc: "Field name to append" },
|
|
478
|
+
{ name: "fieldType", type: "string", required: true, desc: "Complete Trino-compatible field type, for example bigint or decimal(18,2)" },
|
|
479
|
+
{ name: "comment", type: "string", required: false, desc: "Optional physical field comment" }
|
|
480
|
+
],
|
|
481
|
+
risk: "write",
|
|
482
|
+
dryRun: async (ctx) => callDataopsFieldMutationApi(ctx, toolName6, {
|
|
483
|
+
...buildArgs6(ctx),
|
|
484
|
+
preview: true
|
|
485
|
+
}),
|
|
486
|
+
execute: async (ctx) => callDataopsFieldMutationApi(ctx, toolName6, buildArgs6(ctx))
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
// src/commands/te-dataops/datatable/modify-table-field.ts
|
|
490
|
+
var toolName7 = "datatable_modify_table_field";
|
|
491
|
+
function buildArgs7(ctx) {
|
|
492
|
+
return {
|
|
493
|
+
spaceCode: ctx.str("spaceCode"),
|
|
494
|
+
tableName: ctx.str("tableName"),
|
|
495
|
+
fieldName: ctx.str("fieldName"),
|
|
496
|
+
fieldType: ctx.str("fieldType") || void 0,
|
|
497
|
+
comment: ctx.str("comment") || void 0,
|
|
498
|
+
clearComment: ctx.bool("clearComment") || void 0
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
var modifyTableField = {
|
|
502
|
+
service: "dataops_datatable",
|
|
503
|
+
command: "+modify_table_field",
|
|
504
|
+
description: "Modify the type and/or physical comment of one ordinary TASK_ENV Hive table field in DEV. PROD is unchanged and must be published separately.",
|
|
505
|
+
helpText: "Provide --fieldType, --comment, or --clearComment; --comment and --clearComment are mutually exclusive. Use global --dry-run for a server semantic preview.",
|
|
506
|
+
flags: [
|
|
507
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
508
|
+
{ name: "tableName", type: "string", required: true, desc: "Exact TASK_ENV physical table name" },
|
|
509
|
+
{ name: "fieldName", type: "string", required: true, desc: "Exact existing field name" },
|
|
510
|
+
{ name: "fieldType", type: "string", required: false, desc: "Optional complete Trino-compatible target type" },
|
|
511
|
+
{ name: "comment", type: "string", required: false, desc: "Set the physical field comment" },
|
|
512
|
+
{ name: "clearComment", type: "boolean", required: false, desc: "Clear the physical field comment" }
|
|
513
|
+
],
|
|
514
|
+
validate: (ctx) => {
|
|
515
|
+
const hasFieldType = ctx.str("fieldType") !== "";
|
|
516
|
+
const hasComment = ctx.str("comment") !== "";
|
|
517
|
+
const clearComment = ctx.bool("clearComment");
|
|
518
|
+
if (!hasFieldType && !hasComment && !clearComment) {
|
|
519
|
+
throw new CliValidationError(
|
|
520
|
+
"At least one field change is required.",
|
|
521
|
+
{
|
|
522
|
+
code: "MISSING_FIELD_CHANGE",
|
|
523
|
+
hint: "Use --fieldType, --comment, or --clearComment."
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
if (hasComment && clearComment) {
|
|
528
|
+
throw new CliValidationError(
|
|
529
|
+
"--comment and --clearComment cannot be used together.",
|
|
530
|
+
{
|
|
531
|
+
code: "CONFLICTING_COMMENT_CHANGE",
|
|
532
|
+
hint: "Set a comment with --comment, or remove it with --clearComment."
|
|
533
|
+
}
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
risk: "write",
|
|
538
|
+
dryRun: async (ctx) => callDataopsFieldMutationApi(ctx, toolName7, {
|
|
539
|
+
...buildArgs7(ctx),
|
|
540
|
+
preview: true
|
|
541
|
+
}),
|
|
542
|
+
execute: async (ctx) => callDataopsFieldMutationApi(ctx, toolName7, buildArgs7(ctx))
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
// src/commands/te-dataops/datatable/delete-table-field.ts
|
|
546
|
+
var toolName8 = "datatable_delete_table_field";
|
|
547
|
+
function buildArgs8(ctx) {
|
|
548
|
+
return {
|
|
549
|
+
spaceCode: ctx.str("spaceCode"),
|
|
550
|
+
tableName: ctx.str("tableName"),
|
|
551
|
+
fieldName: ctx.str("fieldName")
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
var deleteTableField = {
|
|
555
|
+
service: "dataops_datatable",
|
|
556
|
+
command: "+delete_table_field",
|
|
557
|
+
description: "Delete one ordinary field from a TASK_ENV Hive physical table in DEV. This is high risk; PROD is unchanged until a separate publish.",
|
|
558
|
+
helpText: "Use global --dry-run to preview without confirmation. Actual deletion requires confirmation; pass global --yes only after explicit user authorization.",
|
|
559
|
+
flags: [
|
|
560
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
561
|
+
{ name: "tableName", type: "string", required: true, desc: "Exact TASK_ENV physical table name" },
|
|
562
|
+
{ name: "fieldName", type: "string", required: true, desc: "Exact existing field name to delete" }
|
|
563
|
+
],
|
|
564
|
+
risk: "high-risk-write",
|
|
565
|
+
dryRun: async (ctx) => callDataopsFieldMutationApi(ctx, toolName8, {
|
|
566
|
+
...buildArgs8(ctx),
|
|
567
|
+
preview: true
|
|
568
|
+
}),
|
|
569
|
+
execute: async (ctx) => callDataopsFieldMutationApi(ctx, toolName8, buildArgs8(ctx))
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
// src/commands/te-dataops/datatable/recycle-entity.ts
|
|
573
|
+
var toolName9 = "datatable_recycle_entity";
|
|
574
|
+
function buildArgs9(ctx) {
|
|
575
|
+
return {
|
|
576
|
+
spaceCode: ctx.str("spaceCode"),
|
|
577
|
+
entityId: ctx.str("entityId"),
|
|
578
|
+
name: ctx.str("name")
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
var recycleEntity = {
|
|
582
|
+
service: "dataops_datatable",
|
|
583
|
+
command: "+entity_recycle",
|
|
584
|
+
description: "Move one TASK_ENV Hive table or view to the recycle bin, including all existing DEV and PRODUCT mappings. Requires the exact entity ID and name; never selects another entity by name.",
|
|
585
|
+
helpText: "Inspect the entity, run --dry-run for a server semantic preview, and pass --yes only after explicit confirmation. RECYCLE_NAME_CONFLICT requires inspecting and explicitly deleting the old recycled entity first; this command never deletes it automatically.",
|
|
586
|
+
flags: [
|
|
587
|
+
{ name: "spaceCode", type: "string", required: true, pattern: "\\S", desc: "Space code" },
|
|
588
|
+
{ name: "entityId", type: "string", required: true, pattern: "\\S", desc: "Exact active DataOps entity ID from catalog discovery" },
|
|
589
|
+
{ name: "name", type: "string", required: true, pattern: "\\S", desc: "Exact table or view name, checked against the entity ID" }
|
|
590
|
+
],
|
|
591
|
+
risk: "high-risk-write",
|
|
592
|
+
dryRun: (ctx) => callDataopsMutationApi(ctx, toolName9, { ...buildArgs9(ctx), preview: true }),
|
|
593
|
+
execute: (ctx) => callDataopsMutationApi(ctx, toolName9, buildArgs9(ctx))
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
// src/commands/te-dataops/datatable/list-recycle-bin.ts
|
|
597
|
+
var toolName10 = "datatable_list_recycle_bin";
|
|
598
|
+
function buildArgs10(ctx) {
|
|
599
|
+
return {
|
|
600
|
+
spaceCode: ctx.str("spaceCode"),
|
|
601
|
+
search: ctx.str("search"),
|
|
602
|
+
maxResults: ctx.optionalNum("maxResults")
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
var listRecycleBin = {
|
|
606
|
+
service: "dataops_datatable",
|
|
607
|
+
command: "+recycle_bin_list",
|
|
608
|
+
description: "List recycled TASK_ENV Hive tables and views by entity ID. Returns name, entityType, environments, recycleTime, totalCount, returnedCount, and hasMore; same-name entities remain separate.",
|
|
609
|
+
flags: [
|
|
610
|
+
{ name: "spaceCode", type: "string", required: true, pattern: "\\S", desc: "Space code" },
|
|
611
|
+
{ name: "search", type: "string", required: false, desc: "Optional table or view name keyword" },
|
|
612
|
+
{ name: "maxResults", type: "number", required: false, min: 1, max: 1e3, desc: "Maximum number of entities to return; server default 100, maximum 1000" }
|
|
613
|
+
],
|
|
614
|
+
risk: "read",
|
|
615
|
+
validate: (ctx) => {
|
|
616
|
+
const limit = ctx.optionalNum("maxResults");
|
|
617
|
+
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
618
|
+
throw new CliValidationError("--maxResults must be an integer between 1 and 1000.");
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName10, buildArgs10(ctx)),
|
|
622
|
+
execute: (ctx) => callDataopsApi(ctx, toolName10, buildArgs10(ctx))
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
// src/commands/te-dataops/datatable/delete-recycled-entity.ts
|
|
626
|
+
var toolName11 = "datatable_delete_recycled_entity";
|
|
627
|
+
function buildArgs11(ctx) {
|
|
628
|
+
return {
|
|
629
|
+
spaceCode: ctx.str("spaceCode"),
|
|
630
|
+
entityId: ctx.str("entityId"),
|
|
631
|
+
name: ctx.str("name")
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
var deleteRecycledEntity = {
|
|
635
|
+
service: "dataops_datatable",
|
|
636
|
+
command: "+recycle_bin_delete",
|
|
637
|
+
description: "Permanently delete one recycled TASK_ENV Hive table or view and all its existing DEV and PRODUCT mappings. Irreversible; internal table data may be deleted. Active or mixed-state entities are rejected.",
|
|
638
|
+
helpText: "Find the exact entity with dataops_datatable +recycle_bin_list, inspect --dry-run, and pass --yes only after explicit confirmation. A missing entity ID never falls back to a same-name entity. Read the current state after FAILED or PARTIAL; never retry by choosing another ID automatically.",
|
|
639
|
+
flags: [
|
|
640
|
+
{ name: "spaceCode", type: "string", required: true, pattern: "\\S", desc: "Space code" },
|
|
641
|
+
{ name: "entityId", type: "string", required: true, pattern: "\\S", desc: "Exact recycled entity ID from dataops_datatable +recycle_bin_list" },
|
|
642
|
+
{ name: "name", type: "string", required: true, pattern: "\\S", desc: "Exact table or view name, checked against the recycled entity ID" }
|
|
643
|
+
],
|
|
644
|
+
risk: "high-risk-write",
|
|
645
|
+
dryRun: (ctx) => callDataopsMutationApi(ctx, toolName11, { ...buildArgs11(ctx), preview: true }),
|
|
646
|
+
execute: (ctx) => callDataopsMutationApi(ctx, toolName11, buildArgs11(ctx))
|
|
647
|
+
};
|
|
648
|
+
|
|
416
649
|
// src/commands/te-dataops/datatable/index.ts
|
|
417
650
|
var commands = [
|
|
418
651
|
getTableDetail,
|
|
419
652
|
dictSearchTables,
|
|
420
653
|
createTable,
|
|
421
654
|
createView,
|
|
422
|
-
publishEntity
|
|
655
|
+
publishEntity,
|
|
656
|
+
addTableField,
|
|
657
|
+
modifyTableField,
|
|
658
|
+
deleteTableField,
|
|
659
|
+
recycleEntity,
|
|
660
|
+
listRecycleBin,
|
|
661
|
+
deleteRecycledEntity
|
|
423
662
|
];
|
|
424
663
|
var datatable_default = commands;
|
|
425
664
|
|
|
426
665
|
// src/commands/te-dataops/flow/get-flow-overview.ts
|
|
427
|
-
var
|
|
666
|
+
var toolName12 = "flow_get_flow_overview";
|
|
428
667
|
function requireFlowTarget(ctx) {
|
|
429
668
|
if (ctx.optionalNum("flowCode") == null && !ctx.str("flowName").trim()) {
|
|
430
669
|
throw new Error("Pass --flowCode or --flowName");
|
|
431
670
|
}
|
|
432
671
|
}
|
|
433
|
-
function
|
|
672
|
+
function buildArgs12(ctx) {
|
|
434
673
|
requireFlowTarget(ctx);
|
|
435
674
|
return {
|
|
436
675
|
spaceCode: ctx.str("spaceCode"),
|
|
@@ -442,7 +681,7 @@ function buildArgs6(ctx) {
|
|
|
442
681
|
var getFlowOverview = {
|
|
443
682
|
service: "dataops_flow",
|
|
444
683
|
command: "+get_flow_overview",
|
|
445
|
-
description: "Get a DEV/PROD flow overview. Requires spaceCode and either flowCode or exact flowName; flowCode wins.
|
|
684
|
+
description: "Get a DEV/PROD flow overview; env defaults to DEV. Requires dwWorkflowEdit, spaceCode, and either flowCode or exact flowName; flowCode wins. Returns success, env, resolvedBy, flow, flowParams, schedule, dag, and summary. flowParams contains all custom flow definitions; dag.tasks[].taskParams contains task references with source, value, type, and built-in flags in the selected environment. Definition values preserve expression text. paramFrom is FLOW or SPACE for configured sources. Code-parsed parameters without a configured source stay in the list with null or omitted paramFrom and paramValue fields. Empty parameter lists are arrays. PROD may include latest instance fields.",
|
|
446
685
|
flags: [
|
|
447
686
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
448
687
|
{ name: "flowCode", type: "number", required: false, desc: "Optional task flow code; takes precedence over flowName" },
|
|
@@ -451,15 +690,15 @@ var getFlowOverview = {
|
|
|
451
690
|
],
|
|
452
691
|
risk: "read",
|
|
453
692
|
validate: requireFlowTarget,
|
|
454
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
693
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName12, buildArgs12(ctx)),
|
|
455
694
|
execute: async (ctx) => {
|
|
456
|
-
return callDataopsApi(ctx,
|
|
695
|
+
return callDataopsApi(ctx, toolName12, buildArgs12(ctx));
|
|
457
696
|
}
|
|
458
697
|
};
|
|
459
698
|
|
|
460
699
|
// src/commands/te-dataops/flow/list-flows.ts
|
|
461
|
-
var
|
|
462
|
-
function
|
|
700
|
+
var toolName13 = "flow_list_flows";
|
|
701
|
+
function buildArgs13(ctx) {
|
|
463
702
|
return {
|
|
464
703
|
spaceCode: ctx.str("spaceCode"),
|
|
465
704
|
keyword: ctx.str("keyword"),
|
|
@@ -478,15 +717,15 @@ var listFlows = {
|
|
|
478
717
|
{ name: "pageSize", type: "number", required: false, desc: "Optional page size; default 20, max 100" }
|
|
479
718
|
],
|
|
480
719
|
risk: "read",
|
|
481
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
720
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName13, buildArgs13(ctx)),
|
|
482
721
|
execute: async (ctx) => {
|
|
483
|
-
return callDataopsApi(ctx,
|
|
722
|
+
return callDataopsApi(ctx, toolName13, buildArgs13(ctx));
|
|
484
723
|
}
|
|
485
724
|
};
|
|
486
725
|
|
|
487
726
|
// src/commands/te-dataops/flow/save-schedule-config.ts
|
|
488
|
-
var
|
|
489
|
-
function
|
|
727
|
+
var toolName14 = "flow_save_schedule_config";
|
|
728
|
+
function buildArgs14(ctx) {
|
|
490
729
|
return {
|
|
491
730
|
spaceCode: ctx.str("spaceCode"),
|
|
492
731
|
flowCode: ctx.num("flowCode"),
|
|
@@ -505,15 +744,15 @@ var saveScheduleConfig = {
|
|
|
505
744
|
{ name: "cron", type: "string", required: false, desc: "Quartz CRON expression. Required only when enabled=true, e.g., '0 0 2 * * ?'" }
|
|
506
745
|
],
|
|
507
746
|
risk: "write",
|
|
508
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
747
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName14, buildArgs14(ctx)),
|
|
509
748
|
execute: async (ctx) => {
|
|
510
|
-
return callDataopsApi(ctx,
|
|
749
|
+
return callDataopsApi(ctx, toolName14, buildArgs14(ctx));
|
|
511
750
|
}
|
|
512
751
|
};
|
|
513
752
|
|
|
514
753
|
// src/commands/te-dataops/flow/execute-flow.ts
|
|
515
|
-
var
|
|
516
|
-
function
|
|
754
|
+
var toolName15 = "flow_execute_flow";
|
|
755
|
+
function buildArgs15(ctx) {
|
|
517
756
|
return {
|
|
518
757
|
spaceCode: ctx.str("spaceCode"),
|
|
519
758
|
flowCode: ctx.num("flowCode"),
|
|
@@ -530,15 +769,15 @@ var executeFlow = {
|
|
|
530
769
|
{ name: "baseDate", type: "string", required: false, desc: "Optional data date, format yyyy-MM-dd. Maps to runtime parameter bd" }
|
|
531
770
|
],
|
|
532
771
|
risk: "write",
|
|
533
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
772
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName15, buildArgs15(ctx)),
|
|
534
773
|
execute: async (ctx) => {
|
|
535
|
-
return callDataopsApi(ctx,
|
|
774
|
+
return callDataopsApi(ctx, toolName15, buildArgs15(ctx));
|
|
536
775
|
}
|
|
537
776
|
};
|
|
538
777
|
|
|
539
778
|
// src/commands/te-dataops/flow/release-flow.ts
|
|
540
|
-
var
|
|
541
|
-
function
|
|
779
|
+
var toolName16 = "flow_release_flow";
|
|
780
|
+
function buildArgs16(ctx) {
|
|
542
781
|
return {
|
|
543
782
|
spaceCode: ctx.str("spaceCode"),
|
|
544
783
|
flowCode: ctx.num("flowCode")
|
|
@@ -547,21 +786,21 @@ function buildArgs10(ctx) {
|
|
|
547
786
|
var releaseFlow = {
|
|
548
787
|
service: "dataops_flow",
|
|
549
788
|
command: "+release_flow",
|
|
550
|
-
description: "Submit one DEV-to-PROD task flow release. Requires spaceCode and
|
|
789
|
+
description: "Submit one DEV-to-PROD task flow release. Requires spaceCode, flowCode, and workflow release permission. Returns action/result/status; result includes flowCode, releaseStatus, message, optional packageCode, and optional changes with scheduleConfigChange and task changed items. Preview with +preview_release_flow first.",
|
|
551
790
|
flags: [
|
|
552
791
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
553
792
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" }
|
|
554
793
|
],
|
|
555
794
|
risk: "write",
|
|
556
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
795
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName16, buildArgs16(ctx)),
|
|
557
796
|
execute: async (ctx) => {
|
|
558
|
-
return callDataopsApi(ctx,
|
|
797
|
+
return callDataopsApi(ctx, toolName16, buildArgs16(ctx));
|
|
559
798
|
}
|
|
560
799
|
};
|
|
561
800
|
|
|
562
801
|
// src/commands/te-dataops/flow/preview-release-flow.ts
|
|
563
|
-
var
|
|
564
|
-
function
|
|
802
|
+
var toolName17 = "flow_preview_release_flow";
|
|
803
|
+
function buildArgs17(ctx) {
|
|
565
804
|
return {
|
|
566
805
|
spaceCode: ctx.str("spaceCode"),
|
|
567
806
|
flowCode: ctx.num("flowCode")
|
|
@@ -570,26 +809,26 @@ function buildArgs11(ctx) {
|
|
|
570
809
|
var previewReleaseFlow = {
|
|
571
810
|
service: "dataops_flow",
|
|
572
811
|
command: "+preview_release_flow",
|
|
573
|
-
description: "Preview pending DEV-to-PROD release changes for one task flow without publishing. Requires spaceCode and
|
|
812
|
+
description: "Preview pending DEV-to-PROD release changes for one task flow without publishing. Requires spaceCode, flowCode, and workflow edit permission. Returns flowCode, releaseStatus, message, and changes with scheduleConfigChange (including old/new parameters) and task diffs. Use before +release_flow.",
|
|
574
813
|
flags: [
|
|
575
814
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
576
815
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" }
|
|
577
816
|
],
|
|
578
817
|
risk: "read",
|
|
579
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
818
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName17, buildArgs17(ctx)),
|
|
580
819
|
execute: async (ctx) => {
|
|
581
|
-
return callDataopsApi(ctx,
|
|
820
|
+
return callDataopsApi(ctx, toolName17, buildArgs17(ctx));
|
|
582
821
|
}
|
|
583
822
|
};
|
|
584
823
|
|
|
585
824
|
// src/commands/te-dataops/flow/update-flow.ts
|
|
586
|
-
var
|
|
825
|
+
var toolName18 = "flow_update_flow";
|
|
587
826
|
function requireUpdateField(ctx) {
|
|
588
827
|
if (!ctx.str("flowName").trim() && !ctx.str("remark").trim()) {
|
|
589
828
|
throw new Error("Pass at least one of --flowName or --remark");
|
|
590
829
|
}
|
|
591
830
|
}
|
|
592
|
-
function
|
|
831
|
+
function buildArgs18(ctx) {
|
|
593
832
|
requireUpdateField(ctx);
|
|
594
833
|
return {
|
|
595
834
|
spaceCode: ctx.str("spaceCode"),
|
|
@@ -610,15 +849,15 @@ var updateFlow = {
|
|
|
610
849
|
],
|
|
611
850
|
risk: "write",
|
|
612
851
|
validate: requireUpdateField,
|
|
613
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
852
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName18, buildArgs18(ctx)),
|
|
614
853
|
execute: async (ctx) => {
|
|
615
|
-
return callDataopsApi(ctx,
|
|
854
|
+
return callDataopsApi(ctx, toolName18, buildArgs18(ctx));
|
|
616
855
|
}
|
|
617
856
|
};
|
|
618
857
|
|
|
619
858
|
// src/commands/te-dataops/flow/create-flow.ts
|
|
620
|
-
var
|
|
621
|
-
function
|
|
859
|
+
var toolName19 = "flow_create_flow";
|
|
860
|
+
function buildArgs19(ctx) {
|
|
622
861
|
return {
|
|
623
862
|
spaceCode: ctx.str("spaceCode"),
|
|
624
863
|
flowName: ctx.str("flowName"),
|
|
@@ -635,40 +874,166 @@ var createFlow = {
|
|
|
635
874
|
{ name: "remark", type: "string", required: false, desc: "Optional flow description" }
|
|
636
875
|
],
|
|
637
876
|
risk: "write",
|
|
638
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
877
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName19, buildArgs19(ctx)),
|
|
639
878
|
execute: async (ctx) => {
|
|
640
|
-
return callDataopsApi(ctx,
|
|
879
|
+
return callDataopsApi(ctx, toolName19, buildArgs19(ctx));
|
|
641
880
|
}
|
|
642
881
|
};
|
|
643
882
|
|
|
644
|
-
// src/commands/te-dataops/flow/
|
|
645
|
-
var
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
883
|
+
// src/commands/te-dataops/flow/flow-param-options.ts
|
|
884
|
+
var flowParamScopeFlags = [
|
|
885
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code containing the workflow" },
|
|
886
|
+
{ name: "flowCode", type: "number", required: true, desc: "Workflow code as a positive safe integer" }
|
|
887
|
+
];
|
|
888
|
+
var flowParamKeyFlag = {
|
|
889
|
+
name: "paramKey",
|
|
890
|
+
type: "string",
|
|
891
|
+
required: true,
|
|
892
|
+
desc: "Custom parameter name: 1-40 lowercase letters, digits, or underscores; start with a letter; ws_ prefix and env are reserved. On update, this is the new name"
|
|
893
|
+
};
|
|
894
|
+
function buildFlowParamScope(ctx) {
|
|
895
|
+
const spaceCode = ctx.str("spaceCode");
|
|
896
|
+
if (!spaceCode.trim()) {
|
|
897
|
+
throw new CliValidationError("--spaceCode is required");
|
|
898
|
+
}
|
|
899
|
+
const raw = ctx.str("flowCode").trim();
|
|
900
|
+
if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(Number(raw))) {
|
|
901
|
+
throw new CliValidationError("--flowCode must be a positive safe integer");
|
|
902
|
+
}
|
|
903
|
+
return { spaceCode, flowCode: ctx.num("flowCode") };
|
|
904
|
+
}
|
|
905
|
+
function validateFlowParamKey(value, field = "paramKey") {
|
|
906
|
+
if (!/^[a-z][a-z0-9_]{0,39}$/.test(value) || value.startsWith("ws_") || value === "env") {
|
|
907
|
+
throw new CliValidationError(`--${field} must be 1-40 lowercase letters, digits, or underscores, start with a letter, and must not use the ws_ prefix or env`);
|
|
908
|
+
}
|
|
909
|
+
return value;
|
|
910
|
+
}
|
|
911
|
+
function buildFlowParamWriteArgs(ctx) {
|
|
912
|
+
const paramValue = ctx.list("paramValue")[0];
|
|
913
|
+
const paramDataType = ctx.list("paramDataType")[0];
|
|
914
|
+
const remark = ctx.list("remark")[0];
|
|
915
|
+
if (paramValue === "") {
|
|
916
|
+
throw new CliValidationError("--paramValue must be a non-empty string");
|
|
917
|
+
}
|
|
918
|
+
if (paramDataType !== void 0 && paramDataType !== "VARCHAR" && paramDataType !== "EXPRESSION") {
|
|
919
|
+
throw new CliValidationError("--paramDataType must be VARCHAR or EXPRESSION");
|
|
920
|
+
}
|
|
921
|
+
if (remark !== void 0 && remark.length > 200) {
|
|
922
|
+
throw new CliValidationError("--remark must not exceed 200 characters");
|
|
923
|
+
}
|
|
924
|
+
return { paramValue, paramDataType, remark };
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// src/commands/te-dataops/flow/get-flow-params.ts
|
|
928
|
+
var toolName20 = "flow_get_flow_params";
|
|
929
|
+
function buildArgs20(ctx) {
|
|
930
|
+
const scope = buildFlowParamScope(ctx);
|
|
931
|
+
const env = ctx.list("env")[0] ?? "DEV";
|
|
932
|
+
if (env !== "DEV" && env !== "PROD") {
|
|
933
|
+
throw new CliValidationError("--env must be DEV or PROD");
|
|
934
|
+
}
|
|
935
|
+
return { ...scope, env };
|
|
652
936
|
}
|
|
653
|
-
var
|
|
937
|
+
var getFlowParams = {
|
|
654
938
|
service: "dataops_flow",
|
|
655
|
-
command: "+
|
|
656
|
-
description: "
|
|
939
|
+
command: "+get_flow_params",
|
|
940
|
+
description: "List custom workflow definition parameters in DEV (default) or PROD. Returns an array with paramKey, paramValue, paramDataType, remark, paramFormat, and expression reference metadata. Requires workflow edit permission.",
|
|
657
941
|
flags: [
|
|
658
|
-
|
|
659
|
-
{ name: "
|
|
660
|
-
{ name: "taskCode", type: "number", required: true, desc: "Task code" }
|
|
942
|
+
...flowParamScopeFlags,
|
|
943
|
+
{ name: "env", type: "string", required: false, default: "DEV", desc: "Definition environment: DEV or PROD. Default DEV" }
|
|
661
944
|
],
|
|
662
945
|
risk: "read",
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
946
|
+
validate: (ctx) => {
|
|
947
|
+
buildArgs20(ctx);
|
|
948
|
+
},
|
|
949
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName20, buildArgs20(ctx)),
|
|
950
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName20, buildArgs20(ctx))
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
// src/commands/te-dataops/flow/create-flow-param.ts
|
|
954
|
+
var toolName21 = "flow_create_flow_param";
|
|
955
|
+
function buildArgs21(ctx) {
|
|
956
|
+
const scope = buildFlowParamScope(ctx);
|
|
957
|
+
const paramKey = validateFlowParamKey(ctx.str("paramKey"));
|
|
958
|
+
const fields = buildFlowParamWriteArgs(ctx);
|
|
959
|
+
if (fields.paramValue === void 0) {
|
|
960
|
+
throw new CliValidationError("--paramValue is required and must be a non-empty string");
|
|
961
|
+
}
|
|
962
|
+
return { ...scope, paramKey, ...fields, paramDataType: fields.paramDataType ?? "VARCHAR" };
|
|
963
|
+
}
|
|
964
|
+
var createFlowParam = {
|
|
965
|
+
service: "dataops_flow",
|
|
966
|
+
command: "+create_flow_param",
|
|
967
|
+
description: "Create one custom DEV workflow definition parameter. Text (VARCHAR) is the default; EXPRESSION uses existing expression validation. May stop running DEV debug executions; release the workflow to apply the new parameter to PROD.",
|
|
968
|
+
flags: [
|
|
969
|
+
...flowParamScopeFlags,
|
|
970
|
+
flowParamKeyFlag,
|
|
971
|
+
{ name: "paramValue", type: "string", required: true, desc: "Non-empty parameter value, preserved literally without trimming or substitution" },
|
|
972
|
+
{ name: "paramDataType", type: "string", required: false, default: "VARCHAR", desc: "Parameter type: VARCHAR (text, default) or EXPRESSION" },
|
|
973
|
+
{ name: "remark", type: "string", required: false, desc: "Optional remark, up to 200 characters" }
|
|
974
|
+
],
|
|
975
|
+
risk: "write",
|
|
976
|
+
validate: (ctx) => {
|
|
977
|
+
buildArgs21(ctx);
|
|
978
|
+
},
|
|
979
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName21, buildArgs21(ctx)),
|
|
980
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName21, buildArgs21(ctx))
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
// src/commands/te-dataops/flow/update-flow-param.ts
|
|
984
|
+
var toolName22 = "flow_update_flow_param";
|
|
985
|
+
function buildArgs22(ctx) {
|
|
986
|
+
const scope = buildFlowParamScope(ctx);
|
|
987
|
+
const paramKey = validateFlowParamKey(ctx.str("paramKey"));
|
|
988
|
+
const originParamKey = ctx.list("originParamKey")[0];
|
|
989
|
+
if (originParamKey !== void 0) validateFlowParamKey(originParamKey, "originParamKey");
|
|
990
|
+
const fields = buildFlowParamWriteArgs(ctx);
|
|
991
|
+
if (Object.values(fields).every((value) => value === void 0) && (originParamKey === void 0 || originParamKey === paramKey)) {
|
|
992
|
+
throw new CliValidationError("Pass at least one of --paramValue, --paramDataType, --remark, or rename with --originParamKey");
|
|
666
993
|
}
|
|
994
|
+
return { ...scope, paramKey, originParamKey, ...fields };
|
|
995
|
+
}
|
|
996
|
+
var updateFlowParam = {
|
|
997
|
+
service: "dataops_flow",
|
|
998
|
+
command: "+update_flow_param",
|
|
999
|
+
description: "Update or rename one custom DEV workflow definition parameter. Omitted fields keep their values; an empty remark clears it. Value/type/name changes may stop DEV debug executions and require release for PROD. A remark update without renaming also updates an existing PROD parameter remark. Renaming does not replace old references in SQL.",
|
|
1000
|
+
flags: [
|
|
1001
|
+
...flowParamScopeFlags,
|
|
1002
|
+
flowParamKeyFlag,
|
|
1003
|
+
{ name: "originParamKey", type: "string", required: false, desc: "Existing parameter name when renaming; omit to update paramKey in place" },
|
|
1004
|
+
{ name: "paramValue", type: "string", required: false, desc: "New non-empty value, preserved literally; omit to keep the current value" },
|
|
1005
|
+
{ name: "paramDataType", type: "string", required: false, desc: "VARCHAR (text) or EXPRESSION; omit to keep the current type" },
|
|
1006
|
+
{ name: "remark", type: "string", required: false, desc: "New remark, up to 200 characters; omit to keep it, or pass an empty string to clear it" }
|
|
1007
|
+
],
|
|
1008
|
+
risk: "write",
|
|
1009
|
+
validate: (ctx) => {
|
|
1010
|
+
buildArgs22(ctx);
|
|
1011
|
+
},
|
|
1012
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName22, buildArgs22(ctx)),
|
|
1013
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName22, buildArgs22(ctx))
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
// src/commands/te-dataops/flow/delete-flow-param.ts
|
|
1017
|
+
var toolName23 = "flow_delete_flow_param";
|
|
1018
|
+
function buildArgs23(ctx) {
|
|
1019
|
+
return { ...buildFlowParamScope(ctx), paramKey: validateFlowParamKey(ctx.str("paramKey")) };
|
|
1020
|
+
}
|
|
1021
|
+
var deleteFlowParam = {
|
|
1022
|
+
service: "dataops_flow",
|
|
1023
|
+
command: "+delete_flow_param",
|
|
1024
|
+
description: "Delete one custom DEV workflow definition parameter after confirmation. May stop running DEV debug executions. Task references fall back to a same-name space parameter when available, otherwise remain unresolved. Inspect affected SQL and release the workflow to apply deletion to PROD.",
|
|
1025
|
+
flags: [...flowParamScopeFlags, flowParamKeyFlag],
|
|
1026
|
+
risk: "high-risk-write",
|
|
1027
|
+
validate: (ctx) => {
|
|
1028
|
+
buildArgs23(ctx);
|
|
1029
|
+
},
|
|
1030
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName23, buildArgs23(ctx)),
|
|
1031
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName23, buildArgs23(ctx))
|
|
667
1032
|
};
|
|
668
1033
|
|
|
669
1034
|
// src/commands/te-dataops/flow/add-task-relation.ts
|
|
670
|
-
var
|
|
671
|
-
function
|
|
1035
|
+
var toolName24 = "flow_add_task_relation";
|
|
1036
|
+
function buildArgs24(ctx) {
|
|
672
1037
|
return {
|
|
673
1038
|
spaceCode: ctx.str("spaceCode"),
|
|
674
1039
|
flowCode: ctx.num("flowCode"),
|
|
@@ -687,9 +1052,9 @@ var addTaskRelation = {
|
|
|
687
1052
|
{ name: "taskCode", type: "number", required: true, desc: "Current task code (downstream)" }
|
|
688
1053
|
],
|
|
689
1054
|
risk: "write",
|
|
690
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1055
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName24, buildArgs24(ctx)),
|
|
691
1056
|
execute: async (ctx) => {
|
|
692
|
-
return callDataopsApi(ctx,
|
|
1057
|
+
return callDataopsApi(ctx, toolName24, buildArgs24(ctx));
|
|
693
1058
|
}
|
|
694
1059
|
};
|
|
695
1060
|
|
|
@@ -739,8 +1104,8 @@ function optionalString2(ctx, name) {
|
|
|
739
1104
|
}
|
|
740
1105
|
|
|
741
1106
|
// src/commands/te-dataops/flow/create-sql-task.ts
|
|
742
|
-
var
|
|
743
|
-
function
|
|
1107
|
+
var toolName25 = "flow_create_sql_task";
|
|
1108
|
+
function buildArgs25(ctx) {
|
|
744
1109
|
return {
|
|
745
1110
|
spaceCode: ctx.str("spaceCode"),
|
|
746
1111
|
flowCode: ctx.num("flowCode"),
|
|
@@ -768,15 +1133,15 @@ var createSqlTask = {
|
|
|
768
1133
|
],
|
|
769
1134
|
risk: "write",
|
|
770
1135
|
validate: validateTaskWriteArgs,
|
|
771
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1136
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName25, buildArgs25(ctx)),
|
|
772
1137
|
execute: async (ctx) => {
|
|
773
|
-
return callDataopsApi(ctx,
|
|
1138
|
+
return callDataopsApi(ctx, toolName25, buildArgs25(ctx));
|
|
774
1139
|
}
|
|
775
1140
|
};
|
|
776
1141
|
|
|
777
1142
|
// src/commands/te-dataops/flow/update-sql-task.ts
|
|
778
|
-
var
|
|
779
|
-
function
|
|
1143
|
+
var toolName26 = "flow_update_sql_task";
|
|
1144
|
+
function buildArgs26(ctx) {
|
|
780
1145
|
return {
|
|
781
1146
|
spaceCode: ctx.str("spaceCode"),
|
|
782
1147
|
flowCode: ctx.num("flowCode"),
|
|
@@ -802,21 +1167,21 @@ var updateSqlTask = {
|
|
|
802
1167
|
],
|
|
803
1168
|
risk: "write",
|
|
804
1169
|
validate: validateTaskWriteArgs,
|
|
805
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1170
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName26, buildArgs26(ctx)),
|
|
806
1171
|
execute: async (ctx) => {
|
|
807
|
-
return callDataopsApi(ctx,
|
|
1172
|
+
return callDataopsApi(ctx, toolName26, buildArgs26(ctx));
|
|
808
1173
|
}
|
|
809
1174
|
};
|
|
810
1175
|
|
|
811
1176
|
// src/commands/te-dataops/flow/create-integration-task.ts
|
|
812
|
-
var
|
|
1177
|
+
var toolName27 = "flow_create_integration_task";
|
|
813
1178
|
function validateInteger(ctx, name) {
|
|
814
1179
|
const value = ctx.str(name).trim();
|
|
815
1180
|
if (!/^\d+$/.test(value)) {
|
|
816
1181
|
throw new Error(`Invalid --${name}: expected an integer, got "${value}"`);
|
|
817
1182
|
}
|
|
818
1183
|
}
|
|
819
|
-
function
|
|
1184
|
+
function buildArgs27(ctx) {
|
|
820
1185
|
return {
|
|
821
1186
|
spaceCode: ctx.str("spaceCode"),
|
|
822
1187
|
flowCode: ctx.num("flowCode"),
|
|
@@ -843,19 +1208,19 @@ var createIntegrationTask = {
|
|
|
843
1208
|
validateInteger(ctx, "flowCode");
|
|
844
1209
|
validateTaskWriteArgs(ctx);
|
|
845
1210
|
},
|
|
846
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
847
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1211
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName27, buildArgs27(ctx)),
|
|
1212
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName27, buildArgs27(ctx))
|
|
848
1213
|
};
|
|
849
1214
|
|
|
850
1215
|
// src/commands/te-dataops/flow/update-integration-task.ts
|
|
851
|
-
var
|
|
1216
|
+
var toolName28 = "flow_update_integration_task";
|
|
852
1217
|
function validateInteger2(ctx, name) {
|
|
853
1218
|
const value = ctx.str(name).trim();
|
|
854
1219
|
if (!/^\d+$/.test(value)) {
|
|
855
1220
|
throw new Error(`Invalid --${name}: expected an integer, got "${value}"`);
|
|
856
1221
|
}
|
|
857
1222
|
}
|
|
858
|
-
function
|
|
1223
|
+
function buildArgs28(ctx) {
|
|
859
1224
|
return {
|
|
860
1225
|
spaceCode: ctx.str("spaceCode"),
|
|
861
1226
|
flowCode: ctx.num("flowCode"),
|
|
@@ -881,8 +1246,8 @@ var updateIntegrationTask = {
|
|
|
881
1246
|
validateInteger2(ctx, "taskCode");
|
|
882
1247
|
validateTaskWriteArgs(ctx);
|
|
883
1248
|
},
|
|
884
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
885
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1249
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName28, buildArgs28(ctx)),
|
|
1250
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName28, buildArgs28(ctx))
|
|
886
1251
|
};
|
|
887
1252
|
|
|
888
1253
|
// src/commands/te-dataops/flow/workflow-instance-check-task-options.ts
|
|
@@ -947,8 +1312,8 @@ function optionalString3(ctx, name) {
|
|
|
947
1312
|
}
|
|
948
1313
|
|
|
949
1314
|
// src/commands/te-dataops/flow/create-workflow-instance-check-task.ts
|
|
950
|
-
var
|
|
951
|
-
function
|
|
1315
|
+
var toolName29 = "flow_create_workflow_instance_check_task";
|
|
1316
|
+
function buildArgs29(ctx) {
|
|
952
1317
|
return {
|
|
953
1318
|
spaceCode: ctx.str("spaceCode"),
|
|
954
1319
|
flowCode: ctx.num("flowCode"),
|
|
@@ -978,13 +1343,13 @@ var createWorkflowInstanceCheckTask = {
|
|
|
978
1343
|
validateCheckArgs(ctx);
|
|
979
1344
|
validateTaskWriteArgs(ctx);
|
|
980
1345
|
},
|
|
981
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
982
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1346
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName29, buildArgs29(ctx)),
|
|
1347
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName29, buildArgs29(ctx))
|
|
983
1348
|
};
|
|
984
1349
|
|
|
985
1350
|
// src/commands/te-dataops/flow/update-workflow-instance-check-task.ts
|
|
986
|
-
var
|
|
987
|
-
function
|
|
1351
|
+
var toolName30 = "flow_update_workflow_instance_check_task";
|
|
1352
|
+
function buildArgs30(ctx) {
|
|
988
1353
|
return {
|
|
989
1354
|
spaceCode: ctx.str("spaceCode"),
|
|
990
1355
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1012,13 +1377,13 @@ var updateWorkflowInstanceCheckTask = {
|
|
|
1012
1377
|
validateCheckArgs(ctx);
|
|
1013
1378
|
validateTaskWriteArgs(ctx);
|
|
1014
1379
|
},
|
|
1015
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1016
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1380
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName30, buildArgs30(ctx)),
|
|
1381
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName30, buildArgs30(ctx))
|
|
1017
1382
|
};
|
|
1018
1383
|
|
|
1019
1384
|
// src/commands/te-dataops/flow/create-task-instance-check-task.ts
|
|
1020
|
-
var
|
|
1021
|
-
function
|
|
1385
|
+
var toolName31 = "flow_create_task_instance_check_task";
|
|
1386
|
+
function buildArgs31(ctx) {
|
|
1022
1387
|
return {
|
|
1023
1388
|
spaceCode: ctx.str("spaceCode"),
|
|
1024
1389
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1048,13 +1413,13 @@ var createTaskInstanceCheckTask = {
|
|
|
1048
1413
|
validateCheckArgs(ctx, true);
|
|
1049
1414
|
validateTaskWriteArgs(ctx);
|
|
1050
1415
|
},
|
|
1051
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1052
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1416
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName31, buildArgs31(ctx)),
|
|
1417
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName31, buildArgs31(ctx))
|
|
1053
1418
|
};
|
|
1054
1419
|
|
|
1055
1420
|
// src/commands/te-dataops/flow/update-task-instance-check-task.ts
|
|
1056
|
-
var
|
|
1057
|
-
function
|
|
1421
|
+
var toolName32 = "flow_update_task_instance_check_task";
|
|
1422
|
+
function buildArgs32(ctx) {
|
|
1058
1423
|
return {
|
|
1059
1424
|
spaceCode: ctx.str("spaceCode"),
|
|
1060
1425
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1082,12 +1447,12 @@ var updateTaskInstanceCheckTask = {
|
|
|
1082
1447
|
validateCheckArgs(ctx, true);
|
|
1083
1448
|
validateTaskWriteArgs(ctx);
|
|
1084
1449
|
},
|
|
1085
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1086
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1450
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName32, buildArgs32(ctx)),
|
|
1451
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName32, buildArgs32(ctx))
|
|
1087
1452
|
};
|
|
1088
1453
|
|
|
1089
1454
|
// src/commands/te-dataops/flow/delete-task.ts
|
|
1090
|
-
var
|
|
1455
|
+
var toolName33 = "flow_delete_task";
|
|
1091
1456
|
function validateIdentifier(ctx, name) {
|
|
1092
1457
|
const raw = ctx.str(name).trim();
|
|
1093
1458
|
if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(Number(raw))) {
|
|
@@ -1096,7 +1461,7 @@ function validateIdentifier(ctx, name) {
|
|
|
1096
1461
|
});
|
|
1097
1462
|
}
|
|
1098
1463
|
}
|
|
1099
|
-
function
|
|
1464
|
+
function buildArgs33(ctx) {
|
|
1100
1465
|
return {
|
|
1101
1466
|
spaceCode: ctx.str("spaceCode"),
|
|
1102
1467
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1117,13 +1482,13 @@ var deleteTask = {
|
|
|
1117
1482
|
validateIdentifier(ctx, "flowCode");
|
|
1118
1483
|
validateIdentifier(ctx, "taskCode");
|
|
1119
1484
|
},
|
|
1120
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1121
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1485
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName33, buildArgs33(ctx)),
|
|
1486
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName33, buildArgs33(ctx))
|
|
1122
1487
|
};
|
|
1123
1488
|
|
|
1124
1489
|
// src/commands/te-dataops/flow/list-high-frequency-release-flows.ts
|
|
1125
|
-
var
|
|
1126
|
-
function
|
|
1490
|
+
var toolName34 = "flow_list_high_frequency_release_flows";
|
|
1491
|
+
function buildArgs34(ctx) {
|
|
1127
1492
|
return {
|
|
1128
1493
|
spaceCode: ctx.str("spaceCode"),
|
|
1129
1494
|
days: ctx.optionalNum("days"),
|
|
@@ -1144,9 +1509,9 @@ var listHighFrequencyReleaseFlows = {
|
|
|
1144
1509
|
{ name: "status", type: "string", required: false, desc: "Optional release status: SUCCESS, FAIL, PART_SUCCESS, or ALL; default SUCCESS" }
|
|
1145
1510
|
],
|
|
1146
1511
|
risk: "read",
|
|
1147
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1512
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName34, buildArgs34(ctx)),
|
|
1148
1513
|
execute: async (ctx) => {
|
|
1149
|
-
return callDataopsApi(ctx,
|
|
1514
|
+
return callDataopsApi(ctx, toolName34, buildArgs34(ctx));
|
|
1150
1515
|
}
|
|
1151
1516
|
};
|
|
1152
1517
|
|
|
@@ -1161,7 +1526,10 @@ var commands2 = [
|
|
|
1161
1526
|
releaseFlow,
|
|
1162
1527
|
updateFlow,
|
|
1163
1528
|
createFlow,
|
|
1164
|
-
|
|
1529
|
+
getFlowParams,
|
|
1530
|
+
createFlowParam,
|
|
1531
|
+
updateFlowParam,
|
|
1532
|
+
deleteFlowParam,
|
|
1165
1533
|
updateSqlTask,
|
|
1166
1534
|
updateIntegrationTask,
|
|
1167
1535
|
updateWorkflowInstanceCheckTask,
|
|
@@ -1176,22 +1544,22 @@ var commands2 = [
|
|
|
1176
1544
|
var flow_default = commands2;
|
|
1177
1545
|
|
|
1178
1546
|
// src/commands/te-dataops/integration/list-datasource-components.ts
|
|
1179
|
-
var
|
|
1547
|
+
var toolName35 = "integration_list_datasource_components";
|
|
1180
1548
|
var listDatasourceComponents = {
|
|
1181
1549
|
service: "dataops_integration",
|
|
1182
1550
|
command: "+list_datasource_components",
|
|
1183
1551
|
description: "List supported datasource components. Requires no arguments. Returns componentName, componentType, and description. Use +get_datasource_component_template before creating a datasource.",
|
|
1184
1552
|
flags: [],
|
|
1185
1553
|
risk: "read",
|
|
1186
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1554
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName35, {}),
|
|
1187
1555
|
execute: async (ctx) => {
|
|
1188
|
-
return callDataopsApi(ctx,
|
|
1556
|
+
return callDataopsApi(ctx, toolName35, {});
|
|
1189
1557
|
}
|
|
1190
1558
|
};
|
|
1191
1559
|
|
|
1192
1560
|
// src/commands/te-dataops/integration/get-datasource-component-template.ts
|
|
1193
|
-
var
|
|
1194
|
-
function
|
|
1561
|
+
var toolName36 = "integration_get_datasource_component_template";
|
|
1562
|
+
function buildArgs35(ctx) {
|
|
1195
1563
|
return {
|
|
1196
1564
|
componentName: ctx.str("componentName")
|
|
1197
1565
|
};
|
|
@@ -1204,15 +1572,15 @@ var getDatasourceComponentTemplate = {
|
|
|
1204
1572
|
{ name: "componentName", type: "string", required: true, desc: "Exact componentName returned by +list_datasource_components, e.g. MySQL, ClickHouse, DatabricksJdbc, LarkBitable, OSS, S3, HDFS" }
|
|
1205
1573
|
],
|
|
1206
1574
|
risk: "read",
|
|
1207
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1575
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName36, buildArgs35(ctx)),
|
|
1208
1576
|
execute: async (ctx) => {
|
|
1209
|
-
return callDataopsApi(ctx,
|
|
1577
|
+
return callDataopsApi(ctx, toolName36, buildArgs35(ctx));
|
|
1210
1578
|
}
|
|
1211
1579
|
};
|
|
1212
1580
|
|
|
1213
1581
|
// src/commands/te-dataops/integration/list-space-datasources.ts
|
|
1214
|
-
var
|
|
1215
|
-
function
|
|
1582
|
+
var toolName37 = "integration_list_space_datasources";
|
|
1583
|
+
function buildArgs36(ctx) {
|
|
1216
1584
|
return {
|
|
1217
1585
|
spaceCode: ctx.str("spaceCode"),
|
|
1218
1586
|
dataSourceName: ctx.str("datasourceName"),
|
|
@@ -1229,15 +1597,15 @@ var listSpaceDatasources = {
|
|
|
1229
1597
|
{ name: "componentName", type: "string", required: false, desc: "Optional component type filter, e.g. MySQL or ClickHouse" }
|
|
1230
1598
|
],
|
|
1231
1599
|
risk: "read",
|
|
1232
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1600
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName37, buildArgs36(ctx)),
|
|
1233
1601
|
execute: async (ctx) => {
|
|
1234
|
-
return callDataopsApi(ctx,
|
|
1602
|
+
return callDataopsApi(ctx, toolName37, buildArgs36(ctx));
|
|
1235
1603
|
}
|
|
1236
1604
|
};
|
|
1237
1605
|
|
|
1238
1606
|
// src/commands/te-dataops/integration/get-datasource-detail.ts
|
|
1239
|
-
var
|
|
1240
|
-
function
|
|
1607
|
+
var toolName38 = "integration_get_datasource_detail";
|
|
1608
|
+
function buildArgs37(ctx) {
|
|
1241
1609
|
return {
|
|
1242
1610
|
spaceCode: ctx.str("spaceCode"),
|
|
1243
1611
|
dataSourceName: ctx.str("datasourceName")
|
|
@@ -1252,14 +1620,14 @@ var getDatasourceDetail = {
|
|
|
1252
1620
|
{ name: "datasourceName", type: "string", required: true, desc: "Exact datasource name within the space" }
|
|
1253
1621
|
],
|
|
1254
1622
|
risk: "read",
|
|
1255
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1623
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName38, buildArgs37(ctx)),
|
|
1256
1624
|
execute: async (ctx) => {
|
|
1257
|
-
return callDataopsApi(ctx,
|
|
1625
|
+
return callDataopsApi(ctx, toolName38, buildArgs37(ctx));
|
|
1258
1626
|
}
|
|
1259
1627
|
};
|
|
1260
1628
|
|
|
1261
1629
|
// src/commands/te-dataops/integration/test-datasource-connect.ts
|
|
1262
|
-
var
|
|
1630
|
+
var toolName39 = "integration_test_datasource_connect";
|
|
1263
1631
|
var testDatasourceConnect = {
|
|
1264
1632
|
service: "dataops_integration",
|
|
1265
1633
|
command: "+test_datasource_connect",
|
|
@@ -1269,12 +1637,12 @@ var testDatasourceConnect = {
|
|
|
1269
1637
|
{ name: "datasourceName", type: "string", required: true, desc: "Existing datasource name, exact match within the space" }
|
|
1270
1638
|
],
|
|
1271
1639
|
risk: "read",
|
|
1272
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1640
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName39, {
|
|
1273
1641
|
spaceCode: ctx.str("spaceCode"),
|
|
1274
1642
|
datasourceName: ctx.str("datasourceName")
|
|
1275
1643
|
}),
|
|
1276
1644
|
execute: async (ctx) => {
|
|
1277
|
-
return callDataopsApi(ctx,
|
|
1645
|
+
return callDataopsApi(ctx, toolName39, {
|
|
1278
1646
|
spaceCode: ctx.str("spaceCode"),
|
|
1279
1647
|
datasourceName: ctx.str("datasourceName")
|
|
1280
1648
|
});
|
|
@@ -1282,8 +1650,8 @@ var testDatasourceConnect = {
|
|
|
1282
1650
|
};
|
|
1283
1651
|
|
|
1284
1652
|
// src/commands/te-dataops/integration/list-datasource-tables.ts
|
|
1285
|
-
var
|
|
1286
|
-
function
|
|
1653
|
+
var toolName40 = "integration_list_datasource_tables";
|
|
1654
|
+
function buildArgs38(ctx) {
|
|
1287
1655
|
return {
|
|
1288
1656
|
spaceCode: ctx.str("spaceCode"),
|
|
1289
1657
|
datasourceId: ctx.str("datasourceId"),
|
|
@@ -1304,15 +1672,15 @@ var listDatasourceTables = {
|
|
|
1304
1672
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1305
1673
|
],
|
|
1306
1674
|
risk: "read",
|
|
1307
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1675
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName40, buildArgs38(ctx)),
|
|
1308
1676
|
execute: async (ctx) => {
|
|
1309
|
-
return callDataopsApi(ctx,
|
|
1677
|
+
return callDataopsApi(ctx, toolName40, buildArgs38(ctx));
|
|
1310
1678
|
}
|
|
1311
1679
|
};
|
|
1312
1680
|
|
|
1313
1681
|
// src/commands/te-dataops/integration/get-table-structure.ts
|
|
1314
|
-
var
|
|
1315
|
-
function
|
|
1682
|
+
var toolName41 = "integration_get_table_structure";
|
|
1683
|
+
function buildArgs39(ctx) {
|
|
1316
1684
|
return {
|
|
1317
1685
|
spaceCode: ctx.str("spaceCode"),
|
|
1318
1686
|
datasourceId: ctx.str("datasourceId"),
|
|
@@ -1335,15 +1703,15 @@ var getTableStructure = {
|
|
|
1335
1703
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1336
1704
|
],
|
|
1337
1705
|
risk: "read",
|
|
1338
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1706
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName41, buildArgs39(ctx)),
|
|
1339
1707
|
execute: async (ctx) => {
|
|
1340
|
-
return callDataopsApi(ctx,
|
|
1708
|
+
return callDataopsApi(ctx, toolName41, buildArgs39(ctx));
|
|
1341
1709
|
}
|
|
1342
1710
|
};
|
|
1343
1711
|
|
|
1344
1712
|
// src/commands/te-dataops/integration/list-sync-datasources.ts
|
|
1345
|
-
var
|
|
1346
|
-
function
|
|
1713
|
+
var toolName42 = "integration_list_sync_datasources";
|
|
1714
|
+
function buildArgs40(ctx) {
|
|
1347
1715
|
return {
|
|
1348
1716
|
spaceCode: ctx.str("spaceCode"),
|
|
1349
1717
|
env: ctx.str("env")
|
|
@@ -1358,15 +1726,15 @@ var listSyncDatasources = {
|
|
|
1358
1726
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1359
1727
|
],
|
|
1360
1728
|
risk: "read",
|
|
1361
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1729
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName42, buildArgs40(ctx)),
|
|
1362
1730
|
execute: async (ctx) => {
|
|
1363
|
-
return callDataopsApi(ctx,
|
|
1731
|
+
return callDataopsApi(ctx, toolName42, buildArgs40(ctx));
|
|
1364
1732
|
}
|
|
1365
1733
|
};
|
|
1366
1734
|
|
|
1367
1735
|
// src/commands/te-dataops/integration/list-datasource-databases.ts
|
|
1368
|
-
var
|
|
1369
|
-
function
|
|
1736
|
+
var toolName43 = "integration_list_datasource_databases";
|
|
1737
|
+
function buildArgs41(ctx) {
|
|
1370
1738
|
return {
|
|
1371
1739
|
spaceCode: ctx.str("spaceCode"),
|
|
1372
1740
|
datasourceId: ctx.str("datasourceId"),
|
|
@@ -1385,15 +1753,15 @@ var listDatasourceDatabases = {
|
|
|
1385
1753
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1386
1754
|
],
|
|
1387
1755
|
risk: "read",
|
|
1388
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1756
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName43, buildArgs41(ctx)),
|
|
1389
1757
|
execute: async (ctx) => {
|
|
1390
|
-
return callDataopsApi(ctx,
|
|
1758
|
+
return callDataopsApi(ctx, toolName43, buildArgs41(ctx));
|
|
1391
1759
|
}
|
|
1392
1760
|
};
|
|
1393
1761
|
|
|
1394
1762
|
// src/commands/te-dataops/integration/online-datasource.ts
|
|
1395
|
-
var
|
|
1396
|
-
function
|
|
1763
|
+
var toolName44 = "integration_online_datasource";
|
|
1764
|
+
function buildArgs42(ctx) {
|
|
1397
1765
|
return {
|
|
1398
1766
|
spaceCode: ctx.str("spaceCode"),
|
|
1399
1767
|
dataSourceNames: ctx.str("dataSourceNames")
|
|
@@ -1408,15 +1776,15 @@ var onlineDatasource = {
|
|
|
1408
1776
|
{ name: "dataSourceNames", type: "string", required: true, desc: "Datasource name list (comma-separated)" }
|
|
1409
1777
|
],
|
|
1410
1778
|
risk: "write",
|
|
1411
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1779
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName44, buildArgs42(ctx)),
|
|
1412
1780
|
execute: async (ctx) => {
|
|
1413
|
-
return callDataopsApi(ctx,
|
|
1781
|
+
return callDataopsApi(ctx, toolName44, buildArgs42(ctx));
|
|
1414
1782
|
}
|
|
1415
1783
|
};
|
|
1416
1784
|
|
|
1417
1785
|
// src/commands/te-dataops/integration/add-datasource.ts
|
|
1418
|
-
var
|
|
1419
|
-
function
|
|
1786
|
+
var toolName45 = "integration_add_datasource";
|
|
1787
|
+
function buildArgs43(ctx) {
|
|
1420
1788
|
return {
|
|
1421
1789
|
spaceCode: ctx.str("spaceCode"),
|
|
1422
1790
|
componentName: ctx.str("componentName"),
|
|
@@ -1439,14 +1807,14 @@ var addDatasource = {
|
|
|
1439
1807
|
{ name: "envJsonList", type: "string", required: true, desc: "JSON array string of component connection fields. Keys must match requiredFields from +get_datasource_component_template" }
|
|
1440
1808
|
],
|
|
1441
1809
|
risk: "write",
|
|
1442
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1810
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName45, buildArgs43(ctx)),
|
|
1443
1811
|
execute: async (ctx) => {
|
|
1444
|
-
return callDataopsApi(ctx,
|
|
1812
|
+
return callDataopsApi(ctx, toolName45, buildArgs43(ctx));
|
|
1445
1813
|
}
|
|
1446
1814
|
};
|
|
1447
1815
|
|
|
1448
1816
|
// src/commands/te-dataops/integration/modify-datasource.ts
|
|
1449
|
-
var
|
|
1817
|
+
var toolName46 = "integration_modify_datasource";
|
|
1450
1818
|
function optionalBool(ctx, name) {
|
|
1451
1819
|
const flagName = `--${name}`;
|
|
1452
1820
|
const hasFlag = process.argv.some((arg) => arg === flagName || arg.startsWith(`${flagName}=`));
|
|
@@ -1454,7 +1822,7 @@ function optionalBool(ctx, name) {
|
|
|
1454
1822
|
const raw = ctx.str(name);
|
|
1455
1823
|
return raw === "true" || raw === "1" || raw === "yes";
|
|
1456
1824
|
}
|
|
1457
|
-
function
|
|
1825
|
+
function buildArgs44(ctx) {
|
|
1458
1826
|
return {
|
|
1459
1827
|
spaceCode: ctx.str("spaceCode"),
|
|
1460
1828
|
dataSourceName: ctx.str("dataSourceName"),
|
|
@@ -1475,15 +1843,15 @@ var modifyDatasource = {
|
|
|
1475
1843
|
{ name: "envJsonList", type: "string", required: false, desc: "New environment config JSON array string (not passed means not modified)" }
|
|
1476
1844
|
],
|
|
1477
1845
|
risk: "write",
|
|
1478
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1846
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName46, buildArgs44(ctx)),
|
|
1479
1847
|
execute: async (ctx) => {
|
|
1480
|
-
return callDataopsApi(ctx,
|
|
1848
|
+
return callDataopsApi(ctx, toolName46, buildArgs44(ctx));
|
|
1481
1849
|
}
|
|
1482
1850
|
};
|
|
1483
1851
|
|
|
1484
1852
|
// src/commands/te-dataops/integration/list-sync-solutions.ts
|
|
1485
|
-
var
|
|
1486
|
-
function
|
|
1853
|
+
var toolName47 = "integration_list_sync_solutions";
|
|
1854
|
+
function buildArgs45(ctx) {
|
|
1487
1855
|
return {
|
|
1488
1856
|
spaceCode: ctx.str("spaceCode")
|
|
1489
1857
|
};
|
|
@@ -1496,15 +1864,15 @@ var listSyncSolutions = {
|
|
|
1496
1864
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
1497
1865
|
],
|
|
1498
1866
|
risk: "read",
|
|
1499
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1867
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName47, buildArgs45(ctx)),
|
|
1500
1868
|
execute: async (ctx) => {
|
|
1501
|
-
return callDataopsApi(ctx,
|
|
1869
|
+
return callDataopsApi(ctx, toolName47, buildArgs45(ctx));
|
|
1502
1870
|
}
|
|
1503
1871
|
};
|
|
1504
1872
|
|
|
1505
1873
|
// src/commands/te-dataops/integration/get-sync-detail.ts
|
|
1506
|
-
var
|
|
1507
|
-
function
|
|
1874
|
+
var toolName48 = "integration_get_sync_detail";
|
|
1875
|
+
function buildArgs46(ctx) {
|
|
1508
1876
|
return {
|
|
1509
1877
|
spaceCode: ctx.str("spaceCode"),
|
|
1510
1878
|
syncId: ctx.str("syncId"),
|
|
@@ -1521,13 +1889,13 @@ var getSyncDetail = {
|
|
|
1521
1889
|
{ name: "withParams", type: "boolean", required: false, desc: "Also return usedParams; defaults to false" }
|
|
1522
1890
|
],
|
|
1523
1891
|
risk: "read",
|
|
1524
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1525
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1892
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName48, buildArgs46(ctx)),
|
|
1893
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName48, buildArgs46(ctx))
|
|
1526
1894
|
};
|
|
1527
1895
|
|
|
1528
1896
|
// src/commands/te-dataops/integration/list-sync-runs.ts
|
|
1529
|
-
var
|
|
1530
|
-
function
|
|
1897
|
+
var toolName49 = "integration_list_sync_runs";
|
|
1898
|
+
function buildArgs47(ctx) {
|
|
1531
1899
|
return {
|
|
1532
1900
|
spaceCode: ctx.str("spaceCode"),
|
|
1533
1901
|
syncId: ctx.str("syncId"),
|
|
@@ -1544,12 +1912,12 @@ var listSyncRuns = {
|
|
|
1544
1912
|
{ name: "limit", type: "number", required: false, desc: "Number of results to return, defaults to 20 if not provided" }
|
|
1545
1913
|
],
|
|
1546
1914
|
risk: "read",
|
|
1547
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1548
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1915
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName49, buildArgs47(ctx)),
|
|
1916
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName49, buildArgs47(ctx))
|
|
1549
1917
|
};
|
|
1550
1918
|
|
|
1551
1919
|
// src/commands/te-dataops/integration/exec-sync-solution.ts
|
|
1552
|
-
var
|
|
1920
|
+
var toolName50 = "integration_exec_sync_solution";
|
|
1553
1921
|
var execSyncSolution = {
|
|
1554
1922
|
service: "dataops_integration",
|
|
1555
1923
|
command: "+exec_sync_solution",
|
|
@@ -1561,14 +1929,14 @@ var execSyncSolution = {
|
|
|
1561
1929
|
{ name: "comment", type: "string", required: false, desc: "Optional execution remark" }
|
|
1562
1930
|
],
|
|
1563
1931
|
risk: "write",
|
|
1564
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1932
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName50, {
|
|
1565
1933
|
spaceCode: ctx.str("spaceCode"),
|
|
1566
1934
|
syncId: ctx.str("syncId"),
|
|
1567
1935
|
baseDate: ctx.str("baseDate"),
|
|
1568
1936
|
comment: ctx.str("comment")
|
|
1569
1937
|
}),
|
|
1570
1938
|
execute: async (ctx) => {
|
|
1571
|
-
return callDataopsApi(ctx,
|
|
1939
|
+
return callDataopsApi(ctx, toolName50, {
|
|
1572
1940
|
spaceCode: ctx.str("spaceCode"),
|
|
1573
1941
|
syncId: ctx.str("syncId"),
|
|
1574
1942
|
baseDate: ctx.str("baseDate"),
|
|
@@ -1578,8 +1946,8 @@ var execSyncSolution = {
|
|
|
1578
1946
|
};
|
|
1579
1947
|
|
|
1580
1948
|
// src/commands/te-dataops/integration/add-sync-solution.ts
|
|
1581
|
-
var
|
|
1582
|
-
function
|
|
1949
|
+
var toolName51 = "integration_add_sync_solution";
|
|
1950
|
+
function buildArgs48(ctx) {
|
|
1583
1951
|
return {
|
|
1584
1952
|
spaceCode: ctx.str("spaceCode"),
|
|
1585
1953
|
syncName: ctx.str("syncName"),
|
|
@@ -1612,15 +1980,15 @@ var addSyncSolution = {
|
|
|
1612
1980
|
{ name: "remark", type: "string", required: false, desc: "Remark" }
|
|
1613
1981
|
],
|
|
1614
1982
|
risk: "write",
|
|
1615
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1983
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName51, buildArgs48(ctx)),
|
|
1616
1984
|
execute: async (ctx) => {
|
|
1617
|
-
return callDataopsApi(ctx,
|
|
1985
|
+
return callDataopsApi(ctx, toolName51, buildArgs48(ctx));
|
|
1618
1986
|
}
|
|
1619
1987
|
};
|
|
1620
1988
|
|
|
1621
1989
|
// src/commands/te-dataops/integration/save-sync-solution.ts
|
|
1622
|
-
var
|
|
1623
|
-
function
|
|
1990
|
+
var toolName52 = "integration_save_sync_solution";
|
|
1991
|
+
function buildArgs49(ctx) {
|
|
1624
1992
|
return {
|
|
1625
1993
|
spaceCode: ctx.str("spaceCode"),
|
|
1626
1994
|
syncId: ctx.str("syncId"),
|
|
@@ -1647,13 +2015,13 @@ var saveSyncSolution = {
|
|
|
1647
2015
|
{ name: "remark", type: "string", required: false, desc: "Updated remark" }
|
|
1648
2016
|
],
|
|
1649
2017
|
risk: "write",
|
|
1650
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1651
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2018
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName52, buildArgs49(ctx)),
|
|
2019
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName52, buildArgs49(ctx))
|
|
1652
2020
|
};
|
|
1653
2021
|
|
|
1654
2022
|
// src/commands/te-dataops/integration/stop-sync-solution.ts
|
|
1655
|
-
var
|
|
1656
|
-
function
|
|
2023
|
+
var toolName53 = "integration_stop_sync_solution";
|
|
2024
|
+
function buildArgs50(ctx) {
|
|
1657
2025
|
return {
|
|
1658
2026
|
spaceCode: ctx.str("spaceCode"),
|
|
1659
2027
|
syncId: ctx.str("syncId"),
|
|
@@ -1670,8 +2038,8 @@ var stopSyncSolution = {
|
|
|
1670
2038
|
{ name: "taskId", type: "string", required: true, desc: "Running execution task ID from +list_sync_runs" }
|
|
1671
2039
|
],
|
|
1672
2040
|
risk: "write",
|
|
1673
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1674
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2041
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName53, buildArgs50(ctx)),
|
|
2042
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName53, buildArgs50(ctx))
|
|
1675
2043
|
};
|
|
1676
2044
|
|
|
1677
2045
|
// src/commands/te-dataops/integration/index.ts
|
|
@@ -1771,7 +2139,7 @@ function formatAllowed(allowed) {
|
|
|
1771
2139
|
}
|
|
1772
2140
|
|
|
1773
2141
|
// src/commands/te-dataops/operations/create-backfill-job.ts
|
|
1774
|
-
var
|
|
2142
|
+
var toolName54 = "operations_create_backfill_job";
|
|
1775
2143
|
var JOB_TYPES = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
|
|
1776
2144
|
var FAILURE_STRATEGIES = ["END", "CONTINUE"];
|
|
1777
2145
|
var INTERVAL_UNITS = ["DAY", "WEEK", "MONTH"];
|
|
@@ -1878,8 +2246,8 @@ var createBackfillJob = {
|
|
|
1878
2246
|
flags: backfillDraftFlags(),
|
|
1879
2247
|
risk: "write",
|
|
1880
2248
|
validate: validateBackfillDraft,
|
|
1881
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1882
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2249
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName54, buildBackfillDraftArgs(ctx)),
|
|
2250
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName54, buildBackfillDraftArgs(ctx))
|
|
1883
2251
|
};
|
|
1884
2252
|
function backfillDraftFlags() {
|
|
1885
2253
|
return [
|
|
@@ -1901,7 +2269,7 @@ function backfillDraftFlags() {
|
|
|
1901
2269
|
}
|
|
1902
2270
|
|
|
1903
2271
|
// src/commands/te-dataops/operations/delete-backfill-job.ts
|
|
1904
|
-
var
|
|
2272
|
+
var toolName55 = "operations_delete_backfill_job";
|
|
1905
2273
|
var deleteBackfillJob = {
|
|
1906
2274
|
service: "dataops_operations",
|
|
1907
2275
|
command: "+delete_backfill_job",
|
|
@@ -1909,13 +2277,13 @@ var deleteBackfillJob = {
|
|
|
1909
2277
|
flags: backfillJobFlags(),
|
|
1910
2278
|
risk: "high-risk-write",
|
|
1911
2279
|
validate: validateBackfillJobId,
|
|
1912
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1913
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2280
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName55, buildBackfillJobArgs(ctx)),
|
|
2281
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName55, buildBackfillJobArgs(ctx))
|
|
1914
2282
|
};
|
|
1915
2283
|
|
|
1916
2284
|
// src/commands/te-dataops/operations/get-flow-instance-detail.ts
|
|
1917
|
-
var
|
|
1918
|
-
function
|
|
2285
|
+
var toolName56 = "operations_get_flow_instance_detail";
|
|
2286
|
+
function buildArgs51(ctx) {
|
|
1919
2287
|
return {
|
|
1920
2288
|
spaceCode: ctx.str("spaceCode"),
|
|
1921
2289
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1925,21 +2293,21 @@ function buildArgs42(ctx) {
|
|
|
1925
2293
|
var getFlowInstanceDetail = {
|
|
1926
2294
|
service: "dataops_operations",
|
|
1927
2295
|
command: "+get_flow_instance_detail",
|
|
1928
|
-
description: "Get one workflow instance detail from the operations perspective. Use after +search_flow_instances returns flowCode and flowInstanceId. Returns flowInstance, tasks, relations, taskInstances, and summary
|
|
2296
|
+
description: "Get one workflow instance detail from the operations perspective. Use after +search_flow_instances returns flowCode and flowInstanceId. Requires dwOMInstanceView. Returns flowInstance, tasks, relations, taskInstances, and summary. flowInstance.instanceParamMap contains the historical execution parameter snapshot, or null/omitted when unavailable; current definitions do not replace it.",
|
|
1929
2297
|
flags: [
|
|
1930
2298
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1931
2299
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code from +search_flow_instances" },
|
|
1932
2300
|
{ name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" }
|
|
1933
2301
|
],
|
|
1934
2302
|
risk: "read",
|
|
1935
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2303
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName56, buildArgs51(ctx)),
|
|
1936
2304
|
execute: async (ctx) => {
|
|
1937
|
-
return callDataopsApi(ctx,
|
|
2305
|
+
return callDataopsApi(ctx, toolName56, buildArgs51(ctx));
|
|
1938
2306
|
}
|
|
1939
2307
|
};
|
|
1940
2308
|
|
|
1941
2309
|
// src/commands/te-dataops/operations/get-backfill-job-detail.ts
|
|
1942
|
-
var
|
|
2310
|
+
var toolName57 = "operations_get_backfill_job_detail";
|
|
1943
2311
|
var getBackfillJobDetail = {
|
|
1944
2312
|
service: "dataops_operations",
|
|
1945
2313
|
command: "+get_backfill_job_detail",
|
|
@@ -1947,16 +2315,16 @@ var getBackfillJobDetail = {
|
|
|
1947
2315
|
flags: backfillJobFlags(),
|
|
1948
2316
|
risk: "read",
|
|
1949
2317
|
validate: validateBackfillJobId,
|
|
1950
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1951
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2318
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName57, buildBackfillJobArgs(ctx)),
|
|
2319
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName57, buildBackfillJobArgs(ctx))
|
|
1952
2320
|
};
|
|
1953
2321
|
|
|
1954
2322
|
// src/commands/te-dataops/operations/get-task-instance-detail.ts
|
|
1955
|
-
var
|
|
2323
|
+
var toolName58 = "operations_get_task_instance_detail";
|
|
1956
2324
|
function optionalBool2(ctx, name) {
|
|
1957
2325
|
return ctx.str(name) === "" ? void 0 : ctx.bool(name);
|
|
1958
2326
|
}
|
|
1959
|
-
function
|
|
2327
|
+
function buildArgs52(ctx) {
|
|
1960
2328
|
return {
|
|
1961
2329
|
spaceCode: ctx.str("spaceCode"),
|
|
1962
2330
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1970,7 +2338,7 @@ function buildArgs43(ctx) {
|
|
|
1970
2338
|
var getTaskInstanceDetail = {
|
|
1971
2339
|
service: "dataops_operations",
|
|
1972
2340
|
command: "+get_task_instance_detail",
|
|
1973
|
-
description: "Get one task instance detail. Requires spaceCode, flowCode, flowInstanceId, and one selector: taskInstanceId, taskCode, or exact taskName. taskInstanceId is the precise selector for retried tasks and wins when passed. includeLog defaults to false.",
|
|
2341
|
+
description: "Get one task instance detail. Requires spaceCode, flowCode, flowInstanceId, and one selector: taskInstanceId, taskCode, or exact taskName. taskInstanceId is the precise selector for retried tasks and wins when passed. Requires dwOMInstanceView. includeLog defaults to false; use true to include historical execution values in log.params, independently of current definitions.",
|
|
1974
2342
|
flags: [
|
|
1975
2343
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1976
2344
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code from +search_flow_instances" },
|
|
@@ -1981,15 +2349,15 @@ var getTaskInstanceDetail = {
|
|
|
1981
2349
|
{ name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
|
|
1982
2350
|
],
|
|
1983
2351
|
risk: "read",
|
|
1984
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2352
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName58, buildArgs52(ctx)),
|
|
1985
2353
|
execute: async (ctx) => {
|
|
1986
|
-
return callDataopsApi(ctx,
|
|
2354
|
+
return callDataopsApi(ctx, toolName58, buildArgs52(ctx));
|
|
1987
2355
|
}
|
|
1988
2356
|
};
|
|
1989
2357
|
|
|
1990
2358
|
// src/commands/te-dataops/operations/list-backfill-flows.ts
|
|
1991
|
-
var
|
|
1992
|
-
function
|
|
2359
|
+
var toolName59 = "operations_list_backfill_flows";
|
|
2360
|
+
function buildArgs53(ctx) {
|
|
1993
2361
|
return { spaceCode: ctx.str("spaceCode") };
|
|
1994
2362
|
}
|
|
1995
2363
|
var listBackfillFlows = {
|
|
@@ -2000,12 +2368,12 @@ var listBackfillFlows = {
|
|
|
2000
2368
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2001
2369
|
],
|
|
2002
2370
|
risk: "read",
|
|
2003
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2004
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2371
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName59, buildArgs53(ctx)),
|
|
2372
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName59, buildArgs53(ctx))
|
|
2005
2373
|
};
|
|
2006
2374
|
|
|
2007
2375
|
// src/commands/te-dataops/operations/rerun-backfill-job.ts
|
|
2008
|
-
var
|
|
2376
|
+
var toolName60 = "operations_rerun_backfill_job";
|
|
2009
2377
|
var rerunBackfillJob = {
|
|
2010
2378
|
service: "dataops_operations",
|
|
2011
2379
|
command: "+rerun_backfill_job",
|
|
@@ -2013,12 +2381,12 @@ var rerunBackfillJob = {
|
|
|
2013
2381
|
flags: backfillJobFlags(),
|
|
2014
2382
|
risk: "write",
|
|
2015
2383
|
validate: validateBackfillJobId,
|
|
2016
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2017
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2384
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName60, buildBackfillJobArgs(ctx)),
|
|
2385
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName60, buildBackfillJobArgs(ctx))
|
|
2018
2386
|
};
|
|
2019
2387
|
|
|
2020
2388
|
// src/commands/te-dataops/operations/run-backfill-job.ts
|
|
2021
|
-
var
|
|
2389
|
+
var toolName61 = "operations_run_backfill_job";
|
|
2022
2390
|
var runBackfillJob = {
|
|
2023
2391
|
service: "dataops_operations",
|
|
2024
2392
|
command: "+run_backfill_job",
|
|
@@ -2026,16 +2394,16 @@ var runBackfillJob = {
|
|
|
2026
2394
|
flags: backfillJobFlags(),
|
|
2027
2395
|
risk: "write",
|
|
2028
2396
|
validate: validateBackfillJobId,
|
|
2029
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2030
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2397
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName61, buildBackfillJobArgs(ctx)),
|
|
2398
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName61, buildBackfillJobArgs(ctx))
|
|
2031
2399
|
};
|
|
2032
2400
|
|
|
2033
2401
|
// src/commands/te-dataops/operations/search-backfill-jobs.ts
|
|
2034
|
-
var
|
|
2402
|
+
var toolName62 = "operations_search_backfill_jobs";
|
|
2035
2403
|
var JOB_TYPES2 = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
|
|
2036
2404
|
var JOB_STATUSES = ["DRAFT", "RUNNING", "STOP", "FAIL", "SUCCESS", "READY_STOP"];
|
|
2037
2405
|
var JOB_SORTS = ["ID", "JOB_NAME", "CREATE_TIME", "UPDATE_TIME", "START_DATE", "END_DATE"];
|
|
2038
|
-
function
|
|
2406
|
+
function buildArgs54(ctx) {
|
|
2039
2407
|
return {
|
|
2040
2408
|
spaceCode: ctx.str("spaceCode"),
|
|
2041
2409
|
keyword: ctx.str("keyword"),
|
|
@@ -2095,13 +2463,13 @@ var searchBackfillJobs = {
|
|
|
2095
2463
|
],
|
|
2096
2464
|
risk: "read",
|
|
2097
2465
|
validate: validateSearch,
|
|
2098
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2099
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2466
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName62, buildArgs54(ctx)),
|
|
2467
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName62, buildArgs54(ctx))
|
|
2100
2468
|
};
|
|
2101
2469
|
|
|
2102
2470
|
// src/commands/te-dataops/operations/search-flow-instances.ts
|
|
2103
|
-
var
|
|
2104
|
-
function
|
|
2471
|
+
var toolName63 = "operations_search_flow_instances";
|
|
2472
|
+
function buildArgs55(ctx) {
|
|
2105
2473
|
return {
|
|
2106
2474
|
spaceCode: ctx.str("spaceCode"),
|
|
2107
2475
|
keyword: ctx.str("keyword"),
|
|
@@ -2115,25 +2483,25 @@ function buildArgs46(ctx) {
|
|
|
2115
2483
|
var searchFlowInstances = {
|
|
2116
2484
|
service: "dataops_operations",
|
|
2117
2485
|
command: "+search_flow_instances",
|
|
2118
|
-
description: "Search workflow instances from the operations perspective. Requires spaceCode; keyword, startDate, endDate, status, pageNum, and pageSize are optional. Returns totalCount, returnedCount, pageNum, pageSize, hasMore, instances, statusCounts, triggerTypeCounts, and ownerCounts. Use flowInstanceId for operations inspection; do not confuse it with executeId.",
|
|
2486
|
+
description: "Search workflow instances from the operations perspective. Requires spaceCode; keyword, startDate, endDate, status, pageNum, and pageSize are optional. Returns totalCount, returnedCount, pageNum, pageSize, hasMore, instances, statusCounts, triggerTypeCounts, and ownerCounts. Each instance uses status for execution state, triggerType for its trigger, and flowStatus for the workflow definition state. Use flowInstanceId for operations inspection; do not confuse it with executeId.",
|
|
2119
2487
|
flags: [
|
|
2120
2488
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
2121
2489
|
{ name: "keyword", type: "string", required: false, desc: "Optional keyword; fuzzy matches instance ID, workflow name, and workflow remark" },
|
|
2122
2490
|
{ name: "startDate", type: "string", required: false, desc: "Optional execution start date, yyyy-MM-dd" },
|
|
2123
2491
|
{ name: "endDate", type: "string", required: false, desc: "Optional execution end date, yyyy-MM-dd" },
|
|
2124
|
-
{ name: "status", type: "string", required: false, desc: "Optional comma-separated statuses:
|
|
2492
|
+
{ name: "status", type: "string", required: false, desc: "Optional comma-separated statuses: RUNNING,SUCCESS,FAIL,READY_PAUSE,PAUSE,STOP. WAITING filtering is not supported" },
|
|
2125
2493
|
{ name: "pageNum", type: "number", required: false, desc: "Optional page number; default 1" },
|
|
2126
2494
|
{ name: "pageSize", type: "number", required: false, desc: "Optional page size; default 20, max 100" }
|
|
2127
2495
|
],
|
|
2128
2496
|
risk: "read",
|
|
2129
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2497
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName63, buildArgs55(ctx)),
|
|
2130
2498
|
execute: async (ctx) => {
|
|
2131
|
-
return callDataopsApi(ctx,
|
|
2499
|
+
return callDataopsApi(ctx, toolName63, buildArgs55(ctx));
|
|
2132
2500
|
}
|
|
2133
2501
|
};
|
|
2134
2502
|
|
|
2135
2503
|
// src/commands/te-dataops/operations/stop-backfill-job.ts
|
|
2136
|
-
var
|
|
2504
|
+
var toolName64 = "operations_stop_backfill_job";
|
|
2137
2505
|
var stopBackfillJob = {
|
|
2138
2506
|
service: "dataops_operations",
|
|
2139
2507
|
command: "+stop_backfill_job",
|
|
@@ -2141,13 +2509,13 @@ var stopBackfillJob = {
|
|
|
2141
2509
|
flags: backfillJobFlags(),
|
|
2142
2510
|
risk: "high-risk-write",
|
|
2143
2511
|
validate: validateBackfillJobId,
|
|
2144
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2145
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2512
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName64, buildBackfillJobArgs(ctx)),
|
|
2513
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName64, buildBackfillJobArgs(ctx))
|
|
2146
2514
|
};
|
|
2147
2515
|
|
|
2148
2516
|
// src/commands/te-dataops/operations/stop-flow-instance.ts
|
|
2149
|
-
var
|
|
2150
|
-
function
|
|
2517
|
+
var toolName65 = "operations_stop_flow_instance";
|
|
2518
|
+
function buildArgs56(ctx) {
|
|
2151
2519
|
const executeId = ctx.optionalNum("executeId");
|
|
2152
2520
|
const flowInstanceId = ctx.optionalNum("flowInstanceId");
|
|
2153
2521
|
if (executeId == null && flowInstanceId == null || executeId != null && flowInstanceId != null) {
|
|
@@ -2174,15 +2542,15 @@ var stopFlowInstance = {
|
|
|
2174
2542
|
{ name: "flowInstanceId", type: "number", required: false, desc: "Workflow instance ID returned by dataops_operations +search_flow_instances" }
|
|
2175
2543
|
],
|
|
2176
2544
|
risk: "write",
|
|
2177
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2545
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName65, buildArgs56(ctx)),
|
|
2178
2546
|
execute: async (ctx) => {
|
|
2179
|
-
return callDataopsApi(ctx,
|
|
2547
|
+
return callDataopsApi(ctx, toolName65, buildArgs56(ctx));
|
|
2180
2548
|
}
|
|
2181
2549
|
};
|
|
2182
2550
|
|
|
2183
2551
|
// src/commands/te-dataops/operations/update-backfill-job.ts
|
|
2184
|
-
var
|
|
2185
|
-
function
|
|
2552
|
+
var toolName66 = "operations_update_backfill_job";
|
|
2553
|
+
function buildArgs57(ctx) {
|
|
2186
2554
|
return {
|
|
2187
2555
|
...buildBackfillDraftArgs(ctx),
|
|
2188
2556
|
jobId: ctx.num("jobId")
|
|
@@ -2204,8 +2572,8 @@ var updateBackfillJob = {
|
|
|
2204
2572
|
],
|
|
2205
2573
|
risk: "write",
|
|
2206
2574
|
validate: validateUpdate,
|
|
2207
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2208
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2575
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName66, buildArgs57(ctx)),
|
|
2576
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName66, buildArgs57(ctx))
|
|
2209
2577
|
};
|
|
2210
2578
|
|
|
2211
2579
|
// src/commands/te-dataops/operations/index.ts
|
|
@@ -2227,16 +2595,16 @@ var commands4 = [
|
|
|
2227
2595
|
var operations_default = commands4;
|
|
2228
2596
|
|
|
2229
2597
|
// src/commands/te-dataops/repo/list-spaces.ts
|
|
2230
|
-
var
|
|
2598
|
+
var toolName67 = "repo_list_spaces";
|
|
2231
2599
|
var listSpaces = {
|
|
2232
2600
|
service: "dataops_repo",
|
|
2233
2601
|
command: "+list_spaces",
|
|
2234
2602
|
description: "List DataOps spaces accessible to the current user. Use this first when spaceCode is unknown. Returns createTime, spaceCode, and spaceDisplayName. No flags are required.",
|
|
2235
2603
|
flags: [],
|
|
2236
2604
|
risk: "read",
|
|
2237
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2605
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName67, {}),
|
|
2238
2606
|
execute: async (ctx) => {
|
|
2239
|
-
return callDataopsApi(ctx,
|
|
2607
|
+
return callDataopsApi(ctx, toolName67, {});
|
|
2240
2608
|
}
|
|
2241
2609
|
};
|
|
2242
2610
|
|
|
@@ -2247,12 +2615,12 @@ var commands5 = [
|
|
|
2247
2615
|
var repo_default = commands5;
|
|
2248
2616
|
|
|
2249
2617
|
// src/commands/te-dataops/ide/cancel-sql-query.ts
|
|
2250
|
-
var
|
|
2618
|
+
var toolName68 = "ide_cancel_sql_query";
|
|
2251
2619
|
function optionalString4(ctx, name) {
|
|
2252
2620
|
const value = ctx.str(name);
|
|
2253
2621
|
return value === "" ? void 0 : value;
|
|
2254
2622
|
}
|
|
2255
|
-
function
|
|
2623
|
+
function buildArgs58(ctx) {
|
|
2256
2624
|
return {
|
|
2257
2625
|
spaceCode: ctx.str("spaceCode"),
|
|
2258
2626
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -2269,18 +2637,18 @@ var cancelSqlQuery = {
|
|
|
2269
2637
|
{ name: "requestId", type: "string", required: false, desc: "Optional request ID returned by +submit_sql_query, used only for trace display" }
|
|
2270
2638
|
],
|
|
2271
2639
|
risk: "write",
|
|
2272
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2273
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2640
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName68, buildArgs58(ctx)),
|
|
2641
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName68, buildArgs58(ctx))
|
|
2274
2642
|
};
|
|
2275
2643
|
|
|
2276
2644
|
// src/commands/te-dataops/ide/get-sql-query-status.ts
|
|
2277
|
-
var
|
|
2645
|
+
var toolName69 = "ide_get_sql_query_status";
|
|
2278
2646
|
var downloadPath = "/api/cli/dataops/v1/gaia/ide/sql-query-download";
|
|
2279
2647
|
function optionalString5(ctx, name) {
|
|
2280
2648
|
const value = ctx.str(name);
|
|
2281
2649
|
return value === "" ? void 0 : value;
|
|
2282
2650
|
}
|
|
2283
|
-
function
|
|
2651
|
+
function buildArgs59(ctx) {
|
|
2284
2652
|
return {
|
|
2285
2653
|
spaceCode: ctx.str("spaceCode"),
|
|
2286
2654
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -2308,9 +2676,9 @@ var getSqlQueryStatus = {
|
|
|
2308
2676
|
{ name: "downloadTo", type: "string", required: false, desc: "Optional local file path. After SUCCESS, stream the result zip and replace this path only when the download completes; use a .zip suffix, for example ./result.zip." }
|
|
2309
2677
|
],
|
|
2310
2678
|
risk: "read",
|
|
2311
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2679
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName69, buildArgs59(ctx)),
|
|
2312
2680
|
execute: async (ctx) => {
|
|
2313
|
-
const data = await callDataopsApi(ctx,
|
|
2681
|
+
const data = await callDataopsApi(ctx, toolName69, buildArgs59(ctx));
|
|
2314
2682
|
const downloadTo = optionalString5(ctx, "downloadTo");
|
|
2315
2683
|
if (downloadTo && isDownloadReady(data)) {
|
|
2316
2684
|
return { ...data, localFile: await downloadResult(ctx, data, downloadTo) };
|
|
@@ -2320,12 +2688,12 @@ var getSqlQueryStatus = {
|
|
|
2320
2688
|
};
|
|
2321
2689
|
|
|
2322
2690
|
// src/commands/te-dataops/ide/list-catalogs.ts
|
|
2323
|
-
var
|
|
2691
|
+
var toolName70 = "ide_list_catalogs";
|
|
2324
2692
|
function optionalString6(ctx, name) {
|
|
2325
2693
|
const value = ctx.str(name);
|
|
2326
2694
|
return value === "" ? void 0 : value;
|
|
2327
2695
|
}
|
|
2328
|
-
function
|
|
2696
|
+
function buildArgs60(ctx) {
|
|
2329
2697
|
return {
|
|
2330
2698
|
spaceCode: ctx.str("spaceCode"),
|
|
2331
2699
|
connType: optionalString6(ctx, "connType"),
|
|
@@ -2342,19 +2710,19 @@ var listCatalogs = {
|
|
|
2342
2710
|
{ name: "repoCode", type: "string", required: false, desc: "Optional repository code. Default te_etl" }
|
|
2343
2711
|
],
|
|
2344
2712
|
risk: "read",
|
|
2345
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2713
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName70, buildArgs60(ctx)),
|
|
2346
2714
|
execute: async (ctx) => {
|
|
2347
|
-
return callDataopsApi(ctx,
|
|
2715
|
+
return callDataopsApi(ctx, toolName70, buildArgs60(ctx));
|
|
2348
2716
|
}
|
|
2349
2717
|
};
|
|
2350
2718
|
|
|
2351
2719
|
// src/commands/te-dataops/ide/get-schema-info.ts
|
|
2352
|
-
var
|
|
2720
|
+
var toolName71 = "ide_get_schema_info";
|
|
2353
2721
|
function optionalString7(ctx, name) {
|
|
2354
2722
|
const value = ctx.str(name);
|
|
2355
2723
|
return value === "" ? void 0 : value;
|
|
2356
2724
|
}
|
|
2357
|
-
function
|
|
2725
|
+
function buildArgs61(ctx) {
|
|
2358
2726
|
return {
|
|
2359
2727
|
spaceCode: ctx.str("spaceCode"),
|
|
2360
2728
|
connType: optionalString7(ctx, "connType"),
|
|
@@ -2386,14 +2754,14 @@ var getSchemaInfo = {
|
|
|
2386
2754
|
{ name: "schema", type: "string", required: true, desc: "Schema name" }
|
|
2387
2755
|
],
|
|
2388
2756
|
risk: "read",
|
|
2389
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2757
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName71, buildArgs61(ctx)),
|
|
2390
2758
|
execute: async (ctx) => {
|
|
2391
|
-
return schemaStats(await callDataopsApi(ctx,
|
|
2759
|
+
return schemaStats(await callDataopsApi(ctx, toolName71, buildArgs61(ctx)));
|
|
2392
2760
|
}
|
|
2393
2761
|
};
|
|
2394
2762
|
|
|
2395
2763
|
// src/commands/te-dataops/ide/get-table-detail.ts
|
|
2396
|
-
var
|
|
2764
|
+
var toolName72 = "ide_get_table_detail";
|
|
2397
2765
|
function optionalString8(ctx, name) {
|
|
2398
2766
|
const value = ctx.str(name);
|
|
2399
2767
|
return value === "" ? void 0 : value;
|
|
@@ -2406,7 +2774,7 @@ function optionalEntityType(ctx) {
|
|
|
2406
2774
|
const value = optionalString8(ctx, "entityType");
|
|
2407
2775
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2408
2776
|
}
|
|
2409
|
-
function
|
|
2777
|
+
function buildArgs62(ctx) {
|
|
2410
2778
|
return {
|
|
2411
2779
|
spaceCode: ctx.str("spaceCode"),
|
|
2412
2780
|
connType: optionalString8(ctx, "connType"),
|
|
@@ -2441,19 +2809,19 @@ var getTableDetail2 = {
|
|
|
2441
2809
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2442
2810
|
}
|
|
2443
2811
|
},
|
|
2444
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2812
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName72, buildArgs62(ctx)),
|
|
2445
2813
|
execute: async (ctx) => {
|
|
2446
|
-
return callDataopsApi(ctx,
|
|
2814
|
+
return callDataopsApi(ctx, toolName72, buildArgs62(ctx));
|
|
2447
2815
|
}
|
|
2448
2816
|
};
|
|
2449
2817
|
|
|
2450
2818
|
// src/commands/te-dataops/ide/search-tables.ts
|
|
2451
|
-
var
|
|
2819
|
+
var toolName73 = "ide_search_tables";
|
|
2452
2820
|
function optionalString9(ctx, name) {
|
|
2453
2821
|
const value = ctx.str(name);
|
|
2454
2822
|
return value === "" ? void 0 : value;
|
|
2455
2823
|
}
|
|
2456
|
-
function
|
|
2824
|
+
function buildArgs63(ctx) {
|
|
2457
2825
|
return {
|
|
2458
2826
|
spaceCode: ctx.str("spaceCode"),
|
|
2459
2827
|
connType: optionalString9(ctx, "connType"),
|
|
@@ -2474,15 +2842,15 @@ var searchTables = {
|
|
|
2474
2842
|
{ name: "size", type: "number", required: false, desc: "Optional maximum results. Default 20" }
|
|
2475
2843
|
],
|
|
2476
2844
|
risk: "read",
|
|
2477
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2845
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName73, buildArgs63(ctx)),
|
|
2478
2846
|
execute: async (ctx) => {
|
|
2479
|
-
return callDataopsApi(ctx,
|
|
2847
|
+
return callDataopsApi(ctx, toolName73, buildArgs63(ctx));
|
|
2480
2848
|
}
|
|
2481
2849
|
};
|
|
2482
2850
|
|
|
2483
2851
|
// src/commands/te-dataops/ide/list-repos.ts
|
|
2484
|
-
var
|
|
2485
|
-
function
|
|
2852
|
+
var toolName74 = "ide_list_repos";
|
|
2853
|
+
function buildArgs64(ctx) {
|
|
2486
2854
|
return {
|
|
2487
2855
|
spaceCode: ctx.str("spaceCode")
|
|
2488
2856
|
};
|
|
@@ -2495,14 +2863,14 @@ var listRepos = {
|
|
|
2495
2863
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2496
2864
|
],
|
|
2497
2865
|
risk: "read",
|
|
2498
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2866
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName74, buildArgs64(ctx)),
|
|
2499
2867
|
execute: async (ctx) => {
|
|
2500
|
-
return callDataopsApi(ctx,
|
|
2868
|
+
return callDataopsApi(ctx, toolName74, buildArgs64(ctx));
|
|
2501
2869
|
}
|
|
2502
2870
|
};
|
|
2503
2871
|
|
|
2504
2872
|
// src/commands/te-dataops/ide/list-tables.ts
|
|
2505
|
-
var
|
|
2873
|
+
var toolName75 = "ide_list_tables";
|
|
2506
2874
|
function optionalString10(ctx, name) {
|
|
2507
2875
|
const value = ctx.str(name);
|
|
2508
2876
|
return value === "" ? void 0 : value;
|
|
@@ -2511,7 +2879,7 @@ function optionalEntityType2(ctx) {
|
|
|
2511
2879
|
const value = optionalString10(ctx, "entityType");
|
|
2512
2880
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2513
2881
|
}
|
|
2514
|
-
function
|
|
2882
|
+
function buildArgs65(ctx) {
|
|
2515
2883
|
return {
|
|
2516
2884
|
spaceCode: ctx.str("spaceCode"),
|
|
2517
2885
|
connType: optionalString10(ctx, "connType"),
|
|
@@ -2544,19 +2912,19 @@ var listTables = {
|
|
|
2544
2912
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2545
2913
|
}
|
|
2546
2914
|
},
|
|
2547
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2915
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName75, buildArgs65(ctx)),
|
|
2548
2916
|
execute: async (ctx) => {
|
|
2549
|
-
return callDataopsApi(ctx,
|
|
2917
|
+
return callDataopsApi(ctx, toolName75, buildArgs65(ctx));
|
|
2550
2918
|
}
|
|
2551
2919
|
};
|
|
2552
2920
|
|
|
2553
2921
|
// src/commands/te-dataops/ide/submit-sql-query.ts
|
|
2554
|
-
var
|
|
2922
|
+
var toolName76 = "ide_submit_sql_query";
|
|
2555
2923
|
function optionalString11(ctx, name) {
|
|
2556
2924
|
const value = ctx.str(name);
|
|
2557
2925
|
return value === "" ? void 0 : value;
|
|
2558
2926
|
}
|
|
2559
|
-
function
|
|
2927
|
+
function buildArgs66(ctx) {
|
|
2560
2928
|
return {
|
|
2561
2929
|
spaceCode: ctx.str("spaceCode"),
|
|
2562
2930
|
repoCode: optionalString11(ctx, "repoCode"),
|
|
@@ -2575,8 +2943,8 @@ var submitSqlQuery = {
|
|
|
2575
2943
|
{ name: "engineType", type: "string", required: false, desc: "SQL execution engine. Defaults to TASK_ENGINE_TRINO. Optional: TASK_ENGINE_STARROCKS." }
|
|
2576
2944
|
],
|
|
2577
2945
|
risk: "read",
|
|
2578
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2579
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2946
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName76, buildArgs66(ctx)),
|
|
2947
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName76, buildArgs66(ctx))
|
|
2580
2948
|
};
|
|
2581
2949
|
|
|
2582
2950
|
// src/commands/te-dataops/ide/index.ts
|