import type { AppSurface, AppType } from './app.js';
import type { AssetCategory, AssetFormat, AssetVisibility } from './asset.js';
import type { AppMetadataAssetSpecSupport } from './asset-spec.js';
import type { AppResponse, AppRuntimeAssetSummary } from './api.js';
import type { ContentLicense, ContentPermissions } from './content-license.js';
import type { AppAchievementCatalogueDefinition, AppLeaderboardCatalogueDefinition } from './player-meta.js';
export declare const APP_HOSTING_MODE_VALUES: readonly ["HOSTED", "EXTERNAL"];
export type AppHostingMode = (typeof APP_HOSTING_MODE_VALUES)[number];
export declare const DEFAULT_APP_HOSTING_MODE: AppHostingMode;
export declare function isAppHostingMode(value: unknown): value is AppHostingMode;
export declare function parseAppHostingMode(value: unknown): AppHostingMode | null;
export declare const APP_VERSION_VISIBILITY_VALUES: readonly ["PRIVATE", "PUBLIC"];
export type AppVersionVisibility = (typeof APP_VERSION_VISIBILITY_VALUES)[number];
export declare const DEFAULT_APP_VERSION_VISIBILITY: AppVersionVisibility;
export declare function isAppVersionVisibility(value: unknown): value is AppVersionVisibility;
export declare function parseAppVersionVisibility(value: unknown): AppVersionVisibility | null;
export declare const REVIEW_STATE_VALUES: readonly ["NOT_REQUIRED", "QUEUED", "RUNNING", "SUPERSEDED", "LOW_QUALITY", "PASSED", "GOOD", "EXCELLENT", "FAILED", "ERROR"];
export type ReviewState = (typeof REVIEW_STATE_VALUES)[number];
export declare function isReviewState(value: unknown): value is ReviewState;
export declare function parseReviewState(value: unknown): ReviewState | null;
export declare const APP_AUTH_MODE_VALUES: readonly ["REQUIRED", "OPTIONAL", "NONE"];
export type AppAuthMode = (typeof APP_AUTH_MODE_VALUES)[number];
export declare const DEFAULT_APP_AUTH_MODE: AppAuthMode;
export declare function isAppAuthMode(value: unknown): value is AppAuthMode;
export declare function parseAppAuthMode(value: unknown): AppAuthMode | null;
export declare const APP_CONTROLLER_MODE_VALUES: readonly ["UNSUPPORTED", "SUPPORTED", "REQUIRED"];
export type AppControllerMode = (typeof APP_CONTROLLER_MODE_VALUES)[number];
export declare const DEFAULT_APP_CONTROLLER_MODE: AppControllerMode;
export declare function isAppControllerMode(value: unknown): value is AppControllerMode;
export declare function parseAppControllerMode(value: unknown): AppControllerMode | null;
export declare const DEFAULT_APP_PREVIEWABLE = false;
export interface SemVer {
    major: number;
    minor: number;
    patch: number;
}
/**
 * Regex for validating semantic version strings.
 * Format: Major.Minor.Patch where each is a non-negative integer.
 * Leading zeros are not allowed except for 0 itself.
 */
export declare const SEMVER_REGEX: RegExp;
/**
 * Format a SemVer object as a string (e.g., "1.2.3").
 */
export declare function formatVersion(v: SemVer): string;
/**
 * Parse a version string into a SemVer object.
 * Returns null if the string is not a valid semantic version.
 */
export declare function parseVersion(s: string): SemVer | null;
/**
 * Check if a string is a valid semantic version.
 */
export declare function isValidVersion(s: string): boolean;
/**
 * Compare two SemVer objects.
 * Returns negative if a < b, positive if a > b, zero if equal.
 */
export declare function compareVersions(a: SemVer, b: SemVer): number;
/**
 * Response type for an app version.
 */
