bandwidth-sdk 7.0.1 → 7.2.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.
Files changed (182) hide show
  1. package/.github/workflows/deploy.yml +11 -4
  2. package/.github/workflows/test-pr.yml +3 -1
  3. package/.github/workflows/test-smoke.yml +4 -2
  4. package/.openapi-generator/FILES +4 -0
  5. package/README.md +12 -2
  6. package/api/calls-api.ts +20 -0
  7. package/api/conferences-api.ts +36 -0
  8. package/api/media-api.ts +16 -0
  9. package/api/messages-api.ts +8 -0
  10. package/api/mfaapi.ts +12 -0
  11. package/api/multi-channel-api.ts +4 -0
  12. package/api/phone-number-lookup-api.ts +12 -0
  13. package/api/recordings-api.ts +40 -0
  14. package/api/statistics-api.ts +4 -0
  15. package/api/toll-free-verification-api.ts +36 -0
  16. package/api/transcriptions-api.ts +12 -0
  17. package/bandwidth.yml +58 -0
  18. package/common.ts +3 -1
  19. package/configuration.ts +44 -2
  20. package/coverage/clover.xml +1126 -1050
  21. package/coverage/coverage-final.json +16 -14
  22. package/coverage/lcov-report/index.html +28 -28
  23. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +66 -6
  24. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +114 -6
  25. package/coverage/lcov-report/node-sdk/api/index.html +60 -60
  26. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +54 -6
  27. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +30 -6
  28. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +42 -6
  29. package/coverage/lcov-report/node-sdk/api/multi-channel-api.ts.html +18 -6
  30. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +42 -6
  31. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +126 -6
  32. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +18 -6
  33. package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +114 -6
  34. package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +42 -6
  35. package/coverage/lcov-report/node-sdk/api.ts.html +1 -1
  36. package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
  37. package/coverage/lcov-report/node-sdk/common.ts.html +25 -19
  38. package/coverage/lcov-report/node-sdk/configuration.ts.html +138 -12
  39. package/coverage/lcov-report/node-sdk/index.html +30 -30
  40. package/coverage/lcov-report/node-sdk/models/business-entity-type-enum.ts.html +1 -1
  41. package/coverage/lcov-report/node-sdk/models/business-registration-type-enum.ts.html +1 -1
  42. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +1 -1
  43. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +1 -1
  44. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +1 -1
  45. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +1 -1
  46. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +1 -1
  47. package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
  48. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +1 -1
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +1 -1
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
  55. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
  56. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +1 -1
  57. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
  58. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
  59. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
  60. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
  61. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
  62. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
  63. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
  64. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
  65. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
  66. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
  67. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
  68. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +1 -1
  69. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +1 -1
  70. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
  71. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
  72. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
  73. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
  74. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
  75. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
  76. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +1 -1
  77. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
  78. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
  79. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +1 -1
  80. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +1 -1
  81. package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +1 -1
  82. package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +1 -1
  83. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +1 -1
  84. package/coverage/lcov-report/node-sdk/models/card-width-enum.ts.html +1 -1
  85. package/coverage/lcov-report/node-sdk/models/completed-lookup-status-enum.ts.html +1 -1
  86. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +1 -1
  87. package/coverage/lcov-report/node-sdk/models/deactivation-event-enum.ts.html +1 -1
  88. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +1 -1
  89. package/coverage/lcov-report/node-sdk/models/in-progress-lookup-status-enum.ts.html +1 -1
  90. package/coverage/lcov-report/node-sdk/models/inbound-callback-type-enum.ts.html +1 -1
  91. package/coverage/lcov-report/node-sdk/models/index.html +35 -5
  92. package/coverage/lcov-report/node-sdk/models/index.ts.html +10 -4
  93. package/coverage/lcov-report/node-sdk/models/latest-message-delivery-status-enum.ts.html +1 -1
  94. package/coverage/lcov-report/node-sdk/models/line-type-enum.ts.html +1 -1
  95. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +1 -1
  96. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +1 -1
  97. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +1 -1
  98. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +1 -1
  99. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +1 -1
  100. package/coverage/lcov-report/node-sdk/models/multi-channel-message-channel-enum.ts.html +1 -1
  101. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +1 -1
  102. package/coverage/lcov-report/node-sdk/models/product-type-enum.ts.html +1 -1
  103. package/coverage/lcov-report/node-sdk/models/rbm-action-type-enum.ts.html +1 -1
  104. package/coverage/lcov-report/node-sdk/models/rbm-media-height-enum.ts.html +1 -1
  105. package/coverage/lcov-report/node-sdk/models/rbm-open-url-enum.ts.html +172 -0
  106. package/coverage/lcov-report/node-sdk/models/rbm-web-view-enum.ts.html +175 -0
  107. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +1 -1
  108. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +1 -1
  109. package/coverage/lcov-report/node-sdk/models/standalone-card-orientation-enum.ts.html +1 -1
  110. package/coverage/lcov-report/node-sdk/models/status-callback-type-enum.ts.html +1 -1
  111. package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +1 -1
  112. package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +1 -1
  113. package/coverage/lcov-report/node-sdk/models/thumbnail-alignment-enum.ts.html +1 -1
  114. package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +1 -1
  115. package/coverage/lcov.info +2804 -2695
  116. package/custom_templates/README.mustache +2 -2
  117. package/custom_templates/common.mustache +3 -1
  118. package/custom_templates/configuration.mustache +43 -1
  119. package/custom_templates/package.mustache +11 -9
  120. package/dist/api/calls-api.js +192 -142
  121. package/dist/api/conferences-api.js +333 -243
  122. package/dist/api/media-api.js +142 -102
  123. package/dist/api/messages-api.js +145 -125
  124. package/dist/api/mfaapi.js +102 -72
  125. package/dist/api/multi-channel-api.js +34 -24
  126. package/dist/api/phone-number-lookup-api.js +101 -71
  127. package/dist/api/recordings-api.js +368 -268
  128. package/dist/api/statistics-api.js +30 -20
  129. package/dist/api/toll-free-verification-api.js +298 -208
  130. package/dist/api/transcriptions-api.js +105 -75
  131. package/dist/common.js +3 -1
  132. package/dist/configuration.d.ts +18 -0
  133. package/dist/configuration.js +71 -3
  134. package/dist/models/index.d.ts +2 -0
  135. package/dist/models/index.js +2 -0
  136. package/dist/models/multi-channel-action.d.ts +4 -0
  137. package/dist/models/rbm-open-url-enum.d.ts +19 -0
  138. package/dist/models/rbm-open-url-enum.js +23 -0
  139. package/dist/models/rbm-web-view-enum.d.ts +20 -0
  140. package/dist/models/rbm-web-view-enum.js +24 -0
  141. package/dist/models/tfv-status.d.ts +4 -0
  142. package/dist/models/verification-request.d.ts +4 -0
  143. package/dist/models/verification-update-request.d.ts +4 -0
  144. package/docs/CallsApi.md +5 -5
  145. package/docs/ConferencesApi.md +9 -9
  146. package/docs/MFAApi.md +3 -3
  147. package/docs/MediaApi.md +4 -4
  148. package/docs/MessagesApi.md +2 -2
  149. package/docs/MultiChannelAction.md +4 -0
  150. package/docs/MultiChannelApi.md +1 -1
  151. package/docs/PhoneNumberLookupApi.md +3 -3
  152. package/docs/RbmActionOpenUrl.md +4 -0
  153. package/docs/RbmOpenUrlEnum.md +11 -0
  154. package/docs/RbmWebViewEnum.md +13 -0
  155. package/docs/RecordingsApi.md +10 -10
  156. package/docs/StatisticsApi.md +1 -1
  157. package/docs/TfvStatus.md +2 -0
  158. package/docs/TollFreeVerificationApi.md +9 -9
  159. package/docs/TranscriptionsApi.md +3 -3
  160. package/docs/VerificationRequest.md +2 -0
  161. package/docs/VerificationUpdateRequest.md +2 -0
  162. package/jest.config.js +2 -0
  163. package/models/index.ts +2 -0
  164. package/models/multi-channel-action.ts +8 -0
  165. package/models/rbm-action-open-url.ts +6 -0
  166. package/models/rbm-open-url-enum.ts +29 -0
  167. package/models/rbm-web-view-enum.ts +30 -0
  168. package/models/tfv-status.ts +4 -0
  169. package/models/verification-request.ts +4 -0
  170. package/models/verification-update-request.ts +4 -0
  171. package/package.json +12 -5
  172. package/tests/smoke/bxml.test.ts +4 -1
  173. package/tests/smoke/calls-api.test.ts +4 -1
  174. package/tests/smoke/conferences-api.test.ts +4 -1
  175. package/tests/smoke/phone-number-lookup-api.test.ts +2 -2
  176. package/tests/smoke/recordings-api.test.ts +4 -1
  177. package/tests/smoke/statistics-api.test.ts +4 -1
  178. package/tests/smoke/toll-free-verification-api.test.ts +4 -1
  179. package/tests/smoke/transcriptions-api.test.ts +4 -1
  180. package/tests/unit/api/toll-free-verification-api.test.ts +15 -2
  181. package/tests/unit/models/rbm-open-url-enum.test.ts +8 -0
  182. package/tests/unit/models/rbm-veb-view-enum.test.ts +9 -0
