wjx-cli 0.1.10 → 0.1.12

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.
Files changed (34) hide show
  1. package/README.md +887 -889
  2. package/bundled/wjx-cli-expert.md +102 -0
  3. package/bundled/wjx-cli-use/SKILL.md +111 -0
  4. package/bundled/wjx-cli-use/references/analytics-commands.md +159 -0
  5. package/bundled/wjx-cli-use/references/contacts-commands.md +330 -0
  6. package/bundled/wjx-cli-use/references/dsl-syntax.md +160 -0
  7. package/bundled/wjx-cli-use/references/question-types.md +102 -0
  8. package/bundled/wjx-cli-use/references/response-commands.md +164 -0
  9. package/bundled/wjx-cli-use/references/survey-commands.md +194 -0
  10. package/dist/commands/init.js +129 -62
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/reference.js +332 -328
  13. package/dist/commands/reference.js.map +1 -1
  14. package/dist/commands/response.js +17 -50
  15. package/dist/commands/response.js.map +1 -1
  16. package/dist/commands/skill.d.ts +2 -0
  17. package/dist/commands/skill.js +46 -0
  18. package/dist/commands/skill.js.map +1 -0
  19. package/dist/commands/survey.js +1 -1
  20. package/dist/commands/survey.js.map +1 -1
  21. package/dist/commands/update.d.ts +2 -0
  22. package/dist/commands/update.js +76 -0
  23. package/dist/commands/update.js.map +1 -0
  24. package/dist/commands/user-system.js +4 -27
  25. package/dist/commands/user-system.js.map +1 -1
  26. package/dist/index.js +4 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/lib/command-helpers.d.ts +2 -0
  29. package/dist/lib/command-helpers.js +2 -1
  30. package/dist/lib/command-helpers.js.map +1 -1
  31. package/dist/lib/install-skill.d.ts +23 -0
  32. package/dist/lib/install-skill.js +96 -0
  33. package/dist/lib/install-skill.js.map +1 -0
  34. package/package.json +3 -2
