import { type ApiSuccess, type ApiSuccessEmpty } from '../../types/api/success';
import { type KnexPaginateArgs } from '../../types/knex-paginate';
import { type MetricQuery } from '../../types/metricQuery';
/**
 * Ordered pipeline stages. Index position determines progression — used to
 * skip completed stages when a build is retried after a worker crash.
 * 'ready' is included as the final stage; 'error' is terminal but not a
 * stage (not reachable through normal progression).
 */
export declare const APP_VERSION_STAGE_ORDER: readonly ["pending", "sandbox", "catalog", "generating", "building", "packaging", "ready"];
export declare const APP_VERSION_TERMINAL_STATUSES: readonly ["ready", "error"];
export type AppVersionStatus = (typeof APP_VERSION_STAGE_ORDER)[number] | 'error';
export declare const isAppVersionInProgress: (status: AppVersionStatus) => boolean;
export type ApiGenerateAppResponse = ApiSuccess<{
    appUuid: string;
    version: number;
}>;
export type ApiAppImageUploadResponse = ApiSuccess<{
    imageId: string;
}>;
export declare const DATA_APP_TEMPLATES: readonly ["dashboard", "slideshow", "pdf", "custom"];
export type DataAppTemplate = (typeof DATA_APP_TEMPLATES)[number];
export type GenerateAppRequestBody = {
    prompt: string;
    template?: DataAppTemplate;
    imageId?: string;
    appUuid?: string;
    chartUuids?: string[];
    dashboardUuid?: string;
};
export type ApiPreviewTokenResponse = ApiSuccess<{
    token: string;
}>;
export type AppVersionImageResource = {
    imageId: string;
};
export type AppVersionChartResource = {
    chartUuid: string;
    chartName: string;
    chartKind: string | null;
};
export type AppVersionResources = {
    images: AppVersionImageResource[];
    charts: AppVersionChartResource[];
    dashboardName: string | null;
};
export type ApiAppImageUrlResponse = ApiSuccess<{
    imageUrl: string;
}>;
export type ApiAppVersionSummary = {
    version: number;
    prompt: string;
    status: AppVersionStatus;
    statusMessage: string | null;
    createdAt: Date;
    resources: AppVersionResources | null;
};
export type ApiGetAppResponse = ApiSuccess<{
    appUuid: string;
    name: string;
    description: string;
    createdByUserUuid: string;
    spaceUuid: string | null;
    pinnedListUuid: string | null;
    pinnedListOrder: number | null;
    versions: ApiAppVersionSummary[];
    hasMore: boolean;
}>;
export type ApiUpdateAppRequest = {
    name?: string;
    description?: string;
};
export type ApiUpdateAppResponse = ApiSuccess<{
    appUuid: string;
    name: string;
    description: string;
}>;
export type ApiCancelAppVersionResponse = ApiSuccessEmpty;
export type ApiDeleteAppResponse = ApiSuccessEmpty;
export type ApiAppSummary = {
    appUuid: string;
    name: string;
    description: string;
    projectUuid: string;
    projectName: string;
    spaceUuid: string | null;
    spaceName: string | null;
    createdAt: Date;
    lastVersionNumber: number | null;
    lastVersionStatus: AppVersionStatus | null;
};
export type ChartReference = {
    chartName: string;
    chartDescription: string;
    exploreName: string;
    metricQuery: MetricQuery;
};
export type ApiMyAppsResponse = ApiSuccess<{
    data: ApiAppSummary[];
    pagination?: KnexPaginateArgs & {
        totalPageCount: number;
        totalResults: number;
    };
}>;
//# sourceMappingURL=types.d.ts.map