@d-id/client-sdk 1.0.19-beta.133 → 1.0.19-beta.136
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.js
CHANGED
|
@@ -244,8 +244,8 @@ function createAgentsApi(auth, host = didApiUrl, onError) {
|
|
|
244
244
|
deleteRating(agentId, chatId, ratingId, options) {
|
|
245
245
|
return client.delete(`/${agentId}/chat/${chatId}/ratings/${ratingId}`, options);
|
|
246
246
|
},
|
|
247
|
-
getSTTToken(agentId,
|
|
248
|
-
return client.get(`/${agentId}/
|
|
247
|
+
getSTTToken(agentId, options) {
|
|
248
|
+
return client.get(`/${agentId}/stt-token`, options);
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
251
|
}
|
|
@@ -1036,10 +1036,7 @@ async function createAgentManager(agent, options) {
|
|
|
1036
1036
|
return {
|
|
1037
1037
|
agent: agentInstance,
|
|
1038
1038
|
starterMessages: ((_c = agentInstance.knowledge) == null ? void 0 : _c.starter_message) || [],
|
|
1039
|
-
getSTTToken: (
|
|
1040
|
-
var _a2;
|
|
1041
|
-
return ((_a2 = items.chat) == null ? void 0 : _a2.id) ? agentsApi.getSTTToken(agentInstance.id, items.chat.id, options2) : Promise.resolve(void 0);
|
|
1042
|
-
},
|
|
1039
|
+
getSTTToken: () => agentsApi.getSTTToken(agentInstance.id),
|
|
1043
1040
|
changeMode,
|
|
1044
1041
|
async connect() {
|
|
1045
1042
|
var _a2;
|
package/dist/index.umd.cjs
CHANGED
|
@@ -248,8 +248,8 @@
|
|
|
248
248
|
deleteRating(agentId, chatId, ratingId, options) {
|
|
249
249
|
return client.delete(`/${agentId}/chat/${chatId}/ratings/${ratingId}`, options);
|
|
250
250
|
},
|
|
251
|
-
getSTTToken(agentId,
|
|
252
|
-
return client.get(`/${agentId}/
|
|
251
|
+
getSTTToken(agentId, options) {
|
|
252
|
+
return client.get(`/${agentId}/stt-token`, options);
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
}
|
|
@@ -1040,10 +1040,7 @@
|
|
|
1040
1040
|
return {
|
|
1041
1041
|
agent: agentInstance,
|
|
1042
1042
|
starterMessages: ((_c = agentInstance.knowledge) == null ? void 0 : _c.starter_message) || [],
|
|
1043
|
-
getSTTToken: (
|
|
1044
|
-
var _a2;
|
|
1045
|
-
return ((_a2 = items.chat) == null ? void 0 : _a2.id) ? agentsApi.getSTTToken(agentInstance.id, items.chat.id, options2) : Promise.resolve(void 0);
|
|
1046
|
-
},
|
|
1043
|
+
getSTTToken: () => agentsApi.getSTTToken(agentInstance.id),
|
|
1047
1044
|
changeMode,
|
|
1048
1045
|
async connect() {
|
|
1049
1046
|
var _a2;
|
package/dist/src/api/agents.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export declare function createAgentsApi(auth: Auth, host?: string, onError?: (er
|
|
|
12
12
|
createRating(agentId: string, chatId: string, payload: RatingPayload, options?: RequestInit): Promise<RatingEntity>;
|
|
13
13
|
updateRating(agentId: string, chatId: string, ratingId: string, payload: Partial<RatingPayload>, options?: RequestInit): Promise<RatingEntity>;
|
|
14
14
|
deleteRating(agentId: string, chatId: string, ratingId: string, options?: RequestInit): Promise<RatingEntity>;
|
|
15
|
-
getSTTToken(agentId: string,
|
|
15
|
+
getSTTToken(agentId: string, options?: RequestInit): Promise<STTTokenResponse>;
|
|
16
16
|
};
|
|
@@ -137,7 +137,7 @@ export interface AgentManager {
|
|
|
137
137
|
* Get a token for the Speech to Text service
|
|
138
138
|
* Only available after a chat has started and the agent has been connected
|
|
139
139
|
*/
|
|
140
|
-
getSTTToken: (
|
|
140
|
+
getSTTToken: () => Promise<STTTokenResponse | undefined>;
|
|
141
141
|
/**
|
|
142
142
|
* Method to connect to stream and chat
|
|
143
143
|
*/
|