@equos/node-sdk 0.0.17 → 0.1.0
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/dist/apis/agent.d.ts +8 -0
- package/dist/apis/agent.js +21 -0
- package/dist/apis/avatar.d.ts +4 -4
- package/dist/apis/avatar.js +5 -8
- package/dist/apis/session.d.ts +6 -6
- package/dist/apis/session.js +3 -3
- package/dist/equos.d.ts +9 -6
- package/dist/equos.js +8 -2
- package/dist/types/agent.type.d.ts +59 -0
- package/dist/types/agent.type.js +25 -0
- package/dist/types/avatar.type.d.ts +12 -6
- package/dist/types/session.type.d.ts +34 -42
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HttpUtils } from '../utils/http.utils';
|
|
2
|
+
import { CreateEquosAgentRequest, EquosAgent, ListEquosAgentsResponse } from '../types/agent.type';
|
|
3
|
+
export declare class EquosAgentApi {
|
|
4
|
+
private readonly http;
|
|
5
|
+
constructor(http: HttpUtils);
|
|
6
|
+
create(data: CreateEquosAgentRequest): Promise<EquosAgent>;
|
|
7
|
+
list(skip?: number, take?: number): Promise<ListEquosAgentsResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EquosAgentApi = void 0;
|
|
4
|
+
const error_utils_1 = require("../utils/error.utils");
|
|
5
|
+
class EquosAgentApi {
|
|
6
|
+
http;
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
async create(data) {
|
|
11
|
+
return this.http
|
|
12
|
+
.post('/agents', data)
|
|
13
|
+
.catch(error_utils_1.ErrorUtils.convertToEquosError);
|
|
14
|
+
}
|
|
15
|
+
async list(skip = 0, take = 10) {
|
|
16
|
+
return this.http
|
|
17
|
+
.get(`/agents?skip=${skip}&take=${take}`)
|
|
18
|
+
.catch(error_utils_1.ErrorUtils.convertToEquosError);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.EquosAgentApi = EquosAgentApi;
|
package/dist/apis/avatar.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EquosAvatarData, ListEquosAvatarsData } from '../types/avatar.type';
|
|
2
1
|
import { HttpUtils } from '../utils/http.utils';
|
|
3
|
-
|
|
2
|
+
import { CreateEquosAvatarRequest, EquosAvatar, ListEquosAvatarsResponse } from '../types/avatar.type';
|
|
3
|
+
export declare class EquosAvatarApi {
|
|
4
4
|
private readonly http;
|
|
5
5
|
constructor(http: HttpUtils);
|
|
6
|
-
create(
|
|
7
|
-
list(skip?: number, take?: number): Promise<
|
|
6
|
+
create(data: CreateEquosAvatarRequest): Promise<EquosAvatar>;
|
|
7
|
+
list(skip?: number, take?: number): Promise<ListEquosAvatarsResponse>;
|
|
8
8
|
}
|
package/dist/apis/avatar.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EquosAvatarApi = void 0;
|
|
4
4
|
const error_utils_1 = require("../utils/error.utils");
|
|
5
|
-
class
|
|
5
|
+
class EquosAvatarApi {
|
|
6
6
|
http;
|
|
7
7
|
constructor(http) {
|
|
8
8
|
this.http = http;
|
|
9
9
|
}
|
|
10
|
-
async create(
|
|
10
|
+
async create(data) {
|
|
11
11
|
return this.http
|
|
12
|
-
.post('/avatars',
|
|
13
|
-
name,
|
|
14
|
-
refImage: dataUrl,
|
|
15
|
-
})
|
|
12
|
+
.post('/avatars', data)
|
|
16
13
|
.catch(error_utils_1.ErrorUtils.convertToEquosError);
|
|
17
14
|
}
|
|
18
15
|
async list(skip = 0, take = 10) {
|
|
@@ -21,4 +18,4 @@ class EquosAvatar {
|
|
|
21
18
|
.catch(error_utils_1.ErrorUtils.convertToEquosError);
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.
|
|
21
|
+
exports.EquosAvatarApi = EquosAvatarApi;
|
package/dist/apis/session.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateEquosSessionRequest, CreateEquosSessionResponse, EquosSession, ListEquosSessionsResponse } from '../types/session.type';
|
|
2
2
|
import { HttpUtils } from '../utils/http.utils';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class EquosSessionApi {
|
|
4
4
|
private readonly http;
|
|
5
5
|
constructor(http: HttpUtils);
|
|
6
|
-
get(id: string): Promise<
|
|
7
|
-
create(data:
|
|
8
|
-
list(skip?: number, take?: number): Promise<
|
|
9
|
-
stop(id: string): Promise<
|
|
6
|
+
get(id: string): Promise<EquosSession>;
|
|
7
|
+
create(data: CreateEquosSessionRequest): Promise<CreateEquosSessionResponse>;
|
|
8
|
+
list(skip?: number, take?: number): Promise<ListEquosSessionsResponse>;
|
|
9
|
+
stop(id: string): Promise<EquosSession>;
|
|
10
10
|
}
|
package/dist/apis/session.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EquosSessionApi = void 0;
|
|
4
4
|
const error_utils_1 = require("../utils/error.utils");
|
|
5
|
-
class
|
|
5
|
+
class EquosSessionApi {
|
|
6
6
|
http;
|
|
7
7
|
constructor(http) {
|
|
8
8
|
this.http = http;
|
|
@@ -28,4 +28,4 @@ class EquosSession {
|
|
|
28
28
|
.catch(error_utils_1.ErrorUtils.convertToEquosError);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
exports.
|
|
31
|
+
exports.EquosSessionApi = EquosSessionApi;
|
package/dist/equos.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { EquosAgentApi } from './apis/agent';
|
|
2
|
+
import { EquosAvatarApi } from './apis/avatar';
|
|
3
|
+
import { EquosSessionApi } from './apis/session';
|
|
3
4
|
export interface EquosOptions {
|
|
4
5
|
/**
|
|
5
6
|
* API version to use (default: v1)
|
|
@@ -15,12 +16,14 @@ export declare class Equos {
|
|
|
15
16
|
private readonly apiKey;
|
|
16
17
|
readonly opts?: EquosOptions | undefined;
|
|
17
18
|
private readonly http;
|
|
18
|
-
private avatarApi;
|
|
19
|
-
private sessionApi;
|
|
19
|
+
private readonly avatarApi;
|
|
20
|
+
private readonly sessionApi;
|
|
21
|
+
private readonly agentApi;
|
|
20
22
|
private readonly version;
|
|
21
23
|
private readonly endpoint;
|
|
22
24
|
private constructor();
|
|
23
25
|
static client(apiKey: string, opts?: EquosOptions): Equos;
|
|
24
|
-
get
|
|
25
|
-
get
|
|
26
|
+
get agents(): EquosAgentApi;
|
|
27
|
+
get avatars(): EquosAvatarApi;
|
|
28
|
+
get sessions(): EquosSessionApi;
|
|
26
29
|
}
|
package/dist/equos.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Equos = void 0;
|
|
4
|
+
const agent_1 = require("./apis/agent");
|
|
4
5
|
const avatar_1 = require("./apis/avatar");
|
|
5
6
|
const session_1 = require("./apis/session");
|
|
6
7
|
const constants_utils_1 = require("./utils/constants.utils");
|
|
@@ -11,6 +12,7 @@ class Equos {
|
|
|
11
12
|
http;
|
|
12
13
|
avatarApi;
|
|
13
14
|
sessionApi;
|
|
15
|
+
agentApi;
|
|
14
16
|
version;
|
|
15
17
|
endpoint;
|
|
16
18
|
constructor(apiKey, opts) {
|
|
@@ -19,12 +21,16 @@ class Equos {
|
|
|
19
21
|
this.endpoint = opts?.endpoint || constants_utils_1.ConstantsUtils.DEFAULT_ENDPOINT;
|
|
20
22
|
this.version = opts?.version || constants_utils_1.ConstantsUtils.DEFAULT_VERSION;
|
|
21
23
|
this.http = new http_utils_1.HttpUtils(this.endpoint, this.version, this.apiKey);
|
|
22
|
-
this.avatarApi = new avatar_1.
|
|
23
|
-
this.sessionApi = new session_1.
|
|
24
|
+
this.avatarApi = new avatar_1.EquosAvatarApi(this.http);
|
|
25
|
+
this.sessionApi = new session_1.EquosSessionApi(this.http);
|
|
26
|
+
this.agentApi = new agent_1.EquosAgentApi(this.http);
|
|
24
27
|
}
|
|
25
28
|
static client(apiKey, opts) {
|
|
26
29
|
return new Equos(apiKey, opts);
|
|
27
30
|
}
|
|
31
|
+
get agents() {
|
|
32
|
+
return this.agentApi;
|
|
33
|
+
}
|
|
28
34
|
get avatars() {
|
|
29
35
|
return this.avatarApi;
|
|
30
36
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare enum LLMs {
|
|
2
|
+
gpt5 = "gpt-5",
|
|
3
|
+
gpt5Mini = "gpt-5-mini",
|
|
4
|
+
gpt5Nano = "gpt-5-nano",
|
|
5
|
+
gpt4oMini = "gpt-4o-mini",
|
|
6
|
+
gpt4_1 = "gpt-4.1"
|
|
7
|
+
}
|
|
8
|
+
export declare enum TTSs {
|
|
9
|
+
elevenlabsTurboV2_5 = "eleven_turbo_v2_5",
|
|
10
|
+
elevenlabsV3 = "eleven_v3",
|
|
11
|
+
elevenMultilingualV2 = "eleven_multilingual_v2",
|
|
12
|
+
elevenFlashV2_5 = "eleven_flash_v2_5"
|
|
13
|
+
}
|
|
14
|
+
export declare enum Voices {
|
|
15
|
+
Roger = "CwhRBWXzGAHq8TQ4Fs17",
|
|
16
|
+
Sarah = "EXAVITQu4vr4xnSDxMaL",
|
|
17
|
+
Jessica = "cgSgspJ2msm6clMCkdW9",
|
|
18
|
+
Chris = "iP95p4xoKVk53GoZ742B"
|
|
19
|
+
}
|
|
20
|
+
export interface CreateEquosAgentRequest {
|
|
21
|
+
instructions: string;
|
|
22
|
+
llm?: {
|
|
23
|
+
model: LLMs;
|
|
24
|
+
};
|
|
25
|
+
tts?: {
|
|
26
|
+
voice: Voices;
|
|
27
|
+
model: TTSs;
|
|
28
|
+
};
|
|
29
|
+
stt?: {
|
|
30
|
+
languages: string[];
|
|
31
|
+
customVocabulary?: string[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface EquosAgentLLM {
|
|
35
|
+
model: LLMs;
|
|
36
|
+
}
|
|
37
|
+
export interface EquosAgentTTS {
|
|
38
|
+
voice: Voices;
|
|
39
|
+
model: TTSs;
|
|
40
|
+
}
|
|
41
|
+
export interface EquosAgentSTT {
|
|
42
|
+
languages: string[];
|
|
43
|
+
customVocabulary: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface EquosAgent {
|
|
46
|
+
id: string;
|
|
47
|
+
organizationId: string;
|
|
48
|
+
llm?: EquosAgentLLM;
|
|
49
|
+
tts?: EquosAgentTTS;
|
|
50
|
+
stt?: EquosAgentSTT;
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
}
|
|
54
|
+
export interface ListEquosAgentsResponse {
|
|
55
|
+
skip: number;
|
|
56
|
+
take: number;
|
|
57
|
+
total: number;
|
|
58
|
+
agents: EquosAgent[];
|
|
59
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Voices = exports.TTSs = exports.LLMs = void 0;
|
|
4
|
+
var LLMs;
|
|
5
|
+
(function (LLMs) {
|
|
6
|
+
LLMs["gpt5"] = "gpt-5";
|
|
7
|
+
LLMs["gpt5Mini"] = "gpt-5-mini";
|
|
8
|
+
LLMs["gpt5Nano"] = "gpt-5-nano";
|
|
9
|
+
LLMs["gpt4oMini"] = "gpt-4o-mini";
|
|
10
|
+
LLMs["gpt4_1"] = "gpt-4.1";
|
|
11
|
+
})(LLMs || (exports.LLMs = LLMs = {}));
|
|
12
|
+
var TTSs;
|
|
13
|
+
(function (TTSs) {
|
|
14
|
+
TTSs["elevenlabsTurboV2_5"] = "eleven_turbo_v2_5";
|
|
15
|
+
TTSs["elevenlabsV3"] = "eleven_v3";
|
|
16
|
+
TTSs["elevenMultilingualV2"] = "eleven_multilingual_v2";
|
|
17
|
+
TTSs["elevenFlashV2_5"] = "eleven_flash_v2_5";
|
|
18
|
+
})(TTSs || (exports.TTSs = TTSs = {}));
|
|
19
|
+
var Voices;
|
|
20
|
+
(function (Voices) {
|
|
21
|
+
Voices["Roger"] = "CwhRBWXzGAHq8TQ4Fs17";
|
|
22
|
+
Voices["Sarah"] = "EXAVITQu4vr4xnSDxMaL";
|
|
23
|
+
Voices["Jessica"] = "cgSgspJ2msm6clMCkdW9";
|
|
24
|
+
Voices["Chris"] = "iP95p4xoKVk53GoZ742B";
|
|
25
|
+
})(Voices || (exports.Voices = Voices = {}));
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { CreateEquosAgentRequest, EquosAgent } from './agent.type';
|
|
2
|
+
export interface CreateEquosAvatarRequest {
|
|
3
|
+
identity: string;
|
|
2
4
|
name: string;
|
|
3
5
|
refImage: string;
|
|
6
|
+
agentId?: string;
|
|
7
|
+
agent?: CreateEquosAgentRequest;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
9
|
+
export interface EquosAvatar {
|
|
6
10
|
id: string;
|
|
11
|
+
organizationId: string;
|
|
12
|
+
identity: string;
|
|
7
13
|
name: string;
|
|
8
14
|
thumbnailUrl: string;
|
|
9
|
-
apiKeyId: string;
|
|
10
|
-
organizationId: string;
|
|
11
15
|
createdAt: Date;
|
|
12
16
|
updatedAt: Date;
|
|
17
|
+
agentId?: string;
|
|
18
|
+
agent?: EquosAgent;
|
|
13
19
|
}
|
|
14
|
-
export interface
|
|
20
|
+
export interface ListEquosAvatarsResponse {
|
|
15
21
|
skip: number;
|
|
16
22
|
take: number;
|
|
17
23
|
total: number;
|
|
18
|
-
avatars:
|
|
24
|
+
avatars: EquosAvatar[];
|
|
19
25
|
}
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CreateEquosAgentRequest, EquosAgent } from './agent.type';
|
|
2
|
+
import { CreateEquosAvatarRequest, EquosAvatar } from './avatar.type';
|
|
3
|
+
export interface EquosParticipantIdentity {
|
|
4
|
+
identity: string;
|
|
3
5
|
name: string;
|
|
4
|
-
provider: string;
|
|
5
|
-
status: string;
|
|
6
|
-
client?: string;
|
|
7
|
-
host: {
|
|
8
|
-
serverUrl: string;
|
|
9
|
-
};
|
|
10
|
-
avatar: {
|
|
11
|
-
id: string;
|
|
12
|
-
identity?: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
thumbnailUrl?: string;
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
updatedAt: Date;
|
|
17
|
-
};
|
|
18
|
-
agent?: {
|
|
19
|
-
instructions: string;
|
|
20
|
-
};
|
|
21
|
-
startedAt: Date;
|
|
22
|
-
endedAt?: Date;
|
|
23
|
-
createdAt: Date;
|
|
24
|
-
updatedAt: Date;
|
|
25
6
|
}
|
|
26
|
-
export interface
|
|
7
|
+
export interface CreateEquosSessionRequest {
|
|
27
8
|
name: string;
|
|
28
9
|
client?: string;
|
|
29
10
|
host?: {
|
|
@@ -31,31 +12,42 @@ export interface CreateEquosSessionRequestData {
|
|
|
31
12
|
accessToken: string;
|
|
32
13
|
};
|
|
33
14
|
agent?: {
|
|
34
|
-
|
|
35
|
-
};
|
|
15
|
+
id: string;
|
|
16
|
+
} | CreateEquosAgentRequest;
|
|
36
17
|
avatar: {
|
|
37
|
-
id
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
18
|
+
id: string;
|
|
19
|
+
} | CreateEquosAvatarRequest;
|
|
20
|
+
remoteAgentConnectingIdentity?: EquosParticipantIdentity;
|
|
21
|
+
consumerIdentity?: EquosParticipantIdentity;
|
|
22
|
+
}
|
|
23
|
+
export interface EquosSession {
|
|
24
|
+
id: string;
|
|
25
|
+
organizationId: string;
|
|
26
|
+
freemium: boolean;
|
|
27
|
+
name: string;
|
|
28
|
+
provider: string;
|
|
29
|
+
client?: string;
|
|
30
|
+
status: string;
|
|
31
|
+
host: {
|
|
32
|
+
serverUrl: string;
|
|
49
33
|
};
|
|
34
|
+
avatarId?: string;
|
|
35
|
+
avatar: EquosAvatar;
|
|
36
|
+
agentId?: string;
|
|
37
|
+
agent?: EquosAgent;
|
|
38
|
+
startedAt: Date;
|
|
39
|
+
endedAt?: Date;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
50
42
|
}
|
|
51
|
-
export interface
|
|
52
|
-
session:
|
|
43
|
+
export interface CreateEquosSessionResponse {
|
|
44
|
+
session: EquosSession;
|
|
53
45
|
consumerAccessToken?: string;
|
|
54
46
|
remoteAgentAccessToken?: string;
|
|
55
47
|
}
|
|
56
|
-
export interface
|
|
48
|
+
export interface ListEquosSessionsResponse {
|
|
57
49
|
skip: number;
|
|
58
50
|
take: number;
|
|
59
51
|
total: number;
|
|
60
|
-
sessions:
|
|
52
|
+
sessions: EquosSession[];
|
|
61
53
|
}
|