import type { Queryable } from 'mysql2-async'; import { Page, type PageFilter, type VersionedService } from '../internal.js'; import type { PaginationResponse } from '@txstate-mws/graphql-server'; import type { PageData } from '@dosgato/templating'; export interface CreatePageInput extends UpdatePageInput { abovePage?: string; } export interface UpdatePageInput { publishedBy?: string; publishedAt?: string; migrate?: boolean; } export interface CreatePageExtras extends CreatePageInput { createdBy?: string; createdAt?: string; modifiedBy?: string; modifiedAt?: string; linkId?: string; } export interface UpdatePageExtras extends UpdatePageInput { modifiedBy?: string; modifiedAt?: string; } export declare function processDeletedFilters(filter: any, tableName: string, orphansJoins: Map, excludeOrphansClause: string, onlyOrphansClause: string): { binds: any[]; where: string[]; joins: Map; }; export declare function getPages(filter: PageFilter, tdb?: Queryable, pageInfo?: PaginationResponse): Promise; export declare function createVersionedPage(versionedService: VersionedService, userId: string, data: PageData & { legacyId?: string; }, db: Queryable, extra?: CreatePageExtras): Promise; export declare function createPage(versionedService: VersionedService, userId: string, parent: Page, aboveTarget: Page | undefined, name: string, data: PageData & { legacyId?: string; }, extra?: CreatePageExtras): Promise; export declare function createPageInTransaction(db: Queryable, versionedService: VersionedService, userId: string, parent: Page, aboveTarget: Page | undefined, name: string, data: PageData & { legacyId?: string; }, extra?: CreatePageExtras): Promise; export declare function movePages(pages: Page[], parent: Page, aboveTarget?: Page): Promise; export declare function copyPages(versionedService: VersionedService, userId: string, pages: Page[], parent: Page, aboveTarget?: Page, includeChildren?: boolean): Promise; export declare function deletePages(versionedService: VersionedService, pages: Page[], userInternalId: number, userId: string): Promise; export declare function publishPageDeletions(pages: Page[], userInternalId: number): Promise; export declare function undeletePages(pages: Page[]): Promise; export declare function renamePage(page: Page, name: string): Promise; export declare function ensureSearchCodes(searchcodes: string[], db: Queryable): Promise; export declare function setPageSearchCodes(page: { internalId: number; name: string; title: string; }, db: Queryable): Promise; /** * Find candidate pages whose name might match a phraseSearch query. Uses the quadgrams in * pages_searchcodes when the query has words long enough to produce them, otherwise falls back * to a LIKE. Caller is responsible for verifying the name actually matches. */ export declare function getPageNameCandidates(query: string, dataIds?: string[]): Promise<{ dataId: string; name: string; }[]>; export declare function cleanSearchCodes(): Promise; export declare function setPageIndexed(dataId: string, publishedAlso?: boolean, tdb?: Queryable): Promise;