import type { ResizeRule, SizeName } from "@paroicms/public-anywhere-lib";
import type { ImageVariant, RequestedImageVariantWithSize, SourceImageRef } from "../engine-types.js";
export interface TaskData {
    input: CompletedInput;
    variant: ImageVariant;
    /** key: ownerHandle */
    owners: Map<string, ResizeOwner>;
}
/**
 * Format is: {mediaId}:{rawSizeName}:${mediaType}
 */
export type TaskKey = `${string}:${SizeName}:${string}`;
/**
 * Format is: {ownerHandle}:{mediaId}:{rawResizeRule}:${mediaType}
 */
export type OwnerKey = `${string}:${string}:${ResizeRule}:${string}`;
export interface CompletedInput {
    taskKey: TaskKey;
    sourceImage: SourceImageRef;
    requestedVariant: RequestedImageVariantWithSize;
    rawResizeR: ResizeRule;
    autoCrop?: boolean;
}
export interface StoredCacheMetadata {
    imageCacheId: string;
    alreadyOwned: boolean;
}
export interface StoredCacheItem extends StoredCacheMetadata {
    variant: ImageVariant;
}
export interface TransactionCacheItem {
    variant: ImageVariant;
    stored?: StoredCacheMetadata;
    /** Can be mutated during the transaction. */
    usedBy?: CompletedInput;
}
export interface ResizeOwner {
    ownerHandle: string;
    rawResizeR: ResizeRule;
}
//# sourceMappingURL=internal.types.d.ts.map