hume 0.9.18 → 0.10.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.
Files changed (58) hide show
  1. package/.mock/definition/empathic-voice/chat.yml +16 -16
  2. package/.mock/definition/empathic-voice/chatGroups.yml +6 -0
  3. package/.mock/definition/empathic-voice/configs.yml +6 -0
  4. package/.mock/definition/empathic-voice/customVoices.yml +3 -0
  5. package/.mock/definition/empathic-voice/tools.yml +3 -0
  6. package/.mock/definition/expression-measurement/stream/stream.yml +206 -206
  7. package/.mock/definition/tts/voices.yml +4 -2
  8. package/.mock/fern.config.json +1 -1
  9. package/api/resources/empathicVoice/resources/chat/types/index.d.ts +1 -1
  10. package/api/resources/empathicVoice/resources/chat/types/index.js +1 -1
  11. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +2 -2
  12. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +139 -115
  13. package/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
  14. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +2 -2
  15. package/api/resources/empathicVoice/resources/configs/client/Client.js +144 -120
  16. package/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +1 -1
  17. package/api/resources/empathicVoice/resources/customVoices/client/Client.js +72 -60
  18. package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  19. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -1
  20. package/api/resources/empathicVoice/resources/tools/client/Client.js +75 -63
  21. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  22. package/api/resources/expressionMeasurement/resources/stream/resources/stream/types/index.d.ts +4 -4
  23. package/api/resources/expressionMeasurement/resources/stream/resources/stream/types/index.js +4 -4
  24. package/api/resources/tts/client/Client.js +4 -4
  25. package/api/resources/tts/resources/voices/client/Client.d.ts +1 -1
  26. package/api/resources/tts/resources/voices/client/Client.js +72 -60
  27. package/dist/api/resources/empathicVoice/resources/chat/types/index.d.ts +1 -1
  28. package/dist/api/resources/empathicVoice/resources/chat/types/index.js +1 -1
  29. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +2 -2
  30. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +139 -115
  31. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
  32. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +2 -2
  33. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +144 -120
  34. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +1 -1
  35. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +72 -60
  36. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  37. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -1
  38. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +75 -63
  39. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  40. package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/types/index.d.ts +4 -4
  41. package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/types/index.js +4 -4
  42. package/dist/api/resources/tts/client/Client.js +4 -4
  43. package/dist/api/resources/tts/resources/voices/client/Client.d.ts +1 -1
  44. package/dist/api/resources/tts/resources/voices/client/Client.js +72 -60
  45. package/dist/serialization/resources/empathicVoice/resources/chat/types/index.d.ts +1 -1
  46. package/dist/serialization/resources/empathicVoice/resources/chat/types/index.js +1 -1
  47. package/dist/serialization/resources/expressionMeasurement/resources/stream/resources/stream/types/index.d.ts +4 -4
  48. package/dist/serialization/resources/expressionMeasurement/resources/stream/resources/stream/types/index.js +4 -4
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/package.json +1 -1
  52. package/reference.md +91 -14
  53. package/serialization/resources/empathicVoice/resources/chat/types/index.d.ts +1 -1
  54. package/serialization/resources/empathicVoice/resources/chat/types/index.js +1 -1
  55. package/serialization/resources/expressionMeasurement/resources/stream/resources/stream/types/index.d.ts +4 -4
  56. package/serialization/resources/expressionMeasurement/resources/stream/resources/stream/types/index.js +4 -4
  57. package/version.d.ts +1 -1
  58. package/version.js +1 -1
