@chatablex/erp-pro-tool 3.2.2 → 3.4.2

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 (1) hide show
  1. package/package.json +177 -145
package/package.json CHANGED
@@ -122,250 +122,283 @@
122
122
  },
123
123
  {
124
124
  "confirmation_level": 0,
125
- "description": "查询公司列表,返回所有公司的基本信息。",
126
- "endpoint": "GET /api/v1/companies",
127
- "name": "company_list",
128
- "parameters": [],
129
- "when_to_use": "用户询问'有哪些公司'、'查看公司列表'等场景"
130
- },
131
- {
132
- "confirm_mode": "platform",
133
- "confirmation_level": 1,
134
- "description": "创建新公司,平台会在执行前弹出确认卡片让用户确认。",
135
- "endpoint": "POST /api/v1/companies",
136
- "name": "company_create",
125
+ "description": "预览创建用户的影响范围(两阶段操作第一步),返回将要执行的操作详情供确认。",
126
+ "endpoint": "POST /api/v1/system/users/preview",
127
+ "name": "user_create_preview",
137
128
  "parameters": [
138
129
  {
139
- "description": "公司名称(1-200字符)",
140
- "name": "name",
130
+ "description": "手机号(11位)",
131
+ "name": "phone",
141
132
  "required": true,
142
133
  "type": "string"
143
134
  },
144
135
  {
145
- "description": "公司地址",
146
- "name": "address",
136
+ "description": "初始密码(至少6字符)",
137
+ "name": "password",
138
+ "required": true,
147
139
  "type": "string"
148
140
  },
149
141
  {
150
- "description": "联系电话",
151
- "name": "phone",
142
+ "description": "用户名",
143
+ "name": "username",
152
144
  "type": "string"
153
145
  },
154
146
  {
155
- "description": "联系邮箱",
156
- "name": "email",
147
+ "description": "角色",
148
+ "enum": [
149
+ "admin",
150
+ "manager",
151
+ "operator",
152
+ "viewer"
153
+ ],
154
+ "name": "role",
155
+ "required": true,
157
156
  "type": "string"
158
- },
157
+ }
158
+ ],
159
+ "when_to_use": "需要两阶段确认时,先预览再确认创建用户"
160
+ },
161
+ {
162
+ "confirmation_level": 0,
163
+ "description": "确认创建用户(两阶段操作第二步),执行预览阶段返回的操作。",
164
+ "endpoint": "POST /api/v1/system/users/confirm",
165
+ "name": "user_create_confirm",
166
+ "parameters": [
159
167
  {
160
- "description": "公司简介",
161
- "name": "description",
168
+ "description": "预览阶段返回的 confirmation_id",
169
+ "name": "confirmation_id",
170
+ "required": true,
162
171
  "type": "string"
163
172
  }
164
173
  ],
165
- "when_to_use": "用户说'创建公司'、'新增公司xxx'等场景"
174
+ "when_to_use": "用户确认预览结果后,提交确认以实际创建用户"
166
175
  },
167
176
  {
168
177
  "confirmation_level": 0,
169
- "description": "查询商品列表,支持分页、关键词(名称/SKU)和分类/状态筛选。",
170
- "endpoint": "GET /api/v1/products",
171
- "name": "product_list",
178
+ "description": "预览删除用户的影响范围(两阶段操作第一步),返回将要删除的用户信息和关联数据。",
179
+ "endpoint": "DELETE /api/v1/system/users/:id/preview",
180
+ "name": "user_delete_preview",
172
181
  "parameters": [
173
182
  {
174
- "default": 1,
175
- "description": "分页页码",
176
- "name": "page",
177
- "type": "integer"
178
- },
179
- {
180
- "default": 20,
181
- "description": "每页数量,最大100",
182
- "name": "page_size",
183
+ "description": "要删除的用户ID",
184
+ "name": "user_id",
185
+ "required": true,
183
186
  "type": "integer"
184
- },
185
- {
186
- "description": "关键词(名称或SKU模糊)",
187
- "name": "keyword",
188
- "type": "string"
189
- },
190
- {
191
- "description": "分类筛选",
192
- "name": "category",
193
- "type": "string"
194
- },
195
- {
196
- "description": "状态筛选",
197
- "name": "status",
198
- "type": "string"
199
187
  }
200
188
  ],
201
- "when_to_use": "用户询问'有哪些商品'、'查商品列表'、'搜索商品xxx'等场景"
189
+ "when_to_use": "需要两阶段确认时,先预览再确认删除用户"
202
190
  },
