@todesktop/plugin-recall
Version:
ToDesktop plugin for Recall.ai Desktop Recording SDK - Plugin package
150 lines • 5.97 kB
TypeScript
/**
* ToDesktop Recall Desktop SDK Plugin - Preload Script
*
* This file runs in the renderer process with Node.js access.
*
* ToDesktop plugins should export functions; the ToDesktop runtime will
* attach them under `window.todesktop.recallDesktop` automatically.
*/
import { ApiResponse, PluginStatus, PermissionType, RecallSdkConfig, PrepareDesktopAudioResponse, RecallSdkEventType } from './shared';
/**
* Initialize the Recall SDK
* @returns Promise resolving to initialization result
*/
export declare function initSdk(): Promise<ApiResponse>;
/**
* Shutdown the Recall SDK
* @returns Promise resolving to shutdown result
*/
export declare function shutdownSdk(): Promise<ApiResponse>;
/**
* Get current plugin and SDK status
* @returns Promise resolving to plugin status
*/
export declare function getStatus(): Promise<PluginStatus>;
/**
* Start recording a meeting
* @param windowId The meeting window ID
* @param uploadToken Upload token from your backend
* @returns Promise resolving to recording start result
*/
export declare function startRecording(windowId: string, uploadToken: string): Promise<ApiResponse>;
/**
* Stop recording a meeting
* @param windowId The meeting window ID
* @returns Promise resolving to recording stop result
*/
export declare function stopRecording(windowId: string): Promise<ApiResponse>;
/**
* Pause recording a meeting
* @param windowId The meeting window ID
* @returns Promise resolving to recording pause result
*/
export declare function pauseRecording(windowId: string): Promise<ApiResponse>;
/**
* Resume recording a meeting
* @param windowId The meeting window ID
* @returns Promise resolving to recording resume result
*/
export declare function resumeRecording(windowId: string): Promise<ApiResponse>;
/**
* Upload a completed recording
* @param windowId The meeting window ID
* @returns Promise resolving to upload start result
*/
export declare function uploadRecording(windowId: string): Promise<ApiResponse>;
/**
* Prepare desktop audio recording for non-meeting audio capture
* @returns Promise resolving to desktop audio preparation result
*/
export declare function prepareDesktopAudioRecording(): Promise<ApiResponse<PrepareDesktopAudioResponse>>;
/**
* Request a specific permission from the user
* @param permission The permission to request
* @returns Promise resolving to permission request result
*/
export declare function requestPermission(permission: PermissionType): Promise<ApiResponse>;
/**
* Update plugin configuration
* @param config Configuration updates
* @returns Promise resolving to update result
*/
export declare function setConfig(config: Partial<RecallSdkConfig>): Promise<ApiResponse>;
/**
* Get current plugin configuration
* @returns Promise resolving to current configuration
*/
export declare function getConfig(): Promise<ApiResponse<RecallSdkConfig>>;
/**
* Subscribe to SDK events
* @param eventType The type of event to listen for
* @param callback Function to call when event occurs
* @returns Function to unsubscribe from the event
*/
export declare function addEventListener(eventType: RecallSdkEventType, callback: (data: any) => void): () => void;
/**
* Get plugin version
* @returns Plugin version string
*/
export declare function getVersion(): string;
/**
* Convenience method for handling meeting detection events
* @param callback Function to call when a meeting is detected
* @returns Function to unsubscribe from the event
*/
export declare function onMeetingDetected(callback: (meetingData: any) => void): () => void;
/**
* Convenience method for handling recording state changes
* @param callback Function to call when recording state changes
* @returns Function to unsubscribe from the event
*/
export declare function onRecordingStateChange(callback: (stateData: any) => void): () => void;
/**
* Convenience method for handling upload progress updates
* @param callback Function to call when upload progress updates
* @returns Function to unsubscribe from the event
*/
export declare function onUploadProgress(callback: (progressData: any) => void): () => void;
/**
* Convenience method for handling permission status updates
* @param callback Function to call when permission status changes
* @returns Function to unsubscribe from the event
*/
export declare function onPermissionStatusChange(callback: (permissionData: any) => void): () => void;
/**
* Convenience method for handling SDK errors
* @param callback Function to call when SDK errors occur
* @returns Function to unsubscribe from the event
*/
export declare function onError(callback: (errorData: any) => void): () => void;
/**
* Convenience method for handling real-time events (transcription, participants, etc.)
* @param callback Function to call when real-time events occur
* @returns Function to unsubscribe from the event
*/
export declare function onRealtimeEvent(callback: (realtimeData: any) => void): () => void;
type ExportedApi = {
initSdk: typeof initSdk;
shutdownSdk: typeof shutdownSdk;
getStatus: typeof getStatus;
startRecording: typeof startRecording;
stopRecording: typeof stopRecording;
pauseRecording: typeof pauseRecording;
resumeRecording: typeof resumeRecording;
uploadRecording: typeof uploadRecording;
prepareDesktopAudioRecording: typeof prepareDesktopAudioRecording;
requestPermission: typeof requestPermission;
setConfig: typeof setConfig;
getConfig: typeof getConfig;
addEventListener: typeof addEventListener;
getVersion: typeof getVersion;
onMeetingDetected: typeof onMeetingDetected;
onRecordingStateChange: typeof onRecordingStateChange;
onUploadProgress: typeof onUploadProgress;
onPermissionStatusChange: typeof onPermissionStatusChange;
onError: typeof onError;
onRealtimeEvent: typeof onRealtimeEvent;
};
export type RecallDesktopApi = ExportedApi;
export {};
//# sourceMappingURL=preload.d.ts.map