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
|
@@ -70,6 +70,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
70
70
|
// http basic authentication required
|
|
71
71
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
72
72
|
|
|
73
|
+
// authentication OAuth2 required
|
|
74
|
+
// oauth required
|
|
75
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
76
|
+
|
|
73
77
|
|
|
74
78
|
|
|
75
79
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -115,6 +119,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
115
119
|
// http basic authentication required
|
|
116
120
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
117
121
|
|
|
122
|
+
// authentication OAuth2 required
|
|
123
|
+
// oauth required
|
|
124
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
125
|
+
|
|
118
126
|
|
|
119
127
|
|
|
120
128
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -157,6 +165,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
157
165
|
// http basic authentication required
|
|
158
166
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
159
167
|
|
|
168
|
+
// authentication OAuth2 required
|
|
169
|
+
// oauth required
|
|
170
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
171
|
+
|
|
160
172
|
|
|
161
173
|
|
|
162
174
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -199,6 +211,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
199
211
|
// http basic authentication required
|
|
200
212
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
201
213
|
|
|
214
|
+
// authentication OAuth2 required
|
|
215
|
+
// oauth required
|
|
216
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
217
|
+
|
|
202
218
|
|
|
203
219
|
|
|
204
220
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -233,6 +249,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
233
249
|
// http basic authentication required
|
|
234
250
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
235
251
|
|
|
252
|
+
// authentication OAuth2 required
|
|
253
|
+
// oauth required
|
|
254
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
255
|
+
|
|
236
256
|
|
|
237
257
|
|
|
238
258
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -271,6 +291,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
271
291
|
// http basic authentication required
|
|
272
292
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
273
293
|
|
|
294
|
+
// authentication OAuth2 required
|
|
295
|
+
// oauth required
|
|
296
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
297
|
+
|
|
274
298
|
|
|
275
299
|
|
|
276
300
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -312,6 +336,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
312
336
|
// http basic authentication required
|
|
313
337
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
314
338
|
|
|
339
|
+
// authentication OAuth2 required
|
|
340
|
+
// oauth required
|
|
341
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
342
|
+
|
|
315
343
|
|
|
316
344
|
|
|
317
345
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -360,6 +388,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
360
388
|
// http basic authentication required
|
|
361
389
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
362
390
|
|
|
391
|
+
// authentication OAuth2 required
|
|
392
|
+
// oauth required
|
|
393
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
394
|
+
|
|
363
395
|
|
|
364
396
|
|
|
365
397
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -408,6 +440,10 @@ export const TollFreeVerificationApiAxiosParamCreator = function (configuration?
|
|
|
408
440
|
// http basic authentication required
|
|
409
441
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
410
442
|
|
|
443
|
+
// authentication OAuth2 required
|
|
444
|
+
// oauth required
|
|
445
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
446
|
+
|
|
411
447
|
|
|
412
448
|
|
|
413
449
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -67,6 +67,10 @@ export const TranscriptionsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
67
67
|
// http basic authentication required
|
|
68
68
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
69
69
|
|
|
70
|
+
// authentication OAuth2 required
|
|
71
|
+
// oauth required
|
|
72
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
73
|
+
|
|
70
74
|
|
|
71
75
|
|
|
72
76
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -113,6 +117,10 @@ export const TranscriptionsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
113
117
|
// http basic authentication required
|
|
114
118
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
115
119
|
|
|
120
|
+
// authentication OAuth2 required
|
|
121
|
+
// oauth required
|
|
122
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
123
|
+
|
|
116
124
|
|
|
117
125
|
|
|
118
126
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -155,6 +163,10 @@ export const TranscriptionsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
155
163
|
// http basic authentication required
|
|
156
164
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
157
165
|
|
|
166
|
+
// authentication OAuth2 required
|
|
167
|
+
// oauth required
|
|
168
|
+
await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
|
|
169
|
+
|
|
158
170
|
|
|
159
171
|
|
|
160
172
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
package/bandwidth.yml
CHANGED
|
@@ -9,6 +9,7 @@ info:
|
|
|
9
9
|
version: 1.0.0
|
|
10
10
|
security:
|
|
11
11
|
- Basic: []
|
|
12
|
+
- OAuth2: []
|
|
12
13
|
tags:
|
|
13
14
|
- name: Messages
|
|
14
15
|
- name: Media
|
|
@@ -2490,7 +2491,7 @@ components:
|
|
|
2490
2491
|
$ref: '#/components/schemas/multiChannelAction'
|
|
2491
2492
|
maxItems: 11
|
|
2492
2493
|
multiChannelAction:
|
|
2493
|
-
|
|
2494
|
+
anyOf:
|
|
2494
2495
|
- $ref: '#/components/schemas/rbmActionBase'
|
|
2495
2496
|
- $ref: '#/components/schemas/rbmActionDial'
|
|
2496
2497
|
- $ref: '#/components/schemas/rbmActionViewLocation'
|
|
@@ -2505,7 +2506,7 @@ components:
|
|
|
2505
2506
|
CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent'
|
|
2506
2507
|
OPEN_URL: '#/components/schemas/rbmActionOpenUrl'
|
|
2507
2508
|
REQUEST_LOCATION: '#/components/schemas/rbmActionBase'
|
|
2508
|
-
|
|
2509
|
+
multiChannelChannelListObjectBase:
|
|
2509
2510
|
type: object
|
|
2510
2511
|
properties:
|
|
2511
2512
|
from:
|
|
@@ -2514,19 +2515,85 @@ components:
|
|
|
2514
2515
|
$ref: '#/components/schemas/applicationId'
|
|
2515
2516
|
channel:
|
|
2516
2517
|
$ref: '#/components/schemas/multiChannelMessageChannelEnum'
|
|
2517
|
-
content:
|
|
2518
|
-
description: The content of the message.
|
|
2519
|
-
oneOf:
|
|
2520
|
-
- $ref: '#/components/schemas/rbmMessageContentText'
|
|
2521
|
-
- $ref: '#/components/schemas/rbmMessageMedia'
|
|
2522
|
-
- $ref: '#/components/schemas/rbmMessageContentRichCard'
|
|
2523
|
-
- $ref: '#/components/schemas/smsMessageContent'
|
|
2524
|
-
- $ref: '#/components/schemas/mmsMessageContent'
|
|
2525
2518
|
required:
|
|
2526
2519
|
- from
|
|
2527
2520
|
- applicationId
|
|
2528
2521
|
- channel
|
|
2522
|
+
multiChannelChannelListRBMObject:
|
|
2523
|
+
allOf:
|
|
2524
|
+
- $ref: '#/components/schemas/multiChannelChannelListObjectBase'
|
|
2525
|
+
- type: object
|
|
2526
|
+
properties:
|
|
2527
|
+
content:
|
|
2528
|
+
description: The content of the message.
|
|
2529
|
+
oneOf:
|
|
2530
|
+
- $ref: '#/components/schemas/rbmMessageContentText'
|
|
2531
|
+
- $ref: '#/components/schemas/rbmMessageMedia'
|
|
2532
|
+
- $ref: '#/components/schemas/rbmMessageContentRichCard'
|
|
2533
|
+
required:
|
|
2529
2534
|
- content
|
|
2535
|
+
multiChannelChannelListSMSObject:
|
|
2536
|
+
allOf:
|
|
2537
|
+
- $ref: '#/components/schemas/multiChannelChannelListObjectBase'
|
|
2538
|
+
- type: object
|
|
2539
|
+
properties:
|
|
2540
|
+
content:
|
|
2541
|
+
$ref: '#/components/schemas/smsMessageContent'
|
|
2542
|
+
required:
|
|
2543
|
+
- content
|
|
2544
|
+
multiChannelChannelListMMSObject:
|
|
2545
|
+
allOf:
|
|
2546
|
+
- $ref: '#/components/schemas/multiChannelChannelListObjectBase'
|
|
2547
|
+
- type: object
|
|
2548
|
+
properties:
|
|
2549
|
+
content:
|
|
2550
|
+
$ref: '#/components/schemas/mmsMessageContent'
|
|
2551
|
+
required:
|
|
2552
|
+
- content
|
|
2553
|
+
multiChannelChannelListRBMResponseObject:
|
|
2554
|
+
allOf:
|
|
2555
|
+
- $ref: '#/components/schemas/multiChannelChannelListRBMObject'
|
|
2556
|
+
- $ref: '#/components/schemas/multiChannelChannelListOwnerObject'
|
|
2557
|
+
multiChannelChannelListSMSResponseObject:
|
|
2558
|
+
allOf:
|
|
2559
|
+
- $ref: '#/components/schemas/multiChannelChannelListSMSObject'
|
|
2560
|
+
- $ref: '#/components/schemas/multiChannelChannelListOwnerObject'
|
|
2561
|
+
multiChannelChannelListMMSResponseObject:
|
|
2562
|
+
allOf:
|
|
2563
|
+
- $ref: '#/components/schemas/multiChannelChannelListMMSObject'
|
|
2564
|
+
- $ref: '#/components/schemas/multiChannelChannelListOwnerObject'
|
|
2565
|
+
multiChannelChannelListRequestObject:
|
|
2566
|
+
anyOf:
|
|
2567
|
+
- $ref: '#/components/schemas/multiChannelChannelListRBMObject'
|
|
2568
|
+
- $ref: '#/components/schemas/multiChannelChannelListSMSObject'
|
|
2569
|
+
- $ref: '#/components/schemas/multiChannelChannelListMMSObject'
|
|
2570
|
+
discriminator:
|
|
2571
|
+
propertyName: channel
|
|
2572
|
+
mapping:
|
|
2573
|
+
RBM: '#/components/schemas/multiChannelChannelListRBMObject'
|
|
2574
|
+
SMS: '#/components/schemas/multiChannelChannelListSMSObject'
|
|
2575
|
+
MMS: '#/components/schemas/multiChannelChannelListMMSObject'
|
|
2576
|
+
multiChannelChannelListOwnerObject:
|
|
2577
|
+
type: object
|
|
2578
|
+
properties:
|
|
2579
|
+
owner:
|
|
2580
|
+
type: string
|
|
2581
|
+
description: >-
|
|
2582
|
+
The Bandwidth senderId associated with the message. Identical to
|
|
2583
|
+
'from'.
|
|
2584
|
+
required:
|
|
2585
|
+
- owner
|
|
2586
|
+
multiChannelChannelListResponseObject:
|
|
2587
|
+
anyOf:
|
|
2588
|
+
- $ref: '#/components/schemas/multiChannelChannelListRBMResponseObject'
|
|
2589
|
+
- $ref: '#/components/schemas/multiChannelChannelListSMSResponseObject'
|
|
2590
|
+
- $ref: '#/components/schemas/multiChannelChannelListMMSResponseObject'
|
|
2591
|
+
discriminator:
|
|
2592
|
+
propertyName: channel
|
|
2593
|
+
mapping:
|
|
2594
|
+
RBM: '#/components/schemas/multiChannelChannelListRBMResponseObject'
|
|
2595
|
+
SMS: '#/components/schemas/multiChannelChannelListSMSResponseObject'
|
|
2596
|
+
MMS: '#/components/schemas/multiChannelChannelListMMSResponseObject'
|
|
2530
2597
|
multiChannelMessageRequest:
|
|
2531
2598
|
description: Multi-Channel Message Request
|
|
2532
2599
|
type: object
|
|
@@ -2540,7 +2607,7 @@ components:
|
|
|
2540
2607
|
order they are listed. Once a message sends successfully, the others
|
|
2541
2608
|
will be ignored.
|
|
2542
2609
|
items:
|
|
2543
|
-
$ref: '#/components/schemas/
|
|
2610
|
+
$ref: '#/components/schemas/multiChannelChannelListRequestObject'
|
|
2544
2611
|
maxItems: 4
|
|
2545
2612
|
tag:
|
|
2546
2613
|
$ref: '#/components/schemas/tag'
|
|
@@ -2573,17 +2640,7 @@ components:
|
|
|
2573
2640
|
order they are listed. Once a message sends successfully, the others
|
|
2574
2641
|
will be ignored.
|
|
2575
2642
|
items:
|
|
2576
|
-
|
|
2577
|
-
- $ref: '#/components/schemas/multiChannelChannelListObject'
|
|
2578
|
-
- type: object
|
|
2579
|
-
properties:
|
|
2580
|
-
owner:
|
|
2581
|
-
type: string
|
|
2582
|
-
description: >-
|
|
2583
|
-
The Bandwidth senderId associated with the message.
|
|
2584
|
-
Identical to 'from'.
|
|
2585
|
-
required:
|
|
2586
|
-
- owner
|
|
2643
|
+
$ref: '#/components/schemas/multiChannelChannelListResponseObject'
|
|
2587
2644
|
maxItems: 4
|
|
2588
2645
|
tag:
|
|
2589
2646
|
$ref: '#/components/schemas/tag'
|
|
@@ -8371,6 +8428,12 @@ components:
|
|
|
8371
8428
|
|
|
8372
8429
|
|
|
8373
8430
|
- Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==`
|
|
8431
|
+
OAuth2:
|
|
8432
|
+
type: oauth2
|
|
8433
|
+
flows:
|
|
8434
|
+
clientCredentials:
|
|
8435
|
+
tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token
|
|
8436
|
+
scopes: {}
|
|
8374
8437
|
callbacks:
|
|
8375
8438
|
inboundCallback:
|
|
8376
8439
|
'{inboundCallbackUrl}':
|
package/common.ts
CHANGED
|
@@ -58,7 +58,9 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
58
58
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
59
59
|
? await configuration.accessToken(name, scopes)
|
|
60
60
|
: await configuration.accessToken;
|
|
61
|
-
|
|
61
|
+
if (localVarAccessTokenValue) {
|
|
62
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
63
|
+
}
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
|
package/configuration.ts
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* Do not edit the class manually.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
|
|
14
16
|
interface AWSv4Configuration {
|
|
15
17
|
options?: {
|
|
16
18
|
region?: string
|
|
@@ -27,6 +29,8 @@ export interface ConfigurationParameters {
|
|
|
27
29
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
28
30
|
username?: string;
|
|
29
31
|
password?: string;
|
|
32
|
+
clientId?: string;
|
|
33
|
+
clientSecret?: string;
|
|
30
34
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
35
|
awsv4?: AWSv4Configuration;
|
|
32
36
|
basePath?: string;
|
|
@@ -49,12 +53,28 @@ export class Configuration {
|
|
|
49
53
|
* parameter for basic security
|
|
50
54
|
*/
|
|
51
55
|
password?: string;
|
|
56
|
+
/**
|
|
57
|
+
* parameter for client ID
|
|
58
|
+
*/
|
|
59
|
+
clientId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* parameter for client secret
|
|
62
|
+
*/
|
|
63
|
+
clientSecret?: string;
|
|
52
64
|
/**
|
|
53
65
|
* parameter for oauth2 security
|
|
54
66
|
* @param name security name
|
|
55
67
|
* @param scopes oauth2 scope
|
|
56
68
|
*/
|
|
57
69
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
70
|
+
/**
|
|
71
|
+
* temporary access token storage
|
|
72
|
+
*/
|
|
73
|
+
tempAccessToken?: string;
|
|
74
|
+
/**
|
|
75
|
+
* when the temporary access token expires
|
|
76
|
+
*/
|
|
77
|
+
tempAccessTokenExpiration?: number;
|
|
58
78
|
/**
|
|
59
79
|
* parameter for aws4 signature security
|
|
60
80
|
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
@@ -91,7 +111,29 @@ export class Configuration {
|
|
|
91
111
|
this.apiKey = param.apiKey;
|
|
92
112
|
this.username = param.username;
|
|
93
113
|
this.password = param.password;
|
|
94
|
-
this.
|
|
114
|
+
this.clientId = param.clientId;
|
|
115
|
+
this.clientSecret = param.clientSecret;
|
|
116
|
+
this.tempAccessToken;
|
|
117
|
+
this.tempAccessTokenExpiration;
|
|
118
|
+
this.accessToken = param.accessToken ?? (async (name, scopes) => {
|
|
119
|
+
const now = Math.floor(Date.now() / 1000);
|
|
120
|
+
if (this.tempAccessToken && (!this.tempAccessTokenExpiration || this.tempAccessTokenExpiration > now + 60)) {
|
|
121
|
+
return this.tempAccessToken;
|
|
122
|
+
} else if (this.clientId && this.clientSecret) {
|
|
123
|
+
const tokenRequestArgs = {
|
|
124
|
+
method: 'POST',
|
|
125
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
126
|
+
auth: { username: this.clientId || '', password: this.clientSecret || '' },
|
|
127
|
+
data: 'grant_type=client_credentials',
|
|
128
|
+
url: 'https://api.bandwidth.com/api/v1/oauth2/token'
|
|
129
|
+
};
|
|
130
|
+
const response = await globalAxios.request(tokenRequestArgs);
|
|
131
|
+
this.tempAccessToken = response.data.access_token;
|
|
132
|
+
this.tempAccessTokenExpiration = now + response.data.expires_in;
|
|
133
|
+
return this.tempAccessToken!;
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
});
|
|
95
137
|
this.awsv4 = param.awsv4;
|
|
96
138
|
this.basePath = param.basePath;
|
|
97
139
|
this.serverIndex = param.serverIndex;
|
|
@@ -99,7 +141,7 @@ export class Configuration {
|
|
|
99
141
|
...param.baseOptions,
|
|
100
142
|
headers: {
|
|
101
143
|
...param.baseOptions?.headers,
|
|
102
|
-
'User-Agent': "OpenAPI-Generator/7.
|
|
144
|
+
'User-Agent': "OpenAPI-Generator/7.1.0/typescript-axios"
|
|
103
145
|
},
|
|
104
146
|
};
|
|
105
147
|
this.formDataCtor = param.formDataCtor;
|