import { type Kysely } from "kysely";
import type { VetraGithubAuthDB } from "./schema.js";
export type GithubConnection = {
    userDid: string;
    environmentId: string;
    repoFullName: string;
    createdAt: string;
};
/**
 * The caller's GitHub connection for one environment, or null if they have not
 * connected that environment. Keyed on (DID, environment) so a caller only ever
 * sees their own environments' connections.
 */
export declare function getConnection(db: Kysely<VetraGithubAuthDB>, did: string, environmentId: string): Promise<GithubConnection | null>;
/**
 * Save (or replace) a connection for a (DID, environment). One row per
 * environment: re-connecting the same environment replaces its installation/repo,
 * and a user can hold a separate repo for each environment they own.
 */
export declare function saveConnection(db: Kysely<VetraGithubAuthDB>, did: string, environmentId: string, repoFullName: string): Promise<GithubConnection>;
/**
 * Remove a (DID, environment) connection (e.g. after detecting the app was
 * uninstalled).
 */
export declare function deleteConnection(db: Kysely<VetraGithubAuthDB>, did: string, environmentId: string): Promise<void>;
//# sourceMappingURL=installations.d.ts.map