hume 0.9.1 → 0.9.2
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/.prettierignore +1 -0
- package/api/resources/empathicVoice/resources/chat/client/Socket.d.ts +4 -1
- package/api/resources/empathicVoice/resources/chat/client/Socket.js +6 -1
- package/dist/api/resources/empathicVoice/resources/chat/client/Socket.d.ts +4 -1
- package/dist/api/resources/empathicVoice/resources/chat/client/Socket.js +6 -1
- package/dist/wrapper/HumeClient.d.ts +7 -3
- package/dist/wrapper/HumeClient.js +2 -2
- package/package.json +1 -1
- package/wrapper/HumeClient.d.ts +7 -3
- package/wrapper/HumeClient.js +2 -2
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mock
|
|
@@ -16,9 +16,12 @@ export declare namespace ChatSocket {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class ChatSocket {
|
|
18
18
|
readonly socket: core.ReconnectingWebSocket;
|
|
19
|
-
readonly readyState: number;
|
|
20
19
|
protected readonly eventHandlers: ChatSocket.EventHandlers;
|
|
21
20
|
constructor({ socket }: ChatSocket.Args);
|
|
21
|
+
/**
|
|
22
|
+
* The current state of the connection; this is one of the Ready state constants
|
|
23
|
+
*/
|
|
24
|
+
get readyState(): number;
|
|
22
25
|
/**
|
|
23
26
|
* @param event - The event to attach to.
|
|
24
27
|
* @param callback - The callback to run when the event is triggered.
|
|
@@ -69,12 +69,17 @@ class ChatSocket {
|
|
|
69
69
|
(_c = (_b = this.eventHandlers).error) === null || _c === void 0 ? void 0 : _c.call(_b, new Error(message));
|
|
70
70
|
};
|
|
71
71
|
this.socket = socket;
|
|
72
|
-
this.readyState = socket.readyState;
|
|
73
72
|
this.socket.addEventListener("open", this.handleOpen);
|
|
74
73
|
this.socket.addEventListener("message", this.handleMessage);
|
|
75
74
|
this.socket.addEventListener("close", this.handleClose);
|
|
76
75
|
this.socket.addEventListener("error", this.handleError);
|
|
77
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* The current state of the connection; this is one of the Ready state constants
|
|
79
|
+
*/
|
|
80
|
+
get readyState() {
|
|
81
|
+
return this.socket.readyState;
|
|
82
|
+
}
|
|
78
83
|
/**
|
|
79
84
|
* @param event - The event to attach to.
|
|
80
85
|
* @param callback - The callback to run when the event is triggered.
|
|
@@ -16,9 +16,12 @@ export declare namespace ChatSocket {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class ChatSocket {
|
|
18
18
|
readonly socket: core.ReconnectingWebSocket;
|
|
19
|
-
readonly readyState: number;
|
|
20
19
|
protected readonly eventHandlers: ChatSocket.EventHandlers;
|
|
21
20
|
constructor({ socket }: ChatSocket.Args);
|
|
21
|
+
/**
|
|
22
|
+
* The current state of the connection; this is one of the Ready state constants
|
|
23
|
+
*/
|
|
24
|
+
get readyState(): number;
|
|
22
25
|
/**
|
|
23
26
|
* @param event - The event to attach to.
|
|
24
27
|
* @param callback - The callback to run when the event is triggered.
|
|
@@ -69,12 +69,17 @@ class ChatSocket {
|
|
|
69
69
|
(_c = (_b = this.eventHandlers).error) === null || _c === void 0 ? void 0 : _c.call(_b, new Error(message));
|
|
70
70
|
};
|
|
71
71
|
this.socket = socket;
|
|
72
|
-
this.readyState = socket.readyState;
|
|
73
72
|
this.socket.addEventListener("open", this.handleOpen);
|
|
74
73
|
this.socket.addEventListener("message", this.handleMessage);
|
|
75
74
|
this.socket.addEventListener("close", this.handleClose);
|
|
76
75
|
this.socket.addEventListener("error", this.handleError);
|
|
77
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* The current state of the connection; this is one of the Ready state constants
|
|
79
|
+
*/
|
|
80
|
+
get readyState() {
|
|
81
|
+
return this.socket.readyState;
|
|
82
|
+
}
|
|
78
83
|
/**
|
|
79
84
|
* @param event - The event to attach to.
|
|
80
85
|
* @param callback - The callback to run when the event is triggered.
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { HumeClient as FernClient } from "../Client";
|
|
2
2
|
import { ExpressionMeasurement } from "./expressionMeasurement/ExpressionMeasurementClient";
|
|
3
3
|
export declare namespace HumeClient {
|
|
4
|
-
|
|
4
|
+
type Options = FernClient.Options & {
|
|
5
5
|
secretKey?: string;
|
|
6
|
-
}
|
|
6
|
+
} & ({
|
|
7
|
+
accessToken: NonNullable<FernClient.Options["accessToken"]>;
|
|
8
|
+
} | {
|
|
9
|
+
apiKey: NonNullable<FernClient.Options["apiKey"]>;
|
|
10
|
+
});
|
|
7
11
|
}
|
|
8
12
|
export declare class HumeClient extends FernClient {
|
|
9
13
|
protected readonly _options: HumeClient.Options;
|
|
10
|
-
constructor(_options
|
|
14
|
+
constructor(_options: HumeClient.Options);
|
|
11
15
|
protected _expressionMeasurement: ExpressionMeasurement | undefined;
|
|
12
16
|
get expressionMeasurement(): ExpressionMeasurement;
|
|
13
17
|
}
|
|
@@ -4,8 +4,8 @@ exports.HumeClient = void 0;
|
|
|
4
4
|
const Client_1 = require("../Client");
|
|
5
5
|
const ExpressionMeasurementClient_1 = require("./expressionMeasurement/ExpressionMeasurementClient");
|
|
6
6
|
class HumeClient extends Client_1.HumeClient {
|
|
7
|
-
constructor(_options
|
|
8
|
-
super(_options);
|
|
7
|
+
constructor(_options) {
|
|
8
|
+
super(_options || {});
|
|
9
9
|
this._options = _options;
|
|
10
10
|
}
|
|
11
11
|
get expressionMeasurement() {
|
package/package.json
CHANGED
package/wrapper/HumeClient.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { HumeClient as FernClient } from "../Client";
|
|
2
2
|
import { ExpressionMeasurement } from "./expressionMeasurement/ExpressionMeasurementClient";
|
|
3
3
|
export declare namespace HumeClient {
|
|
4
|
-
|
|
4
|
+
type Options = FernClient.Options & {
|
|
5
5
|
secretKey?: string;
|
|
6
|
-
}
|
|
6
|
+
} & ({
|
|
7
|
+
accessToken: NonNullable<FernClient.Options["accessToken"]>;
|
|
8
|
+
} | {
|
|
9
|
+
apiKey: NonNullable<FernClient.Options["apiKey"]>;
|
|
10
|
+
});
|
|
7
11
|
}
|
|
8
12
|
export declare class HumeClient extends FernClient {
|
|
9
13
|
protected readonly _options: HumeClient.Options;
|
|
10
|
-
constructor(_options
|
|
14
|
+
constructor(_options: HumeClient.Options);
|
|
11
15
|
protected _expressionMeasurement: ExpressionMeasurement | undefined;
|
|
12
16
|
get expressionMeasurement(): ExpressionMeasurement;
|
|
13
17
|
}
|
package/wrapper/HumeClient.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.HumeClient = void 0;
|
|
|
4
4
|
const Client_1 = require("../Client");
|
|
5
5
|
const ExpressionMeasurementClient_1 = require("./expressionMeasurement/ExpressionMeasurementClient");
|
|
6
6
|
class HumeClient extends Client_1.HumeClient {
|
|
7
|
-
constructor(_options
|
|
8
|
-
super(_options);
|
|
7
|
+
constructor(_options) {
|
|
8
|
+
super(_options || {});
|
|
9
9
|
this._options = _options;
|
|
10
10
|
}
|
|
11
11
|
get expressionMeasurement() {
|