/** Define the structure for a studio integration connection with status and provider identifiers */
interface StudioIntegrationConnection {
    status: string;
    providerId: string;
    connectorId?: string;
}
/** Define generation categories for media including image, video, speech, avatar, and transcription */
type GenerationType = 'image' | 'video' | 'speech' | 'avatar' | 'transcription';
/** Define possible states representing the progress of a generation process */
type GenerationStatus = 'pending' | 'running' | 'succeeded' | 'failed';
/** Define possible status values for a media model's availability and accessibility */
type MediaModelStatus = 'available' | 'limited' | 'unavailable';
/** Define the structure for a generation entity including its metadata and creation details */
interface Generation {
    id: string;
    type: string;
    prompt: string;
    result: string | null;
    model: string | null;
    cost: number | null;
    createdAt: Date | null;
    metadata: Record<string, unknown> | null;
}
/** Describe media model option properties including id, name, type, status, and optional provider and reason */
interface MediaModelOption {
    id: string;
    name: string;
    provider?: string;
    type: GenerationType;
    status: MediaModelStatus;
    reason?: string;
}
/** Represent media model catalog with default values, model options, and optional error message */
interface MediaModelCatalogResponse {
    defaults: Record<GenerationType, string>;
    models: Record<GenerationType, MediaModelOption[]>;
    error?: string;
}
/** Define the structure for configuring package publishing details and evaluation criteria */
interface PublishPackage {
    caption: string;
    description: string;
    mentions: string[];
    destinations: string[];
    cadence: string;
    workflowDraft: boolean;
    evalContract: {
        artifactType: string;
        deterministicChecks: string[];
    };
}
/** Define a destination for publishing content with identifiers, label, provider IDs, and fields */
interface PublishDestination {
    id: string;
    label: string;
    providerIds: string[];
    fields: string;
}
/** Provide an array of supported generation types for media and content processing */
declare const GENERATION_TYPES: readonly GenerationType[];
/** Resolve whether a string value matches a valid GenerationType */
declare function isGenerationType(value: string): value is GenerationType;
/** List available social media platforms with their publishing fields and provider identifiers */
declare const DESTINATIONS: PublishDestination[];
/** Provide an array of predefined cadence options for scheduling or approval processes */
declare const CADENCES: string[];
/** Define the minimum number of images required for processing or validation */
declare const MIN_IMAGE_COUNT = 1;
/** Define the maximum number of images allowed for upload or display */
declare const MAX_IMAGE_COUNT = 4;
/** Resolve a human-readable relative time string from a given date or return an empty string if null */
declare function relativeTime(date: Date | null): string;
/** Resolve the output directory path based on the specified generation type */
declare function outputPathFor(type: GenerationType): string;
/** Resolve the vault path string from a Generation object or return null if unavailable */
declare function generationVaultPath(generation: Generation): string | null;
/** Build a PublishPackage object from caption, description, mentions, cadence, and destinations inputs */
declare function buildPublishPackage({ caption, postDescription, mentions, cadence, destinations, }: {
    caption: string;
    postDescription: string;
    mentions: string;
    cadence: string;
    destinations: string[];
}): PublishPackage | null;
/** Determine if a value conforms to the PublishPackage structure with optional metadata fields */
declare function isPublishPackage(value: unknown): value is {
    caption?: string;
    description?: string;
    mentions?: string[];
    destinations?: string[];
    cadence?: string;
};
/** Determine if a destination has any active connections in the given list of studio integration connections */
declare function isDestinationConnected(destination: PublishDestination, connections: StudioIntegrationConnection[]): boolean;
/** Resolve selected models by applying defaults for missing or unavailable entries in the catalog */
declare function selectedModelsWithDefaults(current: Partial<Record<GenerationType, string>>, catalog: MediaModelCatalogResponse): Partial<Record<GenerationType, string>>;
/** Resolve the preferred model ID for a given generation type from the media model catalog */
declare function preferredModelId(type: GenerationType, catalog: MediaModelCatalogResponse | null): string | undefined;
/** Resolve the appropriate status message for a media model based on loading state and availability */
declare function modelMessage(model: MediaModelOption | undefined, loading: boolean, count: number): string | null;
/** Define fields required to configure and request various types of media generation */
interface GenerationRequestFields {
    workspaceId: string;
    clientRequestId: string;
    type: GenerationType;
    model: string;
    prompt: string;
    negativePrompt: string;
    outputPath: string;
    publishPackage: PublishPackage | null;
    image: {
        size: string;
        quality: string;
        count: number;
    };
    video: {
        duration: string;
        resolution: string;
        aspectRatio: string;
        referenceImageUrl: string;
    };
    speech: {
        voice: string;
    };
    avatar: {
        audioUrl: string;
        imageUrl: string;
        avatarId: string;
    };
    transcription: {
        audioUrl: string;
        language: string;
        responseFormat: string;
        temperature: string;
    };
}
/** Build the request body object for a generation operation from provided fields */
declare function buildGenerationRequestBody(fields: GenerationRequestFields): Record<string, unknown>;
/** Resolve the current status of a generation based on its metadata and result fields */
declare function generationStatus(generation: Generation): GenerationStatus;
/** Resolve and return the first user-safe error message from generation metadata or null if none exist */
declare function generationError(generation: Generation): string | null;
/** Resolve a unique merge key from a generation using batch slot or client request ID */
declare function generationMergeKey(generation: Generation): string | null;
/** Merge a new generation into the current list by replacing or prepending it based on matching keys */
declare function mergeLiveGeneration(current: Generation[], generation: Generation): Generation[];
/** Merge two Generation arrays prioritizing live entries and matching by merge keys or IDs */
declare function mergeLoaderAndLive(loader: Generation[], live: Generation[]): Generation[];
/** Determine if a generation ID indicates a local generation */
declare function isLocalGeneration(generation: Generation): boolean;
/** Resolve and return the latest batch of generations grouped and sorted by client request ID and output index */
declare function latestBatchOf(generations: Generation[]): Generation[];
/** Resolve a user-safe generation message by filtering sensitive or error-related content */
declare function userSafeGenerationMessage(message?: string): string;
/** Generate content optimistically based on input parameters and optional model and output details */
declare function optimisticGeneration({ type, prompt, model, clientRequestId, outputIndex, outputCount, }: {
    type: GenerationType;
    prompt: string;
    model?: string;
    clientRequestId: string;
    outputIndex?: number;
    outputCount?: number;
}): Generation;
/** Mark a generation as failed with updated status and error information */
declare function failedOptimisticGeneration(generation: Generation): Generation;
/** Normalize a value to a finite integer within the allowed image count range */
declare function normalizeImageCount(value: unknown): number;

export { CADENCES, DESTINATIONS, GENERATION_TYPES, type Generation, type GenerationRequestFields, type GenerationStatus, type GenerationType, MAX_IMAGE_COUNT, MIN_IMAGE_COUNT, type MediaModelCatalogResponse, type MediaModelOption, type MediaModelStatus, type PublishDestination, type PublishPackage, type StudioIntegrationConnection, buildGenerationRequestBody, buildPublishPackage, failedOptimisticGeneration, generationError, generationMergeKey, generationStatus, generationVaultPath, isDestinationConnected, isGenerationType, isLocalGeneration, isPublishPackage, latestBatchOf, mergeLiveGeneration, mergeLoaderAndLive, modelMessage, normalizeImageCount, optimisticGeneration, outputPathFor, preferredModelId, relativeTime, selectedModelsWithDefaults, userSafeGenerationMessage };
