hume 0.9.9 → 0.9.10

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 (77) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +84 -0
  2. package/.mock/definition/empathic-voice/chatWebhooks.yml +21 -0
  3. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
  4. package/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
  5. package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  6. package/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
  7. package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  8. package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  9. package/api/resources/empathicVoice/types/WebhookEvent.d.ts +5 -0
  10. package/api/resources/empathicVoice/types/WebhookEvent.js +5 -0
  11. package/api/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
  12. package/api/resources/empathicVoice/types/WebhookEventBase.js +5 -0
  13. package/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +13 -0
  14. package/api/resources/empathicVoice/types/WebhookEventChatEnded.js +5 -0
  15. package/api/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +8 -0
  16. package/api/resources/empathicVoice/types/WebhookEventChatStartType.js +10 -0
  17. package/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +16 -0
  18. package/api/resources/empathicVoice/types/WebhookEventChatStarted.js +5 -0
  19. package/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +12 -0
  20. package/api/resources/empathicVoice/types/WebhookEventChatStatus.js +14 -0
  21. package/api/resources/empathicVoice/types/index.d.ts +6 -0
  22. package/api/resources/empathicVoice/types/index.js +6 -0
  23. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  24. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
  25. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
  26. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  27. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
  28. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  29. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  30. package/dist/api/resources/empathicVoice/types/WebhookEvent.d.ts +5 -0
  31. package/dist/api/resources/empathicVoice/types/WebhookEvent.js +5 -0
  32. package/dist/api/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
  33. package/dist/api/resources/empathicVoice/types/WebhookEventBase.js +5 -0
  34. package/dist/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +13 -0
  35. package/dist/api/resources/empathicVoice/types/WebhookEventChatEnded.js +5 -0
  36. package/dist/api/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +8 -0
  37. package/dist/api/resources/empathicVoice/types/WebhookEventChatStartType.js +10 -0
  38. package/dist/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +16 -0
  39. package/dist/api/resources/empathicVoice/types/WebhookEventChatStarted.js +5 -0
  40. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +12 -0
  41. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.js +14 -0
  42. package/dist/api/resources/empathicVoice/types/index.d.ts +6 -0
  43. package/dist/api/resources/empathicVoice/types/index.js +6 -0
  44. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  45. package/dist/serialization/resources/empathicVoice/types/WebhookEvent.d.ts +12 -0
  46. package/dist/serialization/resources/empathicVoice/types/WebhookEvent.js +33 -0
  47. package/dist/serialization/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
  48. package/dist/serialization/resources/empathicVoice/types/WebhookEventBase.js +35 -0
  49. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +19 -0
  50. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +42 -0
  51. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +10 -0
  52. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStartType.js +31 -0
  53. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +18 -0
  54. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +41 -0
  55. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +10 -0
  56. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +38 -0
  57. package/dist/serialization/resources/empathicVoice/types/index.d.ts +6 -0
  58. package/dist/serialization/resources/empathicVoice/types/index.js +6 -0
  59. package/dist/version.d.ts +1 -1
  60. package/dist/version.js +1 -1
  61. package/package.json +1 -1
  62. package/serialization/resources/empathicVoice/types/WebhookEvent.d.ts +12 -0
  63. package/serialization/resources/empathicVoice/types/WebhookEvent.js +33 -0
  64. package/serialization/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
  65. package/serialization/resources/empathicVoice/types/WebhookEventBase.js +35 -0
  66. package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +19 -0
  67. package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +42 -0
  68. package/serialization/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +10 -0
  69. package/serialization/resources/empathicVoice/types/WebhookEventChatStartType.js +31 -0
  70. package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +18 -0
  71. package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +41 -0
  72. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +10 -0
  73. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +38 -0
  74. package/serialization/resources/empathicVoice/types/index.d.ts +6 -0
  75. package/serialization/resources/empathicVoice/types/index.js +6 -0
  76. package/version.d.ts +1 -1
  77. package/version.js +1 -1
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ export interface WebhookEventChatEnded extends Hume.empathicVoice.WebhookEventBase {
6
+ /** Always `chat_ended`. */
7
+ eventName?: "chat_ended";
8
+ endTime: number;
9
+ durationSeconds: number;
10
+ endReason: Hume.empathicVoice.WebhookEventChatStatus;
11
+ callerNumber?: string;
12
+ customSessionId?: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type WebhookEventChatStartType = "new_chat_group" | "resumed_chat_group";
5
+ export declare const WebhookEventChatStartType: {
6
+ readonly NewChatGroup: "new_chat_group";
7
+ readonly ResumedChatGroup: "resumed_chat_group";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WebhookEventChatStartType = void 0;
7
+ exports.WebhookEventChatStartType = {
8
+ NewChatGroup: "new_chat_group",
9
+ ResumedChatGroup: "resumed_chat_group",
10
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ export interface WebhookEventChatStarted extends Hume.empathicVoice.WebhookEventBase {
6
+ /** Always `chat_started`. */
7
+ eventName?: "chat_started";
8
+ /** Unix timestamp (in milliseconds) indicating when the session started. */
9
+ startTime: number;
10
+ /** Indicates whether the chat is the first in a new Chat Group (`new_chat_group`) or the continuation of an existing chat group (`resumed_chat_group`). */
11
+ chatStartType: Hume.empathicVoice.WebhookEventChatStartType;
12
+ /** Phone number of the caller in E.164 format (e.g., `+12223333333`). This field is included only if the Chat was created via the [Twilio phone calling](/docs/empathic-voice-interface-evi/phone-calling) integration. */
13
+ callerNumber?: string;
14
+ /** User-defined session ID. Relevant only when employing a [custom language model](/docs/empathic-voice-interface-evi/custom-language-model) in the EVI Config. */
15
+ customSessionId?: string;
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type WebhookEventChatStatus = "ACTIVE" | "USER_ENDED" | "USER_TIMEOUT" | "INACTIVITY_TIMEOUT" | "MAX_DURATION_TIMEOUT" | "ERROR";
5
+ export declare const WebhookEventChatStatus: {
6
+ readonly Active: "ACTIVE";
7
+ readonly UserEnded: "USER_ENDED";
8
+ readonly UserTimeout: "USER_TIMEOUT";
9
+ readonly InactivityTimeout: "INACTIVITY_TIMEOUT";
10
+ readonly MaxDurationTimeout: "MAX_DURATION_TIMEOUT";
11
+ readonly Error: "ERROR";
12
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WebhookEventChatStatus = void 0;
7
+ exports.WebhookEventChatStatus = {
8
+ Active: "ACTIVE",
9
+ UserEnded: "USER_ENDED",
10
+ UserTimeout: "USER_TIMEOUT",
11
+ InactivityTimeout: "INACTIVITY_TIMEOUT",
12
+ MaxDurationTimeout: "MAX_DURATION_TIMEOUT",
13
+ Error: "ERROR",
14
+ };
@@ -110,3 +110,9 @@ export * from "./FunctionCallResponseInput";
110
110
  export * from "./HttpValidationError";
111
111
  export * from "./ValidationErrorLocItem";
112
112
  export * from "./ValidationError";
113
+ export * from "./WebhookEventChatEnded";
114
+ export * from "./WebhookEventChatStartType";
115
+ export * from "./WebhookEventChatStarted";
116
+ export * from "./WebhookEventChatStatus";
117
+ export * from "./WebhookEvent";
118
+ export * from "./WebhookEventBase";
@@ -126,3 +126,9 @@ __exportStar(require("./FunctionCallResponseInput"), exports);
126
126
  __exportStar(require("./HttpValidationError"), exports);
127
127
  __exportStar(require("./ValidationErrorLocItem"), exports);
128
128
  __exportStar(require("./ValidationError"), exports);
129
+ __exportStar(require("./WebhookEventChatEnded"), exports);
130
+ __exportStar(require("./WebhookEventChatStartType"), exports);
131
+ __exportStar(require("./WebhookEventChatStarted"), exports);
132
+ __exportStar(require("./WebhookEventChatStatus"), exports);
133
+ __exportStar(require("./WebhookEvent"), exports);
134
+ __exportStar(require("./WebhookEventBase"), exports);
@@ -88,7 +88,7 @@ class Batch {
88
88
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
89
89
  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"),
90
90
  method: "GET",
91
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.9", "User-Agent": "hume/0.9.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
91
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.10", "User-Agent": "hume/0.9.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
92
92
  contentType: "application/json",
93
93
  queryParameters: _queryParams,
94
94
  requestType: "json",
@@ -143,7 +143,7 @@ class Batch {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  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"),
145
145
  method: "POST",
146
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.9", "User-Agent": "hume/0.9.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
146
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.10", "User-Agent": "hume/0.9.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
147
147
  contentType: "application/json",
148
148
  requestType: "json",
149
149
  body: serializers.expressionMeasurement.batch.InferenceBaseRequest.jsonOrThrow(request, {
@@ -197,7 +197,7 @@ class Batch {
197
197
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
198
198
  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/${encodeURIComponent(id)}`),
199
199
  method: "GET",
200
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.9", "User-Agent": "hume/0.9.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
200
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.10", "User-Agent": "hume/0.9.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
201
201
  contentType: "application/json",
202
202
  requestType: "json",
203
203
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -248,7 +248,7 @@ class Batch {
248
248
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
249
249
  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/${encodeURIComponent(id)}/predictions`),
250
250
  method: "GET",
251
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.9", "User-Agent": "hume/0.9.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
251
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.10", "User-Agent": "hume/0.9.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
252
252
  contentType: "application/json",
253
253
  requestType: "json",
254
254
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -293,7 +293,7 @@ class Batch {
293
293
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
294
294
  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/${encodeURIComponent(id)}/artifacts`),
295
295
  method: "GET",
296
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.9", "User-Agent": "hume/0.9.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
296
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.10", "User-Agent": "hume/0.9.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
297
297
  contentType: "application/json",
298
298
  requestType: "json",
299
299
  responseType: "streaming",
@@ -349,7 +349,7 @@ class Batch {
349
349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
350
350
  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"),
351
351
  method: "POST",
352
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.9", "User-Agent": "hume/0.9.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
352
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.10", "User-Agent": "hume/0.9.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
353
353
  requestType: "file",
354
354
  duplex: _maybeEncodedRequest.duplex,
355
355
  body: _maybeEncodedRequest.body,
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { WebhookEventChatStarted } from "./WebhookEventChatStarted";
8
+ import { WebhookEventChatEnded } from "./WebhookEventChatEnded";
9
+ export declare const WebhookEvent: core.serialization.Schema<serializers.empathicVoice.WebhookEvent.Raw, Hume.empathicVoice.WebhookEvent>;
10
+ export declare namespace WebhookEvent {
11
+ type Raw = WebhookEventChatStarted.Raw | WebhookEventChatEnded.Raw;
12
+ }
@@ -0,0 +1,33 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEvent = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebhookEventChatStarted_1 = require("./WebhookEventChatStarted");
32
+ const WebhookEventChatEnded_1 = require("./WebhookEventChatEnded");
33
+ exports.WebhookEvent = core.serialization.undiscriminatedUnion([WebhookEventChatStarted_1.WebhookEventChatStarted, WebhookEventChatEnded_1.WebhookEventChatEnded]);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const WebhookEventBase: core.serialization.ObjectSchema<serializers.empathicVoice.WebhookEventBase.Raw, Hume.empathicVoice.WebhookEventBase>;
8
+ export declare namespace WebhookEventBase {
9
+ interface Raw {
10
+ chat_group_id: string;
11
+ chat_id: string;
12
+ config_id?: string | null;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEventBase = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.WebhookEventBase = core.serialization.object({
32
+ chatGroupId: core.serialization.property("chat_group_id", core.serialization.string()),
33
+ chatId: core.serialization.property("chat_id", core.serialization.string()),
34
+ configId: core.serialization.property("config_id", core.serialization.string().optional()),
35
+ });
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { WebhookEventChatStatus } from "./WebhookEventChatStatus";
8
+ import { WebhookEventBase } from "./WebhookEventBase";
9
+ export declare const WebhookEventChatEnded: core.serialization.ObjectSchema<serializers.empathicVoice.WebhookEventChatEnded.Raw, Hume.empathicVoice.WebhookEventChatEnded>;
10
+ export declare namespace WebhookEventChatEnded {
11
+ interface Raw extends WebhookEventBase.Raw {
12
+ event_name?: "chat_ended" | null;
13
+ end_time: number;
14
+ duration_seconds: number;
15
+ end_reason: WebhookEventChatStatus.Raw;
16
+ caller_number?: string | null;
17
+ custom_session_id?: string | null;
18
+ }
19
+ }
@@ -0,0 +1,42 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEventChatEnded = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebhookEventChatStatus_1 = require("./WebhookEventChatStatus");
32
+ const WebhookEventBase_1 = require("./WebhookEventBase");
33
+ exports.WebhookEventChatEnded = core.serialization
34
+ .object({
35
+ eventName: core.serialization.property("event_name", core.serialization.stringLiteral("chat_ended").optional()),
36
+ endTime: core.serialization.property("end_time", core.serialization.number()),
37
+ durationSeconds: core.serialization.property("duration_seconds", core.serialization.number()),
38
+ endReason: core.serialization.property("end_reason", WebhookEventChatStatus_1.WebhookEventChatStatus),
39
+ callerNumber: core.serialization.property("caller_number", core.serialization.string().optional()),
40
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
41
+ })
42
+ .extend(WebhookEventBase_1.WebhookEventBase);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const WebhookEventChatStartType: core.serialization.Schema<serializers.empathicVoice.WebhookEventChatStartType.Raw, Hume.empathicVoice.WebhookEventChatStartType>;
8
+ export declare namespace WebhookEventChatStartType {
9
+ type Raw = "new_chat_group" | "resumed_chat_group";
10
+ }
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEventChatStartType = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.WebhookEventChatStartType = core.serialization.enum_(["new_chat_group", "resumed_chat_group"]);
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { WebhookEventChatStartType } from "./WebhookEventChatStartType";
8
+ import { WebhookEventBase } from "./WebhookEventBase";
9
+ export declare const WebhookEventChatStarted: core.serialization.ObjectSchema<serializers.empathicVoice.WebhookEventChatStarted.Raw, Hume.empathicVoice.WebhookEventChatStarted>;
10
+ export declare namespace WebhookEventChatStarted {
11
+ interface Raw extends WebhookEventBase.Raw {
12
+ event_name?: "chat_started" | null;
13
+ start_time: number;
14
+ chat_start_type: WebhookEventChatStartType.Raw;
15
+ caller_number?: string | null;
16
+ custom_session_id?: string | null;
17
+ }
18
+ }
@@ -0,0 +1,41 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEventChatStarted = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebhookEventChatStartType_1 = require("./WebhookEventChatStartType");
32
+ const WebhookEventBase_1 = require("./WebhookEventBase");
33
+ exports.WebhookEventChatStarted = core.serialization
34
+ .object({
35
+ eventName: core.serialization.property("event_name", core.serialization.stringLiteral("chat_started").optional()),
36
+ startTime: core.serialization.property("start_time", core.serialization.number()),
37
+ chatStartType: core.serialization.property("chat_start_type", WebhookEventChatStartType_1.WebhookEventChatStartType),
38
+ callerNumber: core.serialization.property("caller_number", core.serialization.string().optional()),
39
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
40
+ })
41
+ .extend(WebhookEventBase_1.WebhookEventBase);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const WebhookEventChatStatus: core.serialization.Schema<serializers.empathicVoice.WebhookEventChatStatus.Raw, Hume.empathicVoice.WebhookEventChatStatus>;
8
+ export declare namespace WebhookEventChatStatus {
9
+ type Raw = "ACTIVE" | "USER_ENDED" | "USER_TIMEOUT" | "INACTIVITY_TIMEOUT" | "MAX_DURATION_TIMEOUT" | "ERROR";
10
+ }
@@ -0,0 +1,38 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEventChatStatus = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.WebhookEventChatStatus = core.serialization.enum_([
32
+ "ACTIVE",
33
+ "USER_ENDED",
34
+ "USER_TIMEOUT",
35
+ "INACTIVITY_TIMEOUT",
36
+ "MAX_DURATION_TIMEOUT",
37
+ "ERROR",
38
+ ]);
@@ -110,3 +110,9 @@ export * from "./FunctionCallResponseInput";
110
110
  export * from "./HttpValidationError";
111
111
  export * from "./ValidationErrorLocItem";
112
112
  export * from "./ValidationError";
113
+ export * from "./WebhookEventChatEnded";
114
+ export * from "./WebhookEventChatStartType";
115
+ export * from "./WebhookEventChatStarted";
116
+ export * from "./WebhookEventChatStatus";
117
+ export * from "./WebhookEvent";
118
+ export * from "./WebhookEventBase";
@@ -126,3 +126,9 @@ __exportStar(require("./FunctionCallResponseInput"), exports);
126
126
  __exportStar(require("./HttpValidationError"), exports);
127
127
  __exportStar(require("./ValidationErrorLocItem"), exports);
128
128
  __exportStar(require("./ValidationError"), exports);
129
+ __exportStar(require("./WebhookEventChatEnded"), exports);
130
+ __exportStar(require("./WebhookEventChatStartType"), exports);
131
+ __exportStar(require("./WebhookEventChatStarted"), exports);
132
+ __exportStar(require("./WebhookEventChatStatus"), exports);
133
+ __exportStar(require("./WebhookEvent"), exports);
134
+ __exportStar(require("./WebhookEventBase"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.9.9";
1
+ export declare const SDK_VERSION = "0.9.10";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.9.9";
4
+ exports.SDK_VERSION = "0.9.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { WebhookEventChatStarted } from "./WebhookEventChatStarted";
8
+ import { WebhookEventChatEnded } from "./WebhookEventChatEnded";
9
+ export declare const WebhookEvent: core.serialization.Schema<serializers.empathicVoice.WebhookEvent.Raw, Hume.empathicVoice.WebhookEvent>;
10
+ export declare namespace WebhookEvent {
11
+ type Raw = WebhookEventChatStarted.Raw | WebhookEventChatEnded.Raw;
12
+ }
@@ -0,0 +1,33 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebhookEvent = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebhookEventChatStarted_1 = require("./WebhookEventChatStarted");
32
+ const WebhookEventChatEnded_1 = require("./WebhookEventChatEnded");
33
+ exports.WebhookEvent = core.serialization.undiscriminatedUnion([WebhookEventChatStarted_1.WebhookEventChatStarted, WebhookEventChatEnded_1.WebhookEventChatEnded]);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Hume from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const WebhookEventBase: core.serialization.ObjectSchema<serializers.empathicVoice.WebhookEventBase.Raw, Hume.empathicVoice.WebhookEventBase>;
8
+ export declare namespace WebhookEventBase {
9
+ interface Raw {
10
+ chat_group_id: string;
11
+ chat_id: string;
12
+ config_id?: string | null;
13
+ }
14
+ }