whio-api-sdk 1.0.201-beta-staging → 1.0.203-beta-staging

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.
@@ -197,20 +197,41 @@ export class WebSocketModule extends BaseClient {
197
197
  });
198
198
  // Application-specific events
199
199
  this.socket.on('connected', (data) => {
200
+ console.log('[WebSocket] Connected event received:', JSON.stringify(data, null, 2));
200
201
  this.emit('connected', data);
201
202
  });
202
203
  this.socket.on('audio-chunk-received', (data) => {
204
+ console.log('[WebSocket] Audio chunk received event:', JSON.stringify(data, null, 2));
203
205
  this.emit('audio-chunk-received', data);
204
206
  });
207
+ this.socket.on('transcription-complete', (data) => {
208
+ console.log('[WebSocket] Transcription complete event received:', JSON.stringify(data, null, 2));
209
+ this.emit('transcription-complete', data);
210
+ });
205
211
  this.socket.on('transcription-queued', (data) => {
212
+ console.log('[WebSocket] Transcription queued event received:', JSON.stringify(data, null, 2));
206
213
  this.emit('transcription-queued', data);
207
214
  });
215
+ this.socket.on('summary-complete', (data) => {
216
+ console.log('[WebSocket] Summary complete event received:', JSON.stringify(data, null, 2));
217
+ this.emit('summary-complete', data);
218
+ });
219
+ this.socket.on('summary-queued', (data) => {
220
+ console.log('[WebSocket] Summary queued event received:', JSON.stringify(data, null, 2));
221
+ this.emit('summary-queued', data);
222
+ });
208
223
  this.socket.on('audio-error', (error) => {
224
+ console.log('[WebSocket] Audio error event received:', JSON.stringify(error, null, 2));
209
225
  this.emit('audio-error', error);
210
226
  });
211
227
  this.socket.on('transcription-error', (error) => {
228
+ console.log('[WebSocket] Transcription error event received:', JSON.stringify(error, null, 2));
212
229
  this.emit('transcription-error', error);
213
230
  });
231
+ // Catch-all event listener for debugging
232
+ this.socket.onAny((eventName, ...args) => {
233
+ console.log(`[WebSocket] Raw event received: "${eventName}"`, JSON.stringify(args, null, 2));
234
+ });
214
235
  }
215
236
  /**
216
237
  * Determine if should attempt reconnection
@@ -35,7 +35,28 @@ export interface WebSocketEvents {
35
35
  message: string;
36
36
  timestamp: string;
37
37
  }) => void;
38
+ 'transcription-complete': (data: {
39
+ sessionId: string;
40
+ timestamp: string;
41
+ }) => void;
42
+ 'summary-complete': (data: {
43
+ sessionId: string;
44
+ timestamp: string;
45
+ }) => void;
46
+ 'summary-queued': (data: {
47
+ sessionId: string;
48
+ timestamp: string;
49
+ }) => void;
50
+ 'audio-started': (data: {
51
+ sessionId: string;
52
+ timestamp: string;
53
+ }) => void;
54
+ 'audio-stopped': (data: {
55
+ sessionId: string;
56
+ timestamp: string;
57
+ }) => void;
38
58
  'audio-error': (error: {
59
+ sessionId: string;
39
60
  error: string;
40
61
  }) => void;
41
62
  'transcription-error': (error: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.201-beta-staging",
3
+ "version": "1.0.203-beta-staging",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -248,24 +248,49 @@ export class WebSocketModule extends BaseClient {
248
248
 
249
249
  // Application-specific events
250
250
  this.socket.on('connected', (data: any) => {
251
+ console.log('[WebSocket] Connected event received:', JSON.stringify(data, null, 2));
251
252
  this.emit('connected', data);
252
253
  });
253
254
 
254
255
  this.socket.on('audio-chunk-received', (data: any) => {
256
+ console.log('[WebSocket] Audio chunk received event:', JSON.stringify(data, null, 2));
255
257
  this.emit('audio-chunk-received', data);
256
258
  });
257
259
 
260
+ this.socket.on('transcription-complete', (data: any) => {
261
+ console.log('[WebSocket] Transcription complete event received:', JSON.stringify(data, null, 2));
262
+ this.emit('transcription-complete', data);
263
+ });
264
+
258
265
  this.socket.on('transcription-queued', (data: any) => {
266
+ console.log('[WebSocket] Transcription queued event received:', JSON.stringify(data, null, 2));
259
267
  this.emit('transcription-queued', data);
260
268
  });
269
+
270
+ this.socket.on('summary-complete', (data: any) => {
271
+ console.log('[WebSocket] Summary complete event received:', JSON.stringify(data, null, 2));
272
+ this.emit('summary-complete', data);
273
+ });
274
+
275
+ this.socket.on('summary-queued', (data: any) => {
276
+ console.log('[WebSocket] Summary queued event received:', JSON.stringify(data, null, 2));
277
+ this.emit('summary-queued', data);
278
+ });
261
279
 
262
280
  this.socket.on('audio-error', (error: any) => {
281
+ console.log('[WebSocket] Audio error event received:', JSON.stringify(error, null, 2));
263
282
  this.emit('audio-error', error);
264
283
  });
265
284
 
266
285
  this.socket.on('transcription-error', (error: any) => {
286
+ console.log('[WebSocket] Transcription error event received:', JSON.stringify(error, null, 2));
267
287
  this.emit('transcription-error', error);
268
288
  });
289
+
290
+ // Catch-all event listener for debugging
291
+ this.socket.onAny((eventName: string, ...args: any[]) => {
292
+ console.log(`[WebSocket] Raw event received: "${eventName}"`, JSON.stringify(args, null, 2));
293
+ });
269
294
  }
270
295
 
271
296
  /**
@@ -38,7 +38,21 @@ export interface WebSocketEvents {
38
38
  message: string;
39
39
  timestamp: string;
40
40
  }) => void;
41
- 'audio-error': (error: { error: string }) => void;
41
+ 'transcription-complete': (data: {
42
+ sessionId: string;
43
+ timestamp: string;
44
+ }) => void;
45
+ 'summary-complete': (data: {
46
+ sessionId: string;
47
+ timestamp: string;
48
+ }) => void;
49
+ 'summary-queued': (data: {
50
+ sessionId: string;
51
+ timestamp: string;
52
+ }) => void;
53
+ 'audio-started': (data: { sessionId: string; timestamp: string }) => void;
54
+ 'audio-stopped': (data: { sessionId: string; timestamp: string }) => void;
55
+ 'audio-error': (error: { sessionId: string; error: string }) => void;
42
56
  'transcription-error': (error: { sessionId: string; error: string }) => void;
43
57
  'connection-error': (error: Error) => void;
44
58
  'reconnecting': (attemptNumber: number) => void;