@@ -77,69 +77,81 @@ class Configs {
77
77
  */
78
78
  listConfigs() {
79
79
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
80
- var _a, _b, _c;
81
- const { pageNumber, pageSize, restrictToMostRecent, name } = request;
82
- const _queryParams = {};
83
- if (pageNumber != null) {
84
- _queryParams["page_number"] = pageNumber.toString();
85
- }
86
- if (pageSize != null) {
87
- _queryParams["page_size"] = pageSize.toString();
88
- }
89
- if (restrictToMostRecent != null) {
90
- _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
91
- }
92
- if (name != null) {
93
- _queryParams["name"] = name;
94
- }
95
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
96
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/configs"),
97
- method: "GET",
98
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
- contentType: "application/json",
100
- queryParameters: _queryParams,
101
- requestType: "json",
102
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
103
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
104
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
105
- });
106
- if (_response.ok) {
107
- return serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
108
- unrecognizedObjectKeys: "passthrough",
109
- allowUnrecognizedUnionMembers: true,
110
- allowUnrecognizedEnumValues: true,
111
- breadcrumbsPrefix: ["response"],
80
+ const list = (request) => __awaiter(this, void 0, void 0, function* () {
81
+ var _a, _b, _c;
82
+ const { pageNumber, pageSize, restrictToMostRecent, name } = request;
83
+ const _queryParams = {};
84
+ if (pageNumber != null) {
85
+ _queryParams["page_number"] = pageNumber.toString();
86
+ }
87
+ if (pageSize != null) {
88
+ _queryParams["page_size"] = pageSize.toString();
89
+ }
90
+ if (restrictToMostRecent != null) {
91
+ _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
92
+ }
93
+ if (name != null) {
94
+ _queryParams["name"] = name;
95
+ }
96
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/configs"),
98
+ method: "GET",
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
100
+ contentType: "application/json",
101
+ queryParameters: _queryParams,
102
+ requestType: "json",
103
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
104
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
105
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
106
  });
113
- }
114
- if (_response.error.reason === "status-code") {
115
- switch (_response.error.statusCode) {
116
- case 400:
117
- throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
118
- unrecognizedObjectKeys: "passthrough",
119
- allowUnrecognizedUnionMembers: true,
120
- allowUnrecognizedEnumValues: true,
121
- breadcrumbsPrefix: ["response"],
122
- }));
123
- default:
107
+ if (_response.ok) {
108
+ return serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
109
+ unrecognizedObjectKeys: "passthrough",
110
+ allowUnrecognizedUnionMembers: true,
111
+ allowUnrecognizedEnumValues: true,
112
+ breadcrumbsPrefix: ["response"],
113
+ });
114
+ }
115
+ if (_response.error.reason === "status-code") {
116
+ switch (_response.error.statusCode) {
117
+ case 400:
118
+ throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
119
+ unrecognizedObjectKeys: "passthrough",
120
+ allowUnrecognizedUnionMembers: true,
121
+ allowUnrecognizedEnumValues: true,
122
+ breadcrumbsPrefix: ["response"],
123
+ }));
124
+ default:
125
+ throw new errors.HumeError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ });
129
+ }
130
+ }
131
+ switch (_response.error.reason) {
132
+ case "non-json":
124
133
  throw new errors.HumeError({
125
134
  statusCode: _response.error.statusCode,
126
- body: _response.error.body,
135
+ body: _response.error.rawBody,
136
+ });
137
+ case "timeout":
138
+ throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs.");
139
+ case "unknown":
140
+ throw new errors.HumeError({
141
+ message: _response.error.errorMessage,
127
142
  });
128
143
  }
129
- }
130
- switch (_response.error.reason) {
131
- case "non-json":
132
- throw new errors.HumeError({
133
- statusCode: _response.error.statusCode,
134
- body: _response.error.rawBody,
135
- });
136
- case "timeout":
137
- throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs.");
138
- case "unknown":
139
- throw new errors.HumeError({
140
- message: _response.error.errorMessage,
141
- });
142
- }
144
+ });
145
+ let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 1;
146
+ return new core.Pageable({
147
+ response: yield list(request),
148
+ hasNextPage: (response) => { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.configsPage) !== null && _a !== void 0 ? _a : []).length > 0; },
149
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.configsPage) !== null && _a !== void 0 ? _a : []; },
150
+ loadPage: (_response) => {
151
+ _offset += 1;
152
+ return list(core.setObjectProperty(request, "pageNumber", _offset));
153
+ },
154
+ });
143
155
  });
144
156
  }
145
157
  /**
@@ -191,7 +203,7 @@ class Configs {
191
203
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
192
204
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/configs"),
193
205
  method: "POST",
194
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
206
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
195
207
  contentType: "application/json",
196
208
  requestType: "json",
197
209
  body: serializers.empathicVoice.PostedConfig.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -254,66 +266,78 @@ class Configs {
254
266
  */
