UNPKG

@rnaga/wp-node

Version:

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

93 lines • 3.22 kB
import { Meta } from "./meta"; import { QueryUtil } from "./utils/query.util"; import type * as types from "../types"; import { Logger } from "./logger"; export declare class Comment { meta: Meta; private logger; private queryUtil; private commentId; private _props; constructor(meta: Meta, logger: Logger, queryUtil: QueryUtil, commentId: number, _props: types.Tables["comments"]); get props(): types.WpComments | undefined; withProps(props: Partial<types.Tables["comments"]>): this; post(): 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; } | undefined>; user(): Promise<{ ID: number; user_login: string; user_pass: string; user_nicename: string; user_email: string; user_registered: string | undefined; user_activation_key: string; user_status: number; display_name: string; spam: number; deleted: number; user_url?: string | undefined; } | undefined>; parent(): Promise<{ comment_ID: number; comment_post_ID: number; comment_author: string; comment_date: string | undefined; comment_date_gmt: string | undefined; comment_content: string; comment_karma: number; comment_approved: number | "trash" | "0" | "1" | "spam" | "post-trashed" | "approve" | "hold"; comment_agent: string; comment_type: string; comment_parent: number; user_id: number; display_name: string | undefined; comment_author_email?: string | undefined; comment_author_url?: string | undefined; comment_author_IP?: string | undefined; } | undefined>; children(limit?: number): Promise<{ depth: number; comment_ID: number; comment_post_ID: number; comment_author: string; comment_date: string | undefined; comment_date_gmt: string | undefined; comment_content: string; comment_karma: number; comment_approved: number | "trash" | "0" | "1" | "spam" | "post-trashed" | "approve" | "hold"; comment_agent: string; comment_type: string; comment_parent: number; user_id: number; display_name: string | undefined; comment_author_email?: string | undefined; comment_author_url?: string | undefined; comment_author_IP?: string | undefined; }[] | undefined>; countChildren(): Promise<number | undefined>; private init; } //# sourceMappingURL=comment.d.ts.map