UNPKG

@paroicms/server

Version:
42 lines (41 loc) 1.64 kB
import { type ParsedLNodeId } from "@paroicms/public-anywhere-lib"; import type { SiteContext } from "../../site-context/site-context.types.js"; export interface PartSeed { partId: string; typeName: string; nodeId: string; listName: string; parentNodeId: string; documentId: string; orderNum?: number; publishDate?: Date; language: string; ready: boolean; scheduled: boolean; } export interface PartPlaceholderSeed { typeName: string; nodeId: string; listName: string; parentNodeId: string; documentId: string; orderNum?: number; publishDate?: Date; } export declare function createPartOnNode(siteContext: SiteContext, newId: ParsedLNodeId): Promise<ParsedLNodeId>; export declare function createNodeWithPart(siteContext: SiteContext, { parentLNodeId, listName, typeName, }: { parentLNodeId: ParsedLNodeId; listName: string; typeName: string; }): Promise<ParsedLNodeId>; export declare function loadPartSeed(siteContext: Pick<SiteContext, "cn">, lNodeId: ParsedLNodeId): Promise<PartSeed>; export declare function deletePart(siteContext: SiteContext, lNodeId: ParsedLNodeId): Promise<void>; export declare function readPartSeedsOf({ cn }: SiteContext, { documentNodeId, language, }: { documentNodeId: string; language: string; }): Promise<(PartPlaceholderSeed | PartSeed)[]>; export declare function countPartsOfList({ cn }: SiteContext, { listName, parentNodeId, }: { parentNodeId: string; listName: string; }): Promise<number>; export declare function getDocumentNodeIdOfPart(siteContext: SiteContext, nodeId: string): Promise<string>;