UNPKG

@paroicms/server

Version:
23 lines (22 loc) 1.09 kB
import type { ReadFieldValueOrWAttached, ReadFieldValuesOrWAttached, ScFieldType } from "@paroicms/public-anywhere-lib"; import type { SiteContext } from "../../site-context/site-context.types.js"; export interface PreprocessFieldsInput { replaceWithExcerpt?: boolean; } export declare function getSiteFieldValue(siteContext: Pick<SiteContext, "cn" | "siteSchema" | "siteNodeId">, options: { fieldName: string; language?: string; publishedOnly: boolean; }): Promise<ReadFieldValueOrWAttached | undefined>; export declare function getFieldTypesByNames(siteContext: Pick<SiteContext, "siteSchema">, options: { typeName: string; fieldNames?: string[]; ignoreUnknownFieldNames?: boolean; }): ScFieldType[]; export declare function loadFieldValues(siteContext: Pick<SiteContext, "cn" | "siteSchema" | "siteNodeId">, { fieldTypes, nodeId, language, publishedOnly, preprocess, }: { fieldTypes: ScFieldType[]; nodeId: string; language?: string; publishedOnly: boolean; preprocess?: PreprocessFieldsInput; }): Promise<ReadFieldValuesOrWAttached>;