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.
- package/.mock/definition/empathic-voice/__package__.yml +84 -0
- package/.mock/definition/empathic-voice/chatWebhooks.yml +21 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
- package/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
- package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/api/resources/empathicVoice/types/WebhookEvent.d.ts +5 -0
- package/api/resources/empathicVoice/types/WebhookEvent.js +5 -0
- package/api/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
- package/api/resources/empathicVoice/types/WebhookEventBase.js +5 -0
- package/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +13 -0
- package/api/resources/empathicVoice/types/WebhookEventChatEnded.js +5 -0
- package/api/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +8 -0
- package/api/resources/empathicVoice/types/WebhookEventChatStartType.js +10 -0
- package/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +16 -0
- package/api/resources/empathicVoice/types/WebhookEventChatStarted.js +5 -0
- package/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +12 -0
- package/api/resources/empathicVoice/types/WebhookEventChatStatus.js +14 -0
- package/api/resources/empathicVoice/types/index.d.ts +6 -0
- package/api/resources/empathicVoice/types/index.js +6 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/types/WebhookEvent.d.ts +5 -0
- package/dist/api/resources/empathicVoice/types/WebhookEvent.js +5 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventBase.js +5 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +13 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatEnded.js +5 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +8 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStartType.js +10 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +16 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStarted.js +5 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +12 -0
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.js +14 -0
- package/dist/api/resources/empathicVoice/types/index.d.ts +6 -0
- package/dist/api/resources/empathicVoice/types/index.js +6 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/dist/serialization/resources/empathicVoice/types/WebhookEvent.d.ts +12 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEvent.js +33 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventBase.js +35 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +19 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +42 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +10 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStartType.js +31 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +18 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +41 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +10 -0
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +38 -0
- package/dist/serialization/resources/empathicVoice/types/index.d.ts +6 -0
- package/dist/serialization/resources/empathicVoice/types/index.js +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/serialization/resources/empathicVoice/types/WebhookEvent.d.ts +12 -0
- package/serialization/resources/empathicVoice/types/WebhookEvent.js +33 -0
- package/serialization/resources/empathicVoice/types/WebhookEventBase.d.ts +14 -0
- package/serialization/resources/empathicVoice/types/WebhookEventBase.js +35 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +19 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +42 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatStartType.d.ts +10 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatStartType.js +31 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +18 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +41 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +10 -0
- package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +38 -0
- package/serialization/resources/empathicVoice/types/index.d.ts +6 -0
- package/serialization/resources/empathicVoice/types/index.js +6 -0
- package/version.d.ts +1 -1
- 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,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,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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const SDK_VERSION = "0.9.10";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -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
|
+
}
|