hume 0.5.17 → 0.6.1

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 (182) hide show
  1. package/.mock/definition/api.yml +12 -0
  2. package/.mock/definition/custom-models/__package__.yml +1392 -0
  3. package/.mock/definition/custom-models/datasets.yml +406 -0
  4. package/.mock/definition/custom-models/files.yml +263 -0
  5. package/.mock/definition/custom-models/jobs.yml +44 -0
  6. package/.mock/definition/custom-models/models.yml +303 -0
  7. package/.mock/definition/empathic-voice/__package__.yml +896 -0
  8. package/.mock/definition/empathic-voice/chat.yml +59 -0
  9. package/.mock/definition/empathic-voice/chatGroups.yml +80 -0
  10. package/.mock/definition/empathic-voice/chats.yml +86 -0
  11. package/.mock/definition/empathic-voice/configs.yml +413 -0
  12. package/.mock/definition/empathic-voice/prompts.yml +265 -0
  13. package/.mock/definition/empathic-voice/tools.yml +398 -0
  14. package/.mock/definition/expression-measurement/__package__.yml +1122 -0
  15. package/.mock/definition/expression-measurement/batch.yml +352 -0
  16. package/.mock/definition/expression-measurement/stream.yml +362 -0
  17. package/.mock/fern.config.json +4 -0
  18. package/Client.d.ts +1 -0
  19. package/api/resources/customModels/client/Client.d.ts +1 -0
  20. package/api/resources/customModels/resources/datasets/client/Client.d.ts +1 -0
  21. package/api/resources/customModels/resources/datasets/client/Client.js +38 -30
  22. package/api/resources/customModels/resources/files/client/Client.d.ts +1 -0
  23. package/api/resources/customModels/resources/files/client/Client.js +26 -20
  24. package/api/resources/customModels/resources/jobs/client/Client.d.ts +1 -0
  25. package/api/resources/customModels/resources/jobs/client/Client.js +6 -4
  26. package/api/resources/customModels/resources/models/client/Client.d.ts +1 -0
  27. package/api/resources/customModels/resources/models/client/Client.js +18 -12
  28. package/api/resources/empathicVoice/client/Client.d.ts +4 -0
  29. package/api/resources/empathicVoice/client/Client.js +5 -0
  30. package/api/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +1 -1
  31. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +42 -0
  32. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +178 -0
  33. package/api/resources/empathicVoice/resources/chatGroups/client/index.d.ts +1 -0
  34. package/api/resources/empathicVoice/resources/chatGroups/client/index.js +17 -0
  35. package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +21 -0
  36. package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.js +5 -0
  37. package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +17 -0
  38. package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.js +5 -0
  39. package/api/resources/empathicVoice/resources/chatGroups/client/requests/index.d.ts +2 -0
  40. package/api/resources/empathicVoice/resources/chatGroups/client/requests/index.js +2 -0
  41. package/api/resources/empathicVoice/resources/chatGroups/index.d.ts +1 -0
  42. package/api/resources/empathicVoice/resources/chatGroups/index.js +17 -0
  43. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
  44. package/api/resources/empathicVoice/resources/chats/client/Client.js +6 -4
  45. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
  46. package/api/resources/empathicVoice/resources/configs/client/Client.js +27 -18
  47. package/api/resources/empathicVoice/resources/index.d.ts +2 -0
  48. package/api/resources/empathicVoice/resources/index.js +3 -1
  49. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
  50. package/api/resources/empathicVoice/resources/prompts/client/Client.js +27 -18
  51. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
  52. package/api/resources/empathicVoice/resources/tools/client/Client.js +27 -18
  53. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  54. package/api/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
  55. package/api/resources/empathicVoice/types/ChatMetadata.js +5 -0
  56. package/api/resources/empathicVoice/types/ReturnChat.d.ts +2 -0
  57. package/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +2 -0
  58. package/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +19 -0
  59. package/api/resources/empathicVoice/types/ReturnChatGroup.js +5 -0
  60. package/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +24 -0
  61. package/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +5 -0
  62. package/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +19 -0
  63. package/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +5 -0
  64. package/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +2 -0
  65. package/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
  66. package/api/resources/empathicVoice/types/ReturnPagedChatGroups.js +5 -0
  67. package/api/resources/empathicVoice/types/index.d.ts +5 -0
  68. package/api/resources/empathicVoice/types/index.js +5 -0
  69. package/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
  70. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
  71. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +17 -12
  72. package/core/fetcher/Fetcher.d.ts +1 -0
  73. package/core/fetcher/Fetcher.js +106 -20
  74. package/core/form-data-utils/FormDataWrapper.d.ts +24 -0
  75. package/core/form-data-utils/FormDataWrapper.js +106 -0
  76. package/core/form-data-utils/index.d.ts +1 -0
  77. package/core/form-data-utils/index.js +17 -0
  78. package/core/index.d.ts +1 -0
  79. package/core/index.js +1 -0
  80. package/dist/Client.d.ts +1 -0
  81. package/dist/api/resources/customModels/client/Client.d.ts +1 -0
  82. package/dist/api/resources/customModels/resources/datasets/client/Client.d.ts +1 -0
  83. package/dist/api/resources/customModels/resources/datasets/client/Client.js +38 -30
  84. package/dist/api/resources/customModels/resources/files/client/Client.d.ts +1 -0
  85. package/dist/api/resources/customModels/resources/files/client/Client.js +26 -20
  86. package/dist/api/resources/customModels/resources/jobs/client/Client.d.ts +1 -0
  87. package/dist/api/resources/customModels/resources/jobs/client/Client.js +6 -4
  88. package/dist/api/resources/customModels/resources/models/client/Client.d.ts +1 -0
  89. package/dist/api/resources/customModels/resources/models/client/Client.js +18 -12
  90. package/dist/api/resources/empathicVoice/client/Client.d.ts +4 -0
  91. package/dist/api/resources/empathicVoice/client/Client.js +5 -0
  92. package/dist/api/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +1 -1
  93. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +42 -0
  94. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +178 -0
  95. package/dist/api/resources/empathicVoice/resources/chatGroups/client/index.d.ts +1 -0
  96. package/dist/api/resources/empathicVoice/resources/chatGroups/client/index.js +17 -0
  97. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +21 -0
  98. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.js +5 -0
  99. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +17 -0
  100. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.js +5 -0
  101. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/index.d.ts +2 -0
  102. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/index.js +2 -0
  103. package/dist/api/resources/empathicVoice/resources/chatGroups/index.d.ts +1 -0
  104. package/dist/api/resources/empathicVoice/resources/chatGroups/index.js +17 -0
  105. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
  106. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +6 -4
  107. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
  108. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +27 -18
  109. package/dist/api/resources/empathicVoice/resources/index.d.ts +2 -0
  110. package/dist/api/resources/empathicVoice/resources/index.js +3 -1
  111. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
  112. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +27 -18
  113. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
  114. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +27 -18
  115. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  116. package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
  117. package/dist/api/resources/empathicVoice/types/ChatMetadata.js +5 -0
  118. package/dist/api/resources/empathicVoice/types/ReturnChat.d.ts +2 -0
  119. package/dist/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +2 -0
  120. package/dist/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +19 -0
  121. package/dist/api/resources/empathicVoice/types/ReturnChatGroup.js +5 -0
  122. package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +24 -0
  123. package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +5 -0
  124. package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +19 -0
  125. package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +5 -0
  126. package/dist/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +2 -0
  127. package/dist/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
  128. package/dist/api/resources/empathicVoice/types/ReturnPagedChatGroups.js +5 -0
  129. package/dist/api/resources/empathicVoice/types/index.d.ts +5 -0
  130. package/dist/api/resources/empathicVoice/types/index.js +5 -0
  131. package/dist/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
  132. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
  133. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +17 -12
  134. package/dist/core/fetcher/Fetcher.d.ts +1 -0
  135. package/dist/core/fetcher/Fetcher.js +106 -20
  136. package/dist/core/form-data-utils/FormDataWrapper.d.ts +24 -0
  137. package/dist/core/form-data-utils/FormDataWrapper.js +106 -0
  138. package/dist/core/form-data-utils/index.d.ts +1 -0
  139. package/dist/core/form-data-utils/index.js +17 -0
  140. package/dist/core/index.d.ts +1 -0
  141. package/dist/core/index.js +1 -0
  142. package/dist/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +2 -1
  143. package/dist/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.js +2 -0
  144. package/dist/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
  145. package/dist/serialization/resources/empathicVoice/types/ChatMetadata.js +36 -0
  146. package/dist/serialization/resources/empathicVoice/types/ReturnChat.d.ts +1 -0
  147. package/dist/serialization/resources/empathicVoice/types/ReturnChat.js +1 -0
  148. package/dist/serialization/resources/empathicVoice/types/ReturnChatEvent.d.ts +1 -0
  149. package/dist/serialization/resources/empathicVoice/types/ReturnChatEvent.js +1 -0
  150. package/dist/serialization/resources/empathicVoice/types/ReturnChatGroup.d.ts +17 -0
  151. package/dist/serialization/resources/empathicVoice/types/ReturnChatGroup.js +38 -0
  152. package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +20 -0
  153. package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +41 -0
  154. package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +17 -0
  155. package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +38 -0
  156. package/dist/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +1 -0
  157. package/dist/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.js +1 -0
  158. package/dist/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
  159. package/dist/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.js +36 -0
  160. package/dist/serialization/resources/empathicVoice/types/index.d.ts +5 -0
  161. package/dist/serialization/resources/empathicVoice/types/index.js +5 -0
  162. package/package.json +3 -1
  163. package/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +2 -1
  164. package/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.js +2 -0
  165. package/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
  166. package/serialization/resources/empathicVoice/types/ChatMetadata.js +36 -0
  167. package/serialization/resources/empathicVoice/types/ReturnChat.d.ts +1 -0
  168. package/serialization/resources/empathicVoice/types/ReturnChat.js +1 -0
  169. package/serialization/resources/empathicVoice/types/ReturnChatEvent.d.ts +1 -0
  170. package/serialization/resources/empathicVoice/types/ReturnChatEvent.js +1 -0
  171. package/serialization/resources/empathicVoice/types/ReturnChatGroup.d.ts +17 -0
  172. package/serialization/resources/empathicVoice/types/ReturnChatGroup.js +38 -0
  173. package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +20 -0
  174. package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +41 -0
  175. package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +17 -0
  176. package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +38 -0
  177. package/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +1 -0
  178. package/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.js +1 -0
  179. package/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
  180. package/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.js +36 -0
  181. package/serialization/resources/empathicVoice/types/index.d.ts +5 -0
  182. package/serialization/resources/empathicVoice/types/index.js +5 -0