@@ -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
- // verify required parameter 'accountId' is not null or undefined
119
- (0, common_1.assertParamExists)('deleteRealTimeTranscription', 'accountId', accountId);
120
- // verify required parameter 'callId' is not null or undefined
121
- (0, common_1.assertParamExists)('deleteRealTimeTranscription', 'callId', callId);
122
- // verify required parameter 'transcriptionId' is not null or undefined
123
- (0, common_1.assertParamExists)('deleteRealTimeTranscription', 'transcriptionId', transcriptionId);
124
- localVarPath = "/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}"
125
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
126
- .replace("{".concat("callId", "}"), encodeURIComponent(String(callId)))
127
- .replace("{".concat("transcriptionId", "}"), encodeURIComponent(String(transcriptionId)));
128
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
129
- if (configuration) {
130
- baseOptions = configuration.baseOptions;
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
- // verify required parameter 'accountId' is not null or undefined
167
- (0, common_1.assertParamExists)('getRealTimeTranscription', 'accountId', accountId);
168
- // verify required parameter 'callId' is not null or undefined
169
- (0, common_1.assertParamExists)('getRealTimeTranscription', 'callId', callId);
170
- // verify required parameter 'transcriptionId' is not null or undefined
171
- (0, common_1.assertParamExists)('getRealTimeTranscription', 'transcriptionId', transcriptionId);
172
- localVarPath = "/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}"
173
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
174
- .replace("{".concat("callId", "}"), encodeURIComponent(String(callId)))
175
- .replace("{".concat("transcriptionId", "}"), encodeURIComponent(String(transcriptionId)));
176
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
177
- if (configuration) {
178
- baseOptions = configuration.baseOptions;
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
- // verify required parameter 'accountId' is not null or undefined
214
- (0, common_1.assertParamExists)('listRealTimeTranscriptions', 'accountId', accountId);
215
- // verify required parameter 'callId' is not null or undefined
216
- (0, common_1.assertParamExists)('listRealTimeTranscriptions', 'callId', callId);
217
- localVarPath = "/accounts/{accountId}/calls/{callId}/transcriptions"
218
- .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
219
- .replace("{".concat("callId", "}"), encodeURIComponent(String(callId)));
220
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
221
- if (configuration) {
222
- baseOptions = configuration.baseOptions;
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
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
152
+ if (localVarAccessTokenValue) {
153
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
154
+ }
153
155
  _b.label = 5;
154
156
  case 5: return [2 /*return*/];
155
157
  }
@@ -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
@@ -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 _a;
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.accessToken = param.accessToken;
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({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': "OpenAPI-Generator/7.0.1/typescript-axios" }) });
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.2.0/typescript-axios" }) });
39
107
  this.formDataCtor = param.formDataCtor;
40
108
  }
41
109
  /**
@@ -124,8 +124,10 @@ export * from './rbm-message-content-file';
124
124
  export * from './rbm-message-content-rich-card';
125
125
  export * from './rbm-message-content-text';
126
126
  export * from './rbm-message-media';
127
+ export * from './rbm-open-url-enum';
127
128
  export * from './rbm-standalone-card';
128
129
  export * from './rbm-suggestion-response';
130
+ export * from './rbm-web-view-enum';
129
131
  export * from './recording-available-callback';
130
132
  export * from './recording-complete-callback';
131
133
  export * from './recording-state-enum';
@@ -140,8 +140,10 @@ __exportStar(require("./rbm-message-content-file"), exports);
140
140
  __exportStar(require("./rbm-message-content-rich-card"), exports);
141
141
  __exportStar(require("./rbm-message-content-text"), exports);
142
142
  __exportStar(require("./rbm-message-media"), exports);
143
+ __exportStar(require("./rbm-open-url-enum"), exports);
143
144
  __exportStar(require("./rbm-standalone-card"), exports);
144
145
  __exportStar(require("./rbm-suggestion-response"), exports);
146
+ __exportStar(require("./rbm-web-view-enum"), exports);
145
147
  __exportStar(require("./recording-available-callback"), exports);
146
148
  __exportStar(require("./recording-complete-callback"), exports);
147
149
  __exportStar(require("./recording-state-enum"), exports);
@@ -10,6 +10,8 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { RbmActionTypeEnum } from './rbm-action-type-enum';
13
+ import type { RbmOpenUrlEnum } from './rbm-open-url-enum';
14
+ import type { RbmWebViewEnum } from './rbm-web-view-enum';
13
15
  export interface MultiChannelAction {
14
16
  'type': RbmActionTypeEnum;
15
17
  /**
@@ -56,4 +58,6 @@ export interface MultiChannelAction {
56
58
  * The URL to open in browser.
57
59
  */
58
60
  'url': string;
61
+ 'application'?: RbmOpenUrlEnum;
62
+ 'webviewViewMode'?: RbmWebViewEnum;
59
63
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Bandwidth
3
+ * Bandwidth\'s Communication APIs
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: letstalk@bandwidth.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView.
14
+ */
15
+ export declare const RbmOpenUrlEnum: {
16
+ readonly Browser: "BROWSER";
17
+ readonly Webview: "WEBVIEW";
18
+ };
19
+ export type RbmOpenUrlEnum = typeof RbmOpenUrlEnum[keyof typeof RbmOpenUrlEnum];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Bandwidth
6
+ * Bandwidth\'s Communication APIs
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: letstalk@bandwidth.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RbmOpenUrlEnum = void 0;
17
+ /**
18
+ * Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device\'s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView.
19
+ */
20
+ exports.RbmOpenUrlEnum = {
21
+ Browser: 'BROWSER',
22
+ Webview: 'WEBVIEW'
23
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Bandwidth
3
+ * Bandwidth\'s Communication APIs
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: letstalk@bandwidth.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen.
14
+ */
15
+ export declare const RbmWebViewEnum: {
16
+ readonly Full: "FULL";
17
+ readonly Half: "HALF";
18
+ readonly Tall: "TALL";
19
+ };
20
+ export type RbmWebViewEnum = typeof RbmWebViewEnum[keyof typeof RbmWebViewEnum];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Bandwidth
6
+ * Bandwidth\'s Communication APIs
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: letstalk@bandwidth.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RbmWebViewEnum = void 0;
17
+ /**
18
+ * Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen.
19
+ */
20
+ exports.RbmWebViewEnum = {
21
+ Full: 'FULL',
22
+ Half: 'HALF',
23
+ Tall: 'TALL'
24
+ };
@@ -46,4 +46,8 @@ export interface TfvStatus {
46
46
  * The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
47
47
  */
48
48
  'blockedReason'?: string;
49
+ /**
50
+ * The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
51
+ */
52
+ 'cvToken'?: string | null;
49
53
  }
@@ -69,4 +69,8 @@ export interface VerificationRequest {
69
69
  * Indicates whether the content is age-gated.
70
70
  */
71
71
  'ageGatedContent'?: boolean;
72
+ /**
73
+ * The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
74
+ */
75
+ 'cvToken'?: string | null;
72
76
  }
@@ -68,4 +68,8 @@ export interface VerificationUpdateRequest {
68
68
  * Indicates whether the content is age-gated.
69
69
  */
70
70
  'ageGatedContent'?: boolean;
71
+ /**
72
+ * The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
73
+ */
74
+ 'cvToken'?: string | null;
71
75
  }
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
 
@@ -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