import { z } from 'zod';
import type { APIClient } from '../../api.ts';
export interface GithubInstallation {
    installationId: string;
    integrationId?: string;
    accountName: string;
    accountType: 'User' | 'Organization';
    avatarUrl?: string;
}
export interface GithubIntegrationStartResult {
    shortId: string;
    hasIdentity: boolean;
}
export interface GithubIntegrationStatusResult {
    connected: boolean;
    identity: {
        githubUsername: string;
        githubEmail?: string;
        avatarUrl?: string;
    } | null;
    installations: GithubInstallation[];
}
export declare function startGithubIntegration(apiClient: APIClient): Promise<GithubIntegrationStartResult>;
export declare function getGithubIntegrationStatus(apiClient: APIClient): Promise<GithubIntegrationStatusResult>;
export interface GithubDisconnectResult {
    disconnected: boolean;
}
export declare function disconnectGithubIntegration(apiClient: APIClient, installationId?: string): Promise<GithubDisconnectResult>;
export declare function pollForGithubIntegration(apiClient: APIClient, initialCount: number, timeoutMs?: number): Promise<GithubIntegrationStatusResult>;
export interface GithubRepo {
    id: number;
    name: string;
    fullName: string;
    private: boolean;
    defaultBranch: string;
    integrationId: string;
}
export declare function listGithubRepos(apiClient: APIClient, integrationId?: string): Promise<GithubRepo[]>;
export interface LinkProjectOptions {
    projectId: string;
    repoFullName: string;
    integrationId?: string;
    branch: string;
    autoDeploy: boolean;
    previewDeploy: boolean;
    directory?: string;
}
export declare function linkProjectToRepo(apiClient: APIClient, options: LinkProjectOptions): Promise<boolean>;
export declare function unlinkProjectFromRepo(apiClient: APIClient, projectId: string): Promise<boolean>;
export interface ProjectGithubStatus {
    linked: boolean;
    repoFullName?: string;
    branch?: string;
    autoDeploy?: boolean;
    previewDeploy?: boolean;
    directory?: string;
}
export declare function getProjectGithubStatus(apiClient: APIClient, projectId: string): Promise<ProjectGithubStatus>;
declare const GithubTokenDataSchema: z.ZodObject<{
    token: z.ZodString;
    username: z.ZodString;
}, z.core.$strip>;
export type GithubTokenResult = z.infer<typeof GithubTokenDataSchema>;
export declare function getGithubToken(apiClient: APIClient): Promise<GithubTokenResult>;
declare const GithubRepoCheckDataSchema: z.ZodObject<{
    available: z.ZodBoolean;
    exists: z.ZodBoolean;
    error: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type GithubRepoCheckResult = z.infer<typeof GithubRepoCheckDataSchema>;
export declare function checkGithubRepo(apiClient: APIClient, params: {
    owner: string;
    name: string;
}): Promise<GithubRepoCheckResult>;
export interface GithubRepoCreateResult {
    url: string;
    cloneUrl: string;
    fullName: string;
    private: boolean;
    created: boolean;
}
export interface GithubRepoCreateOptions {
    name: string;
    owner: string;
    private: boolean;
    description?: string;
}
export declare function createGithubRepo(apiClient: APIClient, params: GithubRepoCreateOptions): Promise<GithubRepoCreateResult>;
declare const GithubBotIdentityDataSchema: z.ZodObject<{
    name: z.ZodString;
    email: z.ZodString;
}, z.core.$strip>;
export type GithubBotIdentity = z.infer<typeof GithubBotIdentityDataSchema>;
export declare function getGithubBotIdentity(apiClient: APIClient): Promise<GithubBotIdentity>;
export {};
//# sourceMappingURL=api.d.ts.map