UNPKG

@paroicms/server

Version:
26 lines (25 loc) 1.19 kB
import { type Tracker } from "@paroicms/internal-server-lib"; import { type ParsedLNodeId, type ScListType } from "@paroicms/public-anywhere-lib"; import type { TpPartValues } from "@paroicms/public-server-lib"; import type { SiteContext } from "../site-context/site-context.types.js"; interface BasePartData { nodeId: string; relativeId: string; parentNodeId: string; typeName: string; orderNum?: number; listName: string; publishDate: string; } export interface CompletedPartData extends BasePartData { inRightLanguage: boolean; language: string; } export declare function loadPartsOf(siteContext: SiteContext, tracker: Tracker, documentId: ParsedLNodeId, listType: ScListType): Promise<Map<string, CompletedPartData[]>>; export declare function keyOfParentPartData(item: { listName: string; parentNodeId: string; }): string; export declare function formatListOfPartValues(siteContext: SiteContext, list: CompletedPartData[], listType: ScListType): TpPartValues[]; export declare function countPartsOf(siteContext: SiteContext, tracker: Tracker, parentId: ParsedLNodeId, listType: Pick<ScListType, "listName">): Promise<number>; export {};