UNPKG

smppjs

Version:
27 lines 1.46 kB
/// <reference types="node" /> import { DTO } from '.'; import { optionalParams } from '../constains'; export interface IPDU { call({ command, sequenceNumber, dto }: { command: SendCommandName; sequenceNumber: number; dto: DTO; }): boolean; readPdu(buffer: Buffer): Record<string, string | number>; } export type InterfaceVersion = 51 | 52 | 80; export type CommandName = SendCommandName | ResponseCommandName; export type SendCommandName = 'generic_nack' | 'bind_receiver' | 'bind_transmitter' | 'query_sm' | 'submit_sm' | 'deliver_sm_resp' | 'unbind' | 'replace_sm' | 'cancel_sm' | 'bind_transceiver' | 'enquire_link' | 'submit_multi' | 'alert_notification' | 'data_sm'; export type ResponseCommandName = 'bind_receiver_resp' | 'bind_transmitter_resp' | 'query_sm_resp' | 'submit_sm_resp' | 'unbind_resp' | 'replace_sm_resp' | 'cancel_sm_resp' | 'bind_transceiver_resp' | 'enquire_link_resp' | 'submit_multi_resp' | 'data_sm_resp' | 'outbind' | 'deliver_sm'; export interface Pdu { command_length: number; command_id: number; command_status: number; sequence_number: number; command: CommandName | ''; [key: string]: string | number; } export type PriorityFlag = 0 | 1 | 2 | 3 | 4; export type SystemType = 'SMPP' | 'VMS' | 'VASP' | 'OTA' | 'WAP' | 'USSD' | 'SCM' | 'EMAIL' | 'VOICE' | 'IP' | 'CMT' | 'WWW'; export type OptionalParamKey = keyof typeof optionalParams; //# sourceMappingURL=pdu.d.ts.map