255
267
  listConfigVersions(id_1) {
256
268
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
257
- var _a, _b, _c;
258
- const { pageNumber, pageSize, restrictToMostRecent } = request;
259
- const _queryParams = {};
260
- if (pageNumber != null) {
261
- _queryParams["page_number"] = pageNumber.toString();
262
- }
263
- if (pageSize != null) {
264
- _queryParams["page_size"] = pageSize.toString();
265
- }
266
- if (restrictToMostRecent != null) {
267
- _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
268
- }
269
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
271
- method: "GET",
272
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
273
- contentType: "application/json",
274
- queryParameters: _queryParams,
275
- requestType: "json",
276
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
277
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
278
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
279
- });
280
- if (_response.ok) {
281
- return serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
282
- unrecognizedObjectKeys: "passthrough",
283
- allowUnrecognizedUnionMembers: true,
284
- allowUnrecognizedEnumValues: true,
285
- breadcrumbsPrefix: ["response"],
269
+ const list = (request) => __awaiter(this, void 0, void 0, function* () {
270
+ var _a, _b, _c;
271
+ const { pageNumber, pageSize, restrictToMostRecent } = request;
272
+ const _queryParams = {};
273
+ if (pageNumber != null) {
274
+ _queryParams["page_number"] = pageNumber.toString();
275
+ }
276
+ if (pageSize != null) {
277
+ _queryParams["page_size"] = pageSize.toString();
278
+ }
279
+ if (restrictToMostRecent != null) {
280
+ _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
281
+ }
282
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
283
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
284
+ method: "GET",
285
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
286
+ contentType: "application/json",
287
+ queryParameters: _queryParams,
288
+ requestType: "json",
289
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
290
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
291
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
286
292
  });
287
- }
288
- if (_response.error.reason === "status-code") {
289
- switch (_response.error.statusCode) {
290
- case 400:
291
- throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
292
- unrecognizedObjectKeys: "passthrough",
293
- allowUnrecognizedUnionMembers: true,
294
- allowUnrecognizedEnumValues: true,
295
- breadcrumbsPrefix: ["response"],
296
- }));
297
- default:
293
+ if (_response.ok) {
294
+ return serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
295
+ unrecognizedObjectKeys: "passthrough",
296
+ allowUnrecognizedUnionMembers: true,
297
+ allowUnrecognizedEnumValues: true,
298
+ breadcrumbsPrefix: ["response"],
299
+ });
300
+ }
301
+ if (_response.error.reason === "status-code") {
302
+ switch (_response.error.statusCode) {
303
+ case 400:
304
+ throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
305
+ unrecognizedObjectKeys: "passthrough",
306
+ allowUnrecognizedUnionMembers: true,
307
+ allowUnrecognizedEnumValues: true,
308
+ breadcrumbsPrefix: ["response"],
309
+ }));
310
+ default:
311
+ throw new errors.HumeError({
312
+ statusCode: _response.error.statusCode,
313
+ body: _response.error.body,
314
+ });
315
+ }
316
+ }
317
+ switch (_response.error.reason) {
318
+ case "non-json":
298
319
  throw new errors.HumeError({
299
320
  statusCode: _response.error.statusCode,
300
- body: _response.error.body,
321
+ body: _response.error.rawBody,
322
+ });
323
+ case "timeout":
324
+ throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs/{id}.");
325
+ case "unknown":
326
+ throw new errors.HumeError({
327
+ message: _response.error.errorMessage,
301
328
  });
302
329
  }
303
- }
304
- switch (_response.error.reason) {
305
- case "non-json":
306
- throw new errors.HumeError({
307
- statusCode: _response.error.statusCode,
308
- body: _response.error.rawBody,
309
- });
310
- case "timeout":
311
- throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs/{id}.");
312
- case "unknown":
313
- throw new errors.HumeError({
314
- message: _response.error.errorMessage,
315
- });
316
- }
330
+ });
331
+ let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 1;
332
+ return new core.Pageable({
333
+ response: yield list(request),
334
+ hasNextPage: (response) => { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.configsPage) !== null && _a !== void 0 ? _a : []).length > 0; },
335
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.configsPage) !== null && _a !== void 0 ? _a : []; },
336
+ loadPage: (_response) => {
337
+ _offset += 1;
338
+ return list(core.setObjectProperty(request, "pageNumber", _offset));
339
+ },
340
+ });
317
341
  });
