tnzapi-ts 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2203 -0
- package/dist/Api/Actions/AbortApi.d.ts +17 -0
- package/dist/Api/Actions/AbortApi.js +78 -0
- package/dist/Api/Actions/PacingApi.d.ts +17 -0
- package/dist/Api/Actions/PacingApi.js +84 -0
- package/dist/Api/Actions/RescheduleApi.d.ts +17 -0
- package/dist/Api/Actions/RescheduleApi.js +84 -0
- package/dist/Api/Actions/ResubmitApi.d.ts +17 -0
- package/dist/Api/Actions/ResubmitApi.js +86 -0
- package/dist/Api/Actions/dtos/AbortApiRequestDTO.d.ts +4 -0
- package/dist/Api/Actions/dtos/AbortApiRequestDTO.js +14 -0
- package/dist/Api/Actions/dtos/ActionApiResponseDTO.d.ts +8 -0
- package/dist/Api/Actions/dtos/ActionApiResponseDTO.js +14 -0
- package/dist/Api/Actions/dtos/ActionBaseRequestDTO.d.ts +5 -0
- package/dist/Api/Actions/dtos/ActionBaseRequestDTO.js +7 -0
- package/dist/Api/Actions/dtos/PacingApiRequestDTO.d.ts +5 -0
- package/dist/Api/Actions/dtos/PacingApiRequestDTO.js +15 -0
- package/dist/Api/Actions/dtos/RescheduleApiRequestDTO.d.ts +5 -0
- package/dist/Api/Actions/dtos/RescheduleApiRequestDTO.js +14 -0
- package/dist/Api/Actions/dtos/ResubmitApiRequestDTO.d.ts +5 -0
- package/dist/Api/Actions/dtos/ResubmitApiRequestDTO.js +14 -0
- package/dist/Api/Actions/dtos/index.d.ts +6 -0
- package/dist/Api/Actions/dtos/index.js +22 -0
- package/dist/Api/Actions/helpers/MapApiResponse.d.ts +3 -0
- package/dist/Api/Actions/helpers/MapApiResponse.js +16 -0
- package/dist/Api/Actions/helpers/index.d.ts +1 -0
- package/dist/Api/Actions/helpers/index.js +17 -0
- package/dist/Api/Actions/index.d.ts +12 -0
- package/dist/Api/Actions/index.js +17 -0
- package/dist/Api/Actions/interfaces/IActionArgs.d.ts +19 -0
- package/dist/Api/Actions/interfaces/IActionArgs.js +2 -0
- package/dist/Api/Actions/interfaces/index.d.ts +1 -0
- package/dist/Api/Actions/interfaces/index.js +17 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupCreateApi.d.ts +14 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupCreateApi.js +84 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupDeleteApi.d.ts +14 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupDeleteApi.js +84 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupDetailApi.d.ts +14 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupDetailApi.js +84 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupListApi.d.ts +14 -0
- package/dist/Api/Addressbook/ContactGroups/ContactGroupListApi.js +79 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/BaseListApiRequestDTO.d.ts +4 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/BaseListApiRequestDTO.js +7 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupApiRequestDTO.d.ts +9 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupApiRequestDTO.js +19 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupApiResponseDTO.d.ts +8 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupBaseRequestDTO.d.ts +6 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupBaseRequestDTO.js +7 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupListApiRequestDTO.d.ts +4 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupListApiRequestDTO.js +14 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupListApiResponseDTO.d.ts +12 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/ContactGroupListApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/index.d.ts +6 -0
- package/dist/Api/Addressbook/ContactGroups/dtos/index.js +22 -0
- package/dist/Api/Addressbook/ContactGroups/helpers/MapApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/ContactGroups/helpers/MapApiResponse.js +24 -0
- package/dist/Api/Addressbook/ContactGroups/helpers/MapListApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/ContactGroups/helpers/MapListApiResponse.js +28 -0
- package/dist/Api/Addressbook/ContactGroups/helpers/index.d.ts +2 -0
- package/dist/Api/Addressbook/ContactGroups/helpers/index.js +18 -0
- package/dist/Api/Addressbook/ContactGroups/index.d.ts +11 -0
- package/dist/Api/Addressbook/ContactGroups/index.js +21 -0
- package/dist/Api/Addressbook/Contacts/ContactCreateApi.d.ts +17 -0
- package/dist/Api/Addressbook/Contacts/ContactCreateApi.js +76 -0
- package/dist/Api/Addressbook/Contacts/ContactDeleteApi.d.ts +17 -0
- package/dist/Api/Addressbook/Contacts/ContactDeleteApi.js +82 -0
- package/dist/Api/Addressbook/Contacts/ContactDetailApi.d.ts +17 -0
- package/dist/Api/Addressbook/Contacts/ContactDetailApi.js +78 -0
- package/dist/Api/Addressbook/Contacts/ContactListApi.d.ts +17 -0
- package/dist/Api/Addressbook/Contacts/ContactListApi.js +78 -0
- package/dist/Api/Addressbook/Contacts/ContactUpdateApi.d.ts +17 -0
- package/dist/Api/Addressbook/Contacts/ContactUpdateApi.js +81 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactApiRequestDTO.d.ts +7 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactApiRequestDTO.js +22 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactApiResponseDTO.d.ts +6 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactListApiRequestDTO.d.ts +4 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactListApiRequestDTO.js +17 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactListApiResponseDTO.d.ts +10 -0
- package/dist/Api/Addressbook/Contacts/dtos/ContactListApiResponseDTO.js +19 -0
- package/dist/Api/Addressbook/Contacts/dtos/index.d.ts +4 -0
- package/dist/Api/Addressbook/Contacts/dtos/index.js +20 -0
- package/dist/Api/Addressbook/Contacts/helpers/MapApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/Contacts/helpers/MapApiResponse.js +20 -0
- package/dist/Api/Addressbook/Contacts/helpers/MapListApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/Contacts/helpers/MapListApiResponse.js +16 -0
- package/dist/Api/Addressbook/Contacts/helpers/index.d.ts +2 -0
- package/dist/Api/Addressbook/Contacts/helpers/index.js +18 -0
- package/dist/Api/Addressbook/Contacts/index.d.ts +12 -0
- package/dist/Api/Addressbook/Contacts/index.js +24 -0
- package/dist/Api/Addressbook/Contacts/models/ContactModel.d.ts +37 -0
- package/dist/Api/Addressbook/Contacts/models/ContactModel.js +11 -0
- package/dist/Api/Addressbook/Contacts/models/index.d.ts +1 -0
- package/dist/Api/Addressbook/Contacts/models/index.js +17 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactCreateApi.d.ts +14 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactCreateApi.js +84 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactDeleteApi.d.ts +14 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactDeleteApi.js +84 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactDetailApi.d.ts +14 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactDetailApi.js +84 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactListApi.d.ts +14 -0
- package/dist/Api/Addressbook/GroupContacts/GroupContactListApi.js +83 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/BaseListApiRequestDTO.d.ts +7 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/BaseListApiRequestDTO.js +7 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactApiRequestDTO.d.ts +7 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactApiRequestDTO.js +14 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactApiResponseDTO.d.ts +8 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactBaseRequestDTO.d.ts +7 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactBaseRequestDTO.js +7 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactListApiRequestDTO.d.ts +4 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactListApiRequestDTO.js +14 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactListApiResponseDTO.d.ts +12 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/GroupContactListApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/index.d.ts +6 -0
- package/dist/Api/Addressbook/GroupContacts/dtos/index.js +22 -0
- package/dist/Api/Addressbook/GroupContacts/helpers/MapApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/GroupContacts/helpers/MapApiResponse.js +24 -0
- package/dist/Api/Addressbook/GroupContacts/helpers/MapListApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/GroupContacts/helpers/MapListApiResponse.js +28 -0
- package/dist/Api/Addressbook/GroupContacts/helpers/index.d.ts +2 -0
- package/dist/Api/Addressbook/GroupContacts/helpers/index.js +18 -0
- package/dist/Api/Addressbook/GroupContacts/index.d.ts +11 -0
- package/dist/Api/Addressbook/GroupContacts/index.js +21 -0
- package/dist/Api/Addressbook/Groups/GroupCreateApi.d.ts +17 -0
- package/dist/Api/Addressbook/Groups/GroupCreateApi.js +87 -0
- package/dist/Api/Addressbook/Groups/GroupDeleteApi.d.ts +17 -0
- package/dist/Api/Addressbook/Groups/GroupDeleteApi.js +78 -0
- package/dist/Api/Addressbook/Groups/GroupDetailApi.d.ts +17 -0
- package/dist/Api/Addressbook/Groups/GroupDetailApi.js +78 -0
- package/dist/Api/Addressbook/Groups/GroupListApi.d.ts +17 -0
- package/dist/Api/Addressbook/Groups/GroupListApi.js +78 -0
- package/dist/Api/Addressbook/Groups/GroupUpdateApi.d.ts +17 -0
- package/dist/Api/Addressbook/Groups/GroupUpdateApi.js +89 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupApiRequestDTO.d.ts +5 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupApiRequestDTO.js +22 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupApiResponseDTO.d.ts +6 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupListApiRequestDTO.d.ts +4 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupListApiRequestDTO.js +14 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupListApiResponseDTO.d.ts +10 -0
- package/dist/Api/Addressbook/Groups/dtos/GroupListApiResponseDTO.js +14 -0
- package/dist/Api/Addressbook/Groups/dtos/index.d.ts +4 -0
- package/dist/Api/Addressbook/Groups/dtos/index.js +20 -0
- package/dist/Api/Addressbook/Groups/helpers/MapApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/Groups/helpers/MapApiResponse.js +20 -0
- package/dist/Api/Addressbook/Groups/helpers/MapListApiResponse.d.ts +3 -0
- package/dist/Api/Addressbook/Groups/helpers/MapListApiResponse.js +24 -0
- package/dist/Api/Addressbook/Groups/helpers/index.d.ts +2 -0
- package/dist/Api/Addressbook/Groups/helpers/index.js +18 -0
- package/dist/Api/Addressbook/Groups/index.d.ts +12 -0
- package/dist/Api/Addressbook/Groups/index.js +24 -0
- package/dist/Api/Addressbook/Groups/models/GroupModel.d.ts +14 -0
- package/dist/Api/Addressbook/Groups/models/GroupModel.js +17 -0
- package/dist/Api/Addressbook/Groups/models/index.d.ts +1 -0
- package/dist/Api/Addressbook/Groups/models/index.js +17 -0
- package/dist/Api/Addressbook/index.d.ts +12 -0
- package/dist/Api/Addressbook/index.js +17 -0
- package/dist/Api/Addressbook/interfaces/IContactArgs.d.ts +45 -0
- package/dist/Api/Addressbook/interfaces/IContactArgs.js +2 -0
- package/dist/Api/Addressbook/interfaces/IContactGroupArgs.d.ts +15 -0
- package/dist/Api/Addressbook/interfaces/IContactGroupArgs.js +2 -0
- package/dist/Api/Addressbook/interfaces/IGroupArgs.d.ts +24 -0
- package/dist/Api/Addressbook/interfaces/IGroupArgs.js +2 -0
- package/dist/Api/Addressbook/interfaces/IGroupContactArgs.d.ts +16 -0
- package/dist/Api/Addressbook/interfaces/IGroupContactArgs.js +2 -0
- package/dist/Api/Addressbook/interfaces/index.d.ts +4 -0
- package/dist/Api/Addressbook/interfaces/index.js +20 -0
- package/dist/Api/Messaging/BaseMessagingApi.d.ts +28 -0
- package/dist/Api/Messaging/BaseMessagingApi.js +152 -0
- package/dist/Api/Messaging/EmailApi.d.ts +21 -0
- package/dist/Api/Messaging/EmailApi.js +47 -0
- package/dist/Api/Messaging/FaxApi.d.ts +18 -0
- package/dist/Api/Messaging/FaxApi.js +47 -0
- package/dist/Api/Messaging/RCSApi.d.ts +21 -0
- package/dist/Api/Messaging/RCSApi.js +44 -0
- package/dist/Api/Messaging/SMSApi.d.ts +21 -0
- package/dist/Api/Messaging/SMSApi.js +44 -0
- package/dist/Api/Messaging/TTSApi.d.ts +22 -0
- package/dist/Api/Messaging/TTSApi.js +67 -0
- package/dist/Api/Messaging/VoiceApi.d.ts +24 -0
- package/dist/Api/Messaging/VoiceApi.js +95 -0
- package/dist/Api/Messaging/WhatsAppApi.d.ts +21 -0
- package/dist/Api/Messaging/WhatsAppApi.js +44 -0
- package/dist/Api/Messaging/WorkflowApi.d.ts +21 -0
- package/dist/Api/Messaging/WorkflowApi.js +41 -0
- package/dist/Api/Messaging/dtos/EmailApiRequestDTO.d.ts +13 -0
- package/dist/Api/Messaging/dtos/EmailApiRequestDTO.js +15 -0
- package/dist/Api/Messaging/dtos/FaxApiRequestDTO.d.ts +13 -0
- package/dist/Api/Messaging/dtos/FaxApiRequestDTO.js +15 -0
- package/dist/Api/Messaging/dtos/MessagingApiSuccessResponseDTO.d.ts +7 -0
- package/dist/Api/Messaging/dtos/MessagingApiSuccessResponseDTO.js +14 -0
- package/dist/Api/Messaging/dtos/MessagingBaseRequestDTO.d.ts +33 -0
- package/dist/Api/Messaging/dtos/MessagingBaseRequestDTO.js +9 -0
- package/dist/Api/Messaging/dtos/RCSApiRequestDTO.d.ts +9 -0
- package/dist/Api/Messaging/dtos/RCSApiRequestDTO.js +15 -0
- package/dist/Api/Messaging/dtos/SMSApiRequestDTO.d.ts +11 -0
- package/dist/Api/Messaging/dtos/SMSApiRequestDTO.js +16 -0
- package/dist/Api/Messaging/dtos/TTSApiRequestDTO.d.ts +20 -0
- package/dist/Api/Messaging/dtos/TTSApiRequestDTO.js +18 -0
- package/dist/Api/Messaging/dtos/VoiceApiRequestDTO.d.ts +20 -0
- package/dist/Api/Messaging/dtos/VoiceApiRequestDTO.js +36 -0
- package/dist/Api/Messaging/dtos/WhatsAppApiRequestDTO.d.ts +8 -0
- package/dist/Api/Messaging/dtos/WhatsAppApiRequestDTO.js +15 -0
- package/dist/Api/Messaging/dtos/WorkflowApiRequestDTO.d.ts +5 -0
- package/dist/Api/Messaging/dtos/WorkflowApiRequestDTO.js +14 -0
- package/dist/Api/Messaging/dtos/index.d.ts +10 -0
- package/dist/Api/Messaging/dtos/index.js +26 -0
- package/dist/Api/Messaging/helpers/AddRecipient.d.ts +3 -0
- package/dist/Api/Messaging/helpers/AddRecipient.js +19 -0
- package/dist/Api/Messaging/helpers/MapApiResponse.d.ts +3 -0
- package/dist/Api/Messaging/helpers/MapApiResponse.js +17 -0
- package/dist/Api/Messaging/helpers/index.d.ts +2 -0
- package/dist/Api/Messaging/helpers/index.js +18 -0
- package/dist/Api/Messaging/index.d.ts +20 -0
- package/dist/Api/Messaging/index.js +25 -0
- package/dist/Api/Messaging/interfaces/IEmailArgs.d.ts +50 -0
- package/dist/Api/Messaging/interfaces/IEmailArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/IFaxArgs.d.ts +49 -0
- package/dist/Api/Messaging/interfaces/IFaxArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/IMessagingDestination.d.ts +9 -0
- package/dist/Api/Messaging/interfaces/IMessagingDestination.js +2 -0
- package/dist/Api/Messaging/interfaces/IRCSArgs.d.ts +43 -0
- package/dist/Api/Messaging/interfaces/IRCSArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/ISMSArgs.d.ts +48 -0
- package/dist/Api/Messaging/interfaces/ISMSArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/ITTSArgs.d.ts +61 -0
- package/dist/Api/Messaging/interfaces/ITTSArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/IVoiceArgs.d.ts +67 -0
- package/dist/Api/Messaging/interfaces/IVoiceArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/IWhatsAppArgs.d.ts +44 -0
- package/dist/Api/Messaging/interfaces/IWhatsAppArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/IWorkflowArgs.d.ts +41 -0
- package/dist/Api/Messaging/interfaces/IWorkflowArgs.js +2 -0
- package/dist/Api/Messaging/interfaces/index.d.ts +9 -0
- package/dist/Api/Messaging/interfaces/index.js +25 -0
- package/dist/Api/Messaging/models/CommonModel.d.ts +17 -0
- package/dist/Api/Messaging/models/CommonModel.js +6 -0
- package/dist/Api/Messaging/models/EmailModel.d.ts +20 -0
- package/dist/Api/Messaging/models/EmailModel.js +17 -0
- package/dist/Api/Messaging/models/FaxModel.d.ts +20 -0
- package/dist/Api/Messaging/models/FaxModel.js +17 -0
- package/dist/Api/Messaging/models/IMessagingModel.d.ts +6 -0
- package/dist/Api/Messaging/models/IMessagingModel.js +2 -0
- package/dist/Api/Messaging/models/RCSModel.d.ts +16 -0
- package/dist/Api/Messaging/models/RCSModel.js +17 -0
- package/dist/Api/Messaging/models/SMSModel.d.ts +18 -0
- package/dist/Api/Messaging/models/SMSModel.js +17 -0
- package/dist/Api/Messaging/models/TTSModel.d.ts +28 -0
- package/dist/Api/Messaging/models/TTSModel.js +22 -0
- package/dist/Api/Messaging/models/VoiceModel.d.ts +31 -0
- package/dist/Api/Messaging/models/VoiceModel.js +23 -0
- package/dist/Api/Messaging/models/WhatsAppModel.d.ts +15 -0
- package/dist/Api/Messaging/models/WhatsAppModel.js +17 -0
- package/dist/Api/Messaging/models/WorkflowModel.d.ts +14 -0
- package/dist/Api/Messaging/models/WorkflowModel.js +17 -0
- package/dist/Api/Messaging/models/index.d.ts +10 -0
- package/dist/Api/Messaging/models/index.js +26 -0
- package/dist/Api/OptOut/OptOutCreateApi.d.ts +17 -0
- package/dist/Api/OptOut/OptOutCreateApi.js +49 -0
- package/dist/Api/OptOut/OptOutDeleteApi.d.ts +17 -0
- package/dist/Api/OptOut/OptOutDeleteApi.js +47 -0
- package/dist/Api/OptOut/OptOutDetailApi.d.ts +17 -0
- package/dist/Api/OptOut/OptOutDetailApi.js +47 -0
- package/dist/Api/OptOut/OptOutListApi.d.ts +17 -0
- package/dist/Api/OptOut/OptOutListApi.js +62 -0
- package/dist/Api/OptOut/dtos/OptOutApiRequestDTO.d.ts +4 -0
- package/dist/Api/OptOut/dtos/OptOutApiRequestDTO.js +14 -0
- package/dist/Api/OptOut/dtos/OptOutApiResponseDTO.d.ts +20 -0
- package/dist/Api/OptOut/dtos/OptOutApiResponseDTO.js +14 -0
- package/dist/Api/OptOut/dtos/OptOutListApiRequestDTO.d.ts +8 -0
- package/dist/Api/OptOut/dtos/OptOutListApiRequestDTO.js +14 -0
- package/dist/Api/OptOut/dtos/OptOutListApiResponseDTO.d.ts +10 -0
- package/dist/Api/OptOut/dtos/OptOutListApiResponseDTO.js +17 -0
- package/dist/Api/OptOut/dtos/index.d.ts +4 -0
- package/dist/Api/OptOut/dtos/index.js +20 -0
- package/dist/Api/OptOut/index.d.ts +11 -0
- package/dist/Api/OptOut/index.js +21 -0
- package/dist/Api/OptOut/interfaces/IOptOutArgs.d.ts +22 -0
- package/dist/Api/OptOut/interfaces/IOptOutArgs.js +2 -0
- package/dist/Api/OptOut/interfaces/index.d.ts +1 -0
- package/dist/Api/OptOut/interfaces/index.js +17 -0
- package/dist/Api/OptOut/models/OptOutModel.d.ts +11 -0
- package/dist/Api/OptOut/models/OptOutModel.js +12 -0
- package/dist/Api/OptOut/models/index.d.ts +1 -0
- package/dist/Api/OptOut/models/index.js +17 -0
- package/dist/Api/Reports/SMSReceivedApi.d.ts +18 -0
- package/dist/Api/Reports/SMSReceivedApi.js +92 -0
- package/dist/Api/Reports/SMSReplyApi.d.ts +18 -0
- package/dist/Api/Reports/SMSReplyApi.js +62 -0
- package/dist/Api/Reports/StatusApi.d.ts +18 -0
- package/dist/Api/Reports/StatusApi.js +76 -0
- package/dist/Api/Reports/dtos/RecipientDTO.d.ts +24 -0
- package/dist/Api/Reports/dtos/RecipientDTO.js +12 -0
- package/dist/Api/Reports/dtos/SMSReceivedApiRequestDTO.d.ts +7 -0
- package/dist/Api/Reports/dtos/SMSReceivedApiRequestDTO.js +17 -0
- package/dist/Api/Reports/dtos/SMSReceivedApiResponseDTO.d.ts +6 -0
- package/dist/Api/Reports/dtos/SMSReceivedApiResponseDTO.js +15 -0
- package/dist/Api/Reports/dtos/SMSReceivedDTO.d.ts +14 -0
- package/dist/Api/Reports/dtos/SMSReceivedDTO.js +12 -0
- package/dist/Api/Reports/dtos/SMSReplyApiRequestDTO.d.ts +5 -0
- package/dist/Api/Reports/dtos/SMSReplyApiRequestDTO.js +14 -0
- package/dist/Api/Reports/dtos/SMSReplyApiResponseDTO.d.ts +23 -0
- package/dist/Api/Reports/dtos/SMSReplyApiResponseDTO.js +24 -0
- package/dist/Api/Reports/dtos/SMSReplyRecipientDTO.d.ts +6 -0
- package/dist/Api/Reports/dtos/SMSReplyRecipientDTO.js +19 -0
- package/dist/Api/Reports/dtos/SMSReplyRecipientSMSReplyDTO.d.ts +9 -0
- package/dist/Api/Reports/dtos/SMSReplyRecipientSMSReplyDTO.js +12 -0
- package/dist/Api/Reports/dtos/StatusApiRequestDTO.d.ts +6 -0
- package/dist/Api/Reports/dtos/StatusApiRequestDTO.js +14 -0
- package/dist/Api/Reports/dtos/StatusApiResponseDTO.d.ts +27 -0
- package/dist/Api/Reports/dtos/StatusApiResponseDTO.js +15 -0
- package/dist/Api/Reports/dtos/index.d.ts +10 -0
- package/dist/Api/Reports/dtos/index.js +26 -0
- package/dist/Api/Reports/index.d.ts +10 -0
- package/dist/Api/Reports/index.js +15 -0
- package/dist/Api/Reports/interfaces/IReportsArgs.d.ts +18 -0
- package/dist/Api/Reports/interfaces/IReportsArgs.js +2 -0
- package/dist/Api/Reports/interfaces/index.d.ts +1 -0
- package/dist/Api/Reports/interfaces/index.js +17 -0
- package/dist/Common/IHttpClient.d.ts +6 -0
- package/dist/Common/IHttpClient.js +2 -0
- package/dist/Common/NodeHttpClient.d.ts +10 -0
- package/dist/Common/NodeHttpClient.js +24 -0
- package/dist/Common/Result.d.ts +6 -0
- package/dist/Common/Result.js +13 -0
- package/dist/Common/ValidationResult.d.ts +4 -0
- package/dist/Common/ValidationResult.js +2 -0
- package/dist/Common/dtos/CommonApiRequestDTO.d.ts +3 -0
- package/dist/Common/dtos/CommonApiRequestDTO.js +7 -0
- package/dist/Common/dtos/CommonApiResponseDTO.d.ts +4 -0
- package/dist/Common/dtos/CommonApiResponseDTO.js +10 -0
- package/dist/Common/dtos/CommonListApiRequestDTO.d.ts +6 -0
- package/dist/Common/dtos/CommonListApiRequestDTO.js +12 -0
- package/dist/Common/dtos/CommonListApiResponseDTO.d.ts +8 -0
- package/dist/Common/dtos/CommonListApiResponseDTO.js +14 -0
- package/dist/Common/dtos/ErrorResponseDTO.d.ts +6 -0
- package/dist/Common/dtos/ErrorResponseDTO.js +15 -0
- package/dist/Common/dtos/index.d.ts +5 -0
- package/dist/Common/dtos/index.js +21 -0
- package/dist/Common/enums/MessagingEnums.d.ts +45 -0
- package/dist/Common/enums/MessagingEnums.js +56 -0
- package/dist/Common/index.d.ts +7 -0
- package/dist/Common/index.js +23 -0
- package/dist/Common/isSuccessResult.d.ts +1 -0
- package/dist/Common/isSuccessResult.js +9 -0
- package/dist/Functions/FileHandler.d.ts +6 -0
- package/dist/Functions/FileHandler.js +57 -0
- package/dist/Functions/HttpRequest.d.ts +10 -0
- package/dist/Functions/HttpRequest.js +156 -0
- package/dist/Functions/Mapper.d.ts +1 -0
- package/dist/Functions/Mapper.js +23 -0
- package/dist/Functions/UsefulStuff.d.ts +20 -0
- package/dist/Functions/UsefulStuff.js +136 -0
- package/dist/Functions/index.d.ts +5 -0
- package/dist/Functions/index.js +48 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +43 -0
- package/dist/interfaces.d.ts +4 -0
- package/dist/interfaces.js +2 -0
- package/package.json +47 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptOutListApiRequestDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
class OptOutListApiRequestDTO {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
this.RecordsPerPage = 100;
|
|
8
|
+
this.Page = 1;
|
|
9
|
+
if (data) {
|
|
10
|
+
(0, Mapper_1.Map)(this, data);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.OptOutListApiRequestDTO = OptOutListApiRequestDTO;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonApiResponseDTO } from "../../../Common/dtos";
|
|
2
|
+
import { OptOutApiResponseDTO } from "./OptOutApiResponseDTO";
|
|
3
|
+
export declare class OptOutListApiResponseDTO extends CommonApiResponseDTO {
|
|
4
|
+
TotalRecords?: number;
|
|
5
|
+
RecordsPerPage?: number;
|
|
6
|
+
PageCount?: number;
|
|
7
|
+
Page?: number;
|
|
8
|
+
OptOuts: OptOutApiResponseDTO[];
|
|
9
|
+
constructor(data?: any);
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptOutListApiResponseDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
const dtos_1 = require("../../../Common/dtos");
|
|
6
|
+
class OptOutListApiResponseDTO extends dtos_1.CommonApiResponseDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
// Populated by OptOutListApi.Run() from either the "OptOuts" or legacy
|
|
10
|
+
// "Data" wire key — see the fallback there for context.
|
|
11
|
+
this.OptOuts = [];
|
|
12
|
+
if (data) {
|
|
13
|
+
(0, Mapper_1.Map)(this, data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.OptOutListApiResponseDTO = OptOutListApiResponseDTO;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./OptOutApiRequestDTO"), exports);
|
|
18
|
+
__exportStar(require("./OptOutListApiRequestDTO"), exports);
|
|
19
|
+
__exportStar(require("./OptOutApiResponseDTO"), exports);
|
|
20
|
+
__exportStar(require("./OptOutListApiResponseDTO"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OptOutApiResponseDTO, OptOutListApiResponseDTO } from "./dtos";
|
|
2
|
+
import { ErrorResponseDTO } from "../../Common/dtos";
|
|
3
|
+
import { ITNZAuthArgs } from "../../interfaces";
|
|
4
|
+
import { IOptOutCreateArgs, IOptOutDetailArgs, IOptOutDeleteArgs, IOptOutListArgs } from "./interfaces";
|
|
5
|
+
export declare class OptOut {
|
|
6
|
+
List: (args?: IOptOutListArgs) => Promise<OptOutListApiResponseDTO | ErrorResponseDTO>;
|
|
7
|
+
Create: (args?: IOptOutCreateArgs) => Promise<OptOutApiResponseDTO | ErrorResponseDTO>;
|
|
8
|
+
Detail: (args?: IOptOutDetailArgs) => Promise<OptOutApiResponseDTO | ErrorResponseDTO>;
|
|
9
|
+
Delete: (args?: IOptOutDeleteArgs) => Promise<OptOutApiResponseDTO | ErrorResponseDTO>;
|
|
10
|
+
constructor(auth: ITNZAuthArgs);
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptOut = void 0;
|
|
4
|
+
const OptOutListApi_1 = require("./OptOutListApi");
|
|
5
|
+
const OptOutCreateApi_1 = require("./OptOutCreateApi");
|
|
6
|
+
const OptOutDetailApi_1 = require("./OptOutDetailApi");
|
|
7
|
+
const OptOutDeleteApi_1 = require("./OptOutDeleteApi");
|
|
8
|
+
class OptOut {
|
|
9
|
+
constructor(auth) {
|
|
10
|
+
const args = { ...auth, URL: auth.URL || '' };
|
|
11
|
+
const listApi = new OptOutListApi_1.OptOutListApi(args);
|
|
12
|
+
const createApi = new OptOutCreateApi_1.OptOutCreateApi(args);
|
|
13
|
+
const detailApi = new OptOutDetailApi_1.OptOutDetailApi(args);
|
|
14
|
+
const deleteApi = new OptOutDeleteApi_1.OptOutDeleteApi(args);
|
|
15
|
+
this.List = listApi.Run.bind(listApi);
|
|
16
|
+
this.Create = createApi.Run.bind(createApi);
|
|
17
|
+
this.Detail = detailApi.Run.bind(detailApi);
|
|
18
|
+
this.Delete = deleteApi.Run.bind(deleteApi);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.OptOut = OptOut;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface IOptOutCreateArgs {
|
|
2
|
+
Destination: string;
|
|
3
|
+
DestType: string;
|
|
4
|
+
Department?: string;
|
|
5
|
+
SubAccount?: string;
|
|
6
|
+
ContactID?: string;
|
|
7
|
+
StopMessage?: string;
|
|
8
|
+
Notes?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IOptOutDetailArgs {
|
|
11
|
+
OptOutID: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IOptOutDeleteArgs {
|
|
14
|
+
OptOutID: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IOptOutListArgs {
|
|
17
|
+
RecordsPerPage?: number;
|
|
18
|
+
Page?: number;
|
|
19
|
+
DestType?: string;
|
|
20
|
+
TimePeriod?: number;
|
|
21
|
+
ContactID?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IOptOutArgs';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./IOptOutArgs"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptOutModel = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
class OptOutModel {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
if (data) {
|
|
8
|
+
(0, Mapper_1.Map)(this, data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.OptOutModel = OptOutModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OptOutModel';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./OptOutModel"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SMSReceivedApiResponseDTO } from "./dtos";
|
|
2
|
+
import { ErrorResponseDTO } from "../../Common/dtos";
|
|
3
|
+
import { IHttpClient } from "../../Common/IHttpClient";
|
|
4
|
+
import { ISMSReceivedArgs } from "./interfaces";
|
|
5
|
+
export declare class SMSReceivedApi {
|
|
6
|
+
private baseUrl;
|
|
7
|
+
private authToken;
|
|
8
|
+
private entity;
|
|
9
|
+
private httpClient;
|
|
10
|
+
constructor(args: {
|
|
11
|
+
URL: string;
|
|
12
|
+
AuthToken?: string;
|
|
13
|
+
httpClient?: IHttpClient;
|
|
14
|
+
});
|
|
15
|
+
private MapApiResponse;
|
|
16
|
+
Poll(args?: ISMSReceivedArgs): Promise<SMSReceivedApiResponseDTO | ErrorResponseDTO>;
|
|
17
|
+
private validate;
|
|
18
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSReceivedApi = void 0;
|
|
4
|
+
const Functions_1 = require("../../Functions");
|
|
5
|
+
const dtos_1 = require("./dtos");
|
|
6
|
+
const dtos_2 = require("../../Common/dtos");
|
|
7
|
+
const Result_1 = require("../../Common/Result");
|
|
8
|
+
const isSuccessResult_1 = require("../../Common/isSuccessResult");
|
|
9
|
+
const NodeHttpClient_1 = require("../../Common/NodeHttpClient");
|
|
10
|
+
class SMSReceivedApi {
|
|
11
|
+
constructor(args) {
|
|
12
|
+
this.baseUrl = args.URL;
|
|
13
|
+
this.authToken = args.AuthToken || "";
|
|
14
|
+
this.entity = new dtos_1.SMSReceivedApiRequestDTO(args);
|
|
15
|
+
this.httpClient = args.httpClient ?? new NodeHttpClient_1.NodeHttpClient(this.authToken);
|
|
16
|
+
}
|
|
17
|
+
MapApiResponse(responseData) {
|
|
18
|
+
if (responseData.HttpStatusCode === 200 || (0, isSuccessResult_1.isSuccessResult)(responseData.Result)) {
|
|
19
|
+
if (!Functions_1.UsefulStuff.isEmpty(responseData.Messages)) {
|
|
20
|
+
const messages = [];
|
|
21
|
+
for (let i = 0; i < responseData.Messages.length; i++) {
|
|
22
|
+
messages.push(new dtos_1.SMSReceivedDTO(responseData.Messages[i]));
|
|
23
|
+
}
|
|
24
|
+
responseData.Messages = messages;
|
|
25
|
+
}
|
|
26
|
+
return new dtos_1.SMSReceivedApiResponseDTO(responseData);
|
|
27
|
+
}
|
|
28
|
+
return new dtos_2.ErrorResponseDTO(responseData);
|
|
29
|
+
}
|
|
30
|
+
async Poll(args) {
|
|
31
|
+
if (args) {
|
|
32
|
+
(0, Functions_1.Map)(this.entity, args);
|
|
33
|
+
}
|
|
34
|
+
const currentEntity = this.entity;
|
|
35
|
+
this.entity = new dtos_1.SMSReceivedApiRequestDTO({ URL: this.baseUrl, AuthToken: this.authToken });
|
|
36
|
+
const validation = this.validate(currentEntity);
|
|
37
|
+
if (!validation.valid) {
|
|
38
|
+
return this.MapApiResponse({
|
|
39
|
+
"Result": Result_1.Result.Error,
|
|
40
|
+
"ErrorMessage": [validation.error || "An error occurred while processing."]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const params = {
|
|
44
|
+
"recordsPerPage": currentEntity.RecordsPerPage,
|
|
45
|
+
"page": currentEntity.Page
|
|
46
|
+
};
|
|
47
|
+
if (!Functions_1.UsefulStuff.isEmpty(currentEntity.DateFrom) && !Functions_1.UsefulStuff.isEmpty(currentEntity.DateTo)) {
|
|
48
|
+
params["dateFrom"] = currentEntity.DateFrom;
|
|
49
|
+
params["dateTo"] = currentEntity.DateTo;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
params["timePeriod"] = currentEntity.TimePeriod;
|
|
53
|
+
}
|
|
54
|
+
const url = `${this.baseUrl}/sms/received?${Functions_1.UsefulStuff.httpBuildQuery(params)}`;
|
|
55
|
+
const responseData = await this.httpClient.get(url);
|
|
56
|
+
return this.MapApiResponse(responseData);
|
|
57
|
+
}
|
|
58
|
+
validate(entity) {
|
|
59
|
+
if (Functions_1.UsefulStuff.isEmpty(this.authToken)) {
|
|
60
|
+
return { valid: false, error: "Missing AuthToken" };
|
|
61
|
+
}
|
|
62
|
+
if (Functions_1.UsefulStuff.isEmpty(entity.TimePeriod) && Functions_1.UsefulStuff.isEmpty(entity.DateFrom) && Functions_1.UsefulStuff.isEmpty(entity.DateTo)) {
|
|
63
|
+
return { valid: false, error: "Missing TimePeriod or DateFrom & DateTo" };
|
|
64
|
+
}
|
|
65
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.TimePeriod)) {
|
|
66
|
+
return { valid: false, error: "TimePeriod must be a number - number of minutes" };
|
|
67
|
+
}
|
|
68
|
+
if (entity.TimePeriod < 1 || entity.TimePeriod > 1440) {
|
|
69
|
+
return { valid: false, error: "TimePeriod must be between 1 and 1440 minutes" };
|
|
70
|
+
}
|
|
71
|
+
if (!Functions_1.UsefulStuff.isEmpty(entity.DateFrom) && !Functions_1.UsefulStuff.isDateTime(entity.DateFrom)) {
|
|
72
|
+
return { valid: false, error: "DateFrom must be datetime format" };
|
|
73
|
+
}
|
|
74
|
+
if (!Functions_1.UsefulStuff.isEmpty(entity.DateTo) && !Functions_1.UsefulStuff.isDateTime(entity.DateTo)) {
|
|
75
|
+
return { valid: false, error: "DateTo must be datetime format" };
|
|
76
|
+
}
|
|
77
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.RecordsPerPage)) {
|
|
78
|
+
return { valid: false, error: "RecordsPerPage must be a number" };
|
|
79
|
+
}
|
|
80
|
+
if (entity.RecordsPerPage < 1 || entity.RecordsPerPage > 999) {
|
|
81
|
+
return { valid: false, error: "RecordsPerPage must be between 1 and 999" };
|
|
82
|
+
}
|
|
83
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.Page)) {
|
|
84
|
+
return { valid: false, error: "Page must be a number" };
|
|
85
|
+
}
|
|
86
|
+
if (entity.Page < 1) {
|
|
87
|
+
return { valid: false, error: "Page must be greater then 1" };
|
|
88
|
+
}
|
|
89
|
+
return { valid: true };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.SMSReceivedApi = SMSReceivedApi;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SMSReplyApiResponseDTO } from "./dtos";
|
|
2
|
+
import { ErrorResponseDTO } from "../../Common/dtos";
|
|
3
|
+
import { IHttpClient } from "../../Common/IHttpClient";
|
|
4
|
+
import { ISMSReplyArgs } from "./interfaces";
|
|
5
|
+
export declare class SMSReplyApi {
|
|
6
|
+
private baseUrl;
|
|
7
|
+
private authToken;
|
|
8
|
+
private entity;
|
|
9
|
+
private httpClient;
|
|
10
|
+
constructor(args: {
|
|
11
|
+
URL: string;
|
|
12
|
+
AuthToken?: string;
|
|
13
|
+
httpClient?: IHttpClient;
|
|
14
|
+
});
|
|
15
|
+
private MapApiResponse;
|
|
16
|
+
Poll(args?: ISMSReplyArgs): Promise<SMSReplyApiResponseDTO | ErrorResponseDTO>;
|
|
17
|
+
private validate;
|
|
18
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSReplyApi = void 0;
|
|
4
|
+
const Functions_1 = require("../../Functions");
|
|
5
|
+
const dtos_1 = require("./dtos");
|
|
6
|
+
const dtos_2 = require("../../Common/dtos");
|
|
7
|
+
const Result_1 = require("../../Common/Result");
|
|
8
|
+
const isSuccessResult_1 = require("../../Common/isSuccessResult");
|
|
9
|
+
const NodeHttpClient_1 = require("../../Common/NodeHttpClient");
|
|
10
|
+
class SMSReplyApi {
|
|
11
|
+
constructor(args) {
|
|
12
|
+
this.baseUrl = args.URL;
|
|
13
|
+
this.authToken = args.AuthToken || "";
|
|
14
|
+
this.entity = new dtos_1.SMSReplyApiRequestDTO(args);
|
|
15
|
+
this.httpClient = args.httpClient ?? new NodeHttpClient_1.NodeHttpClient(this.authToken);
|
|
16
|
+
}
|
|
17
|
+
MapApiResponse(responseData) {
|
|
18
|
+
if (responseData.HttpStatusCode === 200 || (0, isSuccessResult_1.isSuccessResult)(responseData.Result)) {
|
|
19
|
+
return new dtos_1.SMSReplyApiResponseDTO(responseData);
|
|
20
|
+
}
|
|
21
|
+
return new dtos_2.ErrorResponseDTO(responseData);
|
|
22
|
+
}
|
|
23
|
+
async Poll(args) {
|
|
24
|
+
if (args) {
|
|
25
|
+
(0, Functions_1.Map)(this.entity, args);
|
|
26
|
+
}
|
|
27
|
+
const currentEntity = this.entity;
|
|
28
|
+
this.entity = new dtos_1.SMSReplyApiRequestDTO({ URL: this.baseUrl, AuthToken: this.authToken });
|
|
29
|
+
const validation = this.validate(currentEntity);
|
|
30
|
+
if (!validation.valid) {
|
|
31
|
+
return this.MapApiResponse({
|
|
32
|
+
"Result": Result_1.Result.Error,
|
|
33
|
+
"ErrorMessage": [validation.error || "An error occurred while processing."]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const url = `${this.baseUrl}/sms/${currentEntity.MessageID}?recordsPerPage=${currentEntity.RecordsPerPage}&page=${currentEntity.Page}`;
|
|
37
|
+
const responseData = await this.httpClient.get(url);
|
|
38
|
+
return this.MapApiResponse(responseData);
|
|
39
|
+
}
|
|
40
|
+
validate(entity) {
|
|
41
|
+
if (Functions_1.UsefulStuff.isEmpty(this.authToken)) {
|
|
42
|
+
return { valid: false, error: "Missing AuthToken" };
|
|
43
|
+
}
|
|
44
|
+
if (Functions_1.UsefulStuff.isEmpty(entity.MessageID)) {
|
|
45
|
+
return { valid: false, error: "Missing MessageID" };
|
|
46
|
+
}
|
|
47
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.RecordsPerPage)) {
|
|
48
|
+
return { valid: false, error: "RecordsPerPage must be a number" };
|
|
49
|
+
}
|
|
50
|
+
if (entity.RecordsPerPage < 1 || entity.RecordsPerPage > 999) {
|
|
51
|
+
return { valid: false, error: "RecordsPerPage must be between 1 and 999" };
|
|
52
|
+
}
|
|
53
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.Page)) {
|
|
54
|
+
return { valid: false, error: "Page must be a number" };
|
|
55
|
+
}
|
|
56
|
+
if (entity.Page < 1) {
|
|
57
|
+
return { valid: false, error: "Page must be greater then 1" };
|
|
58
|
+
}
|
|
59
|
+
return { valid: true };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.SMSReplyApi = SMSReplyApi;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StatusApiResponseDTO } from "./dtos";
|
|
2
|
+
import { ErrorResponseDTO } from "../../Common/dtos";
|
|
3
|
+
import { IHttpClient } from "../../Common/IHttpClient";
|
|
4
|
+
import { IStatusArgs } from "./interfaces";
|
|
5
|
+
export declare class StatusApi {
|
|
6
|
+
private baseUrl;
|
|
7
|
+
private authToken;
|
|
8
|
+
private entity;
|
|
9
|
+
private httpClient;
|
|
10
|
+
constructor(args: {
|
|
11
|
+
URL: string;
|
|
12
|
+
AuthToken?: string;
|
|
13
|
+
httpClient?: IHttpClient;
|
|
14
|
+
});
|
|
15
|
+
private MapStatusResponse;
|
|
16
|
+
Poll(args?: IStatusArgs): Promise<StatusApiResponseDTO | ErrorResponseDTO>;
|
|
17
|
+
private validate;
|
|
18
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusApi = void 0;
|
|
4
|
+
const Functions_1 = require("../../Functions");
|
|
5
|
+
const dtos_1 = require("./dtos");
|
|
6
|
+
const dtos_2 = require("../../Common/dtos");
|
|
7
|
+
const Result_1 = require("../../Common/Result");
|
|
8
|
+
const isSuccessResult_1 = require("../../Common/isSuccessResult");
|
|
9
|
+
const NodeHttpClient_1 = require("../../Common/NodeHttpClient");
|
|
10
|
+
class StatusApi {
|
|
11
|
+
constructor(args) {
|
|
12
|
+
this.baseUrl = args.URL;
|
|
13
|
+
this.authToken = args.AuthToken || "";
|
|
14
|
+
this.entity = new dtos_1.StatusApiRequestDTO(args);
|
|
15
|
+
this.httpClient = args.httpClient ?? new NodeHttpClient_1.NodeHttpClient(this.authToken);
|
|
16
|
+
}
|
|
17
|
+
MapStatusResponse(responseData, channel) {
|
|
18
|
+
if (responseData.HttpStatusCode === 200 || (0, isSuccessResult_1.isSuccessResult)(responseData.Result)) {
|
|
19
|
+
if (!Functions_1.UsefulStuff.isEmpty(responseData.Recipients)) {
|
|
20
|
+
const isSMS = (channel || 'sms').toLowerCase() === 'sms';
|
|
21
|
+
const recipients = [];
|
|
22
|
+
for (let i = 0; i < responseData.Recipients.length; i++) {
|
|
23
|
+
if (isSMS) {
|
|
24
|
+
recipients.push(new dtos_1.SMSReplyRecipientDTO(responseData.Recipients[i]));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
recipients.push(new dtos_1.RecipientDTO(responseData.Recipients[i]));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
responseData.Recipients = recipients;
|
|
31
|
+
}
|
|
32
|
+
return new dtos_1.StatusApiResponseDTO(responseData);
|
|
33
|
+
}
|
|
34
|
+
return new dtos_2.ErrorResponseDTO(responseData);
|
|
35
|
+
}
|
|
36
|
+
async Poll(args) {
|
|
37
|
+
if (args) {
|
|
38
|
+
(0, Functions_1.Map)(this.entity, args);
|
|
39
|
+
}
|
|
40
|
+
const currentEntity = this.entity;
|
|
41
|
+
this.entity = new dtos_1.StatusApiRequestDTO({ URL: this.baseUrl, AuthToken: this.authToken });
|
|
42
|
+
const validation = this.validate(currentEntity);
|
|
43
|
+
if (!validation.valid) {
|
|
44
|
+
return this.MapStatusResponse({
|
|
45
|
+
"Result": Result_1.Result.Error,
|
|
46
|
+
"ErrorMessage": [validation.error || "An error occurred while processing."]
|
|
47
|
+
}, currentEntity.Channel || 'sms');
|
|
48
|
+
}
|
|
49
|
+
const channel = currentEntity.Channel || 'sms';
|
|
50
|
+
const url = `${this.baseUrl}/${channel}/${currentEntity.MessageID}?recordsPerPage=${currentEntity.RecordsPerPage}&page=${currentEntity.Page}`;
|
|
51
|
+
const responseData = await this.httpClient.get(url);
|
|
52
|
+
return this.MapStatusResponse(responseData, channel);
|
|
53
|
+
}
|
|
54
|
+
validate(entity) {
|
|
55
|
+
if (Functions_1.UsefulStuff.isEmpty(this.authToken)) {
|
|
56
|
+
return { valid: false, error: "Missing Auth Token" };
|
|
57
|
+
}
|
|
58
|
+
if (Functions_1.UsefulStuff.isEmpty(entity.MessageID)) {
|
|
59
|
+
return { valid: false, error: "Missing MessageID" };
|
|
60
|
+
}
|
|
61
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.RecordsPerPage)) {
|
|
62
|
+
return { valid: false, error: "RecordsPerPage must be a number" };
|
|
63
|
+
}
|
|
64
|
+
if (entity.RecordsPerPage < 1 || entity.RecordsPerPage > 999) {
|
|
65
|
+
return { valid: false, error: "RecordsPerPage must be between 1 and 999" };
|
|
66
|
+
}
|
|
67
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.Page)) {
|
|
68
|
+
return { valid: false, error: "Page must be a number" };
|
|
69
|
+
}
|
|
70
|
+
if (entity.Page < 1) {
|
|
71
|
+
return { valid: false, error: "Page must be greater than 1" };
|
|
72
|
+
}
|
|
73
|
+
return { valid: true };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.StatusApi = StatusApi;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class RecipientDTO {
|
|
2
|
+
Type?: string;
|
|
3
|
+
DestSeq?: number;
|
|
4
|
+
Destination?: string;
|
|
5
|
+
ContactID?: string;
|
|
6
|
+
Status?: string;
|
|
7
|
+
Result?: string;
|
|
8
|
+
SentTimeLocal?: string;
|
|
9
|
+
SentTimeUTC?: string;
|
|
10
|
+
Attention?: string;
|
|
11
|
+
Company?: string;
|
|
12
|
+
Custom1?: string;
|
|
13
|
+
Custom2?: string;
|
|
14
|
+
Custom3?: string;
|
|
15
|
+
Custom4?: string;
|
|
16
|
+
Custom5?: string;
|
|
17
|
+
Custom6?: string;
|
|
18
|
+
Custom7?: string;
|
|
19
|
+
Custom8?: string;
|
|
20
|
+
Custom9?: string;
|
|
21
|
+
RemoteID?: string;
|
|
22
|
+
Price?: number;
|
|
23
|
+
constructor(data?: any);
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecipientDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
class RecipientDTO {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
if (data) {
|
|
8
|
+
(0, Mapper_1.Map)(this, data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.RecipientDTO = RecipientDTO;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommonListApiRequestDTO } from "../../../Common/dtos/CommonListApiRequestDTO";
|
|
2
|
+
export declare class SMSReceivedApiRequestDTO extends CommonListApiRequestDTO {
|
|
3
|
+
TimePeriod: number;
|
|
4
|
+
DateFrom: string | null;
|
|
5
|
+
DateTo: string | null;
|
|
6
|
+
constructor(data?: any);
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSReceivedApiRequestDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
const CommonListApiRequestDTO_1 = require("../../../Common/dtos/CommonListApiRequestDTO");
|
|
6
|
+
class SMSReceivedApiRequestDTO extends CommonListApiRequestDTO_1.CommonListApiRequestDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
this.TimePeriod = 1440;
|
|
10
|
+
this.DateFrom = null;
|
|
11
|
+
this.DateTo = null;
|
|
12
|
+
if (data) {
|
|
13
|
+
(0, Mapper_1.Map)(this, data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.SMSReceivedApiRequestDTO = SMSReceivedApiRequestDTO;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommonListApiResponseDTO } from "../../../Common/dtos/CommonListApiResponseDTO";
|
|
2
|
+
import { SMSReceivedDTO } from "./SMSReceivedDTO";
|
|
3
|
+
export declare class SMSReceivedApiResponseDTO extends CommonListApiResponseDTO {
|
|
4
|
+
Messages: SMSReceivedDTO[];
|
|
5
|
+
constructor(data?: any);
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSReceivedApiResponseDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
const CommonListApiResponseDTO_1 = require("../../../Common/dtos/CommonListApiResponseDTO");
|
|
6
|
+
class SMSReceivedApiResponseDTO extends CommonListApiResponseDTO_1.CommonListApiResponseDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
this.Messages = [];
|
|
10
|
+
if (data) {
|
|
11
|
+
(0, Mapper_1.Map)(this, data);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.SMSReceivedApiResponseDTO = SMSReceivedApiResponseDTO;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class SMSReceivedDTO {
|
|
2
|
+
ReceivedID?: string;
|
|
3
|
+
MessageID?: string;
|
|
4
|
+
JobNum?: string;
|
|
5
|
+
SubAccount?: string;
|
|
6
|
+
Department?: string;
|
|
7
|
+
ReceivedTimeLocal?: string;
|
|
8
|
+
ReceivedTimeUTC?: string;
|
|
9
|
+
From?: string;
|
|
10
|
+
ContactID?: string;
|
|
11
|
+
MessageText?: string;
|
|
12
|
+
Timezone?: string;
|
|
13
|
+
constructor(data?: any);
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSReceivedDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
class SMSReceivedDTO {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
if (data) {
|
|
8
|
+
(0, Mapper_1.Map)(this, data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SMSReceivedDTO = SMSReceivedDTO;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSReplyApiRequestDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../Functions/Mapper");
|
|
5
|
+
const CommonListApiRequestDTO_1 = require("../../../Common/dtos/CommonListApiRequestDTO");
|
|
6
|
+
class SMSReplyApiRequestDTO extends CommonListApiRequestDTO_1.CommonListApiRequestDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
if (data) {
|
|
10
|
+
(0, Mapper_1.Map)(this, data);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.SMSReplyApiRequestDTO = SMSReplyApiRequestDTO;
|