@eka-care/medassist-core 1.0.33 → 1.0.35
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/Synapse.d.ts +3 -2
- package/dist/Synapse.d.ts.map +1 -1
- package/dist/Synapse.js +41 -15
- package/dist/connection/Websocket.d.ts +0 -1
- package/dist/connection/Websocket.d.ts.map +1 -1
- package/dist/connection/Websocket.js +6 -30
- package/dist/messages/types.d.ts +18 -17
- package/dist/messages/types.d.ts.map +1 -1
- package/dist/messages/types.js +0 -66
- package/dist/resources/index.d.ts +1 -2
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +2 -7
- package/dist/resources/session/Session.d.ts +2 -0
- package/dist/resources/session/Session.d.ts.map +1 -1
- package/dist/resources/session/Session.js +8 -1
- package/dist/resources/toolCall/ToolCall.d.ts +1 -2
- package/dist/resources/toolCall/ToolCall.d.ts.map +1 -1
- package/dist/resources/toolCall/ToolCall.js +3 -40
- package/dist/resources/toolCall/types.d.ts +75 -30
- package/dist/resources/toolCall/types.d.ts.map +1 -1
- package/dist/resources/toolCall/types.js +16 -8
- package/package.json +1 -4
package/dist/Synapse.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { SYNAPSE_REALTIME_EVENTS } from "./messages/types";
|
|
6
6
|
import { type SessionResponse } from "./resources/session/types";
|
|
7
7
|
import { type AudioMetaData } from "./media/audio/types";
|
|
8
|
-
import type { ToolCallResponse } from "./resources/toolCall/types";
|
|
9
8
|
import type { AgentConfigResponse, ExistingSessionOptions, SendMessageOptions, SynapseSDKConfig, USER_FEEDBACK } from "./types";
|
|
10
9
|
export declare class SynapseSDK {
|
|
11
10
|
private connection;
|
|
@@ -15,6 +14,8 @@ export declare class SynapseSDK {
|
|
|
15
14
|
private config;
|
|
16
15
|
private connectionType;
|
|
17
16
|
private isRefreshingSession;
|
|
17
|
+
private connectionAttempts;
|
|
18
|
+
private sdkEventEmitter;
|
|
18
19
|
constructor(config: SynapseSDKConfig);
|
|
19
20
|
/**
|
|
20
21
|
* Start the session
|
|
@@ -47,7 +48,7 @@ export declare class SynapseSDK {
|
|
|
47
48
|
/**
|
|
48
49
|
* Call tool
|
|
49
50
|
*/
|
|
50
|
-
callTool
|
|
51
|
+
callTool(tool_id: string, message_id: string, params?: Record<string, unknown>): Promise<void>;
|
|
51
52
|
/**
|
|
52
53
|
* Send audio
|
|
53
54
|
* */
|
package/dist/Synapse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Synapse.d.ts","sourceRoot":"","sources":["../src/Synapse.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"Synapse.d.ts","sourceRoot":"","sources":["../src/Synapse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,OAAO,EACL,uBAAuB,EAExB,MAAM,kBAAkB,CAAC;AAsB1B,OAAO,EACL,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,kBAAkB,EAA2C,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIzK,qBAAa,UAAU;IACrB,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,eAAe,CAAkB;IAEzC,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,mBAAmB,CAAkB;IAC7C,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,eAAe,CAAoC;gBAE/C,MAAM,EAAE,gBAAgB;IAcpC;;;;;;OAMG;IACU,YAAY,CACvB,eAAe,CAAC,EAAE,sBAAsB,GACvC,OAAO,CAAC,eAAe,CAAC;IA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AAa;IAwC3B;;OAEG;YACW,cAAc;IAuB5B;;OAEG;YACW,gBAAgB;IAO9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA4C1B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgD/B;;OAEG;YACW,mBAAmB;IA6CjC,OAAO,CAAC,iBAAiB;CAW1B"}
|
package/dist/Synapse.js
CHANGED
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.SynapseSDK = void 0;
|
|
8
8
|
const ConnectionFactory_1 = require("./connection/ConnectionFactory");
|
|
9
|
+
const types_1 = require("./internal/connection/types");
|
|
9
10
|
const constants_1 = require("./constants");
|
|
10
11
|
const resources_1 = require("./resources");
|
|
11
12
|
// import { type AgentConfig } from "./resources/types";
|
|
12
13
|
const MessageManager_1 = require("./messages/MessageManager");
|
|
13
|
-
const
|
|
14
|
+
const types_2 = require("./messages/types");
|
|
15
|
+
const EventEmitter_1 = require("./internal/events/EventEmitter");
|
|
14
16
|
const Error_1 = require("./utils/Error");
|
|
15
17
|
const Error_2 = require("./internal/Error/Error");
|
|
16
18
|
const Events_1 = require("./events/Events");
|
|
@@ -24,6 +26,8 @@ class SynapseSDK {
|
|
|
24
26
|
config;
|
|
25
27
|
connectionType;
|
|
26
28
|
isRefreshingSession = false;
|
|
29
|
+
connectionAttempts = 0;
|
|
30
|
+
sdkEventEmitter = new EventEmitter_1.EventEmitter();
|
|
27
31
|
constructor(config) {
|
|
28
32
|
this.config = {
|
|
29
33
|
...config,
|
|
@@ -55,7 +59,7 @@ class SynapseSDK {
|
|
|
55
59
|
const userFriendlyMessage = Error_1.ErrorUtils.getUserFriendlyMessage(error);
|
|
56
60
|
const errorDetails = Error_1.ErrorUtils.getErrorDetails(error);
|
|
57
61
|
if (error instanceof Error_2.APIError) {
|
|
58
|
-
if (error.status === 404) {
|
|
62
|
+
if (error.status === 404 || error.status === 403) {
|
|
59
63
|
throw error;
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -131,13 +135,13 @@ class SynapseSDK {
|
|
|
131
135
|
* Register a listener for a specific event
|
|
132
136
|
*/
|
|
133
137
|
on(event, listener) {
|
|
134
|
-
this.
|
|
138
|
+
this.sdkEventEmitter.on(event, listener);
|
|
135
139
|
}
|
|
136
140
|
/**
|
|
137
141
|
* Remove a listener for a specific event
|
|
138
142
|
*/
|
|
139
143
|
off(event, listener) {
|
|
140
|
-
this.
|
|
144
|
+
this.sdkEventEmitter.off(event, listener);
|
|
141
145
|
}
|
|
142
146
|
/**
|
|
143
147
|
* Get the session ID
|
|
@@ -154,7 +158,7 @@ class SynapseSDK {
|
|
|
154
158
|
/**
|
|
155
159
|
* Call tool
|
|
156
160
|
*/
|
|
157
|
-
async callTool(
|
|
161
|
+
async callTool(tool_id, message_id, params) {
|
|
158
162
|
if (!this.connection) {
|
|
159
163
|
const error = new Error_2.ConnectionError("Connection not established. Session may not be initialized.", {
|
|
160
164
|
context: { stage: "callTool" },
|
|
@@ -163,7 +167,7 @@ class SynapseSDK {
|
|
|
163
167
|
this.emitError(error);
|
|
164
168
|
throw error;
|
|
165
169
|
}
|
|
166
|
-
if (!this.sessionConfig?.session_id) {
|
|
170
|
+
if (!this.sessionConfig?.session_id || !this.sessionConfig?.session_token) {
|
|
167
171
|
const error = new Error_2.SessionError("Session ID not found", {
|
|
168
172
|
context: { stage: "callTool" },
|
|
169
173
|
hint: "Call startSession() before attempting to call tool.",
|
|
@@ -174,19 +178,25 @@ class SynapseSDK {
|
|
|
174
178
|
switch (this.connectionType) {
|
|
175
179
|
case ConnectionFactory_1.ConnectionType.SOCKET:
|
|
176
180
|
try {
|
|
177
|
-
const response = await this.resourceManager.callTool(this.sessionConfig.session_id,
|
|
181
|
+
const response = await this.resourceManager.callTool(this.sessionConfig.session_id, tool_id, message_id, this.sessionConfig.session_token, params);
|
|
178
182
|
if (response.err) {
|
|
179
183
|
throw new Error_2.APIError(response.err.msg, 500, response.err);
|
|
180
184
|
}
|
|
181
|
-
|
|
185
|
+
let cleanedResponse = {
|
|
186
|
+
data: { ...response.data },
|
|
187
|
+
messageId: response._id,
|
|
188
|
+
timestamp: response.ts,
|
|
189
|
+
};
|
|
190
|
+
this.connection.emit(types_2.SYNAPSE_REALTIME_EVENTS.TOOL_CALL, cleanedResponse);
|
|
182
191
|
}
|
|
183
192
|
catch (error) {
|
|
184
193
|
if (error instanceof Error_2.APIError && error?.status === 401) {
|
|
185
194
|
await this.handleSessionExpiry();
|
|
186
|
-
return await this.callTool(
|
|
195
|
+
return await this.callTool(tool_id, message_id, params);
|
|
187
196
|
}
|
|
188
197
|
throw error;
|
|
189
198
|
}
|
|
199
|
+
break;
|
|
190
200
|
default:
|
|
191
201
|
const error = new Error_2.ConnectionError("Unsupported connection type", {
|
|
192
202
|
context: { stage: "callTool", connectionType: this.connectionType },
|
|
@@ -267,10 +277,12 @@ class SynapseSDK {
|
|
|
267
277
|
* End the session
|
|
268
278
|
*/
|
|
269
279
|
endSession() {
|
|
280
|
+
console.log("end sesion called ");
|
|
270
281
|
if (this.connection) {
|
|
271
282
|
this.connection.close();
|
|
272
283
|
this.connection = null;
|
|
273
284
|
}
|
|
285
|
+
this.connectionAttempts = 0;
|
|
274
286
|
this.messageManager?.cleanupMessageServerState?.();
|
|
275
287
|
}
|
|
276
288
|
emitError(error) {
|
|
@@ -314,7 +326,15 @@ class SynapseSDK {
|
|
|
314
326
|
// authorization: this.config?.authorization,
|
|
315
327
|
overrides: this.config.overrides,
|
|
316
328
|
});
|
|
329
|
+
this.connectionAttempts++;
|
|
317
330
|
this.messageManager = new MessageManager_1.MessageManager(this.connection, this.config?.callbacks);
|
|
331
|
+
// Bridge all connection events to the persistent SDK-level emitter so that
|
|
332
|
+
// widget listeners registered via .on() survive internal reconnections.
|
|
333
|
+
const originalEmit = this.connection.emit.bind(this.connection);
|
|
334
|
+
this.connection.emit = (event, ...args) => {
|
|
335
|
+
originalEmit(event, ...args);
|
|
336
|
+
this.sdkEventEmitter.emit(event, ...args);
|
|
337
|
+
};
|
|
318
338
|
}
|
|
319
339
|
/**
|
|
320
340
|
* Resolve the session
|
|
@@ -340,7 +360,7 @@ class SynapseSDK {
|
|
|
340
360
|
catch (error) {
|
|
341
361
|
console.log("error", error, error instanceof Error_2.APIError);
|
|
342
362
|
if (error instanceof Error_2.APIError) {
|
|
343
|
-
if (error.status === 404) {
|
|
363
|
+
if (error.status === 404 || error.status === 403) {
|
|
344
364
|
throw error;
|
|
345
365
|
}
|
|
346
366
|
}
|
|
@@ -396,7 +416,7 @@ class SynapseSDK {
|
|
|
396
416
|
this.connection.onError((error) => {
|
|
397
417
|
this.onSocketConnectionError(error);
|
|
398
418
|
});
|
|
399
|
-
this.connection.on(
|
|
419
|
+
this.connection.on(types_2.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED, () => {
|
|
400
420
|
this.handleSessionExpiry();
|
|
401
421
|
});
|
|
402
422
|
break;
|
|
@@ -410,16 +430,22 @@ class SynapseSDK {
|
|
|
410
430
|
});
|
|
411
431
|
}
|
|
412
432
|
//common handler for all connection types
|
|
413
|
-
this.connection.onDisconnect((details) => {
|
|
414
|
-
|
|
415
|
-
|
|
433
|
+
this.connection.onDisconnect(async (details) => {
|
|
434
|
+
if (details.reason === types_1.DisconnectionReason.CLIENT_CLOSED)
|
|
435
|
+
return;
|
|
436
|
+
if (this.connectionAttempts < 3 && this.sessionConfig?.session_id && this.sessionConfig.session_token) {
|
|
437
|
+
await this.startSession({ session_id: this.sessionConfig.session_id, session_token: this.sessionConfig.session_token });
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
this.messageManager.handleDisconnect(details);
|
|
441
|
+
}
|
|
416
442
|
});
|
|
417
443
|
}
|
|
418
444
|
/**
|
|
419
445
|
* Handle socket error
|
|
420
446
|
*/
|
|
421
447
|
onSocketConnectionError(error) {
|
|
422
|
-
this.connection?.emit(
|
|
448
|
+
this.connection?.emit(types_2.SYNAPSE_REALTIME_EVENTS.ERROR, error);
|
|
423
449
|
const connectionError = this.toConnectionError(error, "WebSocket connection error", { stage: "onSocketConnectionError" }, "Verify network connectivity or attempt to reconnect.");
|
|
424
450
|
this.emitError(connectionError);
|
|
425
451
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Websocket.d.ts","sourceRoot":"","sources":["../../src/connection/Websocket.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QACJ,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,SAAgB,cAAc,EAAE,MAAM,CAAC;IACvC,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"Websocket.d.ts","sourceRoot":"","sources":["../../src/connection/Websocket.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QACJ,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,SAAgB,cAAc,EAAE,MAAM,CAAC;IACvC,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,aAAa,CAAkB;gBAE3B,MAAM,EAAE,yBAAyB;IAY7C;;OAEG;IACH,OAAO,CAAC,OAAO;IA+Bf;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;OAEG;IACH,OAAO,CAAC,UAAU;IAKlB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACH,OAAO,CAAC,WAAW;IA4CnB;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAyBxD;;OAEG;IACI,KAAK,IAAI,IAAI;IASpB;;OAEG;IACI,WAAW,IAAI,OAAO;IAItB,eAAe,IAAI,IAAI;CAI/B"}
|
|
@@ -11,7 +11,6 @@ class WebSocketConnection extends BaseConnection_1.BaseConnection {
|
|
|
11
11
|
conversationId;
|
|
12
12
|
socket = null;
|
|
13
13
|
config;
|
|
14
|
-
reconnectCount = 0;
|
|
15
14
|
authenticated = false;
|
|
16
15
|
constructor(config) {
|
|
17
16
|
super();
|
|
@@ -88,16 +87,6 @@ class WebSocketConnection extends BaseConnection_1.BaseConnection {
|
|
|
88
87
|
*/
|
|
89
88
|
handleError(event) {
|
|
90
89
|
console.log("handleError", event);
|
|
91
|
-
if (this.reconnectCount < (this.config.reconnectAttempts || 3)) {
|
|
92
|
-
this.reconnectCount++;
|
|
93
|
-
this.connect();
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const connectionError = new Error_1.ConnectionError("WebSocket error", {
|
|
97
|
-
context: { stage: "handleError" },
|
|
98
|
-
cause: event,
|
|
99
|
-
});
|
|
100
|
-
this.onErrorCallback?.(connectionError);
|
|
101
90
|
}
|
|
102
91
|
/**
|
|
103
92
|
* Handle WebSocket close event
|
|
@@ -140,24 +129,12 @@ class WebSocketConnection extends BaseConnection_1.BaseConnection {
|
|
|
140
129
|
disconnectReason = types_1.DisconnectionReason.CONNECTION_ERROR;
|
|
141
130
|
message = reason || "Connection closed unexpectedly";
|
|
142
131
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
console.log("disconnectevent", event);
|
|
150
|
-
this.reconnectCount++;
|
|
151
|
-
this.connect();
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.disconnect({
|
|
155
|
-
reason: disconnectReason,
|
|
156
|
-
message,
|
|
157
|
-
code,
|
|
158
|
-
timestamp: new Date(),
|
|
159
|
-
});
|
|
160
|
-
}
|
|
132
|
+
this.disconnect({
|
|
133
|
+
reason: disconnectReason,
|
|
134
|
+
message,
|
|
135
|
+
code,
|
|
136
|
+
timestamp: new Date(),
|
|
137
|
+
});
|
|
161
138
|
}
|
|
162
139
|
/**
|
|
163
140
|
* Send a message through the WebSocket
|
|
@@ -201,7 +178,6 @@ class WebSocketConnection extends BaseConnection_1.BaseConnection {
|
|
|
201
178
|
handleConnected() {
|
|
202
179
|
this.updateStatus(types_1.ConnectionStatus.CONNECTED);
|
|
203
180
|
this.authenticated = true;
|
|
204
|
-
this.reconnectCount = 0;
|
|
205
181
|
}
|
|
206
182
|
}
|
|
207
183
|
exports.WebSocketConnection = WebSocketConnection;
|
package/dist/messages/types.d.ts
CHANGED
|
@@ -107,40 +107,41 @@ export type TDoctorDetails = {
|
|
|
107
107
|
languages?: string;
|
|
108
108
|
};
|
|
109
109
|
export type TCardInput = {
|
|
110
|
+
card_id: string;
|
|
110
111
|
title?: string;
|
|
111
|
-
tags?: string
|
|
112
|
+
tags?: string;
|
|
112
113
|
icon?: string;
|
|
113
114
|
description?: string;
|
|
114
|
-
banner?:
|
|
115
|
+
banner?: {
|
|
116
|
+
text: string;
|
|
117
|
+
theme: string;
|
|
118
|
+
};
|
|
119
|
+
banner_text?: string;
|
|
115
120
|
items?: TCardItem[];
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
export type TCardBanner = {
|
|
119
|
-
text?: string;
|
|
120
|
-
theme?: TCardTheme;
|
|
121
|
+
primary_cta?: TCardCta;
|
|
122
|
+
secondary_cta?: TCardCta;
|
|
121
123
|
};
|
|
122
124
|
export type TCardItem = {
|
|
123
125
|
icon?: string;
|
|
124
126
|
text: string;
|
|
125
127
|
};
|
|
126
128
|
export type TCardCta = {
|
|
129
|
+
cta_id: string;
|
|
127
130
|
title: string;
|
|
128
|
-
theme?: TCardTheme;
|
|
129
131
|
link?: string;
|
|
130
132
|
action?: string;
|
|
131
133
|
icon?: string;
|
|
132
134
|
text?: string;
|
|
133
135
|
};
|
|
134
136
|
export type TCardTheme = "success" | "warning" | "danger" | "primary";
|
|
135
|
-
export type
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} & Record<string, unknown>;
|
|
137
|
+
export type TMediaCard = {
|
|
138
|
+
title?: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
tags?: string;
|
|
141
|
+
tags_text?: string;
|
|
142
|
+
banner_text?: string;
|
|
143
|
+
action?: "download" | "screenshot";
|
|
144
|
+
link?: string;
|
|
144
145
|
};
|
|
145
146
|
export type SynapseContentTypes = SOCKET_CONTENT_TYPES;
|
|
146
147
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/messages/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,qBAAqB;;;;;;;;;CAAuB,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,aAAa,EAAE,CAAA;CAClC;AACD,MAAM,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/messages/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAA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,GAAG,oBAAoB,CAAC"}
|
package/dist/messages/types.js
CHANGED
|
@@ -36,69 +36,3 @@ exports.SYNAPSE_REALTIME_ERROR_CODES = {
|
|
|
36
36
|
exports.SYNAPSE_REALTIME_RESERVED_EVENTS = {
|
|
37
37
|
SESSION_EXPIRED: "session_expired", //to be used for session expiry
|
|
38
38
|
};
|
|
39
|
-
// export type ToolEscalationData = {
|
|
40
|
-
// type?: ContentType;
|
|
41
|
-
// choices?: string[];
|
|
42
|
-
// callbacks?: Record<string, boolean>;
|
|
43
|
-
// doctor_details?: TDoctorDetails;
|
|
44
|
-
// additional_option?: typeof MULTI_SELECT_ADDITIONAL_OPTION;
|
|
45
|
-
// text?: string;
|
|
46
|
-
// tips?: string[];
|
|
47
|
-
// [key: string]: unknown;
|
|
48
|
-
// };
|
|
49
|
-
//TODO: tips will never come in tool escalation
|
|
50
|
-
// {component: "doctor_card",
|
|
51
|
-
// input: {
|
|
52
|
-
// doctors: [{
|
|
53
|
-
// hospital_id?:
|
|
54
|
-
// doctor_id:
|
|
55
|
-
// selected_date?: "20-02-2024" or today,
|
|
56
|
-
// // Either below availability is present or we have a callback available to fetch availabilities
|
|
57
|
-
// availability?: [{
|
|
58
|
-
// date: "20-02-2024",
|
|
59
|
-
// slots: ["13:00", "14:00"],
|
|
60
|
-
// selected_slot?: "13:00"
|
|
61
|
-
// },
|
|
62
|
-
// {
|
|
63
|
-
// date: "21-02-2024",
|
|
64
|
-
// slots: ["09:00", "14:00"],
|
|
65
|
-
// selected_slot?: "09:00"
|
|
66
|
-
// }]
|
|
67
|
-
// date_preference
|
|
68
|
-
// slot_preference
|
|
69
|
-
// }],
|
|
70
|
-
// // Let's say we have doctor details in our cache, we provide it directly here instead of waiting for callbacks
|
|
71
|
-
// doctor_details?: {
|
|
72
|
-
// [doctor_id]: {
|
|
73
|
-
// name: string;
|
|
74
|
-
// specialty: string;
|
|
75
|
-
// hospitals: {
|
|
76
|
-
// name, city, state, hospital_id, region_id
|
|
77
|
-
// }
|
|
78
|
-
// timings?: string;
|
|
79
|
-
// experience?: string; // optional
|
|
80
|
-
// profile_link?: string; // optional
|
|
81
|
-
// profile_pic?: string; //optional
|
|
82
|
-
// languages?: string; //optional
|
|
83
|
-
// }
|
|
84
|
-
// }
|
|
85
|
-
// },
|
|
86
|
-
// callbacks: [
|
|
87
|
-
// {
|
|
88
|
-
// tool_name: "doctor_details",
|
|
89
|
-
// input_schema: {
|
|
90
|
-
// doctor_id: "string",
|
|
91
|
-
// }
|
|
92
|
-
// },
|
|
93
|
-
// {
|
|
94
|
-
// // Doctor availability where we call multiple APIs for each doctor and date is handled by Matrix and UI only has 1 tool to call
|
|
95
|
-
// // The entire logic for getting the slots and translating it to above mentioned availability response is handled by matrix using business specific logics defined.
|
|
96
|
-
// tool_name: "doctor_availability",
|
|
97
|
-
// input_schema: {
|
|
98
|
-
// doctor_id: "string",
|
|
99
|
-
// hospital_id: "string"
|
|
100
|
-
// date?
|
|
101
|
-
// slot?
|
|
102
|
-
// }
|
|
103
|
-
// }
|
|
104
|
-
// ]}
|
|
@@ -9,7 +9,6 @@ export declare class ResourceManager {
|
|
|
9
9
|
private resourceConfig;
|
|
10
10
|
private httpClient;
|
|
11
11
|
private session;
|
|
12
|
-
private toolCall;
|
|
13
12
|
private config;
|
|
14
13
|
constructor(config: ResourceConfig);
|
|
15
14
|
/**
|
|
@@ -39,6 +38,6 @@ export declare class ResourceManager {
|
|
|
39
38
|
* Call a tool
|
|
40
39
|
* POST /med-assist/api-call-tool
|
|
41
40
|
*/
|
|
42
|
-
callTool
|
|
41
|
+
callTool(sessionId: string, toolId: string, message_id: string, session_token: string, toolParams?: Record<string, unknown>): Promise<ToolCallResponse>;
|
|
43
42
|
}
|
|
44
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KA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ACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,gBAAgB,CAAC;CAG7B"}
|
package/dist/resources/index.js
CHANGED
|
@@ -7,13 +7,11 @@ exports.ResourceManager = void 0;
|
|
|
7
7
|
const HttpClient_1 = require("../internal/Api/HttpClient");
|
|
8
8
|
const Session_1 = require("./session/Session");
|
|
9
9
|
const Error_1 = require("../internal/Error/Error");
|
|
10
|
-
const ToolCall_1 = require("./toolCall/ToolCall");
|
|
11
10
|
const Config_1 = require("./config/Config");
|
|
12
11
|
class ResourceManager {
|
|
13
12
|
resourceConfig;
|
|
14
13
|
httpClient;
|
|
15
14
|
session;
|
|
16
|
-
toolCall = null;
|
|
17
15
|
config;
|
|
18
16
|
constructor(config) {
|
|
19
17
|
this.resourceConfig = config;
|
|
@@ -143,11 +141,8 @@ class ResourceManager {
|
|
|
143
141
|
* Call a tool
|
|
144
142
|
* POST /med-assist/api-call-tool
|
|
145
143
|
*/
|
|
146
|
-
async callTool(sessionId,
|
|
147
|
-
|
|
148
|
-
this.toolCall = new ToolCall_1.ToolCall(this.httpClient);
|
|
149
|
-
}
|
|
150
|
-
return await this.toolCall.callTool(sessionId, toolName, toolParams);
|
|
144
|
+
async callTool(sessionId, toolId, message_id, session_token, toolParams) {
|
|
145
|
+
return await this.session.callTool(sessionId, toolId, message_id, session_token, toolParams);
|
|
151
146
|
}
|
|
152
147
|
}
|
|
153
148
|
exports.ResourceManager = ResourceManager;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseResource } from "../../internal/Api/BaseResource";
|
|
2
|
+
import { type ToolCallResponse } from "../toolCall/types";
|
|
2
3
|
import { type SessionCreateRequest, type SessionResponse, USER_FEEDBACK } from "./types";
|
|
3
4
|
/**
|
|
4
5
|
* SessionsResource class for managing sessions-related api calls
|
|
@@ -17,5 +18,6 @@ export declare class Session extends BaseResource {
|
|
|
17
18
|
*/
|
|
18
19
|
refresh(sessionId: string, sessionToken: string): Promise<SessionResponse>;
|
|
19
20
|
feedback(sessionId: string, messageId: string, feedback: USER_FEEDBACK, feedback_reason?: string): Promise<void>;
|
|
21
|
+
callTool(sessionId: string, toolId: string, messageId: string, sessionToken: string, toolParams?: Record<string, unknown>): Promise<ToolCallResponse>;
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=Session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../../src/resources/session/Session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../../src/resources/session/Session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEzF;;GAEG;AACH,qBAAa,OAAQ,SAAQ,YAAY;IAEvC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAyB;IAC5B,MAAM,CAAC,cAAc,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAItE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIlE;;;OAGG;IACU,OAAO,CAClB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,eAAe,CAAC;IAYd,QAAQ,CACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,aAAa,EACvB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC;IAOH,QAAQ,CACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,gBAAgB,CAAC;CAU7B"}
|
|
@@ -30,10 +30,17 @@ class Session extends BaseResource_1.BaseResource {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
async feedback(sessionId, messageId, feedback, feedback_reason) {
|
|
33
|
-
return this.put(`${this.basePath}/${sessionId}/
|
|
33
|
+
return this.put(`${this.basePath}/${sessionId}/messages/${messageId}/feedback`, {
|
|
34
34
|
feedback,
|
|
35
35
|
feedback_reason,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
+
async callTool(sessionId, toolId, messageId, sessionToken, toolParams) {
|
|
39
|
+
return this.post(`${this.basePath}/${sessionId}/messages/${messageId}/tools/${toolId}`, { tool_params: toolParams }, {
|
|
40
|
+
headers: {
|
|
41
|
+
"x-sess-token": sessionToken,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
exports.Session = Session;
|
|
@@ -2,7 +2,6 @@ import { BaseResource } from "../../internal/Api/BaseResource";
|
|
|
2
2
|
import { type ToolCallResponse } from "./types";
|
|
3
3
|
export declare class ToolCall extends BaseResource {
|
|
4
4
|
private basePath;
|
|
5
|
-
callTool
|
|
6
|
-
private requestLocation;
|
|
5
|
+
callTool(sessionId: string, toolName: string, toolParams?: Record<string, unknown>): Promise<ToolCallResponse>;
|
|
7
6
|
}
|
|
8
7
|
//# sourceMappingURL=ToolCall.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCall.d.ts","sourceRoot":"","sources":["../../../src/resources/toolCall/ToolCall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"ToolCall.d.ts","sourceRoot":"","sources":["../../../src/resources/toolCall/ToolCall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EACL,KAAK,gBAAgB,EACtB,MAAM,SAAS,CAAC;AAEjB,qBAAa,QAAS,SAAQ,YAAY;IACxC,OAAO,CAAC,QAAQ,CAA+B;IAElC,QAAQ,CACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,gBAAgB,CAAC;CAsD7B"}
|
|
@@ -2,52 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToolCall = void 0;
|
|
4
4
|
const BaseResource_1 = require("../../internal/Api/BaseResource");
|
|
5
|
-
const types_1 = require("./types");
|
|
6
5
|
class ToolCall extends BaseResource_1.BaseResource {
|
|
7
6
|
basePath = "/med-assist/api-call-tool";
|
|
8
7
|
async callTool(sessionId, toolName, toolParams) {
|
|
9
|
-
if (toolName ===
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
// if (toolName === SYNAPSE_TOOL_NAME.GET_LOCATION) {
|
|
9
|
+
// return this.requestLocation() as Promise<R>;
|
|
10
|
+
// }
|
|
12
11
|
return this.post(`${this.basePath}?session_id=${sessionId}&tool_name=${toolName}`, {
|
|
13
12
|
tool_params: toolParams,
|
|
14
13
|
});
|
|
15
14
|
}
|
|
16
|
-
async requestLocation() {
|
|
17
|
-
return new Promise((resolve, reject) => {
|
|
18
|
-
if (typeof navigator === "undefined" || !navigator.geolocation) {
|
|
19
|
-
reject({
|
|
20
|
-
code: 500,
|
|
21
|
-
message: "Geolocation is not supported by this browser",
|
|
22
|
-
status: 500,
|
|
23
|
-
type: "GEOLOCATION_ERROR",
|
|
24
|
-
originalError: new Error("Geolocation is not supported by this browser"),
|
|
25
|
-
});
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
navigator.geolocation.getCurrentPosition((pos) => {
|
|
29
|
-
resolve({
|
|
30
|
-
latitude: pos.coords.latitude,
|
|
31
|
-
longitude: pos.coords.longitude,
|
|
32
|
-
accuracy: pos.coords?.accuracy ?? undefined,
|
|
33
|
-
});
|
|
34
|
-
}, (error) => {
|
|
35
|
-
//err.code: 1 permission denied, 2 position unavailable, 3 timeout
|
|
36
|
-
// reject(new Error(`Geolocation error: ${error.code}`));
|
|
37
|
-
reject({
|
|
38
|
-
code: error.code,
|
|
39
|
-
message: error.message,
|
|
40
|
-
status: 500,
|
|
41
|
-
type: "GEOLOCATION_ERROR",
|
|
42
|
-
originalError: error,
|
|
43
|
-
});
|
|
44
|
-
return;
|
|
45
|
-
}, {
|
|
46
|
-
timeout: 10000,
|
|
47
|
-
maximumAge: 0,
|
|
48
|
-
enableHighAccuracy: true,
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
15
|
}
|
|
53
16
|
exports.ToolCall = ToolCall;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { TCardInput, TDoctorAvailability, TDoctorDetails } from "../../messages/types";
|
|
1
|
+
import { type StreamMatrixToSynapseMessage } from "../../events/types";
|
|
2
|
+
import type { TCardInput, TDoctorAvailability, TDoctorDetails, TMediaCard } from "../../messages/types";
|
|
3
3
|
import type { ResourceResponse } from "../types";
|
|
4
4
|
export type TDoctorToolResponse = ResourceResponse & TDoctorDetails;
|
|
5
5
|
export type TAvailabilitySlotsToolResponse = ResourceResponse & {
|
|
@@ -16,36 +16,16 @@ export declare enum SYNAPSE_TOOL_NAME {
|
|
|
16
16
|
DOCTOR_DETAILS = "doctor_details",
|
|
17
17
|
GET_LOCATION = "get_location"
|
|
18
18
|
}
|
|
19
|
-
export declare
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
export type SYNAPSE_COMPONENT_TYPES = (typeof SYNAPSE_COMPONENTS)[keyof typeof SYNAPSE_COMPONENTS];
|
|
19
|
+
export declare enum SYNAPSE_COMPONENTS {
|
|
20
|
+
PILL = "pills",
|
|
21
|
+
MULTI = "multi",
|
|
22
|
+
DOCTOR_CARD = "doctor_card",
|
|
23
|
+
CARD = "card",
|
|
24
|
+
MEDIA_CARD = "media_card"
|
|
25
|
+
}
|
|
27
26
|
export type SYNAPSE_TOOL_TYPES = {
|
|
28
27
|
ELICITATION: "elicitation";
|
|
29
28
|
};
|
|
30
|
-
export type ToolDetails = {
|
|
31
|
-
input: {
|
|
32
|
-
options?: {
|
|
33
|
-
id: string;
|
|
34
|
-
label: string;
|
|
35
|
-
value: string;
|
|
36
|
-
}[];
|
|
37
|
-
mobile_number?: string;
|
|
38
|
-
doctors?: TDoctorAvailability[];
|
|
39
|
-
doctor_details?: TDoctorDetailsMap;
|
|
40
|
-
cards?: TCardInput[];
|
|
41
|
-
additional_option?: typeof MULTI_SELECT_ADDITIONAL_OPTION;
|
|
42
|
-
text?: string;
|
|
43
|
-
};
|
|
44
|
-
component?: SYNAPSE_COMPONENT_TYPES;
|
|
45
|
-
_meta?: Record<string, unknown> & {
|
|
46
|
-
callbacks?: ToolCallbacks;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
29
|
export type TDoctorDetailsMap = {
|
|
50
30
|
[doctor_id: string]: TDoctorDetails;
|
|
51
31
|
};
|
|
@@ -67,5 +47,70 @@ export type TGetLocationToolResponse = ResourceResponse & {
|
|
|
67
47
|
longitude: number;
|
|
68
48
|
accuracy?: number;
|
|
69
49
|
};
|
|
70
|
-
export type
|
|
50
|
+
export type TDoctorCardInput = {
|
|
51
|
+
doctors: TDoctorAvailability[];
|
|
52
|
+
doctor_details?: TDoctorDetailsMap;
|
|
53
|
+
};
|
|
54
|
+
export type TOption = {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
value: string;
|
|
58
|
+
};
|
|
59
|
+
export type SynapseInputCompMap = {
|
|
60
|
+
[SYNAPSE_COMPONENTS.CARD]: {
|
|
61
|
+
cards: TCardInput[];
|
|
62
|
+
};
|
|
63
|
+
[SYNAPSE_COMPONENTS.DOCTOR_CARD]: TDoctorCardInput;
|
|
64
|
+
[SYNAPSE_COMPONENTS.MEDIA_CARD]: {
|
|
65
|
+
media_card: TMediaCard;
|
|
66
|
+
};
|
|
67
|
+
[SYNAPSE_COMPONENTS.MULTI]: {
|
|
68
|
+
options: TOption[];
|
|
69
|
+
};
|
|
70
|
+
[SYNAPSE_COMPONENTS.PILL]: {
|
|
71
|
+
options: TOption[];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type SynapseSelectedCompMap = {
|
|
75
|
+
[SYNAPSE_COMPONENTS.CARD]: TCardInput;
|
|
76
|
+
[SYNAPSE_COMPONENTS.DOCTOR_CARD]: TDoctorCardInput;
|
|
77
|
+
[SYNAPSE_COMPONENTS.MEDIA_CARD]: TMediaCard;
|
|
78
|
+
[SYNAPSE_COMPONENTS.MULTI]: TOption;
|
|
79
|
+
[SYNAPSE_COMPONENTS.PILL]: TOption;
|
|
80
|
+
};
|
|
81
|
+
export type ToolInputTypes = SynapseSelectedCompMap[keyof SynapseSelectedCompMap];
|
|
82
|
+
type BaseToolDetails = {
|
|
83
|
+
status?: SYNAPSE_EICITATION_STATUS;
|
|
84
|
+
_meta?: {
|
|
85
|
+
schema?: {
|
|
86
|
+
type: "object";
|
|
87
|
+
properties?: {
|
|
88
|
+
[key: string]: {
|
|
89
|
+
type?: string | number | object;
|
|
90
|
+
description?: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
required?: string[];
|
|
94
|
+
};
|
|
95
|
+
message?: string;
|
|
96
|
+
hidden_message?: string;
|
|
97
|
+
toast_message?: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
type ComponentToolDetails<C extends SYNAPSE_COMPONENTS> = BaseToolDetails & {
|
|
101
|
+
component: C;
|
|
102
|
+
input: SynapseInputCompMap[C] & {
|
|
103
|
+
text?: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type ToolDetails = {
|
|
107
|
+
[C in SYNAPSE_COMPONENTS]: ComponentToolDetails<C>;
|
|
108
|
+
}[SYNAPSE_COMPONENTS];
|
|
109
|
+
export declare enum SYNAPSE_EICITATION_STATUS {
|
|
110
|
+
PROGRESS = "progress",
|
|
111
|
+
SUCCESS = "success",
|
|
112
|
+
FAILURE = "failure"
|
|
113
|
+
}
|
|
114
|
+
export type ToolCallResponse = StreamMatrixToSynapseMessage & ResourceResponse;
|
|
115
|
+
export {};
|
|
71
116
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/resources/toolCall/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/resources/toolCall/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACxG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEpE,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAAG;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAAG;IAC9D,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,oBAAY,iBAAiB;IAC3B,mBAAmB,wBAAwB;I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,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAGF,KAAK,oBAAoB,CAAC,CAAC,SAAS,kBAAkB,IAAI,eAAe,GAAG;IAC1E,SAAS,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnD,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,kBAAkB,GAAG,oBAAoB,CAAC,CAAC,CAAC;CACnD,CAAC,kBAAkB,CAAC,CAAC;AACtB,oBAAY,yBAAyB;IACnC,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,MAAM,MAAM,gBAAgB,GAAG,4BAA4B,GAAG,gBAAgB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SYNAPSE_TOOL_CALLBACK_NAME = exports.SYNAPSE_COMPONENTS = exports.SYNAPSE_TOOL_NAME = void 0;
|
|
3
|
+
exports.SYNAPSE_EICITATION_STATUS = exports.SYNAPSE_TOOL_CALLBACK_NAME = exports.SYNAPSE_COMPONENTS = exports.SYNAPSE_TOOL_NAME = void 0;
|
|
4
4
|
var SYNAPSE_TOOL_NAME;
|
|
5
5
|
(function (SYNAPSE_TOOL_NAME) {
|
|
6
6
|
SYNAPSE_TOOL_NAME["MOBILE_VERIFICATION"] = "mobile_verification";
|
|
@@ -10,13 +10,15 @@ var SYNAPSE_TOOL_NAME;
|
|
|
10
10
|
SYNAPSE_TOOL_NAME["DOCTOR_DETAILS"] = "doctor_details";
|
|
11
11
|
SYNAPSE_TOOL_NAME["GET_LOCATION"] = "get_location";
|
|
12
12
|
})(SYNAPSE_TOOL_NAME || (exports.SYNAPSE_TOOL_NAME = SYNAPSE_TOOL_NAME = {}));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
var SYNAPSE_COMPONENTS;
|
|
14
|
+
(function (SYNAPSE_COMPONENTS) {
|
|
15
|
+
// MOBILE_VERIFICATION = "mobile_verification",
|
|
16
|
+
SYNAPSE_COMPONENTS["PILL"] = "pills";
|
|
17
|
+
SYNAPSE_COMPONENTS["MULTI"] = "multi";
|
|
18
|
+
SYNAPSE_COMPONENTS["DOCTOR_CARD"] = "doctor_card";
|
|
19
|
+
SYNAPSE_COMPONENTS["CARD"] = "card";
|
|
20
|
+
SYNAPSE_COMPONENTS["MEDIA_CARD"] = "media_card";
|
|
21
|
+
})(SYNAPSE_COMPONENTS || (exports.SYNAPSE_COMPONENTS = SYNAPSE_COMPONENTS = {}));
|
|
20
22
|
var SYNAPSE_TOOL_CALLBACK_NAME;
|
|
21
23
|
(function (SYNAPSE_TOOL_CALLBACK_NAME) {
|
|
22
24
|
SYNAPSE_TOOL_CALLBACK_NAME["DOCTOR_AVAILABILITY"] = "get_doctor_availability";
|
|
@@ -25,3 +27,9 @@ var SYNAPSE_TOOL_CALLBACK_NAME;
|
|
|
25
27
|
SYNAPSE_TOOL_CALLBACK_NAME["MOBILE_VERIFICATION"] = "verify_mobile_number";
|
|
26
28
|
SYNAPSE_TOOL_CALLBACK_NAME["DOCTOR_DETAILS"] = "get_doctor_details";
|
|
27
29
|
})(SYNAPSE_TOOL_CALLBACK_NAME || (exports.SYNAPSE_TOOL_CALLBACK_NAME = SYNAPSE_TOOL_CALLBACK_NAME = {}));
|
|
30
|
+
var SYNAPSE_EICITATION_STATUS;
|
|
31
|
+
(function (SYNAPSE_EICITATION_STATUS) {
|
|
32
|
+
SYNAPSE_EICITATION_STATUS["PROGRESS"] = "progress";
|
|
33
|
+
SYNAPSE_EICITATION_STATUS["SUCCESS"] = "success";
|
|
34
|
+
SYNAPSE_EICITATION_STATUS["FAILURE"] = "failure";
|
|
35
|
+
})(SYNAPSE_EICITATION_STATUS || (exports.SYNAPSE_EICITATION_STATUS = SYNAPSE_EICITATION_STATUS = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eka-care/medassist-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "TypeScript SDK for real-time medical chatbot experiences with session management, WebSocket connectivity, and media handling",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "https://github.com/eka-care/synapse-sdk.git"
|
|
33
33
|
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"jszip": "^3.10.1"
|
|
36
|
-
},
|
|
37
34
|
"devDependencies": {
|
|
38
35
|
"typescript": "^5.0.0"
|
|
39
36
|
},
|