import type { ApiClient } from '@playdrop/api-client';
import { type AssetPackUploadedLocalAsset } from '@playdrop/types';
import type { AssetPackTask, AssetSpecTask, AssetTask, OwnedAssetTask, PackOwnedAssetTask } from '../catalogue';
import type { CliTask } from '../taskUtils';
export type CurrentUserRole = 'USER' | 'CREATOR' | 'ADMIN' | null;
export type UploadedAssetInfo = {
    creatorUsername: string;
    name: string;
    revision: number;
    ref: string;
    versionNodeId: string;
};
export type UploadedAssetSpecInfo = {
    creatorUsername: string;
    name: string;
    version: string;
};
export type UploadedAppInfo = {
    creatorUsername: string;
    name: string;
    version: string;
    versionId: number;
    versionNodeId: string;
    ref: string;
};
export type UploadedPackInfo = {
    creatorUsername: string;
    name: string;
    version: string;
    versionNodeId: string;
    ref: string;
    assetRefs: string[];
    uploadedLocalAssets: AssetPackUploadedLocalAsset[];
};
export type PreparedUploadFile = {
    fieldName: string;
    filename: string;
    filePath: string;
    file: File;
    contentType: string;
    sizeBytes: number;
    sha256: string;
};
export type PackUploadPlan = {
    packKey: string;
    packTask: AssetPackTask;
    packCreator: string;
    ownedAssetKeys: string[];
    uploadKeyByAssetKey: Map<string, string>;
};
export type PackUploadPlanningResult = {
    ok: true;
    packPlansByKey: Map<string, PackUploadPlan>;
    ownedPackByAssetKey: Map<string, PackUploadPlan>;
} | {
    ok: false;
    task: CliTask;
    message: string;
};
type TaskCreatorResult = {
    requestedTaskOwner: string;
    taskCreator: string;
    creatorTargetError: string | null;
};
export declare function buildAssetKey(creatorUsername: string, name: string): string;
export declare function buildPackKey(creatorUsername: string, name: string, version: string): string;
export declare function getTaskCreatorResult(task: CliTask, defaultCreator: string, currentUserRole: CurrentUserRole): TaskCreatorResult;
export declare function parseUnversionedAssetTaskRef(rawRef: string, fallbackCreator: string): {
    creatorUsername: string;
    name: string;
} | null;
export declare function buildAssetPackUploadPlans(tasks: CliTask[], defaultCreator: string, currentUserRole: CurrentUserRole): PackUploadPlanningResult;
export declare function uploadAssetTask(client: ApiClient, task: AssetTask | OwnedAssetTask, sourceAppVersionId?: number, creatorUsername?: string, options?: {
    clearTags?: boolean;
}): Promise<UploadedAssetInfo>;
export declare function uploadAssetSpecTask(client: ApiClient, task: AssetSpecTask, creatorUsername?: string): Promise<UploadedAssetSpecInfo>;
export declare function uploadAssetPackTask(client: ApiClient, task: AssetPackTask, creatorUsername: string, uploadedAssets: Map<string, UploadedAssetInfo>, localAssetTasks: PackOwnedAssetTask[], uploadKeyByAssetKey: Map<string, string>, targetCreatorUsername?: string, options?: {
    clearTags?: boolean;
}): Promise<UploadedPackInfo>;
export {};
