bandwidth-sdk 1.0.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.
- package/common.ts +2 -2
- package/coverage/clover.xml +11 -10
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +18 -18
- package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/index.html +1 -1
- package/coverage/lcov-report/node-sdk/api/media-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/common.ts.html +12 -12
- package/coverage/lcov-report/node-sdk/configuration.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/index.html +19 -19
- package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +1 -1
- package/coverage/lcov-report/node-sdk/tests/callUtils.js.html +5 -5
- package/coverage/lcov-report/node-sdk/tests/index.html +1 -1
- package/coverage/lcov.info +32 -24
- package/custom_templates/common.mustache +142 -0
- package/custom_templates/package.mustache +1 -1
- package/dist/common.js +3 -2
- 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: (
|
|
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
|
}
|
package/coverage/clover.xml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
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="
|
|
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="
|
|
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="
|
|
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">
|
|
@@ -1602,7 +1603,7 @@
|
|
|
1602
1603
|
<metrics statements="40" coveredstatements="35" conditionals="10" coveredconditionals="8" methods="7" coveredmethods="7"/>
|
|
1603
1604
|
<line num="5" count="5" type="stmt"/>
|
|
1604
1605
|
<line num="7" count="5" type="stmt"/>
|
|
1605
|
-
<line num="8" count="
|
|
1606
|
+
<line num="8" count="40" type="stmt"/>
|
|
1606
1607
|
<line num="11" count="5" type="stmt"/>
|
|
1607
1608
|
<line num="12" count="2" type="stmt"/>
|
|
1608
1609
|
<line num="18" count="2" type="stmt"/>
|
|
@@ -1616,9 +1617,9 @@
|
|
|
1616
1617
|
<line num="38" count="9" type="stmt"/>
|
|
1617
1618
|
<line num="39" count="9" type="stmt"/>
|
|
1618
1619
|
<line num="42" count="5" type="stmt"/>
|
|
1619
|
-
<line num="43" count="
|
|
1620
|
-
<line num="44" count="
|
|
1621
|
-
<line num="45" count="
|
|
1620
|
+
<line num="43" count="17" type="stmt"/>
|
|
1621
|
+
<line num="44" count="17" type="stmt"/>
|
|
1622
|
+
<line num="45" count="17" type="stmt"/>
|
|
1622
1623
|
<line num="48" count="5" type="stmt"/>
|
|
1623
1624
|
<line num="49" count="4" type="stmt"/>
|
|
1624
1625
|
<line num="51" count="4" type="cond" truecount="2" falsecount="0"/>
|