feat(shipping-notice): 新增货代客户管理功能,支持客户导入、识别证据管理与客户确认
This commit is contained in:
1 parent
b595e157e9
commit
4fbaed2b4c
176 files changed
+14011
-994
No files matched your search
@@ -3,11 +3,11 @@
|
||||
"info": {
|
||||
"title": "Shipping Notice Tools",
|
||||
"version": "1.0.0",
|
||||
"description": "货代发货通知 Agent Tool API。仅导出适合 Dify AI 编排层使用的工具:通知理解、字段修订、库存映射建议、人工确认收口与状态查询;不包含由后台任务统一续跑的主推进工具,也不包含 RPA 回调。推进类 Tool 的统一约束如下:必须依赖 HXOPS 状态机校验,必须基于唯一 task_id 推进;模糊指代不能直接推进,必须先通过 reference_context、get_task_status 或其他 HXOPS Tool 解析到唯一任务。submit_decision、match_inventory、generate_shipment_excel、upload_to_freight、retry_task、confirm_inventory_source 这类推进动作都必须根据 HXOPS Tool 返回结果解释,不能脱离 Tool 返回自行编造状态。若 Tool 返回 needs_human 或 failed,不得自行改写成完成、成功上传或已处理完毕。如果响应包含 action_buttons,Dify 只解释当前状态、业务原因和影响,不要在自然语言正文列出按钮清单或“推荐下一步”动作列表;可点击按钮由宿主系统根据 action_buttons 统一渲染。鉴权:Authorization Bearer 或 X-Integration-Key。"
|
||||
"description": "货代发货通知 Agent Tool API。仅导出适合 Dify AI 编排层使用的工具:通知理解、字段修订、库存映射建议、人工确认收口与状态查询;不包含由后台任务统一续跑的主推进工具,也不包含 RPA 回调。推进类 Tool 的统一约束如下:必须依赖 HXOPS 状态机校验,必须基于唯一 task_id 推进;模糊指代不能直接推进,必须先通过 reference_context、get_task_status 或其他 HXOPS Tool 解析到唯一任务。submit_decision、match_inventory、generate_shipment_excel、upload_to_freight、retry_task、confirm_inventory_source、confirm_customer 这类推进动作都必须根据 HXOPS Tool 返回结果解释,不能脱离 Tool 返回自行编造状态。若 Tool 返回 needs_human 或 failed,不得自行改写成完成、成功上传或已处理完毕。如果响应包含 action_buttons,Dify 只解释当前状态、业务原因和影响,不要在自然语言正文列出按钮清单或“推荐下一步”动作列表;可点击按钮由宿主系统根据 action_buttons 统一渲染。鉴权:Authorization Bearer 或 X-Integration-Key。"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://192.168.36.108:5052/api/shipping-notice"
|
||||
"url": "http://192.168.100.192:8890/api/shipping-notice"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
@@ -54,7 +54,7 @@
|
||||
"post": {
|
||||
"operationId": "submit_order_extraction",
|
||||
"summary": "提交完整订单抽取结果,由 HXOPS 执行证据校验、订单级判重与自动建单",
|
||||
"description": "只接受 get_order_extraction_context 的同一快照。HXOPS 仅在分类、SKU/Qty 置信度及原文证据均达标,且无阻断冲突/修订决策时自动建单;Reservation ID、Hub Code、Source Type 允许缺失。",
|
||||
"description": "只接受 get_order_extraction_context 的同一快照。HXOPS 仅在分类、SKU/Qty 置信度及原文证据均达标,且无阻断冲突/修订决策时自动建单;Reservation ID 允许缺失,订单行 Source Type 是可选路由线索。响应以持久化结果分别返回 created_count、opened_existing_count、pending_count、non_shipping_count;auto_created_count 仅为兼容字段且等于 created_count。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@@ -164,13 +164,9 @@
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
},
|
||||
"hub_code": {
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
},
|
||||
"source_type": {
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
"description": "可选订单路由线索;仅在原文有可靠证据时填写,不代表任务通知来源或已确认的库存连接器类型"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
@@ -252,7 +248,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"raw_text": {
|
||||
"type": "string",
|
||||
@@ -304,7 +300,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"fields": {
|
||||
"type": "object",
|
||||
@@ -353,7 +349,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"line_index": {
|
||||
"type": "integer",
|
||||
@@ -361,7 +357,7 @@
|
||||
},
|
||||
"patch": {
|
||||
"type": "object",
|
||||
"description": "可更新字段:sku/reservation_id/quantity/qty/required_date/uom/hub_code/source_type",
|
||||
"description": "可更新字段:sku/reservation_id/quantity/qty/required_date/uom/source_type;source_type 仅作为可选订单路由线索",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"comment": {
|
||||
@@ -407,7 +403,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"line": {
|
||||
"type": "object",
|
||||
@@ -456,7 +452,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"line_index": {
|
||||
"type": "integer",
|
||||
@@ -504,7 +500,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -543,7 +539,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"map_json": {
|
||||
"type": "string",
|
||||
@@ -576,7 +572,7 @@
|
||||
"post": {
|
||||
"operationId": "confirm_inventory_source",
|
||||
"summary": "在库存源人工检查点确认正式库存查询来源(仅提交 source_code)",
|
||||
"description": "库存源门禁:稳定身份须同时具备 source_code、source_type、site_id、warehouse_id,且 routing_fingerprint 与当前配置版本一致。Tool API 使用集成密钥鉴权,确认人审计由宿主会话内部链路写入,不接受外部 user_id。若返回 needs_human,说明身份未完整解析或需先完成解析确认。",
|
||||
"description": "库存连接器门禁:稳定身份须同时具备 source_code、connector_type、site_id、warehouse_id,且 routing_fingerprint 与当前配置版本一致。Tool API 使用集成密钥鉴权,确认人审计由宿主会话内部链路写入,不接受外部 user_id。若返回 needs_human,说明身份未完整解析或需先完成解析确认。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@@ -587,7 +583,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"source_code": {
|
||||
"type": "string",
|
||||
@@ -616,6 +612,50 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tools/confirm_customer": {
|
||||
"post": {
|
||||
"operationId": "confirm_customer",
|
||||
"summary": "在客户人工检查点确认标准客户(仅提交 customer_id)",
|
||||
"description": "仅在 customer_review 检查点且用户已经明确选择标准客户后调用。禁止根据邮件中的不稳定客户名称自行猜测 customer_id;客户确认成功后由 HXOPS 决定后续流程。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"customer_id": {
|
||||
"type": "integer",
|
||||
"description": "用户从 HXOPS 标准客户列表中明确选择的客户 ID"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"task_id",
|
||||
"customer_id"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tools/submit_decision": {
|
||||
"post": {
|
||||
"operationId": "submit_decision",
|
||||
@@ -631,7 +671,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"conversation_id": {
|
||||
"type": "string",
|
||||
@@ -681,8 +721,8 @@
|
||||
"/tools/get_task_status": {
|
||||
"post": {
|
||||
"operationId": "get_task_status",
|
||||
"summary": "查询任务当前状态与 human_options;响应含 inventory_source_* 独立字段与候选结构",
|
||||
"description": "返回 inventory_source_code、inventory_source_type、inventory_site_id、inventory_warehouse_id、inventory_source_status(unresolved|ambiguous|resolved|user_confirmed|invalid|conflicted)、inventory_source_method、inventory_source_config_version、inventory_routing_fingerprint、inventory_source_confirmed_by、inventory_source_confirmed_at,以及 step_payload.inventory_source_resolution.candidates。",
|
||||
"summary": "查询任务当前状态与 human_options;响应含库存连接器独立字段与候选结构",
|
||||
"description": "返回 inventory_source_code、inventory_connector_type、inventory_site_id、inventory_warehouse_id、inventory_source_status(unresolved|ambiguous|resolved|user_confirmed|invalid|conflicted)、inventory_source_method、inventory_source_config_version、inventory_routing_fingerprint、inventory_source_confirmed_by、inventory_source_confirmed_at,以及 step_payload.inventory_source_resolution.candidates。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@@ -693,7 +733,7 @@
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"description": "发货任务编号(task id),如 SN-20260529-ABCD1234"
|
||||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||||
},
|
||||
"conversation_id": {
|
||||
"type": "string",
|
||||
@@ -758,4 +798,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user