import { IMetadataProvider } from '@memberjunction/core'; import * as i0 from "@angular/core"; /** * Multi-provider note: callers running under a non-default `IMetadataProvider` * (multi-server clients) should set `service.Provider = component.ProviderToUse` * from a parent component before invoking any methods. */ export declare class FileOpenService { private client; private _provider; get Provider(): IMetadataProvider; set Provider(value: IMetadataProvider | null); private getClient; /** * Open a file from a storage provider in a new browser tab. * Generates a pre-authenticated download URL and opens it. * * @param accountId - The FileStorageAccount ID * @param path - The file path within the storage account * @param objectId - Optional provider-specific object ID (e.g., Box file ID). * When provided, uses this instead of path for faster resolution. * @returns true if the file was opened successfully */ OpenFile(accountId: string, path: string, objectId?: string): Promise; /** * Open a file from search result metadata. * Extracts accountId and objectId/path from the RawMetadata JSON string. * * @param rawMetadata - JSON string from SearchResultItem.RawMetadata * @returns true if the file was opened successfully, false if metadata was invalid or open failed */ OpenFileFromSearchResult(rawMetadata: string | undefined): Promise; /** * Open a file for preview in the provider's web viewer (if available). * Falls back to download URL if no preview URL can be constructed. * * Currently supported: * - Box.com: https://app.box.com/file/{fileId} * - Google Drive: https://drive.google.com/file/d/{fileId}/view * - SharePoint: Uses webUrl from provider data * - Dropbox: https://www.dropbox.com/preview/{path} * * @param rawMetadata - JSON string from SearchResultItem.RawMetadata * @returns true if a preview was opened */ OpenPreviewFromSearchResult(rawMetadata: string | undefined): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } //# sourceMappingURL=file-open.service.d.ts.map