@recallai/desktop-sdk 2025.2.27-c7121a5c9a53c5cae66c4e6acc8fe486ea26ecf9 → 2025.3.5-15e8980a13a3be30b6c1d66cbe621a154a2e18a9

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.
Binary file
package/index.d.ts CHANGED
@@ -1,71 +1,92 @@
1
1
  declare module '@recallai/desktop-sdk' {
2
2
  export function init(config: RecallAiSdkConfig): void;
3
- export function addEventListener(
4
- type: RecallAiSdkEvent['type'],
5
- listener: (event: RecallAiSdkEvent) => void
3
+
4
+ export type RecallAiSdkEvent =
5
+ | RecordingStartEvent
6
+ | RecordingStopEvent
7
+ | UploadProgressEvent
8
+ | MeetingDetectedEvent
9
+ | MeetingUpdatedEvent
10
+ | MeetingClosedEvent
11
+ | SdkStateChangeEvent
12
+ | ErrorEvent
13
+ | MediaCaptureStatusEvent
14
+ | PermissionsGrantedEvent;
15
+
16
+ export type EventTypeToPayloadMap = {
17
+ 'recording-started': RecordingStartEvent;
18
+ 'recording-ended': RecordingStopEvent;
19
+ 'upload-progress': UploadProgressEvent;
20
+ 'meeting-detected': MeetingDetectedEvent;
21
+ 'meeting-updated': MeetingUpdatedEvent;
22
+ 'meeting-closed': MeetingClosedEvent;
23
+ 'sdk-state-change': SdkStateChangeEvent;
24
+ 'error': ErrorEvent;
25
+ 'media-capture-status': MediaCaptureStatusEvent;
26
+ 'permissions-granted': PermissionsGrantedEvent;
27
+ };
28
+
29
+ export function addEventListener<T extends keyof EventTypeToPayloadMap>(
30
+ type: T,
31
+ listener: (event: EventTypeToPayloadMap[T]) => void
6
32
  ): void;
33
+
7
34
  export function startRecording(config: StartRecordingConfig): void;
8
35
  export function stopRecording(config: StopRecordingConfig): void;
9
36
  export function uploadRecording(config: UploadRecordingConfig): void;
10
37
 
11
- interface RecallAiSdkConfig {
38
+ export interface RecallAiSdkConfig {
12
39
  api_url: string;
13
40
  }
14
-
15
- interface StartRecordingConfig {
41
+ export interface StartRecordingConfig {
16
42
  windowId: string;
17
43
  uploadToken: string;
18
44
  }
19
-
20
- interface StopRecordingConfig {
45
+ export interface StopRecordingConfig {
21
46
  windowId: string;
22
47
  }
23
-
24
- interface UploadRecordingConfig {
48
+ export interface UploadRecordingConfig {
25
49
  windowId: string;
26
50
  }
27
51
 
28
- type RecallAiSdkEvent =
29
- | RecordingStartEvent
30
- | RecordingStopEvent
31
- | UploadProgressEvent
32
- | RecordingEndedEvent
33
- | MeetingDetectedEvent
34
- | MeetingClosedEvent
35
- | SdkStateChangeEvent;
36
-
37
- interface UploadProgressEvent {
38
- type: 'upload-progress';
52
+ export interface RecordingStartEvent {
39
53
  window: { id: string };
40
- progress: number;
41
54
  }
42
-
43
- interface RecordingEndedEvent {
44
- type: 'recording-started';
55
+ export interface RecordingStopEvent {
45
56
  window: { id: string };
46
57
  }
47
-
48
- interface RecordingEndedEvent {
49
- type: 'recording-ended';
58
+ export interface UploadProgressEvent {
50
59
  window: { id: string };
60
+ progress: number;
51
61
  }
52
-
53
- interface MeetingDetectedEvent {
54
- type: 'meeting-detected';
62
+ export interface MeetingDetectedEvent {
55
63
  window: { id: string; url: string; title: string };
56
64
  }
57
-
58
- interface MeetingClosedEvent {
59
- type: 'meeting-closed';
65
+ export interface MeetingUpdatedEvent {
60
66
  window: { id: string };
67
+ title: string;
61
68
  }
62
-
63
- interface SdkStateChangeEvent {
64
- type: 'sdk-state-change';
69
+ export interface MeetingClosedEvent {
70
+ window: { id: string };
71
+ }
72
+ export interface SdkStateChangeEvent {
65
73
  sdk: {
66
74
  state: {
67
75
  code: 'recording' | 'idle' | 'paused';
68
76
  };
69
77
  };
70
78
  }
79
+ export interface MediaCaptureStatusEvent {
80
+ window: { id: string };
81
+ type: 'video' | 'audio';
82
+ capturing: boolean;
83
+ }
84
+ export interface PermissionsGrantedEvent {
85
+ }
86
+ export interface ErrorEvent {
87
+ error: {
88
+ type: string;
89
+ message: string;
90
+ };
91
+ }
71
92
  }
package/index.js CHANGED
@@ -49,6 +49,10 @@ function uploadRecording({ windowId }) {
49
49
  addon.upload_recording(windowId);
50
50
  }
51
51
 
52
+ function prepareDesktopAudioRecording() {
53
+ return addon.prepare_desktop_audio_recording();
54
+ }
55
+
52
56
  function addEventListener(type, callback) {
53
57
  addon.callback((eventJson) => {
54
58
  let obj = JSON.parse(eventJson);
@@ -62,5 +66,6 @@ module.exports = {
62
66
  addEventListener,
63
67
  startRecording,
64
68
  stopRecording,
65
- uploadRecording
69
+ uploadRecording,
70
+ prepareDesktopAudioRecording
66
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recallai/desktop-sdk",
3
- "version": "2025.02.27-c7121a5c9a53c5cae66c4e6acc8fe486ea26ecf9",
3
+ "version": "2025.03.05-15e8980a13a3be30b6c1d66cbe621a154a2e18a9",
4
4
  "description": "Recall Desktop SDK (Alpha)",
5
5
  "gypfile": true,
6
6
  "main": "./index.js",