hume 0.8.0 → 0.8.1-beta0

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 (96) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +3 -65
  2. package/Client.d.ts +3 -0
  3. package/api/resources/empathicVoice/client/Client.d.ts +3 -0
  4. package/api/resources/empathicVoice/resources/chat/client/Socket.d.ts +8 -8
  5. package/api/resources/empathicVoice/resources/chat/client/Socket.js +13 -40
  6. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +3 -0
  7. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
  8. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +3 -0
  9. package/api/resources/empathicVoice/resources/chats/client/Client.js +4 -4
  10. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +3 -0
  11. package/api/resources/empathicVoice/resources/configs/client/Client.js +19 -23
  12. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +3 -0
  13. package/api/resources/empathicVoice/resources/prompts/client/Client.js +19 -23
  14. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +3 -0
  15. package/api/resources/empathicVoice/resources/tools/client/Client.js +19 -19
  16. package/api/resources/empathicVoice/types/SessionSettings.d.ts +2 -0
  17. package/api/resources/empathicVoice/types/VoiceArgs.d.ts +0 -2
  18. package/api/resources/empathicVoice/types/index.d.ts +0 -1
  19. package/api/resources/empathicVoice/types/index.js +0 -1
  20. package/api/resources/expressionMeasurement/client/Client.d.ts +3 -0
  21. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +3 -0
  22. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +12 -12
  23. package/core/form-data-utils/FormDataWrapper.js +1 -3
  24. package/core/schemas/Schema.d.ts +3 -4
  25. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  26. package/core/schemas/builders/lazy/lazy.js +8 -19
  27. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  28. package/core/schemas/builders/list/list.js +31 -44
  29. package/core/schemas/builders/object/object.js +88 -111
  30. package/core/schemas/builders/object/types.d.ts +2 -2
  31. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  32. package/core/schemas/builders/record/record.js +49 -60
  33. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  34. package/core/schemas/builders/schema-utils/getSchemaUtils.js +12 -21
  35. package/core/schemas/builders/set/set.js +6 -15
  36. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  37. package/core/schemas/builders/union/union.js +51 -62
  38. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  39. package/dist/Client.d.ts +3 -0
  40. package/dist/api/resources/empathicVoice/client/Client.d.ts +3 -0
  41. package/dist/api/resources/empathicVoice/resources/chat/client/Socket.d.ts +8 -8
  42. package/dist/api/resources/empathicVoice/resources/chat/client/Socket.js +13 -40
  43. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +3 -0
  44. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
  45. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +3 -0
  46. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +4 -4
  47. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +3 -0
  48. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +19 -23
  49. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +3 -0
  50. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +19 -23
  51. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +3 -0
  52. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +19 -19
  53. package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +2 -0
  54. package/dist/api/resources/empathicVoice/types/VoiceArgs.d.ts +0 -2
  55. package/dist/api/resources/empathicVoice/types/index.d.ts +0 -1
  56. package/dist/api/resources/empathicVoice/types/index.js +0 -1
  57. package/dist/api/resources/expressionMeasurement/client/Client.d.ts +3 -0
  58. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +3 -0
  59. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +12 -12
  60. package/dist/core/form-data-utils/FormDataWrapper.js +1 -3
  61. package/dist/core/schemas/Schema.d.ts +3 -4
  62. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  63. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  64. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  65. package/dist/core/schemas/builders/list/list.js +31 -44
  66. package/dist/core/schemas/builders/object/object.js +88 -111
  67. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  68. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  69. package/dist/core/schemas/builders/record/record.js +49 -60
  70. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  71. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +12 -21
  72. package/dist/core/schemas/builders/set/set.js +6 -15
  73. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  74. package/dist/core/schemas/builders/union/union.js +51 -62
  75. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  76. package/dist/serialization/resources/empathicVoice/types/SessionSettings.d.ts +1 -0
  77. package/dist/serialization/resources/empathicVoice/types/SessionSettings.js +1 -0
  78. package/dist/serialization/resources/empathicVoice/types/VoiceArgs.d.ts +0 -3
  79. package/dist/serialization/resources/empathicVoice/types/VoiceArgs.js +0 -3
  80. package/dist/serialization/resources/empathicVoice/types/index.d.ts +0 -1
  81. package/dist/serialization/resources/empathicVoice/types/index.js +0 -1
  82. package/package.json +1 -1
  83. package/serialization/resources/empathicVoice/types/SessionSettings.d.ts +1 -0
  84. package/serialization/resources/empathicVoice/types/SessionSettings.js +1 -0
  85. package/serialization/resources/empathicVoice/types/VoiceArgs.d.ts +0 -3
  86. package/serialization/resources/empathicVoice/types/VoiceArgs.js +0 -3
  87. package/serialization/resources/empathicVoice/types/index.d.ts +0 -1
  88. package/serialization/resources/empathicVoice/types/index.js +0 -1
  89. package/api/resources/empathicVoice/types/Features.d.ts +0 -21
  90. package/api/resources/empathicVoice/types/Features.js +0 -5
  91. package/dist/api/resources/empathicVoice/types/Features.d.ts +0 -21
  92. package/dist/api/resources/empathicVoice/types/Features.js +0 -5
  93. package/dist/serialization/resources/empathicVoice/types/Features.d.ts +0 -19
  94. package/dist/serialization/resources/empathicVoice/types/Features.js +0 -40
  95. package/serialization/resources/empathicVoice/types/Features.d.ts +0 -19
  96. package/serialization/resources/empathicVoice/types/Features.js +0 -40