@@ -44,7 +44,6 @@ const core = __importStar(require("../../../../../../core"));
44
44
  const url_join_1 = __importDefault(require("url-join"));
45
45
  const serializers = __importStar(require("../../../../../../serialization/index"));
46
46
  const errors = __importStar(require("../../../../../../errors/index"));
47
- const form_data_1 = __importDefault(require("form-data"));
48
47
  class Files {
49
48
  constructor(_options = {}) {
50
49
  this._options = _options;
@@ -73,13 +72,14 @@ class Files {
73
72
  _queryParams["shared_assets"] = sharedAssets.toString();
74
73
  }
75
74
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "files"),
75
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/files"),
77
76
  method: "GET",
78
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
77
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
78
  contentType: "application/json",
80
79
  queryParameters: _queryParams,
81
80
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
81
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
82
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
83
83
  });
84
84
  if (_response.ok) {
85
85
  return yield serializers.customModels.FilePage.parseOrThrow(_response.body, {
@@ -130,15 +130,16 @@ class Files {
130
130
  var _a, _b;
131
131
  return __awaiter(this, void 0, void 0, function* () {
132
132
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "files"),
133
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/files"),
134
134
  method: "POST",
135
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
135
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
136
136
  contentType: "application/json",
137
137
  body: yield serializers.customModels.files.createFiles.Request.jsonOrThrow(request, {
138
138
  unrecognizedObjectKeys: "strip",
139
139
  }),
140
140
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
141
141
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
142
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
142
143
  });
143
144
  if (_response.ok) {
144
145
  return yield serializers.customModels.files.createFiles.Response.parseOrThrow(_response.body, {
@@ -183,19 +184,20 @@ class Files {
183
184
  uploadFile(file, attributes, requestOptions) {
184
185
  var _a, _b;
185
186
  return __awaiter(this, void 0, void 0, function* () {
186
- const _request = new form_data_1.default();
187
- _request.append("file", file);
187
+ const _request = new core.FormDataWrapper();
188
+ yield _request.append("file", file);
188
189
  if (attributes != null) {
189
- _request.append("attributes", attributes);
190
+ yield _request.append("attributes", attributes);
190
191
  }
192
+ const _maybeEncodedRequest = _request.getRequest();
191
193
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
192
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "files/upload"),
194
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/files/upload"),
193
195
  method: "POST",
194
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
195
- contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
196
- body: _request,
196
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), (yield _maybeEncodedRequest.getHeaders())),
197
+ body: yield _maybeEncodedRequest.getBody(),
197
198
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
198
199
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
200
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
199
201
  });
200
202
  if (_response.ok) {
201
203
  return yield serializers.customModels.FileWithAttributes.parseOrThrow(_response.body, {
@@ -240,12 +242,13 @@ class Files {
240
242
  var _a, _b;
241
243
  return __awaiter(this, void 0, void 0, function* () {
242
244
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
243
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}`),
245
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/files/${encodeURIComponent(id)}`),
244
246
  method: "GET",
245
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
247
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
246
248
  contentType: "application/json",
247
249
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
248
250
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
251
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
252
  });
250
253
  if (_response.ok) {
251
254
  return yield serializers.customModels.FileWithAttributes.parseOrThrow(_response.body, {
@@ -290,12 +293,13 @@ class Files {
290
293
  var _a, _b;
291
294
  return __awaiter(this, void 0, void 0, function* () {
292
295
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
293
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}`),
296
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/files/${encodeURIComponent(id)}`),
294
297
  method: "DELETE",
295
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
298
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
296
299
  contentType: "application/json",
297
300
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
298
301
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
302
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
299
303
  });
300
304
  if (_response.ok) {
301
305
  return;
@@ -340,13 +344,14 @@ class Files {
340
344
  const _queryParams = {};
341
345
  _queryParams["name"] = name;
342
346
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}`),
347
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/files/${encodeURIComponent(id)}`),
344
348
  method: "PATCH",
345
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
349
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
346
350
  contentType: "application/json",
347
351
  queryParameters: _queryParams,
348
352
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
349
353
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
354
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
350
355
  });
351
356
  if (_response.ok) {
352
357
  return yield serializers.customModels.FileWithAttributes.parseOrThrow(_response.body, {
@@ -391,12 +396,13 @@ class Files {
391
396
  var _a, _b;
392
397
  return __awaiter(this, void 0, void 0, function* () {
393
398
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `files/${encodeURIComponent(id)}/predictions`),
399
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/files/${encodeURIComponent(id)}/predictions`),
395
400
  method: "GET",
396
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
401
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
397
402
  contentType: "application/json",
398
403
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
399
404
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
405
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
400
406
  });
401
407
  if (_response.ok) {
402
408
  return;
@@ -13,6 +13,7 @@ export declare namespace Jobs {
13
13
  interface RequestOptions {
14
14
  timeoutInSeconds?: number;
15
15
  maxRetries?: number;
16
+ abortSignal?: AbortSignal;
16
17
  }
17
18
  }
18
19
  export declare class Jobs {
@@ -68,15 +68,16 @@ class Jobs {
68
68
  var _a, _b;
69
69
  return __awaiter(this, void 0, void 0, function* () {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs/tl/train"),
71
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/v0/batch/jobs/tl/train"),
72
72
  method: "POST",
73
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
73
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
74
74
  contentType: "application/json",
75
75
  body: yield serializers.customModels.TrainingBaseRequest.jsonOrThrow(request, {
76
76
  unrecognizedObjectKeys: "strip",
77
77
  }),
78
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
79
79
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
80
81
  });
81
82
  if (_response.ok) {
82
83
  return yield serializers.customModels.JobId.parseOrThrow(_response.body, {
@@ -125,15 +126,16 @@ class Jobs {
125
126
  var _a, _b;
126
127
  return __awaiter(this, void 0, void 0, function* () {
127
128
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
128
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs/tl/inference"),
129
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/v0/batch/jobs/tl/inference"),
129
130
  method: "POST",
130
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
131
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
131
132
  contentType: "application/json",
132
133
  body: yield serializers.customModels.TlInferenceBaseRequest.jsonOrThrow(request, {
133
134
  unrecognizedObjectKeys: "strip",
134
135
  }),
135
136
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
136
137
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
138
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
137
139
  });
138
140
  if (_response.ok) {
139
141
  return yield serializers.customModels.JobId.parseOrThrow(_response.body, {
@@ -13,6 +13,7 @@ export declare namespace Models {
13
13
  interface RequestOptions {
14
14
  timeoutInSeconds?: number;
15
15
  maxRetries?: number;
16
+ abortSignal?: AbortSignal;
16
17
  }
17
18
  }
18
19
  export declare class Models {
@@ -75,13 +75,14 @@ class Models {
75
75
  _queryParams["shared_assets"] = sharedAssets.toString();
76
76
  }
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "models"),
78
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/models"),
79
79
  method: "GET",
80
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
81
  contentType: "application/json",
82
82
  queryParameters: _queryParams,
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
84
84
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
86
  });
86
87
  if (_response.ok) {
87
88
  return yield serializers.customModels.ModelPage.parseOrThrow(_response.body, {
@@ -126,12 +127,13 @@ class Models {
126
127
  var _a, _b;
127
128
  return __awaiter(this, void 0, void 0, function* () {
128
129
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
129
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/${encodeURIComponent(id)}`),
130
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/models/${encodeURIComponent(id)}`),
130
131
  method: "GET",
131
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
132
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
132
133
  contentType: "application/json",
133
134
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
134
135
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
136
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
135
137
  });
136
138
  if (_response.ok) {
137
139
  return yield serializers.customModels.ExternalModel.parseOrThrow(_response.body, {
@@ -182,13 +184,14 @@ class Models {
182
184
  const _queryParams = {};
183
185
  _queryParams["name"] = name;
184
186
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
185
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/${encodeURIComponent(id)}`),
187
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/models/${encodeURIComponent(id)}`),
186
188
  method: "PATCH",
187
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
189
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
188
190
  contentType: "application/json",
189
191
  queryParameters: _queryParams,
190
192
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
191
193
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
194
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
195
  });
193
196
  if (_response.ok) {
194
197
  return yield serializers.customModels.ExternalModel.parseOrThrow(_response.body, {
@@ -252,13 +255,14 @@ class Models {
252
255
  _queryParams["shared_assets"] = sharedAssets.toString();
253
256
  }
254
257
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
255
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "models/version"),
258
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/registry/models/version"),
256
259
  method: "GET",
257
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
260
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
258
261
  contentType: "application/json",
259
262
  queryParameters: _queryParams,
260
263
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
261
264
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
265
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
262
266
  });
263
267
  if (_response.ok) {
264
268
  return yield serializers.customModels.models.listModelVersions.Response.parseOrThrow(_response.body, {
@@ -309,13 +313,14 @@ class Models {
309
313
  _queryParams["shared_assets"] = sharedAssets.toString();
310
314
  }
311
315
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
312
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/version/${encodeURIComponent(id)}`),
316
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/models/version/${encodeURIComponent(id)}`),
313
317
  method: "GET",
314
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
318
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
315
319
  contentType: "application/json",
316
320
  queryParameters: _queryParams,
317
321
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
318
322
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
323
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
319
324
  });
320
325
  if (_response.ok) {
321
326
  return yield serializers.customModels.ExternalModelVersion.parseOrThrow(_response.body, {
@@ -361,15 +366,16 @@ class Models {
361
366
  var _a, _b;
362
367
  return __awaiter(this, void 0, void 0, function* () {
363
368
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
364
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `models/version/${encodeURIComponent(id)}`),
369
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/registry/models/version/${encodeURIComponent(id)}`),
365
370
  method: "PATCH",
366
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.5.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
371
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
367
372
  contentType: "application/json",
368
373
  body: yield serializers.customModels.models.updateModelDescription.Request.jsonOrThrow(request, {
369
374
  unrecognizedObjectKeys: "strip",
370
375
  }),
371
376
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
372
377
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
378
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
373
379
  });
374
380
  if (_response.ok) {
375
381
  return yield serializers.customModels.ExternalModelVersion.parseOrThrow(_response.body, {
@@ -7,6 +7,7 @@ import { Tools } from "../resources/tools/client/Client";
7
7
  import { Prompts } from "../resources/prompts/client/Client";
8
8
  import { Configs } from "../resources/configs/client/Client";
9
9
  import { Chats } from "../resources/chats/client/Client";
10
+ import { ChatGroups } from "../resources/chatGroups/client/Client";
10
11
  export declare namespace EmpathicVoice {
11
12
  interface Options {
12
13
  environment?: core.Supplier<environments.HumeEnvironment | string>;
@@ -16,6 +17,7 @@ export declare namespace EmpathicVoice {
16
17
  interface RequestOptions {
17
18
  timeoutInSeconds?: number;
18
19
  maxRetries?: number;
20
+ abortSignal?: AbortSignal;
19
21
  }
20
22
  }
21
23
  export declare class EmpathicVoice {
@@ -29,4 +31,6 @@ export declare class EmpathicVoice {
29
31
  get configs(): Configs;
30
32
  protected _chats: Chats | undefined;
31
33
  get chats(): Chats;
34
+ protected _chatGroups: ChatGroups | undefined;
35
+ get chatGroups(): ChatGroups;
32
36
  }
@@ -8,6 +8,7 @@ const Client_1 = require("../resources/tools/client/Client");
8
8
  const Client_2 = require("../resources/prompts/client/Client");
9
9
  const Client_3 = require("../resources/configs/client/Client");
10
10
  const Client_4 = require("../resources/chats/client/Client");
11
+ const Client_5 = require("../resources/chatGroups/client/Client");
11
12
  class EmpathicVoice {
12
13
  constructor(_options = {}) {
13
14
  this._options = _options;
@@ -28,5 +29,9 @@ class EmpathicVoice {
28
29
  var _a;
29
30
  return ((_a = this._chats) !== null && _a !== void 0 ? _a : (this._chats = new Client_4.Chats(this._options)));
30
31
  }
32
+ get chatGroups() {
33
+ var _a;
34
+ return ((_a = this._chatGroups) !== null && _a !== void 0 ? _a : (this._chatGroups = new Client_5.ChatGroups(this._options)));
35
+ }
31
36
  }
32
37
  exports.EmpathicVoice = EmpathicVoice;
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Hume from "../../../../../index";
5
- export declare type SubscribeEvent = Hume.empathicVoice.AssistantEnd | Hume.empathicVoice.AssistantMessage | Hume.empathicVoice.AudioOutput | Hume.empathicVoice.WebSocketError | Hume.empathicVoice.UserInterruption | Hume.empathicVoice.UserMessage | Hume.empathicVoice.ToolCallMessage | Hume.empathicVoice.ToolResponseMessage | Hume.empathicVoice.ToolErrorMessage;
5
+ export declare type SubscribeEvent = Hume.empathicVoice.AssistantEnd | Hume.empathicVoice.AssistantMessage | Hume.empathicVoice.AudioOutput | Hume.empathicVoice.ChatMetadata | Hume.empathicVoice.WebSocketError | Hume.empathicVoice.UserInterruption | Hume.empathicVoice.UserMessage | Hume.empathicVoice.ToolCallMessage | Hume.empathicVoice.ToolResponseMessage | Hume.empathicVoice.ToolErrorMessage;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments";
5
+ import * as core from "../../../../../../core";
6
+ import * as Hume from "../../../../../index";
7
+ export declare namespace ChatGroups {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.HumeEnvironment | string>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ timeoutInSeconds?: number;
15
+ maxRetries?: number;
16
+ abortSignal?: AbortSignal;
17
+ }
18
+ }
19
+ export declare class ChatGroups {
20
+ protected readonly _options: ChatGroups.Options;
21
+ constructor(_options?: ChatGroups.Options);
22
+ /**
23
+ * @param {Hume.empathicVoice.ChatGroupsListChatGroupsRequest} request
24
+ * @param {ChatGroups.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @example
27
+ * await hume.empathicVoice.chatGroups.listChatGroups()
28
+ */
29
+ listChatGroups(request?: Hume.empathicVoice.ChatGroupsListChatGroupsRequest, requestOptions?: ChatGroups.RequestOptions): Promise<Hume.empathicVoice.ReturnPagedChatGroups>;
30
+ /**
31
+ * @param {string} id - Identifier for a chat. Formatted as a UUID.
32
+ * @param {Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest} request
33
+ * @param {ChatGroups.RequestOptions} requestOptions - Request-specific configuration.
34
+ *
35
+ * @example
36
+ * await hume.empathicVoice.chatGroups.listChatGroupEvents("id")
37
+ */
38
+ listChatGroupEvents(id: string, request?: Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest, requestOptions?: ChatGroups.RequestOptions): Promise<Hume.empathicVoice.ReturnChatGroupPagedEvents>;
39
+ protected _getCustomAuthorizationHeaders(): Promise<{
40
+ "X-Hume-Api-Key": string | undefined;
41
+ }>;
42
+ }
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.ChatGroups = void 0;
42
+ const environments = __importStar(require("../../../../../../environments"));
43
+ const core = __importStar(require("../../../../../../core"));
44
+ const url_join_1 = __importDefault(require("url-join"));
45
+ const serializers = __importStar(require("../../../../../../serialization/index"));
46
+ const errors = __importStar(require("../../../../../../errors/index"));
47
+ class ChatGroups {
48
+ constructor(_options = {}) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * @param {Hume.empathicVoice.ChatGroupsListChatGroupsRequest} request
53
+ * @param {ChatGroups.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @example
56
+ * await hume.empathicVoice.chatGroups.listChatGroups()
57
+ */
58
+ listChatGroups(request = {}, requestOptions) {
59
+ var _a, _b;
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ const { pageNumber, pageSize } = request;
62
+ const _queryParams = {};
63
+ if (pageNumber != null) {
64
+ _queryParams["page_number"] = pageNumber.toString();
65
+ }
66
+ if (pageSize != null) {
67
+ _queryParams["page_size"] = pageSize.toString();
68
+ }
69
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
70
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/chat_groups"),
71
+ method: "GET",
72
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
73
+ contentType: "application/json",
74
+ queryParameters: _queryParams,
75
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
76
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
77
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
78
+ });
79
+ if (_response.ok) {
80
+ return yield serializers.empathicVoice.ReturnPagedChatGroups.parseOrThrow(_response.body, {
81
+ unrecognizedObjectKeys: "passthrough",
82
+ allowUnrecognizedUnionMembers: true,
83
+ allowUnrecognizedEnumValues: true,
84
+ skipValidation: true,
85
+ breadcrumbsPrefix: ["response"],
86
+ });
87
+ }
88
+ if (_response.error.reason === "status-code") {
89
+ throw new errors.HumeError({
90
+ statusCode: _response.error.statusCode,
91
+ body: _response.error.body,
92
+ });
93
+ }
94
+ switch (_response.error.reason) {
95
+ case "non-json":
96
+ throw new errors.HumeError({
97
+ statusCode: _response.error.statusCode,
98
+ body: _response.error.rawBody,
99
+ });
100
+ case "timeout":
101
+ throw new errors.HumeTimeoutError();
102
+ case "unknown":
103
+ throw new errors.HumeError({
104
+ message: _response.error.errorMessage,
105
+ });
106
+ }
107
+ });
108
+ }
109
+ /**
110
+ * @param {string} id - Identifier for a chat. Formatted as a UUID.
111
+ * @param {Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest} request
112
+ * @param {ChatGroups.RequestOptions} requestOptions - Request-specific configuration.
113
+ *
114
+ * @example
115
+ * await hume.empathicVoice.chatGroups.listChatGroupEvents("id")
116
+ */
117
+ listChatGroupEvents(id, request = {}, requestOptions) {
118
+ var _a, _b;
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const { pageSize, pageNumber, ascendingOrder } = request;
121
+ const _queryParams = {};
122
+ if (pageSize != null) {
123
+ _queryParams["page_size"] = pageSize.toString();
124
+ }
125
+ if (pageNumber != null) {
126
+ _queryParams["page_number"] = pageNumber.toString();
127
+ }
128
+ if (ascendingOrder != null) {
129
+ _queryParams["ascending_order"] = ascendingOrder.toString();
130
+ }
131
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
132
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chat_groups/${encodeURIComponent(id)}/events`),
133
+ method: "GET",
134
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
135
+ contentType: "application/json",
136
+ queryParameters: _queryParams,
137
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
138
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
139
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
140
+ });
141
+ if (_response.ok) {
142
+ return yield serializers.empathicVoice.ReturnChatGroupPagedEvents.parseOrThrow(_response.body, {
143
+ unrecognizedObjectKeys: "passthrough",
144
+ allowUnrecognizedUnionMembers: true,
145
+ allowUnrecognizedEnumValues: true,
146
+ skipValidation: true,
147
+ breadcrumbsPrefix: ["response"],
148
+ });
149
+ }
150
+ if (_response.error.reason === "status-code") {
151
+ throw new errors.HumeError({
152
+ statusCode: _response.error.statusCode,
153
+ body: _response.error.body,
154
+ });
155
+ }
156
+ switch (_response.error.reason) {
157
+ case "non-json":
158
+ throw new errors.HumeError({
159
+ statusCode: _response.error.statusCode,
160
+ body: _response.error.rawBody,
161
+ });
162
+ case "timeout":
163
+ throw new errors.HumeTimeoutError();
164
+ case "unknown":
165
+ throw new errors.HumeError({
166
+ message: _response.error.errorMessage,
167
+ });
168
+ }
169
+ });
170
+ }
171
+ _getCustomAuthorizationHeaders() {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
174
+ return { "X-Hume-Api-Key": apiKeyValue };
175
+ });
176
+ }
177
+ }
178
+ exports.ChatGroups = ChatGroups;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ChatGroupsListChatGroupEventsRequest {
9
+ /**
10
+ * The maximum number of results to include per page.
11
+ */
12
+ pageSize?: number;
13
+ /**
14
+ * The page number of the results to return.
15
+ */
16
+ pageNumber?: number;
17
+ /**
18
+ * Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true.
19
+ */
20
+ ascendingOrder?: boolean;
21
+ }