@paroicms/server
Version:
The ParoiCMS server
35 lines (34 loc) • 1.6 kB
TypeScript
import { type UpdateDocumentMetadataValues } from "@paroicms/internal-anywhere-lib";
import { type ParsedLNodeId } from "@paroicms/public-anywhere-lib";
import type { SiteContext } from "../../site-context/site-context.types.js";
export declare function parseDocumentMetadataValues(jsonVal: string): UpdateDocumentMetadataValues;
export interface CreateNodeWithDocumentValues {
relativeId?: string;
slug?: string;
title?: string;
typeName: string;
}
export declare class CreateDocumentValues {
slug?: string;
title?: string;
}
export declare function updateDocument(siteContext: SiteContext, documentId: ParsedLNodeId, values: UpdateDocumentMetadataValues, options?: {
skipHistory?: boolean;
}): Promise<void>;
export declare function updateNodeRelativeId(siteContext: SiteContext, documentId: ParsedLNodeId, relativeId: string): Promise<void>;
export declare function createDocumentOnNode(siteContext: SiteContext, { language, nodeId, values, forceReady, }: {
language: string;
nodeId: string;
values?: CreateDocumentValues;
forceReady?: boolean;
}): Promise<ParsedLNodeId>;
export declare function createNodeWithDocument(siteContext: SiteContext, { parentId, values, forceReady, }: {
parentId: ParsedLNodeId;
values: CreateNodeWithDocumentValues;
forceReady?: boolean;
}): Promise<ParsedLNodeId>;
export declare function deleteNodeAndDocuments(siteContext: SiteContext, nodeId: string): Promise<void>;
export declare function deleteDocument(siteContext: SiteContext, documentId: {
language: string;
nodeId: string;
}): Promise<void>;