UNPKG

@rnaga/wp-node

Version:

👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**

43 lines • 1.65 kB
import { Components } from "../components"; import { Post } from "../post"; import { PostUtil } from "./post.util"; import { Config } from "../../config"; import type * as types from "../../types"; import { PostsQuery } from "../../query-builder"; type RevisionColumns = Extract<types.Columns<"posts"> & keyof types.trx.PostUpsert, "post_title" | "post_content" | "post_excerpt">; export declare class RevisionUtil { private components; private config; private postUtil; static revisionFields: Record<RevisionColumns, string>; constructor(components: Components, config: Config, postUtil: PostUtil); getAutosave(postId: number, userId?: number): Promise<Post | undefined>; getList(postOrId: Post | number, fn?: (query: PostsQuery) => void): Promise<{ ID: number; post_author: number; post_date: string | undefined; post_date_gmt: string | undefined; post_content: string; post_title: string; post_excerpt: string; post_status: string; comment_status: string; ping_status: string; post_password: string; post_name: string; to_ping: string; pinged: string; post_modified: string | undefined; post_modified_gmt: string | undefined; post_content_filtered: string; post_parent: number; guid: string; menu_order: number; post_type: string; post_mime_type: string; comment_count: number; }[]>; convertToData(post: types.Tables["posts"], autosave?: boolean): Record<string, any>; } export {}; //# sourceMappingURL=revision.util.d.ts.map