@@ -865,6 +865,9 @@ types:
865
865
  type: optional<list<BuiltinToolConfig>>
866
866
  docs: List of builtin tools to enable.
867
867
  metadata: optional<map<string, unknown>>
868
+ variables:
869
+ type: optional<map<string, string>>
870
+ docs: Dynamic values that can be used to populate EVI prompts.
868
871
  Tool:
869
872
  properties:
870
873
  type:
@@ -1234,64 +1237,6 @@ types:
1234
1237
  properties:
1235
1238
  text: string
1236
1239
  voice_args: VoiceArgs
1237
- Features:
1238
- properties:
1239
- confidence:
1240
- type: optional<double>
1241
- docs: Confidence (F->M)
1242
- default: 0
1243
- validation:
1244
- min: -20
1245
- max: 20
1246
- enthusiasm:
1247
- type: optional<double>
1248
- docs: Enthusiasm (M->A)
1249
- default: 0
1250
- validation:
1251
- min: -20
1252
- max: 20
1253
- affirmative:
1254
- type: optional<double>
1255
- docs: Affirmative (F->A/M)
1256
- default: 0
1257
- validation:
1258
- min: -20
1259
- max: 20
1260
- articulate:
1261
- type: optional<double>
1262
- docs: Articulate (A->M)
1263
- default: 0
1264
- validation:
1265
- min: -20
1266
- max: 20
1267
- maturity:
1268
- type: optional<double>
1269
- docs: Maturity (M->F)
1270
- default: 0
1271
- validation:
1272
- min: -20
1273
- max: 20
1274
- defeated:
1275
- type: optional<double>
1276
- docs: Defeated (N->M)
1277
- default: 0
1278
- validation:
1279
- min: -20
1280
- max: 20
1281
- feminine:
1282
- type: optional<double>
1283
- docs: Feminine (M->F)
1284
- default: 0
1285
- validation:
1286
- min: -20
1287
- max: 20
1288
- nerdy:
1289
- type: optional<double>
1290
- docs: Nerdy (A->A)
1291
- default: 0
1292
- validation:
1293
- min: -20
1294
- max: 20
1295
1240
  HTTPValidationError:
1296
1241
  properties:
1297
1242
  detail: optional<list<ValidationError>>
@@ -1308,13 +1253,6 @@ types:
1308
1253
  VoiceArgs:
