import { requireNativeModule } from 'expo-modules-core'; export type NativeBackgroundTaskRecord = { id: string; type: string; payload: string; title: string; description?: string; state: string; progress?: number; progressText?: string; checkpoint?: string; attempt: number; createdAt: number; updatedAt: number; }; type NativeBackgroundTasksModule = { enqueue( type: string, payload: string, title: string, description: string, allowsDuplicates: boolean, queueName: string, ): Promise; getTasks(): Promise; getTask(taskId: string): Promise; pause(taskId: string): Promise; resume(taskId: string): Promise; cancel(taskId: string): Promise; updateProgress( taskId: string, progress: number, progressText: string, ): Promise; updateCheckpoint(taskId: string, checkpoint: string): Promise; complete(taskId: string, completionText: string): Promise; fail(taskId: string, error: string, shouldRetry: boolean): Promise; scheduleLibraryUpdates( intervalHours: number, title: string, description: string, ): Promise; cancelLibraryUpdates(): Promise; scheduleAutomaticBackups( intervalHours: number, title: string, description: string, directoryUri: string, ): Promise; cancelAutomaticBackups(): Promise; }; export default requireNativeModule( 'NativeBackgroundTasks', );