bandwidth-sdk 8.1.3 → 8.1.5

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 (255) hide show
  1. package/.bandwidth/component.yaml +1 -0
  2. package/.github/workflows/deploy.yml +15 -11
  3. package/.github/workflows/test-pr.yml +3 -3
  4. package/.github/workflows/test-smoke.yml +13 -13
  5. package/.openapi-generator/VERSION +1 -1
  6. package/api/calls-api.ts +14 -17
  7. package/api/conferences-api.ts +31 -34
  8. package/api/endpoints-api.ts +14 -16
  9. package/api/media-api.ts +28 -29
  10. package/api/messages-api.ts +13 -14
  11. package/api/mfaapi.ts +7 -10
  12. package/api/multi-channel-api.ts +7 -8
  13. package/api/phone-number-lookup-api.ts +8 -10
  14. package/api/recordings-api.ts +37 -39
  15. package/api/statistics-api.ts +3 -3
  16. package/api/toll-free-verification-api.ts +23 -27
  17. package/api/transcriptions-api.ts +12 -12
  18. package/bandwidth.yml +161 -55
  19. package/common.ts +18 -4
  20. package/configuration.ts +1 -1
  21. package/coverage/clover.xml +948 -890
  22. package/coverage/coverage-final.json +14 -14
  23. package/coverage/lcov-report/index.html +19 -19
  24. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +25 -34
  25. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +46 -55
  26. package/coverage/lcov-report/node-sdk/api/endpoints-api.ts.html +25 -31
  27. package/coverage/lcov-report/node-sdk/api/index.html +69 -69
  28. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +38 -41
  29. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +21 -24
  30. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +16 -25
  31. package/coverage/lcov-report/node-sdk/api/multi-channel-api.ts.html +14 -17
  32. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +17 -23
  33. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +53 -59
  34. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +9 -9
  35. package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +38 -50
  36. package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +20 -20
  37. package/coverage/lcov-report/node-sdk/api.ts.html +1 -1
  38. package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
  39. package/coverage/lcov-report/node-sdk/common.ts.html +55 -13
  40. package/coverage/lcov-report/node-sdk/configuration.ts.html +2 -2
  41. package/coverage/lcov-report/node-sdk/index.html +15 -15
  42. package/coverage/lcov-report/node-sdk/models/business-entity-type-enum.ts.html +2 -2
  43. package/coverage/lcov-report/node-sdk/models/business-registration-type-enum.ts.html +2 -2
  44. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +1 -1
  45. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +1 -1
  46. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +1 -1
  47. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +1 -1
  48. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +1 -1
  49. package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
  50. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +1 -1
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Connect.ts.html +1 -1
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
  55. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Endpoint.ts.html +1 -1
  56. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
  57. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +1 -1
  58. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
  59. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
  60. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +1 -1
  61. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
  62. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
  63. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
  64. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
  65. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
  66. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
  67. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
  68. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
  69. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
  70. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
  71. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
  72. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +1 -1
  73. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +1 -1
  74. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
  75. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
  76. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
  77. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
  78. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
  79. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
  80. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +1 -1
  81. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
  82. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
  83. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +2 -2
  84. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +2 -2
  85. package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +2 -2
  86. package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +2 -2
  87. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +2 -2
  88. package/coverage/lcov-report/node-sdk/models/card-width-enum.ts.html +2 -2
  89. package/coverage/lcov-report/node-sdk/models/completed-lookup-status-enum.ts.html +2 -2
  90. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
  91. package/coverage/lcov-report/node-sdk/models/deactivation-event-enum.ts.html +2 -2
  92. package/coverage/lcov-report/node-sdk/models/device-status-enum.ts.html +2 -2
  93. package/coverage/lcov-report/node-sdk/models/endpoint-direction-enum.ts.html +2 -2
  94. package/coverage/lcov-report/node-sdk/models/endpoint-event-type-enum.ts.html +2 -2
  95. package/coverage/lcov-report/node-sdk/models/endpoint-status-enum.ts.html +2 -2
  96. package/coverage/lcov-report/node-sdk/models/endpoint-type-enum.ts.html +2 -2
  97. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
  98. package/coverage/lcov-report/node-sdk/models/in-progress-lookup-status-enum.ts.html +2 -2
  99. package/coverage/lcov-report/node-sdk/models/inbound-callback-type-enum.ts.html +2 -2
  100. package/coverage/lcov-report/node-sdk/models/index.html +1 -1
  101. package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
  102. package/coverage/lcov-report/node-sdk/models/latest-message-delivery-status-enum.ts.html +2 -2
  103. package/coverage/lcov-report/node-sdk/models/line-type-enum.ts.html +2 -2
  104. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
  105. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +2 -2
  106. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +2 -2
  107. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +2 -2
  108. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +2 -2
  109. package/coverage/lcov-report/node-sdk/models/multi-channel-message-channel-enum.ts.html +2 -2
  110. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +2 -2
  111. package/coverage/lcov-report/node-sdk/models/product-type-enum.ts.html +2 -2
  112. package/coverage/lcov-report/node-sdk/models/rbm-action-type-enum.ts.html +2 -2
  113. package/coverage/lcov-report/node-sdk/models/rbm-media-height-enum.ts.html +2 -2
  114. package/coverage/lcov-report/node-sdk/models/rbm-open-url-enum.ts.html +2 -2
  115. package/coverage/lcov-report/node-sdk/models/rbm-web-view-enum.ts.html +2 -2
  116. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +2 -2
  117. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +2 -2
  118. package/coverage/lcov-report/node-sdk/models/standalone-card-orientation-enum.ts.html +2 -2
  119. package/coverage/lcov-report/node-sdk/models/status-callback-type-enum.ts.html +7 -4
  120. package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +2 -2
  121. package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +2 -2
  122. package/coverage/lcov-report/node-sdk/models/thumbnail-alignment-enum.ts.html +2 -2
  123. package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +2 -2
  124. package/coverage/lcov.info +2413 -2353
  125. package/custom_templates/common.mustache +18 -4
  126. package/custom_templates/package.mustache +1 -1
  127. package/dist/api/calls-api.d.ts +5 -5
  128. package/dist/api/calls-api.js +13 -8
  129. package/dist/api/conferences-api.d.ts +9 -9
  130. package/dist/api/conferences-api.js +30 -21
  131. package/dist/api/endpoints-api.d.ts +5 -5
  132. package/dist/api/endpoints-api.js +13 -8
  133. package/dist/api/media-api.d.ts +20 -20
  134. package/dist/api/media-api.js +27 -23
  135. package/dist/api/messages-api.d.ts +10 -10
  136. package/dist/api/messages-api.js +12 -10
  137. package/dist/api/mfaapi.d.ts +3 -3
  138. package/dist/api/mfaapi.js +6 -3
  139. package/dist/api/multi-channel-api.d.ts +5 -5
  140. package/dist/api/multi-channel-api.js +6 -5
  141. package/dist/api/phone-number-lookup-api.d.ts +3 -3
  142. package/dist/api/phone-number-lookup-api.js +7 -4
  143. package/dist/api/recordings-api.d.ts +10 -10
  144. package/dist/api/recordings-api.js +36 -26
  145. package/dist/api/statistics-api.d.ts +1 -1
  146. package/dist/api/statistics-api.js +2 -1
  147. package/dist/api/toll-free-verification-api.d.ts +9 -9
  148. package/dist/api/toll-free-verification-api.js +22 -13
  149. package/dist/api/transcriptions-api.d.ts +3 -3
  150. package/dist/api/transcriptions-api.js +11 -8
  151. package/dist/common.d.ts +6 -0
  152. package/dist/common.js +18 -3
  153. package/dist/configuration.js +1 -1
  154. package/dist/models/answer-callback.d.ts +4 -0
  155. package/dist/models/business-entity-type-enum.js +1 -1
  156. package/dist/models/business-registration-type-enum.js +1 -1
  157. package/dist/models/call-direction-enum.js +1 -1
  158. package/dist/models/call-state-enum.js +1 -1
  159. package/dist/models/call-transcription-detected-language-enum.js +1 -1
  160. package/dist/models/call-transcription-track-enum.js +1 -1
  161. package/dist/models/callback-method-enum.js +1 -1
  162. package/dist/models/card-width-enum.js +1 -1
  163. package/dist/models/completed-lookup-status-enum.js +1 -1
  164. package/dist/models/conference-state-enum.js +1 -1
  165. package/dist/models/deactivation-event-enum.js +1 -1
  166. package/dist/models/device-status-enum.js +1 -1
  167. package/dist/models/disconnect-callback.d.ts +8 -0
  168. package/dist/models/endpoint-direction-enum.js +1 -1
  169. package/dist/models/endpoint-event-type-enum.js +1 -1
  170. package/dist/models/endpoint-status-enum.js +1 -1
  171. package/dist/models/endpoint-type-enum.js +1 -1
  172. package/dist/models/file-format-enum.js +1 -1
  173. package/dist/models/in-progress-lookup-status-enum.js +1 -1
  174. package/dist/models/inbound-callback-type-enum.js +1 -1
  175. package/dist/models/initiate-callback.d.ts +10 -0
  176. package/dist/models/latest-message-delivery-status-enum.js +1 -1
  177. package/dist/models/line-type-enum.js +1 -1
  178. package/dist/models/list-message-direction-enum.js +1 -1
  179. package/dist/models/machine-detection-mode-enum.js +1 -1
  180. package/dist/models/message-direction-enum.js +1 -1
  181. package/dist/models/message-status-enum.js +1 -1
  182. package/dist/models/message-type-enum.js +1 -1
  183. package/dist/models/multi-channel-message-channel-enum.js +1 -1
  184. package/dist/models/priority-enum.js +1 -1
  185. package/dist/models/product-type-enum.js +1 -1
  186. package/dist/models/rbm-action-type-enum.js +1 -1
  187. package/dist/models/rbm-media-height-enum.js +1 -1
  188. package/dist/models/rbm-open-url-enum.js +1 -1
  189. package/dist/models/rbm-web-view-enum.js +1 -1
  190. package/dist/models/recording-state-enum.js +1 -1
  191. package/dist/models/redirect-method-enum.js +1 -1
  192. package/dist/models/standalone-card-orientation-enum.js +1 -1
  193. package/dist/models/status-callback-type-enum.d.ts +2 -1
  194. package/dist/models/status-callback-type-enum.js +3 -2
  195. package/dist/models/tfv-callback-status-enum.js +1 -1
  196. package/dist/models/tfv-status-enum.js +1 -1
  197. package/dist/models/thumbnail-alignment-enum.js +1 -1
  198. package/dist/models/webhook-subscription-type-enum.js +1 -1
  199. package/docs/AnswerCallback.md +2 -0
  200. package/docs/DisconnectCallback.md +4 -0
  201. package/docs/InitiateCallback.md +4 -0
  202. package/docs/MediaApi.md +8 -8
  203. package/docs/MessagesApi.md +4 -4
  204. package/docs/MultiChannelApi.md +2 -2
  205. package/docs/StatusCallbackTypeEnum.md +3 -1
  206. package/models/answer-callback.ts +4 -0
  207. package/models/business-entity-type-enum.ts +1 -1
  208. package/models/business-registration-type-enum.ts +1 -1
  209. package/models/call-direction-enum.ts +1 -1
  210. package/models/call-state-enum.ts +1 -1
  211. package/models/call-transcription-detected-language-enum.ts +1 -1
  212. package/models/call-transcription-track-enum.ts +1 -1
  213. package/models/callback-method-enum.ts +1 -1
  214. package/models/card-width-enum.ts +1 -1
  215. package/models/completed-lookup-status-enum.ts +1 -1
  216. package/models/conference-state-enum.ts +1 -1
  217. package/models/deactivation-event-enum.ts +1 -1
  218. package/models/device-status-enum.ts +1 -1
  219. package/models/disconnect-callback.ts +8 -0
  220. package/models/endpoint-direction-enum.ts +1 -1
  221. package/models/endpoint-event-type-enum.ts +1 -1
  222. package/models/endpoint-status-enum.ts +1 -1
  223. package/models/endpoint-type-enum.ts +1 -1
  224. package/models/file-format-enum.ts +1 -1
  225. package/models/in-progress-lookup-status-enum.ts +1 -1
  226. package/models/inbound-callback-type-enum.ts +1 -1
  227. package/models/initiate-callback.ts +8 -0
  228. package/models/latest-message-delivery-status-enum.ts +1 -1
  229. package/models/line-type-enum.ts +1 -1
  230. package/models/list-message-direction-enum.ts +1 -1
  231. package/models/machine-detection-mode-enum.ts +1 -1
  232. package/models/message-direction-enum.ts +1 -1
  233. package/models/message-status-enum.ts +1 -1
  234. package/models/message-type-enum.ts +1 -1
  235. package/models/multi-channel-message-channel-enum.ts +1 -1
  236. package/models/priority-enum.ts +1 -1
  237. package/models/product-type-enum.ts +1 -1
  238. package/models/rbm-action-type-enum.ts +1 -1
  239. package/models/rbm-media-height-enum.ts +1 -1
  240. package/models/rbm-open-url-enum.ts +1 -1
  241. package/models/rbm-web-view-enum.ts +1 -1
  242. package/models/recording-state-enum.ts +1 -1
  243. package/models/redirect-method-enum.ts +1 -1
  244. package/models/standalone-card-orientation-enum.ts +1 -1
  245. package/models/status-callback-type-enum.ts +3 -2
  246. package/models/tfv-callback-status-enum.ts +1 -1
  247. package/models/tfv-status-enum.ts +1 -1
  248. package/models/thumbnail-alignment-enum.ts +1 -1
  249. package/models/webhook-subscription-type-enum.ts +1 -1
  250. package/openapitools.json +1 -1
  251. package/package.json +2 -2
  252. package/tests/unit/models/answer-callback.test.ts +2 -0
  253. package/tests/unit/models/disconnect-callback.test.ts +4 -0
  254. package/tests/unit/models/initiate-callback.test.ts +4 -0
  255. package/tests/unit/models/status-callback-type-enum.test.ts +2 -0