1309
1254
  properties:
1310
1255
  voice: optional<VoiceNameEnum>
1311
- features: optional<Features>
1312
- characters_per_second_ratio:
1313
- type: optional<double>
1314
- default: 1
1315
- validation:
1316
- min: 0.5
1317
- max: 2
1318
1256
  baseline: optional<boolean>
1319
1257
  reconstruct: optional<boolean>
1320
1258
  VoiceNameEnum:
package/Client.d.ts CHANGED
@@ -12,8 +12,11 @@ export declare namespace HumeClient {
12
12
  fetcher?: core.FetchFunction;
13
13
  }
14
14
  interface RequestOptions {
15
+ /** The maximum time to wait for a response in seconds. */
15
16
  timeoutInSeconds?: number;
17
+ /** The number of times to retry the request. Defaults to 2. */
16
18
  maxRetries?: number;
19
+ /** A hook to abort the request. */
17
20
  abortSignal?: AbortSignal;
18
21
  }
19
22
  }
@@ -16,8 +16,11 @@ export declare namespace EmpathicVoice {
16
16
  fetcher?: core.FetchFunction;
17
17
  }
18
18
  interface RequestOptions {
19
+ /** The maximum time to wait for a response in seconds. */
19
20
  timeoutInSeconds?: number;
21
+ /** The number of times to retry the request. Defaults to 2. */
20
22
  maxRetries?: number;
23
+ /** A hook to abort the request. */
21
24
  abortSignal?: AbortSignal;
22
25
  }
23
26
  }