@@ -4,7 +4,7 @@ import { LABEL_TO_TYPE, TYPE_MAP } from "wjx-api-sdk";
4
4
  function buildDslLabelSection() {
5
5
  // Group by primary label (skip aliases)
6
6
  const seen = new Set();
7
- const lines = [];
7
+ const entries = [];
8
8
  for (const [label, internalType] of Object.entries(LABEL_TO_TYPE)) {
9
9
  if (seen.has(internalType))
10
10
  continue;
@@ -12,7 +12,6 @@ function buildDslLabelSection() {
12
12
  const typeInfo = TYPE_MAP[internalType];
13
13
  if (!typeInfo)
14
14
  continue;
15
- // Find aliases (other labels mapping to same internal type)
16
15
  const aliases = Object.entries(LABEL_TO_TYPE)
17
16
  .filter(([l, t]) => t === internalType && l !== label)
18
17
  .map(([l]) => l);
@@ -23,358 +22,363 @@ function buildDslLabelSection() {
23
22
  const aliasStr = aliases.length > 0
24
23
  ? `(别名:${aliases.map(a => `[${a}]`).join("、")})`
25
24
  : "";
26
- lines.push(` [${label}]${" ".repeat(Math.max(1, 14 - label.length))}→ ${typeStr}${aliasStr}`);
25
+ entries.push({ label, typeStr, aliasStr });
27
26
  }
28
- return lines.join("\n");
27
+ const maxLen = Math.max(...entries.map(e => e.label.length));
28
+ return entries
29
+ .map(e => ` [${e.label}]${" ".repeat(Math.max(1, maxLen - e.label.length + 2))}→ ${e.typeStr}${e.aliasStr}`)
30
+ .join("\n");
29
31
  }
30
32
  // ─── Inline reference data ───
31
33
  const TOPICS = {
32
34
  "dsl": {
33
35
  title: "DSL 文本语法参考",
34
- content: `# DSL 文本语法
35
-
36
- 用于 \`wjx survey create-by-text --text "..."\` 的问卷 DSL 格式。
37
-
38
- ## 结构
39
-
40
- 第 1 行:问卷标题
41
- 第 2 行(可选):问卷描述
42
- 空行后:题目列表
43
-
44
- ## 题目格式
45
-
46
- 序号. 题目标题[类型标签]
47
- A. 选项1
48
- B. 选项2
49
- ...
50
-
51
- ## 支持的类型标签(自动生成,与解析器一致)
52
-
53
- ${buildDslLabelSection()}
54
-
55
- ## 填空题占位符
56
-
57
- 使用 {_} 表示填空位置:
58
- 请输入姓名:{_}[填空题]
59
- {_}是中国的首都[多项填空题]
60
-
61
- ## 量表题格式
62
-
63
- 选项用 最小值~最大值 格式:
64
- 1. 满意度评分[量表题]
65
- 1~5
66
-
67
- ## 矩阵题格式
68
-
69
- 题目后使用 "行:" 标记行标题(也支持 "Rows:"):
70
- 1. 请评价各方面[矩阵量表题]
71
- 行:
72
- - 沟通能力
73
- - 团队协作
74
-
75
- 1~5
76
-
77
- ## 选填标记
78
-
79
- 在标签后加 (选填)(中文全角括号):
80
- 1. 您的建议[填空题](选填)
81
-
82
- ## 示例
83
-
84
- 英语考试
85
- 期末英语测试
86
-
87
- 1. What is the capital of France?[单选题]
88
- A. London
89
- B. Paris
90
- C. Berlin
91
-
92
- 2. Select all prime numbers:[多选题]
93
- A. 2
94
- B. 4
95
- C. 7
96
-
97
- 3. True or False: Earth is flat.[判断题]
98
- A. 正确
99
- B. 错误
100
-
101
- 4. The answer is {_}[填空题]
102
-
103
- ## 限制
104
-
105
- DSL 不支持:逻辑跳转、验证规则、计分规则、随机化、自定义样式。
36
+ content: `# DSL 文本语法
37
+
38
+ 用于 \`wjx survey create-by-text --text "..."\` 的问卷 DSL 格式。
39
+
40
+ ## 结构
41
+
42
+ 第 1 行:问卷标题
43
+ 第 2 行(可选):问卷描述
44
+ 空行后:题目列表
45
+
46
+ ## 题目格式
47
+
48
+ 序号. 题目标题[类型标签]
49
+ A. 选项1
50
+ B. 选项2
51
+ ...
52
+
53
+ ## 支持的类型标签(自动生成,与解析器一致)
54
+
55
+ ${buildDslLabelSection()}
56
+
57
+ ## 填空题占位符
58
+
59
+ 使用 {_} 表示填空位置:
60
+ 请输入姓名:{_}[填空题]
61
+ {_}是中国的首都[多项填空题]
62
+
63
+ ## 量表题格式
64
+
65
+ 选项用 最小值~最大值 格式:
66
+ 1. 满意度评分[量表题]
67
+ 1~5
68
+
69
+ ## 矩阵题格式
70
+
71
+ 题目后使用 "行:" 标记行标题(也支持 "Rows:"):
72
+ 1. 请评价各方面[矩阵量表题]
73
+ 行:
74
+ - 沟通能力
75
+ - 团队协作
76
+
77
+ 1~5
78
+
79
+ ## 选填标记
80
+
81
+ 在标签后加 (选填)(中文全角括号):
82
+ 1. 您的建议[填空题](选填)
83
+
84
+ ## 示例
85
+
86
+ 英语考试
87
+ 期末英语测试
88
+
89
+ 1. What is the capital of France?[单选题]
90
+ A. London
91
+ B. Paris
92
+ C. Berlin
93
+
94
+ 2. Select all prime numbers:[多选题]
95
+ A. 2
96
+ B. 4
97
+ C. 7
98
+
99
+ 3. True or False: Earth is flat.[判断题]
100
+ A. 正确
101
+ B. 错误
102
+
103
+ 4. The answer is {_}[填空题]
104
+
105
+ ## 限制
106
+
107
+ DSL 不支持:逻辑跳转、验证规则、计分规则、随机化、自定义样式。
106
108
  这些需要创建后通过 wjx survey update-settings 设置。`,
107
109
  },
108
110
  "question-types": {
109
111
  title: "题型与问卷类型映射表",
110
- content: `# 题型映射表 (q_type / q_subtype)
111
-
112
- ## 主类型
113
-
114
- q_type=1 分页
115
- q_type=2 段落说明
116
- q_type=3 单选题
117
- q_type=4 多选题
118
- q_type=5 填空题
119
- q_type=6 多项填空题
120
- q_type=7 矩阵题
121
- q_type=8 文件上传
122
- q_type=9 比重题
123
- q_type=10 滑动条题
124
-
125
- ## 单选子类型 (q_type=3)
126
-
127
- q_subtype=3 标准单选
128
- q_subtype=301 下拉框
129
- q_subtype=302 量表
130
- q_subtype=303 评分单选
131
- q_subtype=304 情景题
132
- q_subtype=305 判断题
133
-
134
- ## 多选子类型 (q_type=4)
135
-
136
- q_subtype=4 标准多选
137
- q_subtype=401 评分多选
138
- q_subtype=402 排序题
139
- q_subtype=403 商品题
140
-
141
- ## 填空子类型 (q_type=5)
142
-
143
- q_subtype=5 标准填空
144
- q_subtype=501 多级下拉
145
-
146
- ## 多项填空子类型 (q_type=6)
147
-
148
- q_subtype=6 标准多项填空
149
- q_subtype=601 考试填空
150
- q_subtype=602 完形填空
151
-
152
- ## 矩阵子类型 (q_type=7)
153
-
154
- q_subtype=7 矩阵通用
155
- q_subtype=701 矩阵量表
156
- q_subtype=702 矩阵单选
157
- q_subtype=703 矩阵多选
158
- q_subtype=704 矩阵填空
159
- q_subtype=705 矩阵滑块
160
- q_subtype=706 矩阵评分
161
- q_subtype=707 矩阵数字
162
- q_subtype=708 矩阵表格(下拉)
163
- q_subtype=709 矩阵NPS
164
- q_subtype=710 矩阵表格(填空)
165
- q_subtype=711 矩阵表格(单选)
166
- q_subtype=712 矩阵表格(通用)
167
-
168
- ## 文件上传子类型 (q_type=8)
169
-
170
- q_subtype=8 文件上传
171
- q_subtype=801 绘图
172
-
173
- # 问卷类型 (atype)
174
-
175
- atype=0 默认(调查问卷)
176
- atype=1 调查问卷
177
- atype=2 测评
178
- atype=3 投票
179
- atype=4 360度评估
180
- atype=6 考试
181
- atype=7 报名表单
182
- atype=8 用户系统
183
- atype=9 教学评估
184
- atype=10 量表
185
- atype=11 民主测评
186
-
187
- # 问卷状态 (status)
188
-
189
- status=0 未发布
190
- status=1 已发布
191
- status=2 已暂停
192
- status=3 已删除
193
- status=4 彻底删除
194
- status=5 审核中
195
-
196
- ## 考试问卷注意事项
197
-
198
- 创建考试时使用 --type 6 (atype=6)。
112
+ content: `# 题型映射表 (q_type / q_subtype)
113
+
114
+ ## 主类型
115
+
116
+ q_type=1 分页
117
+ q_type=2 段落说明
118
+ q_type=3 单选题
119
+ q_type=4 多选题
120
+ q_type=5 填空题
121
+ q_type=6 多项填空题
122
+ q_type=7 矩阵题
123
+ q_type=8 文件上传
124
+ q_type=9 比重题
125
+ q_type=10 滑动条题
126
+
127
+ ## 单选子类型 (q_type=3)
128
+
129
+ q_subtype=3 标准单选
130
+ q_subtype=301 下拉框
131
+ q_subtype=302 量表
132
+ q_subtype=303 评分单选
133
+ q_subtype=304 情景题
134
+ q_subtype=305 判断题
135
+
136
+ ## 多选子类型 (q_type=4)
137
+
138
+ q_subtype=4 标准多选
139
+ q_subtype=401 评分多选
140
+ q_subtype=402 排序题
141
+ q_subtype=403 商品题
142
+
143
+ ## 填空子类型 (q_type=5)
144
+
145
+ q_subtype=5 标准填空
146
+ q_subtype=501 多级下拉
147
+
148
+ ## 多项填空子类型 (q_type=6)
149
+
150
+ q_subtype=6 标准多项填空
151
+ q_subtype=601 考试填空
152
+ q_subtype=602 完形填空
153
+
154
+ ## 矩阵子类型 (q_type=7)
155
+
156
+ q_subtype=7 矩阵通用
157
+ q_subtype=701 矩阵量表
158
+ q_subtype=702 矩阵单选
159
+ q_subtype=703 矩阵多选
160
+ q_subtype=704 矩阵填空
161
+ q_subtype=705 矩阵滑块
162
+ q_subtype=706 矩阵评分
163
+ q_subtype=707 矩阵数字
164
+ q_subtype=708 矩阵表格(下拉)
165
+ q_subtype=709 矩阵NPS
166
+ q_subtype=710 矩阵表格(填空)
167
+ q_subtype=711 矩阵表格(单选)
168
+ q_subtype=712 矩阵表格(通用)
169
+
170
+ ## 文件上传子类型 (q_type=8)
171
+
172
+ q_subtype=8 文件上传
173
+ q_subtype=801 绘图
174
+
175
+ # 问卷类型 (atype)
176
+
177
+ atype=0 默认(调查问卷)
178
+ atype=1 调查问卷
179
+ atype=2 测评
180
+ atype=3 投票
181
+ atype=4 360度评估
182
+ atype=6 考试
183
+ atype=7 报名表单
184
+ atype=8 用户系统
185
+ atype=9 教学评估
186
+ atype=10 量表
187
+ atype=11 民主测评
188
+
189
+ # 问卷状态 (status)
190
+
191
+ status=0 未发布
192
+ status=1 已发布
193
+ status=2 已暂停
194
+ status=3 已删除
195
+ status=4 彻底删除
196
+ status=5 审核中
197
+
198
+ ## 考试问卷注意事项
199
+
200
+ 创建考试时使用 --type 6 (atype=6)。
199
201
  考试支持评分单选(303)、评分多选(401)、判断题(305)等。`,
200
202
  },
201
203
  "survey": {
202
204
  title: "survey 模块命令参考",
203
- content: `# survey 模块命令参考
204
-
205
- ## wjx survey list
206
- 列出问卷列表。
207
- --page <n> 页码(默认 1)
208
- --page_size <n> 每页数量(默认 10)
209
- --status <n> 状态筛选:0=未发布, 1=已发布, 2=暂停, 3=删除
210
- --atype <n> 问卷类型:1=调查, 6=考试, 7=报名 等
211
- --name_like <s> 名称模糊搜索
212
-
213
- ## wjx survey get
214
- 获取问卷详情(含题目和选项)。
215
- --vid <n> 问卷ID(必填)
216
-
217
- ## wjx survey create
218
- 用 JSON 创建问卷。
219
- --title <s> 问卷标题(必填)
220
- --type <n> 问卷类型(默认 0)
221
- --description <s> 问卷描述
222
- --questions <json> 题目JSON数组(见 question-types 参考)
223
- --source_vid <s> 复制源问卷ID(与 questions 互斥)
224
- --publish 创建后立即发布
225
-
226
- ## wjx survey create-by-text (推荐)
227
- 用 DSL 文本创建问卷,无需手写 JSON。
228
- --text <s> DSL 格式文本(见 dsl 参考)
229
- --file <path> 从文件读取 DSL 文本
230
- --type <n> 问卷类型:1=调查, 6=考试
231
- --publish 创建后发布
232
- --creater <s> 创建者子账号
233
-
234
- ## wjx survey delete
235
- 删除问卷。
236
- --vid <n> 问卷ID(必填)
237
- --username <s> 用户名(必填)
238
- --completely 彻底删除(不可恢复)
239
-
240
- ## wjx survey status
241
- 更新问卷状态。
242
- --vid <n> 问卷ID(必填)
243
- --state <n> 目标状态:1=发布, 2=暂停, 3=删除
244
-
245
- ## wjx survey settings
246
- 获取问卷设置。
247
- --vid <n> 问卷ID(必填)
248
-
249
- ## wjx survey update-settings
250
- 更新问卷设置。
251
- --vid <n> 问卷ID(必填)
252
- --api_setting <json> API设置
253
- --after_submit_setting <json> 提交后设置
254
- --msg_setting <json> 消息设置
255
- --sojumpparm_setting <json> 参数设置
256
- --time_setting <json> 时间设置
257
-
258
- ## wjx survey export-text
259
- 导出问卷为纯文本。
260
- --vid <n> 问卷ID(必填)
261
- --raw 输出纯文本(不包裹 JSON)
262
-
263
- ## wjx survey url
264
- 生成问卷 URL。
265
- --mode <s> 模式: create 或 edit
266
- --name <s> 问卷名称(create模式)
267
- --activity <n> 问卷vid(edit模式必填)
268
-
269
- ## wjx survey tags / tag-details / clear-bin / upload
205
+ content: `# survey 模块命令参考
206
+
207
+ ## wjx survey list
208
+ 列出问卷列表。
209
+ --page <n> 页码(默认 1)
210
+ --page_size <n> 每页数量(默认 10)
211
+ --status <n> 状态筛选:0=未发布, 1=已发布, 2=暂停, 3=删除
212
+ --atype <n> 问卷类型:1=调查, 6=考试, 7=报名 等
213
+ --name_like <s> 名称模糊搜索
214
+
215
+ ## wjx survey get
216
+ 获取问卷详情(含题目和选项)。
217
+ --vid <n> 问卷ID(必填)
218
+
219
+ ## wjx survey create
220
+ 用 JSON 创建问卷。
221
+ --title <s> 问卷标题(必填)
222
+ --type <n> 问卷类型(默认 0)
223
+ --description <s> 问卷描述
224
+ --questions <json> 题目JSON数组(见 question-types 参考)
225
+ --source_vid <s> 复制源问卷ID(与 questions 互斥)
226
+ --publish 创建后立即发布
227
+
228
+ ## wjx survey create-by-text (推荐)
229
+ 用 DSL 文本创建问卷,无需手写 JSON。
230
+ --text <s> DSL 格式文本(见 dsl 参考)
231
+ --file <path> 从文件读取 DSL 文本
232
+ --type <n> 问卷类型:1=调查, 6=考试
233
+ --publish 创建后发布
234
+ --creater <s> 创建者子账号
235
+
236
+ ## wjx survey delete
237
+ 删除问卷。
238
+ --vid <n> 问卷ID(必填)
239
+ --username <s> 用户名(必填)
240
+ --completely 彻底删除(不可恢复)
241
+
242
+ ## wjx survey status
243
+ 更新问卷状态。
244
+ --vid <n> 问卷ID(必填)
245
+ --state <n> 目标状态:1=发布, 2=暂停, 3=删除
246
+
247
+ ## wjx survey settings
248
+ 获取问卷设置。
249
+ --vid <n> 问卷ID(必填)
250
+
251
+ ## wjx survey update-settings
252
+ 更新问卷设置。
253
+ --vid <n> 问卷ID(必填)
254
+ --api_setting <json> API设置
255
+ --after_submit_setting <json> 提交后设置
256
+ --msg_setting <json> 消息设置
257
+ --sojumpparm_setting <json> 参数设置
258
+ --time_setting <json> 时间设置
259
+
260
+ ## wjx survey export-text
261
+ 导出问卷为纯文本。
262
+ --vid <n> 问卷ID(必填)
263
+ --raw 输出纯文本(不包裹 JSON)
264
+
265
+ ## wjx survey url
266
+ 生成问卷 URL。
267
+ --mode <s> 模式: create 或 edit
268
+ --name <s> 问卷名称(create模式)
269
+ --activity <n> 问卷vid(edit模式必填)
270
+
271
+ ## wjx survey tags / tag-details / clear-bin / upload
270
272
  详见 wjx survey <cmd> --help`,
271
273
  },
272
274
  "response": {
273
275
  title: "response 模块命令参考",
274
- content: `# response 模块命令参考
275
-
276
- ## wjx response count
277
- 获取问卷答题数量。
278
- --vid <n> 问卷ID(必填)
279
- 返回 { total_count, join_times }
280
-
281
- ## wjx response query
282
- 分页查询答卷数据。
283
- --vid <n> 问卷ID(必填)
284
- --page_index <n> 页码
285
- --page_size <n> 每页数量(最大 200)
286
- --begin_time <n> 开始时间(Unix 毫秒)
287
- --end_time <n> 结束时间(Unix 毫秒)
288
-
289
- ## wjx response realtime
290
- 实时增量查询(用于轮询新数据)。
291
- --vid <n> 问卷ID(必填)
292
- --count <n> 返回条数
293
-
294
- ## wjx response download
295
- 下载答卷数据。
296
- --vid <n> 问卷ID(必填)
297
-
298
- ## wjx response submit
299
- 提交一条答卷。
300
- --vid <n> 问卷ID(必填)
301
- --submitdata <s> 答题数据(必填,格式:题号$答案}题号$答案)
302
- --inputcosttime <n> 答题耗时秒数(必填)
303
- --submittime <s> 提交时间(可选)
304
-
305
- submitdata 编码规则:
306
- } 分隔不同题目
307
- $ 分隔题号与答案
308
- | 分隔多选的多个选项
309
- 示例:"1$2}2$hello}3$1|3" = 第1题选B, 第2题填hello, 第3题选A和C
310
-
311
- ## wjx response modify
312
- 修改答卷数据。
313
- --vid <n> 问卷ID(必填)
314
- --jid <n> 答卷ID(必填)
315
- --answers <s> 新答案数据
316
-
317
- ## wjx response clear
318
- 清空答卷数据。
319
- --vid <n> 问卷ID(必填)
320
- --username <s> 用户名(必填)
321
-
322
- ## wjx response report / files / winners / 360-report
276
+ content: `# response 模块命令参考
277
+
278
+ ## wjx response count
279
+ 获取问卷答题数量。
280
+ --vid <n> 问卷ID(必填)
281
+ 返回 { total_count, join_times }
282
+
283
+ ## wjx response query
284
+ 分页查询答卷数据。
285
+ --vid <n> 问卷ID(必填)
286
+ --page_index <n> 页码
287
+ --page_size <n> 每页数量(最大 200)
288
+ --begin_time <n> 开始时间(Unix 毫秒)
289
+ --end_time <n> 结束时间(Unix 毫秒)
290
+
291
+ ## wjx response realtime
292
+ 实时增量查询(用于轮询新数据)。
293
+ --vid <n> 问卷ID(必填)
294
+ --count <n> 返回条数
295
+
296
+ ## wjx response download
297
+ 下载答卷数据。
298
+ --vid <n> 问卷ID(必填)
299
+
300
+ ## wjx response submit
301
+ 提交一条答卷。
302
+ --vid <n> 问卷ID(必填)
303
+ --submitdata <s> 答题数据(必填,格式:题号$答案}题号$答案)
304
+ --inputcosttime <n> 答题耗时秒数(必填)
305
+ --submittime <s> 提交时间(可选)
306
+
307
+ submitdata 编码规则:
308
+ } 分隔不同题目
309
+ $ 分隔题号与答案
310
+ | 分隔多选的多个选项
311
+ 示例:"1$2}2$hello}3$1|3" = 第1题选B, 第2题填hello, 第3题选A和C
312
+
313
+ ## wjx response modify
314
+ 修改答卷数据。
315
+ --vid <n> 问卷ID(必填)
316
+ --jid <n> 答卷ID(必填)
317
+ --answers <s> 新答案数据
318
+
319
+ ## wjx response clear
320
+ 清空答卷数据。
321
+ --vid <n> 问卷ID(必填)
322
+ --username <s> 用户名(必填)
323
+
324
+ ## wjx response report / files / winners / 360-report
323
325
  详见 wjx response <cmd> --help`,
324
326
  },
325
327
  "analytics": {
326
328
  title: "analytics 分析命令参考",
327
- content: `# analytics 模块命令参考
328
-
329
- 所有 analytics 命令为本地计算,不需要 API Key。
330
-
331
- ## wjx analytics decode
332
- 解码答卷数据。
333
- --submitdata <s> 编码后的答题字符串(必填)
334
- 返回 { answers: [...], count: N }
335
-
336
- ## wjx analytics nps
337
- 计算 NPS(净推荐值)。
338
- --scores <json> 评分数组,如 [9,10,7,3,8](必填)
339
- 评分范围 0-10:
340
- 9-10 = 推荐者(Promoter)
341
- 7-8 = 被动者(Passive)
342
- 0-6 = 贬损者(Detractor)
343
- NPS = %推荐者 - %贬损者(范围 -100 ~ +100)
344
- 行业基准:>50 优秀, >70 卓越
345
-
346
- ## wjx analytics csat
347
- 计算 CSAT(客户满意度)。
348
- --scores <json> 评分数组(必填)
349
- --threshold <n> 满意阈值(默认 4)
350
- CSAT = 评分>=阈值的比例 × 100
351
- 行业基准:>80% 良好, >90% 优秀
352
-
353
- ## wjx analytics anomalies
354
- 检测异常答卷。
355
- --responses <json> 答卷数组 JSON(必填)
356
- 检测模式:答题时间过短、重复答案模式、直线填答
357
-
358
- ## wjx analytics compare
359
- 对比两组指标。
360
- --set_a <json> A组指标 JSON(必填)
361
- --set_b <json> B组指标 JSON(必填)
362
- 返回各指标的差异和变化百分比
363
-
364
- ## wjx analytics decode-push
365
- 解密数据推送载荷。
366
- --payload <s> 加密的 payload(必填)
367
- --key <s> AppKey / 解密密钥(必填)
329
+ content: `# analytics 模块命令参考
330
+
331
+ 所有 analytics 命令为本地计算,不需要 API Key。
332
+
333
+ ## wjx analytics decode
334
+ 解码答卷数据。
335
+ --submitdata <s> 编码后的答题字符串(必填)
336
+ 返回 { answers: [...], count: N }
337
+
338
+ ## wjx analytics nps
339
+ 计算 NPS(净推荐值)。
340
+ --scores <json> 评分数组,如 [9,10,7,3,8](必填)
341
+ 评分范围 0-10:
342
+ 9-10 = 推荐者(Promoter)
343
+ 7-8 = 被动者(Passive)
344
+ 0-6 = 贬损者(Detractor)
345
+ NPS = %推荐者 - %贬损者(范围 -100 ~ +100)
346
+ 行业基准:>50 优秀, >70 卓越
347
+
348
+ ## wjx analytics csat
349
+ 计算 CSAT(客户满意度)。
350
+ --scores <json> 评分数组(必填)
351
+ --scale <s> 量表类型:5-point(默认)或 7-point
352
+ CSAT = 满意评分的比例 × 100
353
+ 行业基准:>80% 良好, >90% 优秀
354
+
355
+ ## wjx analytics anomalies
356
+ 检测异常答卷。
357
+ --responses <json> 答卷数组 JSON(必填)
358
+ 检测模式:答题时间过短、重复答案模式、直线填答
359
+
360
+ ## wjx analytics compare
361
+ 对比两组指标。
362
+ --set_a <json> A组指标 JSON(必填)
363
+ --set_b <json> B组指标 JSON(必填)
364
+ 返回各指标的差异和变化百分比
365
+
366
+ ## wjx analytics decode-push
367
+ 解密数据推送载荷。
368
+ --payload <s> 加密的 payload(必填)
369
+ --app_key <s> AppKey(必填)
370
+ --signature <s> 签名(可选)
371
+ --raw_body <s> 原始请求体(可选)
368
372
  加密方式:AES-128-CBC,密钥=MD5(appKey)前16位`,
369
373
  },
370
374
  "topics": {
371
375
  title: "可用参考主题列表",
372
- content: `# wjx reference 可用主题
373
-
374
- dsl DSL 文本语法(create-by-text 用)
375
- question-types 题型 / 问卷类型映射表
376
- survey survey 模块全部命令参数
377
- response response 模块全部命令参数
376
+ content: `# wjx reference 可用主题
377
+
378
+ dsl DSL 文本语法(create-by-text 用)
379
+ question-types 题型 / 问卷类型映射表
380
+ survey survey 模块全部命令参数
381
+ response response 模块全部命令参数
378
382
  analytics analytics 本地分析命令`,
379
383
  },
380
384
  };