@thinkingai/ae-cli 6.0.31 → 6.0.33
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 +3 -2
- package/README.zh.md +3 -2
- package/dist/{auth-MEJ642P4.js → auth-ENM3FE6L.js} +3 -2
- package/dist/{auth-7H3HAAJ3.js → auth-UPGUOKTW.js} +13 -6
- package/dist/{capability-SEH3JWLN.js → capability-AJC5CBRT.js} +50 -18
- package/dist/{capability-SQ2IWKP3.js → capability-TQ5KU5Q6.js} +50 -18
- package/dist/chunk-24BAVOX3.js +51 -0
- package/dist/{chunk-MDJGDI6K.js → chunk-3KI3RRXX.js} +5 -5
- package/dist/{chunk-PKRD2IEM.js → chunk-3P3562ZX.js} +9 -7
- package/dist/{chunk-R77JT7XD.js → chunk-4Q5TNP4Q.js} +4 -4
- package/dist/{chunk-TKQJQXWT.js → chunk-6CHYBI64.js} +7 -4
- package/dist/{chunk-6LEYLOV3.js → chunk-CPVTECJ3.js} +9 -7
- package/dist/{chunk-KCA6BA5D.js → chunk-DB4Q3ANU.js} +5 -3
- package/dist/{chunk-2NDGFQHW.js → chunk-E7UXXHO3.js} +11 -3
- package/dist/{chunk-I4A62X3N.js → chunk-HQ2A7ITL.js} +23 -14
- package/dist/chunk-IMMGMU54.js +674 -0
- package/dist/{chunk-AJTH7LT3.js → chunk-IR4ZLVPW.js} +4 -2
- package/dist/{chunk-N2QORU5D.js → chunk-ISY6HMHM.js} +7 -4
- package/dist/{chunk-KGJQCYVC.js → chunk-LCXU3AAT.js} +4 -2
- package/dist/chunk-LYVNONC4.js +86 -0
- package/dist/{chunk-DYOS6YY7.js → chunk-RGXCNC4N.js} +23 -14
- package/dist/{chunk-YCLVYFK7.js → chunk-V6FR6WTW.js} +45 -87
- package/dist/chunk-VTWMIC5L.js +27 -0
- package/dist/{cli-token-TVQRSE46.js → cli-token-4SBMXAUK.js} +6 -3
- package/dist/{client-2643Z5AG.js → client-PP5FETMW.js} +4 -3
- package/dist/community-report-client-KK2QBANO.js +145 -0
- package/dist/{config-7UZWDE74.js → config-RCCGHHYA.js} +6 -3
- package/dist/index.js +541 -234
- package/dist/{metadata-W6JFFMBA.js → metadata-3M5F2AED.js} +15 -14
- package/dist/{metadata-X62TKIVK.js → metadata-W2MEOI4Z.js} +15 -14
- package/dist/{model-T3KZJWLW.js → model-OYQLXCQY.js} +3 -2
- package/dist/{raw-CN542NGT.js → raw-TPB7KSZO.js} +6 -4
- package/dist/{sync-ERNHDPB5.js → sync-EFJKFZK2.js} +6 -3
- package/dist/{te-agent-FCCWUDTJ.js → te-agent-K2OWMZXT.js} +3 -2
- package/dist/{te-analysis-NJGNWZFC.js → te-analysis-I73ZS4NK.js} +2196 -120
- package/dist/{te-analysis-YGV5V5EX.js → te-analysis-Q7AZCDU4.js} +2196 -120
- package/dist/te-common-ST3QPSXJ.js +61 -0
- package/dist/te-common-WSLIKKPC.js +61 -0
- package/dist/te-community-WXGB6IOX.js +1659 -0
- package/dist/te-community-X2AHXGCA.js +1659 -0
- package/dist/{te-dataops-ZNJBQ6VT.js → te-dataops-MJV54MNY.js} +10 -8
- package/dist/{te-dataops-F36T656A.js → te-dataops-OA7I6HBG.js} +10 -8
- package/dist/te-engage-GJRVQMK3.js +3895 -0
- package/dist/te-engage-JIXX3WBI.js +3895 -0
- package/dist/{te-kb-NT33UHAE.js → te-kb-CIZXRWMO.js} +105 -23
- package/dist/{te-meta-VKWNAWO4.js → te-meta-Q4L6EE3Q.js} +8 -240
- package/dist/{te-meta-MAAUHFQO.js → te-meta-VHCN4Q62.js} +8 -240
- package/dist/{te-team-OKCOX7OE.js → te-team-PDKKW7Q5.js} +7 -6
- package/dist/tracking/i18n/resources/cli/en.json +4 -3
- package/dist/tracking/i18n/resources/cli/ja.json +4 -3
- package/dist/tracking/i18n/resources/cli/ko.json +4 -3
- package/dist/tracking/i18n/resources/cli/zh.json +4 -3
- package/package.json +6 -2
- package/skills/ae-agent/SKILL.md +2 -1
- package/skills/ae-analysis/SKILL.md +21 -7
- package/skills/ae-analysis/references/adhoc_export.md +5 -6
- package/skills/ae-analysis/references/adhoc_run.md +7 -9
- package/skills/ae-analysis/references/ai_models.md +17 -1
- package/skills/ae-analysis/references/alert_create.md +25 -0
- package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
- package/skills/ae-analysis/references/alert_delete.md +26 -0
- package/skills/ae-analysis/references/alert_detail_list.md +27 -0
- package/skills/ae-analysis/references/alert_get.md +25 -0
- package/skills/ae-analysis/references/alert_job_list.md +24 -0
- package/skills/ae-analysis/references/alert_list.md +27 -0
- package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
- package/skills/ae-analysis/references/alert_start.md +25 -0
- package/skills/ae-analysis/references/alert_stop.md +25 -0
- package/skills/ae-analysis/references/alert_update.md +26 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +11 -11
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +93 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -8
- package/skills/ae-analysis/references/asset_url_get.md +4 -3
- package/skills/ae-analysis/references/bi_panel_create.md +3 -3
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +2 -2
- package/skills/ae-analysis/references/bi_panel_page_data_run.md +1 -1
- package/skills/ae-analysis/references/check_delete.md +27 -0
- package/skills/ae-analysis/references/check_export.md +27 -0
- package/skills/ae-analysis/references/check_get.md +27 -0
- package/skills/ae-analysis/references/check_list.md +24 -0
- package/skills/ae-analysis/references/check_retry.md +27 -0
- package/skills/ae-analysis/references/check_run.md +25 -0
- package/skills/ae-analysis/references/command_index.md +114 -46
- package/skills/ae-analysis/references/create_entity.md +2 -2
- package/skills/ae-analysis/references/dashboard_create.md +3 -3
- package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
- package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -4
- package/skills/ae-analysis/references/dashboard_report_data_run.md +4 -4
- package/skills/ae-analysis/references/drilldown_entities_export.md +26 -0
- package/skills/ae-analysis/references/drilldown_entities_run.md +33 -0
- package/skills/ae-analysis/references/drilldown_events_export.md +21 -0
- package/skills/ae-analysis/references/drilldown_events_run.md +23 -0
- package/skills/ae-analysis/references/drilldown_user_events_export.md +6 -3
- package/skills/ae-analysis/references/drilldown_user_events_run.md +6 -6
- package/skills/ae-analysis/references/entity_detail_export.md +2 -0
- package/skills/ae-analysis/references/entity_detail_run.md +8 -1
- package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
- package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
- package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
- package/skills/ae-analysis/references/event_detail_export.md +2 -0
- package/skills/ae-analysis/references/event_detail_run.md +2 -0
- package/skills/ae-analysis/references/event_list.md +10 -2
- package/skills/ae-analysis/references/ingest_error_list.md +27 -0
- package/skills/ae-analysis/references/ingest_summary.md +26 -0
- package/skills/ae-analysis/references/list_entities.md +1 -1
- package/skills/ae-analysis/references/live_data_export.md +27 -0
- package/skills/ae-analysis/references/live_data_list.md +27 -0
- package/skills/ae-analysis/references/metric_create.md +13 -4
- package/skills/ae-analysis/references/metric_delete.md +7 -0
- package/skills/ae-analysis/references/metric_get.md +6 -0
- package/skills/ae-analysis/references/metric_list.md +16 -3
- package/skills/ae-analysis/references/metric_update.md +12 -1
- package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
- package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
- package/skills/ae-analysis/references/plan_delete_items.md +30 -0
- package/skills/ae-analysis/references/plan_export.md +26 -0
- package/skills/ae-analysis/references/plan_generate.md +27 -0
- package/skills/ae-analysis/references/plan_get.md +24 -0
- package/skills/ae-analysis/references/plan_import_excel.md +26 -0
- package/skills/ae-analysis/references/plan_save_items.md +27 -0
- package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
- package/skills/ae-analysis/references/project_access_detail_get.md +23 -0
- package/skills/ae-analysis/references/project_data_power_delete.md +26 -0
- package/skills/ae-analysis/references/project_data_power_get.md +24 -0
- package/skills/ae-analysis/references/project_data_power_list.md +23 -0
- package/skills/ae-analysis/references/project_data_power_upsert.md +24 -0
- package/skills/ae-analysis/references/project_entity_create.md +27 -0
- package/skills/ae-analysis/references/project_entity_delete.md +25 -0
- package/skills/ae-analysis/references/project_entity_event_list.md +24 -0
- package/skills/ae-analysis/references/project_entity_get.md +24 -0
- package/skills/ae-analysis/references/project_entity_list.md +28 -0
- package/skills/ae-analysis/references/project_entity_update.md +28 -0
- package/skills/ae-analysis/references/project_function_list.md +24 -0
- package/skills/ae-analysis/references/project_info_get.md +23 -0
- package/skills/ae-analysis/references/project_info_list.md +26 -0
- package/skills/ae-analysis/references/project_info_update.md +25 -0
- package/skills/ae-analysis/references/project_mark_time_create.md +27 -0
- package/skills/ae-analysis/references/project_mark_time_delete.md +25 -0
- package/skills/ae-analysis/references/project_mark_time_list.md +28 -0
- package/skills/ae-analysis/references/project_mark_time_update.md +28 -0
- package/skills/ae-analysis/references/project_member_add.md +25 -0
- package/skills/ae-analysis/references/project_member_batch_update.md +24 -0
- package/skills/ae-analysis/references/project_member_candidate_list.md +25 -0
- package/skills/ae-analysis/references/project_member_handover_export.md +27 -0
- package/skills/ae-analysis/references/project_member_handover_run.md +24 -0
- package/skills/ae-analysis/references/project_member_import.md +25 -0
- package/skills/ae-analysis/references/project_member_list.md +23 -0
- package/skills/ae-analysis/references/project_member_receiver_list.md +23 -0
- package/skills/ae-analysis/references/project_member_remove.md +26 -0
- package/skills/ae-analysis/references/project_member_update.md +25 -0
- package/skills/ae-analysis/references/project_owner_update.md +27 -0
- package/skills/ae-analysis/references/project_permission_binding_list.md +24 -0
- package/skills/ae-analysis/references/project_receive_status_update.md +25 -0
- package/skills/ae-analysis/references/project_role_delete.md +26 -0
- package/skills/ae-analysis/references/project_role_function_list.md +27 -0
- package/skills/ae-analysis/references/project_role_get.md +24 -0
- package/skills/ae-analysis/references/project_role_list.md +25 -0
- package/skills/ae-analysis/references/project_role_upsert.md +24 -0
- package/skills/ae-analysis/references/project_role_user_list.md +24 -0
- package/skills/ae-analysis/references/project_timezone_get.md +23 -0
- package/skills/ae-analysis/references/project_timezone_overview.md +23 -0
- package/skills/ae-analysis/references/project_timezone_update.md +25 -0
- package/skills/ae-analysis/references/project_user_id_items_update.md +24 -0
- package/skills/ae-analysis/references/property_list.md +21 -6
- package/skills/ae-analysis/references/public_link_create.md +1 -1
- package/skills/ae-analysis/references/query_create_result_cluster.md +15 -32
- package/skills/ae-analysis/references/report_create.md +1 -1
- package/skills/ae-analysis/references/report_data_export.md +5 -3
- package/skills/ae-analysis/references/report_data_run.md +13 -3
- package/skills/ae-analysis/references/report_get.md +2 -0
- package/skills/ae-analysis/references/report_update.md +1 -1
- package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
- package/skills/ae-analysis/references/user_cluster_create.md +5 -1
- package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
- package/skills/ae-analysis/references/user_cluster_get.md +4 -0
- package/skills/ae-analysis/references/user_cluster_refresh.md +4 -2
- package/skills/ae-analysis/references/user_cluster_update.md +5 -1
- package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
- package/skills/ae-analysis/references/user_tag_create.md +5 -1
- package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
- package/skills/ae-analysis/references/user_tag_get.md +4 -0
- package/skills/ae-analysis/references/user_tag_refresh.md +4 -2
- package/skills/ae-analysis/references/user_tag_update.md +5 -1
- package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
- package/skills/ae-analysis/references/virtual_event_create.md +22 -3
- package/skills/ae-analysis/references/virtual_property_create.md +23 -2
- package/skills/ae-analysis-global/SKILL.md +2 -0
- package/skills/ae-capability/SKILL.md +7 -5
- package/skills/ae-community/SKILL.md +72 -8
- package/skills/ae-community/references/community-chat-analysis.md +341 -0
- package/skills/ae-community/references/community-data-report.md +301 -0
- package/skills/ae-dataops/SKILL.md +2 -1
- package/skills/ae-engage/SKILL.md +204 -8
- package/skills/ae-engage/references/activity-activity-type.md +42 -0
- package/skills/ae-engage/references/activity-activity.md +70 -0
- package/skills/ae-engage/references/activity-approval.md +53 -0
- package/skills/ae-engage/references/activity-task.md +87 -0
- package/skills/ae-engage/references/activity-topic.md +98 -0
- package/skills/ae-engage/references/approval-approver-delete.md +26 -0
- package/skills/ae-engage/references/channel-test-send.md +37 -0
- package/skills/ae-engage/references/channel-touch-limits-batch-update.md +28 -0
- package/skills/ae-engage/references/channel-touch-limits-save.md +37 -0
- package/skills/ae-engage/references/channel-touch-limits-toggle.md +28 -0
- package/skills/ae-engage/references/channel-update-config.md +36 -0
- package/skills/ae-engage/references/client-param.md +58 -0
- package/skills/ae-engage/references/common-metric.md +75 -0
- package/skills/ae-engage/references/config-table.md +92 -0
- package/skills/ae-engage/references/engage-scene-config-item.md +69 -0
- package/skills/ae-engage/references/operation-log-query.md +1 -1
- package/skills/ae-engage/references/preset-event.md +42 -0
- package/skills/ae-engage/references/push-language.md +39 -0
- package/skills/ae-engage/references/scene-config-channel.md +58 -0
- package/skills/ae-engage/references/scene-config-group.md +62 -0
- package/skills/ae-engage/references/scene-config-item.md +68 -0
- package/skills/ae-engage/references/scene-config-metric.md +79 -0
- package/skills/ae-engage/references/scene-config-param.md +72 -0
- package/skills/ae-engage/references/scene-preset-metric.md +45 -0
- package/skills/ae-engage/references/scene-strategy.md +47 -0
- package/skills/ae-engage/references/scene-template.md +71 -0
- package/skills/ae-engage/references/{ops-delete.md → task-delete.md} +3 -3
- package/skills/ae-engage/references/whitelist.md +72 -0
- package/skills/ae-engage/references/workbench-workbench.md +48 -0
- package/skills/ae-generate-tracking-code/SKILL.md +4 -4
- package/skills/ae-generate-tracking-plan/SKILL.md +140 -16
- package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
- package/skills/ae-generate-tracking-plan/references/te-api.md +1 -1
- package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
- package/skills/ae-kb/SKILL.md +36 -9
- package/skills/ae-metadata/SKILL.md +3 -2
- package/skills/ae-metadata/references/metadata_event_get.md +4 -4
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
- package/skills/ae-metadata/references/metadata_property_get.md +4 -4
- package/skills/ae-team/SKILL.md +2 -1
- package/dist/chunk-NOO24N7W.js +0 -11
- package/dist/chunk-TNW2CI4W.js +0 -129
- package/dist/te-common-5NJLF3XG.js +0 -130
- package/dist/te-common-7VTJZPII.js +0 -130
- package/dist/te-community-PEZ2VEF7.js +0 -687
- package/dist/te-community-TSKJ652U.js +0 -687
- package/dist/te-engage-BUWVSSSK.js +0 -1912
- package/dist/te-engage-EPE3QKDE.js +0 -1912
- package/skills/ae-analysis/references/create_metric.md +0 -58
- package/skills/ae-analysis/references/create_virtual_event.md +0 -60
- package/skills/ae-analysis/references/create_virtual_property.md +0 -69
- package/skills/ae-analysis/references/delete_metric.md +0 -32
- package/skills/ae-analysis/references/drilldown_users_export.md +0 -17
- package/skills/ae-analysis/references/drilldown_users_run.md +0 -61
- package/skills/ae-analysis/references/get_metric.md +0 -38
- package/skills/ae-analysis/references/get_resource_url.md +0 -33
- package/skills/ae-analysis/references/list_events.md +0 -46
- package/skills/ae-analysis/references/list_metrics.md +0 -52
- package/skills/ae-analysis/references/list_properties.md +0 -47
- package/skills/ae-analysis/references/update_metric.md +0 -58
- package/dist/{chunk-HL2AJQ4Q.js → chunk-PTE56QPL.js} +3 -3
|
@@ -0,0 +1,3895 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createCapabilityCommand
|
|
3
|
+
} from "./chunk-ISY6HMHM.js";
|
|
4
|
+
import {
|
|
5
|
+
registerCapabilityGatewayRoute
|
|
6
|
+
} from "./chunk-PTE56QPL.js";
|
|
7
|
+
import "./chunk-HQ2A7ITL.js";
|
|
8
|
+
import {
|
|
9
|
+
printError
|
|
10
|
+
} from "./chunk-IMMGMU54.js";
|
|
11
|
+
import {
|
|
12
|
+
callMcpTool,
|
|
13
|
+
parseMcpResult,
|
|
14
|
+
registerMcpMappings,
|
|
15
|
+
resolveMcpUrl
|
|
16
|
+
} from "./chunk-3P3562ZX.js";
|
|
17
|
+
import "./chunk-LCXU3AAT.js";
|
|
18
|
+
import "./chunk-E7UXXHO3.js";
|
|
19
|
+
import "./chunk-IR4ZLVPW.js";
|
|
20
|
+
import "./chunk-V6FR6WTW.js";
|
|
21
|
+
import "./chunk-24BAVOX3.js";
|
|
22
|
+
import "./chunk-LYVNONC4.js";
|
|
23
|
+
|
|
24
|
+
// src/commands/te-engage/shared.ts
|
|
25
|
+
function createEngageCapabilityCommand(cliService, config) {
|
|
26
|
+
return createCapabilityCommand({
|
|
27
|
+
...config,
|
|
28
|
+
cliService,
|
|
29
|
+
gatewayDomain: "engage"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function createEngageFlowCapabilityCommand(config) {
|
|
33
|
+
return createEngageCapabilityCommand("engage-flow", config);
|
|
34
|
+
}
|
|
35
|
+
function createEngageTaskCapabilityCommand(config) {
|
|
36
|
+
return createEngageCapabilityCommand("engage-task", config);
|
|
37
|
+
}
|
|
38
|
+
function createEngageSettingCapabilityCommand(config) {
|
|
39
|
+
return createEngageCapabilityCommand("engage-setting", config);
|
|
40
|
+
}
|
|
41
|
+
function createEngageSceneCapabilityCommand(config) {
|
|
42
|
+
return createEngageCapabilityCommand("engage-scene", config);
|
|
43
|
+
}
|
|
44
|
+
function createEngageActivityCapabilityCommand(config) {
|
|
45
|
+
return createEngageCapabilityCommand("engage-activity", config);
|
|
46
|
+
}
|
|
47
|
+
function createEngageWorkbenchCapabilityCommand(config) {
|
|
48
|
+
return createEngageCapabilityCommand("engage-workbench", config);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/commands/te-engage/engage-flow/operation-log/query.ts
|
|
52
|
+
var operationLogQuery = createEngageFlowCapabilityCommand({
|
|
53
|
+
resource: "operation-log",
|
|
54
|
+
command: "query",
|
|
55
|
+
capabilityId: "engage-flow.operation-log.query",
|
|
56
|
+
description: "Query aggregated flow operation records and application logs for troubleshooting submission, approval, registration, execution, and distribution issues.",
|
|
57
|
+
flags: [
|
|
58
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
59
|
+
{ name: "flow-id", type: "string", required: true, desc: "Flow ID to inspect." }
|
|
60
|
+
],
|
|
61
|
+
risk: "read",
|
|
62
|
+
buildInput: (ctx) => ({ project_id: ctx.num("project-id"), flow_id: ctx.str("flow-id") })
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// src/commands/te-engage/engage-flow/version/list.ts
|
|
66
|
+
var versionList = createEngageFlowCapabilityCommand({
|
|
67
|
+
resource: "version",
|
|
68
|
+
command: "list",
|
|
69
|
+
capabilityId: "engage-flow.version.list",
|
|
70
|
+
description: "List current, historical, new, update, and test versions for a flow.",
|
|
71
|
+
flags: [
|
|
72
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
73
|
+
{ name: "flow-id", type: "string", required: true, desc: "Flow ID whose versions should be listed." }
|
|
74
|
+
],
|
|
75
|
+
risk: "read",
|
|
76
|
+
buildInput: (ctx) => ({ project_id: ctx.num("project-id"), flow_id: ctx.str("flow-id") })
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// src/commands/te-engage/engage-flow/index.ts
|
|
80
|
+
var commands = [
|
|
81
|
+
operationLogQuery,
|
|
82
|
+
// testRun, // temporarily disabled: ae-cli engage-flow test run
|
|
83
|
+
versionList
|
|
84
|
+
];
|
|
85
|
+
var engage_flow_default = commands;
|
|
86
|
+
|
|
87
|
+
// src/commands/te-engage/engage-setting/channel-touch-limits/list.ts
|
|
88
|
+
var channelTouchLimitsList = createEngageSettingCapabilityCommand({
|
|
89
|
+
resource: "channel-touch-limits",
|
|
90
|
+
command: "list",
|
|
91
|
+
capabilityId: "engage-setting.channel-touch-limits.list",
|
|
92
|
+
description: "List all channel touch-limit (fatigue-control) rules for a project, with each rule's enable state, definition, and bound channels.",
|
|
93
|
+
flags: [
|
|
94
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" }
|
|
95
|
+
],
|
|
96
|
+
risk: "read",
|
|
97
|
+
buildInput: (ctx) => ({
|
|
98
|
+
project_id: ctx.num("project-id")
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// src/commands/te-engage/engage-setting/channel-touch-limits/batch-update.ts
|
|
103
|
+
var channelTouchLimitsBatchUpdate = createEngageSettingCapabilityCommand({
|
|
104
|
+
resource: "channel-touch-limits",
|
|
105
|
+
command: "batch-update",
|
|
106
|
+
capabilityId: "engage-setting.channel-touch-limits.batch-update",
|
|
107
|
+
description: "Batch update channel touch-limit rules, setting each rule's enable flag and replacing its rule definition.",
|
|
108
|
+
flags: [
|
|
109
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
110
|
+
{
|
|
111
|
+
name: "items",
|
|
112
|
+
type: "json",
|
|
113
|
+
required: true,
|
|
114
|
+
desc: `JSON array of rule updates, e.g. '[{"rule_id":"r1","enable":true,"rule_def":"[]"}]'.`
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
risk: "write",
|
|
118
|
+
buildInput: (ctx) => ({
|
|
119
|
+
project_id: ctx.num("project-id"),
|
|
120
|
+
items: ctx.json("items")
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// src/commands/te-engage/engage-setting/channel-touch-limits/toggle.ts
|
|
125
|
+
var channelTouchLimitsToggle = createEngageSettingCapabilityCommand({
|
|
126
|
+
resource: "channel-touch-limits",
|
|
127
|
+
command: "toggle",
|
|
128
|
+
capabilityId: "engage-setting.channel-touch-limits.toggle",
|
|
129
|
+
description: "Enable or disable a single channel touch-limit rule by its rule_id.",
|
|
130
|
+
flags: [
|
|
131
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
132
|
+
{ name: "rule-id", type: "string", required: true, desc: "Touch-limit rule ID to enable/disable." },
|
|
133
|
+
{ name: "enable", type: "boolean", required: true, desc: "Whether the touch-limit rule is enabled." }
|
|
134
|
+
],
|
|
135
|
+
risk: "write",
|
|
136
|
+
buildInput: (ctx) => ({
|
|
137
|
+
project_id: ctx.num("project-id"),
|
|
138
|
+
rule_id: ctx.str("rule-id"),
|
|
139
|
+
enable: ctx.bool("enable")
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// src/commands/te-engage/engage-setting/channel-touch-limits/save.ts
|
|
144
|
+
var channelTouchLimitsSave = createEngageSettingCapabilityCommand({
|
|
145
|
+
resource: "channel-touch-limits",
|
|
146
|
+
command: "save",
|
|
147
|
+
capabilityId: "engage-setting.channel-touch-limits.save",
|
|
148
|
+
description: "Create a new channel touch-limit rule for a channel business type, or update an existing rule when rule_id is provided.",
|
|
149
|
+
flags: [
|
|
150
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
151
|
+
{ name: "channel-biz-type", type: "string", required: true, desc: "Channel business type the rule belongs to." },
|
|
152
|
+
{
|
|
153
|
+
name: "rule-def",
|
|
154
|
+
type: "string",
|
|
155
|
+
required: true,
|
|
156
|
+
desc: "Touch-limit rule definition (JSON string, see ChannelTouchLimitRuleDTO)."
|
|
157
|
+
},
|
|
158
|
+
{ name: "enable", type: "boolean", required: true, desc: "Whether the touch-limit rule is enabled." },
|
|
159
|
+
{ name: "rule-id", type: "string", required: false, desc: "Existing rule ID. When omitted a new rule is created." }
|
|
160
|
+
],
|
|
161
|
+
risk: "write",
|
|
162
|
+
buildInput: (ctx) => ({
|
|
163
|
+
project_id: ctx.num("project-id"),
|
|
164
|
+
channel_biz_type: ctx.str("channel-biz-type"),
|
|
165
|
+
rule_def: ctx.str("rule-def"),
|
|
166
|
+
enable: ctx.bool("enable"),
|
|
167
|
+
rule_id: ctx.str("rule-id") || void 0
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
// src/commands/te-engage/engage-setting/channel/update-config.ts
|
|
172
|
+
var channelUpdateConfig = createEngageSettingCapabilityCommand({
|
|
173
|
+
resource: "channel",
|
|
174
|
+
command: "update-config",
|
|
175
|
+
capabilityId: "engage-setting.channel.update-config",
|
|
176
|
+
description: "Update an existing channel's name, push-id field, channel-specific config, and reach-funnel (touch-event) settings.",
|
|
177
|
+
flags: [
|
|
178
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
179
|
+
{ name: "channel-id", type: "string", required: true, desc: "Channel ID to update." },
|
|
180
|
+
{ name: "channel-name", type: "string", required: false, desc: "New channel name." },
|
|
181
|
+
{ name: "push-id-type", type: "string", required: false, desc: "User property used as the push ID." },
|
|
182
|
+
{ name: "config", type: "string", required: false, desc: "Channel-specific JSON config string (see ChannelConfigDTO)." },
|
|
183
|
+
{ name: "enable-touch-event", type: "number", required: true, desc: "Reach funnel toggle: 1 enabled, 0 disabled." },
|
|
184
|
+
{ name: "touch-event-source", type: "string", required: false, desc: "Reach event source." },
|
|
185
|
+
{ name: "event-delivery-name", type: "string", required: false, desc: "Actual delivery event name." },
|
|
186
|
+
{ name: "event-click-name", type: "string", required: false, desc: "Click event name." }
|
|
187
|
+
],
|
|
188
|
+
risk: "write",
|
|
189
|
+
buildInput: (ctx) => ({
|
|
190
|
+
project_id: ctx.num("project-id"),
|
|
191
|
+
channel_id: ctx.str("channel-id"),
|
|
192
|
+
channel_name: ctx.str("channel-name") || void 0,
|
|
193
|
+
push_id_type: ctx.str("push-id-type") || void 0,
|
|
194
|
+
config: ctx.str("config") || void 0,
|
|
195
|
+
enable_touch_event: ctx.num("enable-touch-event"),
|
|
196
|
+
touch_event_source: ctx.str("touch-event-source") || void 0,
|
|
197
|
+
event_delivery_name: ctx.str("event-delivery-name") || void 0,
|
|
198
|
+
event_click_name: ctx.str("event-click-name") || void 0
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// src/commands/te-engage/engage-setting/channel/test-send.ts
|
|
203
|
+
function validateContentListShape(contentList) {
|
|
204
|
+
if (!Array.isArray(contentList)) {
|
|
205
|
+
printError(
|
|
206
|
+
"validation",
|
|
207
|
+
"--content-list must be a JSON array of channel template key/value entries.",
|
|
208
|
+
`Example: --content-list '[{"key":"title","value":"hello"}]'. For OBJ_ARRAY params, value must be a JSON-array string, e.g. '[{"key":"obj","value":"[]"}]'.`
|
|
209
|
+
);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
212
|
+
for (const [index, item] of contentList.entries()) {
|
|
213
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
214
|
+
printError(
|
|
215
|
+
"validation",
|
|
216
|
+
`--content-list[${index}] must be an object with key and value.`,
|
|
217
|
+
`Example: --content-list '[{"key":"title","value":"hello"}]'.`
|
|
218
|
+
);
|
|
219
|
+
process.exit(1);
|
|
220
|
+
}
|
|
221
|
+
const record = item;
|
|
222
|
+
if ("pushLanguageCode" in record || "content" in record) {
|
|
223
|
+
printError(
|
|
224
|
+
"validation",
|
|
225
|
+
"--content-list for channel test-send expects direct key/value entries, not the task/flow language wrapper.",
|
|
226
|
+
'Use [{"key":"<channel_param_key>","value":"<value>"}]. For this OBJ_ARRAY-style channel, use [{"key":"obj","value":"[]"}] instead of [{"pushLanguageCode":"default","content":"[]"}].'
|
|
227
|
+
);
|
|
228
|
+
process.exit(1);
|
|
229
|
+
}
|
|
230
|
+
if (typeof record.key !== "string" || record.key.length === 0 || !("value" in record)) {
|
|
231
|
+
printError(
|
|
232
|
+
"validation",
|
|
233
|
+
`--content-list[${index}] must include a non-empty string key and a value field.`,
|
|
234
|
+
"The key must match a channel template param from engage +channel_detail data.config.paramsList[].key."
|
|
235
|
+
);
|
|
236
|
+
process.exit(1);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
var channelTestSend = createEngageSettingCapabilityCommand({
|
|
241
|
+
resource: "channel",
|
|
242
|
+
command: "test-send",
|
|
243
|
+
capabilityId: "engage-setting.channel.test-send",
|
|
244
|
+
description: "Send a test push message to a channel for a specific recipient (push_id), with content and optional user params.",
|
|
245
|
+
flags: [
|
|
246
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
247
|
+
{ name: "channel-id", type: "string", required: true, desc: "Channel ID to test." },
|
|
248
|
+
{ name: "push-id", type: "string", required: true, desc: "Recipient send ID (e.g. a test device id)." },
|
|
249
|
+
{
|
|
250
|
+
name: "content-list",
|
|
251
|
+
type: "json",
|
|
252
|
+
required: true,
|
|
253
|
+
desc: `JSON array of direct channel template key/value entries, e.g. '[{"key":"title","value":"hello"}]'. Do not pass the task/flow pushLanguageCode/content wrapper.`
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: "user-params-list",
|
|
257
|
+
type: "json",
|
|
258
|
+
required: false,
|
|
259
|
+
desc: "Optional JSON array of custom user params for the test push."
|
|
260
|
+
},
|
|
261
|
+
{ name: "push-environment", type: "string", required: false, desc: "Push environment: dev or pro." },
|
|
262
|
+
{ name: "mock-push", type: "boolean", required: false, desc: "Mock the push (build request only, do not send)." },
|
|
263
|
+
{ name: "channel-template-id", type: "string", required: false, desc: "WeChat channel template ID." }
|
|
264
|
+
],
|
|
265
|
+
risk: "write",
|
|
266
|
+
validate: (ctx) => {
|
|
267
|
+
validateContentListShape(ctx.json("content-list"));
|
|
268
|
+
},
|
|
269
|
+
buildInput: (ctx) => ({
|
|
270
|
+
project_id: ctx.num("project-id"),
|
|
271
|
+
channel_id: ctx.str("channel-id"),
|
|
272
|
+
push_id: ctx.str("push-id"),
|
|
273
|
+
content_list: ctx.json("content-list"),
|
|
274
|
+
user_params_list: ctx.json("user-params-list") || void 0,
|
|
275
|
+
push_environment: ctx.str("push-environment") || void 0,
|
|
276
|
+
mock_push: ctx.bool("mock-push"),
|
|
277
|
+
channel_template_id: ctx.str("channel-template-id") || void 0
|
|
278
|
+
})
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
// src/commands/te-engage/engage-setting/approval-approver/delete.ts
|
|
282
|
+
var approvalApproverDelete = createEngageSettingCapabilityCommand({
|
|
283
|
+
resource: "approval-approver",
|
|
284
|
+
command: "delete",
|
|
285
|
+
capabilityId: "engage-setting.approval-approver.delete",
|
|
286
|
+
description: "Remove an approver (by open_id) from a project's operation-approval approver list.",
|
|
287
|
+
flags: [
|
|
288
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
289
|
+
{ name: "approver", type: "string", required: true, desc: "OpenID of the approver to remove." }
|
|
290
|
+
],
|
|
291
|
+
risk: "high-risk-write",
|
|
292
|
+
buildInput: (ctx) => ({
|
|
293
|
+
project_id: ctx.num("project-id"),
|
|
294
|
+
approver: ctx.str("approver")
|
|
295
|
+
})
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// src/commands/te-engage/engage-setting/whitelist/add.ts
|
|
299
|
+
var whitelistAdd = createEngageSettingCapabilityCommand({
|
|
300
|
+
resource: "whitelist",
|
|
301
|
+
command: "add",
|
|
302
|
+
capabilityId: "engage-setting.whitelist.add",
|
|
303
|
+
description: "Batch add whitelist entries (entity_id + source_value) for a project user property used for test/gray sending.",
|
|
304
|
+
flags: [
|
|
305
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
306
|
+
{ name: "prop-code", type: "string", required: true, desc: "Associated user property code." },
|
|
307
|
+
{ name: "column-name", type: "string", required: true, desc: "Associated user property field name." },
|
|
308
|
+
{ name: "column-type", type: "string", required: true, desc: "Associated user property field type." },
|
|
309
|
+
{
|
|
310
|
+
name: "whitelist-list",
|
|
311
|
+
type: "json",
|
|
312
|
+
required: true,
|
|
313
|
+
desc: `JSON array of entries, e.g. '[{"entity_id":"u1","source_value":"v1","note_name":"n"}]'.`
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
risk: "write",
|
|
317
|
+
buildInput: (ctx) => ({
|
|
318
|
+
project_id: ctx.num("project-id"),
|
|
319
|
+
prop_code: ctx.str("prop-code"),
|
|
320
|
+
column_name: ctx.str("column-name"),
|
|
321
|
+
column_type: ctx.str("column-type"),
|
|
322
|
+
whitelist_list: ctx.json("whitelist-list")
|
|
323
|
+
})
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// src/commands/te-engage/engage-setting/whitelist/update.ts
|
|
327
|
+
var whitelistUpdate = createEngageSettingCapabilityCommand({
|
|
328
|
+
resource: "whitelist",
|
|
329
|
+
command: "update",
|
|
330
|
+
capabilityId: "engage-setting.whitelist.update",
|
|
331
|
+
description: "Update the note name of an existing whitelist entry by its whitelist_id.",
|
|
332
|
+
flags: [
|
|
333
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
334
|
+
{ name: "whitelist-id", type: "string", required: true, desc: "Whitelist entry ID to modify." },
|
|
335
|
+
{ name: "note-name", type: "string", required: false, desc: "New note name for the whitelist entry." }
|
|
336
|
+
],
|
|
337
|
+
risk: "write",
|
|
338
|
+
buildInput: (ctx) => ({
|
|
339
|
+
project_id: ctx.num("project-id"),
|
|
340
|
+
whitelist_id: ctx.str("whitelist-id"),
|
|
341
|
+
note_name: ctx.str("note-name") || void 0
|
|
342
|
+
})
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// src/commands/te-engage/engage-setting/whitelist/delete.ts
|
|
346
|
+
var whitelistDelete = createEngageSettingCapabilityCommand({
|
|
347
|
+
resource: "whitelist",
|
|
348
|
+
command: "delete",
|
|
349
|
+
capabilityId: "engage-setting.whitelist.delete",
|
|
350
|
+
description: "Batch delete whitelist entries from a project by their whitelist IDs.",
|
|
351
|
+
flags: [
|
|
352
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
353
|
+
{
|
|
354
|
+
name: "whitelist-ids",
|
|
355
|
+
type: "json",
|
|
356
|
+
required: true,
|
|
357
|
+
desc: `JSON array of whitelist entry IDs to delete, e.g. '["wl-1","wl-2"]'.`
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
risk: "high-risk-write",
|
|
361
|
+
buildInput: (ctx) => ({
|
|
362
|
+
project_id: ctx.num("project-id"),
|
|
363
|
+
whitelist_ids: ctx.json("whitelist-ids")
|
|
364
|
+
})
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
// src/commands/te-engage/engage-setting/whitelist/verify.ts
|
|
368
|
+
var whitelistVerify = createEngageSettingCapabilityCommand({
|
|
369
|
+
resource: "whitelist",
|
|
370
|
+
command: "verify",
|
|
371
|
+
capabilityId: "engage-setting.whitelist.verify",
|
|
372
|
+
description: "Check whether given property values exist in the project whitelist, returning the matching entries.",
|
|
373
|
+
flags: [
|
|
374
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
375
|
+
{ name: "prop-code", type: "string", required: true, desc: "Associated user property code." },
|
|
376
|
+
{ name: "column-type", type: "string", required: true, desc: "Associated user property field type." },
|
|
377
|
+
{
|
|
378
|
+
name: "whitelist-prop-list",
|
|
379
|
+
type: "json",
|
|
380
|
+
required: true,
|
|
381
|
+
desc: `JSON array of whitelist property values to verify, e.g. '["v1","v2"]'.`
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
risk: "write",
|
|
385
|
+
buildInput: (ctx) => ({
|
|
386
|
+
project_id: ctx.num("project-id"),
|
|
387
|
+
prop_code: ctx.str("prop-code"),
|
|
388
|
+
column_type: ctx.str("column-type"),
|
|
389
|
+
whitelist_prop_list: ctx.json("whitelist-prop-list")
|
|
390
|
+
})
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// src/commands/te-engage/engage-setting/push-language/get.ts
|
|
394
|
+
var pushLanguageGet = createEngageSettingCapabilityCommand({
|
|
395
|
+
resource: "push-language",
|
|
396
|
+
command: "get",
|
|
397
|
+
capabilityId: "engage-setting.push-language.get",
|
|
398
|
+
description: "Query the project's push-language property field (pushLanguageColumn) used to identify each user's language.",
|
|
399
|
+
flags: [
|
|
400
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
401
|
+
],
|
|
402
|
+
risk: "read",
|
|
403
|
+
buildInput: (ctx) => ({
|
|
404
|
+
project_id: ctx.num("project-id")
|
|
405
|
+
})
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
// src/commands/te-engage/engage-setting/push-language/set.ts
|
|
409
|
+
var pushLanguageSet = createEngageSettingCapabilityCommand({
|
|
410
|
+
resource: "push-language",
|
|
411
|
+
command: "set",
|
|
412
|
+
capabilityId: "engage-setting.push-language.set",
|
|
413
|
+
description: "Set or update the project's push-language property field (pushLanguageColumn).",
|
|
414
|
+
flags: [
|
|
415
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
416
|
+
{
|
|
417
|
+
name: "push-language-column",
|
|
418
|
+
type: "string",
|
|
419
|
+
required: true,
|
|
420
|
+
desc: "User property code used as the push language field."
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
risk: "write",
|
|
424
|
+
buildInput: (ctx) => ({
|
|
425
|
+
project_id: ctx.num("project-id"),
|
|
426
|
+
push_language_column: ctx.str("push-language-column")
|
|
427
|
+
})
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
// src/commands/te-engage/engage-setting/client-param/update.ts
|
|
431
|
+
var clientParamUpdate = createEngageSettingCapabilityCommand({
|
|
432
|
+
resource: "client-param",
|
|
433
|
+
command: "update",
|
|
434
|
+
capabilityId: "engage-setting.client-param.update",
|
|
435
|
+
description: "Update an existing custom client parameter's type, select mode, and display metadata.",
|
|
436
|
+
flags: [
|
|
437
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
438
|
+
{ name: "column-name", type: "string", required: true, desc: "Client param column name." },
|
|
439
|
+
{ name: "column-type", type: "string", required: true, desc: "Column type (see ColumnTypeEnum)." },
|
|
440
|
+
{ name: "select-type", type: "string", required: true, desc: "Select type (see SelectTypeEnum)." },
|
|
441
|
+
{ name: "column-source", type: "string", required: false, desc: "Param source: preset or custom." },
|
|
442
|
+
{ name: "column-desc", type: "string", required: false, desc: "Display name of the param. Defaults to an empty string." },
|
|
443
|
+
{ name: "column-remark", type: "string", required: false, desc: "Description/remark for the param." },
|
|
444
|
+
{ name: "alternative-val", type: "json", required: false, desc: "Optional JSON array of alternative values." },
|
|
445
|
+
{ name: "system-id-param", type: "boolean", required: false, desc: "Whether this is a system identifier param." }
|
|
446
|
+
],
|
|
447
|
+
risk: "write",
|
|
448
|
+
buildInput: (ctx) => ({
|
|
449
|
+
project_id: ctx.num("project-id"),
|
|
450
|
+
column_name: ctx.str("column-name"),
|
|
451
|
+
column_type: ctx.str("column-type"),
|
|
452
|
+
select_type: ctx.str("select-type"),
|
|
453
|
+
column_source: ctx.str("column-source") || void 0,
|
|
454
|
+
column_desc: ctx.str("column-desc") || "",
|
|
455
|
+
column_remark: ctx.str("column-remark") || void 0,
|
|
456
|
+
alternative_val: ctx.json("alternative-val") || void 0,
|
|
457
|
+
system_id_param: ctx.bool("system-id-param")
|
|
458
|
+
})
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
// src/commands/te-engage/engage-setting/client-param/delete.ts
|
|
462
|
+
var clientParamDelete = createEngageSettingCapabilityCommand({
|
|
463
|
+
resource: "client-param",
|
|
464
|
+
command: "delete",
|
|
465
|
+
capabilityId: "engage-setting.client-param.delete",
|
|
466
|
+
description: "Delete a custom client parameter by column_name; returns the list of tasks still referencing it.",
|
|
467
|
+
flags: [
|
|
468
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
469
|
+
{ name: "column-name", type: "string", required: true, desc: "Client param column name to delete." }
|
|
470
|
+
],
|
|
471
|
+
risk: "high-risk-write",
|
|
472
|
+
buildInput: (ctx) => ({
|
|
473
|
+
project_id: ctx.num("project-id"),
|
|
474
|
+
column_name: ctx.str("column-name")
|
|
475
|
+
})
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
// src/commands/te-engage/engage-setting/client-param/list.ts
|
|
479
|
+
var clientParamList = createEngageSettingCapabilityCommand({
|
|
480
|
+
resource: "client-param",
|
|
481
|
+
command: "list",
|
|
482
|
+
capabilityId: "engage-setting.client-param.list",
|
|
483
|
+
description: "List all custom client parameters defined for a project.",
|
|
484
|
+
flags: [
|
|
485
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
486
|
+
],
|
|
487
|
+
risk: "read",
|
|
488
|
+
buildInput: (ctx) => ({
|
|
489
|
+
project_id: ctx.num("project-id")
|
|
490
|
+
})
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
// src/commands/te-engage/engage-setting/config-table/upload.ts
|
|
494
|
+
var configTableUpload = createEngageSettingCapabilityCommand({
|
|
495
|
+
resource: "config-table",
|
|
496
|
+
command: "upload",
|
|
497
|
+
capabilityId: "engage-setting.config-table.upload",
|
|
498
|
+
description: "Upload and parse a config-table file (base64-encoded content) for a project; returns the parsed data preview keyed by request_id.",
|
|
499
|
+
flags: [
|
|
500
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
501
|
+
{
|
|
502
|
+
name: "request-id",
|
|
503
|
+
type: "string",
|
|
504
|
+
required: true,
|
|
505
|
+
desc: "Client-supplied request id used to cache parsed rows for the subsequent save/update-data."
|
|
506
|
+
},
|
|
507
|
+
{ name: "file-name", type: "string", required: true, desc: "Original file name including extension (.csv/.xlsx)." },
|
|
508
|
+
{
|
|
509
|
+
name: "file-content",
|
|
510
|
+
type: "string",
|
|
511
|
+
required: true,
|
|
512
|
+
desc: "Base64-encoded file content. Tip: base64 < file.csv | pbcopy on macOS."
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
risk: "write",
|
|
516
|
+
buildInput: (ctx) => ({
|
|
517
|
+
project_id: ctx.num("project-id"),
|
|
518
|
+
request_id: ctx.str("request-id"),
|
|
519
|
+
file_name: ctx.str("file-name"),
|
|
520
|
+
file_content: ctx.str("file-content")
|
|
521
|
+
})
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
// src/commands/te-engage/engage-setting/config-table/save.ts
|
|
525
|
+
var configTableSave = createEngageSettingCapabilityCommand({
|
|
526
|
+
resource: "config-table",
|
|
527
|
+
command: "save",
|
|
528
|
+
capabilityId: "engage-setting.config-table.save",
|
|
529
|
+
description: "Save a previously uploaded and parsed config table (by request_id) as a named config table; returns its info_id.",
|
|
530
|
+
flags: [
|
|
531
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
532
|
+
{ name: "request-id", type: "string", required: true, desc: "Request id returned by a prior upload." },
|
|
533
|
+
{ name: "info-name", type: "string", required: true, desc: "Config table name." }
|
|
534
|
+
],
|
|
535
|
+
risk: "write",
|
|
536
|
+
buildInput: (ctx) => ({
|
|
537
|
+
project_id: ctx.num("project-id"),
|
|
538
|
+
request_id: ctx.str("request-id"),
|
|
539
|
+
info_name: ctx.str("info-name")
|
|
540
|
+
})
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
// src/commands/te-engage/engage-setting/config-table/list.ts
|
|
544
|
+
var configTableList = createEngageSettingCapabilityCommand({
|
|
545
|
+
resource: "config-table",
|
|
546
|
+
command: "list",
|
|
547
|
+
capabilityId: "engage-setting.config-table.list",
|
|
548
|
+
description: "List all config tables (custom info) defined for a project.",
|
|
549
|
+
flags: [
|
|
550
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
551
|
+
],
|
|
552
|
+
risk: "read",
|
|
553
|
+
buildInput: (ctx) => ({
|
|
554
|
+
project_id: ctx.num("project-id")
|
|
555
|
+
})
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
// src/commands/te-engage/engage-setting/config-table/query-data.ts
|
|
559
|
+
var configTableQueryData = createEngageSettingCapabilityCommand({
|
|
560
|
+
resource: "config-table",
|
|
561
|
+
command: "query-data",
|
|
562
|
+
capabilityId: "engage-setting.config-table.query-data",
|
|
563
|
+
description: "Query all data rows of a config table by its info_id.",
|
|
564
|
+
flags: [
|
|
565
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
566
|
+
{ name: "info-id", type: "number", required: true, desc: "Config table ID." }
|
|
567
|
+
],
|
|
568
|
+
risk: "read",
|
|
569
|
+
buildInput: (ctx) => ({
|
|
570
|
+
project_id: ctx.num("project-id"),
|
|
571
|
+
info_id: ctx.num("info-id")
|
|
572
|
+
})
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// src/commands/te-engage/engage-setting/config-table/update-data.ts
|
|
576
|
+
var configTableUpdateData = createEngageSettingCapabilityCommand({
|
|
577
|
+
resource: "config-table",
|
|
578
|
+
command: "update-data",
|
|
579
|
+
capabilityId: "engage-setting.config-table.update-data",
|
|
580
|
+
description: "Replace an existing config table's data with a freshly uploaded file (by request_id) for the given info_id.",
|
|
581
|
+
flags: [
|
|
582
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
583
|
+
{ name: "request-id", type: "string", required: true, desc: "Request id returned by a prior upload." },
|
|
584
|
+
{ name: "info-name", type: "string", required: true, desc: "Config table name." },
|
|
585
|
+
{ name: "info-id", type: "number", required: true, desc: "Config table ID to update." }
|
|
586
|
+
],
|
|
587
|
+
risk: "write",
|
|
588
|
+
buildInput: (ctx) => ({
|
|
589
|
+
project_id: ctx.num("project-id"),
|
|
590
|
+
request_id: ctx.str("request-id"),
|
|
591
|
+
info_name: ctx.str("info-name"),
|
|
592
|
+
info_id: ctx.num("info-id")
|
|
593
|
+
})
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
// src/commands/te-engage/engage-setting/config-table/delete.ts
|
|
597
|
+
var configTableDelete = createEngageSettingCapabilityCommand({
|
|
598
|
+
resource: "config-table",
|
|
599
|
+
command: "delete",
|
|
600
|
+
capabilityId: "engage-setting.config-table.delete",
|
|
601
|
+
description: "Delete a config table and all its data by its info_id.",
|
|
602
|
+
flags: [
|
|
603
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
604
|
+
{ name: "info-id", type: "number", required: true, desc: "Config table ID to delete." }
|
|
605
|
+
],
|
|
606
|
+
risk: "high-risk-write",
|
|
607
|
+
buildInput: (ctx) => ({
|
|
608
|
+
project_id: ctx.num("project-id"),
|
|
609
|
+
info_id: ctx.num("info-id")
|
|
610
|
+
})
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
// src/commands/te-engage/engage-setting/preset-event/list.ts
|
|
614
|
+
var presetEventList = createEngageSettingCapabilityCommand({
|
|
615
|
+
resource: "preset-event",
|
|
616
|
+
command: "list",
|
|
617
|
+
capabilityId: "engage-setting.preset-event.list",
|
|
618
|
+
description: "Query the project's preset metric event config (add/active/recharge event definitions).",
|
|
619
|
+
flags: [
|
|
620
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
621
|
+
],
|
|
622
|
+
risk: "read",
|
|
623
|
+
buildInput: (ctx) => ({
|
|
624
|
+
project_id: ctx.num("project-id")
|
|
625
|
+
})
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
// src/commands/te-engage/engage-setting/preset-event/update.ts
|
|
629
|
+
var presetEventUpdate = createEngageSettingCapabilityCommand({
|
|
630
|
+
resource: "preset-event",
|
|
631
|
+
command: "update",
|
|
632
|
+
capabilityId: "engage-setting.preset-event.update",
|
|
633
|
+
description: "Update the project's preset metric event config (add/active/recharge event definitions).",
|
|
634
|
+
flags: [
|
|
635
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
636
|
+
{ name: "add-event-desc", type: "string", required: false, desc: "Add-event qp definition." },
|
|
637
|
+
{ name: "active-event-desc", type: "string", required: false, desc: "Active-event qp definition." },
|
|
638
|
+
{ name: "recharge-event-desc", type: "string", required: false, desc: "Recharge-success-event qp definition." }
|
|
639
|
+
],
|
|
640
|
+
risk: "write",
|
|
641
|
+
buildInput: (ctx) => ({
|
|
642
|
+
project_id: ctx.num("project-id"),
|
|
643
|
+
add_event_desc: ctx.str("add-event-desc") || void 0,
|
|
644
|
+
active_event_desc: ctx.str("active-event-desc") || void 0,
|
|
645
|
+
recharge_event_desc: ctx.str("recharge-event-desc") || void 0
|
|
646
|
+
})
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
// src/commands/te-engage/engage-setting/common-metric/list.ts
|
|
650
|
+
var commonMetricList = createEngageSettingCapabilityCommand({
|
|
651
|
+
resource: "common-metric",
|
|
652
|
+
command: "list",
|
|
653
|
+
capabilityId: "engage-setting.common-metric.list",
|
|
654
|
+
description: "List all common (preset) metrics defined for a project.",
|
|
655
|
+
flags: [
|
|
656
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
657
|
+
],
|
|
658
|
+
risk: "read",
|
|
659
|
+
buildInput: (ctx) => ({
|
|
660
|
+
project_id: ctx.num("project-id")
|
|
661
|
+
})
|
|
662
|
+
});
|
|
663
|
+
|
|
664
|
+
// src/commands/te-engage/engage-setting/common-metric/get.ts
|
|
665
|
+
var commonMetricGet = createEngageSettingCapabilityCommand({
|
|
666
|
+
resource: "common-metric",
|
|
667
|
+
command: "get",
|
|
668
|
+
capabilityId: "engage-setting.common-metric.get",
|
|
669
|
+
description: "Get the full definition of a common metric by its metric_name.",
|
|
670
|
+
flags: [
|
|
671
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
672
|
+
{ name: "metric-name", type: "string", required: true, desc: "Metric name to query." }
|
|
673
|
+
],
|
|
674
|
+
risk: "read",
|
|
675
|
+
buildInput: (ctx) => ({
|
|
676
|
+
project_id: ctx.num("project-id"),
|
|
677
|
+
metric_name: ctx.str("metric-name")
|
|
678
|
+
})
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
// src/commands/te-engage/engage-setting/common-metric/metric-qp-validation.ts
|
|
682
|
+
function validateMetricQpFlag(metricQp) {
|
|
683
|
+
if (metricQp.trim() !== "{}") {
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
printError(
|
|
687
|
+
"validation",
|
|
688
|
+
"--metric-qp cannot be an empty JSON object.",
|
|
689
|
+
"Pass a complete metric QP expression instead of {}."
|
|
690
|
+
);
|
|
691
|
+
process.exit(1);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
// src/commands/te-engage/engage-setting/common-metric/update.ts
|
|
695
|
+
var writeFlags = [
|
|
696
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
697
|
+
{ name: "metric-type", type: "number", required: true, desc: "Metric type (see MetricTypeEunm)." },
|
|
698
|
+
{ name: "metric-name", type: "string", required: true, desc: "Metric name." },
|
|
699
|
+
{ name: "metric-qp", type: "string", required: true, desc: "Metric qp (event/property expression)." },
|
|
700
|
+
{ name: "metric-window-num", type: "number", required: true, desc: "Metric window number." },
|
|
701
|
+
{ name: "metric-window-time-unit", type: "string", required: true, desc: "Metric window time unit (MINUTE/HOUR/DAY)." },
|
|
702
|
+
{ name: "display-name", type: "string", required: true, desc: "Display name of the metric." },
|
|
703
|
+
{ name: "note", type: "string", required: false, desc: "Metric note/remark." },
|
|
704
|
+
{ name: "order-id", type: "number", required: false, desc: "Sort order id." },
|
|
705
|
+
{ name: "metric-setting-id", type: "string", required: false, desc: "Metric setting id (when binding to a setting)." },
|
|
706
|
+
{ name: "metric-params", type: "string", required: false, desc: "Metric params JSON string." }
|
|
707
|
+
];
|
|
708
|
+
var buildWriteInput = (ctx) => ({
|
|
709
|
+
project_id: ctx.num("project-id"),
|
|
710
|
+
metric_type: ctx.num("metric-type"),
|
|
711
|
+
metric_name: ctx.str("metric-name"),
|
|
712
|
+
metric_qp: ctx.str("metric-qp"),
|
|
713
|
+
metric_window_num: ctx.num("metric-window-num"),
|
|
714
|
+
metric_window_time_unit: ctx.str("metric-window-time-unit"),
|
|
715
|
+
display_name: ctx.str("display-name"),
|
|
716
|
+
note: ctx.str("note") || void 0,
|
|
717
|
+
order_id: ctx.optionalNum("order-id"),
|
|
718
|
+
metric_setting_id: ctx.str("metric-setting-id") || void 0,
|
|
719
|
+
metric_params: ctx.str("metric-params") || void 0
|
|
720
|
+
});
|
|
721
|
+
var commonMetricUpdate = createEngageSettingCapabilityCommand({
|
|
722
|
+
resource: "common-metric",
|
|
723
|
+
command: "update",
|
|
724
|
+
capabilityId: "engage-setting.common-metric.update",
|
|
725
|
+
description: "Update an existing common metric's type, expression, time window, and display metadata.",
|
|
726
|
+
flags: writeFlags,
|
|
727
|
+
risk: "write",
|
|
728
|
+
validate: (ctx) => {
|
|
729
|
+
validateMetricQpFlag(ctx.str("metric-qp"));
|
|
730
|
+
},
|
|
731
|
+
buildInput: buildWriteInput
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
// src/commands/te-engage/engage-setting/common-metric/delete.ts
|
|
735
|
+
var commonMetricDelete = createEngageSettingCapabilityCommand({
|
|
736
|
+
resource: "common-metric",
|
|
737
|
+
command: "delete",
|
|
738
|
+
capabilityId: "engage-setting.common-metric.delete",
|
|
739
|
+
description: "Delete a common metric by its metric_name.",
|
|
740
|
+
flags: [
|
|
741
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
742
|
+
{ name: "metric-name", type: "string", required: true, desc: "Metric name to delete." }
|
|
743
|
+
],
|
|
744
|
+
risk: "high-risk-write",
|
|
745
|
+
buildInput: (ctx) => ({
|
|
746
|
+
project_id: ctx.num("project-id"),
|
|
747
|
+
metric_name: ctx.str("metric-name")
|
|
748
|
+
})
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
// src/commands/te-engage/engage-setting/index.ts
|
|
752
|
+
var commands2 = [
|
|
753
|
+
channelTouchLimitsList,
|
|
754
|
+
channelTouchLimitsBatchUpdate,
|
|
755
|
+
channelTouchLimitsToggle,
|
|
756
|
+
channelTouchLimitsSave,
|
|
757
|
+
channelUpdateConfig,
|
|
758
|
+
channelTestSend,
|
|
759
|
+
approvalApproverDelete,
|
|
760
|
+
whitelistAdd,
|
|
761
|
+
whitelistUpdate,
|
|
762
|
+
whitelistDelete,
|
|
763
|
+
whitelistVerify,
|
|
764
|
+
pushLanguageGet,
|
|
765
|
+
pushLanguageSet,
|
|
766
|
+
// clientParamCreate,
|
|
767
|
+
clientParamUpdate,
|
|
768
|
+
clientParamDelete,
|
|
769
|
+
clientParamList,
|
|
770
|
+
configTableUpload,
|
|
771
|
+
configTableSave,
|
|
772
|
+
configTableList,
|
|
773
|
+
configTableQueryData,
|
|
774
|
+
configTableUpdateData,
|
|
775
|
+
configTableDelete,
|
|
776
|
+
presetEventList,
|
|
777
|
+
presetEventUpdate,
|
|
778
|
+
commonMetricList,
|
|
779
|
+
commonMetricGet,
|
|
780
|
+
// commonMetricCreate,
|
|
781
|
+
commonMetricUpdate,
|
|
782
|
+
commonMetricDelete
|
|
783
|
+
];
|
|
784
|
+
var engage_setting_default = commands2;
|
|
785
|
+
|
|
786
|
+
// src/commands/te-engage/engage-scene/config-item/create.ts
|
|
787
|
+
var configItemCreate = createEngageSceneCapabilityCommand({
|
|
788
|
+
resource: "config-item",
|
|
789
|
+
command: "create",
|
|
790
|
+
capabilityId: "engage-scene.config-item.create",
|
|
791
|
+
description: "Create a config item under a project, including business type, group, and optional avatar.",
|
|
792
|
+
flags: [
|
|
793
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
794
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID (unique within the project)." },
|
|
795
|
+
{ name: "config-name", type: "string", required: true, desc: "Config item display name (<=80 chars)." },
|
|
796
|
+
{ name: "business-type", type: "string", required: true, desc: "Business type: config_file or params." },
|
|
797
|
+
{ name: "config-remark", type: "string", required: false, desc: "Config item remark (<=200 chars)." },
|
|
798
|
+
{ name: "group-id", type: "number", required: false, desc: "Group ID (0 = default group)." },
|
|
799
|
+
{ name: "avatar-word", type: "json", required: false, desc: "Optional JSON array of avatar words for the icon." },
|
|
800
|
+
{ name: "file-name", type: "string", required: false, desc: "Optional avatar file name including extension." },
|
|
801
|
+
{ name: "file-content", type: "string", required: false, desc: "Optional base64-encoded avatar file content." }
|
|
802
|
+
],
|
|
803
|
+
risk: "write",
|
|
804
|
+
buildInput: (ctx) => ({
|
|
805
|
+
project_id: ctx.num("project-id"),
|
|
806
|
+
config_id: ctx.str("config-id"),
|
|
807
|
+
config_name: ctx.str("config-name"),
|
|
808
|
+
business_type: ctx.str("business-type"),
|
|
809
|
+
config_remark: ctx.str("config-remark") || void 0,
|
|
810
|
+
group_id: ctx.optionalNum("group-id"),
|
|
811
|
+
avatar_word: ctx.json("avatar-word") || void 0,
|
|
812
|
+
file_name: ctx.str("file-name") || void 0,
|
|
813
|
+
file_content: ctx.str("file-content") || void 0
|
|
814
|
+
})
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
// src/commands/te-engage/engage-scene/config-item/list.ts
|
|
818
|
+
var configItemList = createEngageSceneCapabilityCommand({
|
|
819
|
+
resource: "config-item",
|
|
820
|
+
command: "list",
|
|
821
|
+
capabilityId: "engage-scene.config-item.list",
|
|
822
|
+
description: "List config items of a project.",
|
|
823
|
+
flags: [
|
|
824
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
825
|
+
],
|
|
826
|
+
risk: "read",
|
|
827
|
+
buildInput: (ctx) => ({
|
|
828
|
+
project_id: ctx.num("project-id")
|
|
829
|
+
})
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
// src/commands/te-engage/engage-scene/config-item/update.ts
|
|
833
|
+
var configItemUpdate = createEngageSceneCapabilityCommand({
|
|
834
|
+
resource: "config-item",
|
|
835
|
+
command: "update",
|
|
836
|
+
capabilityId: "engage-scene.config-item.update",
|
|
837
|
+
description: "Update a config item's basic info (name, remark, business type, group) and bound channel.",
|
|
838
|
+
flags: [
|
|
839
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
840
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID to update." },
|
|
841
|
+
{ name: "config-name", type: "string", required: false, desc: "New config item display name (<=80 chars)." },
|
|
842
|
+
{ name: "config-remark", type: "string", required: false, desc: "New config item remark (<=200 chars)." },
|
|
843
|
+
{ name: "business-type", type: "string", required: false, desc: "New business type: config_file or params." },
|
|
844
|
+
{ name: "group-id", type: "number", required: false, desc: "New group ID (0 = default group)." },
|
|
845
|
+
{ name: "channel-id", type: "string", required: false, desc: "Config channel ID to bind." }
|
|
846
|
+
],
|
|
847
|
+
risk: "write",
|
|
848
|
+
buildInput: (ctx) => ({
|
|
849
|
+
project_id: ctx.num("project-id"),
|
|
850
|
+
config_id: ctx.str("config-id"),
|
|
851
|
+
config_name: ctx.str("config-name") || void 0,
|
|
852
|
+
config_remark: ctx.str("config-remark") || void 0,
|
|
853
|
+
business_type: ctx.str("business-type") || void 0,
|
|
854
|
+
group_id: ctx.optionalNum("group-id"),
|
|
855
|
+
channel_id: ctx.str("channel-id") || void 0
|
|
856
|
+
})
|
|
857
|
+
});
|
|
858
|
+
|
|
859
|
+
// src/commands/te-engage/engage-scene/config-param/list.ts
|
|
860
|
+
var configParamList = createEngageSceneCapabilityCommand({
|
|
861
|
+
resource: "config-param",
|
|
862
|
+
command: "list",
|
|
863
|
+
capabilityId: "engage-scene.config-param.list",
|
|
864
|
+
description: "List the global params of a config item.",
|
|
865
|
+
flags: [
|
|
866
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
867
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." }
|
|
868
|
+
],
|
|
869
|
+
risk: "read",
|
|
870
|
+
buildInput: (ctx) => ({
|
|
871
|
+
project_id: ctx.num("project-id"),
|
|
872
|
+
config_id: ctx.str("config-id")
|
|
873
|
+
})
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
// src/commands/te-engage/engage-scene/config-param/batch-add.ts
|
|
877
|
+
var configParamBatchAdd = createEngageSceneCapabilityCommand({
|
|
878
|
+
resource: "config-param",
|
|
879
|
+
command: "batch-add",
|
|
880
|
+
capabilityId: "engage-scene.config-param.batch-add",
|
|
881
|
+
description: "Batch-add params to a config item.",
|
|
882
|
+
flags: [
|
|
883
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
884
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
885
|
+
{
|
|
886
|
+
name: "params",
|
|
887
|
+
type: "json",
|
|
888
|
+
required: true,
|
|
889
|
+
desc: "JSON array of params. Each: param_name, param_display_name, param_type, param_sub_type, table_id, param_placeholder, is_required, default_value."
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
risk: "write",
|
|
893
|
+
buildInput: (ctx) => ({
|
|
894
|
+
project_id: ctx.num("project-id"),
|
|
895
|
+
config_id: ctx.str("config-id"),
|
|
896
|
+
params: ctx.json("params")
|
|
897
|
+
})
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
// src/commands/te-engage/engage-scene/config-param/update.ts
|
|
901
|
+
var configParamUpdate = createEngageSceneCapabilityCommand({
|
|
902
|
+
resource: "config-param",
|
|
903
|
+
command: "update",
|
|
904
|
+
capabilityId: "engage-scene.config-param.update",
|
|
905
|
+
description: "Update a config item param.",
|
|
906
|
+
flags: [
|
|
907
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
908
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
909
|
+
{ name: "param-id", type: "number", required: true, desc: "Param ID to update." },
|
|
910
|
+
{ name: "param-name", type: "string", required: false, desc: "Param name (<=80 chars)." },
|
|
911
|
+
{ name: "param-display-name", type: "string", required: false, desc: "Param display name (<=80 chars)." },
|
|
912
|
+
{ name: "param-type", type: "string", required: false, desc: "Param type (see ConfigParamsTypeEnum)." },
|
|
913
|
+
{ name: "param-sub-type", type: "string", required: false, desc: "Param sub type (see ConfigParamsSubTypeEnum)." },
|
|
914
|
+
{ name: "table-id", type: "string", required: false, desc: "Config table ID (for single-select params)." },
|
|
915
|
+
{ name: "param-placeholder", type: "string", required: false, desc: "Param placeholder text (<=80 chars)." },
|
|
916
|
+
{ name: "is-required", type: "number", required: false, desc: "Whether required: 1 yes, 0 no." },
|
|
917
|
+
{ name: "default-value", type: "string", required: false, desc: "Default value." }
|
|
918
|
+
],
|
|
919
|
+
risk: "write",
|
|
920
|
+
buildInput: (ctx) => ({
|
|
921
|
+
project_id: ctx.num("project-id"),
|
|
922
|
+
config_id: ctx.str("config-id"),
|
|
923
|
+
param_id: ctx.num("param-id"),
|
|
924
|
+
param_name: ctx.str("param-name") || void 0,
|
|
925
|
+
param_display_name: ctx.str("param-display-name") || void 0,
|
|
926
|
+
param_type: ctx.str("param-type") || void 0,
|
|
927
|
+
param_sub_type: ctx.str("param-sub-type") || void 0,
|
|
928
|
+
table_id: ctx.str("table-id") || void 0,
|
|
929
|
+
param_placeholder: ctx.str("param-placeholder") || void 0,
|
|
930
|
+
is_required: ctx.optionalNum("is-required"),
|
|
931
|
+
default_value: ctx.str("default-value") || void 0
|
|
932
|
+
})
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
// src/commands/te-engage/engage-scene/config-param/batch-delete.ts
|
|
936
|
+
var configParamBatchDelete = createEngageSceneCapabilityCommand({
|
|
937
|
+
resource: "config-param",
|
|
938
|
+
command: "batch-delete",
|
|
939
|
+
capabilityId: "engage-scene.config-param.batch-delete",
|
|
940
|
+
description: "Batch-delete config item params by id.",
|
|
941
|
+
flags: [
|
|
942
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
943
|
+
{ name: "param-ids", type: "json", required: true, desc: "JSON array of param IDs to delete." }
|
|
944
|
+
],
|
|
945
|
+
risk: "high-risk-write",
|
|
946
|
+
buildInput: (ctx) => ({
|
|
947
|
+
project_id: ctx.num("project-id"),
|
|
948
|
+
param_ids: ctx.json("param-ids")
|
|
949
|
+
})
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
// src/commands/te-engage/engage-scene/config-group/list.ts
|
|
953
|
+
var configGroupList = createEngageSceneCapabilityCommand({
|
|
954
|
+
resource: "config-group",
|
|
955
|
+
command: "list",
|
|
956
|
+
capabilityId: "engage-scene.config-group.list",
|
|
957
|
+
description: "List config groups of a project.",
|
|
958
|
+
flags: [
|
|
959
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
960
|
+
],
|
|
961
|
+
risk: "read",
|
|
962
|
+
buildInput: (ctx) => ({
|
|
963
|
+
project_id: ctx.num("project-id")
|
|
964
|
+
})
|
|
965
|
+
});
|
|
966
|
+
|
|
967
|
+
// src/commands/te-engage/engage-scene/config-group/batch-add.ts
|
|
968
|
+
var configGroupBatchAdd = createEngageSceneCapabilityCommand({
|
|
969
|
+
resource: "config-group",
|
|
970
|
+
command: "batch-add",
|
|
971
|
+
capabilityId: "engage-scene.config-group.batch-add",
|
|
972
|
+
description: "Batch-create config groups.",
|
|
973
|
+
flags: [
|
|
974
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
975
|
+
{ name: "group-names", type: "json", required: true, desc: "JSON array of group names to create (<=80 chars each)." }
|
|
976
|
+
],
|
|
977
|
+
risk: "write",
|
|
978
|
+
buildInput: (ctx) => ({
|
|
979
|
+
project_id: ctx.num("project-id"),
|
|
980
|
+
group_names: ctx.json("group-names")
|
|
981
|
+
})
|
|
982
|
+
});
|
|
983
|
+
|
|
984
|
+
// src/commands/te-engage/engage-scene/config-group/update.ts
|
|
985
|
+
var configGroupUpdate = createEngageSceneCapabilityCommand({
|
|
986
|
+
resource: "config-group",
|
|
987
|
+
command: "update",
|
|
988
|
+
capabilityId: "engage-scene.config-group.update",
|
|
989
|
+
description: "Rename a config group.",
|
|
990
|
+
flags: [
|
|
991
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
992
|
+
{ name: "group-id", type: "number", required: true, desc: "Group ID to update." },
|
|
993
|
+
{ name: "group-name", type: "string", required: true, desc: "New group name (<=80 chars)." }
|
|
994
|
+
],
|
|
995
|
+
risk: "write",
|
|
996
|
+
buildInput: (ctx) => ({
|
|
997
|
+
project_id: ctx.num("project-id"),
|
|
998
|
+
group_id: ctx.num("group-id"),
|
|
999
|
+
group_name: ctx.str("group-name")
|
|
1000
|
+
})
|
|
1001
|
+
});
|
|
1002
|
+
|
|
1003
|
+
// src/commands/te-engage/engage-scene/config-group/batch-delete.ts
|
|
1004
|
+
var configGroupBatchDelete = createEngageSceneCapabilityCommand({
|
|
1005
|
+
resource: "config-group",
|
|
1006
|
+
command: "batch-delete",
|
|
1007
|
+
capabilityId: "engage-scene.config-group.batch-delete",
|
|
1008
|
+
description: "Batch-delete config groups by id.",
|
|
1009
|
+
flags: [
|
|
1010
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1011
|
+
{ name: "group-ids", type: "json", required: true, desc: "JSON array of group IDs to delete." }
|
|
1012
|
+
],
|
|
1013
|
+
risk: "high-risk-write",
|
|
1014
|
+
buildInput: (ctx) => ({
|
|
1015
|
+
project_id: ctx.num("project-id"),
|
|
1016
|
+
group_ids: ctx.json("group-ids")
|
|
1017
|
+
})
|
|
1018
|
+
});
|
|
1019
|
+
|
|
1020
|
+
// src/commands/te-engage/engage-scene/preset-metric/get.ts
|
|
1021
|
+
var presetMetricGet = createEngageSceneCapabilityCommand({
|
|
1022
|
+
resource: "preset-metric",
|
|
1023
|
+
command: "get",
|
|
1024
|
+
capabilityId: "engage-scene.preset-metric.get",
|
|
1025
|
+
description: "Get preset metric QP config of a config item.",
|
|
1026
|
+
flags: [
|
|
1027
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1028
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." }
|
|
1029
|
+
],
|
|
1030
|
+
risk: "read",
|
|
1031
|
+
buildInput: (ctx) => ({
|
|
1032
|
+
project_id: ctx.num("project-id"),
|
|
1033
|
+
config_id: ctx.str("config-id")
|
|
1034
|
+
})
|
|
1035
|
+
});
|
|
1036
|
+
|
|
1037
|
+
// src/commands/te-engage/engage-scene/preset-metric/set.ts
|
|
1038
|
+
var presetMetricSet = createEngageSceneCapabilityCommand({
|
|
1039
|
+
resource: "preset-metric",
|
|
1040
|
+
command: "set",
|
|
1041
|
+
capabilityId: "engage-scene.preset-metric.set",
|
|
1042
|
+
description: "Set preset metric QP config (impression/click/attend) of a config item.",
|
|
1043
|
+
flags: [
|
|
1044
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1045
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1046
|
+
{ name: "impression-event-qp", type: "string", required: false, desc: "Impression event QP JSON." },
|
|
1047
|
+
{ name: "click-event-qp", type: "string", required: false, desc: "Click event QP JSON." },
|
|
1048
|
+
{ name: "attend-event-qp", type: "string", required: false, desc: "Attend event QP JSON." }
|
|
1049
|
+
],
|
|
1050
|
+
risk: "write",
|
|
1051
|
+
buildInput: (ctx) => ({
|
|
1052
|
+
project_id: ctx.num("project-id"),
|
|
1053
|
+
config_id: ctx.str("config-id"),
|
|
1054
|
+
impression_event_qp: ctx.str("impression-event-qp") || void 0,
|
|
1055
|
+
click_event_qp: ctx.str("click-event-qp") || void 0,
|
|
1056
|
+
attend_event_qp: ctx.str("attend-event-qp") || void 0
|
|
1057
|
+
})
|
|
1058
|
+
});
|
|
1059
|
+
|
|
1060
|
+
// src/commands/te-engage/engage-scene/config-metric/list.ts
|
|
1061
|
+
var configMetricList = createEngageSceneCapabilityCommand({
|
|
1062
|
+
resource: "config-metric",
|
|
1063
|
+
command: "list",
|
|
1064
|
+
capabilityId: "engage-scene.config-metric.list",
|
|
1065
|
+
description: "List related metrics of a config item.",
|
|
1066
|
+
flags: [
|
|
1067
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1068
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1069
|
+
{ name: "all-metric", type: "boolean", required: false, desc: "Include preset metrics as well." }
|
|
1070
|
+
],
|
|
1071
|
+
risk: "read",
|
|
1072
|
+
buildInput: (ctx) => ({
|
|
1073
|
+
project_id: ctx.num("project-id"),
|
|
1074
|
+
config_id: ctx.str("config-id"),
|
|
1075
|
+
all_metric: ctx.bool("all-metric") || void 0
|
|
1076
|
+
})
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
// src/commands/te-engage/engage-scene/config-metric/get.ts
|
|
1080
|
+
var configMetricGet = createEngageSceneCapabilityCommand({
|
|
1081
|
+
resource: "config-metric",
|
|
1082
|
+
command: "get",
|
|
1083
|
+
capabilityId: "engage-scene.config-metric.get",
|
|
1084
|
+
description: "Get a related metric's detail.",
|
|
1085
|
+
flags: [
|
|
1086
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1087
|
+
{ name: "metric-id", type: "number", required: true, desc: "Config metric primary ID." }
|
|
1088
|
+
],
|
|
1089
|
+
risk: "read",
|
|
1090
|
+
buildInput: (ctx) => ({
|
|
1091
|
+
project_id: ctx.num("project-id"),
|
|
1092
|
+
metric_id: ctx.num("metric-id")
|
|
1093
|
+
})
|
|
1094
|
+
});
|
|
1095
|
+
|
|
1096
|
+
// src/commands/te-engage/engage-scene/config-metric/batch-add.ts
|
|
1097
|
+
var configMetricBatchAdd = createEngageSceneCapabilityCommand({
|
|
1098
|
+
resource: "config-metric",
|
|
1099
|
+
command: "batch-add",
|
|
1100
|
+
capabilityId: "engage-scene.config-metric.batch-add",
|
|
1101
|
+
description: "Batch-relate TA metrics (event-analysis metrics) to a config item.",
|
|
1102
|
+
flags: [
|
|
1103
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1104
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1105
|
+
{ name: "ta-metric-ids", type: "json", required: true, desc: "JSON array of TA metric IDs to relate." }
|
|
1106
|
+
],
|
|
1107
|
+
risk: "write",
|
|
1108
|
+
buildInput: (ctx) => ({
|
|
1109
|
+
project_id: ctx.num("project-id"),
|
|
1110
|
+
config_id: ctx.str("config-id"),
|
|
1111
|
+
ta_metric_ids: ctx.json("ta-metric-ids")
|
|
1112
|
+
})
|
|
1113
|
+
});
|
|
1114
|
+
|
|
1115
|
+
// src/commands/te-engage/engage-scene/config-metric/update-rule.ts
|
|
1116
|
+
var configMetricUpdateRule = createEngageSceneCapabilityCommand({
|
|
1117
|
+
resource: "config-metric",
|
|
1118
|
+
command: "update-rule",
|
|
1119
|
+
capabilityId: "engage-scene.config-metric.update-rule",
|
|
1120
|
+
description: "Update a config metric's event relation rule.",
|
|
1121
|
+
flags: [
|
|
1122
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1123
|
+
{ name: "metric-id", type: "number", required: true, desc: "Config metric primary ID." },
|
|
1124
|
+
{
|
|
1125
|
+
name: "event-list",
|
|
1126
|
+
type: "json",
|
|
1127
|
+
required: true,
|
|
1128
|
+
desc: 'JSON array of event rules. Each item needs event_name or eventName, plus filter ("true"/"false").'
|
|
1129
|
+
}
|
|
1130
|
+
],
|
|
1131
|
+
risk: "write",
|
|
1132
|
+
buildInput: (ctx) => ({
|
|
1133
|
+
project_id: ctx.num("project-id"),
|
|
1134
|
+
metric_id: ctx.num("metric-id"),
|
|
1135
|
+
event_list: ctx.json("event-list")
|
|
1136
|
+
})
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
// src/commands/te-engage/engage-scene/config-metric/batch-delete.ts
|
|
1140
|
+
var configMetricBatchDelete = createEngageSceneCapabilityCommand({
|
|
1141
|
+
resource: "config-metric",
|
|
1142
|
+
command: "batch-delete",
|
|
1143
|
+
capabilityId: "engage-scene.config-metric.batch-delete",
|
|
1144
|
+
description: "Batch-remove related metrics from a config item.",
|
|
1145
|
+
flags: [
|
|
1146
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1147
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1148
|
+
{ name: "metric-ids", type: "json", required: true, desc: "JSON array of config metric primary IDs to delete." }
|
|
1149
|
+
],
|
|
1150
|
+
risk: "high-risk-write",
|
|
1151
|
+
buildInput: (ctx) => ({
|
|
1152
|
+
project_id: ctx.num("project-id"),
|
|
1153
|
+
config_id: ctx.str("config-id"),
|
|
1154
|
+
metric_ids: ctx.json("metric-ids")
|
|
1155
|
+
})
|
|
1156
|
+
});
|
|
1157
|
+
|
|
1158
|
+
// src/commands/te-engage/engage-scene/config-channel/create.ts
|
|
1159
|
+
var configChannelCreate = createEngageSceneCapabilityCommand({
|
|
1160
|
+
resource: "config-channel",
|
|
1161
|
+
command: "create",
|
|
1162
|
+
capabilityId: "engage-scene.config-channel.create",
|
|
1163
|
+
description: "Create a config channel and enable it.",
|
|
1164
|
+
flags: [
|
|
1165
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1166
|
+
{ name: "channel-name", type: "string", required: true, desc: "Channel name." },
|
|
1167
|
+
{ name: "channel-type", type: "number", required: true, desc: "Channel type: 0 webhook, 1 client." },
|
|
1168
|
+
{ name: "config", type: "string", required: true, desc: "Channel-specific JSON config string." }
|
|
1169
|
+
],
|
|
1170
|
+
risk: "write",
|
|
1171
|
+
buildInput: (ctx) => ({
|
|
1172
|
+
project_id: ctx.num("project-id"),
|
|
1173
|
+
channel_name: ctx.str("channel-name"),
|
|
1174
|
+
channel_type: ctx.num("channel-type"),
|
|
1175
|
+
config: ctx.str("config")
|
|
1176
|
+
})
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1179
|
+
// src/commands/te-engage/engage-scene/config-channel/update.ts
|
|
1180
|
+
var configChannelUpdate = createEngageSceneCapabilityCommand({
|
|
1181
|
+
resource: "config-channel",
|
|
1182
|
+
command: "update",
|
|
1183
|
+
capabilityId: "engage-scene.config-channel.update",
|
|
1184
|
+
description: "Update a config channel's name and optionally its config.",
|
|
1185
|
+
flags: [
|
|
1186
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1187
|
+
{ name: "channel-id", type: "string", required: true, desc: "Channel ID to update." },
|
|
1188
|
+
{ name: "channel-name", type: "string", required: true, desc: "New channel name." },
|
|
1189
|
+
{
|
|
1190
|
+
name: "config",
|
|
1191
|
+
type: "string",
|
|
1192
|
+
required: false,
|
|
1193
|
+
desc: "Channel-specific JSON config string. Omit to keep the current config (typical when renaming an enabled channel)."
|
|
1194
|
+
}
|
|
1195
|
+
],
|
|
1196
|
+
risk: "write",
|
|
1197
|
+
buildInput: (ctx) => ({
|
|
1198
|
+
project_id: ctx.num("project-id"),
|
|
1199
|
+
channel_id: ctx.str("channel-id"),
|
|
1200
|
+
channel_name: ctx.str("channel-name"),
|
|
1201
|
+
config: ctx.str("config") || void 0
|
|
1202
|
+
})
|
|
1203
|
+
});
|
|
1204
|
+
|
|
1205
|
+
// src/commands/te-engage/engage-scene/config-channel/query-log.ts
|
|
1206
|
+
var configChannelQueryLog = createEngageSceneCapabilityCommand({
|
|
1207
|
+
resource: "config-channel",
|
|
1208
|
+
command: "query-log",
|
|
1209
|
+
capabilityId: "engage-scene.config-channel.query-log",
|
|
1210
|
+
description: "Query a config channel's operation log.",
|
|
1211
|
+
flags: [
|
|
1212
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1213
|
+
{ name: "channel-id", type: "string", required: true, desc: "Channel ID whose operation log to query." }
|
|
1214
|
+
],
|
|
1215
|
+
risk: "read",
|
|
1216
|
+
buildInput: (ctx) => ({
|
|
1217
|
+
project_id: ctx.num("project-id"),
|
|
1218
|
+
channel_id: ctx.str("channel-id")
|
|
1219
|
+
})
|
|
1220
|
+
});
|
|
1221
|
+
|
|
1222
|
+
// src/commands/te-engage/engage-scene/strategy/create.ts
|
|
1223
|
+
var strategyCreate = createEngageSceneCapabilityCommand({
|
|
1224
|
+
resource: "strategy",
|
|
1225
|
+
command: "create",
|
|
1226
|
+
capabilityId: "engage-scene.strategy.create",
|
|
1227
|
+
description: "Create a config strategy (draft) from a ConfigStrategyAddDTO payload.",
|
|
1228
|
+
flags: [
|
|
1229
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1230
|
+
{
|
|
1231
|
+
name: "payload",
|
|
1232
|
+
type: "json",
|
|
1233
|
+
required: true,
|
|
1234
|
+
desc: "ConfigStrategyAddDTO JSON body (configId, templateId, strategyName, templateParamConfig, ...)."
|
|
1235
|
+
}
|
|
1236
|
+
],
|
|
1237
|
+
risk: "write",
|
|
1238
|
+
buildInput: (ctx) => ({
|
|
1239
|
+
project_id: ctx.num("project-id"),
|
|
1240
|
+
payload: ctx.json("payload")
|
|
1241
|
+
})
|
|
1242
|
+
});
|
|
1243
|
+
|
|
1244
|
+
// src/commands/te-engage/engage-scene/strategy/update.ts
|
|
1245
|
+
var strategyUpdate = createEngageSceneCapabilityCommand({
|
|
1246
|
+
resource: "strategy",
|
|
1247
|
+
command: "update",
|
|
1248
|
+
capabilityId: "engage-scene.strategy.update",
|
|
1249
|
+
description: "Update a config strategy from a ConfigStrategyModifyDTO payload.",
|
|
1250
|
+
flags: [
|
|
1251
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1252
|
+
{
|
|
1253
|
+
name: "payload",
|
|
1254
|
+
type: "json",
|
|
1255
|
+
required: true,
|
|
1256
|
+
desc: "ConfigStrategyModifyDTO JSON body (strategyUuid + fields to modify)."
|
|
1257
|
+
}
|
|
1258
|
+
],
|
|
1259
|
+
risk: "write",
|
|
1260
|
+
buildInput: (ctx) => ({
|
|
1261
|
+
project_id: ctx.num("project-id"),
|
|
1262
|
+
payload: ctx.json("payload")
|
|
1263
|
+
})
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
// src/commands/te-engage/engage-scene/strategy/log.ts
|
|
1267
|
+
var strategyLog = createEngageSceneCapabilityCommand({
|
|
1268
|
+
resource: "strategy",
|
|
1269
|
+
command: "log",
|
|
1270
|
+
capabilityId: "engage-scene.strategy.log",
|
|
1271
|
+
description: "Query a config strategy's log.",
|
|
1272
|
+
flags: [
|
|
1273
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1274
|
+
{ name: "strategy-uuid", type: "string", required: true, desc: "Strategy UUID whose log to query." }
|
|
1275
|
+
],
|
|
1276
|
+
risk: "read",
|
|
1277
|
+
buildInput: (ctx) => ({
|
|
1278
|
+
project_id: ctx.num("project-id"),
|
|
1279
|
+
strategy_uuid: ctx.str("strategy-uuid")
|
|
1280
|
+
})
|
|
1281
|
+
});
|
|
1282
|
+
|
|
1283
|
+
// src/commands/te-engage/engage-scene/strategy/batch-copy.ts
|
|
1284
|
+
var strategyBatchCopy = createEngageSceneCapabilityCommand({
|
|
1285
|
+
resource: "strategy",
|
|
1286
|
+
command: "batch-copy",
|
|
1287
|
+
capabilityId: "engage-scene.strategy.batch-copy",
|
|
1288
|
+
description: "Batch-copy config strategies.",
|
|
1289
|
+
flags: [
|
|
1290
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1291
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1292
|
+
{ name: "strategy-ids", type: "json", required: true, desc: "JSON array of strategy IDs to copy." },
|
|
1293
|
+
{ name: "op-mode", type: "string", required: false, desc: "Operation mode: batch or single. Defaults to batch." }
|
|
1294
|
+
],
|
|
1295
|
+
risk: "write",
|
|
1296
|
+
buildInput: (ctx) => ({
|
|
1297
|
+
project_id: ctx.num("project-id"),
|
|
1298
|
+
config_id: ctx.str("config-id"),
|
|
1299
|
+
strategy_ids: ctx.json("strategy-ids"),
|
|
1300
|
+
op_mode: ctx.str("op-mode") || void 0
|
|
1301
|
+
})
|
|
1302
|
+
});
|
|
1303
|
+
|
|
1304
|
+
// src/commands/te-engage/engage-scene/template/list.ts
|
|
1305
|
+
var templateList = createEngageSceneCapabilityCommand({
|
|
1306
|
+
resource: "template",
|
|
1307
|
+
command: "list",
|
|
1308
|
+
capabilityId: "engage-scene.template.list",
|
|
1309
|
+
description: "List config templates of a config item.",
|
|
1310
|
+
flags: [
|
|
1311
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1312
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." }
|
|
1313
|
+
],
|
|
1314
|
+
risk: "read",
|
|
1315
|
+
buildInput: (ctx) => ({
|
|
1316
|
+
project_id: ctx.num("project-id"),
|
|
1317
|
+
config_id: ctx.str("config-id")
|
|
1318
|
+
})
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
// src/commands/te-engage/engage-scene/template/get.ts
|
|
1322
|
+
var templateGet = createEngageSceneCapabilityCommand({
|
|
1323
|
+
resource: "template",
|
|
1324
|
+
command: "get",
|
|
1325
|
+
capabilityId: "engage-scene.template.get",
|
|
1326
|
+
description: "Get a config template's detail.",
|
|
1327
|
+
flags: [
|
|
1328
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1329
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1330
|
+
{ name: "template-id", type: "string", required: true, desc: "Template ID." }
|
|
1331
|
+
],
|
|
1332
|
+
risk: "read",
|
|
1333
|
+
buildInput: (ctx) => ({
|
|
1334
|
+
project_id: ctx.num("project-id"),
|
|
1335
|
+
config_id: ctx.str("config-id"),
|
|
1336
|
+
template_id: ctx.str("template-id")
|
|
1337
|
+
})
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// src/commands/te-engage/engage-scene/template/create.ts
|
|
1341
|
+
var templateCreate = createEngageSceneCapabilityCommand({
|
|
1342
|
+
resource: "template",
|
|
1343
|
+
command: "create",
|
|
1344
|
+
capabilityId: "engage-scene.template.create",
|
|
1345
|
+
description: "Create a config template from a ConfigTemplateAddDTO payload.",
|
|
1346
|
+
flags: [
|
|
1347
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1348
|
+
{
|
|
1349
|
+
name: "payload",
|
|
1350
|
+
type: "json",
|
|
1351
|
+
required: true,
|
|
1352
|
+
desc: "ConfigTemplateAddDTO JSON body (configId, templateId, templateName, remark, ...)."
|
|
1353
|
+
}
|
|
1354
|
+
],
|
|
1355
|
+
risk: "write",
|
|
1356
|
+
buildInput: (ctx) => ({
|
|
1357
|
+
project_id: ctx.num("project-id"),
|
|
1358
|
+
payload: ctx.json("payload")
|
|
1359
|
+
})
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
// src/commands/te-engage/engage-scene/template/update.ts
|
|
1363
|
+
var templateUpdate = createEngageSceneCapabilityCommand({
|
|
1364
|
+
resource: "template",
|
|
1365
|
+
command: "update",
|
|
1366
|
+
capabilityId: "engage-scene.template.update",
|
|
1367
|
+
description: "Update a config template from a ConfigTemplateModifyDTO payload.",
|
|
1368
|
+
flags: [
|
|
1369
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1370
|
+
{
|
|
1371
|
+
name: "payload",
|
|
1372
|
+
type: "json",
|
|
1373
|
+
required: true,
|
|
1374
|
+
desc: "ConfigTemplateModifyDTO JSON body (configId, templateId, templateName, remark, config, ...)."
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
risk: "write",
|
|
1378
|
+
buildInput: (ctx) => ({
|
|
1379
|
+
project_id: ctx.num("project-id"),
|
|
1380
|
+
payload: ctx.json("payload")
|
|
1381
|
+
})
|
|
1382
|
+
});
|
|
1383
|
+
|
|
1384
|
+
// src/commands/te-engage/engage-scene/template/update-status.ts
|
|
1385
|
+
var templateUpdateStatus = createEngageSceneCapabilityCommand({
|
|
1386
|
+
resource: "template",
|
|
1387
|
+
command: "update-status",
|
|
1388
|
+
capabilityId: "engage-scene.template.update-status",
|
|
1389
|
+
description: "Enable or disable a config template.",
|
|
1390
|
+
flags: [
|
|
1391
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1392
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1393
|
+
{ name: "template-id", type: "string", required: true, desc: "Template ID." },
|
|
1394
|
+
{ name: "status", type: "number", required: true, desc: "Status: 1 enable, 0 disable." }
|
|
1395
|
+
],
|
|
1396
|
+
risk: "write",
|
|
1397
|
+
buildInput: (ctx) => ({
|
|
1398
|
+
project_id: ctx.num("project-id"),
|
|
1399
|
+
config_id: ctx.str("config-id"),
|
|
1400
|
+
template_id: ctx.str("template-id"),
|
|
1401
|
+
status: ctx.num("status")
|
|
1402
|
+
})
|
|
1403
|
+
});
|
|
1404
|
+
|
|
1405
|
+
// src/commands/te-engage/engage-scene/template/delete.ts
|
|
1406
|
+
var templateDelete = createEngageSceneCapabilityCommand({
|
|
1407
|
+
resource: "template",
|
|
1408
|
+
command: "delete",
|
|
1409
|
+
capabilityId: "engage-scene.template.delete",
|
|
1410
|
+
description: "Delete a config template.",
|
|
1411
|
+
flags: [
|
|
1412
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1413
|
+
{ name: "config-id", type: "string", required: true, desc: "Config item ID." },
|
|
1414
|
+
{ name: "template-id", type: "string", required: true, desc: "Template ID to delete." }
|
|
1415
|
+
],
|
|
1416
|
+
risk: "high-risk-write",
|
|
1417
|
+
buildInput: (ctx) => ({
|
|
1418
|
+
project_id: ctx.num("project-id"),
|
|
1419
|
+
config_id: ctx.str("config-id"),
|
|
1420
|
+
template_id: ctx.str("template-id")
|
|
1421
|
+
})
|
|
1422
|
+
});
|
|
1423
|
+
|
|
1424
|
+
// src/commands/te-engage/engage-scene/index.ts
|
|
1425
|
+
var commands3 = [
|
|
1426
|
+
configItemCreate,
|
|
1427
|
+
configItemList,
|
|
1428
|
+
configItemUpdate,
|
|
1429
|
+
configParamList,
|
|
1430
|
+
configParamBatchAdd,
|
|
1431
|
+
configParamUpdate,
|
|
1432
|
+
configParamBatchDelete,
|
|
1433
|
+
configGroupList,
|
|
1434
|
+
configGroupBatchAdd,
|
|
1435
|
+
configGroupUpdate,
|
|
1436
|
+
configGroupBatchDelete,
|
|
1437
|
+
presetMetricGet,
|
|
1438
|
+
presetMetricSet,
|
|
1439
|
+
configMetricList,
|
|
1440
|
+
configMetricGet,
|
|
1441
|
+
configMetricBatchAdd,
|
|
1442
|
+
configMetricUpdateRule,
|
|
1443
|
+
configMetricBatchDelete,
|
|
1444
|
+
configChannelCreate,
|
|
1445
|
+
configChannelUpdate,
|
|
1446
|
+
configChannelQueryLog,
|
|
1447
|
+
strategyCreate,
|
|
1448
|
+
strategyUpdate,
|
|
1449
|
+
strategyLog,
|
|
1450
|
+
strategyBatchCopy,
|
|
1451
|
+
// strategySaveSubmit,
|
|
1452
|
+
// strategyTestSend,
|
|
1453
|
+
templateList,
|
|
1454
|
+
templateGet,
|
|
1455
|
+
templateCreate,
|
|
1456
|
+
templateUpdate,
|
|
1457
|
+
templateUpdateStatus,
|
|
1458
|
+
templateDelete
|
|
1459
|
+
// templateTestSend,
|
|
1460
|
+
];
|
|
1461
|
+
var engage_scene_default = commands3;
|
|
1462
|
+
|
|
1463
|
+
// src/commands/te-engage/engage-activity/activity/create.ts
|
|
1464
|
+
var activityCreate = createEngageActivityCapabilityCommand({
|
|
1465
|
+
resource: "activity",
|
|
1466
|
+
command: "create",
|
|
1467
|
+
capabilityId: "engage-activity.activity.create",
|
|
1468
|
+
description: "Create an operation activity (draft) from an ActivityAddDTO payload.",
|
|
1469
|
+
flags: [
|
|
1470
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1471
|
+
{
|
|
1472
|
+
name: "payload",
|
|
1473
|
+
type: "json",
|
|
1474
|
+
required: true,
|
|
1475
|
+
desc: "ActivityAddDTO JSON body (activityName, activityType, tzOffset, periodType, periodStart, periodEnd, activityDesc)."
|
|
1476
|
+
}
|
|
1477
|
+
],
|
|
1478
|
+
risk: "write",
|
|
1479
|
+
buildInput: (ctx) => ({
|
|
1480
|
+
project_id: ctx.num("project-id"),
|
|
1481
|
+
payload: ctx.json("payload")
|
|
1482
|
+
})
|
|
1483
|
+
});
|
|
1484
|
+
|
|
1485
|
+
// src/commands/te-engage/engage-activity/activity/update.ts
|
|
1486
|
+
var activityUpdate = createEngageActivityCapabilityCommand({
|
|
1487
|
+
resource: "activity",
|
|
1488
|
+
command: "update",
|
|
1489
|
+
capabilityId: "engage-activity.activity.update",
|
|
1490
|
+
description: "Update an operation activity from an ActivityDTO payload (activityId + base fields).",
|
|
1491
|
+
flags: [
|
|
1492
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1493
|
+
{ name: "payload", type: "json", required: true, desc: "ActivityDTO JSON body (activityId + ActivityAddDTO fields)." }
|
|
1494
|
+
],
|
|
1495
|
+
risk: "write",
|
|
1496
|
+
buildInput: (ctx) => ({
|
|
1497
|
+
project_id: ctx.num("project-id"),
|
|
1498
|
+
payload: ctx.json("payload")
|
|
1499
|
+
})
|
|
1500
|
+
});
|
|
1501
|
+
|
|
1502
|
+
// src/commands/te-engage/engage-activity/activity/delete.ts
|
|
1503
|
+
var activityDelete = createEngageActivityCapabilityCommand({
|
|
1504
|
+
resource: "activity",
|
|
1505
|
+
command: "delete",
|
|
1506
|
+
capabilityId: "engage-activity.activity.delete",
|
|
1507
|
+
description: "Delete an operation activity (draft/denied/ended only).",
|
|
1508
|
+
flags: [
|
|
1509
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1510
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID to delete." }
|
|
1511
|
+
],
|
|
1512
|
+
risk: "high-risk-write",
|
|
1513
|
+
buildInput: (ctx) => ({
|
|
1514
|
+
project_id: ctx.num("project-id"),
|
|
1515
|
+
activity_id: ctx.str("activity-id")
|
|
1516
|
+
})
|
|
1517
|
+
});
|
|
1518
|
+
|
|
1519
|
+
// src/commands/te-engage/engage-activity/activity/list.ts
|
|
1520
|
+
var activityList = createEngageActivityCapabilityCommand({
|
|
1521
|
+
resource: "activity",
|
|
1522
|
+
command: "list",
|
|
1523
|
+
capabilityId: "engage-activity.activity.list",
|
|
1524
|
+
description: "List operation activities with optional fuzzy match and paging.",
|
|
1525
|
+
flags: [
|
|
1526
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1527
|
+
{ name: "fuzzy-field", type: "string", required: false, desc: "Fuzzy match on activity id/name." },
|
|
1528
|
+
{ name: "page", type: "number", required: false, desc: "Page number (1-based, default 1)." },
|
|
1529
|
+
{ name: "page-size", type: "number", required: false, desc: "Page size (default 20)." }
|
|
1530
|
+
],
|
|
1531
|
+
risk: "read",
|
|
1532
|
+
buildInput: (ctx) => ({
|
|
1533
|
+
project_id: ctx.num("project-id"),
|
|
1534
|
+
fuzzy_field: ctx.str("fuzzy-field") || void 0,
|
|
1535
|
+
page: ctx.optionalNum("page"),
|
|
1536
|
+
page_size: ctx.optionalNum("page-size")
|
|
1537
|
+
})
|
|
1538
|
+
});
|
|
1539
|
+
|
|
1540
|
+
// src/commands/te-engage/engage-activity/activity/get.ts
|
|
1541
|
+
var activityGet = createEngageActivityCapabilityCommand({
|
|
1542
|
+
resource: "activity",
|
|
1543
|
+
command: "get",
|
|
1544
|
+
capabilityId: "engage-activity.activity.get",
|
|
1545
|
+
description: "Get an operation activity detail (status, period, approval, topic/task counts).",
|
|
1546
|
+
flags: [
|
|
1547
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1548
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID." }
|
|
1549
|
+
],
|
|
1550
|
+
risk: "read",
|
|
1551
|
+
buildInput: (ctx) => ({
|
|
1552
|
+
project_id: ctx.num("project-id"),
|
|
1553
|
+
activity_id: ctx.str("activity-id")
|
|
1554
|
+
})
|
|
1555
|
+
});
|
|
1556
|
+
|
|
1557
|
+
// src/commands/te-engage/engage-activity/activity/pause.ts
|
|
1558
|
+
var activityPause = createEngageActivityCapabilityCommand({
|
|
1559
|
+
resource: "activity",
|
|
1560
|
+
command: "pause",
|
|
1561
|
+
capabilityId: "engage-activity.activity.pause",
|
|
1562
|
+
description: "Pause an operation activity to stop subsequent reach.",
|
|
1563
|
+
flags: [
|
|
1564
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1565
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID to pause." }
|
|
1566
|
+
],
|
|
1567
|
+
risk: "write",
|
|
1568
|
+
buildInput: (ctx) => ({
|
|
1569
|
+
project_id: ctx.num("project-id"),
|
|
1570
|
+
activity_id: ctx.str("activity-id")
|
|
1571
|
+
})
|
|
1572
|
+
});
|
|
1573
|
+
|
|
1574
|
+
// src/commands/te-engage/engage-activity/activity/end.ts
|
|
1575
|
+
var activityEnd = createEngageActivityCapabilityCommand({
|
|
1576
|
+
resource: "activity",
|
|
1577
|
+
command: "end",
|
|
1578
|
+
capabilityId: "engage-activity.activity.end",
|
|
1579
|
+
description: "End an operation activity lifecycle.",
|
|
1580
|
+
flags: [
|
|
1581
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1582
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID to end." }
|
|
1583
|
+
],
|
|
1584
|
+
risk: "write",
|
|
1585
|
+
buildInput: (ctx) => ({
|
|
1586
|
+
project_id: ctx.num("project-id"),
|
|
1587
|
+
activity_id: ctx.str("activity-id")
|
|
1588
|
+
})
|
|
1589
|
+
});
|
|
1590
|
+
|
|
1591
|
+
// src/commands/te-engage/engage-activity/activity/stats.ts
|
|
1592
|
+
var activityStats = createEngageActivityCapabilityCommand({
|
|
1593
|
+
resource: "activity",
|
|
1594
|
+
command: "stats",
|
|
1595
|
+
capabilityId: "engage-activity.activity.stats",
|
|
1596
|
+
description: "Query activity status distribution statistics (draft/working/pending/complete/...).",
|
|
1597
|
+
flags: [
|
|
1598
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1599
|
+
{ name: "fuzzy-field", type: "string", required: false, desc: "Fuzzy match on activity id/name." }
|
|
1600
|
+
],
|
|
1601
|
+
risk: "read",
|
|
1602
|
+
buildInput: (ctx) => ({
|
|
1603
|
+
project_id: ctx.num("project-id"),
|
|
1604
|
+
fuzzy_field: ctx.str("fuzzy-field") || void 0
|
|
1605
|
+
})
|
|
1606
|
+
});
|
|
1607
|
+
|
|
1608
|
+
// src/commands/te-engage/engage-activity/activity/info-list.ts
|
|
1609
|
+
var activityInfoList = createEngageActivityCapabilityCommand({
|
|
1610
|
+
resource: "activity",
|
|
1611
|
+
command: "info-list",
|
|
1612
|
+
capabilityId: "engage-activity.activity.info-list",
|
|
1613
|
+
description: "Query an activity's topics and standalone tasks structure.",
|
|
1614
|
+
flags: [
|
|
1615
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1616
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID." }
|
|
1617
|
+
],
|
|
1618
|
+
risk: "read",
|
|
1619
|
+
buildInput: (ctx) => ({
|
|
1620
|
+
project_id: ctx.num("project-id"),
|
|
1621
|
+
activity_id: ctx.str("activity-id")
|
|
1622
|
+
})
|
|
1623
|
+
});
|
|
1624
|
+
|
|
1625
|
+
// src/commands/te-engage/engage-activity/approval/submit.ts
|
|
1626
|
+
var approvalSubmit = createEngageActivityCapabilityCommand({
|
|
1627
|
+
resource: "approval",
|
|
1628
|
+
command: "submit",
|
|
1629
|
+
capabilityId: "engage-activity.approval.submit",
|
|
1630
|
+
description: "Submit an activity for approval.",
|
|
1631
|
+
flags: [
|
|
1632
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1633
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID." },
|
|
1634
|
+
{ name: "reason", type: "string", required: false, desc: "Optional submit note." }
|
|
1635
|
+
],
|
|
1636
|
+
risk: "write",
|
|
1637
|
+
buildInput: (ctx) => ({
|
|
1638
|
+
project_id: ctx.num("project-id"),
|
|
1639
|
+
activity_id: ctx.str("activity-id"),
|
|
1640
|
+
reason: ctx.str("reason") || void 0
|
|
1641
|
+
})
|
|
1642
|
+
});
|
|
1643
|
+
|
|
1644
|
+
// src/commands/te-engage/engage-activity/approval/approve.ts
|
|
1645
|
+
var approvalApprove = createEngageActivityCapabilityCommand({
|
|
1646
|
+
resource: "approval",
|
|
1647
|
+
command: "approve",
|
|
1648
|
+
capabilityId: "engage-activity.approval.approve",
|
|
1649
|
+
description: "Approve an activity.",
|
|
1650
|
+
flags: [
|
|
1651
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1652
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID." },
|
|
1653
|
+
{ name: "reason", type: "string", required: false, desc: "Optional approval note." }
|
|
1654
|
+
],
|
|
1655
|
+
risk: "write",
|
|
1656
|
+
buildInput: (ctx) => ({
|
|
1657
|
+
project_id: ctx.num("project-id"),
|
|
1658
|
+
activity_id: ctx.str("activity-id"),
|
|
1659
|
+
reason: ctx.str("reason") || void 0
|
|
1660
|
+
})
|
|
1661
|
+
});
|
|
1662
|
+
|
|
1663
|
+
// src/commands/te-engage/engage-activity/approval/reject.ts
|
|
1664
|
+
var approvalReject = createEngageActivityCapabilityCommand({
|
|
1665
|
+
resource: "approval",
|
|
1666
|
+
command: "reject",
|
|
1667
|
+
capabilityId: "engage-activity.approval.reject",
|
|
1668
|
+
description: "Reject an activity with a reason.",
|
|
1669
|
+
flags: [
|
|
1670
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1671
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID." },
|
|
1672
|
+
{ name: "reason", type: "string", required: true, desc: "Reject reason (required, max 72 characters)." }
|
|
1673
|
+
],
|
|
1674
|
+
risk: "write",
|
|
1675
|
+
buildInput: (ctx) => ({
|
|
1676
|
+
project_id: ctx.num("project-id"),
|
|
1677
|
+
activity_id: ctx.str("activity-id"),
|
|
1678
|
+
reason: ctx.str("reason") || void 0
|
|
1679
|
+
})
|
|
1680
|
+
});
|
|
1681
|
+
|
|
1682
|
+
// src/commands/te-engage/engage-activity/approval/cancel.ts
|
|
1683
|
+
var approvalCancel = createEngageActivityCapabilityCommand({
|
|
1684
|
+
resource: "approval",
|
|
1685
|
+
command: "cancel",
|
|
1686
|
+
capabilityId: "engage-activity.approval.cancel",
|
|
1687
|
+
description: "Cancel/withdraw a submitted activity approval.",
|
|
1688
|
+
flags: [
|
|
1689
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1690
|
+
{ name: "activity-id", type: "string", required: true, desc: "Activity ID." },
|
|
1691
|
+
{ name: "reason", type: "string", required: false, desc: "Optional cancel note." }
|
|
1692
|
+
],
|
|
1693
|
+
risk: "write",
|
|
1694
|
+
buildInput: (ctx) => ({
|
|
1695
|
+
project_id: ctx.num("project-id"),
|
|
1696
|
+
activity_id: ctx.str("activity-id"),
|
|
1697
|
+
reason: ctx.str("reason") || void 0
|
|
1698
|
+
})
|
|
1699
|
+
});
|
|
1700
|
+
|
|
1701
|
+
// src/commands/te-engage/engage-activity/topic/remove-task.ts
|
|
1702
|
+
var topicRemoveTask = createEngageActivityCapabilityCommand({
|
|
1703
|
+
resource: "topic",
|
|
1704
|
+
command: "remove-task",
|
|
1705
|
+
capabilityId: "engage-activity.topic.remove-task",
|
|
1706
|
+
description: "Remove a task from its topic.",
|
|
1707
|
+
flags: [
|
|
1708
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1709
|
+
{ name: "task-id", type: "string", required: true, desc: "Task ID to remove from its topic." }
|
|
1710
|
+
],
|
|
1711
|
+
risk: "high-risk-write",
|
|
1712
|
+
buildInput: (ctx) => ({
|
|
1713
|
+
project_id: ctx.num("project-id"),
|
|
1714
|
+
task_id: ctx.str("task-id")
|
|
1715
|
+
})
|
|
1716
|
+
});
|
|
1717
|
+
|
|
1718
|
+
// src/commands/te-engage/engage-activity/topic/delete.ts
|
|
1719
|
+
var topicDelete = createEngageActivityCapabilityCommand({
|
|
1720
|
+
resource: "topic",
|
|
1721
|
+
command: "delete",
|
|
1722
|
+
capabilityId: "engage-activity.topic.delete",
|
|
1723
|
+
description: "Delete a topic.",
|
|
1724
|
+
flags: [
|
|
1725
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1726
|
+
{ name: "topic-id", type: "string", required: true, desc: "Topic ID to delete." }
|
|
1727
|
+
],
|
|
1728
|
+
risk: "high-risk-write",
|
|
1729
|
+
buildInput: (ctx) => ({
|
|
1730
|
+
project_id: ctx.num("project-id"),
|
|
1731
|
+
topic_id: ctx.str("topic-id")
|
|
1732
|
+
})
|
|
1733
|
+
});
|
|
1734
|
+
|
|
1735
|
+
// src/commands/te-engage/engage-activity/topic/get.ts
|
|
1736
|
+
var topicGet = createEngageActivityCapabilityCommand({
|
|
1737
|
+
resource: "topic",
|
|
1738
|
+
command: "get",
|
|
1739
|
+
capabilityId: "engage-activity.topic.get",
|
|
1740
|
+
description: "Get a topic detail (cluster, channel, trigger, frequency, tasks).",
|
|
1741
|
+
flags: [
|
|
1742
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1743
|
+
{ name: "topic-id", type: "string", required: true, desc: "Topic ID." }
|
|
1744
|
+
],
|
|
1745
|
+
risk: "read",
|
|
1746
|
+
buildInput: (ctx) => ({
|
|
1747
|
+
project_id: ctx.num("project-id"),
|
|
1748
|
+
topic_id: ctx.str("topic-id")
|
|
1749
|
+
})
|
|
1750
|
+
});
|
|
1751
|
+
|
|
1752
|
+
// src/commands/te-engage/engage-activity/topic/copy.ts
|
|
1753
|
+
var topicCopy = createEngageActivityCapabilityCommand({
|
|
1754
|
+
resource: "topic",
|
|
1755
|
+
command: "copy",
|
|
1756
|
+
capabilityId: "engage-activity.topic.copy",
|
|
1757
|
+
description: "Copy an existing topic (loads detail, renames, re-creates).",
|
|
1758
|
+
flags: [
|
|
1759
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1760
|
+
{ name: "topic-id", type: "string", required: true, desc: "Source topic ID to copy." },
|
|
1761
|
+
{ name: "new-name", type: "string", required: false, desc: "New topic name (defaults to source name + _copy)." }
|
|
1762
|
+
],
|
|
1763
|
+
risk: "write",
|
|
1764
|
+
buildInput: (ctx) => ({
|
|
1765
|
+
project_id: ctx.num("project-id"),
|
|
1766
|
+
topic_id: ctx.str("topic-id"),
|
|
1767
|
+
new_name: ctx.str("new-name") || void 0
|
|
1768
|
+
})
|
|
1769
|
+
});
|
|
1770
|
+
|
|
1771
|
+
// src/commands/te-engage/engage-activity/activity-type/list.ts
|
|
1772
|
+
var activityTypeList = createEngageActivityCapabilityCommand({
|
|
1773
|
+
resource: "activity-type",
|
|
1774
|
+
command: "list",
|
|
1775
|
+
capabilityId: "engage-activity.activity-type.list",
|
|
1776
|
+
description: "List available activity types (system + custom).",
|
|
1777
|
+
flags: [{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }],
|
|
1778
|
+
risk: "read",
|
|
1779
|
+
buildInput: (ctx) => ({
|
|
1780
|
+
project_id: ctx.num("project-id")
|
|
1781
|
+
})
|
|
1782
|
+
});
|
|
1783
|
+
|
|
1784
|
+
// src/commands/te-engage/engage-activity/activity-type/batch-add.ts
|
|
1785
|
+
var activityTypeBatchAdd = createEngageActivityCapabilityCommand({
|
|
1786
|
+
resource: "activity-type",
|
|
1787
|
+
command: "batch-add",
|
|
1788
|
+
capabilityId: "engage-activity.activity-type.batch-add",
|
|
1789
|
+
description: "Batch-add custom activity types (loops single add).",
|
|
1790
|
+
flags: [
|
|
1791
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1792
|
+
{ name: "type-names", type: "json", required: true, desc: "JSON array of custom activity type names." }
|
|
1793
|
+
],
|
|
1794
|
+
risk: "write",
|
|
1795
|
+
buildInput: (ctx) => ({
|
|
1796
|
+
project_id: ctx.num("project-id"),
|
|
1797
|
+
type_names: ctx.json("type-names")
|
|
1798
|
+
})
|
|
1799
|
+
});
|
|
1800
|
+
|
|
1801
|
+
// src/commands/te-engage/engage-activity/activity-type/update.ts
|
|
1802
|
+
var activityTypeUpdate = createEngageActivityCapabilityCommand({
|
|
1803
|
+
resource: "activity-type",
|
|
1804
|
+
command: "update",
|
|
1805
|
+
capabilityId: "engage-activity.activity-type.update",
|
|
1806
|
+
description: "Modify a custom activity type name.",
|
|
1807
|
+
flags: [
|
|
1808
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1809
|
+
{ name: "id", type: "string", required: true, desc: "Activity type ID to modify." },
|
|
1810
|
+
{ name: "type-name", type: "string", required: true, desc: "New activity type name (<=80 chars)." }
|
|
1811
|
+
],
|
|
1812
|
+
risk: "write",
|
|
1813
|
+
buildInput: (ctx) => ({
|
|
1814
|
+
project_id: ctx.num("project-id"),
|
|
1815
|
+
id: ctx.str("id"),
|
|
1816
|
+
type_name: ctx.str("type-name")
|
|
1817
|
+
})
|
|
1818
|
+
});
|
|
1819
|
+
|
|
1820
|
+
// src/commands/te-engage/engage-activity/activity-type/batch-delete.ts
|
|
1821
|
+
var activityTypeBatchDelete = createEngageActivityCapabilityCommand({
|
|
1822
|
+
resource: "activity-type",
|
|
1823
|
+
command: "batch-delete",
|
|
1824
|
+
capabilityId: "engage-activity.activity-type.batch-delete",
|
|
1825
|
+
description: "Batch-delete custom activity types (loops single delete).",
|
|
1826
|
+
flags: [
|
|
1827
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1828
|
+
{ name: "ids", type: "json", required: true, desc: "JSON array of activity type IDs to delete." }
|
|
1829
|
+
],
|
|
1830
|
+
risk: "high-risk-write",
|
|
1831
|
+
buildInput: (ctx) => ({
|
|
1832
|
+
project_id: ctx.num("project-id"),
|
|
1833
|
+
ids: ctx.json("ids")
|
|
1834
|
+
})
|
|
1835
|
+
});
|
|
1836
|
+
|
|
1837
|
+
// src/commands/te-engage/engage-activity/task/get.ts
|
|
1838
|
+
var taskGet = createEngageActivityCapabilityCommand({
|
|
1839
|
+
resource: "task",
|
|
1840
|
+
command: "get",
|
|
1841
|
+
capabilityId: "engage-activity.task.get",
|
|
1842
|
+
description: "Get a standalone task detail (config and status).",
|
|
1843
|
+
flags: [
|
|
1844
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1845
|
+
{ name: "task-id", type: "string", required: true, desc: "Task ID." }
|
|
1846
|
+
],
|
|
1847
|
+
risk: "read",
|
|
1848
|
+
buildInput: (ctx) => ({
|
|
1849
|
+
project_id: ctx.num("project-id"),
|
|
1850
|
+
task_id: ctx.str("task-id")
|
|
1851
|
+
})
|
|
1852
|
+
});
|
|
1853
|
+
|
|
1854
|
+
// src/commands/te-engage/engage-activity/task/copy.ts
|
|
1855
|
+
var taskCopy = createEngageActivityCapabilityCommand({
|
|
1856
|
+
resource: "task",
|
|
1857
|
+
command: "copy",
|
|
1858
|
+
capabilityId: "engage-activity.task.copy",
|
|
1859
|
+
description: "Copy an existing standalone task (loads detail, renames, re-creates).",
|
|
1860
|
+
flags: [
|
|
1861
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1862
|
+
{ name: "task-id", type: "string", required: true, desc: "Source task ID to copy." },
|
|
1863
|
+
{ name: "new-name", type: "string", required: false, desc: "New task name (defaults to source name + _copy)." }
|
|
1864
|
+
],
|
|
1865
|
+
risk: "write",
|
|
1866
|
+
buildInput: (ctx) => ({
|
|
1867
|
+
project_id: ctx.num("project-id"),
|
|
1868
|
+
task_id: ctx.str("task-id"),
|
|
1869
|
+
new_name: ctx.str("new-name") || void 0
|
|
1870
|
+
})
|
|
1871
|
+
});
|
|
1872
|
+
|
|
1873
|
+
// src/commands/te-engage/engage-activity/index.ts
|
|
1874
|
+
var commands4 = [
|
|
1875
|
+
activityCreate,
|
|
1876
|
+
activityUpdate,
|
|
1877
|
+
activityDelete,
|
|
1878
|
+
activityList,
|
|
1879
|
+
activityGet,
|
|
1880
|
+
activityPause,
|
|
1881
|
+
activityEnd,
|
|
1882
|
+
activityStats,
|
|
1883
|
+
activityInfoList,
|
|
1884
|
+
approvalSubmit,
|
|
1885
|
+
approvalApprove,
|
|
1886
|
+
approvalReject,
|
|
1887
|
+
approvalCancel,
|
|
1888
|
+
// topicCreate, // temporarily disabled: ae-cli engage-activity topic create
|
|
1889
|
+
// topicUpdate, // temporarily disabled: ae-cli engage-activity topic update
|
|
1890
|
+
topicRemoveTask,
|
|
1891
|
+
topicDelete,
|
|
1892
|
+
topicGet,
|
|
1893
|
+
topicCopy,
|
|
1894
|
+
activityTypeList,
|
|
1895
|
+
activityTypeBatchAdd,
|
|
1896
|
+
activityTypeUpdate,
|
|
1897
|
+
activityTypeBatchDelete,
|
|
1898
|
+
taskGet,
|
|
1899
|
+
// taskCreate, // temporarily disabled: ae-cli engage-activity task create
|
|
1900
|
+
// taskUpdate, // temporarily disabled: ae-cli engage-activity task update
|
|
1901
|
+
taskCopy
|
|
1902
|
+
];
|
|
1903
|
+
var engage_activity_default = commands4;
|
|
1904
|
+
|
|
1905
|
+
// src/commands/te-engage/engage-workbench/workbench/list.ts
|
|
1906
|
+
var workbenchList = createEngageWorkbenchCapabilityCommand({
|
|
1907
|
+
resource: "workbench",
|
|
1908
|
+
command: "list",
|
|
1909
|
+
capabilityId: "engage-workbench.workbench.list",
|
|
1910
|
+
description: "List the current user's workbench metric slots (auto-initialised with 4 defaults on first access).",
|
|
1911
|
+
flags: [
|
|
1912
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
1913
|
+
],
|
|
1914
|
+
risk: "read",
|
|
1915
|
+
buildInput: (ctx) => ({
|
|
1916
|
+
project_id: ctx.num("project-id")
|
|
1917
|
+
})
|
|
1918
|
+
});
|
|
1919
|
+
|
|
1920
|
+
// src/commands/te-engage/engage-workbench/workbench/add.ts
|
|
1921
|
+
var workbenchAdd = createEngageWorkbenchCapabilityCommand({
|
|
1922
|
+
resource: "workbench",
|
|
1923
|
+
command: "add",
|
|
1924
|
+
capabilityId: "engage-workbench.workbench.add",
|
|
1925
|
+
description: "Add a workbench metric slot (metric + date range + order) for the current user.",
|
|
1926
|
+
flags: [
|
|
1927
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1928
|
+
{ name: "metric-type", type: "number", required: true, desc: "Metric type code (WorkbenchSlotMetricTypeEnum, 1-12)." },
|
|
1929
|
+
{ name: "date-type", type: "number", required: true, desc: "Date type code (WorkbenchSlotDateTypeEnum, 1-13)." },
|
|
1930
|
+
{ name: "order-id", type: "number", required: false, desc: "Display order (1-4)." }
|
|
1931
|
+
],
|
|
1932
|
+
risk: "write",
|
|
1933
|
+
buildInput: (ctx) => ({
|
|
1934
|
+
project_id: ctx.num("project-id"),
|
|
1935
|
+
metric_type: ctx.num("metric-type"),
|
|
1936
|
+
date_type: ctx.num("date-type"),
|
|
1937
|
+
order_id: ctx.optionalNum("order-id")
|
|
1938
|
+
})
|
|
1939
|
+
});
|
|
1940
|
+
|
|
1941
|
+
// src/commands/te-engage/engage-workbench/workbench/update.ts
|
|
1942
|
+
var workbenchUpdate = createEngageWorkbenchCapabilityCommand({
|
|
1943
|
+
resource: "workbench",
|
|
1944
|
+
command: "update",
|
|
1945
|
+
capabilityId: "engage-workbench.workbench.update",
|
|
1946
|
+
description: "Update a workbench metric slot's metric, date range or order (own slot only).",
|
|
1947
|
+
flags: [
|
|
1948
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1949
|
+
{ name: "slot-id", type: "string", required: true, desc: "Slot ID to update." },
|
|
1950
|
+
{ name: "metric-type", type: "number", required: true, desc: "Metric type code (WorkbenchSlotMetricTypeEnum, 1-12)." },
|
|
1951
|
+
{ name: "date-type", type: "number", required: true, desc: "Date type code (WorkbenchSlotDateTypeEnum, 1-13)." },
|
|
1952
|
+
{ name: "order-id", type: "number", required: false, desc: "Display order (1-4)." }
|
|
1953
|
+
],
|
|
1954
|
+
risk: "write",
|
|
1955
|
+
buildInput: (ctx) => ({
|
|
1956
|
+
project_id: ctx.num("project-id"),
|
|
1957
|
+
slot_id: ctx.str("slot-id"),
|
|
1958
|
+
metric_type: ctx.num("metric-type"),
|
|
1959
|
+
date_type: ctx.num("date-type"),
|
|
1960
|
+
order_id: ctx.optionalNum("order-id")
|
|
1961
|
+
})
|
|
1962
|
+
});
|
|
1963
|
+
|
|
1964
|
+
// src/commands/te-engage/engage-workbench/workbench/delete.ts
|
|
1965
|
+
var workbenchDelete = createEngageWorkbenchCapabilityCommand({
|
|
1966
|
+
resource: "workbench",
|
|
1967
|
+
command: "delete",
|
|
1968
|
+
capabilityId: "engage-workbench.workbench.delete",
|
|
1969
|
+
description: "Soft-delete a workbench metric slot (own slot only).",
|
|
1970
|
+
flags: [
|
|
1971
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1972
|
+
{ name: "slot-id", type: "string", required: true, desc: "Slot ID to delete." }
|
|
1973
|
+
],
|
|
1974
|
+
risk: "high-risk-write",
|
|
1975
|
+
buildInput: (ctx) => ({
|
|
1976
|
+
project_id: ctx.num("project-id"),
|
|
1977
|
+
slot_id: ctx.str("slot-id")
|
|
1978
|
+
})
|
|
1979
|
+
});
|
|
1980
|
+
|
|
1981
|
+
// src/commands/te-engage/engage-workbench/index.ts
|
|
1982
|
+
var commands5 = [
|
|
1983
|
+
workbenchList,
|
|
1984
|
+
workbenchAdd,
|
|
1985
|
+
workbenchUpdate,
|
|
1986
|
+
workbenchDelete
|
|
1987
|
+
];
|
|
1988
|
+
var engage_workbench_default = commands5;
|
|
1989
|
+
|
|
1990
|
+
// src/commands/te-engage/engage-task/channel-ref/stats.ts
|
|
1991
|
+
var channelRefStats = createEngageTaskCapabilityCommand({
|
|
1992
|
+
resource: "channel-ref",
|
|
1993
|
+
command: "stats",
|
|
1994
|
+
capabilityId: "engage-task.channel-ref.stats",
|
|
1995
|
+
description: "Query engagement-task reference counts for a channel.",
|
|
1996
|
+
flags: [
|
|
1997
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
1998
|
+
{ name: "channel-id", type: "string", required: true, desc: "Channel ID." }
|
|
1999
|
+
],
|
|
2000
|
+
risk: "read",
|
|
2001
|
+
buildInput: (ctx) => ({
|
|
2002
|
+
project_id: ctx.num("project-id"),
|
|
2003
|
+
channel_id: ctx.str("channel-id")
|
|
2004
|
+
})
|
|
2005
|
+
});
|
|
2006
|
+
|
|
2007
|
+
// src/commands/te-engage/engage-task/group/create.ts
|
|
2008
|
+
var groupCreate = createEngageTaskCapabilityCommand({
|
|
2009
|
+
resource: "group",
|
|
2010
|
+
command: "create",
|
|
2011
|
+
capabilityId: "engage-task.group.create",
|
|
2012
|
+
description: "Create a task group.",
|
|
2013
|
+
flags: [
|
|
2014
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2015
|
+
{ name: "group-name", type: "string", required: true, desc: "Task group name." }
|
|
2016
|
+
],
|
|
2017
|
+
risk: "write",
|
|
2018
|
+
buildInput: (ctx) => ({
|
|
2019
|
+
project_id: ctx.num("project-id"),
|
|
2020
|
+
group_name: ctx.str("group-name")
|
|
2021
|
+
})
|
|
2022
|
+
});
|
|
2023
|
+
|
|
2024
|
+
// src/commands/te-engage/engage-task/group/delete.ts
|
|
2025
|
+
var groupDelete = createEngageTaskCapabilityCommand({
|
|
2026
|
+
resource: "group",
|
|
2027
|
+
command: "delete",
|
|
2028
|
+
capabilityId: "engage-task.group.delete",
|
|
2029
|
+
description: "Delete one or more task groups.",
|
|
2030
|
+
flags: [
|
|
2031
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2032
|
+
{
|
|
2033
|
+
name: "group-ids",
|
|
2034
|
+
type: "json",
|
|
2035
|
+
required: true,
|
|
2036
|
+
desc: `JSON array of task group IDs to delete, e.g. '["1","2"]'.`
|
|
2037
|
+
}
|
|
2038
|
+
],
|
|
2039
|
+
risk: "high-risk-write",
|
|
2040
|
+
buildInput: (ctx) => ({
|
|
2041
|
+
project_id: ctx.num("project-id"),
|
|
2042
|
+
group_ids: ctx.json("group-ids")
|
|
2043
|
+
})
|
|
2044
|
+
});
|
|
2045
|
+
|
|
2046
|
+
// src/commands/te-engage/engage-task/group/list.ts
|
|
2047
|
+
var groupList = createEngageTaskCapabilityCommand({
|
|
2048
|
+
resource: "group",
|
|
2049
|
+
command: "list",
|
|
2050
|
+
capabilityId: "engage-task.group.list",
|
|
2051
|
+
description: "List task groups in a project.",
|
|
2052
|
+
flags: [
|
|
2053
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }
|
|
2054
|
+
],
|
|
2055
|
+
risk: "read",
|
|
2056
|
+
buildInput: (ctx) => ({
|
|
2057
|
+
project_id: ctx.num("project-id")
|
|
2058
|
+
})
|
|
2059
|
+
});
|
|
2060
|
+
|
|
2061
|
+
// src/commands/te-engage/engage-task/group/update.ts
|
|
2062
|
+
var groupUpdate = createEngageTaskCapabilityCommand({
|
|
2063
|
+
resource: "group",
|
|
2064
|
+
command: "update",
|
|
2065
|
+
capabilityId: "engage-task.group.update",
|
|
2066
|
+
description: "Rename a task group.",
|
|
2067
|
+
flags: [
|
|
2068
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2069
|
+
{ name: "group-id", type: "number", required: true, desc: "Task group ID." },
|
|
2070
|
+
{ name: "group-name", type: "string", required: true, desc: "New task group name." }
|
|
2071
|
+
],
|
|
2072
|
+
risk: "write",
|
|
2073
|
+
buildInput: (ctx) => ({
|
|
2074
|
+
project_id: ctx.num("project-id"),
|
|
2075
|
+
group_id: ctx.num("group-id"),
|
|
2076
|
+
group_name: ctx.str("group-name")
|
|
2077
|
+
})
|
|
2078
|
+
});
|
|
2079
|
+
|
|
2080
|
+
// src/commands/te-engage/engage-task/metric/list.ts
|
|
2081
|
+
var metricList = createEngageTaskCapabilityCommand({
|
|
2082
|
+
resource: "metric",
|
|
2083
|
+
command: "list",
|
|
2084
|
+
capabilityId: "engage-task.metric.list",
|
|
2085
|
+
description: "List metric settings configured for an engagement task.",
|
|
2086
|
+
flags: [
|
|
2087
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2088
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." }
|
|
2089
|
+
],
|
|
2090
|
+
risk: "read",
|
|
2091
|
+
buildInput: (ctx) => ({
|
|
2092
|
+
project_id: ctx.num("project-id"),
|
|
2093
|
+
task_id: ctx.str("task-id")
|
|
2094
|
+
})
|
|
2095
|
+
});
|
|
2096
|
+
|
|
2097
|
+
// src/commands/te-engage/engage-task/metric/update.ts
|
|
2098
|
+
var metricUpdate = createEngageTaskCapabilityCommand({
|
|
2099
|
+
resource: "metric",
|
|
2100
|
+
command: "update",
|
|
2101
|
+
capabilityId: "engage-task.metric.update",
|
|
2102
|
+
description: "Update metric settings for an engagement task.",
|
|
2103
|
+
flags: [
|
|
2104
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2105
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
2106
|
+
{
|
|
2107
|
+
name: "metric-map",
|
|
2108
|
+
type: "json",
|
|
2109
|
+
required: true,
|
|
2110
|
+
desc: "Metric configuration map keyed by metric group."
|
|
2111
|
+
}
|
|
2112
|
+
],
|
|
2113
|
+
risk: "write",
|
|
2114
|
+
buildInput: (ctx) => ({
|
|
2115
|
+
project_id: ctx.num("project-id"),
|
|
2116
|
+
task_id: ctx.str("task-id"),
|
|
2117
|
+
metric_map: ctx.json("metric-map")
|
|
2118
|
+
})
|
|
2119
|
+
});
|
|
2120
|
+
|
|
2121
|
+
// src/commands/te-engage/engage-task/operation-log/query.ts
|
|
2122
|
+
var operationLogQuery2 = createEngageTaskCapabilityCommand({
|
|
2123
|
+
resource: "operation-log",
|
|
2124
|
+
command: "query",
|
|
2125
|
+
capabilityId: "engage-task.operation-log.query",
|
|
2126
|
+
description: "Query task operation records and runtime logs for creation, changes, approval, sending, pauses, and completion.",
|
|
2127
|
+
flags: [
|
|
2128
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2129
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." }
|
|
2130
|
+
],
|
|
2131
|
+
risk: "read",
|
|
2132
|
+
buildInput: (ctx) => ({ project_id: ctx.num("project-id"), task_id: ctx.str("task-id") })
|
|
2133
|
+
});
|
|
2134
|
+
|
|
2135
|
+
// src/commands/te-engage/engage-task/push-record/query.ts
|
|
2136
|
+
var ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
2137
|
+
var pushRecordQuery = createEngageTaskCapabilityCommand({
|
|
2138
|
+
resource: "push-record",
|
|
2139
|
+
command: "query",
|
|
2140
|
+
capabilityId: "engage-task.push-record.query",
|
|
2141
|
+
description: "Query task delivery and push records, including trigger, send, success, and failure details.",
|
|
2142
|
+
flags: [
|
|
2143
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2144
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
2145
|
+
{ name: "page-num", type: "number", required: false, desc: "Page number for scheduled tasks. Defaults to 1." },
|
|
2146
|
+
{ name: "page-size", type: "number", required: false, desc: "Page size for scheduled tasks. Defaults to 20." },
|
|
2147
|
+
{
|
|
2148
|
+
name: "start-date",
|
|
2149
|
+
type: "string",
|
|
2150
|
+
required: false,
|
|
2151
|
+
desc: "Optional start date in yyyy-MM-dd format. Must not be after --end-date."
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
name: "end-date",
|
|
2155
|
+
type: "string",
|
|
2156
|
+
required: false,
|
|
2157
|
+
desc: "Optional end date in yyyy-MM-dd format. Must not be before --start-date."
|
|
2158
|
+
}
|
|
2159
|
+
],
|
|
2160
|
+
risk: "read",
|
|
2161
|
+
validate: (ctx) => {
|
|
2162
|
+
const startDate = ctx.str("start-date");
|
|
2163
|
+
const endDate = ctx.str("end-date");
|
|
2164
|
+
if (startDate && !ISO_DATE.test(startDate)) {
|
|
2165
|
+
printError("validation", "--start-date must be in yyyy-MM-dd format");
|
|
2166
|
+
process.exit(1);
|
|
2167
|
+
}
|
|
2168
|
+
if (endDate && !ISO_DATE.test(endDate)) {
|
|
2169
|
+
printError("validation", "--end-date must be in yyyy-MM-dd format");
|
|
2170
|
+
process.exit(1);
|
|
2171
|
+
}
|
|
2172
|
+
if (startDate && endDate && startDate > endDate) {
|
|
2173
|
+
printError("validation", "--start-date must not be after --end-date");
|
|
2174
|
+
process.exit(1);
|
|
2175
|
+
}
|
|
2176
|
+
},
|
|
2177
|
+
buildInput: (ctx) => ({
|
|
2178
|
+
project_id: ctx.num("project-id"),
|
|
2179
|
+
task_id: ctx.str("task-id"),
|
|
2180
|
+
page_num: ctx.optionalNum("page-num"),
|
|
2181
|
+
page_size: ctx.optionalNum("page-size"),
|
|
2182
|
+
start_date: ctx.str("start-date") || void 0,
|
|
2183
|
+
end_date: ctx.str("end-date") || void 0
|
|
2184
|
+
})
|
|
2185
|
+
});
|
|
2186
|
+
|
|
2187
|
+
// src/commands/te-engage/engage-task/race/release.ts
|
|
2188
|
+
var raceRelease = createEngageTaskCapabilityCommand({
|
|
2189
|
+
resource: "race",
|
|
2190
|
+
command: "release",
|
|
2191
|
+
capabilityId: "engage-task.race.release",
|
|
2192
|
+
description: "Manually release a race experiment group for an engagement task.",
|
|
2193
|
+
flags: [
|
|
2194
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2195
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
2196
|
+
{ name: "exp-group-id", type: "string", required: true, desc: "Race experiment group ID to release." }
|
|
2197
|
+
],
|
|
2198
|
+
risk: "write",
|
|
2199
|
+
buildInput: (ctx) => ({
|
|
2200
|
+
project_id: ctx.num("project-id"),
|
|
2201
|
+
task_id: ctx.str("task-id"),
|
|
2202
|
+
exp_group_id: ctx.str("exp-group-id")
|
|
2203
|
+
})
|
|
2204
|
+
});
|
|
2205
|
+
|
|
2206
|
+
// src/commands/te-engage/engage-task/segment-list/get.ts
|
|
2207
|
+
var segmentListGet = createEngageTaskCapabilityCommand({
|
|
2208
|
+
resource: "segment-list",
|
|
2209
|
+
command: "get",
|
|
2210
|
+
capabilityId: "engage-task.segment-list.get",
|
|
2211
|
+
description: "Get one segment associated with an engagement task by cluster ID.",
|
|
2212
|
+
flags: [
|
|
2213
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2214
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
2215
|
+
{ name: "cluster-id", type: "string", required: true, desc: "Segment cluster ID." }
|
|
2216
|
+
],
|
|
2217
|
+
risk: "read",
|
|
2218
|
+
buildInput: (ctx) => ({
|
|
2219
|
+
project_id: ctx.num("project-id"),
|
|
2220
|
+
task_id: ctx.str("task-id"),
|
|
2221
|
+
cluster_id: ctx.str("cluster-id")
|
|
2222
|
+
})
|
|
2223
|
+
});
|
|
2224
|
+
|
|
2225
|
+
// src/commands/te-engage/engage-task/segment-list/query.ts
|
|
2226
|
+
var segmentListQuery = createEngageTaskCapabilityCommand({
|
|
2227
|
+
resource: "segment-list",
|
|
2228
|
+
command: "query",
|
|
2229
|
+
capabilityId: "engage-task.segment-list.query",
|
|
2230
|
+
description: "Query segments created from or associated with an engagement task.",
|
|
2231
|
+
flags: [
|
|
2232
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2233
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." }
|
|
2234
|
+
],
|
|
2235
|
+
risk: "read",
|
|
2236
|
+
buildInput: (ctx) => ({
|
|
2237
|
+
project_id: ctx.num("project-id"),
|
|
2238
|
+
task_id: ctx.str("task-id")
|
|
2239
|
+
})
|
|
2240
|
+
});
|
|
2241
|
+
|
|
2242
|
+
// src/commands/te-engage/engage-task/segment-list/rename.ts
|
|
2243
|
+
var segmentListRename = createEngageTaskCapabilityCommand({
|
|
2244
|
+
resource: "segment-list",
|
|
2245
|
+
command: "rename",
|
|
2246
|
+
capabilityId: "engage-task.segment-list.rename",
|
|
2247
|
+
description: "Rename the display name of a task-associated segment.",
|
|
2248
|
+
flags: [
|
|
2249
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2250
|
+
{ name: "cluster-id", type: "string", required: true, desc: "Segment cluster ID." },
|
|
2251
|
+
{ name: "display-name", type: "string", required: true, desc: "New segment display name." }
|
|
2252
|
+
],
|
|
2253
|
+
risk: "write",
|
|
2254
|
+
buildInput: (ctx) => ({
|
|
2255
|
+
project_id: ctx.num("project-id"),
|
|
2256
|
+
cluster_id: ctx.str("cluster-id"),
|
|
2257
|
+
display_name: ctx.str("display-name")
|
|
2258
|
+
})
|
|
2259
|
+
});
|
|
2260
|
+
|
|
2261
|
+
// src/commands/te-engage/engage-task/segment-list/set-visibility.ts
|
|
2262
|
+
var segmentListSetVisibility = createEngageTaskCapabilityCommand({
|
|
2263
|
+
resource: "segment-list",
|
|
2264
|
+
command: "set-visibility",
|
|
2265
|
+
capabilityId: "engage-task.segment-list.set-visibility",
|
|
2266
|
+
description: "Set analysis visibility for a task-associated segment.",
|
|
2267
|
+
flags: [
|
|
2268
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2269
|
+
{ name: "cluster-id", type: "string", required: true, desc: "Segment cluster ID." },
|
|
2270
|
+
{
|
|
2271
|
+
name: "analysis-visible",
|
|
2272
|
+
type: "boolean",
|
|
2273
|
+
required: true,
|
|
2274
|
+
desc: "Whether the segment is visible in analysis."
|
|
2275
|
+
}
|
|
2276
|
+
],
|
|
2277
|
+
risk: "write",
|
|
2278
|
+
buildInput: (ctx) => ({
|
|
2279
|
+
project_id: ctx.num("project-id"),
|
|
2280
|
+
cluster_id: ctx.str("cluster-id"),
|
|
2281
|
+
analysis_visible: ctx.bool("analysis-visible")
|
|
2282
|
+
})
|
|
2283
|
+
});
|
|
2284
|
+
|
|
2285
|
+
// src/commands/te-engage/engage-task/task/delete.ts
|
|
2286
|
+
var taskDelete = createEngageTaskCapabilityCommand({
|
|
2287
|
+
resource: "task",
|
|
2288
|
+
command: "delete",
|
|
2289
|
+
capabilityId: "engage-task.task.delete",
|
|
2290
|
+
description: "Delete an engagement task.",
|
|
2291
|
+
flags: [
|
|
2292
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2293
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." }
|
|
2294
|
+
],
|
|
2295
|
+
risk: "high-risk-write",
|
|
2296
|
+
buildInput: (ctx) => ({
|
|
2297
|
+
project_id: ctx.num("project-id"),
|
|
2298
|
+
task_id: ctx.str("task-id")
|
|
2299
|
+
})
|
|
2300
|
+
});
|
|
2301
|
+
|
|
2302
|
+
// src/commands/te-engage/engage-task/task/modify-group.ts
|
|
2303
|
+
var taskModifyGroup = createEngageTaskCapabilityCommand({
|
|
2304
|
+
resource: "task",
|
|
2305
|
+
command: "modify-group",
|
|
2306
|
+
capabilityId: "engage-task.task.modify-group",
|
|
2307
|
+
description: "Change the group assignment of an engagement task.",
|
|
2308
|
+
flags: [
|
|
2309
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
2310
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
2311
|
+
{
|
|
2312
|
+
name: "group-id",
|
|
2313
|
+
type: "number",
|
|
2314
|
+
required: true,
|
|
2315
|
+
desc: "Task group ID. Use 0 for the default group."
|
|
2316
|
+
}
|
|
2317
|
+
],
|
|
2318
|
+
risk: "write",
|
|
2319
|
+
buildInput: (ctx) => ({
|
|
2320
|
+
project_id: ctx.num("project-id"),
|
|
2321
|
+
task_id: ctx.str("task-id"),
|
|
2322
|
+
group_id: ctx.num("group-id")
|
|
2323
|
+
})
|
|
2324
|
+
});
|
|
2325
|
+
|
|
2326
|
+
// src/commands/te-engage/engage-task/index.ts
|
|
2327
|
+
var commands6 = [
|
|
2328
|
+
channelRefStats,
|
|
2329
|
+
groupCreate,
|
|
2330
|
+
groupDelete,
|
|
2331
|
+
groupList,
|
|
2332
|
+
groupUpdate,
|
|
2333
|
+
metricList,
|
|
2334
|
+
metricUpdate,
|
|
2335
|
+
operationLogQuery2,
|
|
2336
|
+
pushRecordQuery,
|
|
2337
|
+
raceRelease,
|
|
2338
|
+
segmentListGet,
|
|
2339
|
+
segmentListQuery,
|
|
2340
|
+
segmentListRename,
|
|
2341
|
+
segmentListSetVisibility,
|
|
2342
|
+
taskDelete,
|
|
2343
|
+
taskModifyGroup
|
|
2344
|
+
// taskSubmitApproval,
|
|
2345
|
+
];
|
|
2346
|
+
var engage_task_default = commands6;
|
|
2347
|
+
|
|
2348
|
+
// src/commands/te-engage/utils.ts
|
|
2349
|
+
function buildMcpDryRun(ctx, serviceName46, toolName46, args) {
|
|
2350
|
+
const host = ctx.host();
|
|
2351
|
+
return {
|
|
2352
|
+
method: "MCP tools/call",
|
|
2353
|
+
url: resolveMcpUrl(ctx.mcpUrl(), host, serviceName46),
|
|
2354
|
+
body: {
|
|
2355
|
+
serviceName: serviceName46,
|
|
2356
|
+
toolName: toolName46,
|
|
2357
|
+
arguments: args
|
|
2358
|
+
}
|
|
2359
|
+
};
|
|
2360
|
+
}
|
|
2361
|
+
async function executeMcpCommand(ctx, serviceName46, toolName46, args) {
|
|
2362
|
+
const host = ctx.host();
|
|
2363
|
+
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, serviceName46);
|
|
2364
|
+
const result = await callMcpTool(mcpUrl, toolName46, args, host);
|
|
2365
|
+
return parseMcpResult(result);
|
|
2366
|
+
}
|
|
2367
|
+
function hasFlag(ctx, name) {
|
|
2368
|
+
return ctx.str(name) !== "";
|
|
2369
|
+
}
|
|
2370
|
+
function readOptionalString(ctx, name) {
|
|
2371
|
+
const value = ctx.str(name);
|
|
2372
|
+
return value === "" ? void 0 : value;
|
|
2373
|
+
}
|
|
2374
|
+
function readOptionalNumber(ctx, name) {
|
|
2375
|
+
return hasFlag(ctx, name) ? ctx.num(name) : void 0;
|
|
2376
|
+
}
|
|
2377
|
+
function readOptionalBoolean(ctx, name) {
|
|
2378
|
+
return hasFlag(ctx, name) ? ctx.bool(name) : void 0;
|
|
2379
|
+
}
|
|
2380
|
+
function readOptionalJsonArray(ctx, name) {
|
|
2381
|
+
const value = ctx.json(name);
|
|
2382
|
+
if (value === void 0) return void 0;
|
|
2383
|
+
if (!Array.isArray(value)) {
|
|
2384
|
+
throw new Error(`Flag --${name} must be a JSON array`);
|
|
2385
|
+
}
|
|
2386
|
+
return value;
|
|
2387
|
+
}
|
|
2388
|
+
function readRequiredJsonArray(ctx, name, minLength = 1) {
|
|
2389
|
+
const value = readOptionalJsonArray(ctx, name);
|
|
2390
|
+
if (!value || value.length < minLength) {
|
|
2391
|
+
throw new Error(`Flag --${name} must be a JSON array with at least ${minLength} item(s)`);
|
|
2392
|
+
}
|
|
2393
|
+
return value;
|
|
2394
|
+
}
|
|
2395
|
+
function readRequiredJsonObject(ctx, name) {
|
|
2396
|
+
const value = ctx.json(name);
|
|
2397
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
2398
|
+
throw new Error(`Flag --${name} must be a JSON object`);
|
|
2399
|
+
}
|
|
2400
|
+
return value;
|
|
2401
|
+
}
|
|
2402
|
+
function requireOneOfFlags(ctx, names) {
|
|
2403
|
+
if (!names.some((name) => hasFlag(ctx, name))) {
|
|
2404
|
+
throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
function requireAnyFlag(ctx, names) {
|
|
2408
|
+
if (!names.some((name) => hasFlag(ctx, name))) {
|
|
2409
|
+
throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
function requireAllowedValue(value, allowed, flagName) {
|
|
2413
|
+
if (!allowed.includes(value)) {
|
|
2414
|
+
throw new Error(`Flag --${flagName} must be one of: ${allowed.join(", ")}`);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
// src/commands/te-engage/config/config-item-analysis-report.ts
|
|
2419
|
+
var serviceName = "engage_config";
|
|
2420
|
+
var toolName = "query_config_item_analysis_report";
|
|
2421
|
+
function buildArgs(ctx) {
|
|
2422
|
+
const args = {
|
|
2423
|
+
projectId: ctx.num("project_id"),
|
|
2424
|
+
configId: ctx.str("config_id"),
|
|
2425
|
+
startTime: ctx.str("start_time"),
|
|
2426
|
+
endTime: ctx.str("end_time")
|
|
2427
|
+
};
|
|
2428
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2429
|
+
if (requestId) args.requestId = requestId;
|
|
2430
|
+
const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
|
|
2431
|
+
if (templateIdList !== void 0) args.templateIdList = templateIdList;
|
|
2432
|
+
const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
|
|
2433
|
+
if (strategyIdList !== void 0) args.strategyIdList = strategyIdList;
|
|
2434
|
+
const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
|
|
2435
|
+
if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
|
|
2436
|
+
return args;
|
|
2437
|
+
}
|
|
2438
|
+
var configItemAnalysisReport = {
|
|
2439
|
+
service: "engage",
|
|
2440
|
+
command: "+config_item_analysis_report",
|
|
2441
|
+
description: "Query the analysis report for a config item.",
|
|
2442
|
+
flags: [
|
|
2443
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2444
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" },
|
|
2445
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
2446
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
2447
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
2448
|
+
{ name: "template_id_list", type: "json", required: false, desc: "Template ID list as JSON array" },
|
|
2449
|
+
{ name: "strategy_id_list", type: "json", required: false, desc: "Strategy ID list as JSON array" },
|
|
2450
|
+
{ name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" }
|
|
2451
|
+
],
|
|
2452
|
+
risk: "read",
|
|
2453
|
+
validate: (ctx) => {
|
|
2454
|
+
const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
|
|
2455
|
+
const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
|
|
2456
|
+
if (templateIdList && strategyIdList) {
|
|
2457
|
+
throw new Error("Flags --template_id_list and --strategy_id_list cannot be used together");
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName, toolName, buildArgs(ctx)),
|
|
2461
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName, toolName, buildArgs(ctx))
|
|
2462
|
+
};
|
|
2463
|
+
|
|
2464
|
+
// src/commands/te-engage/config/config-item-detail.ts
|
|
2465
|
+
var serviceName2 = "engage_config";
|
|
2466
|
+
var toolName2 = "query_config_item_detail";
|
|
2467
|
+
function buildArgs2(ctx) {
|
|
2468
|
+
return {
|
|
2469
|
+
projectId: ctx.num("project_id"),
|
|
2470
|
+
configId: ctx.str("config_id")
|
|
2471
|
+
};
|
|
2472
|
+
}
|
|
2473
|
+
var configItemDetail = {
|
|
2474
|
+
service: "engage",
|
|
2475
|
+
command: "+config_item_detail",
|
|
2476
|
+
description: "Get config item detail.",
|
|
2477
|
+
flags: [
|
|
2478
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2479
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" }
|
|
2480
|
+
],
|
|
2481
|
+
risk: "read",
|
|
2482
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName2, toolName2, buildArgs2(ctx)),
|
|
2483
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName2, toolName2, buildArgs2(ctx))
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2486
|
+
// src/commands/te-engage/config/config-item-list.ts
|
|
2487
|
+
var serviceName3 = "engage_config";
|
|
2488
|
+
var toolName3 = "query_config_item_list";
|
|
2489
|
+
function buildArgs3(ctx) {
|
|
2490
|
+
return { projectId: ctx.num("project_id") };
|
|
2491
|
+
}
|
|
2492
|
+
var configItemList2 = {
|
|
2493
|
+
service: "engage",
|
|
2494
|
+
command: "+config_item_list",
|
|
2495
|
+
description: "List config items for a project.",
|
|
2496
|
+
flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
|
|
2497
|
+
risk: "read",
|
|
2498
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName3, toolName3, buildArgs3(ctx)),
|
|
2499
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName3, toolName3, buildArgs3(ctx))
|
|
2500
|
+
};
|
|
2501
|
+
|
|
2502
|
+
// src/commands/te-engage/config/config-item-strategy-comparison.ts
|
|
2503
|
+
var serviceName4 = "engage_config";
|
|
2504
|
+
var toolName4 = "query_config_item_strategy_comparison";
|
|
2505
|
+
function buildArgs4(ctx) {
|
|
2506
|
+
const args = {
|
|
2507
|
+
projectId: ctx.num("project_id"),
|
|
2508
|
+
configId: ctx.str("config_id"),
|
|
2509
|
+
strategyIdList: readRequiredJsonArray(ctx, "strategy_id_list", 2)
|
|
2510
|
+
};
|
|
2511
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2512
|
+
if (requestId) args.requestId = requestId;
|
|
2513
|
+
const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
|
|
2514
|
+
if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
|
|
2515
|
+
return args;
|
|
2516
|
+
}
|
|
2517
|
+
var configItemStrategyComparison = {
|
|
2518
|
+
service: "engage",
|
|
2519
|
+
command: "+config_item_strategy_comparison",
|
|
2520
|
+
description: "Compare multiple strategies under one config item.",
|
|
2521
|
+
flags: [
|
|
2522
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2523
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" },
|
|
2524
|
+
{ name: "strategy_id_list", type: "json", required: true, desc: "Strategy ID list as JSON array" },
|
|
2525
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
2526
|
+
{ name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" }
|
|
2527
|
+
],
|
|
2528
|
+
risk: "read",
|
|
2529
|
+
validate: (ctx) => {
|
|
2530
|
+
readRequiredJsonArray(ctx, "strategy_id_list", 2);
|
|
2531
|
+
},
|
|
2532
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName4, toolName4, buildArgs4(ctx)),
|
|
2533
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName4, toolName4, buildArgs4(ctx))
|
|
2534
|
+
};
|
|
2535
|
+
|
|
2536
|
+
// src/commands/te-engage/config/config-item-trigger-report.ts
|
|
2537
|
+
var serviceName5 = "engage_config";
|
|
2538
|
+
var toolName5 = "query_config_item_trigger_report";
|
|
2539
|
+
function buildArgs5(ctx) {
|
|
2540
|
+
const args = {
|
|
2541
|
+
projectId: ctx.num("project_id"),
|
|
2542
|
+
configId: ctx.str("config_id"),
|
|
2543
|
+
startTime: ctx.str("start_time"),
|
|
2544
|
+
endTime: ctx.str("end_time")
|
|
2545
|
+
};
|
|
2546
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2547
|
+
if (requestId) args.requestId = requestId;
|
|
2548
|
+
const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
|
|
2549
|
+
if (templateIdList !== void 0) args.templateIdList = templateIdList;
|
|
2550
|
+
const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
|
|
2551
|
+
if (strategyIdList !== void 0) args.strategyIdList = strategyIdList;
|
|
2552
|
+
const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
|
|
2553
|
+
if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
|
|
2554
|
+
const analyzeReportInternalQuery = readOptionalBoolean(ctx, "analyze_report_internal_query");
|
|
2555
|
+
if (analyzeReportInternalQuery !== void 0) args.analyzeReportInternalQuery = analyzeReportInternalQuery;
|
|
2556
|
+
return args;
|
|
2557
|
+
}
|
|
2558
|
+
var configItemTriggerReport = {
|
|
2559
|
+
service: "engage",
|
|
2560
|
+
command: "+config_item_trigger_report",
|
|
2561
|
+
description: "Query the publish and trigger trend report for a config item.",
|
|
2562
|
+
flags: [
|
|
2563
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2564
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" },
|
|
2565
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
2566
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
2567
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
2568
|
+
{ name: "template_id_list", type: "json", required: false, desc: "Template ID list as JSON array" },
|
|
2569
|
+
{ name: "strategy_id_list", type: "json", required: false, desc: "Strategy ID list as JSON array" },
|
|
2570
|
+
{ name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" },
|
|
2571
|
+
{ name: "analyze_report_internal_query", type: "boolean", required: false, desc: "Internal trigger-report calculation switch" }
|
|
2572
|
+
],
|
|
2573
|
+
risk: "read",
|
|
2574
|
+
validate: (ctx) => {
|
|
2575
|
+
const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
|
|
2576
|
+
const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
|
|
2577
|
+
if (templateIdList && strategyIdList) {
|
|
2578
|
+
throw new Error("Flags --template_id_list and --strategy_id_list cannot be used together");
|
|
2579
|
+
}
|
|
2580
|
+
},
|
|
2581
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName5, toolName5, buildArgs5(ctx)),
|
|
2582
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName5, toolName5, buildArgs5(ctx))
|
|
2583
|
+
};
|
|
2584
|
+
|
|
2585
|
+
// src/commands/te-engage/config/copy-config-template.ts
|
|
2586
|
+
var serviceName6 = "engage_config";
|
|
2587
|
+
var toolName6 = "copy_config_template";
|
|
2588
|
+
function buildArgs6(ctx) {
|
|
2589
|
+
return {
|
|
2590
|
+
sourceProjectId: ctx.num("source_project_id"),
|
|
2591
|
+
sourceConfigId: ctx.str("source_config_id"),
|
|
2592
|
+
sourceTemplateId: ctx.str("source_template_id"),
|
|
2593
|
+
projectId: ctx.num("project_id"),
|
|
2594
|
+
configId: ctx.str("config_id")
|
|
2595
|
+
};
|
|
2596
|
+
}
|
|
2597
|
+
var copyConfigTemplate = {
|
|
2598
|
+
service: "engage",
|
|
2599
|
+
command: "+copy_config_template",
|
|
2600
|
+
description: "Copy one template from a source config item to a target config item.",
|
|
2601
|
+
flags: [
|
|
2602
|
+
{ name: "source_project_id", type: "number", required: true, desc: "Source project ID" },
|
|
2603
|
+
{ name: "source_config_id", type: "string", required: true, desc: "Source config item ID" },
|
|
2604
|
+
{ name: "source_template_id", type: "string", required: true, desc: "Source template ID" },
|
|
2605
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Target project ID" },
|
|
2606
|
+
{ name: "config_id", type: "string", required: true, desc: "Target config item ID" }
|
|
2607
|
+
],
|
|
2608
|
+
risk: "write",
|
|
2609
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName6, toolName6, buildArgs6(ctx)),
|
|
2610
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName6, toolName6, buildArgs6(ctx))
|
|
2611
|
+
};
|
|
2612
|
+
|
|
2613
|
+
// src/commands/te-engage/config/delete-config-item.ts
|
|
2614
|
+
var serviceName7 = "engage_config";
|
|
2615
|
+
var toolName7 = "delete_config_item";
|
|
2616
|
+
function buildArgs7(ctx) {
|
|
2617
|
+
return {
|
|
2618
|
+
projectId: ctx.num("project_id"),
|
|
2619
|
+
configId: ctx.str("config_id"),
|
|
2620
|
+
openId: ctx.str("open_id")
|
|
2621
|
+
};
|
|
2622
|
+
}
|
|
2623
|
+
var deleteConfigItem = {
|
|
2624
|
+
service: "engage",
|
|
2625
|
+
command: "+delete_config_item",
|
|
2626
|
+
description: "Delete a config item.",
|
|
2627
|
+
flags: [
|
|
2628
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2629
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" },
|
|
2630
|
+
{ name: "open_id", type: "string", required: true, desc: "Operator open ID" }
|
|
2631
|
+
],
|
|
2632
|
+
risk: "high-risk-write",
|
|
2633
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName7, toolName7, buildArgs7(ctx)),
|
|
2634
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName7, toolName7, buildArgs7(ctx))
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
// src/commands/te-engage/config/manage-strategy.ts
|
|
2638
|
+
var serviceName8 = "engage_config";
|
|
2639
|
+
var toolName8 = "batch_manage_strategy";
|
|
2640
|
+
function buildArgs8(ctx) {
|
|
2641
|
+
const args = {
|
|
2642
|
+
projectId: ctx.num("project_id"),
|
|
2643
|
+
configId: ctx.str("config_id"),
|
|
2644
|
+
action: ctx.str("action")
|
|
2645
|
+
};
|
|
2646
|
+
const strategyUuidList = readOptionalJsonArray(ctx, "strategy_uuid_list");
|
|
2647
|
+
if (strategyUuidList !== void 0) args.strategyUuidList = strategyUuidList;
|
|
2648
|
+
const strategyList2 = readOptionalJsonArray(ctx, "strategy_list");
|
|
2649
|
+
if (strategyList2 !== void 0) args.strategyList = strategyList2;
|
|
2650
|
+
const reason = readOptionalString(ctx, "reason");
|
|
2651
|
+
if (reason) args.reason = reason;
|
|
2652
|
+
return args;
|
|
2653
|
+
}
|
|
2654
|
+
var manageStrategy = {
|
|
2655
|
+
service: "engage",
|
|
2656
|
+
command: "+manage_strategy",
|
|
2657
|
+
description: "Batch manage config strategies.",
|
|
2658
|
+
flags: [
|
|
2659
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2660
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" },
|
|
2661
|
+
{ name: "action", type: "string", required: true, desc: "Action type" },
|
|
2662
|
+
{ name: "strategy_uuid_list", type: "json", required: false, desc: "Strategy UUID list as JSON array" },
|
|
2663
|
+
{ name: "strategy_list", type: "json", required: false, desc: "Strategy review list as JSON array" },
|
|
2664
|
+
{ name: "reason", type: "string", required: false, desc: "Reason for approval actions" }
|
|
2665
|
+
],
|
|
2666
|
+
risk: "write",
|
|
2667
|
+
validate: (ctx) => {
|
|
2668
|
+
const action = ctx.str("action");
|
|
2669
|
+
if (["online", "offline", "suspend", "delete"].includes(action)) {
|
|
2670
|
+
readRequiredJsonArray(ctx, "strategy_uuid_list");
|
|
2671
|
+
}
|
|
2672
|
+
if (["approve", "deny", "cancel"].includes(action)) {
|
|
2673
|
+
readRequiredJsonArray(ctx, "strategy_list");
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName8, toolName8, buildArgs8(ctx)),
|
|
2677
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName8, toolName8, buildArgs8(ctx))
|
|
2678
|
+
};
|
|
2679
|
+
|
|
2680
|
+
// src/commands/te-engage/config/strategy-detail.ts
|
|
2681
|
+
var serviceName9 = "engage_config";
|
|
2682
|
+
var toolName9 = "query_strategy_detail";
|
|
2683
|
+
function buildArgs9(ctx) {
|
|
2684
|
+
return {
|
|
2685
|
+
projectId: ctx.num("project_id"),
|
|
2686
|
+
configId: ctx.str("config_id"),
|
|
2687
|
+
strategyUuid: ctx.str("strategy_uuid")
|
|
2688
|
+
};
|
|
2689
|
+
}
|
|
2690
|
+
var strategyDetail = {
|
|
2691
|
+
service: "engage",
|
|
2692
|
+
command: "+strategy_detail",
|
|
2693
|
+
description: "Get one strategy detail.",
|
|
2694
|
+
flags: [
|
|
2695
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2696
|
+
{ name: "config_id", type: "string", required: true, desc: "Config item ID" },
|
|
2697
|
+
{ name: "strategy_uuid", type: "string", required: true, desc: "Strategy UUID" }
|
|
2698
|
+
],
|
|
2699
|
+
risk: "read",
|
|
2700
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName9, toolName9, buildArgs9(ctx)),
|
|
2701
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName9, toolName9, buildArgs9(ctx))
|
|
2702
|
+
};
|
|
2703
|
+
|
|
2704
|
+
// src/commands/te-engage/config/strategy-list.ts
|
|
2705
|
+
var serviceName10 = "engage_config";
|
|
2706
|
+
var toolName10 = "query_strategy_list";
|
|
2707
|
+
function buildArgs10(ctx) {
|
|
2708
|
+
const args = { projectId: ctx.num("project_id") };
|
|
2709
|
+
const configId = readOptionalString(ctx, "config_id");
|
|
2710
|
+
if (configId) args.configId = configId;
|
|
2711
|
+
const strategyUuidList = readOptionalJsonArray(ctx, "strategy_uuid_list");
|
|
2712
|
+
if (strategyUuidList !== void 0) args.strategyUuidList = strategyUuidList;
|
|
2713
|
+
return args;
|
|
2714
|
+
}
|
|
2715
|
+
var strategyList = {
|
|
2716
|
+
service: "engage",
|
|
2717
|
+
command: "+strategy_list",
|
|
2718
|
+
description: "List strategies under a project or config item.",
|
|
2719
|
+
flags: [
|
|
2720
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2721
|
+
{ name: "config_id", type: "string", required: false, desc: "Config item ID" },
|
|
2722
|
+
{ name: "strategy_uuid_list", type: "json", required: false, desc: "Strategy UUID list as JSON array" }
|
|
2723
|
+
],
|
|
2724
|
+
risk: "read",
|
|
2725
|
+
validate: (ctx) => {
|
|
2726
|
+
readOptionalJsonArray(ctx, "strategy_uuid_list");
|
|
2727
|
+
},
|
|
2728
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName10, toolName10, buildArgs10(ctx)),
|
|
2729
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName10, toolName10, buildArgs10(ctx))
|
|
2730
|
+
};
|
|
2731
|
+
|
|
2732
|
+
// src/commands/te-engage/config/index.ts
|
|
2733
|
+
var commands7 = [
|
|
2734
|
+
configItemTriggerReport,
|
|
2735
|
+
configItemAnalysisReport,
|
|
2736
|
+
configItemStrategyComparison,
|
|
2737
|
+
configItemList2,
|
|
2738
|
+
configItemDetail,
|
|
2739
|
+
deleteConfigItem,
|
|
2740
|
+
copyConfigTemplate,
|
|
2741
|
+
strategyList,
|
|
2742
|
+
strategyDetail,
|
|
2743
|
+
manageStrategy
|
|
2744
|
+
];
|
|
2745
|
+
var config_default = commands7;
|
|
2746
|
+
|
|
2747
|
+
// src/commands/te-engage/flow/delete-flow.ts
|
|
2748
|
+
var serviceName11 = "engage_flow";
|
|
2749
|
+
var toolName11 = "batch_delete_flow";
|
|
2750
|
+
function buildArgs11(ctx) {
|
|
2751
|
+
return {
|
|
2752
|
+
projectId: ctx.num("project_id"),
|
|
2753
|
+
flowUuidList: readRequiredJsonArray(ctx, "flow_uuid_list")
|
|
2754
|
+
};
|
|
2755
|
+
}
|
|
2756
|
+
var deleteFlow = {
|
|
2757
|
+
service: "engage",
|
|
2758
|
+
command: "+delete_flow",
|
|
2759
|
+
description: "Batch delete flows.",
|
|
2760
|
+
flags: [
|
|
2761
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2762
|
+
{ name: "flow_uuid_list", type: "json", required: true, desc: "Flow UUID list as JSON array" }
|
|
2763
|
+
],
|
|
2764
|
+
risk: "high-risk-write",
|
|
2765
|
+
validate: (ctx) => {
|
|
2766
|
+
readRequiredJsonArray(ctx, "flow_uuid_list");
|
|
2767
|
+
},
|
|
2768
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName11, toolName11, buildArgs11(ctx)),
|
|
2769
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName11, toolName11, buildArgs11(ctx))
|
|
2770
|
+
};
|
|
2771
|
+
|
|
2772
|
+
// src/commands/te-engage/flow/flow-ab-split-node-report.ts
|
|
2773
|
+
var serviceName12 = "engage_flow";
|
|
2774
|
+
var toolName12 = "query_flow_ab_split_node_report";
|
|
2775
|
+
function buildArgs12(ctx) {
|
|
2776
|
+
const args = {
|
|
2777
|
+
projectId: ctx.num("project_id"),
|
|
2778
|
+
reportType: ctx.str("report_type"),
|
|
2779
|
+
nodeUuid: ctx.str("node_uuid"),
|
|
2780
|
+
startTime: ctx.str("start_time"),
|
|
2781
|
+
endTime: ctx.str("end_time")
|
|
2782
|
+
};
|
|
2783
|
+
const flowId = readOptionalString(ctx, "flow_id");
|
|
2784
|
+
if (flowId) args.flowId = flowId;
|
|
2785
|
+
const flowUuid = readOptionalString(ctx, "flow_uuid");
|
|
2786
|
+
if (flowUuid) args.flowUuid = flowUuid;
|
|
2787
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2788
|
+
if (requestId) args.requestId = requestId;
|
|
2789
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
2790
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
2791
|
+
const indicatorsUuid = readOptionalString(ctx, "indicators_uuid");
|
|
2792
|
+
if (indicatorsUuid) args.indicatorsUuid = indicatorsUuid;
|
|
2793
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
2794
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
2795
|
+
return args;
|
|
2796
|
+
}
|
|
2797
|
+
var flowAbSplitNodeReport = {
|
|
2798
|
+
service: "engage",
|
|
2799
|
+
command: "+flow_ab_split_node_report",
|
|
2800
|
+
description: "Query the report for one AB split node.",
|
|
2801
|
+
flags: [
|
|
2802
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2803
|
+
{ name: "report_type", type: "string", required: true, desc: "Report type: overview or detail" },
|
|
2804
|
+
{ name: "node_uuid", type: "string", required: true, desc: "AB split node UUID" },
|
|
2805
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
2806
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
2807
|
+
{ name: "flow_id", type: "string", required: false, desc: "Flow ID" },
|
|
2808
|
+
{ name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
|
|
2809
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
2810
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
2811
|
+
{ name: "indicators_uuid", type: "string", required: false, desc: "Indicator UUID" },
|
|
2812
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
2813
|
+
],
|
|
2814
|
+
risk: "read",
|
|
2815
|
+
validate: (ctx) => {
|
|
2816
|
+
requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
|
|
2817
|
+
requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
|
|
2818
|
+
},
|
|
2819
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName12, toolName12, buildArgs12(ctx)),
|
|
2820
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName12, toolName12, buildArgs12(ctx))
|
|
2821
|
+
};
|
|
2822
|
+
|
|
2823
|
+
// src/commands/te-engage/flow/flow-detail.ts
|
|
2824
|
+
var serviceName13 = "engage_flow";
|
|
2825
|
+
var toolName13 = "query_flow_detail";
|
|
2826
|
+
function buildArgs13(ctx) {
|
|
2827
|
+
return {
|
|
2828
|
+
projectId: ctx.num("project_id"),
|
|
2829
|
+
flowUuid: ctx.str("flow_uuid")
|
|
2830
|
+
};
|
|
2831
|
+
}
|
|
2832
|
+
var flowDetail = {
|
|
2833
|
+
service: "engage",
|
|
2834
|
+
command: "+flow_detail",
|
|
2835
|
+
description: "Get flow detail information.",
|
|
2836
|
+
flags: [
|
|
2837
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2838
|
+
{ name: "flow_uuid", type: "string", required: true, desc: "Flow UUID" }
|
|
2839
|
+
],
|
|
2840
|
+
risk: "read",
|
|
2841
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName13, toolName13, buildArgs13(ctx)),
|
|
2842
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName13, toolName13, buildArgs13(ctx))
|
|
2843
|
+
};
|
|
2844
|
+
|
|
2845
|
+
// src/commands/te-engage/flow/flow-list.ts
|
|
2846
|
+
var serviceName14 = "engage_flow";
|
|
2847
|
+
var toolName14 = "query_flow_list";
|
|
2848
|
+
function buildArgs14(ctx) {
|
|
2849
|
+
return { projectId: ctx.num("project_id") };
|
|
2850
|
+
}
|
|
2851
|
+
var flowList = {
|
|
2852
|
+
service: "engage",
|
|
2853
|
+
command: "+flow_list",
|
|
2854
|
+
description: "List flows under a project.",
|
|
2855
|
+
flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
|
|
2856
|
+
risk: "read",
|
|
2857
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName14, toolName14, buildArgs14(ctx)),
|
|
2858
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName14, toolName14, buildArgs14(ctx))
|
|
2859
|
+
};
|
|
2860
|
+
|
|
2861
|
+
// src/commands/te-engage/flow/flow-node-config-schema.ts
|
|
2862
|
+
var serviceName15 = "engage_flow";
|
|
2863
|
+
var toolName15 = "query_flow_node_config_schema";
|
|
2864
|
+
function buildArgs15(ctx) {
|
|
2865
|
+
return { nodeType: ctx.str("node_type") };
|
|
2866
|
+
}
|
|
2867
|
+
var flowNodeConfigSchema = {
|
|
2868
|
+
service: "engage",
|
|
2869
|
+
command: "+flow_node_config_schema",
|
|
2870
|
+
description: "Query one type-specific node config schema before constructing save_flow nodes or nodeConfigs.",
|
|
2871
|
+
flags: [{ name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" }],
|
|
2872
|
+
risk: "read",
|
|
2873
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName15, toolName15, buildArgs15(ctx)),
|
|
2874
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName15, toolName15, buildArgs15(ctx))
|
|
2875
|
+
};
|
|
2876
|
+
|
|
2877
|
+
// src/commands/te-engage/flow/flow-node-detail-report.ts
|
|
2878
|
+
var serviceName16 = "engage_flow";
|
|
2879
|
+
var toolName16 = "query_flow_node_detail_report";
|
|
2880
|
+
function buildArgs16(ctx) {
|
|
2881
|
+
const args = {
|
|
2882
|
+
projectId: ctx.num("project_id"),
|
|
2883
|
+
nodeUuid: ctx.str("node_uuid"),
|
|
2884
|
+
startTime: ctx.str("start_time"),
|
|
2885
|
+
endTime: ctx.str("end_time")
|
|
2886
|
+
};
|
|
2887
|
+
const flowId = readOptionalString(ctx, "flow_id");
|
|
2888
|
+
if (flowId) args.flowId = flowId;
|
|
2889
|
+
const flowUuid = readOptionalString(ctx, "flow_uuid");
|
|
2890
|
+
if (flowUuid) args.flowUuid = flowUuid;
|
|
2891
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2892
|
+
if (requestId) args.requestId = requestId;
|
|
2893
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
2894
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
2895
|
+
const branchId = readOptionalString(ctx, "branch_id");
|
|
2896
|
+
if (branchId) args.branchId = branchId;
|
|
2897
|
+
const indicatorName = readOptionalString(ctx, "indicator_name");
|
|
2898
|
+
if (indicatorName) args.indicatorName = indicatorName;
|
|
2899
|
+
const dataDimType = readOptionalString(ctx, "data_dim_type");
|
|
2900
|
+
if (dataDimType) args.dataDimType = dataDimType;
|
|
2901
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
2902
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
2903
|
+
return args;
|
|
2904
|
+
}
|
|
2905
|
+
var flowNodeDetailReport = {
|
|
2906
|
+
service: "engage",
|
|
2907
|
+
command: "+flow_node_detail_report",
|
|
2908
|
+
description: "Query the detailed report for one flow node.",
|
|
2909
|
+
flags: [
|
|
2910
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2911
|
+
{ name: "node_uuid", type: "string", required: true, desc: "Node UUID" },
|
|
2912
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
2913
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
2914
|
+
{ name: "flow_id", type: "string", required: false, desc: "Flow ID" },
|
|
2915
|
+
{ name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
|
|
2916
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
2917
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
2918
|
+
{ name: "branch_id", type: "string", required: false, desc: "Branch ID" },
|
|
2919
|
+
{ name: "indicator_name", type: "string", required: false, desc: "Indicator name" },
|
|
2920
|
+
{ name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
|
|
2921
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
2922
|
+
],
|
|
2923
|
+
risk: "read",
|
|
2924
|
+
validate: (ctx) => {
|
|
2925
|
+
requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
|
|
2926
|
+
},
|
|
2927
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName16, toolName16, buildArgs16(ctx)),
|
|
2928
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName16, toolName16, buildArgs16(ctx))
|
|
2929
|
+
};
|
|
2930
|
+
|
|
2931
|
+
// src/commands/te-engage/flow/flow-node-overview-report.ts
|
|
2932
|
+
var serviceName17 = "engage_flow";
|
|
2933
|
+
var toolName17 = "query_flow_node_overview_report";
|
|
2934
|
+
function buildArgs17(ctx) {
|
|
2935
|
+
const args = {
|
|
2936
|
+
projectId: ctx.num("project_id"),
|
|
2937
|
+
startTime: ctx.str("start_time"),
|
|
2938
|
+
endTime: ctx.str("end_time")
|
|
2939
|
+
};
|
|
2940
|
+
const flowId = readOptionalString(ctx, "flow_id");
|
|
2941
|
+
if (flowId) args.flowId = flowId;
|
|
2942
|
+
const flowUuid = readOptionalString(ctx, "flow_uuid");
|
|
2943
|
+
if (flowUuid) args.flowUuid = flowUuid;
|
|
2944
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2945
|
+
if (requestId) args.requestId = requestId;
|
|
2946
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
2947
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
2948
|
+
const dataDimType = readOptionalString(ctx, "data_dim_type");
|
|
2949
|
+
if (dataDimType) args.dataDimType = dataDimType;
|
|
2950
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
2951
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
2952
|
+
return args;
|
|
2953
|
+
}
|
|
2954
|
+
var flowNodeOverviewReport = {
|
|
2955
|
+
service: "engage",
|
|
2956
|
+
command: "+flow_node_overview_report",
|
|
2957
|
+
description: "Query the node-level overview report for all nodes in a flow.",
|
|
2958
|
+
flags: [
|
|
2959
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2960
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
2961
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
2962
|
+
{ name: "flow_id", type: "string", required: false, desc: "Flow ID" },
|
|
2963
|
+
{ name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
|
|
2964
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
2965
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
2966
|
+
{ name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
|
|
2967
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
2968
|
+
],
|
|
2969
|
+
risk: "read",
|
|
2970
|
+
validate: (ctx) => {
|
|
2971
|
+
requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
|
|
2972
|
+
},
|
|
2973
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName17, toolName17, buildArgs17(ctx)),
|
|
2974
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName17, toolName17, buildArgs17(ctx))
|
|
2975
|
+
};
|
|
2976
|
+
|
|
2977
|
+
// src/commands/te-engage/flow/flow-process-report.ts
|
|
2978
|
+
var serviceName18 = "engage_flow";
|
|
2979
|
+
var toolName18 = "query_flow_process_report";
|
|
2980
|
+
function buildArgs18(ctx) {
|
|
2981
|
+
const args = {
|
|
2982
|
+
projectId: ctx.num("project_id"),
|
|
2983
|
+
reportType: ctx.str("report_type")
|
|
2984
|
+
};
|
|
2985
|
+
const flowId = readOptionalString(ctx, "flow_id");
|
|
2986
|
+
if (flowId) args.flowId = flowId;
|
|
2987
|
+
const flowUuid = readOptionalString(ctx, "flow_uuid");
|
|
2988
|
+
if (flowUuid) args.flowUuid = flowUuid;
|
|
2989
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
2990
|
+
if (requestId) args.requestId = requestId;
|
|
2991
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
2992
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
2993
|
+
const dataDimType = readOptionalString(ctx, "data_dim_type");
|
|
2994
|
+
if (dataDimType) args.dataDimType = dataDimType;
|
|
2995
|
+
const startTime = readOptionalString(ctx, "start_time");
|
|
2996
|
+
if (startTime) args.startTime = startTime;
|
|
2997
|
+
const endTime = readOptionalString(ctx, "end_time");
|
|
2998
|
+
if (endTime) args.endTime = endTime;
|
|
2999
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
3000
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
3001
|
+
return args;
|
|
3002
|
+
}
|
|
3003
|
+
var flowProcessReport = {
|
|
3004
|
+
service: "engage",
|
|
3005
|
+
command: "+flow_process_report",
|
|
3006
|
+
description: "Query the process-level report for a flow.",
|
|
3007
|
+
flags: [
|
|
3008
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3009
|
+
{ name: "report_type", type: "string", required: true, desc: "Report type" },
|
|
3010
|
+
{ name: "flow_id", type: "string", required: false, desc: "Flow ID" },
|
|
3011
|
+
{ name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
|
|
3012
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
3013
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
3014
|
+
{ name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
|
|
3015
|
+
{ name: "start_time", type: "string", required: false, desc: "Start date" },
|
|
3016
|
+
{ name: "end_time", type: "string", required: false, desc: "End date" },
|
|
3017
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
3018
|
+
],
|
|
3019
|
+
risk: "read",
|
|
3020
|
+
validate: (ctx) => {
|
|
3021
|
+
const reportType = ctx.str("report_type");
|
|
3022
|
+
requireAllowedValue(reportType, ["overview", "detail", "exit_detail", "push_detail"], "report_type");
|
|
3023
|
+
requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
|
|
3024
|
+
if (["detail", "exit_detail", "push_detail"].includes(reportType) && (!hasFlag(ctx, "start_time") || !hasFlag(ctx, "end_time"))) {
|
|
3025
|
+
throw new Error("Flags --start_time and --end_time are required for detail, exit_detail, and push_detail reports");
|
|
3026
|
+
}
|
|
3027
|
+
},
|
|
3028
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName18, toolName18, buildArgs18(ctx)),
|
|
3029
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName18, toolName18, buildArgs18(ctx))
|
|
3030
|
+
};
|
|
3031
|
+
|
|
3032
|
+
// src/commands/te-engage/flow/manage-flow.ts
|
|
3033
|
+
var serviceName19 = "engage_flow";
|
|
3034
|
+
var toolName19 = "batch_manage_flow";
|
|
3035
|
+
function buildArgs19(ctx) {
|
|
3036
|
+
const args = {
|
|
3037
|
+
projectId: ctx.num("project_id"),
|
|
3038
|
+
action: ctx.str("action")
|
|
3039
|
+
};
|
|
3040
|
+
const flowList2 = readOptionalJsonArray(ctx, "flow_list");
|
|
3041
|
+
if (flowList2 !== void 0) args.flowList = flowList2;
|
|
3042
|
+
const pauseFlowList = readOptionalJsonArray(ctx, "pause_flow_list");
|
|
3043
|
+
if (pauseFlowList !== void 0) args.pauseFlowList = pauseFlowList;
|
|
3044
|
+
const flowIdList = readOptionalJsonArray(ctx, "flow_id_list");
|
|
3045
|
+
if (flowIdList !== void 0) args.flowIdList = flowIdList;
|
|
3046
|
+
const reason = readOptionalString(ctx, "reason");
|
|
3047
|
+
if (reason) args.reason = reason;
|
|
3048
|
+
return args;
|
|
3049
|
+
}
|
|
3050
|
+
var manageFlow = {
|
|
3051
|
+
service: "engage",
|
|
3052
|
+
command: "+manage_flow",
|
|
3053
|
+
description: "Batch manage flows with one unified command.",
|
|
3054
|
+
flags: [
|
|
3055
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3056
|
+
{ name: "action", type: "string", required: true, desc: "Action type" },
|
|
3057
|
+
{ name: "flow_list", type: "json", required: false, desc: "Flow approval list as JSON array" },
|
|
3058
|
+
{ name: "pause_flow_list", type: "json", required: false, desc: "Pause flow list as JSON array" },
|
|
3059
|
+
{ name: "flow_id_list", type: "json", required: false, desc: "Flow ID list as JSON array" },
|
|
3060
|
+
{ name: "reason", type: "string", required: false, desc: "Reason for review actions" }
|
|
3061
|
+
],
|
|
3062
|
+
risk: "write",
|
|
3063
|
+
validate: (ctx) => {
|
|
3064
|
+
const action = ctx.str("action");
|
|
3065
|
+
if (["approve", "deny", "cancel"].includes(action)) {
|
|
3066
|
+
readRequiredJsonArray(ctx, "flow_list");
|
|
3067
|
+
}
|
|
3068
|
+
if (action === "pause") {
|
|
3069
|
+
readRequiredJsonArray(ctx, "pause_flow_list");
|
|
3070
|
+
}
|
|
3071
|
+
if (["recover", "end"].includes(action)) {
|
|
3072
|
+
readRequiredJsonArray(ctx, "flow_id_list");
|
|
3073
|
+
}
|
|
3074
|
+
},
|
|
3075
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName19, toolName19, buildArgs19(ctx)),
|
|
3076
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName19, toolName19, buildArgs19(ctx))
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3079
|
+
// src/commands/te-engage/flow/modify-flow-base-info.ts
|
|
3080
|
+
var serviceName20 = "engage_flow";
|
|
3081
|
+
var toolName20 = "modify_flow_base_info";
|
|
3082
|
+
function buildArgs20(ctx) {
|
|
3083
|
+
const args = {
|
|
3084
|
+
projectId: ctx.num("project_id"),
|
|
3085
|
+
flowUuid: ctx.str("flow_uuid")
|
|
3086
|
+
};
|
|
3087
|
+
const flowName = readOptionalString(ctx, "flow_name");
|
|
3088
|
+
if (flowName) args.flowName = flowName;
|
|
3089
|
+
const flowDesc = readOptionalString(ctx, "flow_desc");
|
|
3090
|
+
if (flowDesc) args.flowDesc = flowDesc;
|
|
3091
|
+
const groupId = readOptionalNumber(ctx, "group_id");
|
|
3092
|
+
if (groupId !== void 0) args.groupId = groupId;
|
|
3093
|
+
return args;
|
|
3094
|
+
}
|
|
3095
|
+
var modifyFlowBaseInfo = {
|
|
3096
|
+
service: "engage",
|
|
3097
|
+
command: "+modify_flow_base_info",
|
|
3098
|
+
description: "Modify the basic information of a flow canvas.",
|
|
3099
|
+
flags: [
|
|
3100
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3101
|
+
{ name: "flow_uuid", type: "string", required: true, desc: "Flow UUID" },
|
|
3102
|
+
{ name: "flow_name", type: "string", required: false, desc: "New flow name" },
|
|
3103
|
+
{ name: "flow_desc", type: "string", required: false, desc: "New flow description" },
|
|
3104
|
+
{ name: "group_id", type: "number", required: false, desc: "New group ID" }
|
|
3105
|
+
],
|
|
3106
|
+
risk: "write",
|
|
3107
|
+
validate: (ctx) => {
|
|
3108
|
+
requireAnyFlag(ctx, ["flow_name", "flow_desc", "group_id"]);
|
|
3109
|
+
},
|
|
3110
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName20, toolName20, buildArgs20(ctx)),
|
|
3111
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName20, toolName20, buildArgs20(ctx))
|
|
3112
|
+
};
|
|
3113
|
+
|
|
3114
|
+
// src/commands/te-engage/flow/save-flow.ts
|
|
3115
|
+
var serviceName21 = "engage_flow";
|
|
3116
|
+
var toolName21 = "save_flow";
|
|
3117
|
+
var allowedOperations = ["build", "preview", "commit"];
|
|
3118
|
+
function readAndValidateReq(ctx) {
|
|
3119
|
+
const req = readRequiredJsonObject(ctx, "req");
|
|
3120
|
+
const operation = typeof req.operation === "string" ? req.operation.trim().toLowerCase() : "";
|
|
3121
|
+
if (!allowedOperations.includes(operation)) {
|
|
3122
|
+
throw new Error(`Flag --req.operation must be one of: ${allowedOperations.join(", ")}`);
|
|
3123
|
+
}
|
|
3124
|
+
if ("nodeList" in req || "edgeList" in req) {
|
|
3125
|
+
throw new Error("Flag --req must use nodes/edges instead of legacy nodeList/edgeList");
|
|
3126
|
+
}
|
|
3127
|
+
if ("sourceFlowUuid" in req) {
|
|
3128
|
+
throw new Error("Flag --req.sourceFlowUuid is no longer supported; call +flow_detail and build nodes/edges instead");
|
|
3129
|
+
}
|
|
3130
|
+
return req;
|
|
3131
|
+
}
|
|
3132
|
+
function buildArgs21(ctx) {
|
|
3133
|
+
return {
|
|
3134
|
+
projectId: ctx.num("project_id"),
|
|
3135
|
+
req: {
|
|
3136
|
+
projectId: ctx.num("project_id"),
|
|
3137
|
+
...readAndValidateReq(ctx)
|
|
3138
|
+
}
|
|
3139
|
+
};
|
|
3140
|
+
}
|
|
3141
|
+
var saveFlow = {
|
|
3142
|
+
service: "engage",
|
|
3143
|
+
command: "+save_flow",
|
|
3144
|
+
description: "Create, preview, or commit an operation-based flow draft with req.operation=build, preview, or commit. Copy existing flows by querying detail first, then building nodes/edges.",
|
|
3145
|
+
flags: [
|
|
3146
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3147
|
+
{ name: "req", type: "json", required: true, desc: "Operation-based flow save request JSON object. Use operation=build with nodes/edges, operation=preview with draftId, or operation=commit with draftVersion and confirmToken. Do not use sourceFlowUuid clone mode." }
|
|
3148
|
+
],
|
|
3149
|
+
risk: "write",
|
|
3150
|
+
validate: (ctx) => {
|
|
3151
|
+
readAndValidateReq(ctx);
|
|
3152
|
+
},
|
|
3153
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName21, toolName21, buildArgs21(ctx)),
|
|
3154
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName21, toolName21, buildArgs21(ctx))
|
|
3155
|
+
};
|
|
3156
|
+
|
|
3157
|
+
// src/commands/te-engage/flow/validate-flow-node-config.ts
|
|
3158
|
+
var serviceName22 = "engage_flow";
|
|
3159
|
+
var toolName22 = "validate_flow_node_config";
|
|
3160
|
+
function buildArgs22(ctx) {
|
|
3161
|
+
return {
|
|
3162
|
+
nodeType: ctx.str("node_type"),
|
|
3163
|
+
config: ctx.str("config"),
|
|
3164
|
+
operationMode: ctx.str("operation_mode")
|
|
3165
|
+
};
|
|
3166
|
+
}
|
|
3167
|
+
var validateFlowNodeConfig = {
|
|
3168
|
+
service: "engage",
|
|
3169
|
+
command: "+validate_flow_node_config",
|
|
3170
|
+
description: "Validate and normalize one candidate node config before placing it into save_flow.",
|
|
3171
|
+
flags: [
|
|
3172
|
+
{ name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" },
|
|
3173
|
+
{ name: "config", type: "string", required: true, desc: "Node config JSON object encoded as a string" },
|
|
3174
|
+
{ name: "operation_mode", type: "string", required: true, desc: "Validation mode. Use save_flow for the current exposed MCP protocol; save_submit_flow applies stricter submit-time checks" }
|
|
3175
|
+
],
|
|
3176
|
+
risk: "read",
|
|
3177
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName22, toolName22, buildArgs22(ctx)),
|
|
3178
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName22, toolName22, buildArgs22(ctx))
|
|
3179
|
+
};
|
|
3180
|
+
|
|
3181
|
+
// src/commands/te-engage/flow/index.ts
|
|
3182
|
+
var commands8 = [
|
|
3183
|
+
flowNodeOverviewReport,
|
|
3184
|
+
flowProcessReport,
|
|
3185
|
+
flowNodeDetailReport,
|
|
3186
|
+
flowAbSplitNodeReport,
|
|
3187
|
+
flowDetail,
|
|
3188
|
+
modifyFlowBaseInfo,
|
|
3189
|
+
manageFlow,
|
|
3190
|
+
flowNodeConfigSchema,
|
|
3191
|
+
validateFlowNodeConfig,
|
|
3192
|
+
deleteFlow,
|
|
3193
|
+
flowList,
|
|
3194
|
+
saveFlow
|
|
3195
|
+
];
|
|
3196
|
+
var flow_default = commands8;
|
|
3197
|
+
|
|
3198
|
+
// src/commands/te-engage/setting/add-approver.ts
|
|
3199
|
+
var serviceName23 = "engage_setting";
|
|
3200
|
+
var toolName23 = "batch_add_approver";
|
|
3201
|
+
function buildArgs23(ctx) {
|
|
3202
|
+
return {
|
|
3203
|
+
projectId: ctx.num("project_id"),
|
|
3204
|
+
approvers: readRequiredJsonArray(ctx, "approvers")
|
|
3205
|
+
};
|
|
3206
|
+
}
|
|
3207
|
+
var addApprover = {
|
|
3208
|
+
service: "engage",
|
|
3209
|
+
command: "+add_approver",
|
|
3210
|
+
description: "Batch add approvers to a project.",
|
|
3211
|
+
flags: [
|
|
3212
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3213
|
+
{ name: "approvers", type: "json", required: true, desc: "Approver open ID list as JSON array" }
|
|
3214
|
+
],
|
|
3215
|
+
risk: "write",
|
|
3216
|
+
validate: (ctx) => {
|
|
3217
|
+
readRequiredJsonArray(ctx, "approvers");
|
|
3218
|
+
},
|
|
3219
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName23, toolName23, buildArgs23(ctx)),
|
|
3220
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName23, toolName23, buildArgs23(ctx))
|
|
3221
|
+
};
|
|
3222
|
+
|
|
3223
|
+
// src/commands/te-engage/setting/add-channel.ts
|
|
3224
|
+
var serviceName24 = "engage_setting";
|
|
3225
|
+
var toolName24 = "add_channel";
|
|
3226
|
+
function buildArgs24(ctx) {
|
|
3227
|
+
return {
|
|
3228
|
+
projectId: ctx.num("project_id"),
|
|
3229
|
+
req: {
|
|
3230
|
+
projectId: ctx.num("project_id"),
|
|
3231
|
+
...readRequiredJsonObject(ctx, "req")
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
}
|
|
3235
|
+
var addChannel = {
|
|
3236
|
+
service: "engage",
|
|
3237
|
+
command: "+add_channel",
|
|
3238
|
+
description: "Create a new engage channel.",
|
|
3239
|
+
flags: [
|
|
3240
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3241
|
+
{ name: "req", type: "json", required: true, desc: "Channel creation request as JSON object" }
|
|
3242
|
+
],
|
|
3243
|
+
risk: "write",
|
|
3244
|
+
validate: (ctx) => {
|
|
3245
|
+
readRequiredJsonObject(ctx, "req");
|
|
3246
|
+
},
|
|
3247
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName24, toolName24, buildArgs24(ctx)),
|
|
3248
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName24, toolName24, buildArgs24(ctx))
|
|
3249
|
+
};
|
|
3250
|
+
|
|
3251
|
+
// src/commands/te-engage/setting/approver-list.ts
|
|
3252
|
+
var serviceName25 = "engage_setting";
|
|
3253
|
+
var toolName25 = "query_approver_list";
|
|
3254
|
+
function buildArgs25(ctx) {
|
|
3255
|
+
return { projectId: ctx.num("project_id") };
|
|
3256
|
+
}
|
|
3257
|
+
var approverList = {
|
|
3258
|
+
service: "engage",
|
|
3259
|
+
command: "+approver_list",
|
|
3260
|
+
description: "List approvers for a project.",
|
|
3261
|
+
flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
|
|
3262
|
+
risk: "read",
|
|
3263
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName25, toolName25, buildArgs25(ctx)),
|
|
3264
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName25, toolName25, buildArgs25(ctx))
|
|
3265
|
+
};
|
|
3266
|
+
|
|
3267
|
+
// src/commands/te-engage/setting/cancel-query-by-request-id.ts
|
|
3268
|
+
var serviceName26 = "engage_setting";
|
|
3269
|
+
var toolName26 = "cancel_query_by_request_id";
|
|
3270
|
+
function buildArgs26(ctx) {
|
|
3271
|
+
return { requestId: ctx.str("request_id") };
|
|
3272
|
+
}
|
|
3273
|
+
var cancelQueryByRequestId = {
|
|
3274
|
+
service: "engage",
|
|
3275
|
+
command: "+cancel_query_by_request_id",
|
|
3276
|
+
description: "Cancel a running report query by request ID.",
|
|
3277
|
+
flags: [{ name: "request_id", type: "string", required: true, desc: "Request ID to cancel" }],
|
|
3278
|
+
risk: "write",
|
|
3279
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName26, toolName26, buildArgs26(ctx)),
|
|
3280
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName26, toolName26, buildArgs26(ctx))
|
|
3281
|
+
};
|
|
3282
|
+
|
|
3283
|
+
// src/commands/te-engage/setting/channel-detail.ts
|
|
3284
|
+
var serviceName27 = "engage_setting";
|
|
3285
|
+
var toolName27 = "query_channel_detail";
|
|
3286
|
+
function buildArgs27(ctx) {
|
|
3287
|
+
return {
|
|
3288
|
+
projectId: ctx.num("project_id"),
|
|
3289
|
+
channelId: ctx.str("channel_id")
|
|
3290
|
+
};
|
|
3291
|
+
}
|
|
3292
|
+
var channelDetail = {
|
|
3293
|
+
service: "engage",
|
|
3294
|
+
command: "+channel_detail",
|
|
3295
|
+
description: "Get engage channel detail via MCP query_channel_detail.",
|
|
3296
|
+
flags: [
|
|
3297
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3298
|
+
{ name: "channel_id", type: "string", required: true, desc: "Channel ID" }
|
|
3299
|
+
],
|
|
3300
|
+
risk: "read",
|
|
3301
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName27, toolName27, buildArgs27(ctx)),
|
|
3302
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName27, toolName27, buildArgs27(ctx))
|
|
3303
|
+
};
|
|
3304
|
+
|
|
3305
|
+
// src/commands/te-engage/setting/channel-list.ts
|
|
3306
|
+
var serviceName28 = "engage_setting";
|
|
3307
|
+
var toolName28 = "query_channel_list";
|
|
3308
|
+
function buildArgs28(ctx) {
|
|
3309
|
+
const args = { projectId: ctx.num("project_id") };
|
|
3310
|
+
const providerList = readOptionalJsonArray(ctx, "provider_list");
|
|
3311
|
+
if (providerList !== void 0) args.providerList = providerList;
|
|
3312
|
+
const channelStatus = readOptionalNumber(ctx, "channel_status");
|
|
3313
|
+
if (channelStatus !== void 0) args.channelStatus = channelStatus;
|
|
3314
|
+
return args;
|
|
3315
|
+
}
|
|
3316
|
+
var channelList = {
|
|
3317
|
+
service: "engage",
|
|
3318
|
+
command: "+channel_list",
|
|
3319
|
+
description: "List engage channels via MCP query_channel_list.",
|
|
3320
|
+
flags: [
|
|
3321
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3322
|
+
{ name: "provider_list", type: "json", required: false, desc: "Provider list as JSON array" },
|
|
3323
|
+
{ name: "channel_status", type: "number", required: false, desc: "Channel status filter" }
|
|
3324
|
+
],
|
|
3325
|
+
risk: "read",
|
|
3326
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName28, toolName28, buildArgs28(ctx)),
|
|
3327
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName28, toolName28, buildArgs28(ctx))
|
|
3328
|
+
};
|
|
3329
|
+
|
|
3330
|
+
// src/commands/te-engage/setting/config-channel-detail.ts
|
|
3331
|
+
var serviceName29 = "engage_setting";
|
|
3332
|
+
var toolName29 = "query_config_channel_detail";
|
|
3333
|
+
function buildArgs29(ctx) {
|
|
3334
|
+
return {
|
|
3335
|
+
projectId: ctx.num("project_id"),
|
|
3336
|
+
channelId: ctx.str("channel_id")
|
|
3337
|
+
};
|
|
3338
|
+
}
|
|
3339
|
+
var configChannelDetail = {
|
|
3340
|
+
service: "engage",
|
|
3341
|
+
command: "+config_channel_detail",
|
|
3342
|
+
description: "Get config channel detail.",
|
|
3343
|
+
flags: [
|
|
3344
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3345
|
+
{ name: "channel_id", type: "string", required: true, desc: "Config channel ID" }
|
|
3346
|
+
],
|
|
3347
|
+
risk: "read",
|
|
3348
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName29, toolName29, buildArgs29(ctx)),
|
|
3349
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName29, toolName29, buildArgs29(ctx))
|
|
3350
|
+
};
|
|
3351
|
+
|
|
3352
|
+
// src/commands/te-engage/setting/config-channel-list.ts
|
|
3353
|
+
var serviceName30 = "engage_setting";
|
|
3354
|
+
var toolName30 = "query_config_channel_list";
|
|
3355
|
+
function buildArgs30(ctx) {
|
|
3356
|
+
const args = { projectId: ctx.num("project_id") };
|
|
3357
|
+
const channelType = readOptionalNumber(ctx, "channel_type");
|
|
3358
|
+
if (channelType !== void 0) args.channelType = channelType;
|
|
3359
|
+
return args;
|
|
3360
|
+
}
|
|
3361
|
+
var configChannelList = {
|
|
3362
|
+
service: "engage",
|
|
3363
|
+
command: "+config_channel_list",
|
|
3364
|
+
description: "List config channels.",
|
|
3365
|
+
flags: [
|
|
3366
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3367
|
+
{ name: "channel_type", type: "number", required: false, desc: "Config channel type" }
|
|
3368
|
+
],
|
|
3369
|
+
risk: "read",
|
|
3370
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName30, toolName30, buildArgs30(ctx)),
|
|
3371
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName30, toolName30, buildArgs30(ctx))
|
|
3372
|
+
};
|
|
3373
|
+
|
|
3374
|
+
// src/commands/te-engage/setting/delete-channel.ts
|
|
3375
|
+
var serviceName31 = "engage_setting";
|
|
3376
|
+
var toolName31 = "delete_channel";
|
|
3377
|
+
function buildArgs31(ctx) {
|
|
3378
|
+
return {
|
|
3379
|
+
projectId: ctx.num("project_id"),
|
|
3380
|
+
channelId: ctx.str("channel_id")
|
|
3381
|
+
};
|
|
3382
|
+
}
|
|
3383
|
+
var deleteChannel = {
|
|
3384
|
+
service: "engage",
|
|
3385
|
+
command: "+delete_channel",
|
|
3386
|
+
description: "Delete an engage channel.",
|
|
3387
|
+
flags: [
|
|
3388
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3389
|
+
{ name: "channel_id", type: "string", required: true, desc: "Channel ID" }
|
|
3390
|
+
],
|
|
3391
|
+
risk: "high-risk-write",
|
|
3392
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName31, toolName31, buildArgs31(ctx)),
|
|
3393
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName31, toolName31, buildArgs31(ctx))
|
|
3394
|
+
};
|
|
3395
|
+
|
|
3396
|
+
// src/commands/te-engage/setting/delete-config-channel.ts
|
|
3397
|
+
var serviceName32 = "engage_setting";
|
|
3398
|
+
var toolName32 = "delete_config_channel";
|
|
3399
|
+
function buildArgs32(ctx) {
|
|
3400
|
+
return {
|
|
3401
|
+
projectId: ctx.num("project_id"),
|
|
3402
|
+
channelId: ctx.str("channel_id")
|
|
3403
|
+
};
|
|
3404
|
+
}
|
|
3405
|
+
var deleteConfigChannel = {
|
|
3406
|
+
service: "engage",
|
|
3407
|
+
command: "+delete_config_channel",
|
|
3408
|
+
description: "Delete a config channel.",
|
|
3409
|
+
flags: [
|
|
3410
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3411
|
+
{ name: "channel_id", type: "string", required: true, desc: "Config channel ID" }
|
|
3412
|
+
],
|
|
3413
|
+
risk: "high-risk-write",
|
|
3414
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName32, toolName32, buildArgs32(ctx)),
|
|
3415
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName32, toolName32, buildArgs32(ctx))
|
|
3416
|
+
};
|
|
3417
|
+
|
|
3418
|
+
// src/commands/te-engage/setting/update-channel-status.ts
|
|
3419
|
+
var serviceName33 = "engage_setting";
|
|
3420
|
+
var toolName33 = "update_channel_status";
|
|
3421
|
+
function buildArgs33(ctx) {
|
|
3422
|
+
return {
|
|
3423
|
+
projectId: ctx.num("project_id"),
|
|
3424
|
+
channelId: ctx.str("channel_id"),
|
|
3425
|
+
status: ctx.num("status")
|
|
3426
|
+
};
|
|
3427
|
+
}
|
|
3428
|
+
var updateChannelStatus = {
|
|
3429
|
+
service: "engage",
|
|
3430
|
+
command: "+update_channel_status",
|
|
3431
|
+
description: "Update engage channel status.",
|
|
3432
|
+
flags: [
|
|
3433
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3434
|
+
{ name: "channel_id", type: "string", required: true, desc: "Channel ID" },
|
|
3435
|
+
{ name: "status", type: "number", required: true, desc: "Channel status" }
|
|
3436
|
+
],
|
|
3437
|
+
risk: "write",
|
|
3438
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName33, toolName33, buildArgs33(ctx)),
|
|
3439
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName33, toolName33, buildArgs33(ctx))
|
|
3440
|
+
};
|
|
3441
|
+
|
|
3442
|
+
// src/commands/te-engage/setting/update-config-channel-status.ts
|
|
3443
|
+
var serviceName34 = "engage_setting";
|
|
3444
|
+
var toolName34 = "update_config_channel_status";
|
|
3445
|
+
function buildArgs34(ctx) {
|
|
3446
|
+
return {
|
|
3447
|
+
projectId: ctx.num("project_id"),
|
|
3448
|
+
channelId: ctx.str("channel_id"),
|
|
3449
|
+
channelStatus: ctx.num("channel_status")
|
|
3450
|
+
};
|
|
3451
|
+
}
|
|
3452
|
+
var updateConfigChannelStatus = {
|
|
3453
|
+
service: "engage",
|
|
3454
|
+
command: "+update_config_channel_status",
|
|
3455
|
+
description: "Update config channel status.",
|
|
3456
|
+
flags: [
|
|
3457
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3458
|
+
{ name: "channel_id", type: "string", required: true, desc: "Config channel ID" },
|
|
3459
|
+
{ name: "channel_status", type: "number", required: true, desc: "Config channel status" }
|
|
3460
|
+
],
|
|
3461
|
+
risk: "write",
|
|
3462
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName34, toolName34, buildArgs34(ctx)),
|
|
3463
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName34, toolName34, buildArgs34(ctx))
|
|
3464
|
+
};
|
|
3465
|
+
|
|
3466
|
+
// src/commands/te-engage/setting/whitelist-list.ts
|
|
3467
|
+
var serviceName35 = "engage_setting";
|
|
3468
|
+
var toolName35 = "query_whitelist_list";
|
|
3469
|
+
function buildArgs35(ctx) {
|
|
3470
|
+
return { projectId: ctx.num("project_id") };
|
|
3471
|
+
}
|
|
3472
|
+
var whitelistList = {
|
|
3473
|
+
service: "engage",
|
|
3474
|
+
command: "+whitelist_list",
|
|
3475
|
+
description: "List whitelist entries for a project.",
|
|
3476
|
+
flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
|
|
3477
|
+
risk: "read",
|
|
3478
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName35, toolName35, buildArgs35(ctx)),
|
|
3479
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName35, toolName35, buildArgs35(ctx))
|
|
3480
|
+
};
|
|
3481
|
+
|
|
3482
|
+
// src/commands/te-engage/setting/index.ts
|
|
3483
|
+
var commands9 = [
|
|
3484
|
+
channelList,
|
|
3485
|
+
channelDetail,
|
|
3486
|
+
updateChannelStatus,
|
|
3487
|
+
deleteChannel,
|
|
3488
|
+
addChannel,
|
|
3489
|
+
whitelistList,
|
|
3490
|
+
addApprover,
|
|
3491
|
+
approverList,
|
|
3492
|
+
cancelQueryByRequestId,
|
|
3493
|
+
configChannelDetail,
|
|
3494
|
+
configChannelList,
|
|
3495
|
+
deleteConfigChannel,
|
|
3496
|
+
updateConfigChannelStatus
|
|
3497
|
+
];
|
|
3498
|
+
var setting_default = commands9;
|
|
3499
|
+
|
|
3500
|
+
// src/commands/te-engage/task/build-task-save-guide.ts
|
|
3501
|
+
var serviceName36 = "engage_task";
|
|
3502
|
+
var toolName36 = "build_task_save_guide";
|
|
3503
|
+
function buildArgs36(ctx) {
|
|
3504
|
+
return {
|
|
3505
|
+
projectId: ctx.num("project_id"),
|
|
3506
|
+
req: readRequiredJsonObject(ctx, "req")
|
|
3507
|
+
};
|
|
3508
|
+
}
|
|
3509
|
+
var buildTaskSaveGuide = {
|
|
3510
|
+
service: "engage",
|
|
3511
|
+
command: "+build_task_save_guide",
|
|
3512
|
+
description: "Build a scenario-specific guide for constructing save_task req.",
|
|
3513
|
+
flags: [
|
|
3514
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3515
|
+
{ name: "req", type: "json", required: true, desc: "Guide request as JSON object; use {} for a generic guide" }
|
|
3516
|
+
],
|
|
3517
|
+
risk: "read",
|
|
3518
|
+
validate: (ctx) => {
|
|
3519
|
+
readRequiredJsonObject(ctx, "req");
|
|
3520
|
+
},
|
|
3521
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName36, toolName36, buildArgs36(ctx)),
|
|
3522
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName36, toolName36, buildArgs36(ctx))
|
|
3523
|
+
};
|
|
3524
|
+
|
|
3525
|
+
// src/commands/te-engage/task/manage-task.ts
|
|
3526
|
+
var serviceName37 = "engage_task";
|
|
3527
|
+
var toolName37 = "manage_task";
|
|
3528
|
+
function buildArgs37(ctx) {
|
|
3529
|
+
const args = {
|
|
3530
|
+
projectId: ctx.num("project_id"),
|
|
3531
|
+
taskId: ctx.str("task_id"),
|
|
3532
|
+
action: ctx.str("action")
|
|
3533
|
+
};
|
|
3534
|
+
const reason = readOptionalString(ctx, "reason");
|
|
3535
|
+
if (reason) args.reason = reason;
|
|
3536
|
+
return args;
|
|
3537
|
+
}
|
|
3538
|
+
var manageTask = {
|
|
3539
|
+
service: "engage",
|
|
3540
|
+
command: "+manage_task",
|
|
3541
|
+
description: "Manage a task lifecycle action.",
|
|
3542
|
+
flags: [
|
|
3543
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3544
|
+
{ name: "task_id", type: "string", required: true, desc: "Task ID" },
|
|
3545
|
+
{ name: "action", type: "string", required: true, desc: "Action to perform" },
|
|
3546
|
+
{ name: "reason", type: "string", required: false, desc: "Reason for review actions" }
|
|
3547
|
+
],
|
|
3548
|
+
risk: "write",
|
|
3549
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName37, toolName37, buildArgs37(ctx)),
|
|
3550
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName37, toolName37, buildArgs37(ctx))
|
|
3551
|
+
};
|
|
3552
|
+
|
|
3553
|
+
// src/commands/te-engage/task/save-task.ts
|
|
3554
|
+
var serviceName38 = "engage_task";
|
|
3555
|
+
var toolName38 = "save_task";
|
|
3556
|
+
function buildArgs38(ctx) {
|
|
3557
|
+
return {
|
|
3558
|
+
projectId: ctx.num("project_id"),
|
|
3559
|
+
req: {
|
|
3560
|
+
projectId: ctx.num("project_id"),
|
|
3561
|
+
...readRequiredJsonObject(ctx, "req")
|
|
3562
|
+
}
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
var saveTask = {
|
|
3566
|
+
service: "engage",
|
|
3567
|
+
command: "+save_task",
|
|
3568
|
+
description: "Create or update a task draft.",
|
|
3569
|
+
flags: [
|
|
3570
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3571
|
+
{ name: "req", type: "json", required: true, desc: "Task save request as JSON object" }
|
|
3572
|
+
],
|
|
3573
|
+
risk: "write",
|
|
3574
|
+
validate: (ctx) => {
|
|
3575
|
+
readRequiredJsonObject(ctx, "req");
|
|
3576
|
+
},
|
|
3577
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName38, toolName38, buildArgs38(ctx)),
|
|
3578
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName38, toolName38, buildArgs38(ctx))
|
|
3579
|
+
};
|
|
3580
|
+
|
|
3581
|
+
// src/commands/te-engage/task/task-data-detail.ts
|
|
3582
|
+
var serviceName39 = "engage_task";
|
|
3583
|
+
var toolName39 = "query_task_data_detail";
|
|
3584
|
+
function buildArgs39(ctx) {
|
|
3585
|
+
const args = {
|
|
3586
|
+
projectId: ctx.num("project_id"),
|
|
3587
|
+
taskId: ctx.str("task_id"),
|
|
3588
|
+
detailType: ctx.str("detail_type"),
|
|
3589
|
+
startTime: ctx.str("start_time"),
|
|
3590
|
+
endTime: ctx.str("end_time")
|
|
3591
|
+
};
|
|
3592
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
3593
|
+
if (requestId) args.requestId = requestId;
|
|
3594
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
3595
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
3596
|
+
const taskInstanceId = readOptionalString(ctx, "task_instance_id");
|
|
3597
|
+
if (taskInstanceId) args.taskInstanceId = taskInstanceId;
|
|
3598
|
+
const dataDimType = readOptionalString(ctx, "data_dim_type");
|
|
3599
|
+
if (dataDimType) args.dataDimType = dataDimType;
|
|
3600
|
+
const retentionType = readOptionalString(ctx, "retention_type");
|
|
3601
|
+
if (retentionType) args.retentionType = retentionType;
|
|
3602
|
+
const dataViewType = readOptionalNumber(ctx, "data_view_type");
|
|
3603
|
+
if (dataViewType !== void 0) args.dataViewType = dataViewType;
|
|
3604
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
3605
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
3606
|
+
return args;
|
|
3607
|
+
}
|
|
3608
|
+
var taskDataDetail = {
|
|
3609
|
+
service: "engage",
|
|
3610
|
+
command: "+task_data_detail",
|
|
3611
|
+
description: "Query the detailed data report for one task.",
|
|
3612
|
+
flags: [
|
|
3613
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3614
|
+
{ name: "task_id", type: "string", required: true, desc: "Task ID" },
|
|
3615
|
+
{
|
|
3616
|
+
name: "detail_type",
|
|
3617
|
+
type: "string",
|
|
3618
|
+
required: true,
|
|
3619
|
+
desc: "Detail type: time | instance | instance_daily",
|
|
3620
|
+
hint: "Allowed --detail_type: time|instance|instance_daily (instance_daily also requires --task_instance_id). Example: --detail_type time --start_time 2026-04-01 --end_time 2026-04-07"
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
name: "start_time",
|
|
3624
|
+
type: "string",
|
|
3625
|
+
required: true,
|
|
3626
|
+
desc: "Start date (yyyy-MM-dd)",
|
|
3627
|
+
hint: "Pass --start_time as yyyy-MM-dd, e.g. 2026-04-01."
|
|
3628
|
+
},
|
|
3629
|
+
{
|
|
3630
|
+
name: "end_time",
|
|
3631
|
+
type: "string",
|
|
3632
|
+
required: true,
|
|
3633
|
+
desc: "End date (yyyy-MM-dd)",
|
|
3634
|
+
hint: "Pass --end_time as yyyy-MM-dd, e.g. 2026-04-07."
|
|
3635
|
+
},
|
|
3636
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
3637
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
3638
|
+
{ name: "task_instance_id", type: "string", required: false, desc: "Task instance ID (required when detail_type=instance_daily)" },
|
|
3639
|
+
{ name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
|
|
3640
|
+
{ name: "retention_type", type: "string", required: false, desc: "Retention type" },
|
|
3641
|
+
{ name: "data_view_type", type: "number", required: false, desc: "Trigger detail view type" },
|
|
3642
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
3643
|
+
],
|
|
3644
|
+
risk: "read",
|
|
3645
|
+
validate: (ctx) => {
|
|
3646
|
+
const detailType = ctx.str("detail_type");
|
|
3647
|
+
requireAllowedValue(detailType, ["time", "instance", "instance_daily"], "detail_type");
|
|
3648
|
+
if (detailType === "instance_daily" && !hasFlag(ctx, "task_instance_id")) {
|
|
3649
|
+
throw new Error("Flag --task_instance_id is required when --detail_type is instance_daily");
|
|
3650
|
+
}
|
|
3651
|
+
},
|
|
3652
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName39, toolName39, buildArgs39(ctx)),
|
|
3653
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName39, toolName39, buildArgs39(ctx))
|
|
3654
|
+
};
|
|
3655
|
+
|
|
3656
|
+
// src/commands/te-engage/task/task-data-overview.ts
|
|
3657
|
+
var serviceName40 = "engage_task";
|
|
3658
|
+
var toolName40 = "query_task_data_overview";
|
|
3659
|
+
function buildArgs40(ctx) {
|
|
3660
|
+
const args = {
|
|
3661
|
+
projectId: ctx.num("project_id"),
|
|
3662
|
+
taskId: ctx.str("task_id")
|
|
3663
|
+
};
|
|
3664
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
3665
|
+
if (requestId) args.requestId = requestId;
|
|
3666
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
3667
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
3668
|
+
const dataDimType = readOptionalString(ctx, "data_dim_type");
|
|
3669
|
+
if (dataDimType) args.dataDimType = dataDimType;
|
|
3670
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
3671
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
3672
|
+
return args;
|
|
3673
|
+
}
|
|
3674
|
+
var taskDataOverview = {
|
|
3675
|
+
service: "engage",
|
|
3676
|
+
command: "+task_data_overview",
|
|
3677
|
+
description: "Query the high-level data overview for one task.",
|
|
3678
|
+
flags: [
|
|
3679
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3680
|
+
{ name: "task_id", type: "string", required: true, desc: "Task ID" },
|
|
3681
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
3682
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
3683
|
+
{ name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
|
|
3684
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
3685
|
+
],
|
|
3686
|
+
risk: "read",
|
|
3687
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName40, toolName40, buildArgs40(ctx)),
|
|
3688
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName40, toolName40, buildArgs40(ctx))
|
|
3689
|
+
};
|
|
3690
|
+
|
|
3691
|
+
// src/commands/te-engage/task/task-detail.ts
|
|
3692
|
+
var serviceName41 = "engage_task";
|
|
3693
|
+
var toolName41 = "query_task_detail";
|
|
3694
|
+
function buildArgs41(ctx) {
|
|
3695
|
+
return {
|
|
3696
|
+
projectId: ctx.num("project_id"),
|
|
3697
|
+
taskId: ctx.str("task_id")
|
|
3698
|
+
};
|
|
3699
|
+
}
|
|
3700
|
+
var taskDetail = {
|
|
3701
|
+
service: "engage",
|
|
3702
|
+
command: "+task_detail",
|
|
3703
|
+
description: "Get detailed information for one task.",
|
|
3704
|
+
flags: [
|
|
3705
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3706
|
+
{ name: "task_id", type: "string", required: true, desc: "Task ID" }
|
|
3707
|
+
],
|
|
3708
|
+
risk: "read",
|
|
3709
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName41, toolName41, buildArgs41(ctx)),
|
|
3710
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName41, toolName41, buildArgs41(ctx))
|
|
3711
|
+
};
|
|
3712
|
+
|
|
3713
|
+
// src/commands/te-engage/task/task-experiment-report.ts
|
|
3714
|
+
var serviceName42 = "engage_task";
|
|
3715
|
+
var toolName42 = "query_task_experiment_report";
|
|
3716
|
+
function buildArgs42(ctx) {
|
|
3717
|
+
const args = {
|
|
3718
|
+
projectId: ctx.num("project_id"),
|
|
3719
|
+
taskId: ctx.str("task_id"),
|
|
3720
|
+
reportType: ctx.str("report_type"),
|
|
3721
|
+
startTime: ctx.str("start_time"),
|
|
3722
|
+
endTime: ctx.str("end_time")
|
|
3723
|
+
};
|
|
3724
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
3725
|
+
if (requestId) args.requestId = requestId;
|
|
3726
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
3727
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
3728
|
+
return args;
|
|
3729
|
+
}
|
|
3730
|
+
var taskExperimentReport = {
|
|
3731
|
+
service: "engage",
|
|
3732
|
+
command: "+task_experiment_report",
|
|
3733
|
+
description: "Query the experiment report for one task.",
|
|
3734
|
+
flags: [
|
|
3735
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3736
|
+
{ name: "task_id", type: "string", required: true, desc: "Task ID" },
|
|
3737
|
+
{ name: "report_type", type: "string", required: true, desc: "Report type: overview or detail" },
|
|
3738
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
3739
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
3740
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
3741
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" }
|
|
3742
|
+
],
|
|
3743
|
+
risk: "read",
|
|
3744
|
+
validate: (ctx) => {
|
|
3745
|
+
requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
|
|
3746
|
+
},
|
|
3747
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName42, toolName42, buildArgs42(ctx)),
|
|
3748
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName42, toolName42, buildArgs42(ctx))
|
|
3749
|
+
};
|
|
3750
|
+
|
|
3751
|
+
// src/commands/te-engage/task/task-list.ts
|
|
3752
|
+
var serviceName43 = "engage_task";
|
|
3753
|
+
var toolName43 = "query_task_list";
|
|
3754
|
+
function buildArgs43(ctx) {
|
|
3755
|
+
return {
|
|
3756
|
+
projectId: ctx.num("project_id"),
|
|
3757
|
+
req: {
|
|
3758
|
+
projectId: ctx.num("project_id"),
|
|
3759
|
+
...readRequiredJsonObject(ctx, "req")
|
|
3760
|
+
}
|
|
3761
|
+
};
|
|
3762
|
+
}
|
|
3763
|
+
var taskList = {
|
|
3764
|
+
service: "engage",
|
|
3765
|
+
command: "+task_list",
|
|
3766
|
+
description: "Query the paginated task list.",
|
|
3767
|
+
flags: [
|
|
3768
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3769
|
+
{ name: "req", type: "json", required: true, desc: "Task list request as JSON object" }
|
|
3770
|
+
],
|
|
3771
|
+
risk: "read",
|
|
3772
|
+
validate: (ctx) => {
|
|
3773
|
+
readRequiredJsonObject(ctx, "req");
|
|
3774
|
+
},
|
|
3775
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName43, toolName43, buildArgs43(ctx)),
|
|
3776
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName43, toolName43, buildArgs43(ctx))
|
|
3777
|
+
};
|
|
3778
|
+
|
|
3779
|
+
// src/commands/te-engage/task/task-metric-detail.ts
|
|
3780
|
+
var serviceName44 = "engage_task";
|
|
3781
|
+
var toolName44 = "query_task_metric_detail";
|
|
3782
|
+
function buildArgs44(ctx) {
|
|
3783
|
+
const args = {
|
|
3784
|
+
projectId: ctx.num("project_id"),
|
|
3785
|
+
taskId: ctx.str("task_id"),
|
|
3786
|
+
startTime: ctx.str("start_time"),
|
|
3787
|
+
endTime: ctx.str("end_time")
|
|
3788
|
+
};
|
|
3789
|
+
const requestId = readOptionalString(ctx, "request_id");
|
|
3790
|
+
if (requestId) args.requestId = requestId;
|
|
3791
|
+
const pushLanguageCode = readOptionalString(ctx, "push_language_code");
|
|
3792
|
+
if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
|
|
3793
|
+
const metricIdList = readOptionalJsonArray(ctx, "metric_id_list");
|
|
3794
|
+
if (metricIdList !== void 0) args.metricIdList = metricIdList;
|
|
3795
|
+
const groupType = readOptionalNumber(ctx, "group_type");
|
|
3796
|
+
if (groupType !== void 0) args.groupType = groupType;
|
|
3797
|
+
const showTimeZone = readOptionalString(ctx, "show_time_zone");
|
|
3798
|
+
if (showTimeZone) args.showTimeZone = showTimeZone;
|
|
3799
|
+
return args;
|
|
3800
|
+
}
|
|
3801
|
+
var taskMetricDetail = {
|
|
3802
|
+
service: "engage",
|
|
3803
|
+
command: "+task_metric_detail",
|
|
3804
|
+
description: "Query the metric-oriented detail report for one task.",
|
|
3805
|
+
flags: [
|
|
3806
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3807
|
+
{ name: "task_id", type: "string", required: true, desc: "Task ID" },
|
|
3808
|
+
{ name: "start_time", type: "string", required: true, desc: "Start date" },
|
|
3809
|
+
{ name: "end_time", type: "string", required: true, desc: "End date" },
|
|
3810
|
+
{ name: "request_id", type: "string", required: false, desc: "Request ID" },
|
|
3811
|
+
{ name: "push_language_code", type: "string", required: false, desc: "Push language code" },
|
|
3812
|
+
{ name: "metric_id_list", type: "json", required: false, desc: "Metric ID list as JSON array" },
|
|
3813
|
+
{ name: "group_type", type: "number", required: false, desc: "Grouping type" },
|
|
3814
|
+
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
3815
|
+
],
|
|
3816
|
+
risk: "read",
|
|
3817
|
+
validate: (ctx) => {
|
|
3818
|
+
readOptionalJsonArray(ctx, "metric_id_list");
|
|
3819
|
+
},
|
|
3820
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName44, toolName44, buildArgs44(ctx)),
|
|
3821
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName44, toolName44, buildArgs44(ctx))
|
|
3822
|
+
};
|
|
3823
|
+
|
|
3824
|
+
// src/commands/te-engage/task/task-stats.ts
|
|
3825
|
+
var serviceName45 = "engage_task";
|
|
3826
|
+
var toolName45 = "get_task_stats";
|
|
3827
|
+
function buildArgs45(ctx) {
|
|
3828
|
+
return {
|
|
3829
|
+
projectId: ctx.num("project_id"),
|
|
3830
|
+
req: {
|
|
3831
|
+
projectId: ctx.num("project_id"),
|
|
3832
|
+
...readRequiredJsonObject(ctx, "req")
|
|
3833
|
+
}
|
|
3834
|
+
};
|
|
3835
|
+
}
|
|
3836
|
+
var taskStats = {
|
|
3837
|
+
service: "engage",
|
|
3838
|
+
command: "+task_stats",
|
|
3839
|
+
description: "Get status statistics for tasks.",
|
|
3840
|
+
flags: [
|
|
3841
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3842
|
+
{ name: "req", type: "json", required: true, desc: "Task stats request as JSON object" }
|
|
3843
|
+
],
|
|
3844
|
+
risk: "read",
|
|
3845
|
+
validate: (ctx) => {
|
|
3846
|
+
readRequiredJsonObject(ctx, "req");
|
|
3847
|
+
},
|
|
3848
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName45, toolName45, buildArgs45(ctx)),
|
|
3849
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName45, toolName45, buildArgs45(ctx))
|
|
3850
|
+
};
|
|
3851
|
+
|
|
3852
|
+
// src/commands/te-engage/task/index.ts
|
|
3853
|
+
var commands10 = [
|
|
3854
|
+
taskDataOverview,
|
|
3855
|
+
taskDataDetail,
|
|
3856
|
+
taskMetricDetail,
|
|
3857
|
+
taskExperimentReport,
|
|
3858
|
+
taskDetail,
|
|
3859
|
+
taskList,
|
|
3860
|
+
taskStats,
|
|
3861
|
+
buildTaskSaveGuide,
|
|
3862
|
+
saveTask,
|
|
3863
|
+
manageTask
|
|
3864
|
+
];
|
|
3865
|
+
var task_default = commands10;
|
|
3866
|
+
|
|
3867
|
+
// src/commands/te-engage/index.ts
|
|
3868
|
+
registerCapabilityGatewayRoute("engage-flow", { gatewayDomain: "engage" });
|
|
3869
|
+
registerCapabilityGatewayRoute("engage-task", { gatewayDomain: "engage" });
|
|
3870
|
+
registerCapabilityGatewayRoute("engage-setting", { gatewayDomain: "engage" });
|
|
3871
|
+
registerCapabilityGatewayRoute("engage-scene", { gatewayDomain: "engage" });
|
|
3872
|
+
registerCapabilityGatewayRoute("engage-activity", { gatewayDomain: "engage" });
|
|
3873
|
+
registerCapabilityGatewayRoute("engage-workbench", { gatewayDomain: "engage" });
|
|
3874
|
+
registerMcpMappings({
|
|
3875
|
+
"engage_config": { componentName: "engage", mappingPath: "config" },
|
|
3876
|
+
"engage_flow": { componentName: "engage", mappingPath: "flow" },
|
|
3877
|
+
"engage_setting": { componentName: "engage", mappingPath: "setting" },
|
|
3878
|
+
"engage_task": { componentName: "engage", mappingPath: "task" }
|
|
3879
|
+
});
|
|
3880
|
+
var commands11 = [
|
|
3881
|
+
...setting_default,
|
|
3882
|
+
...task_default,
|
|
3883
|
+
...config_default,
|
|
3884
|
+
...flow_default,
|
|
3885
|
+
...engage_flow_default,
|
|
3886
|
+
...engage_task_default,
|
|
3887
|
+
...engage_setting_default,
|
|
3888
|
+
...engage_scene_default,
|
|
3889
|
+
...engage_activity_default,
|
|
3890
|
+
...engage_workbench_default
|
|
3891
|
+
];
|
|
3892
|
+
var te_engage_default = commands11;
|
|
3893
|
+
export {
|
|
3894
|
+
te_engage_default as default
|
|
3895
|
+
};
|