import type { KuboRpcClient, NativeFunctions } from "../../types.js"; import { PKC } from "../../pkc/pkc.js"; import { RemoteCommunity } from "../../community/remote-community.js"; import Logger from "../../logger.js"; import type { CommunityIpfsType } from "../../community/types.js"; import type { CommentIpfsType, CommentsTableRow, CommentUpdateType, DbRepliesFormat, DbPostsFormat } from "../../publications/comment/types.js"; import { DbHandler } from "./community/db-handler.js"; export declare const getDefaultDataPath: () => string; export declare const getDefaultCommunityDbConfig: (communityAddress: string, pkc: PKC) => Promise; export declare function getThumbnailPropsOfLink(url: string, community: RemoteCommunity, proxyHttpUrl?: string): Promise<{ thumbnailUrl: string; thumbnailUrlWidth?: number; thumbnailUrlHeight?: number; } | undefined>; export declare const nativeFunctions: NativeFunctions; export declare const setNativeFunctions: (newNativeFunctions: Partial) => void; export declare const deleteOldCommunityInWindows: (subPath: string, pkc: Pick) => Promise; export declare function tryToDeleteCommunitiesThatFailedToBeDeletedBefore(pkc: PKC, log: Logger): Promise; export declare function listCommunitiesSync(pkc: PKC): string[]; export declare function importSignerIntoKuboNode(ipnsKeyName: string, ipfsKey: Uint8Array, kuboRpcClientOptions: KuboRpcClient["_clientOptions"]): Promise<{ id: string; name: string; } | undefined>; export type BackupCommunityDbOptions = { sourcePath: string; destPath: string; includePrivateKey: boolean; onProgress?: (progress: number) => void; signal?: AbortSignal; }; export declare class BackupAbortError extends Error { readonly name = "BackupAbortError"; constructor(); } export declare function backupCommunityDb(opts: BackupCommunityDbOptions): Promise<{ size: number; sha256: string; }>; export declare function moveCommunityDbToDeletedDirectory(communityAddress: string, pkc: PKC): Promise; export declare function createKuboRpcClient(kuboRpcClientOptions: KuboRpcClient["_clientOptions"]): Promise; export declare function monitorCommunitiesDirectory(pkc: PKC): Promise; export declare function calculateExpectedSignatureSize(newIpns: Omit | Omit): number; export declare function deriveCommentIpfsFromCommentTableRow(commentTableRow: CommentsTableRow): CommentIpfsType; type InlineRepliesBudgetOptions = { comment: CommentsTableRow; commentUpdateWithoutReplies: Omit; maxCommentUpdateBytes?: number; maxPageBytes?: number; minInlineRepliesBytes?: number; hardInlineRepliesLimitBytes?: number; depthBufferBaseBytes?: number; depthBufferPerDepthBytes?: number; commentUpdateHeadroomBytes?: number; pageSafetyMarginBytes?: number; inlineMetadataBytes?: number; }; export declare function calculateInlineRepliesBudget({ comment, commentUpdateWithoutReplies, maxCommentUpdateBytes, maxPageBytes, minInlineRepliesBytes, hardInlineRepliesLimitBytes, depthBufferBaseBytes, depthBufferPerDepthBytes, commentUpdateHeadroomBytes, pageSafetyMarginBytes, inlineMetadataBytes }: InlineRepliesBudgetOptions): number; export declare function deriveDbReplies(opts: { replies: CommentUpdateType["replies"]; allPageCids?: Record; }): DbRepliesFormat | undefined; export declare function deriveDbPosts(opts: { posts: CommunityIpfsType["posts"]; allPageCids?: Record; }): DbPostsFormat | undefined; export declare function resolveDbPostsCidRefs(opts: { dbPosts: DbPostsFormat; dbHandler: DbHandler; }): CommunityIpfsType["posts"]; export {};