bandwidth-sdk 0.2.0 → 1.0.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 (81) hide show
  1. package/common.ts +2 -2
  2. package/coverage/clover.xml +12 -11
  3. package/coverage/coverage-final.json +2 -2
  4. package/coverage/lcov-report/index.html +19 -19
  5. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +2 -2
  6. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +2 -2
  7. package/coverage/lcov-report/node-sdk/api/index.html +2 -2
  8. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +2 -2
  9. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +2 -2
  10. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +2 -2
  11. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +2 -2
  12. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +2 -2
  13. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +2 -2
  14. package/coverage/lcov-report/node-sdk/base.ts.html +2 -2
  15. package/coverage/lcov-report/node-sdk/common.ts.html +13 -13
  16. package/coverage/lcov-report/node-sdk/configuration.ts.html +2 -2
  17. package/coverage/lcov-report/node-sdk/index.html +20 -20
  18. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +2 -2
  19. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +2 -2
  20. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +2 -2
  21. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +2 -2
  22. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +2 -2
  23. package/coverage/lcov-report/node-sdk/models/bxml/index.html +2 -2
  24. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +2 -2
  25. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +2 -2
  26. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +2 -2
  27. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +2 -2
  28. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +2 -2
  29. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +2 -2
  30. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +2 -2
  31. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +2 -2
  32. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +2 -2
  33. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +2 -2
  34. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +2 -2
  35. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +2 -2
  36. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +2 -2
  37. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +2 -2
  38. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +2 -2
  39. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +2 -2
  40. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +2 -2
  41. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +2 -2
  42. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +2 -2
  43. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +2 -2
  44. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +2 -2
  45. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +2 -2
  46. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +2 -2
  47. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +2 -2
  48. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +2 -2
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +2 -2
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +2 -2
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +2 -2
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +6 -3
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +2 -2
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +2 -2
  55. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +2 -2
  56. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +2 -2
  57. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +2 -2
  58. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
  59. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
  60. package/coverage/lcov-report/node-sdk/models/index.html +2 -2
  61. package/coverage/lcov-report/node-sdk/models/index.ts.html +2 -2
  62. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
  63. package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +2 -2
  64. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +2 -2
  65. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +2 -2
  66. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +2 -2
  67. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +2 -2
  68. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +2 -2
  69. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +2 -2
  70. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +2 -2
  71. package/coverage/lcov-report/node-sdk/tests/callUtils.js.html +2 -2
  72. package/coverage/lcov-report/node-sdk/tests/index.html +2 -2
  73. package/coverage/lcov.info +35 -27
  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/Transfer.d.ts +1 -0
  78. package/models/bxml/verbs/Transfer.ts +1 -0
  79. package/package.json +2 -2
  80. package/tests/integration/bxml.test.js +1 -0
  81. package/tests/unit/bxml/verbs/Transfer.test.js +6 -5
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="1705436396194" clover="3.2.0">
3
- <project timestamp="1705436396194" 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="1709759544134" clover="3.2.0">
3
+ <project timestamp="1709759544134" 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">
@@ -1556,11 +1557,11 @@
1556
1557
  <file name="Transfer.ts" path="/home/runner/work/node-sdk/node-sdk/models/bxml/verbs/Transfer.ts">
1557
1558
  <metrics statements="6" coveredstatements="6" conditionals="2" coveredconditionals="1" methods="3" coveredmethods="3"/>
1558
1559
  <line num="1" count="6" type="stmt"/>
1559
- <line num="29" count="6" type="stmt"/>
1560
- <line num="38" count="4" type="cond" truecount="1" falsecount="1"/>
1561
- <line num="45" count="6" type="stmt"/>
1562
- <line num="46" count="3" type="stmt"/>
1563
- <line num="48" count="6" type="stmt"/>
1560
+ <line num="30" count="6" type="stmt"/>
1561
+ <line num="39" count="4" type="cond" truecount="1" falsecount="1"/>
1562
+ <line num="46" count="6" type="stmt"/>
1563
+ <line num="47" count="3" type="stmt"/>
1564
+ <line num="49" count="6" type="stmt"/>
1564
1565
  </file>
1565
1566
  <file name="index.ts" path="/home/runner/work/node-sdk/node-sdk/models/bxml/verbs/index.ts">
1566
1567
  <metrics statements="30" coveredstatements="30" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>