WMS_MAIN/app/lib/callback_functions.js

27 lines
868 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'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 合法值集合(供管理端 create/update 校验) */
const CALLBACK_METHOD_SET = new Set(CALLBACK_FUNCTIONS.map(item => item.method));
module.exports = {
CALLBACK_FUNCTIONS,
CALLBACK_METHOD_SET,
};