hume 0.14.2-beta.5 → 0.14.2-beta.6

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 (124) hide show
  1. package/.claude/settings.local.json +4 -1
  2. package/Client.d.ts +1 -0
  3. package/api/resources/empathicVoice/client/Client.d.ts +1 -0
  4. package/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -1
  5. package/api/resources/empathicVoice/resources/chat/client/Client.js +3 -28
  6. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +1 -0
  7. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +12 -20
  8. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
  9. package/api/resources/empathicVoice/resources/chats/client/Client.js +9 -15
  10. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
  11. package/api/resources/empathicVoice/resources/configs/client/Client.js +29 -52
  12. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
  13. package/api/resources/empathicVoice/resources/prompts/client/Client.js +29 -52
  14. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
  15. package/api/resources/empathicVoice/resources/tools/client/Client.js +27 -46
  16. package/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
  17. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
  18. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +18 -30
  19. package/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +1 -0
  20. package/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Socket.js +0 -4
  21. package/api/resources/tts/client/Client.d.ts +1 -0
  22. package/api/resources/tts/client/Client.js +16 -34
  23. package/api/resources/tts/index.d.ts +1 -1
  24. package/api/resources/tts/index.js +1 -1
  25. package/api/resources/tts/resources/index.d.ts +0 -1
  26. package/api/resources/tts/resources/index.js +0 -1
  27. package/api/resources/tts/resources/streamInput/client/Client.d.ts +4 -3
  28. package/api/resources/tts/resources/streamInput/client/Client.js +14 -15
  29. package/api/resources/tts/resources/streamInput/client/Socket.d.ts +1 -1
  30. package/api/resources/tts/resources/streamInput/client/Socket.js +0 -4
  31. package/api/resources/tts/resources/streamInput/index.d.ts +0 -1
  32. package/api/resources/tts/resources/streamInput/index.js +0 -1
  33. package/api/resources/tts/resources/streamInput/types/index.js +26 -14
  34. package/api/resources/tts/resources/voices/client/Client.d.ts +1 -0
  35. package/api/resources/tts/resources/voices/client/Client.js +10 -19
  36. package/api/resources/tts/types/index.d.ts +2 -2
  37. package/api/resources/tts/types/index.js +2 -2
  38. package/changes.md +843 -0
  39. package/comment_changes.txt +0 -0
  40. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +37 -0
  41. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  42. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +37 -0
  43. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  44. package/core/file.d.ts +11 -0
  45. package/diff.txt +18143 -0
  46. package/dist/Client.d.ts +1 -0
  47. package/dist/api/resources/empathicVoice/client/Client.d.ts +1 -0
  48. package/dist/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -1
  49. package/dist/api/resources/empathicVoice/resources/chat/client/Client.js +3 -28
  50. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +1 -0
  51. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +12 -20
  52. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
  53. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +9 -15
  54. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
  55. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +29 -52
  56. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
  57. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +29 -52
  58. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
  59. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +27 -46
  60. package/dist/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
  61. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
  62. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +18 -30
  63. package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +1 -0
  64. package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Socket.js +0 -4
  65. package/dist/api/resources/tts/client/Client.d.ts +1 -0
  66. package/dist/api/resources/tts/client/Client.js +16 -34
  67. package/dist/api/resources/tts/index.d.ts +1 -1
  68. package/dist/api/resources/tts/index.js +1 -1
  69. package/dist/api/resources/tts/resources/index.d.ts +0 -1
  70. package/dist/api/resources/tts/resources/index.js +0 -1
  71. package/dist/api/resources/tts/resources/streamInput/client/Client.d.ts +4 -3
  72. package/dist/api/resources/tts/resources/streamInput/client/Client.js +14 -15
  73. package/dist/api/resources/tts/resources/streamInput/client/Socket.d.ts +1 -1
  74. package/dist/api/resources/tts/resources/streamInput/client/Socket.js +0 -4
  75. package/dist/api/resources/tts/resources/streamInput/index.d.ts +0 -1
  76. package/dist/api/resources/tts/resources/streamInput/index.js +0 -1
  77. package/dist/api/resources/tts/resources/streamInput/types/index.js +26 -14
  78. package/dist/api/resources/tts/resources/voices/client/Client.d.ts +1 -0
  79. package/dist/api/resources/tts/resources/voices/client/Client.js +10 -19
  80. package/dist/api/resources/tts/types/index.d.ts +2 -2
  81. package/dist/api/resources/tts/types/index.js +2 -2
  82. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +37 -0
  83. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  84. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +37 -0
  85. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  86. package/dist/core/file.d.ts +11 -0
  87. package/dist/main.js +40944 -0
  88. package/dist/serialization/resources/tts/resources/index.d.ts +0 -1
  89. package/dist/serialization/resources/tts/resources/index.js +0 -1
  90. package/dist/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.d.ts +3 -3
  91. package/dist/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.js +2 -2
  92. package/dist/serialization/resources/tts/resources/streamInput/index.d.ts +0 -1
  93. package/dist/serialization/resources/tts/resources/streamInput/index.js +0 -1
  94. package/dist/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.d.ts +4 -1
  95. package/dist/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.js +55 -33
  96. package/dist/serialization/resources/tts/resources/streamInput/types/index.js +26 -14
  97. package/dist/serialization/resources/tts/types/index.d.ts +2 -2
  98. package/dist/serialization/resources/tts/types/index.js +2 -2
  99. package/dist/wrapper/HumeClient.d.ts +1 -1
  100. package/dist/wrapper/HumeClient.js +27 -25
  101. package/hume-v0.14.2-beta.6.tgz +0 -0
  102. package/js_changes.txt +2610 -0
  103. package/main.js +40944 -0
  104. package/package.json +1 -1
  105. package/serialization/resources/tts/resources/index.d.ts +0 -1
  106. package/serialization/resources/tts/resources/index.js +0 -1
  107. package/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.d.ts +3 -3
  108. package/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.js +2 -2
  109. package/serialization/resources/tts/resources/streamInput/index.d.ts +0 -1
  110. package/serialization/resources/tts/resources/streamInput/index.js +0 -1
  111. package/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.d.ts +4 -1
  112. package/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.js +55 -33
  113. package/serialization/resources/tts/resources/streamInput/types/index.js +26 -14
  114. package/serialization/resources/tts/types/index.d.ts +2 -2
  115. package/serialization/resources/tts/types/index.js +2 -2
  116. package/tts-audio/tts-74f0e855-cd7e-46e7-9657-c9bdf4b60693.wav +0 -0
  117. package/tts-audio/tts-8d0d6c9c-f54d-4ffa-880a-556f3a77eb99.wav +0 -0
  118. package/tts-audio/tts-f2a1d9fa-8f28-4011-9c02-08364592d0a9.wav +0 -0
  119. package/wrapper/HumeClient.d.ts +1 -1
  120. package/wrapper/HumeClient.js +27 -25
  121. package/hume-v0.14.2-beta.2.tgz +0 -0
  122. package/hume-v0.14.2-beta.4.tgz +0 -0
  123. package/hume-v0.14.2-beta.5.tgz +0 -0
  124. package/hume-v0.14.2-beta1.tgz +0 -0
