@soniox/node 2.0.2 → 2.0.3
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/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +13 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1875,11 +1875,14 @@ var SonioxAuthAPI = class {
|
|
|
1875
1875
|
* const ttsKey = await client.auth.createTemporaryKey({
|
|
1876
1876
|
* usage_type: 'tts_rt',
|
|
1877
1877
|
* expires_in_seconds: 300,
|
|
1878
|
+
* single_use: true,
|
|
1879
|
+
* max_session_duration_seconds: 600,
|
|
1878
1880
|
* });
|
|
1879
1881
|
* ```
|
|
1880
1882
|
*/
|
|
1881
1883
|
async createTemporaryKey(request, signal) {
|
|
1882
1884
|
if (!Number.isFinite(request.expires_in_seconds) || request.expires_in_seconds < 1 || request.expires_in_seconds > 3600) throw new Error("expires_in_seconds must be a finite number between 1 and 3600");
|
|
1885
|
+
if (request.max_session_duration_seconds !== void 0 && (!Number.isFinite(request.max_session_duration_seconds) || request.max_session_duration_seconds < 1 || request.max_session_duration_seconds > 18e3)) throw new Error("max_session_duration_seconds must be a finite number between 1 and 18000");
|
|
1883
1886
|
return (await this.http.request({
|
|
1884
1887
|
method: "POST",
|
|
1885
1888
|
path: "/v1/auth/temporary-api-key",
|