export interface AppVersionResponse {
    id: number;
    /** Formatted version string (e.g., "1.2.3") */
    version: string;
    major: number;
    minor: number;
    patch: number;
    /** Version-specific description */
    description?: string | null;
    /** Version-specific emoji */
    emoji?: string | null;
    /** Version-specific color */
    color?: string | null;
    releaseNotes?: string | null;
    visibility: AppVersionVisibility;
    hostingMode: AppHostingMode;
    authMode: AppAuthMode;
    controllerMode: AppControllerMode;
    previewable: boolean;
    createdAt: string;
    updatedAt: string;
    license: ContentLicense;
    permissions?: ContentPermissions;
    reviewState: ReviewState;
    creatorFeedback?: string | null;
    reviewStartedAt?: string | null;
    reviewCompletedAt?: string | null;
    /** Base URL for the version (folder URL for HOSTED, externalUrl for EXTERNAL) */
    assetUrl: string;
    /** Entry point file within assetUrl (HOSTED only) */
    entryPoint: string;
    surfaceTargets: AppSurface[];
    assetSpecSupport: AppMetadataAssetSpecSupport[];
    bundleSize?: number | null;
    sourceUrl?: string | null;
    hasEcs?: boolean;
    hasServer?: boolean;
    iconUrl?: string | null;
    heroPortraitUrl?: string | null;
    heroLandscapeUrl?: string | null;
    socialLandscapeUrl?: string | null;
    screenshotPortraitUrls?: string[];
    screenshotLandscapeUrls?: string[];
    videoPortraitUrls?: string[];
    videoLandscapeUrls?: string[];
}
/**
 * Minimal version info for list views.
 */
export interface AppVersionSummary {
    id: number;
    version: string;
    major: number;
    minor: number;
    patch: number;
    visibility: AppVersionVisibility;
    hostingMode: AppHostingMode;
    authMode: AppAuthMode;
    controllerMode: AppControllerMode;
    previewable: boolean;
    license: ContentLicense;
    releaseNotes?: string | null;
    reviewState: ReviewState;
    creatorFeedback?: string | null;
    reviewStartedAt?: string | null;
    reviewCompletedAt?: string | null;
    createdAt: string;
    /** Whether this is the current (live) version */
    isCurrent?: boolean;
}
/**
 * Request type for creating a new version.
 */
export interface CreateVersionRequest {
    /** Version string in Major.Minor.Patch format */
    version: string;
    releaseNotes?: string | null;
    assetSpecSupport?: AppMetadataAssetSpecSupport[];
    visibility?: AppVersionVisibility;
    license?: ContentLicense;
    remixRef?: string;
    surfaceTargets?: AppSurface[];
    entryPoint?: string;
    authMode?: AppAuthMode;
    controllerMode?: AppControllerMode;
    previewable?: boolean;
    /** Set this version as the current version (default: true) */
    setAsCurrent?: boolean;
    externalUrl?: string;
}
/**
 * Request type for updating a version.
 */
export interface UpdateVersionRequest {
    releaseNotes?: string | null;
    visibility?: AppVersionVisibility;
    license?: ContentLicense;
    /** Set this version as the current version (requires visibility: PUBLIC) */
    setAsCurrent?: boolean;
}
/**
 * Response wrapper for version list.
 */
export interface AppVersionsListResponse {
    versions: AppVersionSummary[];
}
/**
 * Response wrapper for version detail.
 */
export interface AppVersionDetailResponse {
    version: AppVersionResponse;
}
export interface AppSourceBundleResponse {
    filename: string;
    sizeBytes: number;
    checksum?: string | null;
}
/**
 * Response wrapper for version creation.
 */