318
342
  }
319
343
  /**
@@ -369,7 +393,7 @@ class Configs {
369
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
370
394
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
371
395
  method: "POST",
372
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
396
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
373
397
  contentType: "application/json",
374
398
  requestType: "json",
375
399
  body: serializers.empathicVoice.PostedConfigVersion.jsonOrThrow(request, {
@@ -437,7 +461,7 @@ class Configs {
437
461
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
438
462
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
439
463
  method: "DELETE",
440
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
464
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
441
465
  contentType: "application/json",
442
466
  requestType: "json",
443
467
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -500,7 +524,7 @@ class Configs {
500
524
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
501
525
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
502
526
  method: "PATCH",
503
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
527
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
504
528
  contentType: "application/json",
505
529
  requestType: "json",
506
530
  body: serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -567,7 +591,7 @@ class Configs {
567
591
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
568
592
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
569
593
  method: "GET",
570
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
594
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
571
595
  contentType: "application/json",
572
596
  requestType: "json",
573
597
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -637,7 +661,7 @@ class Configs {
637
661
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
638
662
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
639
663
  method: "DELETE",
640
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
664
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
641
665
  contentType: "application/json",
642
666
  requestType: "json",
643
667
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -705,7 +729,7 @@ class Configs {
705
729
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
706
730
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
707
731
  method: "PATCH",
708
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
732
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
709
733
  contentType: "application/json",
710
734
  requestType: "json",
711
735
  body: serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, {
@@ -39,7 +39,7 @@ export declare class CustomVoices {
39
39
  * @example
40
40
  * await client.empathicVoice.customVoices.listCustomVoices()
41
41
  */
42
- listCustomVoices(request?: Hume.empathicVoice.CustomVoicesListCustomVoicesRequest, requestOptions?: CustomVoices.RequestOptions): Promise<Hume.empathicVoice.ReturnPagedCustomVoices>;
42
+ listCustomVoices(request?: Hume.empathicVoice.CustomVoicesListCustomVoicesRequest, requestOptions?: CustomVoices.RequestOptions): Promise<core.Page<Hume.empathicVoice.ReturnCustomVoice>>;
43
43
  /**
44
44
  * Creates a **Custom Voice** that can be added to an [EVI configuration](/reference/empathic-voice-interface-evi/configs/create-config).
45
45
  *
@@ -74,66 +74,78 @@ class CustomVoices {
74
74
  */
