@foxpage/foxpage-node-sdk
Version:
foxpage node sdk
26 lines (25 loc) • 778 B
TypeScript
import { Context, FoxpageRequestOptions, FPFile, Page, RelationInfo } from '@foxpage/foxpage-types';
export interface ParsePageOptions {
appId: string;
relationInfo?: RelationInfo & {
extendPage?: Page[];
};
req: FoxpageRequestOptions;
ctx?: Context;
locale?: string;
file: FPFile;
}
/**
* parse page
* default relations use the api opts
* support fetch relations from local too
* @param page page content
* @param opt parse page options
* @returns parsed
*/
export declare const parsePage: (page: Page, opt: ParsePageOptions) => Promise<{
parsedPage: import("@foxpage/foxpage-types").StructureNode<Record<string, any>>[];
variables: Record<string, unknown> & {
has?: ((key: string) => boolean) | undefined;
};
}>;