export interface CreateVersionResponse {
    version: AppVersionResponse;
    versionNodeId: string;
}
export declare const APP_UPLOAD_SESSION_STATUS_VALUES: readonly ["OPEN", "FINALIZED", "ABORTED", "EXPIRED"];
export type AppUploadSessionStatus = (typeof APP_UPLOAD_SESSION_STATUS_VALUES)[number];
export declare const APP_UPLOAD_INIT_STATUS_VALUES: readonly ["created", "resume", "finalized"];
export type AppUploadInitStatus = (typeof APP_UPLOAD_INIT_STATUS_VALUES)[number];
export declare const APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES: readonly ["NOT_RUN", "PASSED", "FAILED"];
export type AppUploadLaunchCheckStatus = (typeof APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES)[number];
export interface AppUploadLaunchCheckResult {
    status: AppUploadLaunchCheckStatus;
    errorCode: string | null;
    message: string | null;
    checkedAt: string | null;
    artifactFingerprint: string | null;
}
export interface AppLaunchCheckPreviewMetadata {
    type: AppType;
    surfaceTargets: AppSurface[];
    authMode: AppAuthMode;
    controllerMode: AppControllerMode;
    previewable: boolean;
    assetSpecSupport: AppMetadataAssetSpecSupport[];
    version: string | null;
}
export interface AppUploadManifestFileEntry {
    fileKey: string;
    filename: string;
    contentType: string;
    sizeBytes: number;
    sha256: string;
}
export interface AppUploadOwnedAssetEntry {
    uploadKey: string;
    name: string;
    runtimeKey?: string;
    displayName?: string;
    description?: string | null;
    category: AssetCategory;
    subcategory: string | null;
    format: AssetFormat;
    assetSpec?: string;
    visibility?: AssetVisibility;
    license?: ContentLicense;
    remixRef?: string;
    tags?: string[];
    shopListed?: boolean;
    shopPriceCredits?: number;
    files: Array<{
        role: string;
        filename: string;
        contentType: string;
        sizeBytes: number;
        sha256: string;
    }>;
}
export interface InitializeAppUploadRequest {
    version: string;
    releaseNotes?: string;
    visibility?: AppVersionVisibility;
    license?: ContentLicense;
    surfaceTargets?: AppSurface[];
    assetSpecSupport?: AppMetadataAssetSpecSupport[];
    entryPoint?: string;
    authMode?: AppAuthMode;
    controllerMode?: AppControllerMode;
    previewable?: boolean;
    setAsCurrent?: boolean;
    skipReview?: boolean;
    tags?: string[];
    clearTags?: boolean;
    remixRef?: string;
    usesAssets?: AppUploadAssetDependencyEntry[];
    usesPacks?: string[];
    displayName?: string;
    description?: string;
    type?: string;
    emoji?: string;
    color?: string;
    achievements?: AppAchievementCatalogueDefinition[];
    leaderboards?: AppLeaderboardCatalogueDefinition[];
    externalUrl?: string;
    ownedAssets?: AppUploadOwnedAssetEntry[];
    files?: AppUploadManifestFileEntry[];
}
export type AppUploadAssetDependencyEntry = string | {
    ref: string;
    runtimeKey?: string | null;
};
export interface AppUploadSessionState {
    id: string;
    creatorUsername: string;
    appName: string;
    version: string;
    manifestHash: string;
    status: AppUploadSessionStatus;
    expiresAt?: string | null;
    uploadedFileKeys: string[];
    uploadedOwnedAssetKeys: string[];
    launchCheck: AppUploadLaunchCheckResult;
}
export interface AppUploadInitFinalizedVersion {
    version: AppVersionResponse;
    versionNodeId: string;
}
export interface InitializeAppUploadResponse {
    status: AppUploadInitStatus;
    session: AppUploadSessionState;
    finalized?: AppUploadInitFinalizedVersion;
}
export interface UploadAppSessionFileResponse {
    sessionId: string;
    fileKey: string;
    uploaded: true;
}
export interface UploadAppSessionOwnedAssetResponse {
    sessionId: string;
    uploadKey: string;
    uploaded: true;
}
export interface RecordAppUploadLaunchCheckRequest {
    status: Exclude<AppUploadLaunchCheckStatus, 'NOT_RUN'>;
    artifactFingerprint: string;
    errorCode?: string | null;
    message?: string | null;
}
export interface RecordAppUploadLaunchCheckResponse {
    session: AppUploadSessionState;
}
export interface AppUploadLaunchCheckPreviewResponse {
    session: AppUploadSessionState;
    app: AppResponse;
    localAppMetadata: AppLaunchCheckPreviewMetadata;
    assets: AppRuntimeAssetSummary[];
    launchUrl: string;
}
export interface FinalizeAppUploadResponse {
    status: 'finalized';
    session: AppUploadSessionState;
    version: AppVersionResponse;
    versionNodeId: string;
}
export interface AbortAppUploadResponse {
    success: boolean;
    sessionId: string;
    status: AppUploadSessionStatus;
}
/**
 * Response wrapper for version update.
 */
export interface UpdateVersionResponse {
    version: AppVersionResponse;
}
/**
 * Response for version deletion.
 */
export interface DeleteVersionResponse {
    success: boolean;
}
//# sourceMappingURL=version.d.ts.map