@@ -35,35 +35,35 @@ export declare class ChatSocket {
35
35
  /**
36
36
  * Send audio input
37
37
  */
38
- sendAudioInput(message: Omit<Hume.empathicVoice.AudioInput, "type">): Promise<void>;
38
+ sendAudioInput(message: Omit<Hume.empathicVoice.AudioInput, "type">): void;
39
39
  /**
40
40
  * Send session settings
41
41
  */
42
- sendSessionSettings(message: Omit<Hume.empathicVoice.SessionSettings, "type">): Promise<void>;
42
+ sendSessionSettings(message: Omit<Hume.empathicVoice.SessionSettings, "type">): void;
43
43
  /**
44
44
  * Send assistant input
45
45
  */
46
- sendAssistantInput(message: Omit<Hume.empathicVoice.AssistantInput, "type">): Promise<void>;
46
+ sendAssistantInput(message: Omit<Hume.empathicVoice.AssistantInput, "type">): void;
47
47
  /**
48
48
  * Send pause assistant message
49
49
  */
50
- pauseAssistant(message: Omit<Hume.empathicVoice.PauseAssistantMessage, "type">): Promise<void>;
50
+ pauseAssistant(message: Omit<Hume.empathicVoice.PauseAssistantMessage, "type">): void;
51
51
  /**
52
52
  * Send resume assistant message
53
53
  */
54
- resumeAssistant(message: Omit<Hume.empathicVoice.ResumeAssistantMessage, "type">): Promise<void>;
54
+ resumeAssistant(message: Omit<Hume.empathicVoice.ResumeAssistantMessage, "type">): void;
55
55
  /**
56
56
  * Send tool response message
57
57
  */
58
- sendToolResponseMessage(message: Omit<Hume.empathicVoice.ToolResponseMessage, "type">): Promise<void>;
58
+ sendToolResponseMessage(message: Omit<Hume.empathicVoice.ToolResponseMessage, "type">): void;
59
59
  /**
60
60
  * Send tool error message
61
61
  */
62
- sendToolErrorMessage(message: Omit<Hume.empathicVoice.ToolErrorMessage, "type">): Promise<void>;
62
+ sendToolErrorMessage(message: Omit<Hume.empathicVoice.ToolErrorMessage, "type">): void;
63
63
  /**
64
64
  * Send text input
65
65
  */
66
- sendUserInput(text: string): Promise<void>;
66
+ sendUserInput(text: string): void;
67
67
  /**
68
68
  * Closes the underlying socket.
69
69
  */
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  Object.defineProperty(exports, "__esModule", { value: true });
35
26
  exports.ChatSocket = void 0;
36
27
  const serializers = __importStar(require("../../../../../../serialization/index"));
@@ -92,67 +83,51 @@ class ChatSocket {
92
83
  * Send audio input
93
84
  */
94
85
  sendAudioInput(message) {
95
- return __awaiter(this, void 0, void 0, function* () {
96
- yield this.sendJson(Object.assign({ type: "audio_input" }, message));
97
- });
86
+ this.sendJson(Object.assign({ type: "audio_input" }, message));
98
87
  }
99
88
  /**
100
89
  * Send session settings
101
90
  */
102
91
  sendSessionSettings(message) {
103
- return __awaiter(this, void 0, void 0, function* () {
104
- yield this.sendJson(Object.assign({ type: "session_settings" }, message));
105
- });
92
+ this.sendJson(Object.assign({ type: "session_settings" }, message));
106
93
  }
107
94
  /**
108
95
  * Send assistant input
109
96
  */
110
97
  sendAssistantInput(message) {
111
- return __awaiter(this, void 0, void 0, function* () {
112
- yield this.sendJson(Object.assign({ type: "assistant_input" }, message));
113
- });
98
+ this.sendJson(Object.assign({ type: "assistant_input" }, message));
114
99
  }
115
100
  /**
116
101
  * Send pause assistant message
117
102
  */
118
103
  pauseAssistant(message) {
119
- return __awaiter(this, void 0, void 0, function* () {
120
- yield this.sendJson(Object.assign({ type: "pause_assistant_message" }, message));
121
- });
104
+ this.sendJson(Object.assign({ type: "pause_assistant_message" }, message));
122
105
  }
123
106
  /**
124
107
  * Send resume assistant message
125
108
  */
126
109
  resumeAssistant(message) {
127
- return __awaiter(this, void 0, void 0, function* () {
128
- yield this.sendJson(Object.assign({ type: "resume_assistant_message" }, message));
129
- });
110
+ this.sendJson(Object.assign({ type: "resume_assistant_message" }, message));
130
111
  }
131
112
  /**
132
113
  * Send tool response message
133
114
  */
134
115
  sendToolResponseMessage(message) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- yield this.sendJson(Object.assign({ type: "tool_response" }, message));
137
- });
116
+ this.sendJson(Object.assign({ type: "tool_response" }, message));
138
117
  }
139
118
  /**
140
119
  * Send tool error message
141
120
  */
142
121
  sendToolErrorMessage(message) {
143
- return __awaiter(this, void 0, void 0, function* () {
144
- yield this.sendJson(Object.assign({ type: "tool_error" }, message));
145
- });
122
+ this.sendJson(Object.assign({ type: "tool_error" }, message));
146
123
  }
147
124
  /**
148
125
  * Send text input
149
126
  */
