@todesktop/client-recall 1.0.3 → 1.1.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.
- package/README.md +83 -45
- package/dist/index.d.ts +8 -109
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +0 -81
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +0 -81
- package/dist/index.js.map +1 -1
- package/dist/recallai-desktop-sdk.d.ts +128 -0
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -14,7 +14,11 @@ This plugin provides a complete integration between ToDesktop and the Recall.ai
|
|
|
14
14
|
- **Upload progress tracking** and webhook integration
|
|
15
15
|
- **Type-safe client library** for web applications
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Want a tutorial?
|
|
18
|
+
|
|
19
|
+
Check out the [tutorial](https://todesktop.com/docs/tutorials/recall-transcripts) for a step-by-step guide on how to use the Recall desktop plugin and client SDK.
|
|
20
|
+
|
|
21
|
+
## Installation & Setup
|
|
18
22
|
|
|
19
23
|
### Prerequisites
|
|
20
24
|
|
|
@@ -52,35 +56,53 @@ import { recallDesktop } from "@todesktop/client-recall";
|
|
|
52
56
|
await recallDesktop.initSdk();
|
|
53
57
|
|
|
54
58
|
// Listen for meeting detection
|
|
55
|
-
recallDesktop.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const stopMeetingListener = recallDesktop.addEventListener(
|
|
60
|
+
"meeting-detected",
|
|
61
|
+
async ({ window }) => {
|
|
62
|
+
console.log("Meeting detected:", window);
|
|
63
|
+
|
|
64
|
+
// Get upload token from your backend
|
|
65
|
+
const uploadToken = await getUploadTokenFromBackend();
|
|
66
|
+
|
|
67
|
+
// Start recording
|
|
68
|
+
const result = await recallDesktop.startRecording(window.id, uploadToken);
|
|
69
|
+
if (result.success) {
|
|
70
|
+
console.log("Recording started successfully");
|
|
71
|
+
}
|
|
65
72
|
}
|
|
66
|
-
|
|
73
|
+
);
|
|
67
74
|
|
|
68
75
|
// Listen for recording events
|
|
69
|
-
recallDesktop.
|
|
70
|
-
|
|
71
|
-
})
|
|
76
|
+
const stopStateListener = recallDesktop.addEventListener(
|
|
77
|
+
"sdk-state-change",
|
|
78
|
+
({ sdk }) => {
|
|
79
|
+
console.log("Recording state:", sdk.state.code);
|
|
80
|
+
}
|
|
81
|
+
);
|
|
72
82
|
|
|
73
|
-
recallDesktop.
|
|
74
|
-
|
|
75
|
-
})
|
|
83
|
+
const stopUploadListener = recallDesktop.addEventListener(
|
|
84
|
+
"upload-progress",
|
|
85
|
+
({ progress }) => {
|
|
86
|
+
console.log(`Upload progress: ${progress}%`);
|
|
87
|
+
}
|
|
88
|
+
);
|
|
76
89
|
|
|
77
90
|
// Handle recording completion
|
|
78
|
-
recallDesktop.
|
|
79
|
-
|
|
91
|
+
const stopRecordingListener = recallDesktop.addEventListener(
|
|
92
|
+
"recording-ended",
|
|
93
|
+
async ({ window }) => {
|
|
94
|
+
console.log("Recording ended for window:", window.id);
|
|
80
95
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
96
|
+
// Upload the recording
|
|
97
|
+
await recallDesktop.uploadRecording(window.id);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
// Later, remove listeners when no longer needed
|
|
102
|
+
stopMeetingListener();
|
|
103
|
+
stopStateListener();
|
|
104
|
+
stopUploadListener();
|
|
105
|
+
stopRecordingListener();
|
|
84
106
|
```
|
|
85
107
|
|
|
86
108
|
### Desktop Audio Recording
|
|
@@ -112,13 +134,36 @@ console.log("Permissions:", status.permissions);
|
|
|
112
134
|
await recallDesktop.requestPermission("screen-capture");
|
|
113
135
|
|
|
114
136
|
// Listen for permission changes
|
|
115
|
-
recallDesktop.
|
|
116
|
-
|
|
117
|
-
})
|
|
137
|
+
const removePermissionListener = recallDesktop.addEventListener(
|
|
138
|
+
"permission-status",
|
|
139
|
+
({ permission, status }) => {
|
|
140
|
+
console.log(`Permission ${permission}: ${status}`);
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
// Remove the listener when you no longer need updates
|
|
145
|
+
removePermissionListener();
|
|
118
146
|
```
|
|
119
147
|
|
|
120
148
|
## Backend Integration
|
|
121
149
|
|
|
150
|
+
### Demo Backend Service
|
|
151
|
+
|
|
152
|
+
A minimal Express backend lives in `packages/backend` for demos. It exposes:
|
|
153
|
+
|
|
154
|
+
- `POST /api/create-sdk-upload` – calls the Recall API and returns `{ id, upload_token, recording_id }`
|
|
155
|
+
- `POST /webhooks/recall` – logs Recall webhook payloads for inspection
|
|
156
|
+
- `GET /health` – health check
|
|
157
|
+
|
|
158
|
+
Run it with your Recall token (replace the example value with the token for your workspace):
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
RECALL_API_TOKEN="c5a6aaff378e5dc5a7e28b3e2853eff832ce4bde" \
|
|
162
|
+
npm start --workspace=packages/backend
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The server defaults to `https://us-west-2.recall.ai`; override via `RECALL_API_BASE` if you use another region. Set `CORS_ORIGIN` to restrict cross-origin access (defaults to `*`).
|
|
166
|
+
|
|
122
167
|
### Creating Upload Tokens
|
|
123
168
|
|
|
124
169
|
Your backend needs to create upload tokens using the Recall.ai API:
|
|
@@ -191,13 +236,13 @@ app.post("/webhooks/recall", (req, res) => {
|
|
|
191
236
|
|
|
192
237
|
### Event Listeners
|
|
193
238
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
- `
|
|
197
|
-
- `
|
|
198
|
-
- `
|
|
199
|
-
- `
|
|
200
|
-
- `
|
|
239
|
+
Use `recallDesktop.addEventListener(eventType, callback)` to subscribe. Available event types include:
|
|
240
|
+
|
|
241
|
+
- `meeting-detected`, `meeting-updated`, `meeting-closed`
|
|
242
|
+
- `recording-started`, `recording-ended`, `sdk-state-change`
|
|
243
|
+
- `upload-progress`, `realtime-event`, `error`
|
|
244
|
+
- `permissions-granted`, `permission-status`
|
|
245
|
+
- `media-capture-status`, `participant-capture-status`, `shutdown`
|
|
201
246
|
|
|
202
247
|
### Configuration
|
|
203
248
|
|
|
@@ -217,16 +262,9 @@ app.post("/webhooks/recall", (req, res) => {
|
|
|
217
262
|
|
|
218
263
|
### Plugin Development
|
|
219
264
|
|
|
220
|
-
The plugin uses
|
|
221
|
-
|
|
222
|
-
1. Install the actual Recall SDK:
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
npm install @recallai/desktop-sdk --workspace=packages/plugin
|
|
226
|
-
```
|
|
265
|
+
- The Electron plugin uses `@recallai/desktop-sdk` directly; no mock setup is required.
|
|
266
|
+
- Before building or type-checking the client package, the `sync-sdk-types` script copies the SDK's TypeScript declarations into `packages/client/src/generated`. This runs automatically via `npm run build --workspace=@todesktop/client-recall` and `npm run typecheck --workspace=@todesktop/client-recall`, but you can invoke it manually with:
|
|
227
267
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
import RecallAiSdk from "@recallai/desktop-sdk";
|
|
232
|
-
```
|
|
268
|
+
```bash
|
|
269
|
+
npm run sync-sdk-types --workspace=@todesktop/client-recall
|
|
270
|
+
```
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* with the ToDesktop Recall Desktop SDK plugin through the exposed window APIs.
|
|
6
6
|
*/
|
|
7
7
|
import type { RecallDesktopApi } from './generated/preload';
|
|
8
|
+
import type { EventTypeToPayloadMap, Permission as RecallPermission, RecallAiSdkWindow } from './generated/recallai-desktop-sdk';
|
|
8
9
|
declare global {
|
|
9
10
|
interface Window {
|
|
10
11
|
todesktop?: {
|
|
@@ -12,15 +13,7 @@ declare global {
|
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
* Meeting window information
|
|
17
|
-
*/
|
|
18
|
-
export interface MeetingWindow {
|
|
19
|
-
id: string;
|
|
20
|
-
title?: string;
|
|
21
|
-
url?: string;
|
|
22
|
-
platform: string;
|
|
23
|
-
}
|
|
16
|
+
export type MeetingWindow = RecallAiSdkWindow;
|
|
24
17
|
/**
|
|
25
18
|
* Plugin configuration options
|
|
26
19
|
*/
|
|
@@ -53,18 +46,13 @@ export interface ApiResponse<T = any> {
|
|
|
53
46
|
message: string;
|
|
54
47
|
data?: T;
|
|
55
48
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export type PermissionType = 'accessibility' | 'screen-capture' | 'microphone' | 'system-audio';
|
|
60
|
-
/**
|
|
61
|
-
* SDK event types
|
|
62
|
-
*/
|
|
63
|
-
export type RecallSdkEventType = 'recording-started' | 'recording-ended' | 'upload-progress' | 'meeting-detected' | 'meeting-updated' | 'meeting-closed' | 'sdk-state-change' | 'error' | 'media-capture-status' | 'participant-capture-status' | 'permissions-granted' | 'permission-status' | 'realtime-event' | 'shutdown';
|
|
49
|
+
export type PermissionType = RecallPermission;
|
|
50
|
+
export type RecallSdkEventType = keyof EventTypeToPayloadMap;
|
|
51
|
+
export type RecallSdkEventPayload<T extends RecallSdkEventType> = EventTypeToPayloadMap[T];
|
|
64
52
|
/**
|
|
65
53
|
* Event handler function type
|
|
66
54
|
*/
|
|
67
|
-
export type EventHandler<T =
|
|
55
|
+
export type EventHandler<T = unknown> = (data: T) => void;
|
|
68
56
|
/**
|
|
69
57
|
* Recall Desktop SDK Client API
|
|
70
58
|
* Provides a safe wrapper around the window.todesktop.recallDesktop API
|
|
@@ -167,7 +155,7 @@ export declare class RecallDesktopClient {
|
|
|
167
155
|
* @returns Function to unsubscribe from the event
|
|
168
156
|
* @throws Error if plugin is not available
|
|
169
157
|
*/
|
|
170
|
-
addEventListener<
|
|
158
|
+
addEventListener<K extends RecallSdkEventType>(eventType: K, callback: EventHandler<RecallSdkEventPayload<K>>): () => void;
|
|
171
159
|
/**
|
|
172
160
|
* Remove all event listeners managed by this client instance
|
|
173
161
|
*/
|
|
@@ -178,98 +166,9 @@ export declare class RecallDesktopClient {
|
|
|
178
166
|
* @throws Error if plugin is not available
|
|
179
167
|
*/
|
|
180
168
|
getVersion(): string;
|
|
181
|
-
/**
|
|
182
|
-
* Subscribe to meeting detection events
|
|
183
|
-
* @param callback Function to call when a meeting is detected
|
|
184
|
-
* @returns Function to unsubscribe from the event
|
|
185
|
-
*/
|
|
186
|
-
onMeetingDetected(callback: EventHandler<{
|
|
187
|
-
window: MeetingWindow;
|
|
188
|
-
}>): () => void;
|
|
189
|
-
/**
|
|
190
|
-
* Subscribe to recording state changes
|
|
191
|
-
* @param callback Function to call when recording state changes
|
|
192
|
-
* @returns Function to unsubscribe from the event
|
|
193
|
-
*/
|
|
194
|
-
onRecordingStateChange(callback: EventHandler<{
|
|
195
|
-
sdk: {
|
|
196
|
-
state: {
|
|
197
|
-
code: 'recording' | 'idle' | 'paused';
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
}>): () => void;
|
|
201
|
-
/**
|
|
202
|
-
* Subscribe to upload progress updates
|
|
203
|
-
* @param callback Function to call when upload progress updates
|
|
204
|
-
* @returns Function to unsubscribe from the event
|
|
205
|
-
*/
|
|
206
|
-
onUploadProgress(callback: EventHandler<{
|
|
207
|
-
window: {
|
|
208
|
-
id: string;
|
|
209
|
-
};
|
|
210
|
-
progress: number;
|
|
211
|
-
}>): () => void;
|
|
212
|
-
/**
|
|
213
|
-
* Subscribe to permission status updates
|
|
214
|
-
* @param callback Function to call when permission status changes
|
|
215
|
-
* @returns Function to unsubscribe from the event
|
|
216
|
-
*/
|
|
217
|
-
onPermissionStatusChange(callback: EventHandler<{
|
|
218
|
-
permission: PermissionType;
|
|
219
|
-
status: string;
|
|
220
|
-
}>): () => void;
|
|
221
|
-
/**
|
|
222
|
-
* Subscribe to SDK errors
|
|
223
|
-
* @param callback Function to call when SDK errors occur
|
|
224
|
-
* @returns Function to unsubscribe from the event
|
|
225
|
-
*/
|
|
226
|
-
onError(callback: EventHandler<{
|
|
227
|
-
window?: MeetingWindow;
|
|
228
|
-
type: string;
|
|
229
|
-
message: string;
|
|
230
|
-
}>): () => void;
|
|
231
|
-
/**
|
|
232
|
-
* Subscribe to real-time events (transcription, participants, etc.)
|
|
233
|
-
* @param callback Function to call when real-time events occur
|
|
234
|
-
* @returns Function to unsubscribe from the event
|
|
235
|
-
*/
|
|
236
|
-
onRealtimeEvent(callback: EventHandler<{
|
|
237
|
-
window: MeetingWindow;
|
|
238
|
-
event: string;
|
|
239
|
-
data: any;
|
|
240
|
-
}>): () => void;
|
|
241
|
-
/**
|
|
242
|
-
* Subscribe to recording started events
|
|
243
|
-
* @param callback Function to call when recording starts
|
|
244
|
-
* @returns Function to unsubscribe from the event
|
|
245
|
-
*/
|
|
246
|
-
onRecordingStarted(callback: EventHandler<{
|
|
247
|
-
window: MeetingWindow;
|
|
248
|
-
}>): () => void;
|
|
249
|
-
/**
|
|
250
|
-
* Subscribe to recording ended events
|
|
251
|
-
* @param callback Function to call when recording ends
|
|
252
|
-
* @returns Function to unsubscribe from the event
|
|
253
|
-
*/
|
|
254
|
-
onRecordingEnded(callback: EventHandler<{
|
|
255
|
-
window: MeetingWindow;
|
|
256
|
-
}>): () => void;
|
|
257
|
-
/**
|
|
258
|
-
* Subscribe to meeting closed events
|
|
259
|
-
* @param callback Function to call when meeting closes
|
|
260
|
-
* @returns Function to unsubscribe from the event
|
|
261
|
-
*/
|
|
262
|
-
onMeetingClosed(callback: EventHandler<{
|
|
263
|
-
window: MeetingWindow;
|
|
264
|
-
}>): () => void;
|
|
265
|
-
/**
|
|
266
|
-
* Subscribe to permissions granted events
|
|
267
|
-
* @param callback Function to call when permissions are granted
|
|
268
|
-
* @returns Function to unsubscribe from the event
|
|
269
|
-
*/
|
|
270
|
-
onPermissionsGranted(callback: EventHandler<any>): () => void;
|
|
271
169
|
}
|
|
272
170
|
export declare const recallDesktop: RecallDesktopClient;
|
|
273
171
|
export default RecallDesktopClient;
|
|
274
172
|
export type { RecallDesktopApi } from './generated/preload';
|
|
173
|
+
export type { EventTypeToPayloadMap, MeetingDetectedEvent, MeetingUpdatedEvent, MeetingClosedEvent, RecordingStartEvent, RecordingStopEvent, UploadProgressEvent, SdkStateChangeEvent, MediaCaptureStatusEvent, ParticipantCaptureStatusEvent, PermissionsGrantedEvent, PermissionStatusEvent, ErrorEvent as SdkErrorEvent, RealtimeEvent, ShutdownEvent, } from './generated/recallai-desktop-sdk';
|
|
275
174
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EACV,qBAAqB,EACrB,UAAU,IAAI,gBAAgB,EAC9B,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,CAAC,EAAE;YAAE,aAAa,CAAC,EAAE,gBAAgB,CAAA;SAAE,CAAC;KAClD;CACF;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B,EAAE,OAAO,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,e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
|
package/dist/index.esm.js
CHANGED
|
@@ -206,87 +206,6 @@ class RecallDesktopClient {
|
|
|
206
206
|
}
|
|
207
207
|
return this.api.getVersion();
|
|
208
208
|
}
|
|
209
|
-
// Convenience methods for common event types
|
|
210
|
-
/**
|
|
211
|
-
* Subscribe to meeting detection events
|
|
212
|
-
* @param callback Function to call when a meeting is detected
|
|
213
|
-
* @returns Function to unsubscribe from the event
|
|
214
|
-
*/
|
|
215
|
-
onMeetingDetected(callback) {
|
|
216
|
-
return this.addEventListener('meeting-detected', callback);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Subscribe to recording state changes
|
|
220
|
-
* @param callback Function to call when recording state changes
|
|
221
|
-
* @returns Function to unsubscribe from the event
|
|
222
|
-
*/
|
|
223
|
-
onRecordingStateChange(callback) {
|
|
224
|
-
return this.addEventListener('sdk-state-change', callback);
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Subscribe to upload progress updates
|
|
228
|
-
* @param callback Function to call when upload progress updates
|
|
229
|
-
* @returns Function to unsubscribe from the event
|
|
230
|
-
*/
|
|
231
|
-
onUploadProgress(callback) {
|
|
232
|
-
return this.addEventListener('upload-progress', callback);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Subscribe to permission status updates
|
|
236
|
-
* @param callback Function to call when permission status changes
|
|
237
|
-
* @returns Function to unsubscribe from the event
|
|
238
|
-
*/
|
|
239
|
-
onPermissionStatusChange(callback) {
|
|
240
|
-
return this.addEventListener('permission-status', callback);
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Subscribe to SDK errors
|
|
244
|
-
* @param callback Function to call when SDK errors occur
|
|
245
|
-
* @returns Function to unsubscribe from the event
|
|
246
|
-
*/
|
|
247
|
-
onError(callback) {
|
|
248
|
-
return this.addEventListener('error', callback);
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Subscribe to real-time events (transcription, participants, etc.)
|
|
252
|
-
* @param callback Function to call when real-time events occur
|
|
253
|
-
* @returns Function to unsubscribe from the event
|
|
254
|
-
*/
|
|
255
|
-
onRealtimeEvent(callback) {
|
|
256
|
-
return this.addEventListener('realtime-event', callback);
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Subscribe to recording started events
|
|
260
|
-
* @param callback Function to call when recording starts
|
|
261
|
-
* @returns Function to unsubscribe from the event
|
|
262
|
-
*/
|
|
263
|
-
onRecordingStarted(callback) {
|
|
264
|
-
return this.addEventListener('recording-started', callback);
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Subscribe to recording ended events
|
|
268
|
-
* @param callback Function to call when recording ends
|
|
269
|
-
* @returns Function to unsubscribe from the event
|
|
270
|
-
*/
|
|
271
|
-
onRecordingEnded(callback) {
|
|
272
|
-
return this.addEventListener('recording-ended', callback);
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Subscribe to meeting closed events
|
|
276
|
-
* @param callback Function to call when meeting closes
|
|
277
|
-
* @returns Function to unsubscribe from the event
|
|
278
|
-
*/
|
|
279
|
-
onMeetingClosed(callback) {
|
|
280
|
-
return this.addEventListener('meeting-closed', callback);
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Subscribe to permissions granted events
|
|
284
|
-
* @param callback Function to call when permissions are granted
|
|
285
|
-
* @returns Function to unsubscribe from the event
|
|
286
|
-
*/
|
|
287
|
-
onPermissionsGranted(callback) {
|
|
288
|
-
return this.addEventListener('permissions-granted', callback);
|
|
289
|
-
}
|
|
290
209
|
}
|
|
291
210
|
// Create and export a default instance
|
|
292
211
|
const recallDesktop = new RecallDesktopClient();
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;AAKG;
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAA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A,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE;;AAGjC;;;;AAIG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;AACb,YAAA,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC;;AAExG,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE;;AAG/B;AAED;AACO,MAAM,aAAa,GAAG,IAAI,mBAAmB;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -210,87 +210,6 @@ class RecallDesktopClient {
|
|
|
210
210
|
}
|
|
211
211
|
return this.api.getVersion();
|
|
212
212
|
}
|
|
213
|
-
// Convenience methods for common event types
|
|
214
|
-
/**
|
|
215
|
-
* Subscribe to meeting detection events
|
|
216
|
-
* @param callback Function to call when a meeting is detected
|
|
217
|
-
* @returns Function to unsubscribe from the event
|
|
218
|
-
*/
|
|
219
|
-
onMeetingDetected(callback) {
|
|
220
|
-
return this.addEventListener('meeting-detected', callback);
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Subscribe to recording state changes
|
|
224
|
-
* @param callback Function to call when recording state changes
|
|
225
|
-
* @returns Function to unsubscribe from the event
|
|
226
|
-
*/
|
|
227
|
-
onRecordingStateChange(callback) {
|
|
228
|
-
return this.addEventListener('sdk-state-change', callback);
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Subscribe to upload progress updates
|
|
232
|
-
* @param callback Function to call when upload progress updates
|
|
233
|
-
* @returns Function to unsubscribe from the event
|
|
234
|
-
*/
|
|
235
|
-
onUploadProgress(callback) {
|
|
236
|
-
return this.addEventListener('upload-progress', callback);
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Subscribe to permission status updates
|
|
240
|
-
* @param callback Function to call when permission status changes
|
|
241
|
-
* @returns Function to unsubscribe from the event
|
|
242
|
-
*/
|
|
243
|
-
onPermissionStatusChange(callback) {
|
|
244
|
-
return this.addEventListener('permission-status', callback);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Subscribe to SDK errors
|
|
248
|
-
* @param callback Function to call when SDK errors occur
|
|
249
|
-
* @returns Function to unsubscribe from the event
|
|
250
|
-
*/
|
|
251
|
-
onError(callback) {
|
|
252
|
-
return this.addEventListener('error', callback);
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Subscribe to real-time events (transcription, participants, etc.)
|
|
256
|
-
* @param callback Function to call when real-time events occur
|
|
257
|
-
* @returns Function to unsubscribe from the event
|
|
258
|
-
*/
|
|
259
|
-
onRealtimeEvent(callback) {
|
|
260
|
-
return this.addEventListener('realtime-event', callback);
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Subscribe to recording started events
|
|
264
|
-
* @param callback Function to call when recording starts
|
|
265
|
-
* @returns Function to unsubscribe from the event
|
|
266
|
-
*/
|
|
267
|
-
onRecordingStarted(callback) {
|
|
268
|
-
return this.addEventListener('recording-started', callback);
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Subscribe to recording ended events
|
|
272
|
-
* @param callback Function to call when recording ends
|
|
273
|
-
* @returns Function to unsubscribe from the event
|
|
274
|
-
*/
|
|
275
|
-
onRecordingEnded(callback) {
|
|
276
|
-
return this.addEventListener('recording-ended', callback);
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Subscribe to meeting closed events
|
|
280
|
-
* @param callback Function to call when meeting closes
|
|
281
|
-
* @returns Function to unsubscribe from the event
|
|
282
|
-
*/
|
|
283
|
-
onMeetingClosed(callback) {
|
|
284
|
-
return this.addEventListener('meeting-closed', callback);
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Subscribe to permissions granted events
|
|
288
|
-
* @param callback Function to call when permissions are granted
|
|
289
|
-
* @returns Function to unsubscribe from the event
|
|
290
|
-
*/
|
|
291
|
-
onPermissionsGranted(callback) {
|
|
292
|
-
return this.addEventListener('permissions-granted', callback);
|
|
293
|
-
}
|
|
294
213
|
}
|
|
295
214
|
// Create and export a default instance
|
|
296
215
|
const recallDesktop = new RecallDesktopClient();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;;;AAKG;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAiEH;;;AAGG;MACU,mBAAmB,CAAA;AAI9B,IAAA,WAAA,GAAA;QAHQ,IAAA,CAAA,GAAG,GAA4B,IAAI;AACnC,QAAA,IAAA,CAAA,kBAAkB,GAAG,IAAI,GAAG,EAAsB;;QAIxD,IACE,OAAO,MAAM,KAAK,WAAW;AAC5B,YAAA,MAAc,CAAC,SAAS;AACxB,YAAA,MAAc,CAAC,SAAS,CAAC,aAAa,EACvC;YACA,IAAI,CAAC,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC,aAAiC;;;AAI1E;;;AAGG;IACH,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI;;AAG1B;;;;AAIG;AACH,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;AACb,YAAA,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC;;AAExG,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;;AAG3B;;;;AAIG;AACH,IAAA,MAAM,WAAW,GAAA;AACf,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;AACb,YAAA,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC;;;QAIxG,IAAI,CAAC,uBAAuB,EAAE;AAE9B,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;;AAG/B;;;;AAIG;AACH,IAAA,MAAM,SAAS,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;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AAC,GAAG,EAAE,WAAW,CAAC;;AAG7C,QAAA,OAAO,MAAK;AACV,YAAA,WAAW,EAAE;AACb,YAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC;AACrC,SAAC;;AAGH;;AAEG;IACH,uBAAuB,GAAA;AACrB,QAAA,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,IAAI,WAAW,EAAE,CAAC;AAC7D,QAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE;;AAGjC;;;;AAIG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;AACb,YAAA,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC;;AAExG,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE;;AAG/B;AAED;AACO,MAAM,aAAa,GAAG,IAAI,mBAAmB;;;;;;"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export type RecallAiSdkEvent = RecordingStartEvent | RecordingStopEvent | UploadProgressEvent | MeetingDetectedEvent | MeetingUpdatedEvent | MeetingClosedEvent | SdkStateChangeEvent | ErrorEvent | MediaCaptureStatusEvent | ParticipantCaptureStatusEvent | PermissionsGrantedEvent | RealtimeEvent | ShutdownEvent;
|
|
2
|
+
export type EventTypeToPayloadMap = {
|
|
3
|
+
'recording-started': RecordingStartEvent;
|
|
4
|
+
'recording-ended': RecordingStopEvent;
|
|
5
|
+
'upload-progress': UploadProgressEvent;
|
|
6
|
+
'meeting-detected': MeetingDetectedEvent;
|
|
7
|
+
'meeting-updated': MeetingUpdatedEvent;
|
|
8
|
+
'meeting-closed': MeetingClosedEvent;
|
|
9
|
+
'sdk-state-change': SdkStateChangeEvent;
|
|
10
|
+
'error': ErrorEvent;
|
|
11
|
+
'media-capture-status': MediaCaptureStatusEvent;
|
|
12
|
+
'participant-capture-status': ParticipantCaptureStatusEvent;
|
|
13
|
+
'permissions-granted': PermissionsGrantedEvent;
|
|
14
|
+
'permission-status': PermissionStatusEvent;
|
|
15
|
+
'realtime-event': RealtimeEvent;
|
|
16
|
+
'shutdown': ShutdownEvent;
|
|
17
|
+
};
|
|
18
|
+
export type Permission = 'accessibility' | 'screen-capture' | 'microphone' | 'system-audio';
|
|
19
|
+
export interface RecallAiSdkWindow {
|
|
20
|
+
id: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
platform: string;
|
|
24
|
+
}
|
|
25
|
+
export interface RecallAiSdkConfig {
|
|
26
|
+
api_url?: string;
|
|
27
|
+
apiUrl?: string;
|
|
28
|
+
acquirePermissionsOnStartup?: Permission[];
|
|
29
|
+
restartOnError?: boolean;
|
|
30
|
+
dev?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface StartRecordingConfig {
|
|
33
|
+
windowId: string;
|
|
34
|
+
uploadToken: string;
|
|
35
|
+
}
|
|
36
|
+
export interface StopRecordingConfig {
|
|
37
|
+
windowId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PauseRecordingConfig {
|
|
40
|
+
windowId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ResumeRecordingConfig {
|
|
43
|
+
windowId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface UploadRecordingConfig {
|
|
46
|
+
windowId: string;
|
|
47
|
+
}
|
|
48
|
+
export interface RecordingStartEvent {
|
|
49
|
+
window: RecallAiSdkWindow;
|
|
50
|
+
}
|
|
51
|
+
export interface RecordingStopEvent {
|
|
52
|
+
window: RecallAiSdkWindow;
|
|
53
|
+
}
|
|
54
|
+
export interface UploadProgressEvent {
|
|
55
|
+
window: {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
progress: number;
|
|
59
|
+
}
|
|
60
|
+
export interface MeetingDetectedEvent {
|
|
61
|
+
window: RecallAiSdkWindow;
|
|
62
|
+
}
|
|
63
|
+
export interface MeetingUpdatedEvent {
|
|
64
|
+
window: RecallAiSdkWindow;
|
|
65
|
+
}
|
|
66
|
+
export interface MeetingClosedEvent {
|
|
67
|
+
window: RecallAiSdkWindow;
|
|
68
|
+
}
|
|
69
|
+
export interface SdkStateChangeEvent {
|
|
70
|
+
sdk: {
|
|
71
|
+
state: {
|
|
72
|
+
code: 'recording' | 'idle' | 'paused';
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface MediaCaptureStatusEvent {
|
|
77
|
+
window: RecallAiSdkWindow;
|
|
78
|
+
type: 'video' | 'audio';
|
|
79
|
+
capturing: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface ParticipantCaptureStatusEvent {
|
|
82
|
+
window: RecallAiSdkWindow;
|
|
83
|
+
type: 'video' | 'audio' | 'screenshare';
|
|
84
|
+
capturing: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface PermissionsGrantedEvent {
|
|
87
|
+
}
|
|
88
|
+
export interface PermissionStatusEvent {
|
|
89
|
+
permission: Permission;
|
|
90
|
+
status: string;
|
|
91
|
+
}
|
|
92
|
+
export interface ErrorEvent {
|
|
93
|
+
window?: RecallAiSdkWindow;
|
|
94
|
+
type: string;
|
|
95
|
+
message: string;
|
|
96
|
+
}
|
|
97
|
+
export interface RealtimeEvent {
|
|
98
|
+
window: RecallAiSdkWindow;
|
|
99
|
+
event: string;
|
|
100
|
+
data: any;
|
|
101
|
+
}
|
|
102
|
+
export interface ShutdownEvent {
|
|
103
|
+
code: number;
|
|
104
|
+
signal: string;
|
|
105
|
+
}
|
|
106
|
+
export declare function init(options: RecallAiSdkConfig): Promise<null>;
|
|
107
|
+
export declare function shutdown(): Promise<null>;
|
|
108
|
+
export declare function startRecording(config: StartRecordingConfig): Promise<null>;
|
|
109
|
+
export declare function stopRecording({ windowId }: StopRecordingConfig): Promise<null>;
|
|
110
|
+
export declare function pauseRecording({ windowId }: PauseRecordingConfig): Promise<null>;
|
|
111
|
+
export declare function resumeRecording({ windowId }: ResumeRecordingConfig): Promise<null>;
|
|
112
|
+
export declare function uploadRecording({ windowId }: UploadRecordingConfig): Promise<null>;
|
|
113
|
+
export declare function prepareDesktopAudioRecording(): Promise<string>;
|
|
114
|
+
export declare function requestPermission(permission: Permission): Promise<null>;
|
|
115
|
+
export declare function addEventListener<T extends keyof EventTypeToPayloadMap>(type: T, callback: (event: EventTypeToPayloadMap[T]) => void): void;
|
|
116
|
+
declare const RecallAiSdk: {
|
|
117
|
+
init: typeof init;
|
|
118
|
+
shutdown: typeof shutdown;
|
|
119
|
+
startRecording: typeof startRecording;
|
|
120
|
+
stopRecording: typeof stopRecording;
|
|
121
|
+
pauseRecording: typeof pauseRecording;
|
|
122
|
+
resumeRecording: typeof resumeRecording;
|
|
123
|
+
uploadRecording: typeof uploadRecording;
|
|
124
|
+
prepareDesktopAudioRecording: typeof prepareDesktopAudioRecording;
|
|
125
|
+
requestPermission: typeof requestPermission;
|
|
126
|
+
addEventListener: typeof addEventListener;
|
|
127
|
+
};
|
|
128
|
+
export default RecallAiSdk;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@todesktop/client-recall",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "ToDesktop plugin for Recall.ai Desktop Recording SDK - Client library",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "tsc --outDir dist --declaration && npm run copy-types",
|
|
14
|
-
"dev": "tsc --outDir dist --declaration --watch",
|
|
13
|
+
"build": "npm run sync-sdk-types && tsc --outDir dist --declaration && npm run copy-types",
|
|
14
|
+
"dev": "npm run sync-sdk-types && tsc --outDir dist --declaration --watch",
|
|
15
15
|
"clean": "rimraf dist",
|
|
16
|
-
"typecheck": "tsc --noEmit",
|
|
16
|
+
"typecheck": "npm run sync-sdk-types && tsc --noEmit",
|
|
17
17
|
"lint": "eslint src --ext .ts",
|
|
18
18
|
"copy-types": "copyfiles -f src/generated/*.d.ts dist/",
|
|
19
|
+
"sync-sdk-types": "node scripts/sync-sdk-types.cjs",
|
|
19
20
|
"release:patch": "npm version patch && npm publish",
|
|
20
21
|
"release:minor": "npm version minor && npm publish",
|
|
21
22
|
"release:major": "npm version major && npm publish"
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"access": "public"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
40
|
+
"@recallai/desktop-sdk": "1.1.0",
|
|
39
41
|
"rimraf": "^5.0.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|