@paroicms/server
Version:
The ParoiCMS server
26 lines (25 loc) • 1 kB
TypeScript
import { type Tracker } from "@paroicms/internal-server-lib";
import { type ParsedLNodeId } from "@paroicms/public-anywhere-lib";
import type { SiteContext } from "../../site-context/site-context.types.js";
export interface NodeAncestorWithSlug {
nodeId: string;
typeName: string;
relativeId: string;
parentId: string;
ready: boolean;
publishDate?: Date;
slug?: string;
}
export declare function getNodeAncestorsWithSlug(siteContext: Pick<SiteContext, "cn">, tracker: Tracker, { nodeId, language }: ParsedLNodeId): Promise<NodeAncestorWithSlug[]>;
export interface NodeAncestorWithTitle {
nodeId: string;
typeName: string;
relativeId: string;
parentId: string;
ready?: boolean;
publishDate?: Date;
title?: string;
}
export declare function getNodeAncestorsForBreadcrumb(siteContext: Pick<SiteContext, "cn">, tracker: Tracker, { nodeId, language }: ParsedLNodeId, options?: {
ensurePublished?: boolean;
}): Promise<NodeAncestorWithTitle[]>;