@d-id/client-sdk 1.2.7-staging.362 → 1.2.7
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/{index-BgYYu10q.js → index-BXPWkNzW.js} +216 -224
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -4
- package/dist/{livekit-manager-B-KgHWF7.js → livekit-manager-D2P6tClx.js} +1 -1
- package/dist/src/api/agents.d.ts +1 -5
- package/dist/src/types/entities/agents/agent.d.ts +0 -11
- package/dist/src/types/entities/agents/chat.d.ts +0 -6
- package/dist/src/types/entities/agents/manager.d.ts +1 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Ne, C as B, S as l, a as Ue, b as je, A as p, d as xe, l as le, e as Oe, t as Be, f as w, g as j, h as Je, i as ze, j as P, n as Qe } from "./index-
|
|
1
|
+
import { c as Ne, C as B, S as l, a as Ue, b as je, A as p, d as xe, l as le, e as Oe, t as Be, f as w, g as j, h as Je, i as ze, j as P, n as Qe } from "./index-BXPWkNzW.js";
|
|
2
2
|
function qe(C, M, f, i) {
|
|
3
3
|
const b = Ne(C, `${M}/v2/agents/${f}`, i);
|
|
4
4
|
return {
|
package/dist/src/api/agents.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent, AgentPayload, Auth, Chat, ChatPayload, ChatResponse, RatingEntity, RatingPayload, STTTokenResponse
|
|
1
|
+
import { Agent, AgentPayload, Auth, Chat, ChatPayload, ChatResponse, RatingEntity, RatingPayload, STTTokenResponse } from '../types/index';
|
|
2
2
|
import { RequestOptions } from './apiClient';
|
|
3
3
|
|
|
4
4
|
export declare function createAgentsApi(auth: Auth, host?: string, onError?: (error: Error, errorData: object) => void, externalId?: string): {
|
|
@@ -14,9 +14,5 @@ export declare function createAgentsApi(auth: Auth, host?: string, onError?: (er
|
|
|
14
14
|
createRating(agentId: string, chatId: string, payload: RatingPayload, options?: RequestOptions): Promise<RatingEntity>;
|
|
15
15
|
updateRating(agentId: string, chatId: string, ratingId: string, payload: Partial<RatingPayload>, options?: RequestOptions): Promise<RatingEntity>;
|
|
16
16
|
deleteRating(agentId: string, chatId: string, ratingId: string, options?: RequestOptions): Promise<RatingEntity>;
|
|
17
|
-
submitFeedback(agentId: string, chatId: string, payload: {
|
|
18
|
-
rating: number;
|
|
19
|
-
answer?: string;
|
|
20
|
-
}, options?: RequestOptions): Promise<SubmitFeedbackResponse>;
|
|
21
17
|
getSTTToken(agentId: string, options?: RequestOptions): Promise<STTTokenResponse>;
|
|
22
18
|
};
|
|
@@ -31,16 +31,6 @@ export declare enum AgentStatus {
|
|
|
31
31
|
export interface Vision {
|
|
32
32
|
enabled: boolean;
|
|
33
33
|
}
|
|
34
|
-
export interface EndOfCallFeedbackConfig {
|
|
35
|
-
enabled: boolean;
|
|
36
|
-
closing_message?: string;
|
|
37
|
-
follow_up_enabled?: boolean;
|
|
38
|
-
follow_up_messages?: {
|
|
39
|
-
low?: string;
|
|
40
|
-
four?: string;
|
|
41
|
-
five?: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
34
|
export interface Agent {
|
|
45
35
|
id: string;
|
|
46
36
|
username?: string;
|
|
@@ -63,7 +53,6 @@ export interface Agent {
|
|
|
63
53
|
preview_url?: string;
|
|
64
54
|
owner_id?: string;
|
|
65
55
|
status?: AgentStatus;
|
|
66
|
-
end_of_call_feedback?: EndOfCallFeedbackConfig;
|
|
67
56
|
}
|
|
68
57
|
export type AgentPayload = Omit<Agent, 'type' | 'created_at' | 'modified_at' | 'id' | 'owner_id' | 'metadata' | 'idle_video_url'>;
|
|
69
58
|
export interface AgentsAPI {
|
|
@@ -18,12 +18,6 @@ export interface RatingEntity {
|
|
|
18
18
|
message_id: string;
|
|
19
19
|
}
|
|
20
20
|
export type RatingPayload = Omit<RatingEntity, 'owner_id' | 'id' | 'created_at' | 'modified_at' | 'created_by' | 'external_id' | 'agent_id' | 'chat_id'>;
|
|
21
|
-
export interface SubmitFeedbackResponse {
|
|
22
|
-
chat_id: string;
|
|
23
|
-
rating: number;
|
|
24
|
-
question_shown?: string;
|
|
25
|
-
submitted_at: string;
|
|
26
|
-
}
|
|
27
21
|
export type MessagePart = {
|
|
28
22
|
type: 'text';
|
|
29
23
|
text: string;
|
|
@@ -4,7 +4,7 @@ import { AgentActivityState, ClientToolHandler, CompatibilityMode, ConnectionSta
|
|
|
4
4
|
import { SupportedStreamScript } from '../../stream-script';
|
|
5
5
|
import { ManagerCallbacks as StreamManagerCallbacks } from '../../stream/stream';
|
|
6
6
|
import { Agent } from './agent';
|
|
7
|
-
import { ChatMode, ChatResponse, Interrupt, Message, RatingEntity
|
|
7
|
+
import { ChatMode, ChatResponse, Interrupt, Message, RatingEntity } from './chat';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Types of events provided in Chat Progress Callback
|
|
@@ -243,12 +243,6 @@ export interface AgentManager {
|
|
|
243
243
|
* @param id - id of Rating entity.
|
|
244
244
|
*/
|
|
245
245
|
deleteRate: (id: string) => Promise<RatingEntity>;
|
|
246
|
-
/**
|
|
247
|
-
* Method to submit end-of-call feedback for the chat
|
|
248
|
-
* @param rating - integer score from 1 to 5
|
|
249
|
-
* @param answer - optional free-text answer
|
|
250
|
-
*/
|
|
251
|
-
submitFeedback: (rating: number, answer?: string) => Promise<SubmitFeedbackResponse>;
|
|
252
246
|
/**
|
|
253
247
|
* Method to make your agent read the text you provide or reproduce sound
|
|
254
248
|
* @param payload
|