@eka-care/medassist-core 1.0.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.
Files changed (98) hide show
  1. package/README.md +32 -0
  2. package/dist/Synapse.d.ts +131 -0
  3. package/dist/Synapse.d.ts.map +1 -0
  4. package/dist/Synapse.js +479 -0
  5. package/dist/connection/ConnectionFactory.d.ts +17 -0
  6. package/dist/connection/ConnectionFactory.d.ts.map +1 -0
  7. package/dist/connection/ConnectionFactory.js +28 -0
  8. package/dist/connection/Websocket.d.ts +61 -0
  9. package/dist/connection/Websocket.d.ts.map +1 -0
  10. package/dist/connection/Websocket.js +184 -0
  11. package/dist/constants/index.d.ts +17 -0
  12. package/dist/constants/index.d.ts.map +1 -0
  13. package/dist/constants/index.js +28 -0
  14. package/dist/constants/types.d.ts +2 -0
  15. package/dist/constants/types.d.ts.map +1 -0
  16. package/dist/constants/types.js +2 -0
  17. package/dist/events/Events.d.ts +47 -0
  18. package/dist/events/Events.d.ts.map +1 -0
  19. package/dist/events/Events.js +46 -0
  20. package/dist/events/Incoming.d.ts +2 -0
  21. package/dist/events/Incoming.d.ts.map +1 -0
  22. package/dist/events/Incoming.js +2 -0
  23. package/dist/events/Outgoing.d.ts +2 -0
  24. package/dist/events/Outgoing.d.ts.map +1 -0
  25. package/dist/events/Outgoing.js +2 -0
  26. package/dist/events/index.d.ts +3 -0
  27. package/dist/events/index.d.ts.map +1 -0
  28. package/dist/events/index.js +38 -0
  29. package/dist/events/types.d.ts +86 -0
  30. package/dist/events/types.d.ts.map +1 -0
  31. package/dist/events/types.js +6 -0
  32. package/dist/index.d.ts +27 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +69 -0
  35. package/dist/internal/Api/BaseResource.d.ts +35 -0
  36. package/dist/internal/Api/BaseResource.d.ts.map +1 -0
  37. package/dist/internal/Api/BaseResource.js +54 -0
  38. package/dist/internal/Api/HttpClient.d.ts +25 -0
  39. package/dist/internal/Api/HttpClient.d.ts.map +1 -0
  40. package/dist/internal/Api/HttpClient.js +131 -0
  41. package/dist/internal/Api/types.d.ts +7 -0
  42. package/dist/internal/Api/types.d.ts.map +1 -0
  43. package/dist/internal/Api/types.js +2 -0
  44. package/dist/internal/Error/Error.d.ts +97 -0
  45. package/dist/internal/Error/Error.d.ts.map +1 -0
  46. package/dist/internal/Error/Error.js +243 -0
  47. package/dist/internal/Error/types.d.ts +17 -0
  48. package/dist/internal/Error/types.d.ts.map +1 -0
  49. package/dist/internal/Error/types.js +12 -0
  50. package/dist/internal/connection/BaseConnection.d.ts +100 -0
  51. package/dist/internal/connection/BaseConnection.d.ts.map +1 -0
  52. package/dist/internal/connection/BaseConnection.js +138 -0
  53. package/dist/internal/connection/types.d.ts +43 -0
  54. package/dist/internal/connection/types.d.ts.map +1 -0
  55. package/dist/internal/connection/types.js +20 -0
  56. package/dist/internal/events/EventEmitter.d.ts +7 -0
  57. package/dist/internal/events/EventEmitter.d.ts.map +1 -0
  58. package/dist/internal/events/EventEmitter.js +27 -0
  59. package/dist/internal/store/index.d.ts +10 -0
  60. package/dist/internal/store/index.d.ts.map +1 -0
  61. package/dist/internal/store/index.js +9 -0
  62. package/dist/media/audio/Audio.d.ts +37 -0
  63. package/dist/media/audio/Audio.d.ts.map +1 -0
  64. package/dist/media/audio/Audio.js +310 -0
  65. package/dist/media/audio/types.d.ts +25 -0
  66. package/dist/media/audio/types.d.ts.map +1 -0
  67. package/dist/media/audio/types.js +10 -0
  68. package/dist/media/file/File.d.ts +54 -0
  69. package/dist/media/file/File.d.ts.map +1 -0
  70. package/dist/media/file/File.js +159 -0
  71. package/dist/messages/MessageManager.d.ts +79 -0
  72. package/dist/messages/MessageManager.d.ts.map +1 -0
  73. package/dist/messages/MessageManager.js +420 -0
  74. package/dist/messages/types.d.ts +74 -0
  75. package/dist/messages/types.d.ts.map +1 -0
  76. package/dist/messages/types.js +34 -0
  77. package/dist/resources/config/Config.d.ts +5 -0
  78. package/dist/resources/config/Config.d.ts.map +1 -0
  79. package/dist/resources/config/Config.js +5 -0
  80. package/dist/resources/index.d.ts +34 -0
  81. package/dist/resources/index.d.ts.map +1 -0
  82. package/dist/resources/index.js +108 -0
  83. package/dist/resources/session/Session.d.ts +21 -0
  84. package/dist/resources/session/Session.d.ts.map +1 -0
  85. package/dist/resources/session/Session.js +39 -0
  86. package/dist/resources/session/types.d.ts +17 -0
  87. package/dist/resources/session/types.d.ts.map +1 -0
  88. package/dist/resources/session/types.js +8 -0
  89. package/dist/resources/types.d.ts +22 -0
  90. package/dist/resources/types.d.ts.map +1 -0
  91. package/dist/resources/types.js +5 -0
  92. package/dist/types/index.d.ts +8 -0
  93. package/dist/types/index.d.ts.map +1 -0
  94. package/dist/types/index.js +24 -0
  95. package/dist/utils/Error.d.ts +45 -0
  96. package/dist/utils/Error.d.ts.map +1 -0
  97. package/dist/utils/Error.js +114 -0
  98. package/package.json +41 -0
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * Factory class to create the appropriate connection type
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ConnectionFactory = exports.ConnectionType = void 0;
7
+ const Websocket_1 = require("./Websocket");
8
+ const Error_1 = require("../internal/Error/Error");
9
+ exports.ConnectionType = {
10
+ SOCKET: "socket",
11
+ // Add more connection types in the future (e.g., HTTP polling, SSE)
12
+ };
13
+ class ConnectionFactory {
14
+ /**
15
+ * Create a connection based on the specified type
16
+ */
17
+ static async createConnection(type, config) {
18
+ switch (type) {
19
+ case exports.ConnectionType.SOCKET:
20
+ return new Websocket_1.WebSocketConnection(config);
21
+ default:
22
+ throw new Error_1.ConnectionError(`Unsupported connection type: ${type}`, {
23
+ context: { type },
24
+ });
25
+ }
26
+ }
27
+ }
28
+ exports.ConnectionFactory = ConnectionFactory;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * WebSocket implementation of BaseConnection
3
+ */
4
+ import { BaseConnection } from "../internal/connection/BaseConnection";
5
+ import { type SessionConfig } from "../internal/connection/types";
6
+ import { type OutgoingSocketMessage } from "../events/Events";
7
+ export interface WebSocketConnectionConfig extends SessionConfig {
8
+ serverUrl: string;
9
+ auth: {
10
+ sessionToken: string;
11
+ sessionId: string;
12
+ };
13
+ reconnect?: boolean;
14
+ reconnectAttempts?: number;
15
+ reconnectDelay?: number;
16
+ }
17
+ export declare class WebSocketConnection extends BaseConnection {
18
+ readonly conversationId: string;
19
+ private socket;
20
+ private config;
21
+ private reconnectCount;
22
+ constructor(config: WebSocketConnectionConfig);
23
+ /**
24
+ * Establish WebSocket connection
25
+ */
26
+ private connect;
27
+ /**
28
+ * Build WebSocket connection URL with session config
29
+ */
30
+ private buildConnectionUrl;
31
+ /**
32
+ * Handle WebSocket open event
33
+ */
34
+ private handleOpen;
35
+ /**
36
+ * Handle incoming WebSocket messages
37
+ */
38
+ private handleSocketMessage;
39
+ /**
40
+ * Handle WebSocket errors
41
+ */
42
+ private handleError;
43
+ /**
44
+ * Handle WebSocket close event
45
+ */
46
+ private handleClose;
47
+ /**
48
+ * Send a message through the WebSocket
49
+ */
50
+ sendMessage(message: OutgoingSocketMessage): void;
51
+ /**
52
+ * Close the WebSocket connection
53
+ */
54
+ close(): void;
55
+ /**
56
+ * Check if the WebSocket is connected
57
+ */
58
+ isConnected(): boolean;
59
+ handleConnected(): void;
60
+ }
61
+ //# sourceMappingURL=Websocket.d.ts.map
@@ -0,0 +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,EACL,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AAO1B,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,cAAc,CAAa;gBAEvB,MAAM,EAAE,yBAAyB;IAO7C;;OAEG;IACH,OAAO,CAAC,OAAO;IA6Bf;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;OAEG;IACH,OAAO,CAAC,UAAU;IAclB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;OAEG;IACH,OAAO,CAAC,WAAW;IAQnB;;OAEG;IACH,OAAO,CAAC,WAAW;IA+CnB;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAyBxD;;OAEG;IACI,KAAK,IAAI,IAAI;IAQpB;;OAEG;IACI,WAAW,IAAI,OAAO;IAItB,eAAe,IAAI,IAAI;CAI/B"}
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ /**
3
+ * WebSocket implementation of BaseConnection
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WebSocketConnection = void 0;
7
+ const BaseConnection_1 = require("../internal/connection/BaseConnection");
8
+ const types_1 = require("../internal/connection/types");
9
+ const Error_1 = require("../internal/Error/Error");
10
+ class WebSocketConnection extends BaseConnection_1.BaseConnection {
11
+ conversationId;
12
+ socket = null;
13
+ config;
14
+ reconnectCount = 0;
15
+ constructor(config) {
16
+ super();
17
+ this.config = { ...config, reconnect: config.reconnect || true, reconnectAttempts: config.reconnectAttempts || 3, reconnectDelay: config.reconnectDelay || 1000 };
18
+ this.conversationId = config.auth.sessionId;
19
+ this.connect();
20
+ }
21
+ /**
22
+ * Establish WebSocket connection
23
+ */
24
+ connect() {
25
+ try {
26
+ this.updateStatus(types_1.ConnectionStatus.CONNECTING);
27
+ // Build WebSocket URL with query parameters
28
+ const url = this.buildConnectionUrl();
29
+ this.socket = new WebSocket(url);
30
+ //bind creates a new function permanently set to the object we pass, no matter how or where you call the function
31
+ // Now when WebSocket calls the function, 'this' refers to your WebSocketConnection instance
32
+ this.socket.onopen = this.handleOpen.bind(this);
33
+ this.socket.onmessage = this.handleSocketMessage.bind(this);
34
+ this.socket.onerror = this.handleError.bind(this);
35
+ this.socket.onclose = this.handleClose.bind(this);
36
+ }
37
+ catch (error) {
38
+ const connectionError = (0, Error_1.normalizeError)(error, Error_1.ConnectionError, "Failed to establish WebSocket connection", { context: { stage: "connect" } });
39
+ this.onErrorCallback?.(connectionError);
40
+ this.disconnect({
41
+ reason: types_1.DisconnectionReason.CONNECTION_ERROR,
42
+ message: connectionError.message,
43
+ timestamp: new Date(),
44
+ });
45
+ }
46
+ }
47
+ /**
48
+ * Build WebSocket connection URL with session config
49
+ */
50
+ buildConnectionUrl() {
51
+ const url = new URL(this.config.serverUrl);
52
+ url.pathname = `/ws/med-assist/session/${this.config.auth.sessionId}/`;
53
+ return url.toString();
54
+ }
55
+ /**
56
+ * Handle WebSocket open event
57
+ */
58
+ handleOpen() {
59
+ this.onOpenCallback?.();
60
+ //register message handlers
61
+ // this.sendAuthMessage();
62
+ // Send initial configuration if overrides are provided
63
+ // if (this.config.overrides) {
64
+ // this.sendMessage({
65
+ // type: "config",
66
+ // content: this.config.overrides,
67
+ // });
68
+ // }
69
+ }
70
+ /**
71
+ * Handle incoming WebSocket messages
72
+ */
73
+ handleSocketMessage(event) {
74
+ try {
75
+ const data = JSON.parse(event.data);
76
+ this.handleMessage(data);
77
+ }
78
+ catch (error) {
79
+ const parseError = (0, Error_1.normalizeError)(error, Error_1.MessageError, "Failed to parse incoming WebSocket message", { context: { stage: "handleSocketMessage" } });
80
+ this.onErrorCallback?.(parseError);
81
+ }
82
+ }
83
+ /**
84
+ * Handle WebSocket errors
85
+ */
86
+ handleError(event) {
87
+ const connectionError = new Error_1.ConnectionError("WebSocket error", {
88
+ context: { stage: "handleError" },
89
+ cause: event,
90
+ });
91
+ this.onErrorCallback?.(connectionError);
92
+ }
93
+ /**
94
+ * Handle WebSocket close event
95
+ */
96
+ handleClose(event) {
97
+ const wasClean = event.wasClean;
98
+ const code = event.code;
99
+ const reason = event.reason;
100
+ let disconnectReason;
101
+ let message;
102
+ if (code === 1000) {
103
+ disconnectReason = types_1.DisconnectionReason.CLIENT_CLOSED;
104
+ message = "Connection closed normally";
105
+ }
106
+ else if (code === 1001 || code === 1006) {
107
+ disconnectReason = types_1.DisconnectionReason.NETWORK_ERROR;
108
+ message = "Network connection lost";
109
+ }
110
+ else if (code === 4001) {
111
+ disconnectReason = types_1.DisconnectionReason.AUTHENTICATION_ERROR;
112
+ message = "Authentication failed";
113
+ }
114
+ else if (wasClean) {
115
+ disconnectReason = types_1.DisconnectionReason.SERVER_CLOSED;
116
+ message = reason || "Server closed connection";
117
+ }
118
+ else {
119
+ disconnectReason = types_1.DisconnectionReason.CONNECTION_ERROR;
120
+ message = reason || "Connection closed unexpectedly";
121
+ }
122
+ // Attempt reconnection if enabled
123
+ if (this.config.reconnect &&
124
+ disconnectReason !== types_1.DisconnectionReason.AUTHENTICATION_ERROR &&
125
+ disconnectReason !== types_1.DisconnectionReason.CLIENT_CLOSED &&
126
+ this.reconnectCount < (this.config.reconnectAttempts || 3)) {
127
+ this.reconnectCount++;
128
+ setTimeout(() => {
129
+ this.connect();
130
+ }, this.config.reconnectDelay || 1000);
131
+ }
132
+ else {
133
+ this.disconnect({
134
+ reason: disconnectReason,
135
+ message,
136
+ code,
137
+ timestamp: new Date(),
138
+ });
139
+ }
140
+ }
141
+ /**
142
+ * Send a message through the WebSocket
143
+ */
144
+ sendMessage(message) {
145
+ if (!this.socket || this.socket.readyState !== WebSocket.OPEN) {
146
+ throw new Error_1.ConnectionError("Cannot send message: connection not open", {
147
+ context: {
148
+ stage: "sendMessage",
149
+ readyState: this.socket?.readyState,
150
+ },
151
+ hint: "Ensure the WebSocket is open before sending messages.",
152
+ });
153
+ }
154
+ try {
155
+ this.socket.send(JSON.stringify(message));
156
+ }
157
+ catch (error) {
158
+ const connectionError = (0, Error_1.normalizeError)(error, Error_1.ConnectionError, "Failed to send WebSocket message", { context: { stage: "sendMessage" } });
159
+ this.onErrorCallback?.(connectionError);
160
+ throw connectionError;
161
+ }
162
+ }
163
+ /**
164
+ * Close the WebSocket connection
165
+ */
166
+ close() {
167
+ if (this.socket) {
168
+ this.updateStatus(types_1.ConnectionStatus.NOT_CONNECTED);
169
+ this.socket.close(1000, "Client closed connection");
170
+ this.socket = null;
171
+ }
172
+ }
173
+ /**
174
+ * Check if the WebSocket is connected
175
+ */
176
+ isConnected() {
177
+ return this.socket?.readyState === WebSocket.OPEN;
178
+ }
179
+ handleConnected() {
180
+ this.updateStatus(types_1.ConnectionStatus.CONNECTED);
181
+ this.reconnectCount = 0;
182
+ }
183
+ }
184
+ exports.WebSocketConnection = WebSocketConnection;
@@ -0,0 +1,17 @@
1
+ declare const PRODUCTION_CONFIG: {
2
+ WEBSOCKET_URL: string;
3
+ BASE_API_URL: string;
4
+ };
5
+ declare const DEVELOPMENT_CONFIG: {
6
+ WEBSOCKET_URL: string;
7
+ BASE_API_URL: string;
8
+ };
9
+ declare const STAGING_CONFIG: {
10
+ WEBSOCKET_URL: string;
11
+ BASE_API_URL: string;
12
+ };
13
+ export type EnvironmentConfig = typeof DEVELOPMENT_CONFIG | typeof PRODUCTION_CONFIG | typeof STAGING_CONFIG;
14
+ export declare const getConfig: (environment?: Environment) => EnvironmentConfig;
15
+ export type Environment = "development" | "production" | "staging";
16
+ export {};
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB;;;CAGtB,CAAC;AAGF,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,OAAO,kBAAkB,GAAG,OAAO,iBAAiB,GAAG,OAAO,cAAc,CAAC;AAE7G,eAAO,MAAM,SAAS,GAAI,cAAa,WAA0B,KAAG,iBASnE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,SAAS,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfig = void 0;
4
+ const PRODUCTION_CONFIG = {
5
+ WEBSOCKET_URL: "wss://matrix-ws.eka.care",
6
+ BASE_API_URL: "https://matrix.eka.care",
7
+ };
8
+ const DEVELOPMENT_CONFIG = {
9
+ WEBSOCKET_URL: "wss://matrix-ws.dev.eka.care",
10
+ BASE_API_URL: "https://matrix.dev.eka.care",
11
+ };
12
+ const STAGING_CONFIG = {
13
+ WEBSOCKET_URL: "wss://matrix-ws.dev.eka.care",
14
+ BASE_API_URL: "https://matrix.dev.eka.care",
15
+ };
16
+ const getConfig = (environment = "production") => {
17
+ if (environment === "development") {
18
+ return DEVELOPMENT_CONFIG;
19
+ }
20
+ else if (environment === "production") {
21
+ return PRODUCTION_CONFIG;
22
+ }
23
+ else if (environment === "staging") {
24
+ return STAGING_CONFIG;
25
+ }
26
+ return PRODUCTION_CONFIG;
27
+ };
28
+ exports.getConfig = getConfig;
@@ -0,0 +1,2 @@
1
+ export type Environment = "development" | "production" | "staging";
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/constants/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,47 @@
1
+ import { Incoming, Outgoing } from "./index";
2
+ export type OutgoingSocketMessage = Outgoing.PingMessage | Outgoing.PongMessage | Outgoing.ErrorMessage | Outgoing.SyncMessage | Outgoing.AuthSynapseToMatrixMessage | Outgoing.ChatSynapseToMatrixMessage | Outgoing.StreamSynapseToMatrixMessage | Outgoing.EndOfStreamSynapseToMatrixMessage;
3
+ export type IncomingSocketMessage = Incoming.PingMessage | Incoming.PongMessage | Incoming.ErrorMessage | Incoming.SyncMessage | Incoming.ConnectionEstablishedMatrixToSynapseMessage | Incoming.ChatMatrixToSynapseMessage | Incoming.StreamMatrixToSynapseMessage | Incoming.EndOfStreamMatrixToSynapseMessage;
4
+ export declare const SOCKET_CONTENT_TYPES: {
5
+ readonly TEXT: "text";
6
+ readonly AUDIO: "audio";
7
+ readonly FILE: "file";
8
+ readonly PILL: "pill";
9
+ readonly MULTI: "multi";
10
+ readonly DOCTOR_CARD: "doctor_card";
11
+ readonly TIPS: "tips";
12
+ readonly INLINE_TEXT: "inline_text";
13
+ readonly MOBILE_VERIFICATION: "mobile_verification";
14
+ };
15
+ export type SOCKET_CONTENT_TYPES = (typeof SOCKET_CONTENT_TYPES)[keyof typeof SOCKET_CONTENT_TYPES];
16
+ export type SOCKET_CHAT_CONTENT_TYPES = (typeof SOCKET_CONTENT_TYPES)["TEXT"] | (typeof SOCKET_CONTENT_TYPES)["FILE"] | (typeof SOCKET_CONTENT_TYPES)["DOCTOR_CARD"];
17
+ export declare const SOCKET_EVENTS: {
18
+ readonly PING: "ping";
19
+ readonly PONG: "pong";
20
+ readonly CHAT: "chat";
21
+ readonly STREAM: "stream";
22
+ readonly AUTH: "auth";
23
+ readonly END_OF_STREAM: "eos";
24
+ readonly SYNC: "sync";
25
+ readonly ERROR: "err";
26
+ readonly CONNECTION_ESTABLISHED: "conn";
27
+ };
28
+ export type SOCKET_EVENTS = (typeof SOCKET_EVENTS)[keyof typeof SOCKET_EVENTS];
29
+ export declare const MULTI_SELECT_ADDITIONAL_OPTION: {
30
+ readonly NOTA: "none_of_the_above";
31
+ readonly AOTA: "all_of_the_above";
32
+ };
33
+ export type MULTI_SELECT_ADDITIONAL_OPTION = (typeof MULTI_SELECT_ADDITIONAL_OPTION)[keyof typeof MULTI_SELECT_ADDITIONAL_OPTION];
34
+ export type OutgoingSocketPongMessage = Outgoing.PongMessage;
35
+ export type IncomingSocketPingMessage = Incoming.PingMessage;
36
+ export type IncomingSocketErrorMessage = Incoming.ErrorMessage;
37
+ export type IncomingSocketSyncMessage = Incoming.SyncMessage;
38
+ export type IncomingSocketConnectionEstablishedMessage = Incoming.ConnectionEstablishedMatrixToSynapseMessage;
39
+ export type IncomingSocketChatMessage = Incoming.ChatMatrixToSynapseMessage;
40
+ export type IncomingSocketStreamMessage = Incoming.StreamMatrixToSynapseMessage;
41
+ export type IncomingSocketEndOfStreamMessage = Incoming.EndOfStreamMatrixToSynapseMessage;
42
+ export type OutgoingSocketAuthMessage = Outgoing.AuthSynapseToMatrixMessage;
43
+ export type OutgoingSocketStreamMessage = Outgoing.StreamSynapseToMatrixMessage;
44
+ export type OutgoingSocketEndOfStreamMessage = Outgoing.EndOfStreamSynapseToMatrixMessage;
45
+ export type OutgoingSocket = Outgoing.PingMessage;
46
+ export declare function IsValidSocketMesssage(message: any): message is IncomingSocketMessage;
47
+ //# sourceMappingURL=Events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Events.d.ts","sourceRoot":"","sources":["../../src/events/Events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,CAAC,WAAW,GACpB,QAAQ,CAAC,WAAW,GACpB,QAAQ,CAAC,YAAY,GACrB,QAAQ,CAAC,WAAW,GACpB,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,0BAA0B,G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AAM,yBAAyB,GAAG,QAAQ,CAAC,0BAA0B,CAAC;AAC5E,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,4BAA4B,CAAC;AAChF,MAAM,MAAM,gCAAgC,GAC1C,QAAQ,CAAC,iCAAiC,CAAC;AAE7C,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,0BAA0B,CAAC;AAC5E,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,4BAA4B,CAAC;AAChF,MAAM,MAAM,gCAAgC,GAC1C,QAAQ,CAAC,iCAAiC,CAAC;AAC7C,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,WAAW,CAAC;AAClD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,GAAG,GACX,OAAO,IAAI,qBAAqB,CAYlC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MULTI_SELECT_ADDITIONAL_OPTION = exports.SOCKET_EVENTS = exports.SOCKET_CONTENT_TYPES = void 0;
4
+ exports.IsValidSocketMesssage = IsValidSocketMesssage;
5
+ // Content types
6
+ exports.SOCKET_CONTENT_TYPES = {
7
+ TEXT: "text",
8
+ AUDIO: "audio",
9
+ FILE: "file",
10
+ PILL: "pill",
11
+ MULTI: "multi",
12
+ DOCTOR_CARD: "doctor_card",
13
+ TIPS: "tips",
14
+ INLINE_TEXT: "inline_text",
15
+ MOBILE_VERIFICATION: "mobile_verification",
16
+ };
17
+ exports.SOCKET_EVENTS = {
18
+ // Client to Server events
19
+ PING: "ping",
20
+ PONG: "pong",
21
+ CHAT: "chat",
22
+ STREAM: "stream",
23
+ AUTH: "auth",
24
+ END_OF_STREAM: "eos",
25
+ SYNC: "sync",
26
+ ERROR: "err",
27
+ // Server to Client events
28
+ CONNECTION_ESTABLISHED: "conn",
29
+ };
30
+ exports.MULTI_SELECT_ADDITIONAL_OPTION = {
31
+ NOTA: "none_of_the_above",
32
+ AOTA: "all_of_the_above",
33
+ };
34
+ function IsValidSocketMesssage(message) {
35
+ const validEvents = [
36
+ exports.SOCKET_EVENTS.PING,
37
+ exports.SOCKET_EVENTS.PONG,
38
+ exports.SOCKET_EVENTS.ERROR,
39
+ exports.SOCKET_EVENTS.SYNC,
40
+ exports.SOCKET_EVENTS.CONNECTION_ESTABLISHED,
41
+ exports.SOCKET_EVENTS.CHAT,
42
+ exports.SOCKET_EVENTS.STREAM,
43
+ exports.SOCKET_EVENTS.END_OF_STREAM,
44
+ ];
45
+ return validEvents.includes(message.ev);
46
+ }
@@ -0,0 +1,2 @@
1
+ export type { PingMessage, PongMessage, ErrorMessage, SyncMessage, ConnectionEstablishedMatrixToSynapseMessage, ChatMatrixToSynapseMessage, StreamMatrixToSynapseMessage, EndOfStreamMatrixToSynapseMessage, } from "./types";
2
+ //# sourceMappingURL=Incoming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Incoming.d.ts","sourceRoot":"","sources":["../../src/events/Incoming.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,2CAA2C,EAC3C,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type { PingMessage, PongMessage, ErrorMessage, SyncMessage, AuthSynapseToMatrixMessage, ChatSynapseToMatrixMessage, StreamSynapseToMatrixMessage, EndOfStreamSynapseToMatrixMessage, } from "./types";
2
+ //# sourceMappingURL=Outgoing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Outgoing.d.ts","sourceRoot":"","sources":["../../src/events/Outgoing.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,GACpC,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * as Outgoing from "../events/Outgoing";
2
+ export * as Incoming from "../events/Incoming";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Incoming = exports.Outgoing = void 0;
37
+ exports.Outgoing = __importStar(require("../events/Outgoing"));
38
+ exports.Incoming = __importStar(require("../events/Incoming"));
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Event types for message layer
3
+ * These are specific to the messaging layer and don't affect the base connection layer
4
+ */
5
+ import { MULTI_SELECT_ADDITIONAL_OPTION, SOCKET_CONTENT_TYPES, SOCKET_EVENTS } from "./Events";
6
+ export interface BaseMessage {
7
+ ev: SOCKET_EVENTS;
8
+ _id: string;
9
+ ts: number;
10
+ }
11
+ export interface PingMessage extends BaseMessage {
12
+ ev: (typeof SOCKET_EVENTS)["PING"];
13
+ }
14
+ export interface PongMessage extends BaseMessage {
15
+ ev: (typeof SOCKET_EVENTS)["PONG"];
16
+ }
17
+ export interface ErrorMessage extends BaseMessage {
18
+ ev: (typeof SOCKET_EVENTS)["ERROR"];
19
+ code: string;
20
+ msg: string;
21
+ }
22
+ export interface SyncMessage extends BaseMessage {
23
+ ev: (typeof SOCKET_EVENTS)["SYNC"];
24
+ }
25
+ export interface AuthSynapseToMatrixMessage extends BaseMessage {
26
+ ev: (typeof SOCKET_EVENTS)["AUTH"];
27
+ data: {
28
+ token: string;
29
+ };
30
+ }
31
+ export interface ChatSynapseToMatrixMessage extends BaseMessage {
32
+ ev: (typeof SOCKET_EVENTS)["CHAT"];
33
+ ct: (typeof SOCKET_CONTENT_TYPES)["TEXT"] | (typeof SOCKET_CONTENT_TYPES)["FILE"] | (typeof SOCKET_CONTENT_TYPES)["DOCTOR_CARD"];
34
+ data?: {
35
+ url?: string;
36
+ text?: string;
37
+ tool_use_id?: string;
38
+ hidden?: boolean;
39
+ extension?: string;
40
+ tool_use_params?: any;
41
+ };
42
+ }
43
+ export interface StreamSynapseToMatrixMessage extends BaseMessage {
44
+ ev: (typeof SOCKET_EVENTS)["STREAM"];
45
+ ct: (typeof SOCKET_CONTENT_TYPES)["AUDIO"];
46
+ data: {
47
+ audio: string;
48
+ format: string;
49
+ };
50
+ }
51
+ export interface EndOfStreamSynapseToMatrixMessage extends BaseMessage {
52
+ ev: (typeof SOCKET_EVENTS)["END_OF_STREAM"];
53
+ }
54
+ export interface ConnectionEstablishedMatrixToSynapseMessage extends BaseMessage {
55
+ ev: (typeof SOCKET_EVENTS)["CONNECTION_ESTABLISHED"];
56
+ sid: string;
57
+ msg: string;
58
+ }
59
+ export interface ChatMatrixToSynapseMessage extends BaseMessage {
60
+ ev: (typeof SOCKET_EVENTS)["CHAT"];
61
+ ct: Exclude<SOCKET_CONTENT_TYPES, (typeof SOCKET_CONTENT_TYPES)["AUDIO"]>;
62
+ data: {
63
+ urls?: string[];
64
+ exp?: number;
65
+ text?: string;
66
+ tool_use_id?: string;
67
+ choices?: string[];
68
+ callbacks: Record<string, boolean>;
69
+ additional_option?: typeof MULTI_SELECT_ADDITIONAL_OPTION;
70
+ mobile_number?: string;
71
+ };
72
+ }
73
+ export interface StreamMatrixToSynapseMessage extends BaseMessage {
74
+ ev: (typeof SOCKET_EVENTS)["STREAM"];
75
+ ct: (typeof SOCKET_CONTENT_TYPES)["TEXT"] | (typeof SOCKET_CONTENT_TYPES)["TIPS"];
76
+ data: {
77
+ text?: string;
78
+ progress_msg?: string;
79
+ tips?: string[];
80
+ };
81
+ }
82
+ export interface EndOfStreamMatrixToSynapseMessage extends BaseMessage {
83
+ ev: (typeof SOCKET_EVENTS)["END_OF_STREAM"];
84
+ ct: (typeof SOCKET_CONTENT_TYPES)["TEXT"];
85
+ }
86
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,aAAa,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;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;IACrC,EAAE,EACE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,GACrC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACjE;AAED,MAAM,WAAW,iCAAkC,SAAQ,WAAW;IACpE,EAAE,EAAE,CAAC,OAAO,aAAa,CAAC,CAAC,eAAe,CAAC,CAAC;IAC5C,EAAE,EAAE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Event types for message layer
4
+ * These are specific to the messaging layer and don't affect the base connection layer
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Synapse SDK - Main exports
3
+ * Medical Chatbot TypeScript SDK
4
+ */
5
+ export { SynapseSDK } from "./Synapse";
6
+ export type { SynapseSDKConfig, SynapseSDKCallbacks, SynapseSDKOverrides, ExistingSessionOptions, } from "./Synapse";
7
+ export { BaseConnection } from "./internal/connection/BaseConnection";
8
+ export { WebSocketConnection } from "./connection/Websocket";
9
+ export { ConnectionFactory, ConnectionType, } from "./connection/ConnectionFactory";
10
+ export type { ConnectionConfig } from "./connection/ConnectionFactory";
11
+ export * from "./internal/connection/types";
12
+ export { ResourceManager } from "./resources";
13
+ export * from "./resources/types";
14
+ export { Session } from "./resources/session/Session";
15
+ export * from "./resources/session/types";
16
+ export { MessageManager } from "./messages/MessageManager";
17
+ export { SYNAPSE_REALTIME_EVENTS, type SynapseRealTimeEventData, type ToolEscalationData, } from "./messages/types";
18
+ export { HttpClient } from "./internal/Api/HttpClient";
19
+ export type { HttpClientConfig } from "./internal/Api/HttpClient";
20
+ export { SynapseError, APIError, APIUserAbortError, APIConnectionTimeoutError, BadRequestError, UnauthorizedError, PermissionDeniedError, NotFoundError, MethodNotAllowedError, RateLimitError, InternalServerError, } from "./internal/Error/Error";
21
+ export { ErrorType } from "./internal/Error/types";
22
+ export type { Environment } from "./constants";
23
+ export { ErrorUtils } from "./utils/Error";
24
+ export * from "./media/audio/types";
25
+ export type { SendMessageOptions } from "./Synapse";
26
+ export { SYNAPSE_MESSAGE_TYPES } from "./messages/types";
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,cAAc,6BAA6B,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAG1C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EACL,YAAY,EACZ,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