@rnaga/wp-node
Version:
👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**
34 lines (26 loc) • 1.04 kB
TypeScript
import { z } from "zod";
import * as val from "../validators";
import type { TaxonomyObject } from "./taxonomy";
import type { PostTypeObject, PostStatusObject } from "./post";
import type { DeepPartial } from "./common";
export type Config = z.infer<typeof val.config.config>;
export type Configs = z.infer<typeof val.config.configs>;
export type ConfigTaxonomy = Omit<TaxonomyObject, "objectType" | "_builtin"> & {
objectType?: string;
};
export type ConfigPostTypeObject = Partial<
Omit<PostTypeObject[string], "_builtin" | "supports">
> & {
supports?: string[];
};
export type ConfigPostStatusObject = Omit<
PostStatusObject[string],
"label" | "_builtin"
>;
export type JSONWPConfig = DeepPartial<Exclude<Config, "database">> &
Required<{
staticAssetsPath: Config["staticAssetsPath"];
}>;
export type JSONConfigTaxonomy = Record<string, ConfigTaxonomy>;
export type JSONConfigPostTypeObject = Record<string, ConfigPostTypeObject>;
export type JSONConfigPostStatusObject = Record<string, ConfigPostStatusObject>;