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.
- package/common.ts +2 -2
- package/coverage/clover.xml +10 -9
- 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 +8 -2
- 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 +1 -1
- 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/dist/models/bxml/verbs/Bridge.d.ts +2 -0
- package/models/bxml/verbs/Bridge.ts +2 -0
- 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="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="
|
|
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">
|
|
@@ -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="
|
|
1359
|
-
<line num="
|
|
1360
|
-
<line num="
|
|
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"/>
|