export type BackendType = "git" | "sparql";
export interface WorkspaceConfigBase {
    id: string;
    label: string;
    description?: string;
    type: BackendType;
    createdAt?: string;
    updatedAt?: string;
}
export interface GitWorkspaceAuthPat {
    type: "pat";
    token: string;
    username?: string;
}
export interface GitWorkspaceConfig extends WorkspaceConfigBase {
    type: "git";
    remoteUrl: string;
    branch: string;
    rootPath: string;
    auth: GitWorkspaceAuthPat;
    provider?: "auto" | "github" | "gitlab" | "bitbucket" | "gitea";
    apiBaseUrl?: string;
}
export interface SparqlWorkspaceConfig extends WorkspaceConfigBase {
    type: "sparql";
    endpoint: string;
    workspaceIri: string;
    defaultGraph?: string;
}
export type WorkspaceConfig = GitWorkspaceConfig | SparqlWorkspaceConfig;
export interface FolderEntry {
    kind: "folder" | "query";
    id: string;
    label: string;
    parentId?: string;
}
export interface ReadResult {
    queryText: string;
    versionTag?: string;
    associatedEndpoint?: string;
    description?: string;
}
export interface VersionInfo {
    id: string;
    createdAt: string;
    author?: string;
    message?: string;
}
export interface WriteQueryOptions {
    message?: string;
    expectedVersionTag?: string;
    label?: string;
    folderId?: string;
    associatedEndpoint?: string;
}
export type GitQueryRef = {
    path: string;
};
export type SparqlQueryRef = {
    managedQueryIri: string;
};
export type QueryRef = GitQueryRef | SparqlQueryRef;
export type GitVersionRef = {
    commitSha?: string;
};
export type SparqlVersionRef = {
    managedQueryVersionIri: string;
};
export type VersionRef = GitVersionRef | SparqlVersionRef;
export interface ManagedTabMetadata {
    workspaceId: string;
    backendType: BackendType;
    queryRef: QueryRef;
    lastSavedVersionRef?: VersionRef;
    lastSavedTextHash?: string;
}
