bandwidth-sdk 4.1.3 → 5.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/.openapi-generator/FILES +189 -1
- package/.openapi-generator/VERSION +1 -1
- package/api/multi-channel-api.ts +150 -0
- package/api.ts +1 -0
- package/bandwidth.yml +640 -58
- package/base.ts +6 -0
- package/configuration.ts +1 -1
- package/coverage/clover.xml +565 -460
- package/coverage/coverage-final.json +79 -70
- package/coverage/lcov-report/index.html +27 -27
- package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +14 -14
- package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +18 -18
- package/coverage/lcov-report/node-sdk/api/index.html +24 -9
- package/coverage/lcov-report/node-sdk/api/media-api.ts.html +13 -13
- package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +11 -11
- package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +12 -12
- package/coverage/lcov-report/node-sdk/api/multi-channel-api.ts.html +535 -0
- package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +11 -11
- package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +19 -19
- package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +10 -10
- package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +17 -17
- package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +12 -12
- package/coverage/lcov-report/node-sdk/api.ts.html +17 -14
- package/coverage/lcov-report/node-sdk/base.ts.html +32 -14
- package/coverage/lcov-report/node-sdk/common.ts.html +11 -11
- package/coverage/lcov-report/node-sdk/configuration.ts.html +14 -14
- package/coverage/lcov-report/node-sdk/index.html +7 -7
- package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +8 -8
- package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +3 -3
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +7 -7
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +7 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +5 -5
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +5 -5
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +5 -5
- 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 +31 -31
- 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/callback-type-enum.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/card-width-enum.ts.html +178 -0
- package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/index.html +125 -5
- package/coverage/lcov-report/node-sdk/models/index.ts.html +213 -117
- package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/lookup-status-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 +181 -0
- package/coverage/lcov-report/node-sdk/models/multi-channel-message-direction-enum.ts.html +178 -0
- package/coverage/lcov-report/node-sdk/models/multi-channel-status-enum.ts.html +184 -0
- package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +3 -3
- package/coverage/lcov-report/node-sdk/models/rbm-action-type-enum.ts.html +190 -0
- package/coverage/lcov-report/node-sdk/models/rbm-media-height-enum.ts.html +181 -0
- 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 +178 -0
- 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 +4 -10
- package/coverage/lcov-report/node-sdk/models/thumbnail-alignment-enum.ts.html +178 -0
- package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +2 -2
- package/coverage/lcov.info +723 -517
- package/dist/api/multi-channel-api.d.ts +79 -0
- package/dist/api/multi-channel-api.js +230 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.js +6 -0
- package/dist/configuration.js +1 -1
- package/dist/models/bxml/verbs/PhoneNumber.d.ts +1 -0
- package/dist/models/callback-type-enum.d.ts +4 -4
- package/dist/models/callback-type-enum.js +4 -4
- package/dist/models/card-width-enum.d.ts +21 -0
- package/dist/models/card-width-enum.js +25 -0
- package/dist/models/create-multi-channel-message-response.d.ts +39 -0
- package/dist/models/create-multi-channel-message-response.js +15 -0
- package/dist/models/error-object.d.ts +30 -0
- package/dist/models/error-object.js +15 -0
- package/dist/models/index.d.ts +33 -1
- package/dist/models/index.js +33 -1
- package/dist/models/link.d.ts +30 -0
- package/dist/models/link.js +15 -0
- package/dist/models/message-callback.d.ts +6 -0
- package/dist/models/message-request.d.ts +1 -1
- package/dist/models/message.d.ts +1 -1
- package/dist/models/mms-message-content.d.ts +30 -0
- package/dist/models/mms-message-content.js +15 -0
- package/dist/models/multi-channel-action-calendar-event.d.ts +17 -0
- package/dist/models/multi-channel-action-calendar-event.js +15 -0
- package/dist/models/multi-channel-action.d.ts +33 -0
- package/dist/models/multi-channel-action.js +15 -0
- package/dist/models/multi-channel-callback-data.d.ts +50 -0
- package/dist/models/multi-channel-callback-data.js +15 -0
- package/dist/models/multi-channel-channel-list-object-content.d.ts +22 -0
- package/dist/models/multi-channel-channel-list-object-content.js +15 -0
- package/dist/models/multi-channel-channel-list-object.d.ts +44 -0
- package/dist/models/multi-channel-channel-list-object.js +15 -0
- package/dist/models/multi-channel-message-callback-data.d.ts +69 -0
- package/dist/models/multi-channel-message-callback-data.js +15 -0
- package/dist/models/multi-channel-message-channel-enum.d.ts +22 -0
- package/dist/models/multi-channel-message-channel-enum.js +26 -0
- package/dist/models/multi-channel-message-data.d.ts +75 -0
- package/dist/models/multi-channel-message-data.js +15 -0
- package/dist/models/multi-channel-message-direction-enum.d.ts +21 -0
- package/dist/models/multi-channel-message-direction-enum.js +25 -0
- package/dist/models/multi-channel-message-request.d.ts +50 -0
- package/dist/models/multi-channel-message-request.js +15 -0
- package/dist/models/multi-channel-status-enum.d.ts +23 -0
- package/dist/models/multi-channel-status-enum.js +27 -0
- package/dist/models/priority-enum.d.ts +1 -1
- package/dist/models/priority-enum.js +1 -1
- package/dist/models/rbm-action-base.d.ts +37 -0
- package/dist/models/rbm-action-base.js +15 -0
- package/dist/models/rbm-action-dial.d.ts +17 -0
- package/dist/models/rbm-action-dial.js +15 -0
- package/dist/models/rbm-action-open-url.d.ts +17 -0
- package/dist/models/rbm-action-open-url.js +15 -0
- package/dist/models/rbm-action-type-enum.d.ts +25 -0
- package/dist/models/rbm-action-type-enum.js +29 -0
- package/dist/models/rbm-action-view-location.d.ts +17 -0
- package/dist/models/rbm-action-view-location.js +15 -0
- package/dist/models/rbm-card-content-media.d.ts +17 -0
- package/dist/models/rbm-card-content-media.js +15 -0
- package/dist/models/rbm-card-content.d.ts +44 -0
- package/dist/models/rbm-card-content.js +15 -0
- package/dist/models/rbm-media-height-enum.d.ts +22 -0
- package/dist/models/rbm-media-height-enum.js +26 -0
- package/dist/models/rbm-message-carousel-card.d.ts +39 -0
- package/dist/models/rbm-message-carousel-card.js +15 -0
- package/dist/models/rbm-message-content-file.d.ts +30 -0
- package/dist/models/rbm-message-content-file.js +15 -0
- package/dist/models/rbm-message-content-rich-card.d.ts +18 -0
- package/dist/models/rbm-message-content-rich-card.js +15 -0
- package/dist/models/rbm-message-content-text.d.ts +31 -0
- package/dist/models/rbm-message-content-text.js +15 -0
- package/dist/models/rbm-message-media.d.ts +32 -0
- package/dist/models/rbm-message-media.js +15 -0
- package/dist/models/rbm-standalone-card.d.ts +46 -0
- package/dist/models/rbm-standalone-card.js +15 -0
- package/dist/models/sms-message-content.d.ts +24 -0
- package/dist/models/sms-message-content.js +15 -0
- package/dist/models/standalone-card-orientation-enum.d.ts +21 -0
- package/dist/models/standalone-card-orientation-enum.js +25 -0
- package/dist/models/tfv-status-enum.d.ts +0 -2
- package/dist/models/tfv-status-enum.js +1 -3
- package/dist/models/tfv-status.d.ts +12 -0
- package/dist/models/tfv-submission-info.d.ts +18 -0
- package/dist/models/thumbnail-alignment-enum.d.ts +21 -0
- package/dist/models/thumbnail-alignment-enum.js +25 -0
- package/dist/models/verification-denial-webhook.d.ts +12 -0
- package/dist/models/verification-request.d.ts +18 -0
- package/dist/models/verification-update-request.d.ts +18 -0
- package/docs/AccountStatistics.md +22 -0
- package/docs/AdditionalDenialReason.md +24 -0
- package/docs/Address.md +32 -0
- package/docs/AnswerCallback.md +47 -0
- package/docs/BridgeCompleteCallback.md +51 -0
- package/docs/BridgeTargetCompleteCallback.md +45 -0
- package/docs/CallDirectionEnum.md +11 -0
- package/docs/CallRecordingMetadata.md +56 -0
- package/docs/CallState.md +54 -0
- package/docs/CallStateEnum.md +11 -0
- package/docs/CallTranscription.md +26 -0
- package/docs/CallTranscriptionDetectedLanguageEnum.md +13 -0
- package/docs/CallTranscriptionMetadata.md +24 -0
- package/docs/CallTranscriptionResponse.md +26 -0
- package/docs/CallTranscriptionTrackEnum.md +11 -0
- package/docs/CallbackMethodEnum.md +11 -0
- package/docs/CallbackTypeEnum.md +15 -0
- package/docs/CallsApi.md +350 -0
- package/docs/CardWidthEnum.md +10 -0
- package/docs/CodeRequest.md +30 -0
- package/docs/Conference.md +34 -0
- package/docs/ConferenceCompletedCallback.md +29 -0
- package/docs/ConferenceCreatedCallback.md +29 -0
- package/docs/ConferenceMember.md +30 -0
- package/docs/ConferenceMemberExitCallback.md +35 -0
- package/docs/ConferenceMemberJoinCallback.md +35 -0
- package/docs/ConferenceRecordingAvailableCallback.md +47 -0
- package/docs/ConferenceRecordingMetadata.md +42 -0
- package/docs/ConferenceRedirectCallback.md +29 -0
- package/docs/ConferenceStateEnum.md +11 -0
- package/docs/ConferencesApi.md +609 -0
- package/docs/Contact.md +26 -0
- package/docs/CreateCall.md +60 -0
- package/docs/CreateCallResponse.md +60 -0
- package/docs/CreateLookupResponse.md +23 -0
- package/docs/CreateMessageRequestError.md +24 -0
- package/docs/CreateMultiChannelMessageResponse.md +24 -0
- package/docs/DeferredResult.md +22 -0
- package/docs/DisconnectCallback.md +53 -0
- package/docs/Diversion.md +32 -0
- package/docs/DtmfCallback.md +53 -0
- package/docs/Error.md +24 -0
- package/docs/ErrorObject.md +22 -0
- package/docs/FailureWebhook.md +30 -0
- package/docs/FieldError.md +22 -0
- package/docs/FileFormatEnum.md +11 -0
- package/docs/GatherCallback.md +55 -0
- package/docs/InitiateCallback.md +45 -0
- package/docs/Link.md +22 -0
- package/docs/LinksObject.md +26 -0
- package/docs/ListMessageDirectionEnum.md +11 -0
- package/docs/ListMessageItem.md +52 -0
- package/docs/LookupRequest.md +21 -0
- package/docs/LookupResult.md +37 -0
- package/docs/LookupStatus.md +27 -0
- package/docs/LookupStatusEnum.md +15 -0
- package/docs/MFAApi.md +188 -0
- package/docs/MachineDetectionCompleteCallback.md +47 -0
- package/docs/MachineDetectionConfiguration.md +49 -0
- package/docs/MachineDetectionModeEnum.md +11 -0
- package/docs/MachineDetectionResult.md +23 -0
- package/docs/Media.md +24 -0
- package/docs/MediaApi.md +268 -0
- package/docs/Message.md +44 -0
- package/docs/MessageCallback.md +33 -0
- package/docs/MessageCallbackMessage.md +43 -0
- package/docs/MessageDirectionEnum.md +11 -0
- package/docs/MessageRequest.md +34 -0
- package/docs/MessageStatusEnum.md +23 -0
- package/docs/MessageTypeEnum.md +11 -0
- package/docs/MessagesApi.md +175 -0
- package/docs/MessagesList.md +24 -0
- package/docs/MessagingCodeResponse.md +20 -0
- package/docs/MessagingRequestError.md +22 -0
- package/docs/MfaForbiddenRequestError.md +20 -0
- package/docs/MfaRequestError.md +22 -0
- package/docs/MfaUnauthorizedRequestError.md +20 -0
- package/docs/MmsMessageContent.md +22 -0
- package/docs/MultiChannelAction.md +42 -0
- package/docs/MultiChannelActionCalendarEvent.md +32 -0
- package/docs/MultiChannelApi.md +71 -0
- package/docs/MultiChannelCallbackData.md +28 -0
- package/docs/MultiChannelChannelListObject.md +26 -0
- package/docs/MultiChannelChannelListObjectContent.md +35 -0
- package/docs/MultiChannelMessageCallbackData.md +34 -0
- package/docs/MultiChannelMessageChannelEnum.md +13 -0
- package/docs/MultiChannelMessageData.md +36 -0
- package/docs/MultiChannelMessageDirectionEnum.md +10 -0
- package/docs/MultiChannelMessageRequest.md +29 -0
- package/docs/MultiChannelStatusEnum.md +14 -0
- package/docs/OptInWorkflow.md +22 -0
- package/docs/PageInfo.md +26 -0
- package/docs/PhoneNumberLookupApi.md +130 -0
- package/docs/PriorityEnum.md +11 -0
- package/docs/RbmActionBase.md +24 -0
- package/docs/RbmActionDial.md +26 -0
- package/docs/RbmActionOpenUrl.md +26 -0
- package/docs/RbmActionTypeEnum.md +18 -0
- package/docs/RbmActionViewLocation.md +30 -0
- package/docs/RbmCardContent.md +26 -0
- package/docs/RbmCardContentMedia.md +24 -0
- package/docs/RbmMediaHeightEnum.md +13 -0
- package/docs/RbmMessageCarouselCard.md +24 -0
- package/docs/RbmMessageContentFile.md +22 -0
- package/docs/RbmMessageContentRichCard.md +30 -0
- package/docs/RbmMessageContentText.md +22 -0
- package/docs/RbmMessageMedia.md +22 -0
- package/docs/RbmStandaloneCard.md +26 -0
- package/docs/RecordingAvailableCallback.md +63 -0
- package/docs/RecordingCompleteCallback.md +63 -0
- package/docs/RecordingStateEnum.md +11 -0
- package/docs/RecordingTranscriptionMetadata.md +27 -0
- package/docs/RecordingTranscriptions.md +20 -0
- package/docs/RecordingsApi.md +675 -0
- package/docs/RedirectCallback.md +51 -0
- package/docs/RedirectMethodEnum.md +11 -0
- package/docs/SmsMessageContent.md +20 -0
- package/docs/StandaloneCardOrientationEnum.md +10 -0
- package/docs/StatisticsApi.md +67 -0
- package/docs/StirShaken.md +24 -0
- package/docs/TelephoneNumber.md +20 -0
- package/docs/TfvBasicAuthentication.md +22 -0
- package/docs/TfvCallbackStatusEnum.md +10 -0
- package/docs/TfvError.md +25 -0
- package/docs/TfvStatus.md +38 -0
- package/docs/TfvStatusEnum.md +12 -0
- package/docs/TfvSubmissionInfo.md +42 -0
- package/docs/TfvSubmissionWrapper.md +20 -0
- package/docs/ThumbnailAlignmentEnum.md +11 -0
- package/docs/TnLookupRequestError.md +20 -0
- package/docs/TollFreeVerificationApi.md +505 -0
- package/docs/TranscribeRecording.md +32 -0
- package/docs/Transcription.md +22 -0
- package/docs/TranscriptionAvailableCallback.md +61 -0
- package/docs/TranscriptionsApi.md +202 -0
- package/docs/TransferAnswerCallback.md +49 -0
- package/docs/TransferCompleteCallback.md +55 -0
- package/docs/TransferDisconnectCallback.md +59 -0
- package/docs/UpdateCall.md +38 -0
- package/docs/UpdateCallRecording.md +20 -0
- package/docs/UpdateConference.md +36 -0
- package/docs/UpdateConferenceMember.md +24 -0
- package/docs/VerificationDenialWebhook.md +38 -0
- package/docs/VerificationRequest.md +44 -0
- package/docs/VerificationUpdateRequest.md +42 -0
- package/docs/VerificationWebhook.md +26 -0
- package/docs/VerifyCodeRequest.md +26 -0
- package/docs/VerifyCodeResponse.md +20 -0
- package/docs/VoiceApiError.md +24 -0
- package/docs/VoiceCodeResponse.md +20 -0
- package/docs/WebhookSubscription.md +33 -0
- package/docs/WebhookSubscriptionBasicAuthentication.md +23 -0
- package/docs/WebhookSubscriptionRequestSchema.md +24 -0
- package/docs/WebhookSubscriptionTypeEnum.md +10 -0
- package/docs/WebhookSubscriptionsListBody.md +25 -0
- package/models/bxml/verbs/PhoneNumber.ts +1 -0
- package/models/callback-type-enum.ts +4 -4
- package/models/card-width-enum.ts +31 -0
- package/models/create-multi-channel-message-response.ts +51 -0
- package/models/error-object.ts +36 -0
- package/models/index.ts +33 -1
- package/models/link.ts +36 -0
- package/models/message-callback.ts +6 -0
- package/models/message-request.ts +1 -1
- package/models/message.ts +1 -1
- package/models/mms-message-content.ts +36 -0
- package/models/multi-channel-action-calendar-event.ts +29 -0
- package/models/multi-channel-action.ts +41 -0
- package/models/multi-channel-callback-data.ts +62 -0
- package/models/multi-channel-channel-list-object-content.ts +54 -0
- package/models/multi-channel-channel-list-object.ts +56 -0
- package/models/multi-channel-message-callback-data.ts +83 -0
- package/models/multi-channel-message-channel-enum.ts +32 -0
- package/models/multi-channel-message-data.ts +89 -0
- package/models/multi-channel-message-direction-enum.ts +31 -0
- package/models/multi-channel-message-request.ts +62 -0
- package/models/multi-channel-status-enum.ts +33 -0
- package/models/priority-enum.ts +1 -1
- package/models/rbm-action-base.ts +47 -0
- package/models/rbm-action-dial.ts +29 -0
- package/models/rbm-action-open-url.ts +29 -0
- package/models/rbm-action-type-enum.ts +35 -0
- package/models/rbm-action-view-location.ts +29 -0
- package/models/rbm-card-content-media.ts +29 -0
- package/models/rbm-card-content.ts +54 -0
- package/models/rbm-media-height-enum.ts +32 -0
- package/models/rbm-message-carousel-card.ts +53 -0
- package/models/rbm-message-content-file.ts +36 -0
- package/models/rbm-message-content-rich-card.ts +44 -0
- package/models/rbm-message-content-text.ts +39 -0
- package/models/rbm-message-media.ts +42 -0
- package/models/rbm-standalone-card.ts +62 -0
- package/models/sms-message-content.ts +30 -0
- package/models/standalone-card-orientation-enum.ts +31 -0
- package/models/tfv-status-enum.ts +1 -3
- package/models/tfv-status.ts +12 -0
- package/models/tfv-submission-info.ts +18 -0
- package/models/thumbnail-alignment-enum.ts +31 -0
- package/models/verification-denial-webhook.ts +12 -0
- package/models/verification-request.ts +18 -0
- package/models/verification-update-request.ts +18 -0
- package/openapitools.json +1 -1
- package/package.json +1 -1
- package/tests/smoke/conferences-api.test.ts +4 -4
- package/tests/smoke/multi-channel-api.test.ts +44 -0
- package/tests/smoke/transcriptions-api.test.ts +1 -1
- package/tests/unit/api/multi-channel-api.test.ts +45 -0
- package/tests/unit/models/bxml/verbs/PhoneNumber.test.ts +3 -2
- package/tests/unit/models/callback-type-enum.test.ts +4 -4
- package/tests/unit/models/card-width-enum.test.ts +8 -0
- package/tests/unit/models/multi-channel-message-channel-enum.test.ts +9 -0
- package/tests/unit/models/multi-channel-message-direction-enum.test.ts +8 -0
- package/tests/unit/models/multi-channel-status-enum.test.ts +10 -0
- package/tests/unit/models/rbm-action-type-enum.test.ts +12 -0
- package/tests/unit/models/rbm-media-height-enum.test.ts +9 -0
- package/tests/unit/models/standalone-card-orientation-enum.test.ts +8 -0
- package/tests/unit/models/tfv-status-enum.test.ts +0 -2
- package/tests/unit/models/thumbnail-alignment-enum.test.ts +7 -0
package/docs/MediaApi.md
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# MediaApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**deleteMedia**](#deletemedia) | **DELETE** /users/{accountId}/media/{mediaId} | Delete Media|
|
|
8
|
+
|[**getMedia**](#getmedia) | **GET** /users/{accountId}/media/{mediaId} | Get Media|
|
|
9
|
+
|[**listMedia**](#listmedia) | **GET** /users/{accountId}/media | List Media|
|
|
10
|
+
|[**uploadMedia**](#uploadmedia) | **PUT** /users/{accountId}/media/{mediaId} | Upload Media|
|
|
11
|
+
|
|
12
|
+
# **deleteMedia**
|
|
13
|
+
> deleteMedia()
|
|
14
|
+
|
|
15
|
+
Deletes a media file from Bandwidth API server. Make sure you don\'t have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
MediaApi,
|
|
22
|
+
Configuration
|
|
23
|
+
} from 'bandwidth-sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new MediaApi(configuration);
|
|
27
|
+
|
|
28
|
+
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
|
|
29
|
+
let mediaId: string; //Media ID to retrieve. (default to undefined)
|
|
30
|
+
|
|
31
|
+
const { status, data } = await apiInstance.deleteMedia(
|
|
32
|
+
accountId,
|
|
33
|
+
mediaId
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
|Name | Type | Description | Notes|
|
|
40
|
+
|------------- | ------------- | ------------- | -------------|
|
|
41
|
+
| **accountId** | [**string**] | Your Bandwidth Account ID. | defaults to undefined|
|
|
42
|
+
| **mediaId** | [**string**] | Media ID to retrieve. | defaults to undefined|
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Return type
|
|
46
|
+
|
|
47
|
+
void (empty response body)
|
|
48
|
+
|
|
49
|
+
### Authorization
|
|
50
|
+
|
|
51
|
+
[Basic](../README.md#Basic)
|
|
52
|
+
|
|
53
|
+
### HTTP request headers
|
|
54
|
+
|
|
55
|
+
- **Content-Type**: Not defined
|
|
56
|
+
- **Accept**: application/json
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### HTTP response details
|
|
60
|
+
| Status code | Description | Response headers |
|
|
61
|
+
|-------------|-------------|------------------|
|
|
62
|
+
|**204** | No Content | - |
|
|
63
|
+
|**400** | Bad Request | - |
|
|
64
|
+
|**401** | Unauthorized | - |
|
|
65
|
+
|**403** | Forbidden | - |
|
|
66
|
+
|**404** | Not Found | - |
|
|
67
|
+
|**406** | Not Acceptable | - |
|
|
68
|
+
|**415** | Unsupported Media Type | - |
|
|
69
|
+
|**429** | Too Many Requests | - |
|
|
70
|
+
|**500** | Internal Server Error | - |
|
|
71
|
+
|
|
72
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
73
|
+
|
|
74
|
+
# **getMedia**
|
|
75
|
+
> File getMedia()
|
|
76
|
+
|
|
77
|
+
Downloads a media file you previously uploaded.
|
|
78
|
+
|
|
79
|
+
### Example
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import {
|
|
83
|
+
MediaApi,
|
|
84
|
+
Configuration
|
|
85
|
+
} from 'bandwidth-sdk';
|
|
86
|
+
|
|
87
|
+
const configuration = new Configuration();
|
|
88
|
+
const apiInstance = new MediaApi(configuration);
|
|
89
|
+
|
|
90
|
+
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
|
|
91
|
+
let mediaId: string; //Media ID to retrieve. (default to undefined)
|
|
92
|
+
|
|
93
|
+
const { status, data } = await apiInstance.getMedia(
|
|
94
|
+
accountId,
|
|
95
|
+
mediaId
|
|
96
|
+
);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Parameters
|
|
100
|
+
|
|
101
|
+
|Name | Type | Description | Notes|
|
|
102
|
+
|------------- | ------------- | ------------- | -------------|
|
|
103
|
+
| **accountId** | [**string**] | Your Bandwidth Account ID. | defaults to undefined|
|
|
104
|
+
| **mediaId** | [**string**] | Media ID to retrieve. | defaults to undefined|
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Return type
|
|
108
|
+
|
|
109
|
+
**File**
|
|
110
|
+
|
|
111
|
+
### Authorization
|
|
112
|
+
|
|
113
|
+
[Basic](../README.md#Basic)
|
|
114
|
+
|
|
115
|
+
### HTTP request headers
|
|
116
|
+
|
|
117
|
+
- **Content-Type**: Not defined
|
|
118
|
+
- **Accept**: application/octet-stream, application/json
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### HTTP response details
|
|
122
|
+
| Status code | Description | Response headers |
|
|
123
|
+
|-------------|-------------|------------------|
|
|
124
|
+
|**200** | OK | - |
|
|
125
|
+
|**400** | Bad Request | - |
|
|
126
|
+
|**401** | Unauthorized | - |
|
|
127
|
+
|**403** | Forbidden | - |
|
|
128
|
+
|**404** | Not Found | - |
|
|
129
|
+
|**406** | Not Acceptable | - |
|
|
130
|
+
|**415** | Unsupported Media Type | - |
|
|
131
|
+
|**429** | Too Many Requests | - |
|
|
132
|
+
|**500** | Internal Server Error | - |
|
|
133
|
+
|
|
134
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
135
|
+
|
|
136
|
+
# **listMedia**
|
|
137
|
+
> Array<Media> listMedia()
|
|
138
|
+
|
|
139
|
+
Gets a list of your media files. No query parameters are supported.
|
|
140
|
+
|
|
141
|
+
### Example
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import {
|
|
145
|
+
MediaApi,
|
|
146
|
+
Configuration
|
|
147
|
+
} from 'bandwidth-sdk';
|
|
148
|
+
|
|
149
|
+
const configuration = new Configuration();
|
|
150
|
+
const apiInstance = new MediaApi(configuration);
|
|
151
|
+
|
|
152
|
+
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
|
|
153
|
+
let continuationToken: string; //Continuation token used to retrieve subsequent media. (optional) (default to undefined)
|
|
154
|
+
|
|
155
|
+
const { status, data } = await apiInstance.listMedia(
|
|
156
|
+
accountId,
|
|
157
|
+
continuationToken
|
|
158
|
+
);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Parameters
|
|
162
|
+
|
|
163
|
+
|Name | Type | Description | Notes|
|
|
164
|
+
|------------- | ------------- | ------------- | -------------|
|
|
165
|
+
| **accountId** | [**string**] | Your Bandwidth Account ID. | defaults to undefined|
|
|
166
|
+
| **continuationToken** | [**string**] | Continuation token used to retrieve subsequent media. | (optional) defaults to undefined|
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### Return type
|
|
170
|
+
|
|
171
|
+
**Array<Media>**
|
|
172
|
+
|
|
173
|
+
### Authorization
|
|
174
|
+
|
|
175
|
+
[Basic](../README.md#Basic)
|
|
176
|
+
|
|
177
|
+
### HTTP request headers
|
|
178
|
+
|
|
179
|
+
- **Content-Type**: Not defined
|
|
180
|
+
- **Accept**: application/json
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
### HTTP response details
|
|
184
|
+
| Status code | Description | Response headers |
|
|
185
|
+
|-------------|-------------|------------------|
|
|
186
|
+
|**200** | OK | * Continuation-Token - Continuation token used to retrieve subsequent media. <br> |
|
|
187
|
+
|**400** | Bad Request | - |
|
|
188
|
+
|**401** | Unauthorized | - |
|
|
189
|
+
|**403** | Forbidden | - |
|
|
190
|
+
|**404** | Not Found | - |
|
|
191
|
+
|**406** | Not Acceptable | - |
|
|
192
|
+
|**415** | Unsupported Media Type | - |
|
|
193
|
+
|**429** | Too Many Requests | - |
|
|
194
|
+
|**500** | Internal Server Error | - |
|
|
195
|
+
|
|
196
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
197
|
+
|
|
198
|
+
# **uploadMedia**
|
|
199
|
+
> uploadMedia(body)
|
|
200
|
+
|
|
201
|
+
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
|
|
202
|
+
|
|
203
|
+
### Example
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
import {
|
|
207
|
+
MediaApi,
|
|
208
|
+
Configuration
|
|
209
|
+
} from 'bandwidth-sdk';
|
|
210
|
+
|
|
211
|
+
const configuration = new Configuration();
|
|
212
|
+
const apiInstance = new MediaApi(configuration);
|
|
213
|
+
|
|
214
|
+
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
|
|
215
|
+
let mediaId: string; //Media ID to retrieve. (default to undefined)
|
|
216
|
+
let body: File; //
|
|
217
|
+
let contentType: string; //The media type of the entity-body. (optional) (default to undefined)
|
|
218
|
+
let cacheControl: string; //General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) (default to undefined)
|
|
219
|
+
|
|
220
|
+
const { status, data } = await apiInstance.uploadMedia(
|
|
221
|
+
accountId,
|
|
222
|
+
mediaId,
|
|
223
|
+
body,
|
|
224
|
+
contentType,
|
|
225
|
+
cacheControl
|
|
226
|
+
);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Parameters
|
|
230
|
+
|
|
231
|
+
|Name | Type | Description | Notes|
|
|
232
|
+
|------------- | ------------- | ------------- | -------------|
|
|
233
|
+
| **body** | **File**| | |
|
|
234
|
+
| **accountId** | [**string**] | Your Bandwidth Account ID. | defaults to undefined|
|
|
235
|
+
| **mediaId** | [**string**] | Media ID to retrieve. | defaults to undefined|
|
|
236
|
+
| **contentType** | [**string**] | The media type of the entity-body. | (optional) defaults to undefined|
|
|
237
|
+
| **cacheControl** | [**string**] | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | (optional) defaults to undefined|
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
### Return type
|
|
241
|
+
|
|
242
|
+
void (empty response body)
|
|
243
|
+
|
|
244
|
+
### Authorization
|
|
245
|
+
|
|
246
|
+
[Basic](../README.md#Basic)
|
|
247
|
+
|
|
248
|
+
### HTTP request headers
|
|
249
|
+
|
|
250
|
+
- **Content-Type**: application/json, application/ogg, application/pdf, application/rtf, application/zip, application/x-tar, application/xml, application/gzip, application/x-bzip2, application/x-gzip, application/smil, application/javascript, audio/mp4, audio/mpeg, audio/ogg, audio/flac, audio/webm, audio/wav, audio/amr, audio/3gpp, image/bmp, image/gif, image/heic, image/heif, image/jpeg, image/pjpeg, image/png, image/svg+xml, image/tiff, image/webp, image/x-icon, text/css, text/csv, text/calendar, text/html, text/plain, text/javascript, text/vcard, text/vnd.wap.wml, text/xml, video/avi, video/mp4, video/mpeg, video/ogg, video/quicktime, video/webm, video/x-ms-wmv, video/x-flv
|
|
251
|
+
- **Accept**: application/json
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
### HTTP response details
|
|
255
|
+
| Status code | Description | Response headers |
|
|
256
|
+
|-------------|-------------|------------------|
|
|
257
|
+
|**204** | No Content | - |
|
|
258
|
+
|**400** | Bad Request | - |
|
|
259
|
+
|**401** | Unauthorized | - |
|
|
260
|
+
|**403** | Forbidden | - |
|
|
261
|
+
|**404** | Not Found | - |
|
|
262
|
+
|**406** | Not Acceptable | - |
|
|
263
|
+
|**415** | Unsupported Media Type | - |
|
|
264
|
+
|**429** | Too Many Requests | - |
|
|
265
|
+
|**500** | Internal Server Error | - |
|
|
266
|
+
|
|
267
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
268
|
+
|
package/docs/Message.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Message
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | The id of the message. | [optional] [default to undefined]
|
|
9
|
+
**owner** | **string** | The Bandwidth phone number associated with the message. | [optional] [default to undefined]
|
|
10
|
+
**applicationId** | **string** | The application ID associated with the message. | [optional] [default to undefined]
|
|
11
|
+
**time** | **string** | The datetime stamp of the message in ISO 8601 | [optional] [default to undefined]
|
|
12
|
+
**segmentCount** | **number** | The number of segments the original message from the user is broken into before sending over to carrier networks. | [optional] [default to undefined]
|
|
13
|
+
**direction** | [**MessageDirectionEnum**](MessageDirectionEnum.md) | | [optional] [default to undefined]
|
|
14
|
+
**to** | **Set<string>** | The phone number recipients of the message. | [optional] [default to undefined]
|
|
15
|
+
**from** | **string** | The phone number the message was sent from. | [optional] [default to undefined]
|
|
16
|
+
**media** | **Set<string>** | The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name. | [optional] [default to undefined]
|
|
17
|
+
**text** | **string** | The contents of the message. | [optional] [default to undefined]
|
|
18
|
+
**tag** | **string** | The custom string set by the user. | [optional] [default to undefined]
|
|
19
|
+
**priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] [default to undefined]
|
|
20
|
+
**expiration** | **string** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] [default to undefined]
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { Message } from 'bandwidth-sdk';
|
|
26
|
+
|
|
27
|
+
const instance: Message = {
|
|
28
|
+
id,
|
|
29
|
+
owner,
|
|
30
|
+
applicationId,
|
|
31
|
+
time,
|
|
32
|
+
segmentCount,
|
|
33
|
+
direction,
|
|
34
|
+
to,
|
|
35
|
+
from,
|
|
36
|
+
media,
|
|
37
|
+
text,
|
|
38
|
+
tag,
|
|
39
|
+
priority,
|
|
40
|
+
expiration,
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# MessageCallback
|
|
2
|
+
|
|
3
|
+
Message Callback Schema
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**time** | **string** | | [default to undefined]
|
|
10
|
+
**type** | [**CallbackTypeEnum**](CallbackTypeEnum.md) | | [default to undefined]
|
|
11
|
+
**to** | **string** | | [default to undefined]
|
|
12
|
+
**description** | **string** | A detailed description of the event described by the callback. | [default to undefined]
|
|
13
|
+
**message** | [**MessageCallbackMessage**](MessageCallbackMessage.md) | | [default to undefined]
|
|
14
|
+
**errorCode** | **number** | Optional error code, applicable only when type is `message-failed`. | [optional] [default to undefined]
|
|
15
|
+
**carrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { MessageCallback } from 'bandwidth-sdk';
|
|
21
|
+
|
|
22
|
+
const instance: MessageCallback = {
|
|
23
|
+
time,
|
|
24
|
+
type,
|
|
25
|
+
to,
|
|
26
|
+
description,
|
|
27
|
+
message,
|
|
28
|
+
errorCode,
|
|
29
|
+
carrierName,
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# MessageCallbackMessage
|
|
2
|
+
|
|
3
|
+
Message payload schema within a MessageCallback
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | | [default to undefined]
|
|
10
|
+
**owner** | **string** | | [default to undefined]
|
|
11
|
+
**applicationId** | **string** | | [default to undefined]
|
|
12
|
+
**time** | **string** | | [default to undefined]
|
|
13
|
+
**segmentCount** | **number** | | [default to undefined]
|
|
14
|
+
**direction** | [**MessageDirectionEnum**](MessageDirectionEnum.md) | | [default to undefined]
|
|
15
|
+
**to** | **Set<string>** | | [default to undefined]
|
|
16
|
+
**from** | **string** | | [default to undefined]
|
|
17
|
+
**text** | **string** | | [default to undefined]
|
|
18
|
+
**tag** | **string** | | [optional] [default to undefined]
|
|
19
|
+
**media** | **Array<string>** | Optional media, applicable only for mms | [optional] [default to undefined]
|
|
20
|
+
**priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] [default to undefined]
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { MessageCallbackMessage } from 'bandwidth-sdk';
|
|
26
|
+
|
|
27
|
+
const instance: MessageCallbackMessage = {
|
|
28
|
+
id,
|
|
29
|
+
owner,
|
|
30
|
+
applicationId,
|
|
31
|
+
time,
|
|
32
|
+
segmentCount,
|
|
33
|
+
direction,
|
|
34
|
+
to,
|
|
35
|
+
from,
|
|
36
|
+
text,
|
|
37
|
+
tag,
|
|
38
|
+
media,
|
|
39
|
+
priority,
|
|
40
|
+
};
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MessageDirectionEnum
|
|
2
|
+
|
|
3
|
+
The direction of the message. One of in out.
|
|
4
|
+
|
|
5
|
+
## Enum
|
|
6
|
+
|
|
7
|
+
* `In` (value: `'in'`)
|
|
8
|
+
|
|
9
|
+
* `Out` (value: `'out'`)
|
|
10
|
+
|
|
11
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# MessageRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**applicationId** | **string** | The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard. | [default to undefined]
|
|
9
|
+
**to** | **Set<string>** | The phone number(s) the message should be sent to in E164 format. | [default to undefined]
|
|
10
|
+
**from** | **string** | Either an alphanumeric sender ID or the sender\'s Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | [default to undefined]
|
|
11
|
+
**text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] [default to undefined]
|
|
12
|
+
**media** | **Array<string>** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] [default to undefined]
|
|
13
|
+
**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] [default to undefined]
|
|
14
|
+
**priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] [default to undefined]
|
|
15
|
+
**expiration** | **string** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { MessageRequest } from 'bandwidth-sdk';
|
|
21
|
+
|
|
22
|
+
const instance: MessageRequest = {
|
|
23
|
+
applicationId,
|
|
24
|
+
to,
|
|
25
|
+
from,
|
|
26
|
+
text,
|
|
27
|
+
media,
|
|
28
|
+
tag,
|
|
29
|
+
priority,
|
|
30
|
+
expiration,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# MessageStatusEnum
|
|
2
|
+
|
|
3
|
+
The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED.
|
|
4
|
+
|
|
5
|
+
## Enum
|
|
6
|
+
|
|
7
|
+
* `Received` (value: `'RECEIVED'`)
|
|
8
|
+
|
|
9
|
+
* `Queued` (value: `'QUEUED'`)
|
|
10
|
+
|
|
11
|
+
* `Sending` (value: `'SENDING'`)
|
|
12
|
+
|
|
13
|
+
* `Sent` (value: `'SENT'`)
|
|
14
|
+
|
|
15
|
+
* `Failed` (value: `'FAILED'`)
|
|
16
|
+
|
|
17
|
+
* `Delivered` (value: `'DELIVERED'`)
|
|
18
|
+
|
|
19
|
+
* `Accepted` (value: `'ACCEPTED'`)
|
|
20
|
+
|
|
21
|
+
* `Undelivered` (value: `'UNDELIVERED'`)
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MessageTypeEnum
|
|
2
|
+
|
|
3
|
+
The type of message. Either SMS or MMS.
|
|
4
|
+
|
|
5
|
+
## Enum
|
|
6
|
+
|
|
7
|
+
* `Sms` (value: `'sms'`)
|
|
8
|
+
|
|
9
|
+
* `Mms` (value: `'mms'`)
|
|
10
|
+
|
|
11
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# MessagesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createMessage**](#createmessage) | **POST** /users/{accountId}/messages | Create Message|
|
|
8
|
+
|[**listMessages**](#listmessages) | **GET** /users/{accountId}/messages | List Messages|
|
|
9
|
+
|
|
10
|
+
# **createMessage**
|
|
11
|
+
> Message createMessage(messageRequest)
|
|
12
|
+
|
|
13
|
+
Endpoint for sending text messages and picture messages using V2 messaging.
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
MessagesApi,
|
|
20
|
+
Configuration,
|
|
21
|
+
MessageRequest
|
|
22
|
+
} from 'bandwidth-sdk';
|
|
23
|
+
|
|
24
|
+
const configuration = new Configuration();
|
|
25
|
+
const apiInstance = new MessagesApi(configuration);
|
|
26
|
+
|
|
27
|
+
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
|
|
28
|
+
let messageRequest: MessageRequest; //
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.createMessage(
|
|
31
|
+
accountId,
|
|
32
|
+
messageRequest
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **messageRequest** | **MessageRequest**| | |
|
|
41
|
+
| **accountId** | [**string**] | Your Bandwidth Account ID. | defaults to undefined|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**Message**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
[Basic](../README.md#Basic)
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: application/json
|
|
55
|
+
- **Accept**: application/json
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### HTTP response details
|
|
59
|
+
| Status code | Description | Response headers |
|
|
60
|
+
|-------------|-------------|------------------|
|
|
61
|
+
|**202** | Accepted | - |
|
|
62
|
+
|**400** | Bad Request | - |
|
|
63
|
+
|**401** | Unauthorized | - |
|
|
64
|
+
|**403** | Forbidden | - |
|
|
65
|
+
|**404** | Not Found | - |
|
|
66
|
+
|**406** | Not Acceptable | - |
|
|
67
|
+
|**415** | Unsupported Media Type | - |
|
|
68
|
+
|**429** | Too Many Requests | - |
|
|
69
|
+
|**500** | Internal Server Error | - |
|
|
70
|
+
|
|
71
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
72
|
+
|
|
73
|
+
# **listMessages**
|
|
74
|
+
> MessagesList listMessages()
|
|
75
|
+
|
|
76
|
+
Returns a list of messages based on query parameters.
|
|
77
|
+
|
|
78
|
+
### Example
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
import {
|
|
82
|
+
MessagesApi,
|
|
83
|
+
Configuration
|
|
84
|
+
} from 'bandwidth-sdk';
|
|
85
|
+
|
|
86
|
+
const configuration = new Configuration();
|
|
87
|
+
const apiInstance = new MessagesApi(configuration);
|
|
88
|
+
|
|
89
|
+
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
|
|
90
|
+
let messageId: string; //The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) (default to undefined)
|
|
91
|
+
let sourceTn: string; //The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\'). (optional) (default to undefined)
|
|
92
|
+
let destinationTn: string; //The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\'). (optional) (default to undefined)
|
|
93
|
+
let messageStatus: MessageStatusEnum; //The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) (default to undefined)
|
|
94
|
+
let messageDirection: ListMessageDirectionEnum; //The direction of the message. One of INBOUND OUTBOUND. (optional) (default to undefined)
|
|
95
|
+
let carrierName: string; //The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) (default to undefined)
|
|
96
|
+
let messageType: MessageTypeEnum; //The type of message. Either sms or mms. (optional) (default to undefined)
|
|
97
|
+
let errorCode: number; //The error code of the message. (optional) (default to undefined)
|
|
98
|
+
let fromDateTime: string; //The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) (default to undefined)
|
|
99
|
+
let toDateTime: string; //The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) (default to undefined)
|
|
100
|
+
let campaignId: string; //The campaign ID of the message. (optional) (default to undefined)
|
|
101
|
+
let sort: string; //The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) (default to undefined)
|
|
102
|
+
let pageToken: string; //A base64 encoded value used for pagination of results. (optional) (default to undefined)
|
|
103
|
+
let limit: number; //The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) (default to undefined)
|
|
104
|
+
let limitTotalCount: boolean; //When set to true, the response\'s totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) (default to undefined)
|
|
105
|
+
|
|
106
|
+
const { status, data } = await apiInstance.listMessages(
|
|
107
|
+
accountId,
|
|
108
|
+
messageId,
|
|
109
|
+
sourceTn,
|
|
110
|
+
destinationTn,
|
|
111
|
+
messageStatus,
|
|
112
|
+
messageDirection,
|
|
113
|
+
carrierName,
|
|
114
|
+
messageType,
|
|
115
|
+
errorCode,
|
|
116
|
+
fromDateTime,
|
|
117
|
+
toDateTime,
|
|
118
|
+
campaignId,
|
|
119
|
+
sort,
|
|
120
|
+
pageToken,
|
|
121
|
+
limit,
|
|
122
|
+
limitTotalCount
|
|
123
|
+
);
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Parameters
|
|
127
|
+
|
|
128
|
+
|Name | Type | Description | Notes|
|
|
129
|
+
|------------- | ------------- | ------------- | -------------|
|
|
130
|
+
| **accountId** | [**string**] | Your Bandwidth Account ID. | defaults to undefined|
|
|
131
|
+
| **messageId** | [**string**] | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. | (optional) defaults to undefined|
|
|
132
|
+
| **sourceTn** | [**string**] | The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\'). | (optional) defaults to undefined|
|
|
133
|
+
| **destinationTn** | [**string**] | The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\'). | (optional) defaults to undefined|
|
|
134
|
+
| **messageStatus** | **MessageStatusEnum** | The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. | (optional) defaults to undefined|
|
|
135
|
+
| **messageDirection** | **ListMessageDirectionEnum** | The direction of the message. One of INBOUND OUTBOUND. | (optional) defaults to undefined|
|
|
136
|
+
| **carrierName** | [**string**] | The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). | (optional) defaults to undefined|
|
|
137
|
+
| **messageType** | **MessageTypeEnum** | The type of message. Either sms or mms. | (optional) defaults to undefined|
|
|
138
|
+
| **errorCode** | [**number**] | The error code of the message. | (optional) defaults to undefined|
|
|
139
|
+
| **fromDateTime** | [**string**] | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | (optional) defaults to undefined|
|
|
140
|
+
| **toDateTime** | [**string**] | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | (optional) defaults to undefined|
|
|
141
|
+
| **campaignId** | [**string**] | The campaign ID of the message. | (optional) defaults to undefined|
|
|
142
|
+
| **sort** | [**string**] | The field and direction to sort by combined with a colon. Direction is either asc or desc. | (optional) defaults to undefined|
|
|
143
|
+
| **pageToken** | [**string**] | A base64 encoded value used for pagination of results. | (optional) defaults to undefined|
|
|
144
|
+
| **limit** | [**number**] | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. | (optional) defaults to undefined|
|
|
145
|
+
| **limitTotalCount** | [**boolean**] | When set to true, the response\'s totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. | (optional) defaults to undefined|
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Return type
|
|
149
|
+
|
|
150
|
+
**MessagesList**
|
|
151
|
+
|
|
152
|
+
### Authorization
|
|
153
|
+
|
|
154
|
+
[Basic](../README.md#Basic)
|
|
155
|
+
|
|
156
|
+
### HTTP request headers
|
|
157
|
+
|
|
158
|
+
- **Content-Type**: Not defined
|
|
159
|
+
- **Accept**: application/json
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### HTTP response details
|
|
163
|
+
| Status code | Description | Response headers |
|
|
164
|
+
|-------------|-------------|------------------|
|
|
165
|
+
|**200** | OK | - |
|
|
166
|
+
|**400** | Bad Request | - |
|
|
167
|
+
|**401** | Unauthorized | - |
|
|
168
|
+
|**403** | Forbidden | - |
|
|
169
|
+
|**404** | Not Found | - |
|
|
170
|
+
|**415** | Unsupported Media Type | - |
|
|
171
|
+
|**429** | Too Many Requests | - |
|
|
172
|
+
|**500** | Internal Server Error | - |
|
|
173
|
+
|
|
174
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
175
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# MessagesList
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**totalCount** | **number** | The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000. | [optional] [default to undefined]
|
|
9
|
+
**pageInfo** | [**PageInfo**](PageInfo.md) | | [optional] [default to undefined]
|
|
10
|
+
**messages** | [**Array<ListMessageItem>**](ListMessageItem.md) | | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { MessagesList } from 'bandwidth-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: MessagesList = {
|
|
18
|
+
totalCount,
|
|
19
|
+
pageInfo,
|
|
20
|
+
messages,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|