150
127
  sendUserInput(text) {
151
- return __awaiter(this, void 0, void 0, function* () {
152
- yield this.sendJson({
153
- type: "user_input",
154
- text,
155
- });
128
+ this.sendJson({
129
+ type: "user_input",
130
+ text,
156
131
  });
157
132
  }
158
133
  /**
@@ -166,12 +141,10 @@ class ChatSocket {
166
141
  this.socket.removeEventListener('error', this.handleError);
167
142
  }
168
143
  sendJson(payload) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- const jsonPayload = yield serializers.empathicVoice.PublishEvent.jsonOrThrow(payload, {
171
- unrecognizedObjectKeys: "strip",
172
- });
173
- this.socket.send(JSON.stringify(jsonPayload));
144
+ const jsonPayload = serializers.empathicVoice.PublishEvent.jsonOrThrow(payload, {
145
+ unrecognizedObjectKeys: "strip",
174
146
  });
147
+ this.socket.send(JSON.stringify(jsonPayload));
175
148
  }
176
149
  }
177
150
  exports.ChatSocket = ChatSocket;
@@ -11,8 +11,11 @@ export declare namespace ChatGroups {
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }
@@ -72,7 +72,7 @@ class ChatGroups {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/chat_groups"),
74
74
  method: "GET",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "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,
@@ -80,7 +80,7 @@ class ChatGroups {
80
80
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
81
  });
82
82
  if (_response.ok) {
83
- return yield serializers.empathicVoice.ReturnPagedChatGroups.parseOrThrow(_response.body, {
83
+ return serializers.empathicVoice.ReturnPagedChatGroups.parseOrThrow(_response.body, {
84
84
  unrecognizedObjectKeys: "passthrough",
85
85
  allowUnrecognizedUnionMembers: true,
86
86
  allowUnrecognizedEnumValues: true,
@@ -133,7 +133,7 @@ class ChatGroups {
133
133
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
134
134
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chat_groups/${encodeURIComponent(id)}/events`),
135
135
  method: "GET",
136
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
136
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
137
137
  contentType: "application/json",
138
138
  queryParameters: _queryParams,
139
139
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -141,7 +141,7 @@ class ChatGroups {
141
141
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
142
142
  });
143
143
  if (_response.ok) {
144
- return yield serializers.empathicVoice.ReturnChatGroupPagedEvents.parseOrThrow(_response.body, {
144
+ return serializers.empathicVoice.ReturnChatGroupPagedEvents.parseOrThrow(_response.body, {
145
145
  unrecognizedObjectKeys: "passthrough",
146
146
  allowUnrecognizedUnionMembers: true,
147
147
  allowUnrecognizedEnumValues: true,
@@ -11,8 +11,11 @@ export declare namespace Chats {
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }
@@ -72,7 +72,7 @@ class Chats {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/chats"),
74
74
  method: "GET",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "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,
@@ -80,7 +80,7 @@ class Chats {
80
80
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
81
  });
82
82
  if (_response.ok) {
83
- return yield serializers.empathicVoice.ReturnPagedChats.parseOrThrow(_response.body, {
83
+ return serializers.empathicVoice.ReturnPagedChats.parseOrThrow(_response.body, {
84
84
  unrecognizedObjectKeys: "passthrough",
85
85
  allowUnrecognizedUnionMembers: true,
86
86
  allowUnrecognizedEnumValues: true,
@@ -133,7 +133,7 @@ class Chats {
133
133
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
134
134
  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)}`),
135
135
  method: "GET",
136
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
136
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
137
137
  contentType: "application/json",
138
138
  queryParameters: _queryParams,
139
139
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -141,7 +141,7 @@ class Chats {
141
141
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
142
142
  });
143
143
  if (_response.ok) {
144
- return yield serializers.empathicVoice.ReturnChatPagedEvents.parseOrThrow(_response.body, {
144
+ return serializers.empathicVoice.ReturnChatPagedEvents.parseOrThrow(_response.body, {
145
145
  unrecognizedObjectKeys: "passthrough",
146
146
  allowUnrecognizedUnionMembers: true,
147
147
  allowUnrecognizedEnumValues: true,
@@ -11,8 +11,11 @@ export declare namespace Configs {
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }
@@ -72,7 +72,7 @@ class Configs {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "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.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "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,
@@ -80,7 +80,7 @@ class Configs {
80
80
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
81
  });
82
82
  if (_response.ok) {
83
- return yield serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
83
+ return serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
84
84
  unrecognizedObjectKeys: "passthrough",
85
85
  allowUnrecognizedUnionMembers: true,
86
86
  allowUnrecognizedEnumValues: true,
@@ -123,17 +123,15 @@ class Configs {
123
123
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
124
124
  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
125
  method: "POST",
126
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
126
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
127
127
  contentType: "application/json",
128
- body: yield serializers.empathicVoice.PostedConfig.jsonOrThrow(request, {
129
- unrecognizedObjectKeys: "strip",
130
- }),
128
+ body: serializers.empathicVoice.PostedConfig.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
131
129
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
132
130
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
133
131
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
134
132
  });
135
133
  if (_response.ok) {
136
- return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
134
+ return serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
137
135
  unrecognizedObjectKeys: "passthrough",
138
136
  allowUnrecognizedUnionMembers: true,
139
137
  allowUnrecognizedEnumValues: true,
@@ -186,7 +184,7 @@ class Configs {
186
184
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
187
185
  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
186
  method: "GET",
189
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
187
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
190
188
  contentType: "application/json",
191
189
  queryParameters: _queryParams,
192
190
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -194,7 +192,7 @@ class Configs {
194
192
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
195
193
  });
196
194
  if (_response.ok) {
197
- return yield serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
195
+ return serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, {
198
196
  unrecognizedObjectKeys: "passthrough",
199
197
  allowUnrecognizedUnionMembers: true,
200
198
  allowUnrecognizedEnumValues: true,
@@ -236,9 +234,9 @@ class Configs {
236
234
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
237
235
  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
236
  method: "POST",
239
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
237
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
240
238
  contentType: "application/json",
241
- body: yield serializers.empathicVoice.PostedConfigVersion.jsonOrThrow(request, {
239
+ body: serializers.empathicVoice.PostedConfigVersion.jsonOrThrow(request, {
242
240
  unrecognizedObjectKeys: "strip",
243
241
  }),
244
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -246,7 +244,7 @@ class Configs {
246
244
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
247
245
  });
248
246
  if (_response.ok) {
249
- return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
247
+ return serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
250
248
  unrecognizedObjectKeys: "passthrough",
251
249
  allowUnrecognizedUnionMembers: true,
252
250
  allowUnrecognizedEnumValues: true,
@@ -287,7 +285,7 @@ class Configs {
287
285
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
288
286
  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
287
  method: "DELETE",
290
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
288
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
291
289
  contentType: "application/json",
292
290
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
293
291
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -333,11 +331,9 @@ class Configs {
333
331
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
334
332
  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)}`),
335
333
  method: "PATCH",
336
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
334
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
337
335
  contentType: "application/json",
338
- body: yield serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, {
339
- unrecognizedObjectKeys: "strip",
340
- }),
336
+ body: serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
341
337
  responseType: "text",
342
338
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
343
339
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -381,14 +377,14 @@ class Configs {
381
377
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
382
378
  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)}`),
383
379
  method: "GET",
384
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
380
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
385
381
  contentType: "application/json",
386
382
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
387
383
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
388
384
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
389
385
  });
390
386
  if (_response.ok) {
391
- return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
387
+ return serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
392
388
  unrecognizedObjectKeys: "passthrough",
393
389
  allowUnrecognizedUnionMembers: true,
394
390
  allowUnrecognizedEnumValues: true,
@@ -430,7 +426,7 @@ class Configs {
430
426
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
431
427
  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)}`),
432
428
  method: "DELETE",
433
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
429
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
434
430
  contentType: "application/json",
435
431
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
436
432
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -475,9 +471,9 @@ class Configs {
475
471
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
476
472
  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)}`),
477
473
  method: "PATCH",
478
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.8.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
474
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.7.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
479
475
  contentType: "application/json",
480
- body: yield serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, {
476
+ body: serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, {
481
477
  unrecognizedObjectKeys: "strip",
482
478
  }),
483
479
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -485,7 +481,7 @@ class Configs {
485
481
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
486
482
  });
487
483
  if (_response.ok) {
488
- return yield serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
484
+ return serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, {
489
485
  unrecognizedObjectKeys: "passthrough",
490
486
  allowUnrecognizedUnionMembers: true,
491
487
  allowUnrecognizedEnumValues: true,
@@ -11,8 +11,11 @@ export declare namespace Prompts {
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }