bandwidth-sdk 8.0.0 → 8.1.1

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 (318) hide show
  1. package/.github/workflows/deploy.yml +1 -1
  2. package/.github/workflows/test-pr.yml +1 -1
  3. package/.github/workflows/test-smoke.yml +1 -1
  4. package/.openapi-generator/FILES +48 -2
  5. package/README.md +28 -1
  6. package/api/endpoints-api.ts +519 -0
  7. package/api.ts +1 -0
  8. package/bandwidth.yml +944 -19
  9. package/base.ts +30 -0
  10. package/configuration.ts +1 -1
  11. package/coverage/clover.xml +815 -611
  12. package/coverage/coverage-final.json +95 -87
  13. package/coverage/lcov-report/index.html +38 -38
  14. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +14 -14
  15. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +18 -18
  16. package/coverage/lcov-report/node-sdk/api/endpoints-api.ts.html +1642 -0
  17. package/coverage/lcov-report/node-sdk/api/index.html +24 -9
  18. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +13 -13
  19. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +11 -11
  20. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +12 -12
  21. package/coverage/lcov-report/node-sdk/api/multi-channel-api.ts.html +10 -10
  22. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +12 -12
  23. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +19 -19
  24. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +10 -10
  25. package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +18 -18
  26. package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +12 -12
  27. package/coverage/lcov-report/node-sdk/api.ts.html +18 -15
  28. package/coverage/lcov-report/node-sdk/base.ts.html +104 -14
  29. package/coverage/lcov-report/node-sdk/common.ts.html +39 -39
  30. package/coverage/lcov-report/node-sdk/configuration.ts.html +26 -26
  31. package/coverage/lcov-report/node-sdk/index.html +7 -7
  32. package/coverage/lcov-report/node-sdk/models/business-entity-type-enum.ts.html +2 -2
  33. package/coverage/lcov-report/node-sdk/models/business-registration-type-enum.ts.html +2 -2
  34. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +4 -4
  35. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +23 -23
  36. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +4 -4
  37. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +8 -8
  38. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +13 -13
  39. package/coverage/lcov-report/node-sdk/models/bxml/index.html +15 -15
  40. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +3 -3
  41. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +4 -4
  42. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +4 -4
  43. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Connect.ts.html +184 -0
  44. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +4 -4
  45. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Endpoint.ts.html +142 -0
  46. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +4 -4
  47. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +7 -7
  48. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +4 -4
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +4 -4
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +4 -4
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +4 -4
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +4 -4
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +4 -4
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +4 -4
  55. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +4 -4
  56. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +4 -4
  57. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +4 -4
  58. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +4 -4
  59. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +6 -6
  60. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +4 -4
  61. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +4 -4
  62. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +5 -5
  63. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +5 -5
  64. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +4 -4
  65. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +4 -4
  66. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +4 -4
  67. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +4 -4
  68. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +4 -4
  69. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +4 -4
  70. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +5 -5
  71. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +38 -8
  72. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +39 -33
  73. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +2 -2
  74. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +2 -2
  75. package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +2 -2
  76. package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +2 -2
  77. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +2 -2
  78. package/coverage/lcov-report/node-sdk/models/card-width-enum.ts.html +2 -2
  79. package/coverage/lcov-report/node-sdk/models/completed-lookup-status-enum.ts.html +2 -2
  80. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
  81. package/coverage/lcov-report/node-sdk/models/deactivation-event-enum.ts.html +2 -2
  82. package/coverage/lcov-report/node-sdk/models/device-status-enum.ts.html +163 -0
  83. package/coverage/lcov-report/node-sdk/models/endpoint-direction-enum.ts.html +166 -0
  84. package/coverage/lcov-report/node-sdk/models/endpoint-event-type-enum.ts.html +163 -0
  85. package/coverage/lcov-report/node-sdk/models/endpoint-status-enum.ts.html +163 -0
  86. package/coverage/lcov-report/node-sdk/models/endpoint-type-enum.ts.html +160 -0
  87. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
  88. package/coverage/lcov-report/node-sdk/models/in-progress-lookup-status-enum.ts.html +2 -2
  89. package/coverage/lcov-report/node-sdk/models/inbound-callback-type-enum.ts.html +3 -3
  90. package/coverage/lcov-report/node-sdk/models/index.html +80 -5
  91. package/coverage/lcov-report/node-sdk/models/index.ts.html +247 -181
  92. package/coverage/lcov-report/node-sdk/models/latest-message-delivery-status-enum.ts.html +2 -2
  93. package/coverage/lcov-report/node-sdk/models/line-type-enum.ts.html +2 -2
  94. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
  95. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +2 -2
  96. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +2 -2
  97. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +2 -2
  98. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +2 -2
  99. package/coverage/lcov-report/node-sdk/models/multi-channel-message-channel-enum.ts.html +2 -2
  100. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +2 -2
  101. package/coverage/lcov-report/node-sdk/models/product-type-enum.ts.html +2 -2
  102. package/coverage/lcov-report/node-sdk/models/rbm-action-type-enum.ts.html +2 -2
  103. package/coverage/lcov-report/node-sdk/models/rbm-media-height-enum.ts.html +2 -2
  104. package/coverage/lcov-report/node-sdk/models/rbm-open-url-enum.ts.html +3 -3
  105. package/coverage/lcov-report/node-sdk/models/rbm-web-view-enum.ts.html +3 -3
  106. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +2 -2
  107. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +2 -2
  108. package/coverage/lcov-report/node-sdk/models/standalone-card-orientation-enum.ts.html +2 -2
  109. package/coverage/lcov-report/node-sdk/models/status-callback-type-enum.ts.html +2 -2
  110. package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +2 -2
  111. package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +2 -2
  112. package/coverage/lcov-report/node-sdk/models/thumbnail-alignment-enum.ts.html +2 -2
  113. package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +2 -2
  114. package/coverage/lcov.info +1234 -761
  115. package/custom_templates/modelAllOf.mustache +14 -0
  116. package/dist/api/endpoints-api.d.ts +236 -0
  117. package/dist/api/endpoints-api.js +666 -0
  118. package/dist/api.d.ts +1 -0
  119. package/dist/api.js +1 -0
  120. package/dist/base.js +30 -0
  121. package/dist/configuration.js +1 -1
  122. package/dist/models/brtc-error-response.d.ts +18 -0
  123. package/dist/models/brtc-error-source.d.ts +29 -0
  124. package/dist/models/brtc-error-source.js +15 -0
  125. package/dist/models/brtc-error.d.ts +31 -0
  126. package/dist/models/brtc-error.js +15 -0
  127. package/dist/models/brtc-link.d.ts +25 -0
  128. package/dist/models/brtc-link.js +15 -0
  129. package/dist/models/bxml/verbs/Connect.d.ts +25 -0
  130. package/dist/models/bxml/verbs/Connect.js +45 -0
  131. package/dist/models/bxml/verbs/Endpoint.d.ts +15 -0
  132. package/dist/models/bxml/verbs/Endpoint.js +37 -0
  133. package/dist/models/bxml/verbs/index.d.ts +2 -0
  134. package/dist/models/bxml/verbs/index.js +2 -0
  135. package/dist/models/create-call.d.ts +2 -2
  136. package/dist/models/create-endpoint-request-base.d.ts +29 -0
  137. package/dist/models/create-endpoint-request-base.js +15 -0
  138. package/dist/models/create-endpoint-response-data.d.ts +42 -0
  139. package/dist/models/create-endpoint-response-data.js +15 -0
  140. package/dist/models/create-endpoint-response.d.ts +19 -0
  141. package/dist/models/create-endpoint-response.js +15 -0
  142. package/dist/models/create-web-rtc-connection-request.d.ts +33 -0
  143. package/dist/models/create-web-rtc-connection-request.js +15 -0
  144. package/dist/models/device-status-enum.d.ts +16 -0
  145. package/dist/models/device-status-enum.js +20 -0
  146. package/dist/models/device.d.ts +27 -0
  147. package/dist/models/device.js +15 -0
  148. package/dist/models/endpoint-direction-enum.d.ts +17 -0
  149. package/dist/models/endpoint-direction-enum.js +21 -0
  150. package/dist/models/endpoint-event-type-enum.d.ts +16 -0
  151. package/dist/models/endpoint-event-type-enum.js +20 -0
  152. package/dist/models/endpoint-event.d.ts +45 -0
  153. package/dist/models/endpoint-event.js +15 -0
  154. package/dist/models/endpoint-response.d.ts +19 -0
  155. package/dist/models/endpoint-response.js +15 -0
  156. package/dist/models/endpoint-status-enum.d.ts +16 -0
  157. package/dist/models/endpoint-status-enum.js +20 -0
  158. package/dist/models/endpoint-type-enum.d.ts +15 -0
  159. package/dist/models/endpoint-type-enum.js +19 -0
  160. package/dist/models/endpoint.d.ts +38 -0
  161. package/dist/models/endpoint.js +15 -0
  162. package/dist/models/endpoints.d.ts +33 -0
  163. package/dist/models/endpoints.js +15 -0
  164. package/dist/models/inbound-callback-message.d.ts +48 -2
  165. package/dist/models/inbound-callback-type-enum.d.ts +1 -1
  166. package/dist/models/inbound-callback-type-enum.js +1 -1
  167. package/dist/models/inbound-callback.d.ts +2 -2
  168. package/dist/models/index.d.ts +23 -1
  169. package/dist/models/index.js +23 -1
  170. package/dist/models/list-endpoints-response.d.ts +21 -0
  171. package/dist/models/list-endpoints-response.js +15 -0
  172. package/dist/models/lookup-result.d.ts +1 -1
  173. package/dist/models/machine-detection-configuration.d.ts +1 -1
  174. package/dist/models/message-request.d.ts +1 -1
  175. package/dist/models/multi-channel-action-calendar-event.d.ts +28 -2
  176. package/dist/models/multi-channel-channel-list-mmsobject.d.ts +14 -2
  177. package/dist/models/multi-channel-channel-list-mmsresponse-object.d.ts +18 -3
  178. package/dist/models/multi-channel-channel-list-rbmobject.d.ts +14 -2
  179. package/dist/models/multi-channel-channel-list-rbmresponse-object.d.ts +18 -3
  180. package/dist/models/multi-channel-channel-list-smsobject.d.ts +14 -2
  181. package/dist/models/multi-channel-channel-list-smsresponse-object.d.ts +18 -3
  182. package/dist/models/page.d.ts +29 -0
  183. package/dist/models/page.js +15 -0
  184. package/dist/models/rbm-action-dial.d.ts +16 -2
  185. package/dist/models/rbm-action-open-url.d.ts +20 -2
  186. package/dist/models/rbm-action-view-location.d.ts +24 -2
  187. package/dist/models/rbm-card-content-media.d.ts +12 -2
  188. package/dist/models/rbm-open-url-enum.d.ts +1 -1
  189. package/dist/models/rbm-open-url-enum.js +1 -1
  190. package/dist/models/rbm-web-view-enum.d.ts +1 -1
  191. package/dist/models/rbm-web-view-enum.js +1 -1
  192. package/dist/models/sip-connection-metadata.d.ts +27 -0
  193. package/dist/models/sip-connection-metadata.js +15 -0
  194. package/dist/models/sip-credentials.d.ts +21 -0
  195. package/dist/models/sip-credentials.js +15 -0
  196. package/dist/models/status-callback.d.ts +1 -1
  197. package/dist/models/sync-lookup-request.d.ts +4 -0
  198. package/dist/models/update-call.d.ts +1 -1
  199. package/dist/models/{model-error.d.ts → webhook-subscription-error.d.ts} +1 -1
  200. package/dist/models/webhook-subscription-error.js +15 -0
  201. package/dist/models/webhook-subscriptions-list-body.d.ts +2 -2
  202. package/docs/BrtcError.md +28 -0
  203. package/docs/BrtcErrorResponse.md +24 -0
  204. package/docs/BrtcErrorSource.md +26 -0
  205. package/docs/BrtcLink.md +24 -0
  206. package/docs/Callback.md +2 -2
  207. package/docs/CreateCall.md +2 -2
  208. package/docs/CreateEndpointRequestBase.md +28 -0
  209. package/docs/CreateEndpointResponse.md +24 -0
  210. package/docs/CreateEndpointResponseData.md +34 -0
  211. package/docs/CreateWebRtcConnectionRequest.md +30 -0
  212. package/docs/Device.md +26 -0
  213. package/docs/DeviceStatusEnum.md +10 -0
  214. package/docs/Endpoint.md +32 -0
  215. package/docs/EndpointDirectionEnum.md +12 -0
  216. package/docs/EndpointEvent.md +37 -0
  217. package/docs/EndpointEventTypeEnum.md +10 -0
  218. package/docs/EndpointResponse.md +24 -0
  219. package/docs/EndpointStatusEnum.md +10 -0
  220. package/docs/EndpointTypeEnum.md +8 -0
  221. package/docs/Endpoints.md +30 -0
  222. package/docs/EndpointsApi.md +334 -0
  223. package/docs/InboundCallback.md +2 -2
  224. package/docs/InboundCallbackTypeEnum.md +1 -1
  225. package/docs/ListEndpointsResponse.md +26 -0
  226. package/docs/LookupResult.md +1 -1
  227. package/docs/MachineDetectionConfiguration.md +1 -1
  228. package/docs/MessageRequest.md +1 -1
  229. package/docs/Page.md +26 -0
  230. package/docs/RbmOpenUrlEnum.md +1 -1
  231. package/docs/RbmWebViewEnum.md +1 -1
  232. package/docs/SipConnectionMetadata.md +26 -0
  233. package/docs/SipCredentials.md +22 -0
  234. package/docs/StatusCallback.md +1 -1
  235. package/docs/SyncLookupRequest.md +2 -0
  236. package/docs/UpdateCall.md +1 -1
  237. package/docs/{Error.md → WebhookSubscriptionError.md} +3 -3
  238. package/docs/WebhookSubscriptionsListBody.md +1 -1
  239. package/models/brtc-error-response.ts +28 -0
  240. package/models/brtc-error-source.ts +35 -0
  241. package/models/brtc-error.ts +39 -0
  242. package/models/brtc-link.ts +31 -0
  243. package/models/bxml/verbs/Connect.ts +33 -0
  244. package/models/bxml/verbs/Endpoint.ts +19 -0
  245. package/models/bxml/verbs/index.ts +2 -0
  246. package/models/create-call.ts +2 -2
  247. package/models/create-endpoint-request-base.ts +41 -0
  248. package/models/create-endpoint-response-data.ts +58 -0
  249. package/models/create-endpoint-response.ts +31 -0
  250. package/models/create-web-rtc-connection-request.ts +47 -0
  251. package/models/device-status-enum.ts +26 -0
  252. package/models/device.ts +37 -0
  253. package/models/endpoint-direction-enum.ts +27 -0
  254. package/models/endpoint-event-type-enum.ts +26 -0
  255. package/models/endpoint-event.ts +63 -0
  256. package/models/endpoint-response.ts +31 -0
  257. package/models/endpoint-status-enum.ts +26 -0
  258. package/models/endpoint-type-enum.ts +25 -0
  259. package/models/endpoint.ts +54 -0
  260. package/models/endpoints.ts +45 -0
  261. package/models/inbound-callback-message.ts +42 -1
  262. package/models/inbound-callback-type-enum.ts +1 -1
  263. package/models/inbound-callback.ts +2 -2
  264. package/models/index.ts +23 -1
  265. package/models/list-endpoints-response.ts +35 -0
  266. package/models/lookup-result.ts +1 -1
  267. package/models/machine-detection-configuration.ts +1 -1
  268. package/models/message-request.ts +1 -1
  269. package/models/multi-channel-action-calendar-event.ts +27 -1
  270. package/models/multi-channel-channel-list-mmsobject.ts +12 -1
  271. package/models/multi-channel-channel-list-mmsresponse-object.ts +16 -1
  272. package/models/multi-channel-channel-list-rbmobject.ts +12 -1
  273. package/models/multi-channel-channel-list-rbmresponse-object.ts +16 -1
  274. package/models/multi-channel-channel-list-smsobject.ts +12 -1
  275. package/models/multi-channel-channel-list-smsresponse-object.ts +16 -1
  276. package/models/page.ts +35 -0
  277. package/models/rbm-action-dial.ts +15 -1
  278. package/models/rbm-action-open-url.ts +17 -1
  279. package/models/rbm-action-view-location.ts +23 -1
  280. package/models/rbm-card-content-media.ts +11 -1
  281. package/models/rbm-open-url-enum.ts +1 -1
  282. package/models/rbm-web-view-enum.ts +1 -1
  283. package/models/sip-connection-metadata.ts +35 -0
  284. package/models/sip-credentials.ts +27 -0
  285. package/models/status-callback.ts +1 -1
  286. package/models/sync-lookup-request.ts +4 -0
  287. package/models/update-call.ts +1 -1
  288. package/models/{model-error.ts → webhook-subscription-error.ts} +1 -1
  289. package/models/webhook-subscriptions-list-body.ts +3 -3
  290. package/package.json +1 -1
  291. package/tests/smoke/endpoints-api.test.ts +141 -0
  292. package/tests/unit/api/endpoints-api.test.ts +106 -0
  293. package/tests/unit/api/phone-number-lookup-api.test.ts +4 -1
  294. package/tests/unit/models/brtc-error-response.test.ts +50 -0
  295. package/tests/unit/models/brtc-error-source.test.ts +17 -0
  296. package/tests/unit/models/brtc-error.test.ts +30 -0
  297. package/tests/unit/models/brtc-link.test.ts +15 -0
  298. package/tests/unit/models/bxml/verbs/Connect.test.ts +47 -0
  299. package/tests/unit/models/bxml/verbs/Endpoint.test.ts +12 -0
  300. package/tests/unit/models/create-endpoint-request-base.test.ts +21 -0
  301. package/tests/unit/models/create-endpoint-response-data.test.ts +44 -0
  302. package/tests/unit/models/create-endpoint-response.test.ts +86 -0
  303. package/tests/unit/models/create-web-rtc-connection-request.test.ts +21 -0
  304. package/tests/unit/models/device-status-enum.test.ts +12 -0
  305. package/tests/unit/models/device.test.ts +19 -0
  306. package/tests/unit/models/endpoint-direction-enum.test.ts +14 -0
  307. package/tests/unit/models/endpoint-event-type-enum.test.ts +12 -0
  308. package/tests/unit/models/endpoint-event.test.ts +44 -0
  309. package/tests/unit/models/endpoint-response.test.ts +84 -0
  310. package/tests/unit/models/endpoint-status-enum.test.ts +12 -0
  311. package/tests/unit/models/endpoint-type-enum.test.ts +10 -0
  312. package/tests/unit/models/endpoint.test.ts +50 -0
  313. package/tests/unit/models/endpoints.test.ts +25 -0
  314. package/tests/unit/models/list-endpoints-response.test.ts +94 -0
  315. package/tests/unit/models/page.test.ts +17 -0
  316. package/tests/unit/models/sip-connection-metadata.test.ts +25 -0
  317. package/tests/unit/models/sip-credentials.test.ts +13 -0
  318. /package/dist/models/{model-error.js → brtc-error-response.js} +0 -0
