UNPKG

@rnaga/wp-node

Version:

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

62 lines • 1.7 kB
import { z } from "zod"; import { Config } from "../config"; import { Components } from "../core/components"; import * as val from "../validators"; import { Crud } from "./crud"; import type * as types from "../types"; import { SiteUtil } from "../core/utils/site.util"; type DataListType = (types.WpSite & { site_name: string; })[]; type SiteUpsert = z.infer<typeof val.trx.siteUpsert>; export declare class SiteCrud extends Crud { private config; private siteUtil; constructor(components: Components, config: Config, siteUtil: SiteUtil); private checkPermission; get(siteId: number): Promise<{ data: { site_meta: Record<string, any>; id: number; domain: string; path: string; }; info: undefined; }>; create(args: { domain: string; siteName: string; path: string; }, options?: { subdomainInstall?: boolean; }): Promise<{ data: { siteId: number; blogId: number; }; info: undefined; }>; update(siteId: number, data: Partial<SiteUpsert>): Promise<{ data: number; info: undefined; }>; delete(siteId: number, options?: { newSiteId?: number; }): Promise<{ data: boolean; info: undefined; }>; list(args: Partial<z.infer<typeof val.crud.siteListParams>>): Promise<{ data: DataListType; info: { pagination: { page: number; limit: number; totalPage: number; count: number; }; }; }>; } export {}; //# sourceMappingURL=site.crud.d.ts.map