import { NativeModule, requireNativeModule } from 'expo-modules-core'; import { SourceConfig } from '../source'; import { OfflineDownloadRequest } from './offlineDownloadRequest'; import { BitmovinNativeOfflineEventData } from './offlineContentManagerListener'; export type OfflineModuleEvents = { onBitmovinOfflineEvent: (event: BitmovinNativeOfflineEventData) => void; }; /** * Native OfflineModule using Expo modules API. * Provides modern async/await interface while maintaining backward compatibility. */ declare class OfflineModule extends NativeModule { initializeWithConfig( nativeId: string, config: { identifier: string; sourceConfig: SourceConfig }, drmNativeId: string | undefined ): Promise; getState(nativeId: string): Promise; getOptions(nativeId: string): Promise; download(nativeId: string, request: OfflineDownloadRequest): Promise; resume(nativeId: string): Promise; suspend(nativeId: string): Promise; cancelDownload(nativeId: string): Promise; usedStorage(nativeId: string): Promise; deleteAll(nativeId: string): Promise; downloadLicense(nativeId: string): Promise; releaseLicense(nativeId: string): Promise; renewOfflineLicense(nativeId: string): Promise; release(nativeId: string): Promise; } export default requireNativeModule('OfflineModule');