bandwidth-sdk 8.1.1 → 8.1.2
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/bandwidth.yml +22 -9
- package/configuration.ts +1 -1
- package/coverage/clover.xml +68 -68
- package/coverage/coverage-final.json +36 -36
- package/coverage/lcov-report/index.html +15 -15
- package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/endpoints-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/index.html +1 -1
- package/coverage/lcov-report/node-sdk/api/media-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/multi-channel-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/common.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/configuration.ts.html +47 -47
- package/coverage/lcov-report/node-sdk/index.html +16 -16
- package/coverage/lcov-report/node-sdk/models/business-entity-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/business-registration-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Connect.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Endpoint.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/card-width-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/completed-lookup-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/deactivation-event-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/device-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/endpoint-direction-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/endpoint-event-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/endpoint-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/endpoint-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/in-progress-lookup-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/inbound-callback-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/latest-message-delivery-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/line-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/multi-channel-message-channel-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/product-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/rbm-action-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/rbm-media-height-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/rbm-open-url-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/rbm-web-view-enum.ts.html +3 -3
- package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/standalone-card-orientation-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/status-callback-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/thumbnail-alignment-enum.ts.html +3 -3
- package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +2 -2
- package/coverage/lcov.info +86 -86
- package/dist/configuration.js +1 -1
- package/dist/models/multi-channel-action-calendar-event.d.ts +2 -2
- package/dist/models/multi-channel-action.d.ts +5 -5
- package/dist/models/rbm-action-open-url.d.ts +1 -1
- package/dist/models/rbm-action-view-location.d.ts +2 -2
- package/dist/models/rbm-card-content.d.ts +3 -0
- package/dist/models/rbm-standalone-card.d.ts +1 -1
- package/dist/models/rbm-web-view-enum.d.ts +1 -1
- package/dist/models/rbm-web-view-enum.js +1 -1
- package/dist/models/thumbnail-alignment-enum.d.ts +1 -1
- package/dist/models/thumbnail-alignment-enum.js +1 -1
- package/docs/MultiChannelAction.md +5 -5
- package/docs/MultiChannelActionCalendarEvent.md +2 -2
- package/docs/MultiChannelChannelListRBMObjectAllOfContent.md +1 -1
- package/docs/RbmActionOpenUrl.md +1 -1
- package/docs/RbmActionViewLocation.md +2 -2
- package/docs/RbmCardContent.md +1 -0
- package/docs/RbmMessageContentRichCard.md +1 -1
- package/docs/RbmStandaloneCard.md +1 -1
- package/docs/RbmWebViewEnum.md +1 -1
- package/docs/ThumbnailAlignmentEnum.md +1 -1
- package/jest.config.js +3 -0
- package/models/multi-channel-action-calendar-event.ts +2 -2
- package/models/multi-channel-action.ts +5 -5
- package/models/rbm-action-open-url.ts +1 -1
- package/models/rbm-action-view-location.ts +2 -2
- package/models/rbm-card-content.ts +3 -0
- package/models/rbm-standalone-card.ts +1 -1
- package/models/rbm-web-view-enum.ts +1 -1
- package/models/thumbnail-alignment-enum.ts +1 -1
- package/package.json +1 -1
- package/tests/globals.d.ts +23 -0
- package/tests/tsconfig.json +9 -0
- package/tests/unit/api/calls-api.test.ts +11 -4
- package/tests/unit/api/conferences-api.test.ts +0 -1
- package/tests/unit/api/endpoints-api.test.ts +10 -6
- package/tests/unit/api/media-api.test.ts +1 -1
- package/tests/unit/api/messages-api.test.ts +13 -4
- package/tests/unit/api/mfaapi.test.ts +6 -2
- package/tests/unit/api/phone-number-lookup-api.test.ts +30 -31
- package/tests/unit/api/recordings-api.test.ts +9 -4
- package/tests/unit/api/statistics-api.test.ts +5 -2
- package/tests/unit/api/toll-free-verification-api.test.ts +25 -17
- package/tests/unit/api/transcriptions-api.test.ts +0 -1
- package/tests/unit/configuration.test.ts +84 -0
- package/tests/unit/models/account-statistics.test.ts +13 -0
- package/tests/unit/models/additional-denial-reason.test.ts +15 -0
- package/tests/unit/models/address.test.ts +23 -0
- package/tests/unit/models/answer-callback.test.ts +39 -0
- package/tests/unit/models/async-lookup-request.test.ts +11 -0
- package/tests/unit/models/blocked-webhook.test.ts +22 -0
- package/tests/unit/models/bridge-complete-callback.test.ts +42 -0
- package/tests/unit/models/bridge-target-complete-callback.test.ts +36 -0
- package/tests/unit/models/business-entity-type-enum.test.ts +7 -0
- package/tests/unit/models/business-registration-type-enum.test.ts +20 -0
- package/tests/unit/models/call-direction-enum.test.ts +4 -0
- package/tests/unit/models/call-recording-metadata.test.ts +50 -0
- package/tests/unit/models/call-state-enum.test.ts +4 -0
- package/tests/unit/models/call-state.test.ts +46 -0
- package/tests/unit/models/call-transcription-detected-language-enum.test.ts +5 -0
- package/tests/unit/models/call-transcription-metadata.test.ts +15 -0
- package/tests/unit/models/call-transcription-response.test.ts +17 -0
- package/tests/unit/models/call-transcription-track-enum.test.ts +4 -0
- package/tests/unit/models/call-transcription.test.ts +19 -0
- package/tests/unit/models/callback-method-enum.test.ts +4 -0
- package/tests/unit/models/card-width-enum.test.ts +4 -0
- package/tests/unit/models/code-request.test.ts +21 -0
- package/tests/unit/models/completed-lookup-status-enum.test.ts +5 -0
- package/tests/unit/models/conference-completed-callback.test.ts +19 -0
- package/tests/unit/models/conference-created-callback.test.ts +19 -0
- package/tests/unit/models/conference-member-exit-callback.test.ts +25 -0
- package/tests/unit/models/conference-member-join-callback.test.ts +25 -0
- package/tests/unit/models/conference-member.test.ts +21 -0
- package/tests/unit/models/conference-recording-available-callback.test.ts +38 -0
- package/tests/unit/models/conference-recording-metadata.test.ts +34 -0
- package/tests/unit/models/conference-redirect-callback.test.ts +19 -0
- package/tests/unit/models/conference-state-enum.test.ts +4 -0
- package/tests/unit/models/conference.test.ts +26 -0
- package/tests/unit/models/contact.test.ts +17 -0
- package/tests/unit/models/create-async-bulk-lookup-response-data.test.ts +14 -0
- package/tests/unit/models/create-async-bulk-lookup-response.test.ts +16 -0
- package/tests/unit/models/create-call-response.test.ts +52 -0
- package/tests/unit/models/create-call.test.ts +53 -0
- package/tests/unit/models/create-endpoint-response-data.test.ts +2 -4
- package/tests/unit/models/create-endpoint-response.test.ts +4 -4
- package/tests/unit/models/create-message-request-error.test.ts +15 -0
- package/tests/unit/models/create-multi-channel-message-response.test.ts +16 -0
- package/tests/unit/models/create-sync-lookup-response-data.test.ts +16 -0
- package/tests/unit/models/create-sync-lookup-response.test.ts +16 -0
- package/tests/unit/models/deactivation-event-enum.test.ts +3 -0
- package/tests/unit/models/device.test.ts +1 -2
- package/tests/unit/models/disconnect-callback.test.ts +44 -0
- package/tests/unit/models/diversion.test.ts +23 -0
- package/tests/unit/models/dtmf-callback.test.ts +44 -0
- package/tests/unit/models/endpoint-event.test.ts +5 -7
- package/tests/unit/models/endpoint-response.test.ts +2 -2
- package/tests/unit/models/endpoint.test.ts +2 -4
- package/tests/unit/models/endpoints.test.ts +4 -6
- package/tests/unit/models/error-object.test.ts +16 -0
- package/tests/unit/models/error-source.test.ts +17 -0
- package/tests/unit/models/failure-webhook.test.ts +21 -0
- package/tests/unit/models/field-error.test.ts +13 -0
- package/tests/unit/models/file-format-enum.test.ts +4 -0
- package/tests/unit/models/gather-callback.test.ts +46 -0
- package/tests/unit/models/get-async-bulk-lookup-response-data.test.ts +16 -0
- package/tests/unit/models/get-async-bulk-lookup-response.test.ts +16 -0
- package/tests/unit/models/in-progress-lookup-status-enum.test.ts +6 -0
- package/tests/unit/models/inbound-callback-message.test.ts +48 -0
- package/tests/unit/models/inbound-callback-type-enum.test.ts +5 -0
- package/tests/unit/models/inbound-callback.test.ts +23 -0
- package/tests/unit/models/initiate-callback.test.ts +38 -0
- package/tests/unit/models/latest-message-delivery-status-enum.test.ts +6 -0
- package/tests/unit/models/line-type-enum.test.ts +6 -0
- package/tests/unit/models/link-schema.test.ts +15 -0
- package/tests/unit/models/link.test.ts +13 -0
- package/tests/unit/models/links-object.test.ts +17 -0
- package/tests/unit/models/list-endpoints-response.test.ts +2 -4
- package/tests/unit/models/list-message-direction-enum.test.ts +4 -0
- package/tests/unit/models/list-message-item.test.ts +58 -0
- package/tests/unit/models/lookup-error-response.test.ts +13 -0
- package/tests/unit/models/lookup-error-schema-meta.test.ts +15 -0
- package/tests/unit/models/lookup-error-schema.test.ts +18 -0
- package/tests/unit/models/lookup-result.test.ts +36 -0
- package/tests/unit/models/machine-detection-complete-callback.test.ts +39 -0
- package/tests/unit/models/machine-detection-configuration.test.ts +41 -0
- package/tests/unit/models/machine-detection-mode-enum.test.ts +4 -0
- package/tests/unit/models/machine-detection-result.test.ts +13 -0
- package/tests/unit/models/media.test.ts +15 -0
- package/tests/unit/models/message-direction-enum.test.ts +4 -0
- package/tests/unit/models/message-request.test.ts +27 -0
- package/tests/unit/models/message-status-enum.test.ts +10 -0
- package/tests/unit/models/message-type-enum.test.ts +5 -0
- package/tests/unit/models/message.test.ts +39 -0
- package/tests/unit/models/messages-list.test.ts +16 -0
- package/tests/unit/models/messaging-code-response.test.ts +11 -0
- package/tests/unit/models/messaging-request-error.test.ts +13 -0
- package/tests/unit/models/mfa-forbidden-request-error.test.ts +11 -0
- package/tests/unit/models/mfa-request-error.test.ts +13 -0
- package/tests/unit/models/mfa-unauthorized-request-error.test.ts +11 -0
- package/tests/unit/models/mms-message-content-file.test.ts +11 -0
- package/tests/unit/models/mms-message-content.test.ts +13 -0
- package/tests/unit/models/multi-channel-action-calendar-event.test.ts +24 -0
- package/tests/unit/models/multi-channel-action.test.ts +40 -0
- package/tests/unit/models/multi-channel-channel-list-mmsobject.test.ts +19 -0
- package/tests/unit/models/multi-channel-channel-list-mmsresponse-object.test.ts +21 -0
- package/tests/unit/models/multi-channel-channel-list-object-base.test.ts +16 -0
- package/tests/unit/models/multi-channel-channel-list-owner-object.test.ts +11 -0
- package/tests/unit/models/multi-channel-channel-list-rbmobject.test.ts +19 -0
- package/tests/unit/models/multi-channel-channel-list-rbmresponse-object.test.ts +21 -0
- package/tests/unit/models/multi-channel-channel-list-request-object.test.ts +19 -0
- package/tests/unit/models/multi-channel-channel-list-response-object.test.ts +21 -0
- package/tests/unit/models/multi-channel-channel-list-smsobject.test.ts +19 -0
- package/tests/unit/models/multi-channel-channel-list-smsresponse-object.test.ts +21 -0
- package/tests/unit/models/multi-channel-error.test.ts +13 -0
- package/tests/unit/models/multi-channel-message-channel-enum.test.ts +5 -0
- package/tests/unit/models/multi-channel-message-content.test.ts +14 -0
- package/tests/unit/models/multi-channel-message-request.test.ts +20 -0
- package/tests/unit/models/multi-channel-message-response-data.test.ts +28 -0
- package/tests/unit/models/opt-in-workflow.test.ts +15 -0
- package/tests/unit/models/page-info.test.ts +17 -0
- package/tests/unit/models/priority-enum.test.ts +4 -0
- package/tests/unit/models/product-type-enum.test.ts +11 -0
- package/tests/unit/models/rbm-action-base.test.ts +16 -0
- package/tests/unit/models/rbm-action-dial.test.ts +18 -0
- package/tests/unit/models/rbm-action-open-url.test.ts +24 -0
- package/tests/unit/models/rbm-action-type-enum.test.ts +8 -0
- package/tests/unit/models/rbm-action-view-location.test.ts +22 -0
- package/tests/unit/models/rbm-card-content-media.test.ts +16 -0
- package/tests/unit/models/rbm-card-content.test.ts +18 -0
- package/tests/unit/models/rbm-location-response.test.ts +13 -0
- package/tests/unit/models/rbm-media-height-enum.test.ts +5 -0
- package/tests/unit/models/rbm-message-carousel-card.test.ts +16 -0
- package/tests/unit/models/rbm-message-content-file.test.ts +13 -0
- package/tests/unit/models/rbm-message-content-text.test.ts +13 -0
- package/tests/unit/models/rbm-message-media.test.ts +13 -0
- package/tests/unit/models/rbm-open-url-enum.test.ts +4 -0
- package/tests/unit/models/rbm-standalone-card.test.ts +20 -0
- package/tests/unit/models/rbm-suggestion-response.test.ts +13 -0
- package/tests/unit/models/rbm-veb-view-enum.test.ts +5 -0
- package/tests/unit/models/recording-available-callback.test.ts +55 -0
- package/tests/unit/models/recording-complete-callback.test.ts +55 -0
- package/tests/unit/models/recording-state-enum.test.ts +4 -0
- package/tests/unit/models/recording-transcription-metadata.test.ts +17 -0
- package/tests/unit/models/recording-transcriptions.test.ts +11 -0
- package/tests/unit/models/redirect-callback.test.ts +42 -0
- package/tests/unit/models/redirect-method-enum.test.ts +4 -0
- package/tests/unit/models/sms-message-content.test.ts +11 -0
- package/tests/unit/models/standalone-card-orientation-enum.test.ts +4 -0
- package/tests/unit/models/status-callback-message.test.ts +39 -0
- package/tests/unit/models/status-callback-type-enum.test.ts +6 -0
- package/tests/unit/models/status-callback.test.ts +27 -0
- package/tests/unit/models/stir-shaken.test.ts +15 -0
- package/tests/unit/models/sync-lookup-request.test.ts +13 -0
- package/tests/unit/models/telephone-number.test.ts +11 -0
- package/tests/unit/models/tfv-basic-authentication.test.ts +13 -0
- package/tests/unit/models/tfv-callback-status-enum.test.ts +4 -0
- package/tests/unit/models/tfv-error.test.ts +13 -0
- package/tests/unit/models/tfv-status-enum.test.ts +5 -0
- package/tests/unit/models/tfv-status.test.ts +33 -0
- package/tests/unit/models/tfv-submission-info.test.ts +46 -0
- package/tests/unit/models/tfv-submission-wrapper.test.ts +12 -0
- package/tests/unit/models/thumbnail-alignment-enum.test.ts +4 -0
- package/tests/unit/models/transcribe-recording.test.ts +24 -0
- package/tests/unit/models/transcription-available-callback.test.ts +54 -0
- package/tests/unit/models/transcription.test.ts +13 -0
- package/tests/unit/models/transfer-answer-callback.test.ts +40 -0
- package/tests/unit/models/transfer-complete-callback.test.ts +46 -0
- package/tests/unit/models/transfer-disconnect-callback.test.ts +50 -0
- package/tests/unit/models/update-call-recording.test.ts +12 -0
- package/tests/unit/models/update-call.test.ts +31 -0
- package/tests/unit/models/update-conference-member.test.ts +15 -0
- package/tests/unit/models/update-conference.test.ts +29 -0
- package/tests/unit/models/verification-denial-webhook.test.ts +29 -0
- package/tests/unit/models/verification-request.test.ts +54 -0
- package/tests/unit/models/verification-update-request.test.ts +52 -0
- package/tests/unit/models/verification-webhook.test.ts +18 -0
- package/tests/unit/models/verify-code-request.test.ts +17 -0
- package/tests/unit/models/verify-code-response.test.ts +11 -0
- package/tests/unit/models/voice-api-error.test.ts +15 -0
- package/tests/unit/models/voice-code-response.test.ts +11 -0
- package/tests/unit/models/webhook-subscription-basic-authentication.test.ts +13 -0
- package/tests/unit/models/webhook-subscription-error.test.ts +15 -0
- package/tests/unit/models/webhook-subscription-request-schema.test.ts +16 -0
- package/tests/unit/models/webhook-subscription-type-enum.test.ts +4 -0
- package/tests/unit/models/webhook-subscription.test.ts +25 -0
- package/tests/unit/models/webhook-subscriptions-list-body.test.ts +16 -0
|
@@ -33,10 +33,8 @@ describe('Endpoint', () => {
|
|
|
33
33
|
expect(endpoint.endpointId).toBe('ep-123456');
|
|
34
34
|
expect(endpoint.type).toBe(EndpointTypeEnum.Webrtc);
|
|
35
35
|
expect(endpoint.status).toBe(EndpointStatusEnum.Connected);
|
|
36
|
-
expect(
|
|
37
|
-
expect(
|
|
38
|
-
expect(new Date(endpoint.expirationTimestamp).getFullYear()).toBe(2024);
|
|
39
|
-
expect(new Date(endpoint.expirationTimestamp).toISOString()).toBe('2024-02-19T10:30:00.000Z');
|
|
36
|
+
expect(endpoint.creationTimestamp).toBe('2024-02-18T10:30:00Z');
|
|
37
|
+
expect(endpoint.expirationTimestamp).toBe('2024-02-19T10:30:00Z');
|
|
40
38
|
expect(endpoint.tag).toBe('endpoint-tag');
|
|
41
39
|
expect(endpoint.devices).toHaveLength(2);
|
|
42
40
|
expect(endpoint.devices![0].deviceId).toBe('dev-1');
|
|
@@ -14,12 +14,10 @@ describe('Endpoints', () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
expect(endpoint.endpointId).toBe('ep-123456');
|
|
17
|
-
expect(endpoint.type).toBe(
|
|
18
|
-
expect(endpoint.status).toBe(
|
|
19
|
-
expect(
|
|
20
|
-
expect(
|
|
21
|
-
expect(new Date(endpoint.expirationTimestamp).getFullYear()).toBe(2024);
|
|
22
|
-
expect(new Date(endpoint.expirationTimestamp).toISOString()).toBe('2024-02-19T10:30:00.000Z');
|
|
17
|
+
expect(endpoint.type).toBe(EndpointTypeEnum.Webrtc);
|
|
18
|
+
expect(endpoint.status).toBe(EndpointStatusEnum.Connected);
|
|
19
|
+
expect(endpoint.creationTimestamp).toBe('2024-02-18T10:30:00Z');
|
|
20
|
+
expect(endpoint.expirationTimestamp).toBe('2024-02-19T10:30:00Z');
|
|
23
21
|
expect(endpoint.tag).toBe('test-endpoint');
|
|
24
22
|
});
|
|
25
23
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ErrorObject } from '../../../models/error-object';
|
|
2
|
+
import { ErrorSource } from '../../../models/error-source';
|
|
3
|
+
|
|
4
|
+
describe('ErrorObject', () => {
|
|
5
|
+
test('should accept the expected shape', () => {
|
|
6
|
+
const fixture: ErrorObject = {
|
|
7
|
+
type: 'test-type',
|
|
8
|
+
description: 'test-description',
|
|
9
|
+
source: {} as unknown as ErrorSource,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
expect(fixture.type).toBe('test-type');
|
|
13
|
+
expect(fixture.description).toBe('test-description');
|
|
14
|
+
expect(fixture.source).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ErrorSource } from '../../../models/error-source';
|
|
2
|
+
|
|
3
|
+
describe('ErrorSource', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: ErrorSource = {
|
|
6
|
+
parameter: 'test-parameter',
|
|
7
|
+
field: 'test-field',
|
|
8
|
+
header: 'test-header',
|
|
9
|
+
reference: 'test-reference',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
expect(fixture.parameter).toBe('test-parameter');
|
|
13
|
+
expect(fixture.field).toBe('test-field');
|
|
14
|
+
expect(fixture.header).toBe('test-header');
|
|
15
|
+
expect(fixture.reference).toBe('test-reference');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FailureWebhook } from '../../../models/failure-webhook';
|
|
2
|
+
|
|
3
|
+
describe('FailureWebhook', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: FailureWebhook = {
|
|
6
|
+
accountId: 'test-accountId',
|
|
7
|
+
phoneNumber: 'test-phoneNumber',
|
|
8
|
+
errorCode: 'test-errorCode',
|
|
9
|
+
errorMessage: 'test-errorMessage',
|
|
10
|
+
errors: [],
|
|
11
|
+
internalTicketNumber: 'test-internalTicketNumber',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
expect(fixture.accountId).toBe('test-accountId');
|
|
15
|
+
expect(fixture.phoneNumber).toBe('test-phoneNumber');
|
|
16
|
+
expect(fixture.errorCode).toBe('test-errorCode');
|
|
17
|
+
expect(fixture.errorMessage).toBe('test-errorMessage');
|
|
18
|
+
expect(fixture.errors).toEqual([]);
|
|
19
|
+
expect(fixture.internalTicketNumber).toBe('test-internalTicketNumber');
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldError } from '../../../models/field-error';
|
|
2
|
+
|
|
3
|
+
describe('FieldError', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: FieldError = {
|
|
6
|
+
fieldName: 'test-fieldName',
|
|
7
|
+
description: 'test-description',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
expect(fixture.fieldName).toBe('test-fieldName');
|
|
11
|
+
expect(fixture.description).toBe('test-description');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GatherCallback } from '../../../models/gather-callback';
|
|
2
|
+
import { CallDirectionEnum } from '../../../models/call-direction-enum';
|
|
3
|
+
|
|
4
|
+
describe('GatherCallback', () => {
|
|
5
|
+
test('should accept the expected shape', () => {
|
|
6
|
+
const fixture: GatherCallback = {
|
|
7
|
+
eventType: 'test-eventType',
|
|
8
|
+
eventTime: 'test-eventTime',
|
|
9
|
+
accountId: 'test-accountId',
|
|
10
|
+
applicationId: 'test-applicationId',
|
|
11
|
+
from: 'test-from',
|
|
12
|
+
to: 'test-to',
|
|
13
|
+
direction: CallDirectionEnum.Inbound,
|
|
14
|
+
callId: 'test-callId',
|
|
15
|
+
digits: 'test-digits',
|
|
16
|
+
callUrl: 'test-callUrl',
|
|
17
|
+
enqueuedTime: 'test-enqueuedTime',
|
|
18
|
+
startTime: 'test-startTime',
|
|
19
|
+
answerTime: 'test-answerTime',
|
|
20
|
+
parentCallId: 'test-parentCallId',
|
|
21
|
+
terminatingDigit: 'test-terminatingDigit',
|
|
22
|
+
transferCallerId: 'test-transferCallerId',
|
|
23
|
+
transferTo: 'test-transferTo',
|
|
24
|
+
tag: 'test-tag',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
expect(fixture.eventType).toBe('test-eventType');
|
|
28
|
+
expect(fixture.eventTime).toBe('test-eventTime');
|
|
29
|
+
expect(fixture.accountId).toBe('test-accountId');
|
|
30
|
+
expect(fixture.applicationId).toBe('test-applicationId');
|
|
31
|
+
expect(fixture.from).toBe('test-from');
|
|
32
|
+
expect(fixture.to).toBe('test-to');
|
|
33
|
+
expect(fixture.direction).toBe(CallDirectionEnum.Inbound);
|
|
34
|
+
expect(fixture.callId).toBe('test-callId');
|
|
35
|
+
expect(fixture.digits).toBe('test-digits');
|
|
36
|
+
expect(fixture.callUrl).toBe('test-callUrl');
|
|
37
|
+
expect(fixture.enqueuedTime).toBe('test-enqueuedTime');
|
|
38
|
+
expect(fixture.startTime).toBe('test-startTime');
|
|
39
|
+
expect(fixture.answerTime).toBe('test-answerTime');
|
|
40
|
+
expect(fixture.parentCallId).toBe('test-parentCallId');
|
|
41
|
+
expect(fixture.terminatingDigit).toBe('test-terminatingDigit');
|
|
42
|
+
expect(fixture.transferCallerId).toBe('test-transferCallerId');
|
|
43
|
+
expect(fixture.transferTo).toBe('test-transferTo');
|
|
44
|
+
expect(fixture.tag).toBe('test-tag');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GetAsyncBulkLookupResponseData } from '../../../models/get-async-bulk-lookup-response-data';
|
|
2
|
+
import { InProgressLookupStatusEnum } from '../../../models/in-progress-lookup-status-enum';
|
|
3
|
+
|
|
4
|
+
describe('GetAsyncBulkLookupResponseData', () => {
|
|
5
|
+
test('should accept the expected shape', () => {
|
|
6
|
+
const fixture: GetAsyncBulkLookupResponseData = {
|
|
7
|
+
requestId: 'test-requestId',
|
|
8
|
+
status: InProgressLookupStatusEnum.InProgress,
|
|
9
|
+
results: [],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
expect(fixture.requestId).toBe('test-requestId');
|
|
13
|
+
expect(fixture.status).toBe(InProgressLookupStatusEnum.InProgress);
|
|
14
|
+
expect(fixture.results).toEqual([]);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GetAsyncBulkLookupResponse } from '../../../models/get-async-bulk-lookup-response';
|
|
2
|
+
import { GetAsyncBulkLookupResponseData } from '../../../models/get-async-bulk-lookup-response-data';
|
|
3
|
+
|
|
4
|
+
describe('GetAsyncBulkLookupResponse', () => {
|
|
5
|
+
test('should accept the expected shape', () => {
|
|
6
|
+
const fixture: GetAsyncBulkLookupResponse = {
|
|
7
|
+
links: [],
|
|
8
|
+
data: {} as unknown as GetAsyncBulkLookupResponseData,
|
|
9
|
+
errors: [],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
expect(fixture.links).toEqual([]);
|
|
13
|
+
expect(fixture.data).toBeDefined();
|
|
14
|
+
expect(fixture.errors).toEqual([]);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -6,6 +6,12 @@ describe('InProgressLookupStatusEnum', () => {
|
|
|
6
6
|
expect(InProgressLookupStatusEnum.Complete).toBe('COMPLETE');
|
|
7
7
|
expect(InProgressLookupStatusEnum.PartialComplete).toBe('PARTIAL_COMPLETE');
|
|
8
8
|
expect(InProgressLookupStatusEnum.Failed).toBe('FAILED');
|
|
9
|
+
expect(Object.values(InProgressLookupStatusEnum)).toEqual([
|
|
10
|
+
'IN_PROGRESS',
|
|
11
|
+
'COMPLETE',
|
|
12
|
+
'PARTIAL_COMPLETE',
|
|
13
|
+
'FAILED'
|
|
14
|
+
]);
|
|
9
15
|
});
|
|
10
16
|
});
|
|
11
17
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { InboundCallbackMessage } from '../../../models/inbound-callback-message';
|
|
2
|
+
import { MessageDirectionEnum } from '../../../models/message-direction-enum';
|
|
3
|
+
import { PriorityEnum } from '../../../models/priority-enum';
|
|
4
|
+
import { MultiChannelMessageChannelEnum } from '../../../models/multi-channel-message-channel-enum';
|
|
5
|
+
import { MultiChannelMessageContent } from '../../../models/multi-channel-message-content';
|
|
6
|
+
import { RbmSuggestionResponse } from '../../../models/rbm-suggestion-response';
|
|
7
|
+
import { RbmLocationResponse } from '../../../models/rbm-location-response';
|
|
8
|
+
|
|
9
|
+
describe('InboundCallbackMessage', () => {
|
|
10
|
+
test('should accept the expected shape', () => {
|
|
11
|
+
const fixture: InboundCallbackMessage = {
|
|
12
|
+
id: 'test-id',
|
|
13
|
+
owner: 'test-owner',
|
|
14
|
+
applicationId: 'test-applicationId',
|
|
15
|
+
time: 'test-time',
|
|
16
|
+
segmentCount: 1.5,
|
|
17
|
+
direction: MessageDirectionEnum.In,
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
to: [],
|
|
20
|
+
from: 'test-from',
|
|
21
|
+
text: 'test-text',
|
|
22
|
+
tag: 'test-tag',
|
|
23
|
+
media: [],
|
|
24
|
+
priority: PriorityEnum.Default,
|
|
25
|
+
channel: MultiChannelMessageChannelEnum.Rbm,
|
|
26
|
+
content: {} as unknown as MultiChannelMessageContent,
|
|
27
|
+
suggestionResponse: {} as unknown as RbmSuggestionResponse,
|
|
28
|
+
locationResponse: {} as unknown as RbmLocationResponse,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
expect(fixture.id).toBe('test-id');
|
|
32
|
+
expect(fixture.owner).toBe('test-owner');
|
|
33
|
+
expect(fixture.applicationId).toBe('test-applicationId');
|
|
34
|
+
expect(fixture.time).toBe('test-time');
|
|
35
|
+
expect(fixture.segmentCount).toBe(1.5);
|
|
36
|
+
expect(fixture.direction).toBe(MessageDirectionEnum.In);
|
|
37
|
+
expect(fixture.to).toEqual([]);
|
|
38
|
+
expect(fixture.from).toBe('test-from');
|
|
39
|
+
expect(fixture.text).toBe('test-text');
|
|
40
|
+
expect(fixture.tag).toBe('test-tag');
|
|
41
|
+
expect(fixture.media).toEqual([]);
|
|
42
|
+
expect(fixture.priority).toBe(PriorityEnum.Default);
|
|
43
|
+
expect(fixture.channel).toBe(MultiChannelMessageChannelEnum.Rbm);
|
|
44
|
+
expect(fixture.content).toBeDefined();
|
|
45
|
+
expect(fixture.suggestionResponse).toBeDefined();
|
|
46
|
+
expect(fixture.locationResponse).toBeDefined();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -5,5 +5,10 @@ describe('InboundCallbackTypeEnum', () => {
|
|
|
5
5
|
expect(InboundCallbackTypeEnum.MessageReceived).toBe('message-received');
|
|
6
6
|
expect(InboundCallbackTypeEnum.RequestLocationResponse).toBe('request-location-response');
|
|
7
7
|
expect(InboundCallbackTypeEnum.SuggestionResponse).toBe('suggestion-response');
|
|
8
|
+
expect(Object.values(InboundCallbackTypeEnum)).toEqual([
|
|
9
|
+
'message-received',
|
|
10
|
+
'request-location-response',
|
|
11
|
+
'suggestion-response'
|
|
12
|
+
]);
|
|
8
13
|
});
|
|
9
14
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InboundCallback } from '../../../models/inbound-callback';
|
|
2
|
+
import { InboundCallbackTypeEnum } from '../../../models/inbound-callback-type-enum';
|
|
3
|
+
import { InboundCallbackMessage } from '../../../models/inbound-callback-message';
|
|
4
|
+
|
|
5
|
+
describe('InboundCallback', () => {
|
|
6
|
+
test('should accept the expected shape', () => {
|
|
7
|
+
const fixture: InboundCallback = {
|
|
8
|
+
time: 'test-time',
|
|
9
|
+
type: InboundCallbackTypeEnum.MessageReceived,
|
|
10
|
+
to: 'test-to',
|
|
11
|
+
description: 'test-description',
|
|
12
|
+
message: {} as unknown as InboundCallbackMessage,
|
|
13
|
+
carrierName: 'test-carrierName',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
expect(fixture.time).toBe('test-time');
|
|
17
|
+
expect(fixture.type).toBe(InboundCallbackTypeEnum.MessageReceived);
|
|
18
|
+
expect(fixture.to).toBe('test-to');
|
|
19
|
+
expect(fixture.description).toBe('test-description');
|
|
20
|
+
expect(fixture.message).toBeDefined();
|
|
21
|
+
expect(fixture.carrierName).toBe('test-carrierName');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { InitiateCallback } from '../../../models/initiate-callback';
|
|
2
|
+
import { CallDirectionEnum } from '../../../models/call-direction-enum';
|
|
3
|
+
import { Diversion } from '../../../models/diversion';
|
|
4
|
+
import { StirShaken } from '../../../models/stir-shaken';
|
|
5
|
+
|
|
6
|
+
describe('InitiateCallback', () => {
|
|
7
|
+
test('should accept the expected shape', () => {
|
|
8
|
+
const fixture: InitiateCallback = {
|
|
9
|
+
eventType: 'test-eventType',
|
|
10
|
+
eventTime: 'test-eventTime',
|
|
11
|
+
accountId: 'test-accountId',
|
|
12
|
+
applicationId: 'test-applicationId',
|
|
13
|
+
from: 'test-from',
|
|
14
|
+
to: 'test-to',
|
|
15
|
+
direction: CallDirectionEnum.Inbound,
|
|
16
|
+
callId: 'test-callId',
|
|
17
|
+
callUrl: 'test-callUrl',
|
|
18
|
+
startTime: 'test-startTime',
|
|
19
|
+
diversion: {} as unknown as Diversion,
|
|
20
|
+
stirShaken: {} as unknown as StirShaken,
|
|
21
|
+
uui: 'test-uui',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
expect(fixture.eventType).toBe('test-eventType');
|
|
25
|
+
expect(fixture.eventTime).toBe('test-eventTime');
|
|
26
|
+
expect(fixture.accountId).toBe('test-accountId');
|
|
27
|
+
expect(fixture.applicationId).toBe('test-applicationId');
|
|
28
|
+
expect(fixture.from).toBe('test-from');
|
|
29
|
+
expect(fixture.to).toBe('test-to');
|
|
30
|
+
expect(fixture.direction).toBe(CallDirectionEnum.Inbound);
|
|
31
|
+
expect(fixture.callId).toBe('test-callId');
|
|
32
|
+
expect(fixture.callUrl).toBe('test-callUrl');
|
|
33
|
+
expect(fixture.startTime).toBe('test-startTime');
|
|
34
|
+
expect(fixture.diversion).toBeDefined();
|
|
35
|
+
expect(fixture.stirShaken).toBeDefined();
|
|
36
|
+
expect(fixture.uui).toBe('test-uui');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -6,6 +6,12 @@ describe('LatestMessageDeliveryStatusEnum', () => {
|
|
|
6
6
|
expect(LatestMessageDeliveryStatusEnum.Deactivated).toBe('DEACTIVATED');
|
|
7
7
|
expect(LatestMessageDeliveryStatusEnum.Unknown).toBe('UNKNOWN');
|
|
8
8
|
expect(LatestMessageDeliveryStatusEnum.NotEnabled).toBe('NOT_ENABLED');
|
|
9
|
+
expect(Object.values(LatestMessageDeliveryStatusEnum)).toEqual([
|
|
10
|
+
'ACTIVE',
|
|
11
|
+
'DEACTIVATED',
|
|
12
|
+
'UNKNOWN',
|
|
13
|
+
'NOT_ENABLED'
|
|
14
|
+
]);
|
|
9
15
|
});
|
|
10
16
|
});
|
|
11
17
|
|
|
@@ -6,6 +6,12 @@ describe('LineTypeEnum', () => {
|
|
|
6
6
|
expect(LineTypeEnum.VoipFixed).toBe('VOIP-FIXED');
|
|
7
7
|
expect(LineTypeEnum.Mobile).toBe('MOBILE');
|
|
8
8
|
expect(LineTypeEnum.Voip).toBe('VOIP');
|
|
9
|
+
expect(Object.values(LineTypeEnum)).toEqual([
|
|
10
|
+
'FIXED',
|
|
11
|
+
'VOIP-FIXED',
|
|
12
|
+
'MOBILE',
|
|
13
|
+
'VOIP'
|
|
14
|
+
]);
|
|
9
15
|
});
|
|
10
16
|
});
|
|
11
17
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LinkSchema } from '../../../models/link-schema';
|
|
2
|
+
|
|
3
|
+
describe('LinkSchema', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: LinkSchema = {
|
|
6
|
+
href: 'test-href',
|
|
7
|
+
rel: 'test-rel',
|
|
8
|
+
method: 'test-method',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
expect(fixture.href).toBe('test-href');
|
|
12
|
+
expect(fixture.rel).toBe('test-rel');
|
|
13
|
+
expect(fixture.method).toBe('test-method');
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Link } from '../../../models/link';
|
|
2
|
+
|
|
3
|
+
describe('Link', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: Link = {
|
|
6
|
+
rel: 'test-rel',
|
|
7
|
+
href: 'test-href',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
expect(fixture.rel).toBe('test-rel');
|
|
11
|
+
expect(fixture.href).toBe('test-href');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LinksObject } from '../../../models/links-object';
|
|
2
|
+
|
|
3
|
+
describe('LinksObject', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: LinksObject = {
|
|
6
|
+
first: 'test-first',
|
|
7
|
+
next: 'test-next',
|
|
8
|
+
previous: 'test-previous',
|
|
9
|
+
last: 'test-last',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
expect(fixture.first).toBe('test-first');
|
|
13
|
+
expect(fixture.next).toBe('test-next');
|
|
14
|
+
expect(fixture.previous).toBe('test-previous');
|
|
15
|
+
expect(fixture.last).toBe('test-last');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -77,10 +77,8 @@ describe('ListEndpointsResponse', () => {
|
|
|
77
77
|
expect(response.data[1].endpointId).toBe('ep-002');
|
|
78
78
|
expect(response.data[1].type).toBe(EndpointTypeEnum.Webrtc);
|
|
79
79
|
expect(response.data[1].status).toBe(EndpointStatusEnum.Disconnected);
|
|
80
|
-
expect(
|
|
81
|
-
expect(
|
|
82
|
-
expect(new Date(response.data[1].expirationTimestamp).getFullYear()).toBe(2024);
|
|
83
|
-
expect(new Date(response.data[1].expirationTimestamp).toISOString()).toBe('2024-02-19T10:30:00.000Z');
|
|
80
|
+
expect(response.data[1].creationTimestamp).toBe('2024-02-18T10:30:00Z');
|
|
81
|
+
expect(response.data[1].expirationTimestamp).toBe('2024-02-19T10:30:00Z');
|
|
84
82
|
expect(response.errors).toHaveLength(1);
|
|
85
83
|
expect(response.errors[0].id).toBe('err-500');
|
|
86
84
|
expect(response.errors[0].type).toBe('internal-error');
|
|
@@ -4,5 +4,9 @@ describe('ListMessageDirectionEnum', () => {
|
|
|
4
4
|
test('should define the expected values', () => {
|
|
5
5
|
expect(ListMessageDirectionEnum.Inbound).toBe('INBOUND');
|
|
6
6
|
expect(ListMessageDirectionEnum.Outbound).toBe('OUTBOUND');
|
|
7
|
+
expect(Object.values(ListMessageDirectionEnum)).toEqual([
|
|
8
|
+
'INBOUND',
|
|
9
|
+
'OUTBOUND'
|
|
10
|
+
]);
|
|
7
11
|
});
|
|
8
12
|
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ListMessageItem } from '../../../models/list-message-item';
|
|
2
|
+
import { MessageStatusEnum } from '../../../models/message-status-enum';
|
|
3
|
+
import { ListMessageDirectionEnum } from '../../../models/list-message-direction-enum';
|
|
4
|
+
import { MessageTypeEnum } from '../../../models/message-type-enum';
|
|
5
|
+
|
|
6
|
+
describe('ListMessageItem', () => {
|
|
7
|
+
test('should accept the expected shape', () => {
|
|
8
|
+
const fixture: ListMessageItem = {
|
|
9
|
+
messageId: 'test-messageId',
|
|
10
|
+
accountId: 'test-accountId',
|
|
11
|
+
sourceTn: 'test-sourceTn',
|
|
12
|
+
destinationTn: 'test-destinationTn',
|
|
13
|
+
messageStatus: MessageStatusEnum.Received,
|
|
14
|
+
messageDirection: ListMessageDirectionEnum.Inbound,
|
|
15
|
+
messageType: MessageTypeEnum.Sms,
|
|
16
|
+
segmentCount: 1.5,
|
|
17
|
+
errorCode: 1.5,
|
|
18
|
+
receiveTime: 'test-receiveTime',
|
|
19
|
+
carrierName: 'test-carrierName',
|
|
20
|
+
messageSize: 1.5,
|
|
21
|
+
messageLength: 1.5,
|
|
22
|
+
attachmentCount: 1.5,
|
|
23
|
+
recipientCount: 1.5,
|
|
24
|
+
campaignClass: 'test-campaignClass',
|
|
25
|
+
campaignId: 'test-campaignId',
|
|
26
|
+
bwLatency: 1.5,
|
|
27
|
+
carrierLatency: 1.5,
|
|
28
|
+
callingNumberCountryA3: 'test-callingNumberCountryA3',
|
|
29
|
+
calledNumberCountryA3: 'test-calledNumberCountryA3',
|
|
30
|
+
product: 'test-product',
|
|
31
|
+
location: 'test-location',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
expect(fixture.messageId).toBe('test-messageId');
|
|
35
|
+
expect(fixture.accountId).toBe('test-accountId');
|
|
36
|
+
expect(fixture.sourceTn).toBe('test-sourceTn');
|
|
37
|
+
expect(fixture.destinationTn).toBe('test-destinationTn');
|
|
38
|
+
expect(fixture.messageStatus).toBe(MessageStatusEnum.Received);
|
|
39
|
+
expect(fixture.messageDirection).toBe(ListMessageDirectionEnum.Inbound);
|
|
40
|
+
expect(fixture.messageType).toBe(MessageTypeEnum.Sms);
|
|
41
|
+
expect(fixture.segmentCount).toBe(1.5);
|
|
42
|
+
expect(fixture.errorCode).toBe(1.5);
|
|
43
|
+
expect(fixture.receiveTime).toBe('test-receiveTime');
|
|
44
|
+
expect(fixture.carrierName).toBe('test-carrierName');
|
|
45
|
+
expect(fixture.messageSize).toBe(1.5);
|
|
46
|
+
expect(fixture.messageLength).toBe(1.5);
|
|
47
|
+
expect(fixture.attachmentCount).toBe(1.5);
|
|
48
|
+
expect(fixture.recipientCount).toBe(1.5);
|
|
49
|
+
expect(fixture.campaignClass).toBe('test-campaignClass');
|
|
50
|
+
expect(fixture.campaignId).toBe('test-campaignId');
|
|
51
|
+
expect(fixture.bwLatency).toBe(1.5);
|
|
52
|
+
expect(fixture.carrierLatency).toBe(1.5);
|
|
53
|
+
expect(fixture.callingNumberCountryA3).toBe('test-callingNumberCountryA3');
|
|
54
|
+
expect(fixture.calledNumberCountryA3).toBe('test-calledNumberCountryA3');
|
|
55
|
+
expect(fixture.product).toBe('test-product');
|
|
56
|
+
expect(fixture.location).toBe('test-location');
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LookupErrorResponse } from '../../../models/lookup-error-response';
|
|
2
|
+
|
|
3
|
+
describe('LookupErrorResponse', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: LookupErrorResponse = {
|
|
6
|
+
links: [],
|
|
7
|
+
errors: [],
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
expect(fixture.links).toEqual([]);
|
|
11
|
+
expect(fixture.errors).toEqual([]);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LookupErrorSchemaMeta } from '../../../models/lookup-error-schema-meta';
|
|
2
|
+
|
|
3
|
+
describe('LookupErrorSchemaMeta', () => {
|
|
4
|
+
test('should accept the expected shape', () => {
|
|
5
|
+
const fixture: LookupErrorSchemaMeta = {
|
|
6
|
+
phoneNumbers: [],
|
|
7
|
+
message: 'test-message',
|
|
8
|
+
code: 1.5,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
expect(fixture.phoneNumbers).toEqual([]);
|
|
12
|
+
expect(fixture.message).toBe('test-message');
|
|
13
|
+
expect(fixture.code).toBe(1.5);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LookupErrorSchema } from '../../../models/lookup-error-schema';
|
|
2
|
+
import { LookupErrorSchemaMeta } from '../../../models/lookup-error-schema-meta';
|
|
3
|
+
|
|
4
|
+
describe('LookupErrorSchema', () => {
|
|
5
|
+
test('should accept the expected shape', () => {
|
|
6
|
+
const fixture: LookupErrorSchema = {
|
|
7
|
+
code: 'test-code',
|
|
8
|
+
description: 'test-description',
|
|
9
|
+
type: 'test-type',
|
|
10
|
+
meta: {} as unknown as LookupErrorSchemaMeta,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
expect(fixture.code).toBe('test-code');
|
|
14
|
+
expect(fixture.description).toBe('test-description');
|
|
15
|
+
expect(fixture.type).toBe('test-type');
|
|
16
|
+
expect(fixture.meta).toBeDefined();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LookupResult } from '../../../models/lookup-result';
|
|
2
|
+
import { LineTypeEnum } from '../../../models/line-type-enum';
|
|
3
|
+
import { DeactivationEventEnum } from '../../../models/deactivation-event-enum';
|
|
4
|
+
import { LatestMessageDeliveryStatusEnum } from '../../../models/latest-message-delivery-status-enum';
|
|
5
|
+
|
|
6
|
+
describe('LookupResult', () => {
|
|
7
|
+
test('should accept the expected shape', () => {
|
|
8
|
+
const fixture: LookupResult = {
|
|
9
|
+
phoneNumber: 'test-phoneNumber',
|
|
10
|
+
lineType: LineTypeEnum.Fixed,
|
|
11
|
+
messagingProvider: 'test-messagingProvider',
|
|
12
|
+
voiceProvider: 'test-voiceProvider',
|
|
13
|
+
countryCodeA3: 'test-countryCodeA3',
|
|
14
|
+
deactivationReporter: 'test-deactivationReporter',
|
|
15
|
+
deactivationDate: 'test-deactivationDate',
|
|
16
|
+
deactivationEvent: DeactivationEventEnum.Deactivated,
|
|
17
|
+
latestMessageDeliveryStatus: LatestMessageDeliveryStatusEnum.Active,
|
|
18
|
+
initialMessageDeliveryStatusDate: 'test-initialMessageDeliveryStatusDate',
|
|
19
|
+
latestMessageDeliveryStatusDate: 'test-latestMessageDeliveryStatusDate',
|
|
20
|
+
rcsEnabled: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
expect(fixture.phoneNumber).toBe('test-phoneNumber');
|
|
24
|
+
expect(fixture.lineType).toBe(LineTypeEnum.Fixed);
|
|
25
|
+
expect(fixture.messagingProvider).toBe('test-messagingProvider');
|
|
26
|
+
expect(fixture.voiceProvider).toBe('test-voiceProvider');
|
|
27
|
+
expect(fixture.countryCodeA3).toBe('test-countryCodeA3');
|
|
28
|
+
expect(fixture.deactivationReporter).toBe('test-deactivationReporter');
|
|
29
|
+
expect(fixture.deactivationDate).toBe('test-deactivationDate');
|
|
30
|
+
expect(fixture.deactivationEvent).toBe(DeactivationEventEnum.Deactivated);
|
|
31
|
+
expect(fixture.latestMessageDeliveryStatus).toBe(LatestMessageDeliveryStatusEnum.Active);
|
|
32
|
+
expect(fixture.initialMessageDeliveryStatusDate).toBe('test-initialMessageDeliveryStatusDate');
|
|
33
|
+
expect(fixture.latestMessageDeliveryStatusDate).toBe('test-latestMessageDeliveryStatusDate');
|
|
34
|
+
expect(fixture.rcsEnabled).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MachineDetectionCompleteCallback } from '../../../models/machine-detection-complete-callback';
|
|
2
|
+
import { CallDirectionEnum } from '../../../models/call-direction-enum';
|
|
3
|
+
import { MachineDetectionResult } from '../../../models/machine-detection-result';
|
|
4
|
+
|
|
5
|
+
describe('MachineDetectionCompleteCallback', () => {
|
|
6
|
+
test('should accept the expected shape', () => {
|
|
7
|
+
const fixture: MachineDetectionCompleteCallback = {
|
|
8
|
+
eventType: 'test-eventType',
|
|
9
|
+
eventTime: 'test-eventTime',
|
|
10
|
+
accountId: 'test-accountId',
|
|
11
|
+
applicationId: 'test-applicationId',
|
|
12
|
+
from: 'test-from',
|
|
13
|
+
to: 'test-to',
|
|
14
|
+
direction: CallDirectionEnum.Inbound,
|
|
15
|
+
callId: 'test-callId',
|
|
16
|
+
callUrl: 'test-callUrl',
|
|
17
|
+
enqueuedTime: 'test-enqueuedTime',
|
|
18
|
+
startTime: 'test-startTime',
|
|
19
|
+
answerTime: 'test-answerTime',
|
|
20
|
+
tag: 'test-tag',
|
|
21
|
+
machineDetectionResult: {} as unknown as MachineDetectionResult,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
expect(fixture.eventType).toBe('test-eventType');
|
|
25
|
+
expect(fixture.eventTime).toBe('test-eventTime');
|
|
26
|
+
expect(fixture.accountId).toBe('test-accountId');
|
|
27
|
+
expect(fixture.applicationId).toBe('test-applicationId');
|
|
28
|
+
expect(fixture.from).toBe('test-from');
|
|
29
|
+
expect(fixture.to).toBe('test-to');
|
|
30
|
+
expect(fixture.direction).toBe(CallDirectionEnum.Inbound);
|
|
31
|
+
expect(fixture.callId).toBe('test-callId');
|
|
32
|
+
expect(fixture.callUrl).toBe('test-callUrl');
|
|
33
|
+
expect(fixture.enqueuedTime).toBe('test-enqueuedTime');
|
|
34
|
+
expect(fixture.startTime).toBe('test-startTime');
|
|
35
|
+
expect(fixture.answerTime).toBe('test-answerTime');
|
|
36
|
+
expect(fixture.tag).toBe('test-tag');
|
|
37
|
+
expect(fixture.machineDetectionResult).toBeDefined();
|
|
38
|
+
});
|
|
39
|
+
});
|