bandwidth-sdk 7.0.1 → 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/README.md +10 -2
- 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 +7 -0
- package/common.ts +3 -1
- package/configuration.ts +44 -2
- package/coverage/clover.xml +1112 -1046
- package/coverage/coverage-final.json +13 -13
- package/coverage/lcov-report/index.html +26 -26
- 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 +60 -60
- 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 +18 -6
- 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 +24 -18
- package/coverage/lcov-report/node-sdk/configuration.ts.html +138 -12
- 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 +1 -1
- package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/latest-message-delivery-status-enum.ts.html +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 +2779 -2692
- 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/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/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/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/phone-number-lookup-api.test.ts +2 -2
- 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
|
@@ -115,33 +115,43 @@ var TranscriptionsApiAxiosParamCreator = function (configuration) {
|
|
|
115
115
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
116
116
|
if (options === void 0) { options = {}; }
|
|
117
117
|
return __generator(this, function (_a) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
switch (_a.label) {
|
|
119
|
+
case 0:
|
|
120
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
121
|
+
(0, common_1.assertParamExists)('deleteRealTimeTranscription', 'accountId', accountId);
|
|
122
|
+
// verify required parameter 'callId' is not null or undefined
|
|
123
|
+
(0, common_1.assertParamExists)('deleteRealTimeTranscription', 'callId', callId);
|
|
124
|
+
// verify required parameter 'transcriptionId' is not null or undefined
|
|
125
|
+
(0, common_1.assertParamExists)('deleteRealTimeTranscription', 'transcriptionId', transcriptionId);
|
|
126
|
+
localVarPath = "/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}"
|
|
127
|
+
.replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
|
|
128
|
+
.replace("{".concat("callId", "}"), encodeURIComponent(String(callId)))
|
|
129
|
+
.replace("{".concat("transcriptionId", "}"), encodeURIComponent(String(transcriptionId)));
|
|
130
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
131
|
+
if (configuration) {
|
|
132
|
+
baseOptions = configuration.baseOptions;
|
|
133
|
+
}
|
|
134
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
135
|
+
localVarHeaderParameter = {};
|
|
136
|
+
localVarQueryParameter = {};
|
|
137
|
+
// authentication Basic required
|
|
138
|
+
// http basic authentication required
|
|
139
|
+
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
|
|
140
|
+
// authentication OAuth2 required
|
|
141
|
+
// oauth required
|
|
142
|
+
return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
|
|
143
|
+
case 1:
|
|
144
|
+
// authentication OAuth2 required
|
|
145
|
+
// oauth required
|
|
146
|
+
_a.sent();
|
|
147
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
148
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
149
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
150
|
+
return [2 /*return*/, {
|
|
151
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
152
|
+
options: localVarRequestOptions,
|
|
153
|
+
}];
|
|
131
154
|
}
|
|
132
|
-
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
133
|
-
localVarHeaderParameter = {};
|
|
134
|
-
localVarQueryParameter = {};
|
|
135
|
-
// authentication Basic required
|
|
136
|
-
// http basic authentication required
|
|
137
|
-
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
|
|
138
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
139
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
140
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
141
|
-
return [2 /*return*/, {
|
|
142
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
143
|
-
options: localVarRequestOptions,
|
|
144
|
-
}];
|
|
145
155
|
});
|
|
146
156
|
});
|
|
147
157
|
},
|
|
@@ -163,33 +173,43 @@ var TranscriptionsApiAxiosParamCreator = function (configuration) {
|
|
|
163
173
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
164
174
|
if (options === void 0) { options = {}; }
|
|
165
175
|
return __generator(this, function (_a) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
switch (_a.label) {
|
|
177
|
+
case 0:
|
|
178
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
179
|
+
(0, common_1.assertParamExists)('getRealTimeTranscription', 'accountId', accountId);
|
|
180
|
+
// verify required parameter 'callId' is not null or undefined
|
|
181
|
+
(0, common_1.assertParamExists)('getRealTimeTranscription', 'callId', callId);
|
|
182
|
+
// verify required parameter 'transcriptionId' is not null or undefined
|
|
183
|
+
(0, common_1.assertParamExists)('getRealTimeTranscription', 'transcriptionId', transcriptionId);
|
|
184
|
+
localVarPath = "/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}"
|
|
185
|
+
.replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
|
|
186
|
+
.replace("{".concat("callId", "}"), encodeURIComponent(String(callId)))
|
|
187
|
+
.replace("{".concat("transcriptionId", "}"), encodeURIComponent(String(transcriptionId)));
|
|
188
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
189
|
+
if (configuration) {
|
|
190
|
+
baseOptions = configuration.baseOptions;
|
|
191
|
+
}
|
|
192
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
193
|
+
localVarHeaderParameter = {};
|
|
194
|
+
localVarQueryParameter = {};
|
|
195
|
+
// authentication Basic required
|
|
196
|
+
// http basic authentication required
|
|
197
|
+
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
|
|
198
|
+
// authentication OAuth2 required
|
|
199
|
+
// oauth required
|
|
200
|
+
return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
|
|
201
|
+
case 1:
|
|
202
|
+
// authentication OAuth2 required
|
|
203
|
+
// oauth required
|
|
204
|
+
_a.sent();
|
|
205
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
206
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
207
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
208
|
+
return [2 /*return*/, {
|
|
209
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
210
|
+
options: localVarRequestOptions,
|
|
211
|
+
}];
|
|
179
212
|
}
|
|
180
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
181
|
-
localVarHeaderParameter = {};
|
|
182
|
-
localVarQueryParameter = {};
|
|
183
|
-
// authentication Basic required
|
|
184
|
-
// http basic authentication required
|
|
185
|
-
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
|
|
186
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
187
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
188
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
189
|
-
return [2 /*return*/, {
|
|
190
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
191
|
-
options: localVarRequestOptions,
|
|
192
|
-
}];
|
|
193
213
|
});
|
|
194
214
|
});
|
|
195
215
|
},
|
|
@@ -210,30 +230,40 @@ var TranscriptionsApiAxiosParamCreator = function (configuration) {
|
|
|
210
230
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
211
231
|
if (options === void 0) { options = {}; }
|
|
212
232
|
return __generator(this, function (_a) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
233
|
+
switch (_a.label) {
|
|
234
|
+
case 0:
|
|
235
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
236
|
+
(0, common_1.assertParamExists)('listRealTimeTranscriptions', 'accountId', accountId);
|
|
237
|
+
// verify required parameter 'callId' is not null or undefined
|
|
238
|
+
(0, common_1.assertParamExists)('listRealTimeTranscriptions', 'callId', callId);
|
|
239
|
+
localVarPath = "/accounts/{accountId}/calls/{callId}/transcriptions"
|
|
240
|
+
.replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
|
|
241
|
+
.replace("{".concat("callId", "}"), encodeURIComponent(String(callId)));
|
|
242
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
243
|
+
if (configuration) {
|
|
244
|
+
baseOptions = configuration.baseOptions;
|
|
245
|
+
}
|
|
246
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
247
|
+
localVarHeaderParameter = {};
|
|
248
|
+
localVarQueryParameter = {};
|
|
249
|
+
// authentication Basic required
|
|
250
|
+
// http basic authentication required
|
|
251
|
+
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
|
|
252
|
+
// authentication OAuth2 required
|
|
253
|
+
// oauth required
|
|
254
|
+
return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
|
|
255
|
+
case 1:
|
|
256
|
+
// authentication OAuth2 required
|
|
257
|
+
// oauth required
|
|
258
|
+
_a.sent();
|
|
259
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
260
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
261
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
262
|
+
return [2 /*return*/, {
|
|
263
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
264
|
+
options: localVarRequestOptions,
|
|
265
|
+
}];
|
|
223
266
|
}
|
|
224
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
225
|
-
localVarHeaderParameter = {};
|
|
226
|
-
localVarQueryParameter = {};
|
|
227
|
-
// authentication Basic required
|
|
228
|
-
// http basic authentication required
|
|
229
|
-
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
|
|
230
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
231
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
233
|
-
return [2 /*return*/, {
|
|
234
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
235
|
-
options: localVarRequestOptions,
|
|
236
|
-
}];
|
|
237
267
|
});
|
|
238
268
|
});
|
|
239
269
|
},
|
package/dist/common.js
CHANGED
|
@@ -149,7 +149,9 @@ var setOAuthToObject = function (object, name, scopes, configuration) {
|
|
|
149
149
|
_b.label = 4;
|
|
150
150
|
case 4:
|
|
151
151
|
localVarAccessTokenValue = _a;
|
|
152
|
-
|
|
152
|
+
if (localVarAccessTokenValue) {
|
|
153
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
154
|
+
}
|
|
153
155
|
_b.label = 5;
|
|
154
156
|
case 5: return [2 /*return*/];
|
|
155
157
|
}
|
package/dist/configuration.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface ConfigurationParameters {
|
|
|
24
24
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
25
25
|
username?: string;
|
|
26
26
|
password?: string;
|
|
27
|
+
clientId?: string;
|
|
28
|
+
clientSecret?: string;
|
|
27
29
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
28
30
|
awsv4?: AWSv4Configuration;
|
|
29
31
|
basePath?: string;
|
|
@@ -45,12 +47,28 @@ export declare class Configuration {
|
|
|
45
47
|
* parameter for basic security
|
|
46
48
|
*/
|
|
47
49
|
password?: string;
|
|
50
|
+
/**
|
|
51
|
+
* parameter for client ID
|
|
52
|
+
*/
|
|
53
|
+
clientId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* parameter for client secret
|
|
56
|
+
*/
|
|
57
|
+
clientSecret?: string;
|
|
48
58
|
/**
|
|
49
59
|
* parameter for oauth2 security
|
|
50
60
|
* @param name security name
|
|
51
61
|
* @param scopes oauth2 scope
|
|
52
62
|
*/
|
|
53
63
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
64
|
+
/**
|
|
65
|
+
* temporary access token storage
|
|
66
|
+
*/
|
|
67
|
+
tempAccessToken?: string;
|
|
68
|
+
/**
|
|
69
|
+
* when the temporary access token expires
|
|
70
|
+
*/
|
|
71
|
+
tempAccessTokenExpiration?: number;
|
|
54
72
|
/**
|
|
55
73
|
* parameter for aws4 signature security
|
|
56
74
|
* @param {Object} AWS4Signature - AWS4 Signature security
|
package/dist/configuration.js
CHANGED
|
@@ -22,20 +22,88 @@ var __assign = (this && this.__assign) || function () {
|
|
|
22
22
|
};
|
|
23
23
|
return __assign.apply(this, arguments);
|
|
24
24
|
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
36
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
25
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
62
|
exports.Configuration = void 0;
|
|
63
|
+
var axios_1 = require("axios");
|
|
27
64
|
var Configuration = /** @class */ (function () {
|
|
28
65
|
function Configuration(param) {
|
|
29
66
|
if (param === void 0) { param = {}; }
|
|
30
|
-
var
|
|
67
|
+
var _this = this;
|
|
68
|
+
var _a, _b;
|
|
31
69
|
this.apiKey = param.apiKey;
|
|
32
70
|
this.username = param.username;
|
|
33
71
|
this.password = param.password;
|
|
34
|
-
this.
|
|
72
|
+
this.clientId = param.clientId;
|
|
73
|
+
this.clientSecret = param.clientSecret;
|
|
74
|
+
this.tempAccessToken;
|
|
75
|
+
this.tempAccessTokenExpiration;
|
|
76
|
+
this.accessToken = (_a = param.accessToken) !== null && _a !== void 0 ? _a : (function (name, scopes) { return __awaiter(_this, void 0, void 0, function () {
|
|
77
|
+
var now, tokenRequestArgs, response;
|
|
78
|
+
return __generator(this, function (_a) {
|
|
79
|
+
switch (_a.label) {
|
|
80
|
+
case 0:
|
|
81
|
+
now = Math.floor(Date.now() / 1000);
|
|
82
|
+
if (!(this.tempAccessToken && (!this.tempAccessTokenExpiration || this.tempAccessTokenExpiration > now + 60))) return [3 /*break*/, 1];
|
|
83
|
+
return [2 /*return*/, this.tempAccessToken];
|
|
84
|
+
case 1:
|
|
85
|
+
if (!(this.clientId && this.clientSecret)) return [3 /*break*/, 3];
|
|
86
|
+
tokenRequestArgs = {
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
89
|
+
auth: { username: this.clientId || '', password: this.clientSecret || '' },
|
|
90
|
+
data: 'grant_type=client_credentials',
|
|
91
|
+
url: 'https://api.bandwidth.com/api/v1/oauth2/token'
|
|
92
|
+
};
|
|
93
|
+
return [4 /*yield*/, axios_1.default.request(tokenRequestArgs)];
|
|
94
|
+
case 2:
|
|
95
|
+
response = _a.sent();
|
|
96
|
+
this.tempAccessToken = response.data.access_token;
|
|
97
|
+
this.tempAccessTokenExpiration = now + response.data.expires_in;
|
|
98
|
+
return [2 /*return*/, this.tempAccessToken];
|
|
99
|
+
case 3: return [2 /*return*/, undefined];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}); });
|
|
35
103
|
this.awsv4 = param.awsv4;
|
|
36
104
|
this.basePath = param.basePath;
|
|
37
105
|
this.serverIndex = param.serverIndex;
|
|
38
|
-
this.baseOptions = __assign(__assign({}, param.baseOptions), { headers: __assign(__assign({}, (
|
|
106
|
+
this.baseOptions = __assign(__assign({}, param.baseOptions), { headers: __assign(__assign({}, (_b = param.baseOptions) === null || _b === void 0 ? void 0 : _b.headers), { 'User-Agent': "OpenAPI-Generator/7.1.0/typescript-axios" }) });
|
|
39
107
|
this.formDataCtor = param.formDataCtor;
|
|
40
108
|
}
|
|
41
109
|
/**
|
package/docs/CallsApi.md
CHANGED
|
@@ -50,7 +50,7 @@ const { status, data } = await apiInstance.createCall(
|
|
|
50
50
|
|
|
51
51
|
### Authorization
|
|
52
52
|
|
|
53
|
-
[Basic](../README.md#Basic)
|
|
53
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
54
54
|
|
|
55
55
|
### HTTP request headers
|
|
56
56
|
|
|
@@ -112,7 +112,7 @@ const { status, data } = await apiInstance.getCallState(
|
|
|
112
112
|
|
|
113
113
|
### Authorization
|
|
114
114
|
|
|
115
|
-
[Basic](../README.md#Basic)
|
|
115
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
116
116
|
|
|
117
117
|
### HTTP request headers
|
|
118
118
|
|
|
@@ -192,7 +192,7 @@ const { status, data } = await apiInstance.listCalls(
|
|
|
192
192
|
|
|
193
193
|
### Authorization
|
|
194
194
|
|
|
195
|
-
[Basic](../README.md#Basic)
|
|
195
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
196
196
|
|
|
197
197
|
### HTTP request headers
|
|
198
198
|
|
|
@@ -258,7 +258,7 @@ void (empty response body)
|
|
|
258
258
|
|
|
259
259
|
### Authorization
|
|
260
260
|
|
|
261
|
-
[Basic](../README.md#Basic)
|
|
261
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
262
262
|
|
|
263
263
|
### HTTP request headers
|
|
264
264
|
|
|
@@ -324,7 +324,7 @@ void (empty response body)
|
|
|
324
324
|
|
|
325
325
|
### Authorization
|
|
326
326
|
|
|
327
|
-
[Basic](../README.md#Basic)
|
|
327
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
328
328
|
|
|
329
329
|
### HTTP request headers
|
|
330
330
|
|
package/docs/ConferencesApi.md
CHANGED
|
@@ -56,7 +56,7 @@ const { status, data } = await apiInstance.downloadConferenceRecording(
|
|
|
56
56
|
|
|
57
57
|
### Authorization
|
|
58
58
|
|
|
59
|
-
[Basic](../README.md#Basic)
|
|
59
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
60
60
|
|
|
61
61
|
### HTTP request headers
|
|
62
62
|
|
|
@@ -118,7 +118,7 @@ const { status, data } = await apiInstance.getConference(
|
|
|
118
118
|
|
|
119
119
|
### Authorization
|
|
120
120
|
|
|
121
|
-
[Basic](../README.md#Basic)
|
|
121
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
122
122
|
|
|
123
123
|
### HTTP request headers
|
|
124
124
|
|
|
@@ -183,7 +183,7 @@ const { status, data } = await apiInstance.getConferenceMember(
|
|
|
183
183
|
|
|
184
184
|
### Authorization
|
|
185
185
|
|
|
186
|
-
[Basic](../README.md#Basic)
|
|
186
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
187
187
|
|
|
188
188
|
### HTTP request headers
|
|
189
189
|
|
|
@@ -248,7 +248,7 @@ const { status, data } = await apiInstance.getConferenceRecording(
|
|
|
248
248
|
|
|
249
249
|
### Authorization
|
|
250
250
|
|
|
251
|
-
[Basic](../README.md#Basic)
|
|
251
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
252
252
|
|
|
253
253
|
### HTTP request headers
|
|
254
254
|
|
|
@@ -310,7 +310,7 @@ const { status, data } = await apiInstance.listConferenceRecordings(
|
|
|
310
310
|
|
|
311
311
|
### Authorization
|
|
312
312
|
|
|
313
|
-
[Basic](../README.md#Basic)
|
|
313
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
314
314
|
|
|
315
315
|
### HTTP request headers
|
|
316
316
|
|
|
@@ -384,7 +384,7 @@ const { status, data } = await apiInstance.listConferences(
|
|
|
384
384
|
|
|
385
385
|
### Authorization
|
|
386
386
|
|
|
387
|
-
[Basic](../README.md#Basic)
|
|
387
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
388
388
|
|
|
389
389
|
### HTTP request headers
|
|
390
390
|
|
|
@@ -450,7 +450,7 @@ void (empty response body)
|
|
|
450
450
|
|
|
451
451
|
### Authorization
|
|
452
452
|
|
|
453
|
-
[Basic](../README.md#Basic)
|
|
453
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
454
454
|
|
|
455
455
|
### HTTP request headers
|
|
456
456
|
|
|
@@ -515,7 +515,7 @@ void (empty response body)
|
|
|
515
515
|
|
|
516
516
|
### Authorization
|
|
517
517
|
|
|
518
|
-
[Basic](../README.md#Basic)
|
|
518
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
519
519
|
|
|
520
520
|
### HTTP request headers
|
|
521
521
|
|
|
@@ -584,7 +584,7 @@ void (empty response body)
|
|
|
584
584
|
|
|
585
585
|
### Authorization
|
|
586
586
|
|
|
587
|
-
[Basic](../README.md#Basic)
|
|
587
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
588
588
|
|
|
589
589
|
### HTTP request headers
|
|
590
590
|
|
package/docs/MFAApi.md
CHANGED
|
@@ -48,7 +48,7 @@ const { status, data } = await apiInstance.generateMessagingCode(
|
|
|
48
48
|
|
|
49
49
|
### Authorization
|
|
50
50
|
|
|
51
|
-
[Basic](../README.md#Basic)
|
|
51
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
52
52
|
|
|
53
53
|
### HTTP request headers
|
|
54
54
|
|
|
@@ -107,7 +107,7 @@ const { status, data } = await apiInstance.generateVoiceCode(
|
|
|
107
107
|
|
|
108
108
|
### Authorization
|
|
109
109
|
|
|
110
|
-
[Basic](../README.md#Basic)
|
|
110
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
111
111
|
|
|
112
112
|
### HTTP request headers
|
|
113
113
|
|
|
@@ -166,7 +166,7 @@ const { status, data } = await apiInstance.verifyCode(
|
|
|
166
166
|
|
|
167
167
|
### Authorization
|
|
168
168
|
|
|
169
|
-
[Basic](../README.md#Basic)
|
|
169
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
170
170
|
|
|
171
171
|
### HTTP request headers
|
|
172
172
|
|
package/docs/MediaApi.md
CHANGED
|
@@ -48,7 +48,7 @@ void (empty response body)
|
|
|
48
48
|
|
|
49
49
|
### Authorization
|
|
50
50
|
|
|
51
|
-
[Basic](../README.md#Basic)
|
|
51
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
52
52
|
|
|
53
53
|
### HTTP request headers
|
|
54
54
|
|
|
@@ -110,7 +110,7 @@ const { status, data } = await apiInstance.getMedia(
|
|
|
110
110
|
|
|
111
111
|
### Authorization
|
|
112
112
|
|
|
113
|
-
[Basic](../README.md#Basic)
|
|
113
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
114
114
|
|
|
115
115
|
### HTTP request headers
|
|
116
116
|
|
|
@@ -172,7 +172,7 @@ const { status, data } = await apiInstance.listMedia(
|
|
|
172
172
|
|
|
173
173
|
### Authorization
|
|
174
174
|
|
|
175
|
-
[Basic](../README.md#Basic)
|
|
175
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
176
176
|
|
|
177
177
|
### HTTP request headers
|
|
178
178
|
|
|
@@ -243,7 +243,7 @@ void (empty response body)
|
|
|
243
243
|
|
|
244
244
|
### Authorization
|
|
245
245
|
|
|
246
|
-
[Basic](../README.md#Basic)
|
|
246
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
247
247
|
|
|
248
248
|
### HTTP request headers
|
|
249
249
|
|
package/docs/MessagesApi.md
CHANGED
|
@@ -47,7 +47,7 @@ const { status, data } = await apiInstance.createMessage(
|
|
|
47
47
|
|
|
48
48
|
### Authorization
|
|
49
49
|
|
|
50
|
-
[Basic](../README.md#Basic)
|
|
50
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
51
51
|
|
|
52
52
|
### HTTP request headers
|
|
53
53
|
|
|
@@ -188,7 +188,7 @@ const { status, data } = await apiInstance.listMessages(
|
|
|
188
188
|
|
|
189
189
|
### Authorization
|
|
190
190
|
|
|
191
|
-
[Basic](../README.md#Basic)
|
|
191
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
192
192
|
|
|
193
193
|
### HTTP request headers
|
|
194
194
|
|
package/docs/MultiChannelApi.md
CHANGED
|
@@ -48,7 +48,7 @@ const { status, data } = await apiInstance.createAsyncBulkLookup(
|
|
|
48
48
|
|
|
49
49
|
### Authorization
|
|
50
50
|
|
|
51
|
-
[Basic](../README.md#Basic)
|
|
51
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
52
52
|
|
|
53
53
|
### HTTP request headers
|
|
54
54
|
|
|
@@ -104,7 +104,7 @@ const { status, data } = await apiInstance.createSyncLookup(
|
|
|
104
104
|
|
|
105
105
|
### Authorization
|
|
106
106
|
|
|
107
|
-
[Basic](../README.md#Basic)
|
|
107
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
108
108
|
|
|
109
109
|
### HTTP request headers
|
|
110
110
|
|
|
@@ -159,7 +159,7 @@ const { status, data } = await apiInstance.getAsyncBulkLookup(
|
|
|
159
159
|
|
|
160
160
|
### Authorization
|
|
161
161
|
|
|
162
|
-
[Basic](../README.md#Basic)
|
|
162
|
+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
|
|
163
163
|
|
|
164
164
|
### HTTP request headers
|
|
165
165
|
|