75
75
  listCustomVoices() {
76
76
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
- var _a, _b, _c;
78
- const { pageNumber, pageSize, name } = request;
79
- const _queryParams = {};
80
- if (pageNumber != null) {
81
- _queryParams["page_number"] = pageNumber.toString();
82
- }
83
- if (pageSize != null) {
84
- _queryParams["page_size"] = pageSize.toString();
85
- }
86
- if (name != null) {
87
- _queryParams["name"] = name;
88
- }
89
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
90
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
91
- method: "GET",
92
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
- contentType: "application/json",
94
- queryParameters: _queryParams,
95
- requestType: "json",
96
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
97
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
98
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
- });
100
- if (_response.ok) {
101
- return serializers.empathicVoice.ReturnPagedCustomVoices.parseOrThrow(_response.body, {
102
- unrecognizedObjectKeys: "passthrough",
103
- allowUnrecognizedUnionMembers: true,
104
- allowUnrecognizedEnumValues: true,
105
- breadcrumbsPrefix: ["response"],
77
+ const list = (request) => __awaiter(this, void 0, void 0, function* () {
78
+ var _a, _b, _c;
79
+ const { pageNumber, pageSize, name } = request;
80
+ const _queryParams = {};
81
+ if (pageNumber != null) {
82
+ _queryParams["page_number"] = pageNumber.toString();
83
+ }
84
+ if (pageSize != null) {
85
+ _queryParams["page_size"] = pageSize.toString();
86
+ }
87
+ if (name != null) {
88
+ _queryParams["name"] = name;
89
+ }
90
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
91
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
92
+ method: "GET",
93
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
+ contentType: "application/json",
95
+ queryParameters: _queryParams,
96
+ requestType: "json",
97
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
98
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
99
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
106
100
  });
107
- }
108
- if (_response.error.reason === "status-code") {
109
- switch (_response.error.statusCode) {
110
- case 400:
111
- throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
112
- unrecognizedObjectKeys: "passthrough",
113
- allowUnrecognizedUnionMembers: true,
114
- allowUnrecognizedEnumValues: true,
115
- breadcrumbsPrefix: ["response"],
116
- }));
117
- default:
101
+ if (_response.ok) {
102
+ return serializers.empathicVoice.ReturnPagedCustomVoices.parseOrThrow(_response.body, {
103
+ unrecognizedObjectKeys: "passthrough",
104
+ allowUnrecognizedUnionMembers: true,
105
+ allowUnrecognizedEnumValues: true,
106
+ breadcrumbsPrefix: ["response"],
107
+ });
108
+ }
109
+ if (_response.error.reason === "status-code") {
110
+ switch (_response.error.statusCode) {
111
+ case 400:
112
+ throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
113
+ unrecognizedObjectKeys: "passthrough",
114
+ allowUnrecognizedUnionMembers: true,
115
+ allowUnrecognizedEnumValues: true,
116
+ breadcrumbsPrefix: ["response"],
117
+ }));
118
+ default:
119
+ throw new errors.HumeError({
120
+ statusCode: _response.error.statusCode,
121
+ body: _response.error.body,
122
+ });
123
+ }
124
+ }
125
+ switch (_response.error.reason) {
126
+ case "non-json":
118
127
  throw new errors.HumeError({
119
128
  statusCode: _response.error.statusCode,
120
- body: _response.error.body,
129
+ body: _response.error.rawBody,
130
+ });
131
+ case "timeout":
132
+ throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/custom_voices.");
133
+ case "unknown":
134
+ throw new errors.HumeError({
135
+ message: _response.error.errorMessage,
121
136
  });
122
137
  }
123
- }
124
- switch (_response.error.reason) {
125
- case "non-json":
126
- throw new errors.HumeError({
127
- statusCode: _response.error.statusCode,
128
- body: _response.error.rawBody,
129
- });
130
- case "timeout":
131
- throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/custom_voices.");
132
- case "unknown":
133
- throw new errors.HumeError({
134
- message: _response.error.errorMessage,
135
- });
136
- }
138
+ });
139
+ let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 1;
140
+ return new core.Pageable({
141
+ response: yield list(request),
142
+ hasNextPage: (response) => { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.customVoicesPage) !== null && _a !== void 0 ? _a : []).length > 0; },
143
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.customVoicesPage) !== null && _a !== void 0 ? _a : []; },
144
+ loadPage: (_response) => {
145
+ _offset += 1;
146
+ return list(core.setObjectProperty(request, "pageNumber", _offset));
147
+ },
148
+ });
137
149
  });
138
150
  }
139
151
  /**
@@ -159,7 +171,7 @@ class CustomVoices {
159
171
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
160
172
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
161
173
  method: "POST",
162
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
174
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
163
175
  contentType: "application/json",
164
176
  requestType: "json",
165
177
  body: serializers.empathicVoice.PostedCustomVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -225,7 +237,7 @@ class CustomVoices {
225
237
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
226
238
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
227
239
  method: "GET",
228
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
229
241
  contentType: "application/json",
230
242
  requestType: "json",
231
243
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -295,7 +307,7 @@ class CustomVoices {
295
307
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
296
308
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
297
309
  method: "POST",
298
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
310
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
299
311
  contentType: "application/json",
300
312
  requestType: "json",
301
313
  body: serializers.empathicVoice.PostedCustomVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -361,7 +373,7 @@ class CustomVoices {
361
373
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
362
374
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
363
375
  method: "DELETE",
364
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
376
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
365
377
  contentType: "application/json",
366
378
  requestType: "json",
367
379
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -424,7 +436,7 @@ class CustomVoices {
424
436
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
425
437
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
426
438
  method: "PATCH",
427
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.18", "User-Agent": "hume/0.9.18", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
439
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.0", "User-Agent": "hume/0.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
428
440
  contentType: "application/json",
429
441
  requestType: "json",
430
442
  body: serializers.empathicVoice.PostedCustomVoiceName.jsonOrThrow(request, {