import { AppContext, DeleteOptionsInput, PubSubEngine } from '@memberjunction/server';
import { CreateMJFileInput, MJFileResolver as FileResolverBase, MJFile_, UpdateMJFileInput } from '../generated/generated.js';
export declare class CreateUploadURLInput {
    FileID: string;
}
export declare class CreateFilePayload {
    File: MJFile_;
    UploadUrl: string;
    NameExists: boolean;
}
export declare class FileExt extends MJFile_ {
    DownloadUrl: string;
}
export declare class StorageObjectMetadata {
    name: string;
    path: string;
    fullPath: string;
    size: number;
    contentType: string;
    lastModified: string;
    isDirectory: boolean;
    etag?: string;
    cacheControl?: string;
}
export declare class StorageListResult {
    objects: StorageObjectMetadata[];
    prefixes: string[];
}
export declare class ListStorageObjectsInput {
    AccountID: string;
    Prefix: string;
    Delimiter?: string;
}
export declare class CreatePreAuthDownloadUrlInput {
    AccountID: string;
    ObjectName: string;
}
export declare class CreatePreAuthUploadUrlInput {
    AccountID: string;
    ObjectName: string;
    ContentType?: string;
}
export declare class CreatePreAuthUploadUrlPayload {
    UploadUrl: string;
    ProviderKey?: string;
}
export declare class DeleteStorageObjectInput {
    AccountID: string;
    ObjectName: string;
}
export declare class MoveStorageObjectInput {
    AccountID: string;
    OldName: string;
    NewName: string;
}
export declare class CopyStorageObjectInput {
    AccountID: string;
    SourceName: string;
    DestinationName: string;
}
export declare class CreateDirectoryInput {
    AccountID: string;
    Path: string;
}
export declare class CopyObjectBetweenAccountsInput {
    SourceAccountID: string;
    DestinationAccountID: string;
    SourcePath: string;
    DestinationPath: string;
}
export declare class CopyObjectBetweenAccountsPayload {
    success: boolean;
    message: string;
    bytesTransferred?: number;
    sourceAccount: string;
    destinationAccount: string;
    sourcePath: string;
    destinationPath: string;
}
export declare class SearchAcrossAccountsInput {
    AccountIDs: string[];
    Query: string;
    MaxResultsPerAccount?: number;
    FileTypes?: string[];
    SearchContent?: boolean;
}
export declare class FileSearchResultPayload {
    path: string;
    name: string;
    size: number;
    contentType: string;
    lastModified: string;
    relevance?: number;
    excerpt?: string;
    matchInFilename?: boolean;
    objectId?: string;
}
export declare class AccountSearchResultPayload {
    accountID: string;
    accountName: string;
    success: boolean;
    errorMessage?: string;
    results: FileSearchResultPayload[];
    totalMatches?: number;
    hasMore: boolean;
    nextPageToken?: string;
}
export declare class SearchAcrossAccountsPayload {
    accountResults: AccountSearchResultPayload[];
    totalResultsReturned: number;
    successfulAccounts: number;
    failedAccounts: number;
}
export declare class FileResolver extends FileResolverBase {
    /**
     * Builds UserContextOptions for storage operations that may require OAuth authentication.
     * This passes the current user's ID and context to allow the storage utilities to
     * load user-specific OAuth tokens for providers like Google Drive.
     */
    private buildUserContext;
    /**
     * Builds ExtendedUserContextOptions that includes the account entity for enterprise model.
     * This is required for OAuth providers using the Credential Engine to decrypt credentials.
     */
    private buildExtendedUserContext;
    /**
     * Loads a FileStorageAccount and its associated FileStorageProvider.
     * This is the standard way to get provider information in the enterprise model.
     * @param accountId The ID of the FileStorageAccount
     * @param context The AppContext containing provider info
     * @returns Object containing both the account and provider entities
     */
    private loadAccountAndProvider;
    CreateFile(input: CreateMJFileInput, context: AppContext, pubSub: PubSubEngine): Promise<{
        File: Record<string, unknown>;
        UploadUrl: string;
        NameExists: boolean;
    }>;
    DownloadUrl(file: MJFile_, context: AppContext): Promise<string>;
    UpdateFile(input: UpdateMJFileInput, context: AppContext, pubSub: PubSubEngine): Promise<any>;
    DeleteFile(ID: string, options: DeleteOptionsInput, context: AppContext, pubSub: PubSubEngine): Promise<any>;
    ListStorageObjects(input: ListStorageObjectsInput, context: AppContext): Promise<{
        objects: {
            lastModified: string;
            name: string;
            path: string;
            fullPath: string;
            size: number;
            contentType: string;
            isDirectory: boolean;
            etag?: string;
            cacheControl?: string;
            customMetadata?: Record<string, string>;
        }[];
        prefixes: string[];
    }>;
    CreatePreAuthDownloadUrl(input: CreatePreAuthDownloadUrlInput, context: AppContext): Promise<string>;
    CreatePreAuthUploadUrl(input: CreatePreAuthUploadUrlInput, context: AppContext): Promise<{
        UploadUrl: string;
        ProviderKey: string;
    }>;
    DeleteStorageObject(input: DeleteStorageObjectInput, context: AppContext): Promise<boolean>;
    MoveStorageObject(input: MoveStorageObjectInput, context: AppContext): Promise<boolean>;
    CopyStorageObject(input: CopyStorageObjectInput, context: AppContext): Promise<boolean>;
    CreateDirectory(input: CreateDirectoryInput, context: AppContext): Promise<boolean>;
    CopyObjectBetweenAccounts(input: CopyObjectBetweenAccountsInput, context: AppContext): Promise<CopyObjectBetweenAccountsPayload>;
    SearchAcrossAccounts(input: SearchAcrossAccountsInput, context: AppContext): Promise<SearchAcrossAccountsPayload>;
}
//# sourceMappingURL=FileResolver.d.ts.map