import type { paths } from '../platform-api.js';
type ServerProjectsResponse = paths['/v1/server/projects']['get'] extends {
    responses: {
        200: {
            content: {
                'application/json': infer T;
            };
        };
    };
} ? T : never;
export type ServerProject = ServerProjectsResponse extends {
    projects: (infer P)[];
} ? P : never;
type ServerDeployResponse = paths['/v1/server/deploys/{id}']['get'] extends {
    responses: {
        200: {
            content: {
                'application/json': infer T;
            };
        };
    };
} ? T : never;
export type ServerDeployStatus = ServerDeployResponse;
export declare function fetchServerProjects(token: string, orgId: string): Promise<ServerProject[]>;
export declare function createServerProject(token: string, orgId: string, name: string): Promise<ServerProject>;
export declare function fetchServerDeployStatus(deployId: string, token: string, orgId?: string): Promise<ServerDeployStatus>;
export declare function uploadServerDeploy(token: string, orgId: string, projectId: string, zipBuffer: Buffer, meta?: {
    projectName?: string;
    envVars?: Record<string, string>;
    disablePlatformObservability?: boolean;
}): Promise<{
    id: string;
    status: string;
}>;
export declare function pollServerDeploy(deployId: string, token: string, orgId: string, maxWaitMs?: number): Promise<ServerDeployStatus>;
export declare function getServerProjectEnv(token: string, orgId: string, projectId: string): Promise<Record<string, string>>;
export declare function updateServerProjectEnv(token: string, orgId: string, projectId: string, envVars: Record<string, string>): Promise<void>;
export declare function fetchServerProjectDetail(token: string, orgId: string, projectId: string): Promise<{
    project: {
        id: string;
        name: string;
        slug: string | null;
        organizationId: string;
        studioEnabled: boolean;
        serverEnabled: boolean;
        alwaysOn: boolean;
        providerProjectId: string | null;
        providerServiceId: string | null;
        providerEnvironmentId: string | null;
        repo: string | null;
        branch: string | null;
        lastDeployedCommitSha: string | null;
        lastDeployedImageUrl: string | null;
        lastDeployedDockerfileHash: string | null;
        latestDeployId: string | null;
        latestDeployStatus: string | null;
        instanceUrl: string | null;
        createdAt: string | null;
        updatedAt: string | null;
    };
    deploys: {
        id: string;
        projectId: string;
        organizationId: string;
        projectName: string;
        status: string;
        instanceUrl: string | null;
        error: string | null;
        startedAt: string | null;
        stoppedAt: string | null;
        createdAt: string | null;
        updatedAt: string | null;
    }[];
}>;
export declare function pauseServerProject(token: string, orgId: string, projectId: string): Promise<void>;
/**
 * Triggers a platform restart and returns the deploy id to pass to {@link pollServerDeploy}.
 * Uses `id` from the restart response when present; otherwise polls project details until `latestDeployId`
 * changes, or until the current `latestDeployId` shows an active deploy status (in-place restart without a new id).
 */
export declare function restartServerProject(token: string, orgId: string, projectId: string): Promise<string>;
export {};
//# sourceMappingURL=platform-api.d.ts.map