export type DocumentStatus = 'edit' | 'lock' | 'view';
export interface DocumentMeta {
    id: string;
    path: string;
    status: DocumentStatus;
    name?: string;
    createdAt?: string;
    submittedAt?: string;
}
export interface SaveDocumentRequest {
    meta: DocumentMeta;
    content: unknown;
}
export interface SaveDocumentResult {
    submittedAt: string;
}
export type DocumentOperationRecord = {
    operationId: string;
    userId: string;
    revision: number;
    timestamp: number;
    componentsCount: number;
};
export interface SetStatusRequest {
    id: string;
    path: string;
    status: DocumentStatus;
    password?: string;
}
export interface DocumentApi {
    saveDocument(payload: SaveDocumentRequest): Promise<SaveDocumentResult>;
    setStatus(payload: SetStatusRequest): Promise<void>;
}
export interface DocumentRequestEndpoints {
    documentDetail?: string;
    documentContent?: string;
    documentVersionContent?: string;
}
export interface DocumentRequestConfig {
    baseUrl?: string;
    token?: string;
    tokenGetter?: () => string | null | undefined;
    headers?: Record<string, string>;
    mode?: RequestMode;
    credentials?: RequestCredentials;
    endpoints?: DocumentRequestEndpoints;
}
export type AuthTokenProvider = () => string | null | undefined;
export declare const setAuthProvider: (provider: AuthTokenProvider | null) => void;
export declare const getAuthToken: () => string | null;
export declare const setDocumentRequestConfig: (config: DocumentRequestConfig | null) => void;
export declare const setDocumentApi: (api: DocumentApi) => void;
export declare const documentApi: DocumentApi;
export declare const getDocumentApiBaseUrl: () => string;
export declare const createHttpDocumentApi: (baseUrl: string) => DocumentApi;
export declare const createDefaultDocumentApi: () => DocumentApi;
export declare const fetchDocumentContent: (id: string) => Promise<any>;
export declare const fetchDocumentInfo: (id: string) => Promise<any>;
export declare const fetchDocumentOperations: (id: string, limit?: number) => Promise<DocumentOperationRecord[]>;
export declare const fetchDocumentComments: (docId: string) => Promise<any[]>;
export declare const createDocumentComment: (docId: string, payload: {
    content: string;
    groupId?: string;
    rangeText?: string;
    startIndex?: number;
    endIndex?: number;
}) => Promise<any>;
export declare const replyDocumentComment: (commentId: string | number, content: string) => Promise<any>;
export declare const updateDocumentComment: (commentId: string | number, content: string) => Promise<void>;
export declare const deleteDocumentComment: (commentId: string | number) => Promise<void>;
export declare const resolveDocumentComment: (commentId: string | number, resolved: boolean) => Promise<void>;
export declare const fetchDocumentVersions: (docId: string) => Promise<any[]>;
export declare const fetchDocumentVersionContent: (docId: string, versionNum: number) => Promise<any>;
export declare const createDocumentVersion: (docId: string, name?: string) => Promise<any>;
export declare const nameDocumentVersion: (versionId: number, name: string) => Promise<void>;
export declare const restoreDocumentVersion: (docId: string, versionNum: number) => Promise<any>;