package/api/media-api.ts CHANGED
@@ -18,7 +18,7 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
18
  import globalAxios from 'axios';
19
19
  // Some imports not used depending on template conditions
20
20
  // @ts-ignore
21
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
@@ -33,7 +33,7 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
33
33
  /**
34
34
  * Deletes a media file from Bandwidth API server. Make sure you don\'t have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
35
35
  * @summary Delete Media
36
- * @param {string} accountId Your Bandwidth Account ID.
36
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
37
37
  * @param {string} mediaId Media ID to retrieve.
38
38
  * @param {*} [options] Override http request option.
39
39
  * @throws {RequiredError}
@@ -44,8 +44,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
44
44
  // verify required parameter 'mediaId' is not null or undefined
45
45
  assertParamExists('deleteMedia', 'mediaId', mediaId)
46
46
  const localVarPath = `/users/{accountId}/media/{mediaId}`
47
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
48
- .replace(`{${"mediaId"}}`, encodeURIComponent(String(mediaId)));
47
+ .replace('{accountId}', encodeURIComponent(String(accountId)))
48
+ .replace('{mediaId}', encodeURIComponent(String(mediaId)));
49
49
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
50
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
51
51
  let baseOptions;
@@ -65,8 +65,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
65
65
  // oauth required
66
66
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
67
67
 
68
+ localVarHeaderParameter['Accept'] = 'application/json';
68
69
 
69
-
70
70
  setSearchParams(localVarUrlObj, localVarQueryParameter);
71
71
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
72
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -79,7 +79,7 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
79
79
  /**
80
80
  * Downloads a media file you previously uploaded.
81
81
  * @summary Get Media
82
- * @param {string} accountId Your Bandwidth Account ID.
82
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
83
83
  * @param {string} mediaId Media ID to retrieve.
84
84
  * @param {*} [options] Override http request option.
85
85
  * @throws {RequiredError}
@@ -90,8 +90,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
90
90
  // verify required parameter 'mediaId' is not null or undefined
91
91
  assertParamExists('getMedia', 'mediaId', mediaId)
92
92
  const localVarPath = `/users/{accountId}/media/{mediaId}`
93
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
94
- .replace(`{${"mediaId"}}`, encodeURIComponent(String(mediaId)));
93
+ .replace('{accountId}', encodeURIComponent(String(accountId)))
94
+ .replace('{mediaId}', encodeURIComponent(String(mediaId)));
95
95
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
96
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
97
  let baseOptions;
@@ -111,8 +111,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
111
111
  // oauth required
112
112
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
113
113
 
114
+ localVarHeaderParameter['Accept'] = 'application/octet-stream,application/json';
114
115
 
115
-
116
116
  setSearchParams(localVarUrlObj, localVarQueryParameter);
117
117
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
118
118
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -125,7 +125,7 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
125
125
  /**
126
126
  * Gets a list of your media files. No query parameters are supported.
127
127
  * @summary List Media
128
- * @param {string} accountId Your Bandwidth Account ID.
128
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
129
129
  * @param {string} [continuationToken] Continuation token used to retrieve subsequent media.
130
130
  * @param {*} [options] Override http request option.
131
131
  * @throws {RequiredError}
@@ -134,7 +134,7 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
134
134
  // verify required parameter 'accountId' is not null or undefined
135
135
  assertParamExists('listMedia', 'accountId', accountId)
136
136
  const localVarPath = `/users/{accountId}/media`
137
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
137
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
138
138
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
139
139
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
140
140
  let baseOptions;
@@ -154,8 +154,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
154
154
  // oauth required
155
155
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
156
156
 
157
+ localVarHeaderParameter['Accept'] = 'application/json';
157
158
 
158
-
159
159
  if (continuationToken != null) {
160
160
  localVarHeaderParameter['Continuation-Token'] = String(continuationToken);
161
161
  }
@@ -171,7 +171,7 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
171
171
  /**
172
172
  * Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
173
173
  * @summary Upload Media
174
- * @param {string} accountId Your Bandwidth Account ID.
174
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
175
175
  * @param {string} mediaId Media ID to retrieve.
176
176
  * @param {File} body
177
177
  * @param {string} [contentType] The media type of the entity-body.
@@ -187,8 +187,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
187
187
  // verify required parameter 'body' is not null or undefined
188
188
  assertParamExists('uploadMedia', 'body', body)
189
189
  const localVarPath = `/users/{accountId}/media/{mediaId}`
190
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
191
- .replace(`{${"mediaId"}}`, encodeURIComponent(String(mediaId)));
190
+ .replace('{accountId}', encodeURIComponent(String(accountId)))
191
+ .replace('{mediaId}', encodeURIComponent(String(mediaId)));
192
192
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
193
193
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
194
194
  let baseOptions;
@@ -208,9 +208,8 @@ export const MediaApiAxiosParamCreator = function (configuration?: Configuration
208
208
  // oauth required
209
209
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
210
210
 
211
-
212
-
213
211
  localVarHeaderParameter['Content-Type'] = 'application/json';
212
+ localVarHeaderParameter['Accept'] = 'application/json';
214
213
 
215
214
  if (contentType != null) {
216
215
  localVarHeaderParameter['Content-Type'] = String(contentType);
@@ -240,7 +239,7 @@ export const MediaApiFp = function(configuration?: Configuration) {
240
239
  /**
241
240
  * Deletes a media file from Bandwidth API server. Make sure you don\'t have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
242
241
  * @summary Delete Media
243
- * @param {string} accountId Your Bandwidth Account ID.
242
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
244
243
  * @param {string} mediaId Media ID to retrieve.
245
244
  * @param {*} [options] Override http request option.
246
245
  * @throws {RequiredError}
@@ -254,7 +253,7 @@ export const MediaApiFp = function(configuration?: Configuration) {
254
253
  /**
255
254
  * Downloads a media file you previously uploaded.
256
255
  * @summary Get Media
257
- * @param {string} accountId Your Bandwidth Account ID.
256
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
258
257
  * @param {string} mediaId Media ID to retrieve.
259
258
  * @param {*} [options] Override http request option.
260
259
  * @throws {RequiredError}
@@ -268,7 +267,7 @@ export const MediaApiFp = function(configuration?: Configuration) {
268
267
  /**
269
268
  * Gets a list of your media files. No query parameters are supported.
270
269
  * @summary List Media
271
- * @param {string} accountId Your Bandwidth Account ID.
270
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
272
271
  * @param {string} [continuationToken] Continuation token used to retrieve subsequent media.
273
272
  * @param {*} [options] Override http request option.
274
273
  * @throws {RequiredError}
@@ -282,7 +281,7 @@ export const MediaApiFp = function(configuration?: Configuration) {
282
281
  /**
283
282
  * Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
284
283
  * @summary Upload Media
285
- * @param {string} accountId Your Bandwidth Account ID.
284
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
286
285
  * @param {string} mediaId Media ID to retrieve.
287
286
  * @param {File} body
288
287
  * @param {string} [contentType] The media type of the entity-body.
@@ -308,7 +307,7 @@ export const MediaApiFactory = function (configuration?: Configuration, basePath
308
307
  /**
309
308
  * Deletes a media file from Bandwidth API server. Make sure you don\'t have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
310
309
  * @summary Delete Media
311
- * @param {string} accountId Your Bandwidth Account ID.
310
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
312
311
  * @param {string} mediaId Media ID to retrieve.
313
312
  * @param {*} [options] Override http request option.
314
313
  * @throws {RequiredError}
@@ -319,7 +318,7 @@ export const MediaApiFactory = function (configuration?: Configuration, basePath
319
318
  /**
320
319
  * Downloads a media file you previously uploaded.
321
320
  * @summary Get Media
322
- * @param {string} accountId Your Bandwidth Account ID.
321
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
323
322
  * @param {string} mediaId Media ID to retrieve.
324
323
  * @param {*} [options] Override http request option.
325
324
  * @throws {RequiredError}
@@ -330,7 +329,7 @@ export const MediaApiFactory = function (configuration?: Configuration, basePath
330
329
  /**
331
330
  * Gets a list of your media files. No query parameters are supported.
332
331
  * @summary List Media
333
- * @param {string} accountId Your Bandwidth Account ID.
332
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
334
333
  * @param {string} [continuationToken] Continuation token used to retrieve subsequent media.
335
334
  * @param {*} [options] Override http request option.
336
335
  * @throws {RequiredError}
@@ -341,7 +340,7 @@ export const MediaApiFactory = function (configuration?: Configuration, basePath
341
340
  /**
342
341
  * Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
343
342
  * @summary Upload Media
344
- * @param {string} accountId Your Bandwidth Account ID.
343
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
345
344
  * @param {string} mediaId Media ID to retrieve.
346
345
  * @param {File} body
347
346
  * @param {string} [contentType] The media type of the entity-body.
@@ -362,7 +361,7 @@ export class MediaApi extends BaseAPI {
362
361
  /**
363
362
  * Deletes a media file from Bandwidth API server. Make sure you don\'t have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
364
363
  * @summary Delete Media
365
- * @param {string} accountId Your Bandwidth Account ID.
364
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
366
365
  * @param {string} mediaId Media ID to retrieve.
367
366
  * @param {*} [options] Override http request option.
368
367
  * @throws {RequiredError}
@@ -374,7 +373,7 @@ export class MediaApi extends BaseAPI {
374
373
  /**
375
374
  * Downloads a media file you previously uploaded.
376
375
  * @summary Get Media
377
- * @param {string} accountId Your Bandwidth Account ID.
376
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
378
377
  * @param {string} mediaId Media ID to retrieve.
379
378
  * @param {*} [options] Override http request option.
380
379
  * @throws {RequiredError}
@@ -386,7 +385,7 @@ export class MediaApi extends BaseAPI {
386
385
  /**
387
386
  * Gets a list of your media files. No query parameters are supported.
388
387
  * @summary List Media
389
- * @param {string} accountId Your Bandwidth Account ID.
388
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
390
389
  * @param {string} [continuationToken] Continuation token used to retrieve subsequent media.
391
390
  * @param {*} [options] Override http request option.
392
391
  * @throws {RequiredError}
@@ -398,7 +397,7 @@ export class MediaApi extends BaseAPI {
398
397
  /**
399
398
  * Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
400
399
  * @summary Upload Media
401
- * @param {string} accountId Your Bandwidth Account ID.
400
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
402
401
  * @param {string} mediaId Media ID to retrieve.
403
402
  * @param {File} body
404
403
  * @param {string} [contentType] The media type of the entity-body.
@@ -18,7 +18,7 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
18
  import globalAxios from 'axios';
19
19
  // Some imports not used depending on template conditions
20
20
  // @ts-ignore
21
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
@@ -47,7 +47,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
47
47
  /**
48
48
  * Endpoint for sending text messages and picture messages using V2 messaging.
49
49
  * @summary Create Message
50
- * @param {string} accountId Your Bandwidth Account ID.
50
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
51
51
  * @param {MessageRequest} messageRequest
52
52
  * @param {*} [options] Override http request option.
53
53
  * @throws {RequiredError}
@@ -58,7 +58,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
58
58
  // verify required parameter 'messageRequest' is not null or undefined
59
59
  assertParamExists('createMessage', 'messageRequest', messageRequest)
60
60
  const localVarPath = `/users/{accountId}/messages`
61
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
61
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
62
62
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
63
63
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
64
64
  let baseOptions;
@@ -78,9 +78,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
78
78
  // oauth required
79
79
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
80
80
 
81
-
82
-
83
81
  localVarHeaderParameter['Content-Type'] = 'application/json';
82
+ localVarHeaderParameter['Accept'] = 'application/json';
84
83
 
85
84
  setSearchParams(localVarUrlObj, localVarQueryParameter);
86
85
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -95,7 +94,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
95
94
  /**
96
95
  * Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
97
96
  * @summary List Messages
98
- * @param {string} accountId Your Bandwidth Account ID.
97
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
99
98
  * @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
100
99
  * @param {string} [sourceTn] The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
101
100
  * @param {string} [destinationTn] The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
@@ -130,7 +129,7 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
130
129
  // verify required parameter 'accountId' is not null or undefined
131
130
  assertParamExists('listMessages', 'accountId', accountId)
132
131
  const localVarPath = `/users/{accountId}/messages`
133
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
132
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
134
133
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
135
134
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
136
135
  let baseOptions;
@@ -258,8 +257,8 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
258
257
  localVarQueryParameter['limitTotalCount'] = limitTotalCount;
259
258
  }
260
259
 
260
+ localVarHeaderParameter['Accept'] = 'application/json';
261
261
 
262
-
263
262
  setSearchParams(localVarUrlObj, localVarQueryParameter);
264
263
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
265
264
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -281,7 +280,7 @@ export const MessagesApiFp = function(configuration?: Configuration) {
281
280
  /**
282
281
  * Endpoint for sending text messages and picture messages using V2 messaging.
283
282
  * @summary Create Message
284
- * @param {string} accountId Your Bandwidth Account ID.
283
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
285
284
  * @param {MessageRequest} messageRequest
286
285
  * @param {*} [options] Override http request option.
287
286
  * @throws {RequiredError}
@@ -295,7 +294,7 @@ export const MessagesApiFp = function(configuration?: Configuration) {
295
294
  /**
296
295
  * Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
297
296
  * @summary List Messages
298
- * @param {string} accountId Your Bandwidth Account ID.
297
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
299
298
  * @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
300
299
  * @param {string} [sourceTn] The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
301
300
  * @param {string} [destinationTn] The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
@@ -344,7 +343,7 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
344
343
  /**
345
344
  * Endpoint for sending text messages and picture messages using V2 messaging.
346
345
  * @summary Create Message
347
- * @param {string} accountId Your Bandwidth Account ID.
346
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
348
347
  * @param {MessageRequest} messageRequest
349
348
  * @param {*} [options] Override http request option.
350
349
  * @throws {RequiredError}
@@ -355,7 +354,7 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
355
354
  /**
356
355
  * Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
357
356
  * @summary List Messages
358
- * @param {string} accountId Your Bandwidth Account ID.
357
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
359
358
  * @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
360
359
  * @param {string} [sourceTn] The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
361
360
  * @param {string} [destinationTn] The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
@@ -399,7 +398,7 @@ export class MessagesApi extends BaseAPI {
399
398
  /**
400
399
  * Endpoint for sending text messages and picture messages using V2 messaging.
401
400
  * @summary Create Message
402
- * @param {string} accountId Your Bandwidth Account ID.
401
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
403
402
  * @param {MessageRequest} messageRequest
404
403
  * @param {*} [options] Override http request option.
405
404
  * @throws {RequiredError}
@@ -411,7 +410,7 @@ export class MessagesApi extends BaseAPI {
411
410
  /**
412
411
  * Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.
413
412
  * @summary List Messages
414
- * @param {string} accountId Your Bandwidth Account ID.
413
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
415
414
  * @param {string} [messageId] The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter.
416
415
  * @param {string} [sourceTn] The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
417
416
  * @param {string} [destinationTn] The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. \'%2B1919\').
package/api/mfaapi.ts CHANGED
@@ -18,7 +18,7 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
18
  import globalAxios from 'axios';
19
19
  // Some imports not used depending on template conditions
20
20
  // @ts-ignore
21
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
@@ -56,7 +56,7 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
56
56
  // verify required parameter 'codeRequest' is not null or undefined
57
57
  assertParamExists('generateMessagingCode', 'codeRequest', codeRequest)
58
58
  const localVarPath = `/accounts/{accountId}/code/messaging`
59
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
59
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
60
60
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
61
61
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
62
62
  let baseOptions;
@@ -76,9 +76,8 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
76
76
  // oauth required
77
77
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
78
78
 
79
-
80
-
81
79
  localVarHeaderParameter['Content-Type'] = 'application/json';
80
+ localVarHeaderParameter['Accept'] = 'application/json';
82
81
 
83
82
  setSearchParams(localVarUrlObj, localVarQueryParameter);
84
83
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -104,7 +103,7 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
104
103
  // verify required parameter 'codeRequest' is not null or undefined
105
104
  assertParamExists('generateVoiceCode', 'codeRequest', codeRequest)
106
105
  const localVarPath = `/accounts/{accountId}/code/voice`
107
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
106
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
108
107
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
108
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
110
109
  let baseOptions;
@@ -124,9 +123,8 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
124
123
  // oauth required
125
124
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
126
125
 
127
-
128
-
129
126
  localVarHeaderParameter['Content-Type'] = 'application/json';
127
+ localVarHeaderParameter['Accept'] = 'application/json';
130
128
 
131
129
  setSearchParams(localVarUrlObj, localVarQueryParameter);
132
130
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -152,7 +150,7 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
152
150
  // verify required parameter 'verifyCodeRequest' is not null or undefined
153
151
  assertParamExists('verifyCode', 'verifyCodeRequest', verifyCodeRequest)
154
152
  const localVarPath = `/accounts/{accountId}/code/verify`
155
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
153
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
156
154
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
157
155
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
158
156
  let baseOptions;
@@ -172,9 +170,8 @@ export const MFAApiAxiosParamCreator = function (configuration?: Configuration)
172
170
  // oauth required
173
171
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
174
172
 
175
-
176
-
177
173
  localVarHeaderParameter['Content-Type'] = 'application/json';
174
+ localVarHeaderParameter['Accept'] = 'application/json';
178
175
 
179
176
  setSearchParams(localVarUrlObj, localVarQueryParameter);
180
177
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -18,7 +18,7 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
18
  import globalAxios from 'axios';
19
19
  // Some imports not used depending on template conditions
20
20
  // @ts-ignore
21
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
@@ -35,7 +35,7 @@ export const MultiChannelApiAxiosParamCreator = function (configuration?: Config
35
35
  /**
36
36
  * Endpoint for sending Multi-Channel messages.
37
37
  * @summary Create Multi-Channel Message
38
- * @param {string} accountId Your Bandwidth Account ID.
38
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
39
39
  * @param {MultiChannelMessageRequest} multiChannelMessageRequest
40
40
  * @param {*} [options] Override http request option.
41
41
  * @throws {RequiredError}
@@ -46,7 +46,7 @@ export const MultiChannelApiAxiosParamCreator = function (configuration?: Config
46
46
  // verify required parameter 'multiChannelMessageRequest' is not null or undefined
47
47
  assertParamExists('createMultiChannelMessage', 'multiChannelMessageRequest', multiChannelMessageRequest)
48
48
  const localVarPath = `/users/{accountId}/messages/multiChannel`
49
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
49
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
50
50
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
51
51
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
52
52
  let baseOptions;
@@ -66,9 +66,8 @@ export const MultiChannelApiAxiosParamCreator = function (configuration?: Config
66
66
  // oauth required
67
67
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
68
68
 
69
-
70
-
71
69
  localVarHeaderParameter['Content-Type'] = 'application/json';
70
+ localVarHeaderParameter['Accept'] = 'application/json';
72
71
 
73
72
  setSearchParams(localVarUrlObj, localVarQueryParameter);
74
73
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -92,7 +91,7 @@ export const MultiChannelApiFp = function(configuration?: Configuration) {
92
91
  /**
93
92
  * Endpoint for sending Multi-Channel messages.
94
93
  * @summary Create Multi-Channel Message
95
- * @param {string} accountId Your Bandwidth Account ID.
94
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
96
95
  * @param {MultiChannelMessageRequest} multiChannelMessageRequest
97
96
  * @param {*} [options] Override http request option.
98
97
  * @throws {RequiredError}
@@ -115,7 +114,7 @@ export const MultiChannelApiFactory = function (configuration?: Configuration, b
115
114
  /**
116
115
  * Endpoint for sending Multi-Channel messages.
117
116
  * @summary Create Multi-Channel Message
118
- * @param {string} accountId Your Bandwidth Account ID.
117
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
119
118
  * @param {MultiChannelMessageRequest} multiChannelMessageRequest
120
119
  * @param {*} [options] Override http request option.
121
120
  * @throws {RequiredError}
@@ -133,7 +132,7 @@ export class MultiChannelApi extends BaseAPI {
133
132
  /**
134
133
  * Endpoint for sending Multi-Channel messages.
135
134
  * @summary Create Multi-Channel Message
136
- * @param {string} accountId Your Bandwidth Account ID.
135
+ * @param {string} accountId This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
137
136
  * @param {MultiChannelMessageRequest} multiChannelMessageRequest
138
137
  * @param {*} [options] Override http request option.
139
138
  * @throws {RequiredError}
@@ -18,7 +18,7 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
18
  import globalAxios from 'axios';
19
19
  // Some imports not used depending on template conditions
20
20
  // @ts-ignore
21
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
@@ -52,7 +52,7 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
52
52
  // verify required parameter 'asyncLookupRequest' is not null or undefined
53
53
  assertParamExists('createAsyncBulkLookup', 'asyncLookupRequest', asyncLookupRequest)
54
54
  const localVarPath = `/accounts/{accountId}/phoneNumberLookup/bulk`
55
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
55
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
56
56
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
57
57
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58
58
  let baseOptions;
@@ -72,9 +72,8 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
72
72
  // oauth required
73
73
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
74
74
 
75
-
76
-
77
75
  localVarHeaderParameter['Content-Type'] = 'application/json';
76
+ localVarHeaderParameter['Accept'] = 'application/json';
78
77
 
79
78
  setSearchParams(localVarUrlObj, localVarQueryParameter);
80
79
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -100,7 +99,7 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
100
99
  // verify required parameter 'syncLookupRequest' is not null or undefined
101
100
  assertParamExists('createSyncLookup', 'syncLookupRequest', syncLookupRequest)
102
101
  const localVarPath = `/accounts/{accountId}/phoneNumberLookup`
103
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
102
+ .replace('{accountId}', encodeURIComponent(String(accountId)));
104
103
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
104
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
105
  let baseOptions;
@@ -120,9 +119,8 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
120
119
  // oauth required
121
120
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
122
121
 
123
-
124
-
125
122
  localVarHeaderParameter['Content-Type'] = 'application/json';
123
+ localVarHeaderParameter['Accept'] = 'application/json';
126
124
 
127
125
  setSearchParams(localVarUrlObj, localVarQueryParameter);
128
126
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -148,8 +146,8 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
148
146
  // verify required parameter 'requestId' is not null or undefined
149
147
  assertParamExists('getAsyncBulkLookup', 'requestId', requestId)
150
148
  const localVarPath = `/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}`
151
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
152
- .replace(`{${"requestId"}}`, encodeURIComponent(String(requestId)));
149
+ .replace('{accountId}', encodeURIComponent(String(accountId)))
150
+ .replace('{requestId}', encodeURIComponent(String(requestId)));
153
151
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
152
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
153
  let baseOptions;
@@ -169,8 +167,8 @@ export const PhoneNumberLookupApiAxiosParamCreator = function (configuration?: C
169
167
  // oauth required
170
168
  await setOAuthToObject(localVarHeaderParameter, "OAuth2", [], configuration)
171
169
 
170
+ localVarHeaderParameter['Accept'] = 'application/json';
172
171
 
173
-
174
172
  setSearchParams(localVarUrlObj, localVarQueryParameter);
175
173
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
176
174
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};