UNPKG

smppjs

Version:
27 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bindReceiverDTO = void 0; const helpers_1 = require("../helpers"); const MAX_LENGTH = { system_id: 16, password: 9, system_type: 13, address_range: 41, }; const bindReceiverDTO = ({ systemId, password, systemType, interfaceVersion, addrNpi, addrTon, addressRange, }) => { const dto = { command: { system_id: { type: 'Cstring', value: systemId }, password: { type: 'Cstring', value: password }, system_type: { type: 'Cstring', value: systemType || '' }, interface_version: { type: 'Int8', value: interfaceVersion || 80 }, addr_ton: { type: 'Int8', value: addrTon || 0 }, addr_npi: { type: 'Int8', value: addrNpi || 0 }, address_range: { type: 'Cstring', value: addressRange || '' }, }, }; (0, helpers_1.dtoValidation)({ dto, MAX_LENGTH }); return dto; }; exports.bindReceiverDTO = bindReceiverDTO; //# sourceMappingURL=bind_receiver.js.map