@@ -21,7 +21,10 @@
21
21
  "Bash(bun add:*)",
22
22
  "Bash(yarn pack:*)",
23
23
  "Bash(npm install)",
24
- "Bash(npm install:*)"
24
+ "Bash(npm install:*)",
25
+ "Bash(mv:*)",
26
+ "Bash(yarn test:*)",
27
+ "Bash(yarn add:*)"
25
28
  ],
26
29
  "deny": [],
27
30
  "ask": []
package/Client.d.ts CHANGED
@@ -14,6 +14,7 @@ export declare namespace HumeClient {
14
14
  apiKey?: core.Supplier<string | undefined>;
15
15
  /** Additional headers to include in requests. */
16
16
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
17
+ fetcher?: core.FetchFunction;
17
18
  }
18
19
  interface RequestOptions {
19
20
  /** The maximum time to wait for a response in seconds. */
@@ -17,6 +17,7 @@ export declare namespace EmpathicVoice {
17
17
  apiKey?: core.Supplier<string | undefined>;
18
18
  /** Additional headers to include in requests. */
19
19
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
20
+ fetcher?: core.FetchFunction;
20
21
  }
21
22
  }
22
23
  export declare class EmpathicVoice {
@@ -5,7 +5,7 @@ import * as Hume from "../../../../../index.js";
5
5
  import { ChatSocket } from "./Socket.js";
6
6
  export declare namespace Chat {
7
7
  interface Options {
8
- environment?: core.Supplier<environments.HumeEnvironment | environments.HumeEnvironmentUrls | string>;
8
+ environment?: core.Supplier<environments.HumeEnvironment | environments.HumeEnvironmentUrls>;
9
9
  /** Specify a custom URL to connect the client to. */
10
10
  baseUrl?: core.Supplier<string>;
11
11
  apiKey?: core.Supplier<string | undefined>;
@@ -40,21 +40,12 @@ const core = __importStar(require("../../../../../../core/index.js"));
40
40
  const headers_js_1 = require("../../../../../../core/headers.js");
41
41
  const serializers = __importStar(require("../../../../../../serialization/index.js"));
42
42
  const Socket_js_1 = require("./Socket.js");
43
- function createHostnameWithProtocol(url) {
44
- const protocol = /(https|http|wss|ws):\/\//.exec(url);
45
- if (protocol) {
46
- return url.replace("https://", "wss://").replace("http://", "ws://");
47
- }
48
- else {
49
- return `wss://${url}`;
50
- }
51
- }
52
43
  class Chat {
53
44
  constructor(_options = {}) {
54
45
  this._options = _options;
55
46
  }
56
47
  connect(args = {}) {
57
- var _a;
48
+ var _a, _b;
58
49
  const { accessToken, configId, configVersion, eventLimit, resumedChatGroupId, verboseTranscription, voiceId, apiKey, sessionSettings, queryParams, headers, debug, reconnectAttempts, } = args;
59
50
  const _queryParams = {};
60
51
  if (accessToken != null) {
@@ -98,24 +89,8 @@ class Chat {
98
89
  }
99
90
  }
100
91
  let _headers = (0, headers_js_1.mergeHeaders)((0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, this._getCustomAuthorizationHeaders())), headers);
101
- // Construct WebSocket URL with protocol conversion
102
- const baseUrl = core.Supplier.get(this._options["baseUrl"]);
103
- const environment = (_a = core.Supplier.get(this._options["environment"])) !== null && _a !== void 0 ? _a : environments.HumeEnvironment.Prod;
104
- let websocketUrl;
105
- if (baseUrl) {
106
- // baseUrl takes precedence - apply protocol conversion
107
- websocketUrl = core.url.join(createHostnameWithProtocol(baseUrl), "/v0/evi/chat");
108
- }
109
- else if (typeof environment === "string") {
110
- // String environment - apply protocol conversion
111
- websocketUrl = core.url.join(createHostnameWithProtocol(environment), "/v0/evi/chat");
112
- }
113
- else {
114
- // Structured environment object - use .evi property directly
115
- websocketUrl = core.url.join(environment.evi, "/chat");
116
- }
117
92
  const socket = new core.ReconnectingWebSocket({
118
- url: websocketUrl,
93
+ url: core.url.join((_a = core.Supplier.get(this._options["baseUrl"])) !== null && _a !== void 0 ? _a : ((_b = core.Supplier.get(this._options["environment"])) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Prod).evi, "/chat"),
119
94
  protocols: [],
120
95
  queryParameters: _queryParams,
121
96
  headers: _headers,
@@ -130,7 +105,7 @@ class Chat {
130
105
  // be omitted from the headers which means it won't reach the logic in ws.ts that
131
106
  // extracts values from the headers and adds them to query parameters.
132
107
  const authHeaderValue = core.Supplier.get((_a = this._options.headers) === null || _a === void 0 ? void 0 : _a.Authorization);
133
- return { "X-Hume-Api-Key": apiKeyValue, "Authorization": authHeaderValue };
108
+ return { "X-Hume-Api-Key": apiKeyValue, Authorization: authHeaderValue };
134
109
  }
135
110
  }
136
111
  exports.Chat = Chat;
@@ -12,6 +12,7 @@ export declare namespace ChatGroups {
12
12
  apiKey?: core.Supplier<string | undefined>;
13
13
  /** Additional headers to include in requests. */
14
14
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
15
16
  }
16
17
  interface RequestOptions {
17
18
  /** The maximum time to wait for a response in seconds. */
@@ -75,7 +75,7 @@ class ChatGroups {
75
75
  listChatGroups() {
76
76
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
77
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
78
- var _a, _b, _c;
78
+ var _a, _b, _c, _d;
79
79
  const { pageNumber, pageSize, ascendingOrder, configId } = request;
80
80
  const _queryParams = {};
81
81
  if (pageNumber != null) {
@@ -91,8 +91,8 @@ class ChatGroups {
91
91
  _queryParams["config_id"] = configId;
92
92
  }
93
93
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
94
- const _response = yield core.fetcher({
95
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod)
94
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
95
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
96
96
  .base, "v0/evi/chat_groups"),
97
97
  method: "GET",
98
98
  headers: _headers,
@@ -107,7 +107,6 @@ class ChatGroups {
107
107
  unrecognizedObjectKeys: "passthrough",
108
108
  allowUnrecognizedUnionMembers: true,
109
109
  allowUnrecognizedEnumValues: true,
110
- skipValidation: true,
111
110
  breadcrumbsPrefix: ["response"],
112
111
  }),
113
112
  rawResponse: _response.rawResponse,
@@ -120,7 +119,6 @@ class ChatGroups {
120
119
  unrecognizedObjectKeys: "passthrough",
121
120
  allowUnrecognizedUnionMembers: true,
122
121
  allowUnrecognizedEnumValues: true,
123
- skipValidation: true,
124
122
  breadcrumbsPrefix: ["response"],
125
123
  }), _response.rawResponse);
126
124
  default:
@@ -182,7 +180,7 @@ class ChatGroups {
182
180
  }
183
181
  __getChatGroup(id_1) {
184
182
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
185
- var _a, _b, _c;
183
+ var _a, _b, _c, _d;
186
184
  const { pageSize, pageNumber, ascendingOrder } = request;
187
185
  const _queryParams = {};
188
186
  if (pageSize != null) {
@@ -195,8 +193,8 @@ class ChatGroups {
195
193
  _queryParams["ascending_order"] = ascendingOrder.toString();
196
194
  }
197
195
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
198
- const _response = yield core.fetcher({
199
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod).base, `v0/evi/chat_groups/${encodeURIComponent(id)}`),
196
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
197
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/chat_groups/${encodeURIComponent(id)}`),
200
198
  method: "GET",
201
199
  headers: _headers,
202
200
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -210,7 +208,6 @@ class ChatGroups {
210
208
  unrecognizedObjectKeys: "passthrough",
211
209
  allowUnrecognizedUnionMembers: true,
212
210
  allowUnrecognizedEnumValues: true,
213
- skipValidation: true,
214
211
  breadcrumbsPrefix: ["response"],
215
212
  }),
216
213
  rawResponse: _response.rawResponse,
@@ -223,7 +220,6 @@ class ChatGroups {
223
220
  unrecognizedObjectKeys: "passthrough",
224
221
  allowUnrecognizedUnionMembers: true,
225
222
  allowUnrecognizedEnumValues: true,
226
- skipValidation: true,
227
223
  breadcrumbsPrefix: ["response"],
228
224
  }), _response.rawResponse);
229
225
  default:
@@ -270,7 +266,7 @@ class ChatGroups {
270
266
  listChatGroupEvents(id_1) {
271
267
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
272
268
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
273
- var _a, _b, _c;
269
+ var _a, _b, _c, _d;
274
270
  const { pageSize, pageNumber, ascendingOrder } = request;
275
271
  const _queryParams = {};
276
272
  if (pageSize != null) {
@@ -283,8 +279,8 @@ class ChatGroups {
283
279
  _queryParams["ascending_order"] = ascendingOrder.toString();
284
280
  }
285
281
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
286
- const _response = yield core.fetcher({
287
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod)
282
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
283
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
288
284
  .base, `v0/evi/chat_groups/${encodeURIComponent(id)}/events`),
289
285
  method: "GET",
290
286
  headers: _headers,
@@ -299,7 +295,6 @@ class ChatGroups {
299
295
  unrecognizedObjectKeys: "passthrough",
300
296
  allowUnrecognizedUnionMembers: true,
301
297
  allowUnrecognizedEnumValues: true,
302
- skipValidation: true,
303
298
  breadcrumbsPrefix: ["response"],
304
299
  }),
305
300
  rawResponse: _response.rawResponse,
@@ -312,7 +307,6 @@ class ChatGroups {
312
307
  unrecognizedObjectKeys: "passthrough",
313
308
  allowUnrecognizedUnionMembers: true,
314
309
  allowUnrecognizedEnumValues: true,
315
- skipValidation: true,
316
310
  breadcrumbsPrefix: ["response"],
317
311
  }), _response.rawResponse);
318
312
  default:
@@ -374,7 +368,7 @@ class ChatGroups {
374
368
  }
375
369
  __getAudio(id_1) {
376
370
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
377
- var _a, _b, _c;
371
+ var _a, _b, _c, _d;
378
372
  const { pageNumber, pageSize, ascendingOrder } = request;
379
373
  const _queryParams = {};
380
374
  if (pageNumber != null) {
@@ -387,8 +381,8 @@ class ChatGroups {
387
381
  _queryParams["ascending_order"] = ascendingOrder.toString();
388
382
  }
389
383
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
390
- const _response = yield core.fetcher({
391
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod).base, `v0/evi/chat_groups/${encodeURIComponent(id)}/audio`),
384
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
385
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/chat_groups/${encodeURIComponent(id)}/audio`),
392
386
  method: "GET",
393
387
  headers: _headers,
394
388
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -402,7 +396,6 @@ class ChatGroups {
402
396
  unrecognizedObjectKeys: "passthrough",
403
397
  allowUnrecognizedUnionMembers: true,
404
398
  allowUnrecognizedEnumValues: true,
405
- skipValidation: true,
406
399
  breadcrumbsPrefix: ["response"],
407
400
  }),
408
401
  rawResponse: _response.rawResponse,
@@ -415,7 +408,6 @@ class ChatGroups {
415
408
  unrecognizedObjectKeys: "passthrough",
416
409
  allowUnrecognizedUnionMembers: true,
417
410
  allowUnrecognizedEnumValues: true,
418
- skipValidation: true,
419
411
  breadcrumbsPrefix: ["response"],
420
412
  }), _response.rawResponse);
421
413
  default:
@@ -12,6 +12,7 @@ export declare namespace Chats {
12
12
  apiKey?: core.Supplier<string | undefined>;
13
13
  /** Additional headers to include in requests. */
14
14
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
15
16
  }
16
17
  interface RequestOptions {
17
18
  /** The maximum time to wait for a response in seconds. */
@@ -74,7 +74,7 @@ class Chats {
74
74
  listChats() {
75
75
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
76
76
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
77
- var _a, _b, _c;
77
+ var _a, _b, _c, _d;
78
78
  const { pageNumber, pageSize, ascendingOrder, configId } = request;
79
79
  const _queryParams = {};
80
80
  if (pageNumber != null) {
@@ -90,8 +90,8 @@ class Chats {
90
90
  _queryParams["config_id"] = configId;
91
91
  }
92
92
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
93
- const _response = yield core.fetcher({
94
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod)
93
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
94
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
95
95
  .base, "v0/evi/chats"),
96
96
  method: "GET",
97
97
  headers: _headers,
@@ -106,7 +106,6 @@ class Chats {
106
106
  unrecognizedObjectKeys: "passthrough",
107
107
  allowUnrecognizedUnionMembers: true,
108
108
  allowUnrecognizedEnumValues: true,
109
- skipValidation: true,
110
109
  breadcrumbsPrefix: ["response"],
111
110
  }),
112
111
  rawResponse: _response.rawResponse,
@@ -119,7 +118,6 @@ class Chats {
119
118
  unrecognizedObjectKeys: "passthrough",
120
119
  allowUnrecognizedUnionMembers: true,
121
120
  allowUnrecognizedEnumValues: true,
122
- skipValidation: true,
123
121
  breadcrumbsPrefix: ["response"],
124
122
  }), _response.rawResponse);
125
123
  default:
@@ -179,7 +177,7 @@ class Chats {
179
177
  listChatEvents(id_1) {
180
178
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
181
179
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
182
- var _a, _b, _c;
180
+ var _a, _b, _c, _d;
183
181
  const { pageSize, pageNumber, ascendingOrder } = request;
184
182
  const _queryParams = {};
185
183
  if (pageSize != null) {
@@ -192,8 +190,8 @@ class Chats {
192
190
  _queryParams["ascending_order"] = ascendingOrder.toString();
193
191
  }
194
192
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
- const _response = yield core.fetcher({
196
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod)
193
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
194
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
197
195
  .base, `v0/evi/chats/${encodeURIComponent(id)}`),
198
196
  method: "GET",
199
197
  headers: _headers,
@@ -208,7 +206,6 @@ class Chats {
208
206
  unrecognizedObjectKeys: "passthrough",
209
207
  allowUnrecognizedUnionMembers: true,
210
208
  allowUnrecognizedEnumValues: true,
211
- skipValidation: true,
212
209
  breadcrumbsPrefix: ["response"],
213
210
  }),
214
211
  rawResponse: _response.rawResponse,
@@ -221,7 +218,6 @@ class Chats {
221
218
  unrecognizedObjectKeys: "passthrough",
222
219
  allowUnrecognizedUnionMembers: true,
223
220
  allowUnrecognizedEnumValues: true,
224
- skipValidation: true,
225
221
  breadcrumbsPrefix: ["response"],
226
222
  }), _response.rawResponse);
227
223
  default:
@@ -278,10 +274,10 @@ class Chats {
278
274
  }
279
275
  __getAudio(id, requestOptions) {
280
276
  return __awaiter(this, void 0, void 0, function* () {
281
- var _a, _b, _c;
277
+ var _a, _b, _c, _d;
282
278
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
283
- const _response = yield core.fetcher({
284
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Prod).base, `v0/evi/chats/${encodeURIComponent(id)}/audio`),
279
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
280
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/chats/${encodeURIComponent(id)}/audio`),
285
281
  method: "GET",
286
282
  headers: _headers,
287
283
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -295,7 +291,6 @@ class Chats {
295
291
  unrecognizedObjectKeys: "passthrough",
296
292
  allowUnrecognizedUnionMembers: true,
297
293
  allowUnrecognizedEnumValues: true,
298
- skipValidation: true,
299
294
  breadcrumbsPrefix: ["response"],
300
295
  }),
301
296
  rawResponse: _response.rawResponse,
@@ -308,7 +303,6 @@ class Chats {
308
303
  unrecognizedObjectKeys: "passthrough",
309
304
  allowUnrecognizedUnionMembers: true,
310
305
  allowUnrecognizedEnumValues: true,
311
- skipValidation: true,
312
306
  breadcrumbsPrefix: ["response"],
313
307
  }), _response.rawResponse);
314
308
  default:
@@ -12,6 +12,7 @@ export declare namespace Configs {
12
12
  apiKey?: core.Supplier<string | undefined>;
13
13
  /** Additional headers to include in requests. */
14
14
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
15
16
  }
16
17
  interface RequestOptions {
17
18
  /** The maximum time to wait for a response in seconds. */