hume 0.5.14 → 0.5.16
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/Client.d.ts +0 -1
- package/api/resources/customModels/client/Client.d.ts +0 -1
- package/api/resources/customModels/resources/datasets/client/Client.d.ts +0 -1
- package/api/resources/customModels/resources/datasets/client/Client.js +9 -27
- package/api/resources/customModels/resources/files/client/Client.d.ts +0 -1
- package/api/resources/customModels/resources/files/client/Client.js +7 -21
- package/api/resources/customModels/resources/jobs/client/Client.d.ts +0 -1
- package/api/resources/customModels/resources/jobs/client/Client.js +2 -6
- package/api/resources/customModels/resources/models/client/Client.d.ts +0 -1
- package/api/resources/customModels/resources/models/client/Client.js +6 -18
- package/api/resources/empathicVoice/client/Client.d.ts +0 -1
- package/api/resources/empathicVoice/client/StreamSocket.d.ts +2 -3
- package/api/resources/empathicVoice/client/StreamSocket.js +3 -9
- package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +0 -1
- package/api/resources/empathicVoice/resources/chats/client/Client.js +2 -6
- package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +0 -1
- package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -27
- package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +0 -1
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -27
- package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +0 -1
- package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -27
- package/api/resources/expressionMeasurement/client/Client.d.ts +0 -1
- package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +0 -1
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -18
- package/dist/Client.d.ts +0 -1
- package/dist/api/resources/customModels/client/Client.d.ts +0 -1
- package/dist/api/resources/customModels/resources/datasets/client/Client.d.ts +0 -1
- package/dist/api/resources/customModels/resources/datasets/client/Client.js +9 -27
- package/dist/api/resources/customModels/resources/files/client/Client.d.ts +0 -1
- package/dist/api/resources/customModels/resources/files/client/Client.js +7 -21
- package/dist/api/resources/customModels/resources/jobs/client/Client.d.ts +0 -1
- package/dist/api/resources/customModels/resources/jobs/client/Client.js +2 -6
- package/dist/api/resources/customModels/resources/models/client/Client.d.ts +0 -1
- package/dist/api/resources/customModels/resources/models/client/Client.js +6 -18
- package/dist/api/resources/empathicVoice/client/Client.d.ts +0 -1
- package/dist/api/resources/empathicVoice/client/StreamSocket.d.ts +2 -3
- package/dist/api/resources/empathicVoice/client/StreamSocket.js +3 -9
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +0 -1
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +2 -6
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +0 -1
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -27
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +0 -1
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -27
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +0 -1
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -27
- package/dist/api/resources/expressionMeasurement/client/Client.d.ts +0 -1
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +0 -1
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -18
- package/package.json +1 -1
package/Client.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export declare namespace HumeClient {
|
|
|
10
10
|
interface Options {
|
|
11
11
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
14
13
|
fetcher?: core.FetchFunction;
|
|
15
14
|
}
|
|
16
15
|
interface RequestOptions {
|
|
@@ -11,7 +11,6 @@ export declare namespace CustomModels {
|
|
|
11
11
|
interface Options {
|
|
12
12
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
13
13
|
apiKey?: core.Supplier<string | undefined>;
|
|
14
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
15
14
|
fetcher?: core.FetchFunction;
|
|
16
15
|
}
|
|
17
16
|
interface RequestOptions {
|
|
@@ -10,7 +10,6 @@ export declare namespace Datasets {
|
|
|
10
10
|
interface Options {
|
|
11
11
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
14
13
|
fetcher?: core.FetchFunction;
|
|
15
14
|
}
|
|
16
15
|
interface RequestOptions {
|
|
@@ -78,9 +78,7 @@ class Datasets {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "datasets"),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-
|
|
82
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
83
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
84
82
|
contentType: "application/json",
|
|
85
83
|
queryParameters: _queryParams,
|
|
86
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -141,9 +139,7 @@ class Datasets {
|
|
|
141
139
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
142
140
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "datasets"),
|
|
143
141
|
method: "POST",
|
|
144
|
-
headers: Object.assign({ "X-
|
|
145
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
146
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
142
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
147
143
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
148
144
|
body: _request,
|
|
149
145
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -194,9 +190,7 @@ class Datasets {
|
|
|
194
190
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
195
191
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/${encodeURIComponent(id)}`),
|
|
196
192
|
method: "GET",
|
|
197
|
-
headers: Object.assign({ "X-
|
|
198
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
199
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
193
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
200
194
|
contentType: "application/json",
|
|
201
195
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
202
196
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -253,9 +247,7 @@ class Datasets {
|
|
|
253
247
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
254
248
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/${encodeURIComponent(id)}`),
|
|
255
249
|
method: "POST",
|
|
256
|
-
headers: Object.assign({ "X-
|
|
257
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
258
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
250
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
259
251
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
260
252
|
body: _request,
|
|
261
253
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -306,9 +298,7 @@ class Datasets {
|
|
|
306
298
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
299
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/${encodeURIComponent(id)}`),
|
|
308
300
|
method: "DELETE",
|
|
309
|
-
headers: Object.assign({ "X-
|
|
310
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
311
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
301
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
312
302
|
contentType: "application/json",
|
|
313
303
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
314
304
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -364,9 +354,7 @@ class Datasets {
|
|
|
364
354
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
365
355
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/${encodeURIComponent(id)}/versions`),
|
|
366
356
|
method: "GET",
|
|
367
|
-
headers: Object.assign({ "X-
|
|
368
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
369
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
357
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
370
358
|
contentType: "application/json",
|
|
371
359
|
queryParameters: _queryParams,
|
|
372
360
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -429,9 +417,7 @@ class Datasets {
|
|
|
429
417
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
430
418
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/${encodeURIComponent(id)}/files`),
|
|
431
419
|
method: "GET",
|
|
432
|
-
headers: Object.assign({ "X-
|
|
433
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
434
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
420
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
435
421
|
contentType: "application/json",
|
|
436
422
|
queryParameters: _queryParams,
|
|
437
423
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -482,9 +468,7 @@ class Datasets {
|
|
|
482
468
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
483
469
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/version/${encodeURIComponent(id)}`),
|
|
484
470
|
method: "GET",
|
|
485
|
-
headers: Object.assign({ "X-
|
|
486
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
487
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
471
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
488
472
|
contentType: "application/json",
|
|
489
473
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
490
474
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -546,9 +530,7 @@ class Datasets {
|
|
|
546
530
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
547
531
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `datasets/version/${encodeURIComponent(id)}/files`),
|
|
548
532
|
method: "GET",
|
|
549
|
-
headers: Object.assign({ "X-
|
|
550
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
551
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
533
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
552
534
|
contentType: "application/json",
|
|
553
535
|
queryParameters: _queryParams,
|
|
554
536
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,7 +10,6 @@ export declare namespace Files {
|
|
|
10
10
|
interface Options {
|
|
11
11
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
14
13
|
fetcher?: core.FetchFunction;
|
|
15
14
|
}
|
|
16
15
|
interface RequestOptions {
|
|
@@ -75,9 +75,7 @@ class Files {
|
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
76
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "files"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign({ "X-
|
|
79
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
80
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
81
79
|
contentType: "application/json",
|
|
82
80
|
queryParameters: _queryParams,
|
|
83
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -134,9 +132,7 @@ class Files {
|
|
|
134
132
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
135
133
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "files"),
|
|
136
134
|
method: "POST",
|
|
137
|
-
headers: Object.assign({ "X-
|
|
138
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
139
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
135
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
140
136
|
contentType: "application/json",
|
|
141
137
|
body: yield serializers.customModels.files.createFiles.Request.jsonOrThrow(request, {
|
|
142
138
|
unrecognizedObjectKeys: "strip",
|
|
@@ -195,9 +191,7 @@ class Files {
|
|
|
195
191
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
196
192
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "files/upload"),
|
|
197
193
|
method: "POST",
|
|
198
|
-
headers: Object.assign({ "X-
|
|
199
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
200
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
194
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
201
195
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
202
196
|
body: _request,
|
|
203
197
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -248,9 +242,7 @@ class Files {
|
|
|
248
242
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
249
243
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}`),
|
|
250
244
|
method: "GET",
|
|
251
|
-
headers: Object.assign({ "X-
|
|
252
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
253
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
245
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
254
246
|
contentType: "application/json",
|
|
255
247
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
256
248
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -300,9 +292,7 @@ class Files {
|
|
|
300
292
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
301
293
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}`),
|
|
302
294
|
method: "DELETE",
|
|
303
|
-
headers: Object.assign({ "X-
|
|
304
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
305
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
295
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
306
296
|
contentType: "application/json",
|
|
307
297
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
308
298
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -352,9 +342,7 @@ class Files {
|
|
|
352
342
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
353
343
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}`),
|
|
354
344
|
method: "PATCH",
|
|
355
|
-
headers: Object.assign({ "X-
|
|
356
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
357
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
345
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
358
346
|
contentType: "application/json",
|
|
359
347
|
queryParameters: _queryParams,
|
|
360
348
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -405,9 +393,7 @@ class Files {
|
|
|
405
393
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
406
394
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}/predictions`),
|
|
407
395
|
method: "GET",
|
|
408
|
-
headers: Object.assign({ "X-
|
|
409
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
410
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
396
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
411
397
|
contentType: "application/json",
|
|
412
398
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
413
399
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -8,7 +8,6 @@ export declare namespace Jobs {
|
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
10
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
12
11
|
fetcher?: core.FetchFunction;
|
|
13
12
|
}
|
|
14
13
|
interface RequestOptions {
|
|
@@ -70,9 +70,7 @@ class Jobs {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs/tl/train"),
|
|
72
72
|
method: "POST",
|
|
73
|
-
headers: Object.assign({ "X-
|
|
74
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
75
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
76
74
|
contentType: "application/json",
|
|
77
75
|
body: yield serializers.customModels.TrainingBaseRequest.jsonOrThrow(request, {
|
|
78
76
|
unrecognizedObjectKeys: "strip",
|
|
@@ -129,9 +127,7 @@ class Jobs {
|
|
|
129
127
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
130
128
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs/tl/inference"),
|
|
131
129
|
method: "POST",
|
|
132
|
-
headers: Object.assign({ "X-
|
|
133
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
134
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
130
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
135
131
|
contentType: "application/json",
|
|
136
132
|
body: yield serializers.customModels.TlInferenceBaseRequest.jsonOrThrow(request, {
|
|
137
133
|
unrecognizedObjectKeys: "strip",
|
|
@@ -8,7 +8,6 @@ export declare namespace Models {
|
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
10
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
12
11
|
fetcher?: core.FetchFunction;
|
|
13
12
|
}
|
|
14
13
|
interface RequestOptions {
|
|
@@ -77,9 +77,7 @@ class Models {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "models"),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign({ "X-
|
|
81
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
82
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
80
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
83
81
|
contentType: "application/json",
|
|
84
82
|
queryParameters: _queryParams,
|
|
85
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -130,9 +128,7 @@ class Models {
|
|
|
130
128
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
131
129
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/${encodeURIComponent(id)}`),
|
|
132
130
|
method: "GET",
|
|
133
|
-
headers: Object.assign({ "X-
|
|
134
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
135
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
131
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
136
132
|
contentType: "application/json",
|
|
137
133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
138
134
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -188,9 +184,7 @@ class Models {
|
|
|
188
184
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
189
185
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/${encodeURIComponent(id)}`),
|
|
190
186
|
method: "PATCH",
|
|
191
|
-
headers: Object.assign({ "X-
|
|
192
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
193
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
187
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
194
188
|
contentType: "application/json",
|
|
195
189
|
queryParameters: _queryParams,
|
|
196
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -260,9 +254,7 @@ class Models {
|
|
|
260
254
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
261
255
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "models/version"),
|
|
262
256
|
method: "GET",
|
|
263
|
-
headers: Object.assign({ "X-
|
|
264
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
265
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
257
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
266
258
|
contentType: "application/json",
|
|
267
259
|
queryParameters: _queryParams,
|
|
268
260
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -319,9 +311,7 @@ class Models {
|
|
|
319
311
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
320
312
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/version/${encodeURIComponent(id)}`),
|
|
321
313
|
method: "GET",
|
|
322
|
-
headers: Object.assign({ "X-
|
|
323
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
324
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
314
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
325
315
|
contentType: "application/json",
|
|
326
316
|
queryParameters: _queryParams,
|
|
327
317
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -373,9 +363,7 @@ class Models {
|
|
|
373
363
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
374
364
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/version/${encodeURIComponent(id)}`),
|
|
375
365
|
method: "PATCH",
|
|
376
|
-
headers: Object.assign({ "X-
|
|
377
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
378
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
366
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
379
367
|
contentType: "application/json",
|
|
380
368
|
body: yield serializers.customModels.models.updateModelDescription.Request.jsonOrThrow(request, {
|
|
381
369
|
unrecognizedObjectKeys: "strip",
|
|
@@ -11,7 +11,6 @@ export declare namespace EmpathicVoice {
|
|
|
11
11
|
interface Options {
|
|
12
12
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
13
13
|
apiKey?: core.Supplier<string | undefined>;
|
|
14
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
15
14
|
fetcher?: core.FetchFunction;
|
|
16
15
|
}
|
|
17
16
|
interface RequestOptions {
|
|
@@ -9,8 +9,8 @@ export declare class StreamSocket {
|
|
|
9
9
|
constructor({ websocket }: StreamSocket.Args);
|
|
10
10
|
/**
|
|
11
11
|
* Send audio input
|
|
12
|
-
|
|
13
|
-
sendAudioInput(message:
|
|
12
|
+
*/
|
|
13
|
+
sendAudioInput(message: Omit<Hume.empathicVoice.AudioInput, "type">): Promise<void>;
|
|
14
14
|
/**
|
|
15
15
|
* Send session settings
|
|
16
16
|
*/
|
|
@@ -28,6 +28,5 @@ export declare class StreamSocket {
|
|
|
28
28
|
*/
|
|
29
29
|
close(): void;
|
|
30
30
|
private sendJson;
|
|
31
|
-
private sendRaw;
|
|
32
31
|
private tillSocketOpen;
|
|
33
32
|
}
|
|
@@ -40,10 +40,10 @@ class StreamSocket {
|
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Send audio input
|
|
43
|
-
|
|
43
|
+
*/
|
|
44
44
|
sendAudioInput(message) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
yield this.
|
|
46
|
+
yield this.sendJson(Object.assign({ type: "audio_input" }, message));
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
@@ -59,7 +59,7 @@ class StreamSocket {
|
|
|
59
59
|
*/
|
|
60
60
|
sendAssistantInput(message) {
|
|
61
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
yield this.sendJson(Object.assign(
|
|
62
|
+
yield this.sendJson(Object.assign({ type: "assistant_input" }, message));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
@@ -88,12 +88,6 @@ class StreamSocket {
|
|
|
88
88
|
this.websocket.send(JSON.stringify(jsonPayload));
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
sendRaw(payload) {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
yield this.tillSocketOpen();
|
|
94
|
-
this.websocket.send(payload);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
91
|
tillSocketOpen() {
|
|
98
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
93
|
if (this.websocket.readyState === 1) {
|
|
@@ -8,7 +8,6 @@ export declare namespace Chats {
|
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
10
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
12
11
|
fetcher?: core.FetchFunction;
|
|
13
12
|
}
|
|
14
13
|
interface RequestOptions {
|
|
@@ -69,9 +69,7 @@ class Chats {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "chats"),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-
|
|
73
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
74
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
75
73
|
contentType: "application/json",
|
|
76
74
|
queryParameters: _queryParams,
|
|
77
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -129,9 +127,7 @@ class Chats {
|
|
|
129
127
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
130
128
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `chats/${encodeURIComponent(id)}`),
|
|
131
129
|
method: "GET",
|
|
132
|
-
headers: Object.assign({ "X-
|
|
133
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
134
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
130
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
135
131
|
contentType: "application/json",
|
|
136
132
|
queryParameters: _queryParams,
|
|
137
133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -8,7 +8,6 @@ export declare namespace Configs {
|
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
10
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
12
11
|
fetcher?: core.FetchFunction;
|
|
13
12
|
}
|
|
14
13
|
interface RequestOptions {
|
|
@@ -72,9 +72,7 @@ class Configs {
|
|
|
72
72
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
73
73
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "configs"),
|
|
74
74
|
method: "GET",
|
|
75
|
-
headers: Object.assign({ "X-
|
|
76
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
77
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
78
76
|
contentType: "application/json",
|
|
79
77
|
queryParameters: _queryParams,
|
|
80
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -125,9 +123,7 @@ class Configs {
|
|
|
125
123
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
126
124
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "configs"),
|
|
127
125
|
method: "POST",
|
|
128
|
-
headers: Object.assign({ "X-
|
|
129
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
130
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
126
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
131
127
|
contentType: "application/json",
|
|
132
128
|
body: yield serializers.empathicVoice.PostedConfig.jsonOrThrow(request, {
|
|
133
129
|
unrecognizedObjectKeys: "strip",
|
|
@@ -190,9 +186,7 @@ class Configs {
|
|
|
190
186
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
191
187
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}`),
|
|
192
188
|
method: "GET",
|
|
193
|
-
headers: Object.assign({ "X-
|
|
194
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
195
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
189
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
196
190
|
contentType: "application/json",
|
|
197
191
|
queryParameters: _queryParams,
|
|
198
192
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -242,9 +236,7 @@ class Configs {
|
|
|
242
236
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
243
237
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}`),
|
|
244
238
|
method: "POST",
|
|
245
|
-
headers: Object.assign({ "X-
|
|
246
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
247
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
239
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
248
240
|
contentType: "application/json",
|
|
249
241
|
body: yield serializers.empathicVoice.PostedConfigVersion.jsonOrThrow(request, {
|
|
250
242
|
unrecognizedObjectKeys: "strip",
|
|
@@ -295,9 +287,7 @@ class Configs {
|
|
|
295
287
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
296
288
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}`),
|
|
297
289
|
method: "DELETE",
|
|
298
|
-
headers: Object.assign({ "X-
|
|
299
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
300
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
290
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
301
291
|
contentType: "application/json",
|
|
302
292
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
303
293
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -342,9 +332,7 @@ class Configs {
|
|
|
342
332
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
343
333
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}`),
|
|
344
334
|
method: "PATCH",
|
|
345
|
-
headers: Object.assign({ "X-
|
|
346
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
347
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
335
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
348
336
|
contentType: "application/json",
|
|
349
337
|
body: yield serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, {
|
|
350
338
|
unrecognizedObjectKeys: "strip",
|
|
@@ -391,9 +379,7 @@ class Configs {
|
|
|
391
379
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
392
380
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
393
381
|
method: "GET",
|
|
394
|
-
headers: Object.assign({ "X-
|
|
395
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
396
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
382
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
397
383
|
contentType: "application/json",
|
|
398
384
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
399
385
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -442,9 +428,7 @@ class Configs {
|
|
|
442
428
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
443
429
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
444
430
|
method: "DELETE",
|
|
445
|
-
headers: Object.assign({ "X-
|
|
446
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
447
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
431
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
448
432
|
contentType: "application/json",
|
|
449
433
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
450
434
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -488,9 +472,7 @@ class Configs {
|
|
|
488
472
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
489
473
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
490
474
|
method: "PATCH",
|
|
491
|
-
headers: Object.assign({ "X-
|
|
492
|
-
? yield core.Supplier.get(this._options.accountToken)
|
|
493
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
475
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.16", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
494
476
|
contentType: "application/json",
|
|
495
477
|
body: yield serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, {
|
|
496
478
|
unrecognizedObjectKeys: "strip",
|
|
@@ -8,7 +8,6 @@ export declare namespace Prompts {
|
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.HumeEnvironment | string>;
|
|
10
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
-
accountToken?: core.Supplier<string | undefined>;
|
|
12
11
|
fetcher?: core.FetchFunction;
|
|
13
12
|
}
|
|
14
13
|
interface RequestOptions {
|