'use strict'; /** * 出站回调 method 注册表(代码注册,管理端多选列表经拉取接口透出)。 * * method 即出站路由键:wms_api_app.callback_functions 勾选后, * 出站回调按 warehouse_id + method 自动路由到承接该 method 的应用; * callback_functions 为空/未勾选 = 不承接任何回调。 * * 新增出站回调能力时在此登记 method,管理端接口自动可见。 */ const CALLBACK_FUNCTIONS = [ { method: 'notify.reply', name: '站内信通知回执', description: '站内信/系统通知/回执出站推送(warehouseNotify 与 inbox 回执共用)', }, { method: 'waybill.getreceive', name: '运单揽收状态查询', description: '按运单号批量查询是否已揽收:请求 { waybill_codes: [...] },' + '外部返回 [{ waybill_code, is_galaxy_receive: 1|0 }],回写 wms_order_express.is_galaxy_receive', }, { method: 'waybill.getTrace', name: '运单物流轨迹查询', description: '按运单号批量查询物流轨迹:请求 { waybill_codes: [...] },' + '外部返回 [{ waybillNo, trace: { opTime, outBizCode, memo, opOrgCityName, weight, scanType } }],' + '落库 wms_order_express_trace(按 express_id + op_time + scan_type 幂等)', }, ]; /** method 合法值集合(供管理端 create/update 校验) */ const CALLBACK_METHOD_SET = new Set(CALLBACK_FUNCTIONS.map(item => item.method)); module.exports = { CALLBACK_FUNCTIONS, CALLBACK_METHOD_SET, };