@@ -0,0 +1,666 @@
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
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ 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);
52
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ 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;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
+ if (ar || !(i in from)) {
80
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
+ ar[i] = from[i];
82
+ }
83
+ }
84
+ return to.concat(ar || Array.prototype.slice.call(from));
85
+ };
86
+ Object.defineProperty(exports, "__esModule", { value: true });
87
+ exports.EndpointsApi = exports.EndpointsApiFactory = exports.EndpointsApiFp = exports.EndpointsApiAxiosParamCreator = void 0;
88
+ var axios_1 = require("axios");
89
+ // Some imports not used depending on template conditions
90
+ // @ts-ignore
91
+ var common_1 = require("../common");
92
+ // @ts-ignore
93
+ var base_1 = require("../base");
94
+ /**
95
+ * EndpointsApi - axios parameter creator
96
+ */
97
+ var EndpointsApiAxiosParamCreator = function (configuration) {
98
+ var _this = this;
99
+ return {
100
+ /**
101
+ * Creates a new Endpoint for the specified account.
102
+ * @summary Create Endpoint
103
+ * @param {string} accountId Your Bandwidth Account ID.
104
+ * @param {CreateWebRtcConnectionRequest} body
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ createEndpoint: function (accountId_1, body_1) {
109
+ var args_1 = [];
110
+ for (var _i = 2; _i < arguments.length; _i++) {
111
+ args_1[_i - 2] = arguments[_i];
112
+ }
113
+ return __awaiter(_this, __spreadArray([accountId_1, body_1], args_1, true), void 0, function (accountId, body, options) {
114
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
115
+ if (options === void 0) { options = {}; }
116
+ return __generator(this, function (_a) {
117
+ switch (_a.label) {
118
+ case 0:
119
+ // verify required parameter 'accountId' is not null or undefined
120
+ (0, common_1.assertParamExists)('createEndpoint', 'accountId', accountId);
121
+ // verify required parameter 'body' is not null or undefined
122
+ (0, common_1.assertParamExists)('createEndpoint', 'body', body);
123
+ localVarPath = "/accounts/{accountId}/endpoints"
124
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
125
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
126
+ if (configuration) {
127
+ baseOptions = configuration.baseOptions;
128
+ }
129
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
130
+ localVarHeaderParameter = {};
131
+ localVarQueryParameter = {};
132
+ // authentication Basic required
133
+ // http basic authentication required
134
+ (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
135
+ // authentication OAuth2 required
136
+ // oauth required
137
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
138
+ case 1:
139
+ // authentication OAuth2 required
140
+ // oauth required
141
+ _a.sent();
142
+ localVarHeaderParameter['Content-Type'] = 'application/json';
143
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
144
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
145
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
146
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
147
+ return [2 /*return*/, {
148
+ url: (0, common_1.toPathString)(localVarUrlObj),
149
+ options: localVarRequestOptions,
150
+ }];
151
+ }
152
+ });
153
+ });
154
+ },
155
+ /**
156
+ * Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
157
+ * @summary Delete Endpoint
158
+ * @param {string} accountId Your Bandwidth Account ID.
159
+ * @param {string} endpointId BRTC Endpoint ID.
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ */
163
+ deleteEndpoint: function (accountId_1, endpointId_1) {
164
+ var args_1 = [];
165
+ for (var _i = 2; _i < arguments.length; _i++) {
166
+ args_1[_i - 2] = arguments[_i];
167
+ }
168
+ return __awaiter(_this, __spreadArray([accountId_1, endpointId_1], args_1, true), void 0, function (accountId, endpointId, options) {
169
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
170
+ if (options === void 0) { options = {}; }
171
+ return __generator(this, function (_a) {
172
+ switch (_a.label) {
173
+ case 0:
174
+ // verify required parameter 'accountId' is not null or undefined
175
+ (0, common_1.assertParamExists)('deleteEndpoint', 'accountId', accountId);
176
+ // verify required parameter 'endpointId' is not null or undefined
177
+ (0, common_1.assertParamExists)('deleteEndpoint', 'endpointId', endpointId);
178
+ localVarPath = "/accounts/{accountId}/endpoints/{endpointId}"
179
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
180
+ .replace("{".concat("endpointId", "}"), encodeURIComponent(String(endpointId)));
181
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
182
+ if (configuration) {
183
+ baseOptions = configuration.baseOptions;
184
+ }
185
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
186
+ localVarHeaderParameter = {};
187
+ localVarQueryParameter = {};
188
+ // authentication Basic required
189
+ // http basic authentication required
190
+ (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
191
+ // authentication OAuth2 required
192
+ // oauth required
193
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
194
+ case 1:
195
+ // authentication OAuth2 required
196
+ // oauth required
197
+ _a.sent();
198
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
199
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
201
+ return [2 /*return*/, {
202
+ url: (0, common_1.toPathString)(localVarUrlObj),
203
+ options: localVarRequestOptions,
204
+ }];
205
+ }
206
+ });
207
+ });
208
+ },
209
+ /**
210
+ * Returns information about the specified endpoint.
211
+ * @summary Get Endpoint
212
+ * @param {string} accountId Your Bandwidth Account ID.
213
+ * @param {string} endpointId BRTC Endpoint ID.
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ getEndpoint: function (accountId_1, endpointId_1) {
218
+ var args_1 = [];
219
+ for (var _i = 2; _i < arguments.length; _i++) {
220
+ args_1[_i - 2] = arguments[_i];
221
+ }
222
+ return __awaiter(_this, __spreadArray([accountId_1, endpointId_1], args_1, true), void 0, function (accountId, endpointId, options) {
223
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
224
+ if (options === void 0) { options = {}; }
225
+ return __generator(this, function (_a) {
226
+ switch (_a.label) {
227
+ case 0:
228
+ // verify required parameter 'accountId' is not null or undefined
229
+ (0, common_1.assertParamExists)('getEndpoint', 'accountId', accountId);
230
+ // verify required parameter 'endpointId' is not null or undefined
231
+ (0, common_1.assertParamExists)('getEndpoint', 'endpointId', endpointId);
232
+ localVarPath = "/accounts/{accountId}/endpoints/{endpointId}"
233
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
234
+ .replace("{".concat("endpointId", "}"), encodeURIComponent(String(endpointId)));
235
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
236
+ if (configuration) {
237
+ baseOptions = configuration.baseOptions;
238
+ }
239
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
240
+ localVarHeaderParameter = {};
241
+ localVarQueryParameter = {};
242
+ // authentication Basic required
243
+ // http basic authentication required
244
+ (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
245
+ // authentication OAuth2 required
246
+ // oauth required
247
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
248
+ case 1:
249
+ // authentication OAuth2 required
250
+ // oauth required
251
+ _a.sent();
252
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
253
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
254
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
255
+ return [2 /*return*/, {
256
+ url: (0, common_1.toPathString)(localVarUrlObj),
257
+ options: localVarRequestOptions,
258
+ }];
259
+ }
260
+ });
261
+ });
262
+ },
263
+ /**
264
+ * Returns a list of endpoints associated with the specified account.
265
+ * @summary List Endpoints
266
+ * @param {string} accountId Your Bandwidth Account ID.
267
+ * @param {EndpointTypeEnum} [type] The type of endpoint.
268
+ * @param {EndpointStatusEnum} [status] The status of the endpoint.
269
+ * @param {string} [afterCursor] The cursor to use for pagination. This is the value of the &#x60;next&#x60; link in the previous response.
270
+ * @param {number} [limit] The maximum number of endpoints to return in the response.
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ */
274
+ listEndpoints: function (accountId_1, type_1, status_1, afterCursor_1, limit_1) {
275
+ var args_1 = [];
276
+ for (var _i = 5; _i < arguments.length; _i++) {
277
+ args_1[_i - 5] = arguments[_i];
278
+ }
279
+ return __awaiter(_this, __spreadArray([accountId_1, type_1, status_1, afterCursor_1, limit_1], args_1, true), void 0, function (accountId, type, status, afterCursor, limit, options) {
280
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
281
+ if (options === void 0) { options = {}; }
282
+ return __generator(this, function (_a) {
283
+ switch (_a.label) {
284
+ case 0:
285
+ // verify required parameter 'accountId' is not null or undefined
286
+ (0, common_1.assertParamExists)('listEndpoints', 'accountId', accountId);
287
+ localVarPath = "/accounts/{accountId}/endpoints"
288
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
289
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
290
+ if (configuration) {
291
+ baseOptions = configuration.baseOptions;
292
+ }
293
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
294
+ localVarHeaderParameter = {};
295
+ localVarQueryParameter = {};
296
+ // authentication Basic required
297
+ // http basic authentication required
298
+ (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
299
+ // authentication OAuth2 required
300
+ // oauth required
301
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
302
+ case 1:
303
+ // authentication OAuth2 required
304
+ // oauth required
305
+ _a.sent();
306
+ if (type !== undefined) {
307
+ localVarQueryParameter['type'] = type;
308
+ }
309
+ if (status !== undefined) {
310
+ localVarQueryParameter['status'] = status;
311
+ }
312
+ if (afterCursor !== undefined) {
313
+ localVarQueryParameter['afterCursor'] = afterCursor;
314
+ }
315
+ if (limit !== undefined) {
316
+ localVarQueryParameter['limit'] = limit;
317
+ }
318
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
319
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
321
+ return [2 /*return*/, {
322
+ url: (0, common_1.toPathString)(localVarUrlObj),
323
+ options: localVarRequestOptions,
324
+ }];
325
+ }
326
+ });
327
+ });
328
+ },
329
+ /**
330
+ * Updates the BXML for the specified endpoint.
331
+ * @summary Update Endpoint BXML
332
+ * @param {string} accountId Your Bandwidth Account ID.
333
+ * @param {string} endpointId BRTC Endpoint ID.
334
+ * @param {string} body
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ updateEndpointBxml: function (accountId_1, endpointId_1, body_1) {
339
+ var args_1 = [];
340
+ for (var _i = 3; _i < arguments.length; _i++) {
341
+ args_1[_i - 3] = arguments[_i];
342
+ }
343
+ return __awaiter(_this, __spreadArray([accountId_1, endpointId_1, body_1], args_1, true), void 0, function (accountId, endpointId, body, options) {
344
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
345
+ if (options === void 0) { options = {}; }
346
+ return __generator(this, function (_a) {
347
+ switch (_a.label) {
348
+ case 0:
349
+ // verify required parameter 'accountId' is not null or undefined
350
+ (0, common_1.assertParamExists)('updateEndpointBxml', 'accountId', accountId);
351
+ // verify required parameter 'endpointId' is not null or undefined
352
+ (0, common_1.assertParamExists)('updateEndpointBxml', 'endpointId', endpointId);
353
+ // verify required parameter 'body' is not null or undefined
354
+ (0, common_1.assertParamExists)('updateEndpointBxml', 'body', body);
355
+ localVarPath = "/accounts/{accountId}/endpoints/{endpointId}/bxml"
356
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)))
357
+ .replace("{".concat("endpointId", "}"), encodeURIComponent(String(endpointId)));
358
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
359
+ if (configuration) {
360
+ baseOptions = configuration.baseOptions;
361
+ }
362
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
363
+ localVarHeaderParameter = {};
364
+ localVarQueryParameter = {};
365
+ // authentication Basic required
366
+ // http basic authentication required
367
+ (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
368
+ // authentication OAuth2 required
369
+ // oauth required
370
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2", [], configuration)];
371
+ case 1:
372
+ // authentication OAuth2 required
373
+ // oauth required
374
+ _a.sent();
375
+ localVarHeaderParameter['Content-Type'] = 'application/xml';
376
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
377
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
378
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
379
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
380
+ return [2 /*return*/, {
381
+ url: (0, common_1.toPathString)(localVarUrlObj),
382
+ options: localVarRequestOptions,
383
+ }];
384
+ }
385
+ });
386
+ });
387
+ },
388
+ };
389
+ };
390
+ exports.EndpointsApiAxiosParamCreator = EndpointsApiAxiosParamCreator;
391
+ /**
392
+ * EndpointsApi - functional programming interface
393
+ */
394
+ var EndpointsApiFp = function (configuration) {
395
+ var localVarAxiosParamCreator = (0, exports.EndpointsApiAxiosParamCreator)(configuration);
396
+ return {
397
+ /**
398
+ * Creates a new Endpoint for the specified account.
399
+ * @summary Create Endpoint
400
+ * @param {string} accountId Your Bandwidth Account ID.
401
+ * @param {CreateWebRtcConnectionRequest} body
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ */
405
+ createEndpoint: function (accountId, body, options) {
406
+ return __awaiter(this, void 0, void 0, function () {
407
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
408
+ var _a, _b, _c;
409
+ return __generator(this, function (_d) {
410
+ switch (_d.label) {
411
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createEndpoint(accountId, body, options)];
412
+ case 1:
413
+ localVarAxiosArgs = _d.sent();
414
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
415
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EndpointsApi.createEndpoint']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
416
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
417
+ }
418
+ });
419
+ });
420
+ },
421
+ /**
422
+ * Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
423
+ * @summary Delete Endpoint
424
+ * @param {string} accountId Your Bandwidth Account ID.
425
+ * @param {string} endpointId BRTC Endpoint ID.
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ deleteEndpoint: function (accountId, endpointId, options) {
430
+ return __awaiter(this, void 0, void 0, function () {
431
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
432
+ var _a, _b, _c;
433
+ return __generator(this, function (_d) {
434
+ switch (_d.label) {
435
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteEndpoint(accountId, endpointId, options)];
436
+ case 1:
437
+ localVarAxiosArgs = _d.sent();
438
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
439
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EndpointsApi.deleteEndpoint']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
440
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
441
+ }
442
+ });
443
+ });
444
+ },
445
+ /**
446
+ * Returns information about the specified endpoint.
447
+ * @summary Get Endpoint
448
+ * @param {string} accountId Your Bandwidth Account ID.
449
+ * @param {string} endpointId BRTC Endpoint ID.
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ getEndpoint: function (accountId, endpointId, options) {
454
+ return __awaiter(this, void 0, void 0, function () {
455
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
456
+ var _a, _b, _c;
457
+ return __generator(this, function (_d) {
458
+ switch (_d.label) {
459
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getEndpoint(accountId, endpointId, options)];
460
+ case 1:
461
+ localVarAxiosArgs = _d.sent();
462
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
463
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EndpointsApi.getEndpoint']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
464
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
465
+ }
466
+ });
467
+ });
468
+ },
469
+ /**
470
+ * Returns a list of endpoints associated with the specified account.
471
+ * @summary List Endpoints
472
+ * @param {string} accountId Your Bandwidth Account ID.
473
+ * @param {EndpointTypeEnum} [type] The type of endpoint.
474
+ * @param {EndpointStatusEnum} [status] The status of the endpoint.
475
+ * @param {string} [afterCursor] The cursor to use for pagination. This is the value of the &#x60;next&#x60; link in the previous response.
476
+ * @param {number} [limit] The maximum number of endpoints to return in the response.
477
+ * @param {*} [options] Override http request option.
478
+ * @throws {RequiredError}
479
+ */
480
+ listEndpoints: function (accountId, type, status, afterCursor, limit, options) {
481
+ return __awaiter(this, void 0, void 0, function () {
482
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
483
+ var _a, _b, _c;
484
+ return __generator(this, function (_d) {
485
+ switch (_d.label) {
486
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listEndpoints(accountId, type, status, afterCursor, limit, options)];
487
+ case 1:
488
+ localVarAxiosArgs = _d.sent();
489
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
490
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EndpointsApi.listEndpoints']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
491
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
492
+ }
493
+ });
494
+ });
495
+ },
496
+ /**
497
+ * Updates the BXML for the specified endpoint.
498
+ * @summary Update Endpoint BXML
499
+ * @param {string} accountId Your Bandwidth Account ID.
500
+ * @param {string} endpointId BRTC Endpoint ID.
501
+ * @param {string} body
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ updateEndpointBxml: function (accountId, endpointId, body, options) {
506
+ return __awaiter(this, void 0, void 0, function () {
507
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
508
+ var _a, _b, _c;
509
+ return __generator(this, function (_d) {
510
+ switch (_d.label) {
511
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateEndpointBxml(accountId, endpointId, body, options)];
512
+ case 1:
513
+ localVarAxiosArgs = _d.sent();
514
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
515
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EndpointsApi.updateEndpointBxml']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
516
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
517
+ }
518
+ });
519
+ });
520
+ },
521
+ };
522
+ };
523
+ exports.EndpointsApiFp = EndpointsApiFp;
524
+ /**
525
+ * EndpointsApi - factory interface
526
+ */
527
+ var EndpointsApiFactory = function (configuration, basePath, axios) {
528
+ var localVarFp = (0, exports.EndpointsApiFp)(configuration);
529
+ return {
530
+ /**
531
+ * Creates a new Endpoint for the specified account.
532
+ * @summary Create Endpoint
533
+ * @param {string} accountId Your Bandwidth Account ID.
534
+ * @param {CreateWebRtcConnectionRequest} body
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ createEndpoint: function (accountId, body, options) {
539
+ return localVarFp.createEndpoint(accountId, body, options).then(function (request) { return request(axios, basePath); });
540
+ },
541
+ /**
542
+ * Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
543
+ * @summary Delete Endpoint
544
+ * @param {string} accountId Your Bandwidth Account ID.
545
+ * @param {string} endpointId BRTC Endpoint ID.
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ deleteEndpoint: function (accountId, endpointId, options) {
550
+ return localVarFp.deleteEndpoint(accountId, endpointId, options).then(function (request) { return request(axios, basePath); });
551
+ },
552
+ /**
553
+ * Returns information about the specified endpoint.
554
+ * @summary Get Endpoint
555
+ * @param {string} accountId Your Bandwidth Account ID.
556
+ * @param {string} endpointId BRTC Endpoint ID.
557
+ * @param {*} [options] Override http request option.
558
+ * @throws {RequiredError}
559
+ */
560
+ getEndpoint: function (accountId, endpointId, options) {
561
+ return localVarFp.getEndpoint(accountId, endpointId, options).then(function (request) { return request(axios, basePath); });
562
+ },
563
+ /**
564
+ * Returns a list of endpoints associated with the specified account.
565
+ * @summary List Endpoints
566
+ * @param {string} accountId Your Bandwidth Account ID.
567
+ * @param {EndpointTypeEnum} [type] The type of endpoint.
568
+ * @param {EndpointStatusEnum} [status] The status of the endpoint.
569
+ * @param {string} [afterCursor] The cursor to use for pagination. This is the value of the &#x60;next&#x60; link in the previous response.
570
+ * @param {number} [limit] The maximum number of endpoints to return in the response.
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ */
574
+ listEndpoints: function (accountId, type, status, afterCursor, limit, options) {
575
+ return localVarFp.listEndpoints(accountId, type, status, afterCursor, limit, options).then(function (request) { return request(axios, basePath); });
576
+ },
577
+ /**
578
+ * Updates the BXML for the specified endpoint.
579
+ * @summary Update Endpoint BXML
580
+ * @param {string} accountId Your Bandwidth Account ID.
581
+ * @param {string} endpointId BRTC Endpoint ID.
582
+ * @param {string} body
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ updateEndpointBxml: function (accountId, endpointId, body, options) {
587
+ return localVarFp.updateEndpointBxml(accountId, endpointId, body, options).then(function (request) { return request(axios, basePath); });
588
+ },
589
+ };
590
+ };
591
+ exports.EndpointsApiFactory = EndpointsApiFactory;
592
+ /**
593
+ * EndpointsApi - object-oriented interface
594
+ */
595
+ var EndpointsApi = /** @class */ (function (_super) {
596
+ __extends(EndpointsApi, _super);
597
+ function EndpointsApi() {
598
+ return _super !== null && _super.apply(this, arguments) || this;
599
+ }
600
+ /**
601
+ * Creates a new Endpoint for the specified account.
602
+ * @summary Create Endpoint
603
+ * @param {string} accountId Your Bandwidth Account ID.
604
+ * @param {CreateWebRtcConnectionRequest} body
605
+ * @param {*} [options] Override http request option.
606
+ * @throws {RequiredError}
607
+ */
608
+ EndpointsApi.prototype.createEndpoint = function (accountId, body, options) {
609
+ var _this = this;
610
+ return (0, exports.EndpointsApiFp)(this.configuration).createEndpoint(accountId, body, options).then(function (request) { return request(_this.axios, _this.basePath); });
611
+ };
612
+ /**
613
+ * Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
614
+ * @summary Delete Endpoint
615
+ * @param {string} accountId Your Bandwidth Account ID.
616
+ * @param {string} endpointId BRTC Endpoint ID.
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ EndpointsApi.prototype.deleteEndpoint = function (accountId, endpointId, options) {
621
+ var _this = this;
622
+ return (0, exports.EndpointsApiFp)(this.configuration).deleteEndpoint(accountId, endpointId, options).then(function (request) { return request(_this.axios, _this.basePath); });
623
+ };
624
+ /**
625
+ * Returns information about the specified endpoint.
626
+ * @summary Get Endpoint
627
+ * @param {string} accountId Your Bandwidth Account ID.
628
+ * @param {string} endpointId BRTC Endpoint ID.
629
+ * @param {*} [options] Override http request option.
630
+ * @throws {RequiredError}
631
+ */
632
+ EndpointsApi.prototype.getEndpoint = function (accountId, endpointId, options) {
633
+ var _this = this;
634
+ return (0, exports.EndpointsApiFp)(this.configuration).getEndpoint(accountId, endpointId, options).then(function (request) { return request(_this.axios, _this.basePath); });
635
+ };
636
+ /**
637
+ * Returns a list of endpoints associated with the specified account.
638
+ * @summary List Endpoints
639
+ * @param {string} accountId Your Bandwidth Account ID.
640
+ * @param {EndpointTypeEnum} [type] The type of endpoint.
641
+ * @param {EndpointStatusEnum} [status] The status of the endpoint.
642
+ * @param {string} [afterCursor] The cursor to use for pagination. This is the value of the &#x60;next&#x60; link in the previous response.
643
+ * @param {number} [limit] The maximum number of endpoints to return in the response.
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ */
647
+ EndpointsApi.prototype.listEndpoints = function (accountId, type, status, afterCursor, limit, options) {
648
+ var _this = this;
649
+ return (0, exports.EndpointsApiFp)(this.configuration).listEndpoints(accountId, type, status, afterCursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
650
+ };
651
+ /**
652
+ * Updates the BXML for the specified endpoint.
653
+ * @summary Update Endpoint BXML
654
+ * @param {string} accountId Your Bandwidth Account ID.
655
+ * @param {string} endpointId BRTC Endpoint ID.
656
+ * @param {string} body
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ EndpointsApi.prototype.updateEndpointBxml = function (accountId, endpointId, body, options) {
661
+ var _this = this;
662
+ return (0, exports.EndpointsApiFp)(this.configuration).updateEndpointBxml(accountId, endpointId, body, options).then(function (request) { return request(_this.axios, _this.basePath); });
663
+ };
664
+ return EndpointsApi;
665
+ }(base_1.BaseAPI));
666
+ exports.EndpointsApi = EndpointsApi;