import type { App } from "./app.js";
import type { Field } from "./field.js";
import { SelectQuery } from "../tools/dbx/select_query.js";
import { Collection } from "./collection_model.js";
export declare const StoreKeyCachedCollections = "pbAppCachedCollections";
export declare function CollectionQuery(app: App): SelectQuery;
export declare function FindAllCollections(app: App, ...collectionTypes: string[]): Collection[];
export declare function ReloadCachedCollections(app: App): Error | null;
export declare function FindCollectionByNameOrId(app: App, nameOrId: string): Collection;
export declare function FindCachedCollectionByNameOrId(app: App, nameOrId: string): Collection;
export declare function FindCollectionReferences(app: App, collection: Collection, ...excludeIds: string[]): Map<Collection, Field[]>;
export declare function FindCachedCollectionReferences(app: App, collection: Collection, ...excludeIds: string[]): Map<Collection, Field[]>;
export declare function IsCollectionNameUnique(app: App, name: string, excludeId?: string): boolean;
export declare function TruncateCollection(app: App, collection: Collection): Promise<Error | null>;
export declare function normalizeViewQueryId(app: App, query: string): Promise<string>;
export declare function normalizeViewQueryIdSync(app: App, query: string): string;
export declare function resaveViewsWithChangedFields(app: App, ...excludeIds: string[]): Promise<Error | null>;
export declare function resaveViewsWithChangedFieldsSync(app: App, ...excludeIds: string[]): Error | null;
