hume 0.5.17 → 0.6.0
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 +4 -3
- package/Client.js +6 -6
- package/api/resources/customModels/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/datasets/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/datasets/client/Client.js +38 -30
- package/api/resources/customModels/resources/files/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/files/client/Client.js +26 -20
- package/api/resources/customModels/resources/jobs/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/jobs/client/Client.js +6 -4
- package/api/resources/customModels/resources/models/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/models/client/Client.js +18 -12
- package/api/resources/empathicVoice/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.js +6 -4
- package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/configs/client/Client.js +27 -18
- package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +27 -18
- package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/tools/client/Client.js +27 -18
- package/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +17 -12
- package/api/resources/index.d.ts +1 -1
- package/api/resources/index.js +2 -2
- package/core/fetcher/Fetcher.d.ts +1 -0
- package/core/fetcher/Fetcher.js +106 -20
- package/core/form-data-utils/FormDataWrapper.d.ts +24 -0
- package/core/form-data-utils/FormDataWrapper.js +105 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +17 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/dist/Client.d.ts +4 -3
- package/dist/Client.js +6 -6
- package/dist/api/resources/customModels/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/datasets/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/datasets/client/Client.js +38 -30
- package/dist/api/resources/customModels/resources/files/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/files/client/Client.js +26 -20
- package/dist/api/resources/customModels/resources/jobs/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/jobs/client/Client.js +6 -4
- package/dist/api/resources/customModels/resources/models/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/models/client/Client.js +18 -12
- package/dist/api/resources/empathicVoice/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +6 -4
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +27 -18
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +27 -18
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +27 -18
- package/dist/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +17 -12
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.js +2 -2
- package/dist/core/fetcher/Fetcher.d.ts +1 -0
- package/dist/core/fetcher/Fetcher.js +106 -20
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +24 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +105 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +17 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/serialization/resources/index.d.ts +1 -1
- package/dist/serialization/resources/index.js +2 -2
- package/package.json +3 -1
- package/serialization/resources/index.d.ts +1 -1
- package/serialization/resources/index.js +2 -2
|
@@ -67,13 +67,14 @@ class Chats {
|
|
|
67
67
|
_queryParams["page_size"] = pageSize.toString();
|
|
68
68
|
}
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "chats"),
|
|
70
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/chats"),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
queryParameters: _queryParams,
|
|
75
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
76
76
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
77
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
77
78
|
});
|
|
78
79
|
if (_response.ok) {
|
|
79
80
|
return yield serializers.empathicVoice.ReturnPagedChats.parseOrThrow(_response.body, {
|
|
@@ -125,13 +126,14 @@ class Chats {
|
|
|
125
126
|
_queryParams["page_number"] = pageNumber.toString();
|
|
126
127
|
}
|
|
127
128
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
129
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chats/${encodeURIComponent(id)}`),
|
|
129
130
|
method: "GET",
|
|
130
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
131
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
131
132
|
contentType: "application/json",
|
|
132
133
|
queryParameters: _queryParams,
|
|
133
134
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
134
135
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
136
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
135
137
|
});
|
|
136
138
|
if (_response.ok) {
|
|
137
139
|
return yield serializers.empathicVoice.ReturnChatPagedEvents.parseOrThrow(_response.body, {
|
|
@@ -70,13 +70,14 @@ class Configs {
|
|
|
70
70
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
71
71
|
}
|
|
72
72
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
73
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "configs"),
|
|
73
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/configs"),
|
|
74
74
|
method: "GET",
|
|
75
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
76
76
|
contentType: "application/json",
|
|
77
77
|
queryParameters: _queryParams,
|
|
78
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
79
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
81
|
});
|
|
81
82
|
if (_response.ok) {
|
|
82
83
|
return yield serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
|
|
@@ -121,15 +122,16 @@ class Configs {
|
|
|
121
122
|
var _a, _b;
|
|
122
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
124
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
124
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "configs"),
|
|
125
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/configs"),
|
|
125
126
|
method: "POST",
|
|
126
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
127
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
127
128
|
contentType: "application/json",
|
|
128
129
|
body: yield serializers.empathicVoice.PostedConfig.jsonOrThrow(request, {
|
|
129
130
|
unrecognizedObjectKeys: "strip",
|
|
130
131
|
}),
|
|
131
132
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
132
133
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
134
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
133
135
|
});
|
|
134
136
|
if (_response.ok) {
|
|
135
137
|
return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
|
|
@@ -184,13 +186,14 @@ class Configs {
|
|
|
184
186
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
185
187
|
}
|
|
186
188
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
189
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
188
190
|
method: "GET",
|
|
189
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
191
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
190
192
|
contentType: "application/json",
|
|
191
193
|
queryParameters: _queryParams,
|
|
192
194
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
193
195
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
196
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
194
197
|
});
|
|
195
198
|
if (_response.ok) {
|
|
196
199
|
return yield serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
|
|
@@ -234,15 +237,16 @@ class Configs {
|
|
|
234
237
|
var _a, _b;
|
|
235
238
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
240
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
238
241
|
method: "POST",
|
|
239
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
242
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
240
243
|
contentType: "application/json",
|
|
241
244
|
body: yield serializers.empathicVoice.PostedConfigVersion.jsonOrThrow(request, {
|
|
242
245
|
unrecognizedObjectKeys: "strip",
|
|
243
246
|
}),
|
|
244
247
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
245
248
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
249
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
246
250
|
});
|
|
247
251
|
if (_response.ok) {
|
|
248
252
|
return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
|
|
@@ -285,12 +289,13 @@ class Configs {
|
|
|
285
289
|
var _a, _b;
|
|
286
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
287
291
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
292
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
289
293
|
method: "DELETE",
|
|
290
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
294
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
291
295
|
contentType: "application/json",
|
|
292
296
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
293
297
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
298
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
294
299
|
});
|
|
295
300
|
if (_response.ok) {
|
|
296
301
|
return;
|
|
@@ -330,9 +335,9 @@ class Configs {
|
|
|
330
335
|
var _a, _b;
|
|
331
336
|
return __awaiter(this, void 0, void 0, function* () {
|
|
332
337
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
338
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
334
339
|
method: "PATCH",
|
|
335
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
340
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
336
341
|
contentType: "application/json",
|
|
337
342
|
body: yield serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, {
|
|
338
343
|
unrecognizedObjectKeys: "strip",
|
|
@@ -340,6 +345,7 @@ class Configs {
|
|
|
340
345
|
responseType: "text",
|
|
341
346
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
342
347
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
348
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
343
349
|
});
|
|
344
350
|
if (_response.ok) {
|
|
345
351
|
return _response.body;
|
|
@@ -377,12 +383,13 @@ class Configs {
|
|
|
377
383
|
var _a, _b;
|
|
378
384
|
return __awaiter(this, void 0, void 0, function* () {
|
|
379
385
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
386
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
381
387
|
method: "GET",
|
|
382
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
388
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
383
389
|
contentType: "application/json",
|
|
384
390
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
385
391
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
392
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
386
393
|
});
|
|
387
394
|
if (_response.ok) {
|
|
388
395
|
return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
|
|
@@ -426,12 +433,13 @@ class Configs {
|
|
|
426
433
|
var _a, _b;
|
|
427
434
|
return __awaiter(this, void 0, void 0, function* () {
|
|
428
435
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
436
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
430
437
|
method: "DELETE",
|
|
431
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
438
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
432
439
|
contentType: "application/json",
|
|
433
440
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
434
441
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
442
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
435
443
|
});
|
|
436
444
|
if (_response.ok) {
|
|
437
445
|
return;
|
|
@@ -470,15 +478,16 @@ class Configs {
|
|
|
470
478
|
var _a, _b;
|
|
471
479
|
return __awaiter(this, void 0, void 0, function* () {
|
|
472
480
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}`),
|
|
481
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
474
482
|
method: "PATCH",
|
|
475
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
483
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
476
484
|
contentType: "application/json",
|
|
477
485
|
body: yield serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, {
|
|
478
486
|
unrecognizedObjectKeys: "strip",
|
|
479
487
|
}),
|
|
480
488
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
481
489
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
490
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
482
491
|
});
|
|
483
492
|
if (_response.ok) {
|
|
484
493
|
return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
|
|
@@ -70,13 +70,14 @@ class Prompts {
|
|
|
70
70
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
71
71
|
}
|
|
72
72
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
73
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "prompts"),
|
|
73
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/prompts"),
|
|
74
74
|
method: "GET",
|
|
75
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
76
76
|
contentType: "application/json",
|
|
77
77
|
queryParameters: _queryParams,
|
|
78
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
79
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
81
|
});
|
|
81
82
|
if (_response.ok) {
|
|
82
83
|
return yield serializers.empathicVoice.ReturnPagedPrompts.parseOrThrow(_response.body, {
|
|
@@ -122,15 +123,16 @@ class Prompts {
|
|
|
122
123
|
var _a, _b;
|
|
123
124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
125
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
125
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "prompts"),
|
|
126
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/prompts"),
|
|
126
127
|
method: "POST",
|
|
127
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
128
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
128
129
|
contentType: "application/json",
|
|
129
130
|
body: yield serializers.empathicVoice.PostedPrompt.jsonOrThrow(request, {
|
|
130
131
|
unrecognizedObjectKeys: "strip",
|
|
131
132
|
}),
|
|
132
133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
133
134
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
135
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
134
136
|
});
|
|
135
137
|
if (_response.ok) {
|
|
136
138
|
return yield serializers.empathicVoice.prompts.createPrompt.Response.parseOrThrow(_response.body, {
|
|
@@ -185,13 +187,14 @@ class Prompts {
|
|
|
185
187
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
186
188
|
}
|
|
187
189
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
188
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}`),
|
|
190
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
189
191
|
method: "GET",
|
|
190
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
192
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
191
193
|
contentType: "application/json",
|
|
192
194
|
queryParameters: _queryParams,
|
|
193
195
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
194
196
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
197
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
195
198
|
});
|
|
196
199
|
if (_response.ok) {
|
|
197
200
|
return yield serializers.empathicVoice.ReturnPagedPrompts.parseOrThrow(_response.body, {
|
|
@@ -237,15 +240,16 @@ class Prompts {
|
|
|
237
240
|
var _a, _b;
|
|
238
241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
239
242
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
240
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}`),
|
|
243
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
241
244
|
method: "POST",
|
|
242
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
245
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
243
246
|
contentType: "application/json",
|
|
244
247
|
body: yield serializers.empathicVoice.PostedPromptVersion.jsonOrThrow(request, {
|
|
245
248
|
unrecognizedObjectKeys: "strip",
|
|
246
249
|
}),
|
|
247
250
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
248
251
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
252
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
249
253
|
});
|
|
250
254
|
if (_response.ok) {
|
|
251
255
|
return yield serializers.empathicVoice.prompts.createPromptVerison.Response.parseOrThrow(_response.body, {
|
|
@@ -288,12 +292,13 @@ class Prompts {
|
|
|
288
292
|
var _a, _b;
|
|
289
293
|
return __awaiter(this, void 0, void 0, function* () {
|
|
290
294
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
291
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}`),
|
|
295
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
292
296
|
method: "DELETE",
|
|
293
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
297
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
294
298
|
contentType: "application/json",
|
|
295
299
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
296
300
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
301
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
297
302
|
});
|
|
298
303
|
if (_response.ok) {
|
|
299
304
|
return;
|
|
@@ -333,9 +338,9 @@ class Prompts {
|
|
|
333
338
|
var _a, _b;
|
|
334
339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
335
340
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
336
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}`),
|
|
341
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
337
342
|
method: "PATCH",
|
|
338
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
343
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
339
344
|
contentType: "application/json",
|
|
340
345
|
body: yield serializers.empathicVoice.PostedPromptName.jsonOrThrow(request, {
|
|
341
346
|
unrecognizedObjectKeys: "strip",
|
|
@@ -343,6 +348,7 @@ class Prompts {
|
|
|
343
348
|
responseType: "text",
|
|
344
349
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
345
350
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
351
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
346
352
|
});
|
|
347
353
|
if (_response.ok) {
|
|
348
354
|
return _response.body;
|
|
@@ -380,12 +386,13 @@ class Prompts {
|
|
|
380
386
|
var _a, _b;
|
|
381
387
|
return __awaiter(this, void 0, void 0, function* () {
|
|
382
388
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
383
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
389
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
384
390
|
method: "GET",
|
|
385
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
391
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
386
392
|
contentType: "application/json",
|
|
387
393
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
388
394
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
395
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
389
396
|
});
|
|
390
397
|
if (_response.ok) {
|
|
391
398
|
return yield serializers.empathicVoice.prompts.getPromptVersion.Response.parseOrThrow(_response.body, {
|
|
@@ -429,12 +436,13 @@ class Prompts {
|
|
|
429
436
|
var _a, _b;
|
|
430
437
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
438
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
432
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
439
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
433
440
|
method: "DELETE",
|
|
434
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
441
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
435
442
|
contentType: "application/json",
|
|
436
443
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
437
444
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
445
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
438
446
|
});
|
|
439
447
|
if (_response.ok) {
|
|
440
448
|
return;
|
|
@@ -473,15 +481,16 @@ class Prompts {
|
|
|
473
481
|
var _a, _b;
|
|
474
482
|
return __awaiter(this, void 0, void 0, function* () {
|
|
475
483
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
476
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
484
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
477
485
|
method: "PATCH",
|
|
478
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
486
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
479
487
|
contentType: "application/json",
|
|
480
488
|
body: yield serializers.empathicVoice.PostedPromptVersionDescription.jsonOrThrow(request, {
|
|
481
489
|
unrecognizedObjectKeys: "strip",
|
|
482
490
|
}),
|
|
483
491
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
484
492
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
493
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
485
494
|
});
|
|
486
495
|
if (_response.ok) {
|
|
487
496
|
return yield serializers.empathicVoice.prompts.updatePromptDescription.Response.parseOrThrow(_response.body, {
|
|
@@ -73,13 +73,14 @@ class Tools {
|
|
|
73
73
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
74
74
|
}
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "tools"),
|
|
76
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/tools"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
queryParameters: _queryParams,
|
|
81
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
82
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
83
84
|
});
|
|
84
85
|
if (_response.ok) {
|
|
85
86
|
return yield serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
|
|
@@ -128,15 +129,16 @@ class Tools {
|
|
|
128
129
|
var _a, _b;
|
|
129
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
131
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
131
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "tools"),
|
|
132
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/tools"),
|
|
132
133
|
method: "POST",
|
|
133
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
134
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
134
135
|
contentType: "application/json",
|
|
135
136
|
body: yield serializers.empathicVoice.PostedUserDefinedTool.jsonOrThrow(request, {
|
|
136
137
|
unrecognizedObjectKeys: "strip",
|
|
137
138
|
}),
|
|
138
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
139
140
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
141
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
140
142
|
});
|
|
141
143
|
if (_response.ok) {
|
|
142
144
|
return yield serializers.empathicVoice.tools.createTool.Response.parseOrThrow(_response.body, {
|
|
@@ -191,13 +193,14 @@ class Tools {
|
|
|
191
193
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
192
194
|
}
|
|
193
195
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
194
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
196
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
195
197
|
method: "GET",
|
|
196
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
198
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
197
199
|
contentType: "application/json",
|
|
198
200
|
queryParameters: _queryParams,
|
|
199
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
200
202
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
203
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
204
|
});
|
|
202
205
|
if (_response.ok) {
|
|
203
206
|
return yield serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
|
|
@@ -246,15 +249,16 @@ class Tools {
|
|
|
246
249
|
var _a, _b;
|
|
247
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
251
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
249
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
252
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
250
253
|
method: "POST",
|
|
251
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
254
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
252
255
|
contentType: "application/json",
|
|
253
256
|
body: yield serializers.empathicVoice.PostedUserDefinedToolVersion.jsonOrThrow(request, {
|
|
254
257
|
unrecognizedObjectKeys: "strip",
|
|
255
258
|
}),
|
|
256
259
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
257
260
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
261
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
262
|
});
|
|
259
263
|
if (_response.ok) {
|
|
260
264
|
return yield serializers.empathicVoice.tools.createToolVersion.Response.parseOrThrow(_response.body, {
|
|
@@ -297,12 +301,13 @@ class Tools {
|
|
|
297
301
|
var _a, _b;
|
|
298
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
303
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
300
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
304
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
301
305
|
method: "DELETE",
|
|
302
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
306
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
303
307
|
contentType: "application/json",
|
|
304
308
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
305
309
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
310
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
306
311
|
});
|
|
307
312
|
if (_response.ok) {
|
|
308
313
|
return;
|
|
@@ -342,9 +347,9 @@ class Tools {
|
|
|
342
347
|
var _a, _b;
|
|
343
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
349
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
345
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
350
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
346
351
|
method: "PATCH",
|
|
347
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
352
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
348
353
|
contentType: "application/json",
|
|
349
354
|
body: yield serializers.empathicVoice.PostedUserDefinedToolName.jsonOrThrow(request, {
|
|
350
355
|
unrecognizedObjectKeys: "strip",
|
|
@@ -352,6 +357,7 @@ class Tools {
|
|
|
352
357
|
responseType: "text",
|
|
353
358
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
354
359
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
360
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
355
361
|
});
|
|
356
362
|
if (_response.ok) {
|
|
357
363
|
return _response.body;
|
|
@@ -389,12 +395,13 @@ class Tools {
|
|
|
389
395
|
var _a, _b;
|
|
390
396
|
return __awaiter(this, void 0, void 0, function* () {
|
|
391
397
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
392
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
398
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
393
399
|
method: "GET",
|
|
394
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
400
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
395
401
|
contentType: "application/json",
|
|
396
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
397
403
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
404
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
398
405
|
});
|
|
399
406
|
if (_response.ok) {
|
|
400
407
|
return yield serializers.empathicVoice.tools.getToolVersion.Response.parseOrThrow(_response.body, {
|
|
@@ -438,12 +445,13 @@ class Tools {
|
|
|
438
445
|
var _a, _b;
|
|
439
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
440
447
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
441
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
448
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
442
449
|
method: "DELETE",
|
|
443
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
450
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
444
451
|
contentType: "application/json",
|
|
445
452
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
446
453
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
454
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
447
455
|
});
|
|
448
456
|
if (_response.ok) {
|
|
449
457
|
return;
|
|
@@ -484,15 +492,16 @@ class Tools {
|
|
|
484
492
|
var _a, _b;
|
|
485
493
|
return __awaiter(this, void 0, void 0, function* () {
|
|
486
494
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
487
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
495
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
488
496
|
method: "PATCH",
|
|
489
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
497
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
490
498
|
contentType: "application/json",
|
|
491
499
|
body: yield serializers.empathicVoice.PostedUserDefinedToolVersionDescription.jsonOrThrow(request, {
|
|
492
500
|
unrecognizedObjectKeys: "strip",
|
|
493
501
|
}),
|
|
494
502
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
495
503
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
504
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
496
505
|
});
|
|
497
506
|
if (_response.ok) {
|
|
498
507
|
return yield serializers.empathicVoice.tools.updateToolDescription.Response.parseOrThrow(_response.body, {
|