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,78 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.GroupListApi = void 0;
|
|
37
|
+
const Functions_1 = require("../../../Functions");
|
|
38
|
+
const helpers = __importStar(require("./helpers"));
|
|
39
|
+
const dtos_1 = require("./dtos");
|
|
40
|
+
const NodeHttpClient_1 = require("../../../Common/NodeHttpClient");
|
|
41
|
+
class GroupListApi {
|
|
42
|
+
constructor(args) {
|
|
43
|
+
this.url = args.URL;
|
|
44
|
+
this.authToken = args.AuthToken || "";
|
|
45
|
+
this.entity = new dtos_1.GroupListApiRequestDTO(args);
|
|
46
|
+
this.httpClient = args.httpClient ?? new NodeHttpClient_1.NodeHttpClient(this.authToken);
|
|
47
|
+
}
|
|
48
|
+
async Run(args) {
|
|
49
|
+
if (args) {
|
|
50
|
+
(0, Functions_1.Map)(this.entity, args);
|
|
51
|
+
}
|
|
52
|
+
const currentEntity = this.entity;
|
|
53
|
+
this.entity = new dtos_1.GroupListApiRequestDTO(); // Reset state for next call
|
|
54
|
+
const validation = this.validate(currentEntity);
|
|
55
|
+
if (!validation.valid) {
|
|
56
|
+
return helpers.MapListApiResponse({
|
|
57
|
+
"Result": "Error",
|
|
58
|
+
"ErrorMessage": [validation.error || "An error occurred while processing."]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const url = `${this.url}/List?recordsPerPage=${currentEntity.RecordsPerPage}&page=${currentEntity.Page}`;
|
|
62
|
+
const responseData = await this.httpClient.get(url);
|
|
63
|
+
return helpers.MapListApiResponse(responseData);
|
|
64
|
+
}
|
|
65
|
+
validate(entity) {
|
|
66
|
+
if (Functions_1.UsefulStuff.isEmpty(this.authToken)) {
|
|
67
|
+
return { valid: false, error: "Missing AuthToken" };
|
|
68
|
+
}
|
|
69
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.RecordsPerPage)) {
|
|
70
|
+
return { valid: false, error: "RecordPerPage must be a number" };
|
|
71
|
+
}
|
|
72
|
+
if (!Functions_1.UsefulStuff.isNumber(entity.Page)) {
|
|
73
|
+
return { valid: false, error: "Page must be a number" };
|
|
74
|
+
}
|
|
75
|
+
return { valid: true };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.GroupListApi = GroupListApi;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GroupApiResponseDTO } from "./dtos";
|
|
2
|
+
import { ErrorResponseDTO } from "../../../Common/dtos";
|
|
3
|
+
import { IHttpClient } from "../../../Common/IHttpClient";
|
|
4
|
+
import { IGroupUpdateArgs } from "../interfaces";
|
|
5
|
+
export declare class GroupUpdateApi {
|
|
6
|
+
private url;
|
|
7
|
+
private authToken;
|
|
8
|
+
private entity;
|
|
9
|
+
private httpClient;
|
|
10
|
+
constructor(args: {
|
|
11
|
+
URL: string;
|
|
12
|
+
AuthToken?: string;
|
|
13
|
+
httpClient?: IHttpClient;
|
|
14
|
+
});
|
|
15
|
+
Run(args?: IGroupUpdateArgs): Promise<GroupApiResponseDTO | ErrorResponseDTO>;
|
|
16
|
+
private validate;
|
|
17
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.GroupUpdateApi = void 0;
|
|
37
|
+
const Functions_1 = require("../../../Functions");
|
|
38
|
+
const helpers = __importStar(require("./helpers"));
|
|
39
|
+
const dtos_1 = require("./dtos");
|
|
40
|
+
const models_1 = require("./models");
|
|
41
|
+
const NodeHttpClient_1 = require("../../../Common/NodeHttpClient");
|
|
42
|
+
class GroupUpdateApi {
|
|
43
|
+
constructor(args) {
|
|
44
|
+
this.url = args.URL;
|
|
45
|
+
this.authToken = args.AuthToken || "";
|
|
46
|
+
this.entity = new dtos_1.GroupApiRequestDTO(args);
|
|
47
|
+
this.httpClient = args.httpClient ?? new NodeHttpClient_1.NodeHttpClient(this.authToken);
|
|
48
|
+
}
|
|
49
|
+
async Run(args) {
|
|
50
|
+
if (args) {
|
|
51
|
+
(0, Functions_1.Map)(this.entity, args);
|
|
52
|
+
}
|
|
53
|
+
const currentEntity = this.entity;
|
|
54
|
+
this.entity = new dtos_1.GroupApiRequestDTO(); // Reset state for next call
|
|
55
|
+
const validation = this.validate(currentEntity);
|
|
56
|
+
if (!validation.valid) {
|
|
57
|
+
return helpers.MapApiResponse({
|
|
58
|
+
"Result": "Error",
|
|
59
|
+
"ErrorMessage": [validation.error || "An error occurred while processing."]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const group = new models_1.GroupModel(currentEntity);
|
|
63
|
+
const url = `${this.url}/${group.GroupID ?? group.GroupCode}`;
|
|
64
|
+
const responseData = await this.httpClient.patch(url, currentEntity);
|
|
65
|
+
return helpers.MapApiResponse(responseData);
|
|
66
|
+
}
|
|
67
|
+
validate(entity) {
|
|
68
|
+
if (Functions_1.UsefulStuff.isEmpty(this.authToken)) {
|
|
69
|
+
return { valid: false, error: "Missing AuthToken" };
|
|
70
|
+
}
|
|
71
|
+
const group = new models_1.GroupModel(entity);
|
|
72
|
+
if (Functions_1.UsefulStuff.isEmpty(group.GroupID) && Functions_1.UsefulStuff.isEmpty(group.GroupCode)) {
|
|
73
|
+
return { valid: false, error: "Missing GroupID or GroupCode" };
|
|
74
|
+
}
|
|
75
|
+
if (group.ViewEditBy) {
|
|
76
|
+
switch (group.ViewEditBy.toUpperCase()) {
|
|
77
|
+
case "ACCOUNT":
|
|
78
|
+
case "SUBACCOUNT":
|
|
79
|
+
case "DEPARTMENT":
|
|
80
|
+
case "NO":
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
return { valid: false, error: "Invalid ViewEditBy option - must be Account/Subaccount/Department/No" };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return { valid: true };
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.GroupUpdateApi = GroupUpdateApi;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupApiRequestDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../../Functions/Mapper");
|
|
5
|
+
const CommonApiRequestDTO_1 = require("../../../../Common/dtos/CommonApiRequestDTO");
|
|
6
|
+
const GroupModel_1 = require("../models/GroupModel");
|
|
7
|
+
class GroupApiRequestDTO extends CommonApiRequestDTO_1.CommonApiRequestDTO {
|
|
8
|
+
constructor(data) {
|
|
9
|
+
super();
|
|
10
|
+
if (data) {
|
|
11
|
+
const groupModelInstance = new GroupModel_1.GroupModel(data);
|
|
12
|
+
Object.assign(this, groupModelInstance);
|
|
13
|
+
(0, Mapper_1.Map)(this, data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
toJSON() {
|
|
17
|
+
const copy = { ...this };
|
|
18
|
+
delete copy.GroupCode;
|
|
19
|
+
return copy;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.GroupApiRequestDTO = GroupApiRequestDTO;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupApiResponseDTO = void 0;
|
|
4
|
+
const dtos_1 = require("../../../../Common/dtos");
|
|
5
|
+
const Mapper_1 = require("../../../../Functions/Mapper");
|
|
6
|
+
class GroupApiResponseDTO extends dtos_1.CommonApiResponseDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
if (data) {
|
|
10
|
+
(0, Mapper_1.Map)(this, data);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.GroupApiResponseDTO = GroupApiResponseDTO;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupListApiRequestDTO = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../../Functions/Mapper");
|
|
5
|
+
const CommonListApiRequestDTO_1 = require("../../../../Common/dtos/CommonListApiRequestDTO");
|
|
6
|
+
class GroupListApiRequestDTO extends CommonListApiRequestDTO_1.CommonListApiRequestDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
if (data) {
|
|
10
|
+
(0, Mapper_1.Map)(this, data);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.GroupListApiRequestDTO = GroupListApiRequestDTO;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonApiResponseDTO } from "../../../../Common/dtos";
|
|
2
|
+
import { GroupModel } from "../models/GroupModel";
|
|
3
|
+
export declare class GroupListApiResponseDTO extends CommonApiResponseDTO {
|
|
4
|
+
TotalRecords?: number;
|
|
5
|
+
RecordsPerPage?: number;
|
|
6
|
+
PageCount?: number;
|
|
7
|
+
Page?: number;
|
|
8
|
+
Groups?: GroupModel[];
|
|
9
|
+
constructor(data?: any);
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupListApiResponseDTO = void 0;
|
|
4
|
+
const dtos_1 = require("../../../../Common/dtos");
|
|
5
|
+
const Mapper_1 = require("../../../../Functions/Mapper");
|
|
6
|
+
class GroupListApiResponseDTO extends dtos_1.CommonApiResponseDTO {
|
|
7
|
+
constructor(data) {
|
|
8
|
+
super();
|
|
9
|
+
if (data) {
|
|
10
|
+
(0, Mapper_1.Map)(this, data);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.GroupListApiResponseDTO = GroupListApiResponseDTO;
|
|
@@ -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("./GroupApiRequestDTO"), exports);
|
|
18
|
+
__exportStar(require("./GroupApiResponseDTO"), exports);
|
|
19
|
+
__exportStar(require("./GroupListApiRequestDTO"), exports);
|
|
20
|
+
__exportStar(require("./GroupListApiResponseDTO"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MapApiResponse = void 0;
|
|
4
|
+
const Functions_1 = require("../../../../Functions");
|
|
5
|
+
const GroupApiResponseDTO_1 = require("../dtos/GroupApiResponseDTO");
|
|
6
|
+
const ErrorResponseDTO_1 = require("../../../../Common/dtos/ErrorResponseDTO");
|
|
7
|
+
const isSuccessResult_1 = require("../../../../Common/isSuccessResult");
|
|
8
|
+
const GroupModel_1 = require("../models/GroupModel");
|
|
9
|
+
const MapApiResponse = (responseData) => {
|
|
10
|
+
if (!Functions_1.UsefulStuff.isEmpty(responseData)) {
|
|
11
|
+
if (responseData.HttpStatusCode === 200 || (0, isSuccessResult_1.isSuccessResult)(responseData.Result)) {
|
|
12
|
+
if (!Functions_1.UsefulStuff.isEmpty(responseData.Group)) {
|
|
13
|
+
responseData.Group = new GroupModel_1.GroupModel(responseData.Group);
|
|
14
|
+
}
|
|
15
|
+
return new GroupApiResponseDTO_1.GroupApiResponseDTO(responseData);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return new ErrorResponseDTO_1.ErrorResponseDTO(responseData);
|
|
19
|
+
};
|
|
20
|
+
exports.MapApiResponse = MapApiResponse;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MapListApiResponse = void 0;
|
|
4
|
+
const Functions_1 = require("../../../../Functions");
|
|
5
|
+
const GroupListApiResponseDTO_1 = require("../dtos/GroupListApiResponseDTO");
|
|
6
|
+
const ErrorResponseDTO_1 = require("../../../../Common/dtos/ErrorResponseDTO");
|
|
7
|
+
const isSuccessResult_1 = require("../../../../Common/isSuccessResult");
|
|
8
|
+
const GroupModel_1 = require("../models/GroupModel");
|
|
9
|
+
const MapListApiResponse = (responseData) => {
|
|
10
|
+
if (!Functions_1.UsefulStuff.isEmpty(responseData)) {
|
|
11
|
+
if (responseData.HttpStatusCode === 200 || (0, isSuccessResult_1.isSuccessResult)(responseData.Result)) {
|
|
12
|
+
if (!Functions_1.UsefulStuff.isEmpty(responseData.Groups)) {
|
|
13
|
+
let groups = [];
|
|
14
|
+
for (let group of responseData.Groups) {
|
|
15
|
+
groups.push(new GroupModel_1.GroupModel(group));
|
|
16
|
+
}
|
|
17
|
+
responseData.Groups = groups;
|
|
18
|
+
}
|
|
19
|
+
return new GroupListApiResponseDTO_1.GroupListApiResponseDTO(responseData);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return new ErrorResponseDTO_1.ErrorResponseDTO(responseData);
|
|
23
|
+
};
|
|
24
|
+
exports.MapListApiResponse = MapListApiResponse;
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./MapApiResponse"), exports);
|
|
18
|
+
__exportStar(require("./MapListApiResponse"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GroupApiResponseDTO, GroupListApiResponseDTO } from "./dtos";
|
|
2
|
+
import { ErrorResponseDTO } from "../../../Common/dtos";
|
|
3
|
+
import { ITNZAuthArgs } from "../../../interfaces";
|
|
4
|
+
import { IGroupCreateArgs, IGroupUpdateArgs, IGroupDeleteArgs, IGroupDetailArgs, IGroupListArgs } from "../interfaces";
|
|
5
|
+
export declare class Group {
|
|
6
|
+
Create: (args?: IGroupCreateArgs) => Promise<GroupApiResponseDTO | ErrorResponseDTO>;
|
|
7
|
+
Update: (args?: IGroupUpdateArgs) => Promise<GroupApiResponseDTO | ErrorResponseDTO>;
|
|
8
|
+
Delete: (args?: IGroupDeleteArgs) => Promise<GroupApiResponseDTO | ErrorResponseDTO>;
|
|
9
|
+
Detail: (args?: IGroupDetailArgs) => Promise<GroupApiResponseDTO | ErrorResponseDTO>;
|
|
10
|
+
List: (args?: IGroupListArgs) => Promise<GroupListApiResponseDTO | ErrorResponseDTO>;
|
|
11
|
+
constructor(auth: ITNZAuthArgs);
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Group = void 0;
|
|
4
|
+
const GroupCreateApi_1 = require("./GroupCreateApi");
|
|
5
|
+
const GroupUpdateApi_1 = require("./GroupUpdateApi");
|
|
6
|
+
const GroupDeleteApi_1 = require("./GroupDeleteApi");
|
|
7
|
+
const GroupDetailApi_1 = require("./GroupDetailApi");
|
|
8
|
+
const GroupListApi_1 = require("./GroupListApi");
|
|
9
|
+
class Group {
|
|
10
|
+
constructor(auth) {
|
|
11
|
+
const args = { ...auth, URL: `${auth.URL}/group` };
|
|
12
|
+
const createApi = new GroupCreateApi_1.GroupCreateApi(args);
|
|
13
|
+
const updateApi = new GroupUpdateApi_1.GroupUpdateApi(args);
|
|
14
|
+
const deleteApi = new GroupDeleteApi_1.GroupDeleteApi(args);
|
|
15
|
+
const detailApi = new GroupDetailApi_1.GroupDetailApi(args);
|
|
16
|
+
const listApi = new GroupListApi_1.GroupListApi(args);
|
|
17
|
+
this.Create = createApi.Run.bind(createApi);
|
|
18
|
+
this.Update = updateApi.Run.bind(updateApi);
|
|
19
|
+
this.Delete = deleteApi.Run.bind(deleteApi);
|
|
20
|
+
this.Detail = detailApi.Run.bind(detailApi);
|
|
21
|
+
this.List = listApi.Run.bind(listApi);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Group = Group;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class GroupModel {
|
|
2
|
+
GroupID?: string;
|
|
3
|
+
GroupCode?: string;
|
|
4
|
+
GroupName?: string;
|
|
5
|
+
SubAccount?: string;
|
|
6
|
+
Department?: string;
|
|
7
|
+
Owner?: string;
|
|
8
|
+
ViewEditBy?: string;
|
|
9
|
+
AccessControl?: string;
|
|
10
|
+
CreatedTimeLocal?: string;
|
|
11
|
+
CreatedTimeUTC?: string;
|
|
12
|
+
Timezone?: string;
|
|
13
|
+
constructor(data?: any);
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupModel = void 0;
|
|
4
|
+
const Mapper_1 = require("../../../../Functions/Mapper");
|
|
5
|
+
class GroupModel {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
if (data) {
|
|
8
|
+
if (data.Group) {
|
|
9
|
+
(0, Mapper_1.Map)(this, data.Group);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
(0, Mapper_1.Map)(this, data);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.GroupModel = GroupModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GroupModel';
|
|
@@ -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("./GroupModel"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Contact } from "./Contacts";
|
|
2
|
+
import { ContactGroup } from "./ContactGroups";
|
|
3
|
+
import { Group } from "./Groups";
|
|
4
|
+
import { GroupContact } from "./GroupContacts";
|
|
5
|
+
import { ITNZAuthArgs } from "../../interfaces";
|
|
6
|
+
export declare class Addressbook {
|
|
7
|
+
Contact: Contact;
|
|
8
|
+
ContactGroup: ContactGroup;
|
|
9
|
+
Group: Group;
|
|
10
|
+
GroupContact: GroupContact;
|
|
11
|
+
constructor(auth: ITNZAuthArgs);
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Addressbook = void 0;
|
|
4
|
+
const Contacts_1 = require("./Contacts");
|
|
5
|
+
const ContactGroups_1 = require("./ContactGroups");
|
|
6
|
+
const Groups_1 = require("./Groups");
|
|
7
|
+
const GroupContacts_1 = require("./GroupContacts");
|
|
8
|
+
class Addressbook {
|
|
9
|
+
constructor(auth) {
|
|
10
|
+
const args = { ...auth, URL: `${auth.URL}/addressbook` };
|
|
11
|
+
this.Contact = new Contacts_1.Contact(args);
|
|
12
|
+
this.ContactGroup = new ContactGroups_1.ContactGroup(args);
|
|
13
|
+
this.Group = new Groups_1.Group(args);
|
|
14
|
+
this.GroupContact = new GroupContacts_1.GroupContact(args);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Addressbook = Addressbook;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface IContactFields {
|
|
2
|
+
Title?: string;
|
|
3
|
+
Company?: string;
|
|
4
|
+
FirstName?: string;
|
|
5
|
+
LastName?: string;
|
|
6
|
+
Position?: string;
|
|
7
|
+
Attention?: string;
|
|
8
|
+
RecipDepartment?: string;
|
|
9
|
+
StreetAddress?: string;
|
|
10
|
+
Suburb?: string;
|
|
11
|
+
City?: string;
|
|
12
|
+
State?: string;
|
|
13
|
+
Country?: string;
|
|
14
|
+
Postcode?: string;
|
|
15
|
+
MainPhone?: string;
|
|
16
|
+
DirectPhone?: string;
|
|
17
|
+
MobilePhone?: string;
|
|
18
|
+
AltPhone1?: string;
|
|
19
|
+
AltPhone2?: string;
|
|
20
|
+
FaxNumber?: string;
|
|
21
|
+
EmailAddress?: string;
|
|
22
|
+
WebAddress?: string;
|
|
23
|
+
Custom1?: string;
|
|
24
|
+
Custom2?: string;
|
|
25
|
+
Custom3?: string;
|
|
26
|
+
Custom4?: string;
|
|
27
|
+
Timezone?: string;
|
|
28
|
+
ViewBy?: string;
|
|
29
|
+
EditBy?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface IContactCreateArgs extends IContactFields {
|
|
32
|
+
}
|
|
33
|
+
export interface IContactUpdateArgs extends IContactFields {
|
|
34
|
+
ContactID: string;
|
|
35
|
+
}
|
|
36
|
+
export interface IContactDetailArgs {
|
|
37
|
+
ContactID: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IContactDeleteArgs {
|
|
40
|
+
ContactID: string;
|
|
41
|
+
}
|
|
42
|
+
export interface IContactListArgs {
|
|
43
|
+
RecordsPerPage?: number;
|
|
44
|
+
Page?: number;
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContactModel } from "../Contacts/models/ContactModel";
|
|
2
|
+
import { GroupModel } from "../Groups/models/GroupModel";
|
|
3
|
+
export interface IContactGroupArgs {
|
|
4
|
+
ContactID?: string;
|
|
5
|
+
Contact?: ContactModel;
|
|
6
|
+
GroupID?: string;
|
|
7
|
+
GroupCode?: string;
|
|
8
|
+
Group?: GroupModel;
|
|
9
|
+
}
|
|
10
|
+
export interface IContactGroupListArgs {
|
|
11
|
+
ContactID?: string;
|
|
12
|
+
Contact?: ContactModel;
|
|
13
|
+
RecordsPerPage?: number;
|
|
14
|
+
Page?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface IGroupFields {
|
|
2
|
+
GroupName?: string;
|
|
3
|
+
ViewEditBy?: string;
|
|
4
|
+
SubAccount?: string;
|
|
5
|
+
Department?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IGroupCreateArgs extends IGroupFields {
|
|
8
|
+
}
|
|
9
|
+
export interface IGroupUpdateArgs extends IGroupFields {
|
|
10
|
+
GroupID?: string;
|
|
11
|
+
GroupCode?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IGroupDetailArgs {
|
|
14
|
+
GroupID?: string;
|
|
15
|
+
GroupCode?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IGroupDeleteArgs {
|
|
18
|
+
GroupID?: string;
|
|
19
|
+
GroupCode?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IGroupListArgs {
|
|
22
|
+
RecordsPerPage?: number;
|
|
23
|
+
Page?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ContactModel } from "../Contacts/models/ContactModel";
|
|
2
|
+
import { GroupModel } from "../Groups/models/GroupModel";
|
|
3
|
+
export interface IGroupContactArgs {
|
|
4
|
+
GroupID?: string;
|
|
5
|
+
GroupCode?: string;
|
|
6
|
+
Group?: GroupModel;
|
|
7
|
+
ContactID?: string;
|
|
8
|
+
Contact?: ContactModel;
|
|
9
|
+
}
|
|
10
|
+
export interface IGroupContactListArgs {
|
|
11
|
+
GroupID?: string;
|
|
12
|
+
GroupCode?: string;
|
|
13
|
+
Group?: GroupModel;
|
|
14
|
+
RecordsPerPage?: number;
|
|
15
|
+
Page?: number;
|
|
16
|
+
}
|