203
191
  {
204
- "confirm_mode": "platform",
205
- "confirmation_level": 1,
206
- "description": "创建新商品,平台会在执行前弹出确认卡片让用户确认。",
207
- "endpoint": "POST /api/v1/products",
208
- "name": "product_create",
192
+ "confirmation_level": 0,
193
+ "description": "【危险】确认删除用户(两阶段操作第二步),执行实际删除。",
194
+ "endpoint": "DELETE /api/v1/system/users/:id/confirm",
195
+ "name": "user_delete_confirm",
209
196
  "parameters": [
210
197
  {
211
- "description": "商品编码,唯一",
212
- "name": "sku",
198
+ "description": "要删除的用户ID",
199
+ "name": "user_id",
213
200
  "required": true,
214
- "type": "string"
201
+ "type": "integer"
215
202
  },
216
203
  {
217
- "description": "商品名称",
218
- "name": "name",
204
+ "description": "预览阶段返回的 confirmation_id",
205
+ "name": "confirmation_id",
219
206
  "required": true,
220
207
  "type": "string"
221
- },
222
- {
223
- "description": "分类",
224
- "name": "category",
225
- "type": "string"
226
- },
227
- {
228
- "description": "单位",
229
- "name": "unit",
230
- "type": "string"
231
- },
232
- {
233
- "description": "售价",
234
- "name": "price",
235
- "required": true,
236
- "type": "number"
237
- },
238
- {
239
- "description": "成本",
240
- "name": "cost",
241
- "type": "number"
242
208
  }
243
209
  ],
244
- "when_to_use": "用户说'新建商品'、'添加商品xxx'等场景"
210
+ "when_to_use": "用户确认预览结果后,提交确认以实际删除用户"
245
211
  },
246
212
  {
247
213
  "confirmation_level": 0,
248
- "description": "查询库存列表,支持分页和关键词(商品名称/SKU)。",
249
- "endpoint": "GET /api/v1/inventory",
250
- "name": "inventory_list",
214
+ "description": "查询订单列表,支持分页、关键词搜索、按订单类型和状态筛选。",
215
+ "endpoint": "GET /api/v1/orders",
216
+ "name": "order_list",
251
217
  "parameters": [
252
218
  {
253
219
  "default": 1,
254
- "description": "分页页码",
220
+ "description": "分页页码,从1开始",
255
221
  "name": "page",
256
222
  "type": "integer"
257
223
  },
258
224
  {
259
225
  "default": 20,
260
- "description": "每页数量",
226
+ "description": "每页数量,最大100",
261
227
  "name": "page_size",
262
228
  "type": "integer"
263
229
  },
264
230
  {
265
- "description": "关键词",
231
+ "description": "搜索关键词(订单号/客户名/公司名模糊匹配)",
266
232
  "name": "keyword",
267
233
  "type": "string"
234
+ },
235
+ {
236
+ "description": "按订单类型筛选",
237
+ "enum": [
238
+ "sale",
239
+ "purchase",
240
+ "return"
241
+ ],
242
+ "name": "order_type",
243
+ "type": "string"
244
+ },
245
+ {
246
+ "description": "按状态筛选",
247
+ "enum": [
248
+ "pending",
249
+ "confirmed",
250
+ "shipped",
251
+ "completed",
252
+ "cancelled"
253
+ ],
254
+ "name": "status",
255
+ "type": "string"
268
256
  }
269
257
  ],
270
- "when_to_use": "用户询问'库存有多少'、'查库存列表'等场景"
258
+ "when_to_use": "用户询问'查看订单'、'订单列表'、'搜索订单xxx'等场景"
259
+ },
260
+ {
261
+ "confirmation_level": 0,
262
+ "description": "根据订单 ID 获取订单详情,包括订单明细。",
263
+ "endpoint": "GET /api/v1/orders/:id",
264
+ "name": "order_get",
265
+ "parameters": [
266
+ {
267
+ "description": "订单ID",
268
+ "name": "order_id",
269
+ "required": true,
270
+ "type": "integer"
271
+ }
272
+ ],
273
+ "when_to_use": "用户询问'查看订单详情'、'订单ID为xxx的信息'等场景"
271
274
  },
