bandwidth-sdk 7.0.0 → 7.1.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/.github/workflows/deploy.yml +3 -1
- package/.github/workflows/test-pr.yml +3 -1
- package/.github/workflows/test-smoke.yml +4 -2
- package/.openapi-generator/FILES +22 -6
- package/README.md +21 -5
- package/api/calls-api.ts +20 -0
- package/api/conferences-api.ts +36 -0
- package/api/media-api.ts +16 -0
- package/api/messages-api.ts +8 -0
- package/api/mfaapi.ts +12 -0
- package/api/multi-channel-api.ts +4 -0
- package/api/phone-number-lookup-api.ts +12 -0
- package/api/recordings-api.ts +40 -0
- package/api/statistics-api.ts +4 -0
- package/api/toll-free-verification-api.ts +36 -0
- package/api/transcriptions-api.ts +12 -0
- package/bandwidth.yml +85 -22
- package/common.ts +3 -1
- package/configuration.ts +44 -2
- package/coverage/clover.xml +1139 -1065
- package/coverage/coverage-final.json +14 -14
- package/coverage/lcov-report/index.html +32 -32
- package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +66 -6
- package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +114 -6
- package/coverage/lcov-report/node-sdk/api/index.html +70 -70
- package/coverage/lcov-report/node-sdk/api/media-api.ts.html +54 -6
- package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +30 -6
- package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +42 -6
- package/coverage/lcov-report/node-sdk/api/multi-channel-api.ts.html +77 -65
- package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +42 -6
- package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +126 -6
- package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +18 -6
- package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +114 -6
- package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +42 -6
- 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 +45 -39
- package/coverage/lcov-report/node-sdk/configuration.ts.html +140 -14
- package/coverage/lcov-report/node-sdk/index.html +30 -30
- package/coverage/lcov-report/node-sdk/models/business-entity-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/business-registration-type-enum.ts.html +1 -1
- 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/CustomParam.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 +1 -1
- package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/card-width-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/completed-lookup-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/deactivation-event-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/in-progress-lookup-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/inbound-callback-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/index.html +5 -5
- package/coverage/lcov-report/node-sdk/models/index.ts.html +31 -7
- package/coverage/lcov-report/node-sdk/models/latest-message-delivery-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/line-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/multi-channel-message-channel-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/node-sdk/models/rbm-media-height-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/standalone-card-orientation-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/status-callback-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/thumbnail-alignment-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +1 -1
- package/coverage/lcov.info +2834 -2739
- package/custom_templates/README.mustache +2 -2
- package/custom_templates/common.mustache +3 -1
- package/custom_templates/configuration.mustache +43 -1
- package/custom_templates/package.mustache +5 -2
- package/dist/api/calls-api.js +192 -142
- package/dist/api/conferences-api.js +333 -243
- package/dist/api/media-api.js +142 -102
- package/dist/api/messages-api.js +145 -125
- package/dist/api/mfaapi.js +102 -72
- package/dist/api/multi-channel-api.js +34 -24
- package/dist/api/phone-number-lookup-api.js +101 -71
- package/dist/api/recordings-api.js +368 -268
- package/dist/api/statistics-api.js +30 -20
- package/dist/api/toll-free-verification-api.js +298 -208
- package/dist/api/transcriptions-api.js +105 -75
- package/dist/common.js +3 -1
- package/dist/configuration.d.ts +18 -0
- package/dist/configuration.js +71 -3
- package/dist/models/index.d.ts +11 -3
- package/dist/models/index.js +11 -3
- package/dist/models/multi-channel-action.d.ts +48 -21
- package/dist/models/{multi-channel-message-response-data-channel-list-inner.d.ts → multi-channel-channel-list-mmsobject.d.ts} +3 -3
- package/dist/models/multi-channel-channel-list-mmsresponse-object.d.ts +17 -0
- package/dist/models/{multi-channel-channel-list-object.d.ts → multi-channel-channel-list-object-base.d.ts} +1 -3
- package/dist/models/multi-channel-channel-list-owner-object.d.ts +17 -0
- package/dist/models/multi-channel-channel-list-owner-object.js +15 -0
- package/dist/models/{multi-channel-channel-list-object-content.d.ts → multi-channel-channel-list-rbmobject-all-of-content.d.ts} +2 -4
- package/dist/models/multi-channel-channel-list-rbmobject-all-of-content.js +15 -0
- package/dist/models/multi-channel-channel-list-rbmobject.d.ts +16 -0
- package/dist/models/multi-channel-channel-list-rbmobject.js +15 -0
- package/dist/models/multi-channel-channel-list-rbmresponse-object.d.ts +17 -0
- package/dist/models/multi-channel-channel-list-rbmresponse-object.js +15 -0
- package/dist/models/multi-channel-channel-list-request-object.d.ts +25 -0
- package/dist/models/multi-channel-channel-list-request-object.js +15 -0
- package/dist/models/multi-channel-channel-list-response-object.d.ts +29 -0
- package/dist/models/multi-channel-channel-list-response-object.js +15 -0
- package/dist/models/multi-channel-channel-list-smsobject.d.ts +16 -0
- package/dist/models/multi-channel-channel-list-smsobject.js +15 -0
- package/dist/models/multi-channel-channel-list-smsresponse-object.d.ts +17 -0
- package/dist/models/multi-channel-channel-list-smsresponse-object.js +15 -0
- package/dist/models/multi-channel-message-request.d.ts +2 -2
- package/dist/models/multi-channel-message-response-data.d.ts +2 -2
- package/docs/CallsApi.md +5 -5
- package/docs/ConferencesApi.md +9 -9
- package/docs/MFAApi.md +3 -3
- package/docs/MediaApi.md +4 -4
- package/docs/MessagesApi.md +2 -2
- package/docs/MultiChannelApi.md +1 -1
- package/docs/{MultiChannelChannelListObject.md → MultiChannelChannelListMMSObject.md} +4 -4
- package/docs/{MultiChannelMessageResponseDataChannelListInner.md → MultiChannelChannelListMMSResponseObject.md} +4 -4
- package/docs/MultiChannelChannelListObjectBase.md +24 -0
- package/docs/MultiChannelChannelListOwnerObject.md +20 -0
- package/docs/MultiChannelChannelListRBMObject.md +26 -0
- package/docs/{MultiChannelChannelListObjectContent.md → MultiChannelChannelListRBMObjectAllOfContent.md} +5 -5
- package/docs/MultiChannelChannelListRBMResponseObject.md +28 -0
- package/docs/MultiChannelChannelListRequestObject.md +26 -0
- package/docs/MultiChannelChannelListResponseObject.md +28 -0
- package/docs/MultiChannelChannelListSMSObject.md +26 -0
- package/docs/MultiChannelChannelListSMSResponseObject.md +28 -0
- package/docs/MultiChannelMessageRequest.md +1 -1
- package/docs/MultiChannelMessageResponseData.md +1 -1
- package/docs/PhoneNumberLookupApi.md +3 -3
- package/docs/RecordingsApi.md +10 -10
- package/docs/StatisticsApi.md +1 -1
- package/docs/TollFreeVerificationApi.md +9 -9
- package/docs/TranscriptionsApi.md +3 -3
- package/jest.config.js +2 -0
- package/models/index.ts +11 -3
- package/models/multi-channel-action.ts +48 -4
- package/models/{multi-channel-message-response-data-channel-list-inner.ts → multi-channel-channel-list-mmsobject.ts} +4 -4
- package/models/multi-channel-channel-list-mmsresponse-object.ts +34 -0
- package/models/{multi-channel-channel-list-object.ts → multi-channel-channel-list-object-base.ts} +1 -5
- package/models/multi-channel-channel-list-owner-object.ts +23 -0
- package/models/{multi-channel-channel-list-object-content.ts → multi-channel-channel-list-rbmobject-all-of-content.ts} +5 -11
- package/models/multi-channel-channel-list-rbmobject.ts +31 -0
- package/models/multi-channel-channel-list-rbmresponse-object.ts +34 -0
- package/models/multi-channel-channel-list-request-object.ts +46 -0
- package/models/multi-channel-channel-list-response-object.ts +50 -0
- package/models/multi-channel-channel-list-smsobject.ts +31 -0
- package/models/multi-channel-channel-list-smsresponse-object.ts +34 -0
- package/models/multi-channel-message-request.ts +2 -2
- package/models/multi-channel-message-response-data.ts +2 -2
- package/package.json +6 -3
- package/tests/smoke/bxml.test.ts +4 -1
- package/tests/smoke/calls-api.test.ts +4 -1
- package/tests/smoke/conferences-api.test.ts +4 -1
- package/tests/smoke/multi-channel-api.test.ts +117 -10
- package/tests/smoke/phone-number-lookup-api.test.ts +4 -4
- package/tests/smoke/recordings-api.test.ts +4 -1
- package/tests/smoke/statistics-api.test.ts +4 -1
- package/tests/smoke/toll-free-verification-api.test.ts +4 -1
- package/tests/smoke/transcriptions-api.test.ts +4 -1
- package/tests/unit/api/multi-channel-api.test.ts +27 -10
- /package/dist/models/{multi-channel-channel-list-object-content.js → multi-channel-channel-list-mmsobject.js} +0 -0
- /package/dist/models/{multi-channel-channel-list-object.js → multi-channel-channel-list-mmsresponse-object.js} +0 -0
- /package/dist/models/{multi-channel-message-response-data-channel-list-inner.js → multi-channel-channel-list-object-base.js} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Bandwidth
|
|
5
|
+
* Bandwidth\'s Communication APIs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: letstalk@bandwidth.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { MmsMessageContent } from './mms-message-content';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { MultiChannelChannelListMMSObject } from './multi-channel-channel-list-mmsobject';
|
|
22
|
+
// May contain unused imports in some cases
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import type { MultiChannelChannelListRBMObject } from './multi-channel-channel-list-rbmobject';
|
|
25
|
+
// May contain unused imports in some cases
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { MultiChannelChannelListSMSObject } from './multi-channel-channel-list-smsobject';
|
|
28
|
+
// May contain unused imports in some cases
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import type { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum';
|
|
31
|
+
|
|
32
|
+
export interface MultiChannelChannelListRequestObject {
|
|
33
|
+
/**
|
|
34
|
+
* The sender ID of the message. This could be an alphanumeric sender ID.
|
|
35
|
+
*/
|
|
36
|
+
'from': string;
|
|
37
|
+
/**
|
|
38
|
+
* The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.
|
|
39
|
+
*/
|
|
40
|
+
'applicationId': string;
|
|
41
|
+
'channel': MultiChannelMessageChannelEnum;
|
|
42
|
+
'content': MmsMessageContent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Bandwidth
|
|
5
|
+
* Bandwidth\'s Communication APIs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: letstalk@bandwidth.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { MmsMessageContent } from './mms-message-content';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { MultiChannelChannelListMMSResponseObject } from './multi-channel-channel-list-mmsresponse-object';
|
|
22
|
+
// May contain unused imports in some cases
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import type { MultiChannelChannelListRBMResponseObject } from './multi-channel-channel-list-rbmresponse-object';
|
|
25
|
+
// May contain unused imports in some cases
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { MultiChannelChannelListSMSResponseObject } from './multi-channel-channel-list-smsresponse-object';
|
|
28
|
+
// May contain unused imports in some cases
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import type { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum';
|
|
31
|
+
|
|
32
|
+
export interface MultiChannelChannelListResponseObject {
|
|
33
|
+
/**
|
|
34
|
+
* The sender ID of the message. This could be an alphanumeric sender ID.
|
|
35
|
+
*/
|
|
36
|
+
'from': string;
|
|
37
|
+
/**
|
|
38
|
+
* The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.
|
|
39
|
+
*/
|
|
40
|
+
'applicationId': string;
|
|
41
|
+
'channel': MultiChannelMessageChannelEnum;
|
|
42
|
+
'content': MmsMessageContent;
|
|
43
|
+
/**
|
|
44
|
+
* The Bandwidth senderId associated with the message. Identical to \'from\'.
|
|
45
|
+
*/
|
|
46
|
+
'owner': string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Bandwidth
|
|
5
|
+
* Bandwidth\'s Communication APIs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: letstalk@bandwidth.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { MultiChannelChannelListObjectBase } from './multi-channel-channel-list-object-base';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum';
|
|
22
|
+
// May contain unused imports in some cases
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import type { SmsMessageContent } from './sms-message-content';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @type MultiChannelChannelListSMSObject
|
|
28
|
+
*/
|
|
29
|
+
export type MultiChannelChannelListSMSObject = MultiChannelChannelListObjectBase;
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Bandwidth
|
|
5
|
+
* Bandwidth\'s Communication APIs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: letstalk@bandwidth.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { MultiChannelChannelListOwnerObject } from './multi-channel-channel-list-owner-object';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { MultiChannelChannelListSMSObject } from './multi-channel-channel-list-smsobject';
|
|
22
|
+
// May contain unused imports in some cases
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import type { MultiChannelMessageChannelEnum } from './multi-channel-message-channel-enum';
|
|
25
|
+
// May contain unused imports in some cases
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { SmsMessageContent } from './sms-message-content';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @type MultiChannelChannelListSMSResponseObject
|
|
31
|
+
*/
|
|
32
|
+
export type MultiChannelChannelListSMSResponseObject = MultiChannelChannelListOwnerObject & MultiChannelChannelListSMSObject;
|
|
33
|
+
|
|
34
|
+
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
import type {
|
|
18
|
+
import type { MultiChannelChannelListRequestObject } from './multi-channel-channel-list-request-object';
|
|
19
19
|
// May contain unused imports in some cases
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import type { PriorityEnum } from './priority-enum';
|
|
@@ -31,7 +31,7 @@ export interface MultiChannelMessageRequest {
|
|
|
31
31
|
/**
|
|
32
32
|
* A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored.
|
|
33
33
|
*/
|
|
34
|
-
'channelList': Array<
|
|
34
|
+
'channelList': Array<MultiChannelChannelListRequestObject>;
|
|
35
35
|
/**
|
|
36
36
|
* A custom string that will be included in callback events of the message. Max 1024 characters.
|
|
37
37
|
*/
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import type { MessageDirectionEnum } from './message-direction-enum';
|
|
19
19
|
// May contain unused imports in some cases
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
import type {
|
|
21
|
+
import type { MultiChannelChannelListResponseObject } from './multi-channel-channel-list-response-object';
|
|
22
22
|
// May contain unused imports in some cases
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import type { PriorityEnum } from './priority-enum';
|
|
@@ -43,7 +43,7 @@ export interface MultiChannelMessageResponseData {
|
|
|
43
43
|
/**
|
|
44
44
|
* A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored.
|
|
45
45
|
*/
|
|
46
|
-
'channelList': Array<
|
|
46
|
+
'channelList': Array<MultiChannelChannelListResponseObject>;
|
|
47
47
|
/**
|
|
48
48
|
* A custom string that will be included in callback events of the message. Max 1024 characters.
|
|
49
49
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bandwidth-sdk",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "OpenAPI client for bandwidth-sdk",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,12 @@
|
|
|
24
24
|
"test-smoke": "jest --coverage --detectOpenHandles --testPathPattern=tests/smoke",
|
|
25
25
|
"test": "jest --coverage --detectOpenHandles"
|
|
26
26
|
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=20.0.0"
|
|
29
|
+
},
|
|
27
30
|
"dependencies": {
|
|
28
31
|
"axios": "^1.7.2",
|
|
29
|
-
"xmlbuilder2": "^
|
|
32
|
+
"xmlbuilder2": "^4.0.0"
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
35
|
"@types/jest": "^29.5.12",
|
|
@@ -34,6 +37,6 @@
|
|
|
34
37
|
"jest": "^29.7.0",
|
|
35
38
|
"jest-extended": "^4.0.2",
|
|
36
39
|
"ts-jest": "^29.1.1",
|
|
37
|
-
"typescript": "^5.0"
|
|
40
|
+
"typescript": "^5.9.0"
|
|
38
41
|
}
|
|
39
42
|
}
|
package/tests/smoke/bxml.test.ts
CHANGED
|
@@ -25,7 +25,10 @@ import { sleep, createMantecaCall, cleanupCalls } from '../callUtils';
|
|
|
25
25
|
describe('BXML Integration Tests', () => {
|
|
26
26
|
jest.setTimeout(20000);
|
|
27
27
|
|
|
28
|
-
const config = new Configuration({
|
|
28
|
+
const config = new Configuration({
|
|
29
|
+
clientId: BW_CLIENT_ID,
|
|
30
|
+
clientSecret: BW_CLIENT_SECRET
|
|
31
|
+
});
|
|
29
32
|
const callsApi = new CallsApi(config);
|
|
30
33
|
let activeCalls: string[] = [];
|
|
31
34
|
|
|
@@ -13,7 +13,10 @@ import { createMantecaCall, sleep, cleanupCalls } from '../callUtils';
|
|
|
13
13
|
|
|
14
14
|
describe('CallsApi', () => {
|
|
15
15
|
jest.setTimeout(45000);
|
|
16
|
-
const config = new Configuration({
|
|
16
|
+
const config = new Configuration({
|
|
17
|
+
clientId: BW_CLIENT_ID,
|
|
18
|
+
clientSecret: BW_CLIENT_SECRET
|
|
19
|
+
});
|
|
17
20
|
const callsApi = new CallsApi(config);
|
|
18
21
|
|
|
19
22
|
const displayName = 'NodeJS SDK';
|
|
@@ -6,7 +6,10 @@ import { setupManteca, createMantecaCall, cleanupCalls, getMantecaTestStatus, sl
|
|
|
6
6
|
|
|
7
7
|
describe('ConferencesApi', () => {
|
|
8
8
|
jest.setTimeout(125000);
|
|
9
|
-
const config = new Configuration({
|
|
9
|
+
const config = new Configuration({
|
|
10
|
+
username: BW_USERNAME,
|
|
11
|
+
password: BW_PASSWORD
|
|
12
|
+
});
|
|
10
13
|
const callsApi = new CallsApi(config);
|
|
11
14
|
const conferencesApi = new ConferencesApi(config);
|
|
12
15
|
|
|
@@ -5,7 +5,13 @@ import {
|
|
|
5
5
|
MultiChannelChannelListObject,
|
|
6
6
|
MultiChannelMessageChannelEnum,
|
|
7
7
|
PriorityEnum,
|
|
8
|
-
RbmMessageContentText
|
|
8
|
+
RbmMessageContentText,
|
|
9
|
+
SmsMessageContent,
|
|
10
|
+
MmsMessageContent,
|
|
11
|
+
RbmMessageContentText,
|
|
12
|
+
MultiChannelMessageRequest,
|
|
13
|
+
MessageDirectionEnum,
|
|
14
|
+
RbmActionTypeEnum
|
|
9
15
|
} from '../../models';
|
|
10
16
|
|
|
11
17
|
describe('MultiChannelApi', () => {
|
|
@@ -18,27 +24,128 @@ describe('MultiChannelApi', () => {
|
|
|
18
24
|
const expirationTime = Date.now() + 1000 * 60 * 60 * 24 + 60;
|
|
19
25
|
const expiration = new Date(expirationTime).toISOString();
|
|
20
26
|
|
|
21
|
-
describe('
|
|
22
|
-
test('should create a multi-channel message', async () => {
|
|
23
|
-
const
|
|
27
|
+
describe('createMultiChannelSMSMessage', () => {
|
|
28
|
+
test('should create a multi-channel SMS message', async () => {
|
|
29
|
+
const content: SmsMessageContent = { text: "Hello World!" };
|
|
30
|
+
|
|
31
|
+
const channelListObject: MultiChannelChannelListSMSObject = {
|
|
24
32
|
from: BW_NUMBER,
|
|
25
33
|
applicationId: BW_MESSAGING_APPLICATION_ID,
|
|
26
|
-
channel: MultiChannelMessageChannelEnum.
|
|
27
|
-
content
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
channel: MultiChannelMessageChannelEnum.Sms,
|
|
35
|
+
content,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const multiChannelMessageRequest: MultiChannelMessageRequest = {
|
|
39
|
+
to: USER_NUMBER,
|
|
40
|
+
tag: "tag",
|
|
41
|
+
priority: PriorityEnum.High,
|
|
42
|
+
expiration,
|
|
43
|
+
channelList: [channelListObject],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const { status, data } = await multiChannelApi.createMultiChannelMessage(
|
|
47
|
+
BW_ACCOUNT_ID,
|
|
48
|
+
multiChannelMessageRequest
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
expect(status).toEqual(202);
|
|
52
|
+
expect(data.links).toBeArray();
|
|
53
|
+
expect(data.data?.id).toBeString();
|
|
54
|
+
expect(data.data?.time).toBeDateString();
|
|
55
|
+
expect(data.data?.direction).toBeOneOf(Object.values(MessageDirectionEnum));
|
|
56
|
+
expect(data.data?.to).toBeArray();
|
|
57
|
+
expect(data.data?.tag).toBeString();
|
|
58
|
+
expect(data.data?.priority).toBeOneOf(Object.values(PriorityEnum));
|
|
59
|
+
expect(data.data?.expiration).toBeDateString();
|
|
60
|
+
expect(data.data?.channelList).toBeArray();
|
|
61
|
+
expect(data.data?.channelList![0].channel).toEqual(MultiChannelMessageChannelEnum.Sms);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('createMultiChannelMMSMessage', () => {
|
|
66
|
+
test('should create a multi-channel MMS message', async () => {
|
|
67
|
+
const content: MmsMessageContent = {
|
|
68
|
+
text: "Hello World!",
|
|
69
|
+
media: [{ fileUrl: "https://example.com/image.jpg" }]
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const channelListObject: MultiChannelChannelListMMSObject = {
|
|
73
|
+
from: BW_NUMBER,
|
|
74
|
+
applicationId: BW_MESSAGING_APPLICATION_ID,
|
|
75
|
+
channel: MultiChannelMessageChannelEnum.Mms,
|
|
76
|
+
content,
|
|
30
77
|
};
|
|
31
78
|
|
|
32
79
|
const multiChannelMessageRequest: MultiChannelMessageRequest = {
|
|
33
80
|
to: USER_NUMBER,
|
|
34
81
|
tag: "tag",
|
|
35
|
-
priority: PriorityEnum.
|
|
82
|
+
priority: PriorityEnum.High,
|
|
83
|
+
expiration,
|
|
36
84
|
channelList: [channelListObject],
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const { status, data } = await multiChannelApi.createMultiChannelMessage(
|
|
88
|
+
BW_ACCOUNT_ID,
|
|
89
|
+
multiChannelMessageRequest
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
expect(status).toEqual(202);
|
|
93
|
+
expect(data.links).toBeArray();
|
|
94
|
+
expect(data.data?.id).toBeString();
|
|
95
|
+
expect(data.data?.time).toBeDateString();
|
|
96
|
+
expect(data.data?.direction).toBeOneOf(Object.values(MessageDirectionEnum));
|
|
97
|
+
expect(data.data?.to).toBeArray();
|
|
98
|
+
expect(data.data?.tag).toBeString();
|
|
99
|
+
expect(data.data?.priority).toBeOneOf(Object.values(PriorityEnum));
|
|
100
|
+
expect(data.data?.expiration).toBeDateString();
|
|
101
|
+
expect(data.data?.channelList).toBeArray();
|
|
102
|
+
expect(data.data?.channelList![0].channel).toEqual(MultiChannelMessageChannelEnum.Mms);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
describe('createMultiChannelRBMMessage', () => {
|
|
107
|
+
test('should create a multi-channel RBM message', async () => {
|
|
108
|
+
const content: RbmMessageContentText = {
|
|
109
|
+
text: "Hello World!",
|
|
110
|
+
suggestions: [{
|
|
111
|
+
type: RbmActionTypeEnum.DialPhone,
|
|
112
|
+
text: "Call Us",
|
|
113
|
+
postbackData: "tel:+1234567890",
|
|
114
|
+
phoneNumber: BW_NUMBER
|
|
115
|
+
}]
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const channelListObject: MultiChannelChannelListRBMObject = {
|
|
119
|
+
from: BW_NUMBER,
|
|
120
|
+
applicationId: BW_MESSAGING_APPLICATION_ID,
|
|
121
|
+
channel: MultiChannelMessageChannelEnum.Rbm,
|
|
122
|
+
content,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const multiChannelMessageRequest: MultiChannelMessageRequest = {
|
|
126
|
+
to: USER_NUMBER,
|
|
127
|
+
tag: "tag",
|
|
128
|
+
priority: PriorityEnum.High,
|
|
37
129
|
expiration,
|
|
130
|
+
channelList: [channelListObject],
|
|
38
131
|
};
|
|
39
132
|
|
|
40
|
-
const { status, data } = await multiChannelApi.createMultiChannelMessage(
|
|
133
|
+
const { status, data } = await multiChannelApi.createMultiChannelMessage(
|
|
134
|
+
BW_ACCOUNT_ID,
|
|
135
|
+
multiChannelMessageRequest
|
|
136
|
+
);
|
|
137
|
+
|
|
41
138
|
expect(status).toEqual(202);
|
|
139
|
+
expect(data.links).toBeArray();
|
|
140
|
+
expect(data.data?.id).toBeString();
|
|
141
|
+
expect(data.data?.time).toBeDateString();
|
|
142
|
+
expect(data.data?.direction).toBeOneOf(Object.values(MessageDirectionEnum));
|
|
143
|
+
expect(data.data?.to).toBeArray();
|
|
144
|
+
expect(data.data?.tag).toBeString();
|
|
145
|
+
expect(data.data?.priority).toBeOneOf(Object.values(PriorityEnum));
|
|
146
|
+
expect(data.data?.expiration).toBeDateString();
|
|
147
|
+
expect(data.data?.channelList).toBeArray();
|
|
148
|
+
expect(data.data?.channelList![0].channel).toEqual(MultiChannelMessageChannelEnum.Rbm);
|
|
42
149
|
});
|
|
43
150
|
});
|
|
44
151
|
});
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
import { sleep } from '../callUtils';
|
|
13
13
|
|
|
14
14
|
describe('PhoneNumberLookupApi', () => {
|
|
15
|
-
jest.setTimeout(
|
|
15
|
+
jest.setTimeout(40000);
|
|
16
16
|
const config = new Configuration({
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
clientId: BW_CLIENT_ID,
|
|
18
|
+
clientSecret: BW_CLIENT_SECRET
|
|
19
19
|
});
|
|
20
20
|
const phoneNumberLookupApi = new PhoneNumberLookupApi(config);
|
|
21
21
|
|
|
@@ -38,7 +38,7 @@ describe('PhoneNumberLookupApi', () => {
|
|
|
38
38
|
expect(createData.errors).toBeInstanceOf(Array);
|
|
39
39
|
|
|
40
40
|
const requestId = createData.data.requestId;
|
|
41
|
-
await sleep(
|
|
41
|
+
await sleep(30);
|
|
42
42
|
|
|
43
43
|
const { status: getStatus, data: getData }
|
|
44
44
|
= await phoneNumberLookupApi.getAsyncBulkLookup(BW_ACCOUNT_ID, requestId);
|
|
@@ -6,7 +6,10 @@ import { getMantecaTestStatus, setupManteca, createMantecaCall, cleanupCalls, sl
|
|
|
6
6
|
|
|
7
7
|
describe('RecordingsApi', () => {
|
|
8
8
|
jest.setTimeout(240000);
|
|
9
|
-
const config = new Configuration({
|
|
9
|
+
const config = new Configuration({
|
|
10
|
+
clientId: BW_CLIENT_ID,
|
|
11
|
+
clientSecret: BW_CLIENT_SECRET
|
|
12
|
+
});
|
|
10
13
|
const callsApi = new CallsApi(config);
|
|
11
14
|
const recordingsApi = new RecordingsApi(config);
|
|
12
15
|
|
|
@@ -3,7 +3,10 @@ import { StatisticsApi } from '../../api';
|
|
|
3
3
|
import { Configuration } from '../../configuration';
|
|
4
4
|
|
|
5
5
|
describe('StatisticsApi', () => {
|
|
6
|
-
const config = new Configuration({
|
|
6
|
+
const config = new Configuration({
|
|
7
|
+
clientId: BW_CLIENT_ID,
|
|
8
|
+
clientSecret: BW_CLIENT_SECRET
|
|
9
|
+
});
|
|
7
10
|
const statisticsApi = new StatisticsApi(config);
|
|
8
11
|
|
|
9
12
|
describe('getStatistics', () => {
|
|
@@ -3,7 +3,10 @@ import { TollFreeVerificationApi } from '../../api';
|
|
|
3
3
|
import { Configuration } from '../../configuration';
|
|
4
4
|
|
|
5
5
|
describe('TollFreeVerificationApi', () => {
|
|
6
|
-
const config = new Configuration({
|
|
6
|
+
const config = new Configuration({
|
|
7
|
+
clientId: BW_CLIENT_ID,
|
|
8
|
+
clientSecret: BW_CLIENT_SECRET
|
|
9
|
+
});
|
|
7
10
|
const tfvApi = new TollFreeVerificationApi(config);
|
|
8
11
|
|
|
9
12
|
describe('listTollFreeUseCases', () => {
|
|
@@ -6,7 +6,10 @@ import { cleanupCalls, createMantecaCall, setupManteca, sleep } from "../callUti
|
|
|
6
6
|
|
|
7
7
|
describe('TranscriptionsApi', () => {
|
|
8
8
|
jest.setTimeout(240000);
|
|
9
|
-
const config = new Configuration({
|
|
9
|
+
const config = new Configuration({
|
|
10
|
+
clientId: BW_CLIENT_ID,
|
|
11
|
+
clientSecret: BW_CLIENT_SECRET
|
|
12
|
+
});
|
|
10
13
|
const callsApi = new CallsApi(config);
|
|
11
14
|
const transcriptionsApi = new TranscriptionsApi(config);
|
|
12
15
|
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
import { MultiChannelApi } from '../../../api';
|
|
3
3
|
import { Configuration } from '../../../configuration';
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
MultiChannelChannelListRBMObject,
|
|
6
6
|
MultiChannelMessageChannelEnum,
|
|
7
7
|
PriorityEnum,
|
|
8
|
-
RbmMessageContentText
|
|
8
|
+
RbmMessageContentText,
|
|
9
|
+
SmsMessageContent,
|
|
10
|
+
MultiChannelMessageRequest,
|
|
11
|
+
MessageDirectionEnum
|
|
9
12
|
} from '../../../models';
|
|
10
13
|
|
|
11
14
|
describe('MultiChannelApi', () => {
|
|
@@ -20,26 +23,40 @@ describe('MultiChannelApi', () => {
|
|
|
20
23
|
const expiration = new Date(expirationTime).toISOString();
|
|
21
24
|
|
|
22
25
|
describe('createMultiChannelMessage', () => {
|
|
23
|
-
test
|
|
24
|
-
const
|
|
26
|
+
test('should create a multi-channel message', async () => {
|
|
27
|
+
const content: SmsMessageContent = { text: "Hello World!" };
|
|
28
|
+
|
|
29
|
+
const channelListObject: MultiChannelChannelListSMSObject = {
|
|
25
30
|
from: BW_NUMBER,
|
|
26
31
|
applicationId: BW_MESSAGING_APPLICATION_ID,
|
|
27
|
-
channel: MultiChannelMessageChannelEnum.
|
|
28
|
-
content
|
|
29
|
-
text: "Hello World!"
|
|
30
|
-
}
|
|
32
|
+
channel: MultiChannelMessageChannelEnum.Sms,
|
|
33
|
+
content,
|
|
31
34
|
};
|
|
32
35
|
|
|
33
36
|
const multiChannelMessageRequest: MultiChannelMessageRequest = {
|
|
34
37
|
to: USER_NUMBER,
|
|
35
38
|
tag: "tag",
|
|
36
|
-
priority: PriorityEnum.
|
|
39
|
+
priority: PriorityEnum.High,
|
|
37
40
|
expiration,
|
|
41
|
+
channelList: [channelListObject],
|
|
38
42
|
};
|
|
39
43
|
|
|
40
|
-
const { status, data } = await multiChannelApi.createMultiChannelMessage(
|
|
44
|
+
const { status, data } = await multiChannelApi.createMultiChannelMessage(
|
|
45
|
+
BW_ACCOUNT_ID,
|
|
46
|
+
multiChannelMessageRequest
|
|
47
|
+
);
|
|
41
48
|
|
|
42
49
|
expect(status).toEqual(202);
|
|
50
|
+
expect(data.links).toBeArray();
|
|
51
|
+
expect(data.data?.id).toBeString();
|
|
52
|
+
expect(data.data?.time).toBeDateString();
|
|
53
|
+
expect(data.data?.direction).toBeOneOf(Object.values(MessageDirectionEnum));
|
|
54
|
+
expect(data.data?.to).toBeArray();
|
|
55
|
+
expect(data.data?.tag).toBeString();
|
|
56
|
+
expect(data.data?.priority).toBeOneOf(Object.values(PriorityEnum));
|
|
57
|
+
expect(data.data?.expiration).toBeDateString();
|
|
58
|
+
expect(data.data?.channelList).toBeArray();
|
|
59
|
+
expect(data.data?.channelList![0].channel).toBeOneOf(Object.values(MultiChannelMessageChannelEnum));
|
|
43
60
|
});
|
|
44
61
|
});
|
|
45
62
|
});
|
|
File without changes
|
|
File without changes
|