bandwidth-sdk 1.0.0 → 1.0.2

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 (79) hide show
  1. package/common.ts +2 -2
  2. package/coverage/clover.xml +10 -9
  3. package/coverage/coverage-final.json +2 -2
  4. package/coverage/lcov-report/index.html +18 -18
  5. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +1 -1
  6. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +1 -1
  7. package/coverage/lcov-report/node-sdk/api/index.html +1 -1
  8. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +1 -1
  9. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +1 -1
  10. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +1 -1
  11. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +1 -1
  12. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +1 -1
  13. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +1 -1
  14. package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
  15. package/coverage/lcov-report/node-sdk/common.ts.html +12 -12
  16. package/coverage/lcov-report/node-sdk/configuration.ts.html +1 -1
  17. package/coverage/lcov-report/node-sdk/index.html +19 -19
  18. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +1 -1
  19. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +1 -1
  20. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +1 -1
  21. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +1 -1
  22. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +1 -1
  23. package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
  24. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
  25. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +8 -2
  26. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
  27. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
  28. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
  29. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +1 -1
  30. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
  31. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
  32. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +1 -1
  33. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
  34. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
  35. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
  36. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
  37. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
  38. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
  39. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
  40. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
  41. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
  42. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
  43. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
  44. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +1 -1
  45. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +1 -1
  46. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
  47. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
  48. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +1 -1
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
  55. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +1 -1
  56. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +1 -1
  57. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +1 -1
  58. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +1 -1
  59. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +1 -1
  60. package/coverage/lcov-report/node-sdk/models/index.html +1 -1
  61. package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
  62. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +1 -1
  63. package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +1 -1
  64. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +1 -1
  65. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +1 -1
  66. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +1 -1
  67. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +1 -1
  68. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +1 -1
  69. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +1 -1
  70. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +1 -1
  71. package/coverage/lcov-report/node-sdk/tests/callUtils.js.html +1 -1
  72. package/coverage/lcov-report/node-sdk/tests/index.html +1 -1
  73. package/coverage/lcov.info +32 -24
  74. package/custom_templates/common.mustache +142 -0
  75. package/custom_templates/package.mustache +1 -1
  76. package/dist/common.js +3 -2
  77. package/dist/models/bxml/verbs/Bridge.d.ts +2 -0
  78. package/models/bxml/verbs/Bridge.ts +2 -0
  79. package/package.json +2 -2
package/common.ts CHANGED
@@ -126,7 +126,7 @@ export const serializeDataIfNeeded = function (value: any, requestOptions: any,
126
126
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
127
127
  : nonString;
128
128
  return needsSerialization
129
- ? JSON.stringify(value !== undefined ? value : {})
129
+ ? JSON.stringify(value !== undefined ? value : {}, (_k, v) => (v instanceof Set ? Array.from(v) : v))
130
130
  : (value || "");
131
131
  }
132
132
 
@@ -144,7 +144,7 @@ export const toPathString = function (url: URL) {
144
144
  */
145
145
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
146
146
  return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
147
- const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url};
147
+ const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
148
148
  return axios.request<T, R>(axiosRequestArgs);
149
149
  };
150
150
  }
@@ -1,9 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1708464197398" clover="3.2.0">
3
- <project timestamp="1708464197398" name="All files">
4
- <metrics statements="1436" coveredstatements="1328" conditionals="1087" coveredconditionals="766" methods="391" coveredmethods="307" elements="2914" coveredelements="2401" complexity="0" loc="1436" ncloc="1436" packages="6" files="62" classes="62"/>
2
+ <coverage generated="1713907330145" clover="3.2.0">
3
+ <project timestamp="1713907330145" name="All files">
4
+ <metrics statements="1437" coveredstatements="1329" conditionals="1092" coveredconditionals="768" methods="392" coveredmethods="308" elements="2921" coveredelements="2405" complexity="0" loc="1437" ncloc="1437" packages="6" files="62" classes="62"/>
5
5
  <package name="node-sdk">
6
- <metrics statements="79" coveredstatements="59" conditionals="65" coveredconditionals="35" methods="20" coveredmethods="16"/>
6
+ <metrics statements="80" coveredstatements="60" conditionals="70" coveredconditionals="37" methods="21" coveredmethods="17"/>
7
7
  <file name="base.ts" path="/home/runner/work/node-sdk/node-sdk/base.ts">
8
8
  <metrics statements="15" coveredstatements="12" conditionals="9" coveredconditionals="6" methods="4" coveredmethods="3"/>
9
9
  <line num="20" count="9" type="stmt"/>
@@ -23,7 +23,7 @@
23
23
  <line num="85" count="9" type="stmt"/>
24
24
  </file>
25
25
  <file name="common.ts" path="/home/runner/work/node-sdk/node-sdk/common.ts">
26
- <metrics statements="50" coveredstatements="33" conditionals="52" coveredconditionals="27" methods="13" coveredmethods="10"/>
26
+ <metrics statements="51" coveredstatements="34" conditionals="57" coveredconditionals="29" methods="14" coveredmethods="11"/>
27
27
  <line num="19" count="9" type="stmt"/>
28
28
  <line num="25" count="9" type="stmt"/>
29
29
  <line num="32" count="9" type="stmt"/>
@@ -68,11 +68,12 @@
68
68
  <line num="124" count="47" type="stmt"/>
69
69
  <line num="125" count="47" type="cond" truecount="5" falsecount="0"/>
70
70
  <line num="128" count="47" type="cond" truecount="2" falsecount="0"/>
71
+ <line num="129" count="32295" type="cond" truecount="2" falsecount="2"/>
71
72
  <line num="137" count="9" type="stmt"/>
72
73
  <line num="138" count="88" type="stmt"/>
73
74
  <line num="145" count="9" type="stmt"/>
74
75
  <line num="146" count="88" type="cond" truecount="0" falsecount="2"/>
75
- <line num="147" count="88" type="cond" truecount="6" falsecount="1"/>
76
+ <line num="147" count="88" type="cond" truecount="7" falsecount="3"/>
76
77
  <line num="148" count="88" type="stmt"/>
77
78
  </file>
78
79
  <file name="configuration.ts" path="/home/runner/work/node-sdk/node-sdk/configuration.ts">
@@ -1355,9 +1356,9 @@
1355
1356
  <file name="Bridge.ts" path="/home/runner/work/node-sdk/node-sdk/models/bxml/verbs/Bridge.ts">
1356
1357
  <metrics statements="4" coveredstatements="4" conditionals="2" coveredconditionals="2" methods="2" coveredmethods="2"/>
1357
1358
  <line num="1" count="6" type="stmt"/>
1358
- <line num="24" count="6" type="stmt"/>
1359
- <line num="34" count="2" type="cond" truecount="2" falsecount="0"/>
1360
- <line num="36" count="6" type="stmt"/>
1359
+ <line num="26" count="6" type="stmt"/>
1360
+ <line num="36" count="2" type="cond" truecount="2" falsecount="0"/>
1361
+ <line num="38" count="6" type="stmt"/>
1361
1362
  </file>
1362
1363
  <file name="Conference.ts" path="/home/runner/work/node-sdk/node-sdk/models/bxml/verbs/Conference.ts">
1363
1364
  <metrics statements="4" coveredstatements="4" conditionals="2" coveredconditionals="2" methods="2" coveredmethods="2"/>