272
275
  {
273
276
  "confirm_mode": "platform",
274
277
  "confirmation_level": 1,
275
- "description": "调整库存(正数入库、负数出库),平台会在执行前弹出确认卡片。",
276
- "endpoint": "POST /api/v1/inventory/adjust",
277
- "name": "inventory_adjust",
278
+ "description": "创建新订单(含订单明细),平台会在执行前弹出确认卡片让用户确认。",
279
+ "endpoint": "POST /api/v1/orders",
280
+ "name": "order_create",
278
281
  "parameters": [
279
282
  {
280
- "description": "商品ID",
281
- "name": "product_id",
283
+ "description": "公司ID",
284
+ "name": "company_id",
282
285
  "required": true,
283
286
  "type": "integer"
284
287
  },
285
288
  {
286
- "description": "变动数量,正为入库负为出库",
287
- "name": "quantity",
289
+ "description": "公司名称",
290
+ "name": "company_name",
288
291
  "required": true,
289
- "type": "integer"
292
+ "type": "string"
290
293
  },
291
294
  {
292
- "description": "备注",
293
- "name": "remark",
295
+ "description": "客户名称",
296
+ "name": "customer_name",
297
+ "required": true,
294
298
  "type": "string"
295
- }
296
- ],
297
- "when_to_use": "用户说'入库xxx件'、'出库xxx'、'调整库存'等场景"
298
- },
299
- {
300
- "confirmation_level": 0,
301
- "description": "查询订单列表,支持分页、类型(销售/采购)和状态筛选。",
302
- "endpoint": "GET /api/v1/orders",
303
- "name": "order_list",
304
- "parameters": [
305
- {
306
- "default": 1,
307
- "description": "分页页码",
308
- "name": "page",
309
- "type": "integer"
310
299
  },
311
300
  {
312
- "default": 20,
313
- "description": "每页数量",
314
- "name": "page_size",
315
- "type": "integer"
301
+ "description": "客户电话",
302
+ "name": "customer_phone",
303
+ "type": "string"
316
304
  },
317
305
  {
318
306
  "description": "订单类型",
319
307
  "enum": [
320
308
  "sale",
321
- "purchase"
309
+ "purchase",
310
+ "return"
322
311
  ],
323
312
  "name": "order_type",
313
+ "required": true,
324
314
  "type": "string"
325
315
  },
326
316
  {
327
- "description": "状态",
328
- "name": "status",
317
+ "description": "备注",
318
+ "name": "remark",
329
319
  "type": "string"
330
320
  },
331
321
  {
332
- "description": "订单号模糊",
333
- "name": "keyword",
334
- "type": "string"
322
+ "description": "订单明细列表",
323
+ "items": {
324
+ "properties": {
325
+ "product_name": {
326
+ "description": "产品名称",
327
+ "required": true,
328
+ "type": "string"
329
+ },
330
+ "quantity": {
331
+ "description": "数量",
332
+ "required": true,
333
+ "type": "number"
334
+ },
335
+ "spec": {
336
+ "description": "规格",
337
+ "type": "string"
338
+ },
339
+ "unit": {
340
+ "description": "单位",
341
+ "required": true,
342
+ "type": "string"
343
+ },
344
+ "unit_price": {
345
+ "description": "单价",
346
+ "required": true,
347
+ "type": "number"
348
+ }
349
+ },
350
+ "type": "object"
351
+ },
352
+ "name": "items",
353
+ "required": true,
354
+ "type": "array"
335
355
  }
336
356
  ],
337
- "when_to_use": "用户询问'有哪些订单'、'查订单列表'等场景"
357
+ "when_to_use": "用户说'创建订单'、'下单'、'新增销售单'等场景"
358
+ },
359
+ {
360
+ "confirmation_level": 0,
361
+ "description": "查询公司列表,返回所有公司的基本信息。",
362
+ "endpoint": "GET /api/v1/companies",
363
+ "name": "company_list",
364
+ "parameters": [],
365
+ "when_to_use": "用户询问'有哪些公司'、'查看公司列表'等场景"
338
366
  },
339
367
  {
340
368
  "confirm_mode": "platform",
341
369
  "confirmation_level": 1,
342
- "description": "创建销售单或采购单,平台会在执行前弹出确认卡片让用户确认。",
343
- "endpoint": "POST /api/v1/orders",
344
- "name": "order_create",
370
+ "description": "创建新公司,平台会在执行前弹出确认卡片让用户确认。",
371
+ "endpoint": "POST /api/v1/companies",
372
+ "name": "company_create",
345
373
  "parameters": [
346
374
  {
347
- "description": "订单类型",
348
- "enum": [
349
- "sale",
350
- "purchase"
351
- ],
352
- "name": "order_type",
375
+ "description": "公司名称(1-200字符)",
376
+ "name": "name",
353
377
  "required": true,
354
378
  "type": "string"
355
379
  },
356
380
  {
357
- "description": "明细项",
358
- "name": "items",
359
- "required": true,
360
- "type": "array"
381
+ "description": "公司地址",
382
+ "name": "address",
383
+ "type": "string"
361
384
  },
362
385
  {
363
- "description": "备注",
364
- "name": "remark",
386
+ "description": "联系电话",
387
+ "name": "phone",
388
+ "type": "string"
389
+ },
390
+ {
391
+ "description": "联系邮箱",
392
+ "name": "email",
393
+ "type": "string"
394
+ },
395
+ {
396
+ "description": "公司简介",
397
+ "name": "description",
365
398
  "type": "string"
366
399
  }
367
400
  ],
368
- "when_to_use": "用户说'开销售单'、'创建采购单'、'下单'等场景"
401
+ "when_to_use": "用户说'创建公司'、'新增公司xxx'等场景"
369
402
  },
370
403
  {
371
404
  "confirmation_level": 0,
@@ -442,7 +475,6 @@
442
475
  "execution_mode": "http_proxy",
443
476
  "icon": "assets/icon.png",
444
477
  "id": "erp-pro-tool",
445
- "scope": "local-dev",
446
478
  "server": {
447
479
  "base_url": "http://localhost:8080",
448
480
  "health_check": "/health"
@@ -471,5 +503,5 @@
471
503
  ],
472
504
  "license": "MIT",
473
505
  "name": "@chatablex/erp-pro-tool",
474
- "version": "3.2.2"
506
+ "version": "3.4.2"
475
507
  }