/* eslint-disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export type EmptyArray = []; /** * Any valid `callable` in PHP. */ export type Callable = any; /** * Timestamp in MySQL DATETIME format (`YYYY-MM-DD hh:mm:ss`). */ export type WP_Date_Time = string; /** * The data for the errors contained within the error object. * * Each error is represented by a property keyed by the error code, and containing error data for that code. Any given error code can contain only one piece of error data, but the data can be of any type. */ export type WP_Error_Data = | { [k: string]: any; } | EmptyArray; /** * The name of an individual primitive capability or meta capability. */ export type WP_User_Cap_Name = string; /** * Timestamp in IETF RFC 3339 date-time format minus the timezone identifier (`YYYY-MM-DDThh:mm:ss`). */ export type WP_REST_API_Date_Time = string; /** * A collection of user application passwords in a REST API context. */ export type WP_REST_API_Application_Passwords = WP_REST_API_Application_Password[]; /** * A collection of media attachment objects in a REST API context. */ export type WP_REST_API_Attachments = WP_REST_API_Attachment[]; /** * A collection of block directory search results in a REST API context. */ export type WP_REST_API_Block_Directory_Items = WP_REST_API_Block_Directory_Item[]; /** * A collection of block pattern categories in a REST API context. */ export type WP_REST_API_Block_Pattern_Categories = WP_REST_API_Block_Pattern_Category[]; /** * A collection of block patterns in a REST API context. */ export type WP_REST_API_Block_Patterns = WP_REST_API_Block_Pattern[]; /** * A collection of block type objects in a REST API context. */ export type WP_REST_API_Block_Types = WP_REST_API_Block_Type[]; /** * A collection of reusable block objects in a REST API context. */ export type WP_REST_API_Blocks = WP_REST_API_Block[]; /** * A post category object in a REST API context. */ export type WP_REST_API_Category = WP_REST_API_Term; /** * A collection of post category objects in a REST API context. */ export type WP_REST_API_Categories = WP_REST_API_Category[]; /** * A collection of comment objects in a REST API context. */ export type WP_REST_API_Comments = WP_REST_API_Comment[]; /** * A collection of font collection objects in a REST API context. */ export type WP_REST_API_Font_Collections = WP_REST_API_Font_Collection[]; /** * A collection of font face objects in a REST API context. */ export type WP_REST_API_Font_Faces = WP_REST_API_Font_Face[]; /** * A collection of font family objects in a REST API context. */ export type WP_REST_API_Font_Families = WP_REST_API_Font_Family[]; /** * A collection of global styles variations in a REST API context. */ export type WP_REST_API_Global_Style_Variations = { /** * Version number of the global styles variation. */ version: number; /** * Global styles. */ styles?: { [k: string]: unknown; }; /** * Global settings. */ settings?: { [k: string]: unknown; }; /** * Title of the global styles variation. */ title: string; [k: string]: unknown; }[]; /** * A collection of global styles revision objects in a REST API context. */ export type WP_REST_API_Global_Styles_Revisions = WP_REST_API_Global_Styles_Revision[]; /** * A collection of menu items in a REST API context. */ export type WP_REST_API_Menu_Items = WP_REST_API_Menu_Item[]; /** * A collection of menus in a REST API context. */ export type WP_REST_API_Menus = WP_REST_API_Menu[]; /** * A navigation menu object in a REST API context. */ export type WP_REST_API_Navigation_Menu = WP_REST_API_Partial_Post_Common; /** * A collection of navigation menu objects in a REST API context. */ export type WP_REST_API_Navigation_Menus = WP_REST_API_Navigation_Menu[]; /** * A page object in a REST API context. */ export type WP_REST_API_Page = WP_REST_API_Partial_Post_Common & WP_REST_API_Partial_Post_Author & WP_REST_API_Partial_Post_Public & WP_REST_API_Partial_Post_Comments & WP_REST_API_Partial_Post_Excerpt & { /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The author of the page. */ author: unknown[]; /** * The replies to the page (comments, pingbacks, trackbacks). */ replies?: unknown[]; /** * The taxonomy terms for the page. */ "wp:term"?: unknown[]; /** * The featured image page. */ "wp:featuredmedia"?: unknown[]; /** * The parent page. */ up?: unknown[]; [k: string]: unknown; }; [k: string]: unknown; }; /** * A collection of page objects in a REST API context. */ export type WP_REST_API_Pages = WP_REST_API_Page[]; /** * A collection of patterns from the pattern directory in a REST API context. */ export type WP_REST_API_Pattern_Directory_Patterns = WP_REST_API_Pattern_Directory_Pattern[]; /** * A collection of plugins in a REST API context. */ export type WP_REST_API_Plugins = WP_REST_API_Plugin[]; /** * A post object in a REST API context. */ export type WP_REST_API_Post = WP_REST_API_Partial_Post_Common & WP_REST_API_Partial_Post_Author & WP_REST_API_Partial_Post_Public & WP_REST_API_Partial_Post_Comments & WP_REST_API_Partial_Post_Excerpt & { /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The author of the post. */ author: unknown[]; /** * The replies to the post (comments, pingbacks, trackbacks). */ replies?: unknown[]; /** * The taxonomy terms for the post. */ "wp:term"?: unknown[]; /** * The featured image post. */ "wp:featuredmedia"?: unknown[]; /** * The parent post. */ up?: unknown[]; [k: string]: unknown; }; [k: string]: unknown; }; /** * A collection of post objects in a REST API context. */ export type WP_REST_API_Posts = WP_REST_API_Post[]; /** * A post revision object in a REST API context. */ export type WP_REST_API_Revision = WP_REST_API_Partial_Revision_Common & WP_REST_API_Partial_Revision_Post_Like; /** * A collection of post revision objects in a REST API context. */ export type WP_REST_API_Revisions = WP_REST_API_Revision[]; /** * A collection of search result objects in a REST API context. */ export type WP_REST_API_Search_Results = WP_REST_API_Search_Result[]; /** * ID of sidebar. */ export type ID = string; /** * Unique name identifying the sidebar. */ export type Name = string; /** * Description of sidebar. */ export type Description = string; /** * Extra CSS class to assign to the sidebar in the Widgets interface. */ export type Class = string; /** * HTML content to prepend to each widget's HTML output when assigned to this sidebar. Default is an opening list item element. */ export type BeforeWidget = string; /** * HTML content to append to each widget's HTML output when assigned to this sidebar. Default is a closing list item element. */ export type AfterWidget = string; /** * HTML content to prepend to the sidebar title when displayed. Default is an opening h2 element. */ export type BeforeTitle = string; /** * HTML content to append to the sidebar title when displayed. Default is a closing h2 element. */ export type AfterTitle = string; /** * Status of sidebar. */ export type Status = "active" | "inactive"; /** * Nested widgets. */ export type Widgets = ( | string | { [k: string]: unknown; } )[]; /** * A collection of sidebar objects in a REST API context. */ export type WP_REST_API_Sidebars = WP_REST_API_Sidebar[]; /** * A post tag object in a REST API context. */ export type WP_REST_API_Tag = WP_REST_API_Term; /** * A collection of post tag objects in a REST API context. */ export type WP_REST_API_Tags = WP_REST_API_Tag[]; /** * A collection of theme objects in a REST API context. */ export type WP_REST_API_Themes = WP_REST_API_Theme[]; /** * A block template object in a REST API context. */ export type WP_REST_API_Template = WP_REST_API_Template_Common & { /** * Whether a template is custom. */ is_custom: boolean; /** * Plugin that registered the template. */ plugin?: string; [k: string]: unknown; }; /** * A collection of block template objects in a REST API context. */ export type WP_REST_API_Templates = WP_REST_API_Template[]; /** * A block template part object in a REST API context. */ export type WP_REST_API_Template_Part = WP_REST_API_Template_Common & { /** * Where the template part is intended for use (header, footer, etc.) */ area?: string; [k: string]: unknown; }; /** * A collection of template part objects in a REST API context. */ export type WP_REST_API_Template_Parts = WP_REST_API_Template_Part[]; /** * A block template part revision object in a REST API context. */ export type WP_REST_API_Template_Part_Revision = WP_REST_API_Template_Revision_Common & { /** * Where the template part is intended for use (header, footer, etc.) */ area?: string; [k: string]: unknown; }; /** * A collection of block template part revision objects in a REST API context. */ export type WP_REST_API_Template_Part_Revisions = WP_REST_API_Template_Part_Revision[]; /** * A block template revision object in a REST API context. */ export type WP_REST_API_Template_Revision = WP_REST_API_Template_Revision_Common & { /** * Whether the template is custom. */ is_custom: boolean; /** * Plugin that registered the template. */ plugin?: string; [k: string]: unknown; }; /** * A collection of template revision objects in a REST API context. */ export type WP_REST_API_Template_Revisions = WP_REST_API_Template_Revision[]; /** * A collection of term objects in a REST API context. */ export type WP_REST_API_Terms = WP_REST_API_Term[]; /** * UTC timestamp in IETF RFC 3339 date-time format (`YYYY-MM-DDThh:mm:ss+00:00`). */ export type WP_REST_API_Date_Time_UTC = string; /** * A collection of user objects in a REST API context. */ export type WP_REST_API_Users = WP_REST_API_User[]; /** * WordPress is open source software you can use to create a beautiful website, blog, or app. */ export interface WP { Block_Template: WP_Block_Template; Block_Type: WP_Block_Type; Block: WP_Block; Comment: WP_Comment; Error_With_Error: WP_Error_With_Error; Error_Without_Error: WP_Error_Without_Error; Error: WP_Error; Locale: WP_Locale; Network: WP_Network; Post_Type: WP_Post_Type; Post: WP_Post; Query: WP_Query; Role: WP_Role; Screen: WP_Screen; Site: WP_Site; Taxonomy: WP_Taxonomy; Term: WP_Term; User: WP_User; REST_API: { Application_Password: WP_REST_API_Application_Password; Application_Passwords: WP_REST_API_Application_Passwords; Attachment: WP_REST_API_Attachment; Attachments: WP_REST_API_Attachments; Block_Directory_Item: WP_REST_API_Block_Directory_Item; Block_Directory_Items: WP_REST_API_Block_Directory_Items; Block_Pattern_Categories: WP_REST_API_Block_Pattern_Categories; Block_Pattern_Category: WP_REST_API_Block_Pattern_Category; Block_Pattern: WP_REST_API_Block_Pattern; Block_Patterns: WP_REST_API_Block_Patterns; Block_Type: WP_REST_API_Block_Type; Block_Types: WP_REST_API_Block_Types; Block: WP_REST_API_Block; Blocks: WP_REST_API_Blocks; Categories: WP_REST_API_Categories; Category: WP_REST_API_Category; Comment: WP_REST_API_Comment; Comments: WP_REST_API_Comments; Font_Collection: WP_REST_API_Font_Collection; Font_Collections: WP_REST_API_Font_Collections; Font_Face: WP_REST_API_Font_Face; Font_Faces: WP_REST_API_Font_Faces; Font_Families: WP_REST_API_Font_Families; Font_Family: WP_REST_API_Font_Family; Global_Style_Config: WP_REST_API_Global_Style_Config; Global_Style_Variation: WP_REST_API_Global_Style_Variation; Global_Style_Variations: WP_REST_API_Global_Style_Variations; Global_Styles_Revision: WP_REST_API_Global_Styles_Revision; Global_Styles_Revisions: WP_REST_API_Global_Styles_Revisions; Menu_Item: WP_REST_API_Menu_Item; Menu_Items: WP_REST_API_Menu_Items; Menu_Location: WP_REST_API_Menu_Location; Menu_Locations: WP_REST_API_Menu_Locations; Menu: WP_REST_API_Menu; Menus: WP_REST_API_Menus; Navigation_Menu: WP_REST_API_Navigation_Menu; Navigation_Menus: WP_REST_API_Navigation_Menus; Page: WP_REST_API_Page; Pages: WP_REST_API_Pages; Pattern_Directory_Pattern: WP_REST_API_Pattern_Directory_Pattern; Pattern_Directory_Patterns: WP_REST_API_Pattern_Directory_Patterns; Plugin: WP_REST_API_Plugin; Plugins: WP_REST_API_Plugins; Post: WP_REST_API_Post; Posts: WP_REST_API_Posts; Rendered_Block: WP_REST_API_Rendered_Block; Revision: WP_REST_API_Revision; Revisions: WP_REST_API_Revisions; Search_Result: WP_REST_API_Search_Result; Search_Results: WP_REST_API_Search_Results; Settings: WP_REST_API_Settings; Sidebar: WP_REST_API_Sidebar; Sidebars: WP_REST_API_Sidebars; Status: WP_REST_API_Status; Statuses: WP_REST_API_Statuses; Tag: WP_REST_API_Tag; Tags: WP_REST_API_Tags; Taxonomies: WP_REST_API_Taxonomies; Taxonomy: WP_REST_API_Taxonomy; Term: WP_REST_API_Term; Theme: WP_REST_API_Theme; Themes: WP_REST_API_Themes; Template: WP_REST_API_Template; Templates: WP_REST_API_Templates; Template_Part: WP_REST_API_Template_Part; Template_Parts: WP_REST_API_Template_Parts; Template_Part_Revision: WP_REST_API_Template_Part_Revision; Template_Part_Revisions: WP_REST_API_Template_Part_Revisions; Template_Revision: WP_REST_API_Template_Revision; Template_Revisions: WP_REST_API_Template_Revisions; Terms: WP_REST_API_Terms; Type: WP_REST_API_Type; Types: WP_REST_API_Types; User: WP_REST_API_User; Users: WP_REST_API_Users; Error: WP_REST_API_Error; }; } /** * Core class representing a block template. */ export interface WP_Block_Template { type: string; theme: string; slug: string; id: string; title: string; content: string; description: string; source: string; origin: string | null; wp_id: number | null; status: string; has_theme_file: boolean; is_custom: boolean; author: number | null; plugin: string | null; post_types: string[] | null; area: string | null; modified: string | null; } /** * Core class representing a block type. */ export interface WP_Block_Type { /** * Block API version. */ api_version: number; /** * Block type key. */ name: string; /** * Human-readable block type label. */ title: string; /** * Block type category classification, used in search interfaces to arrange block types by category. */ category: string | null; /** * Setting parent lets a block require that it is only available when nested within the specified blocks. */ parent: string[] | null; /** * Setting ancestor makes a block available only inside the specified block types at any position of the ancestor's block subtree. */ ancestor: string[] | null; /** * Block type icon. */ icon: string | null; /** * A detailed block type description. */ description: string; /** * Additional keywords to produce block type as result in search interfaces. */ keywords: string[]; /** * The translation textdomain. */ textdomain: string | null; /** * Alternative block styles. */ styles: unknown[]; /** * Block variations. */ variations?: unknown[]; /** * Block hooks for this block type. */ block_hooks: | EmptyArray | { [k: string]: string; }; /** * Allowed child block types. */ allowed_blocks: string[] | null; /** * Block variations callback. */ variation_callback: Callable | null; /** * Block type front end only script module IDs. */ view_script_module_ids: string[]; /** * Block type front end only style handles. */ view_style_handles: string[]; /** * Custom CSS selectors for theme.json style generation. */ selectors?: | EmptyArray | { [k: string]: unknown; }; /** * Supported features. */ supports: { [k: string]: unknown; } | null; /** * Structured data for the block preview. */ example: | EmptyArray | { [k: string]: unknown; } | null; /** * Block type render callback. */ render_callback: Callable | null; /** * Block type attributes property schemas. */ attributes: | EmptyArray | { [k: string]: unknown; } | null; /** * Context provided by blocks of this type. */ provides_context: { [k: string]: string; } | null; /** * Block type editor script handle. */ editor_script?: string | null; /** * Block type editor only script handles. */ editor_script_handles: string[]; /** * Block type front end script handle. */ script?: string | null; /** * Block type front end and editor script handles. */ script_handles: string[]; /** * Public facing script handle. */ view_script?: string | null; /** * Block type front end only script handles. */ view_script_handles: string[]; /** * Block type editor style handle. */ editor_style?: string | null | false; /** * Block type editor only style handles. */ editor_style_handles: string[]; /** * Block type front end style handle. */ style?: string | null | false; /** * Block type front end and editor style handles. */ style_handles: string[]; skip_inner_blocks?: boolean; } /** * Class representing a parsed instance of a block. */ export interface WP_Block { /** * Original parsed array representation of block. */ parsed_block: WP_Block_Parsed; /** * Name of block. */ name: string; /** * Block type associated with the instance. */ block_type: WP_Block_Type; /** * Block context values. */ context: | { [k: string]: unknown; } | EmptyArray; /** * List of inner blocks (of this same class). Note that this is always empty as it represents a WP_Block_List instance which has no public properties. */ inner_blocks: EmptyArray | EmptyObject; /** * Resultant HTML from inside block comment delimiters after removing inner blocks. */ inner_html: string; /** * List of string fragments and null markers where inner blocks were found. */ inner_content: (string | null)[]; /** * Attributes validated against the current block schema, populating defaulted and missing values. Lazily loaded, so not always present. */ attributes?: { [k: string]: any; }; } /** * Original parsed array representation of block. */ export interface WP_Block_Parsed { /** * Name of block. */ blockName: string; attrs: | { [k: string]: any; } | EmptyArray; /** * List of inner blocks (of this same class). */ innerBlocks: WP_Block_Parsed[]; /** * Resultant HTML from inside block comment delimiters after removing inner blocks. */ innerHTML: string; /** * List of string fragments and null markers where inner blocks were found. */ innerContent: (string | null)[]; } export interface EmptyObject {} /** * Core class used to organize comments as instantiated objects with defined members. */ export interface WP_Comment { /** * Comment ID. * * A numeric string, for compatibility reasons. */ comment_ID: string; /** * ID of the post the comment is associated with. * * A numeric string, for compatibility reasons. */ comment_post_ID: string; /** * Comment author name. */ comment_author: string; /** * Comment author email address. */ comment_author_email: string | ""; /** * Comment author URL. */ comment_author_url: string | ""; /** * Comment author IP address (IPv4 format). */ comment_author_IP: string | ""; /** * Comment date in YYYY-MM-DD HH:MM:SS format. */ comment_date: WP_Date_Time; /** * Comment GMT date in YYYY-MM-DD HH::MM:SS format. */ comment_date_gmt: WP_Date_Time; /** * Comment content. */ comment_content: string; /** * Comment karma count. * * A numeric string, for compatibility reasons. */ comment_karma: string; /** * Comment approval status. */ comment_approved: "0" | "1" | "spam" | "trash"; /** * Comment author HTTP user agent. */ comment_agent: string; /** * Comment type. */ comment_type: WP_Comment_Type_Name | string; /** * Parent comment ID. * * A numeric string, for compatibility reasons. */ comment_parent: string; /** * Comment author ID. * * A numeric string, for compatibility reasons. */ user_id: string; } /** * WordPress Error class. * * Represents a WP_Error object that contains at least one error. */ export interface WP_Error_With_Error { /** * Stores the list of errors. */ errors: WP_Error_Messages; /** * Stores the list of data for error codes. */ error_data: WP_Error_Data; } /** * The messages for the errors contained within the error object. * * Each error is represented by a property keyed by the error code, and containing an array of message strings for that code. Any given error code usually contains only one message, but can contain more. */ export interface WP_Error_Messages { [k: string]: string[]; } /** * Empty WordPress Error class. * * Represents a WP_Error object that contains no errors. */ export interface WP_Error_Without_Error { /** * Stores the list of errors. */ errors: EmptyArray; /** * Stores the list of data for error codes. */ error_data: EmptyArray; } /** * WordPress Error class. * * Container for checking for WordPress errors and error messages. Many core WordPress functions pass this class in the event of an error. */ export interface WP_Error { /** * Stores the list of errors. */ errors: EmptyArray | WP_Error_Messages; /** * Stores the list of data for error codes. */ error_data: WP_Error_Data; } /** * Core class used to store translated data for a locale. */ export interface WP_Locale { /** * Stores the translated strings for the full weekday names. */ weekday: string[]; /** * Stores the translated strings for the one character weekday names. */ weekday_initial: { [k: string]: string; }; /** * Stores the translated strings for the abbreviated weekday names. */ weekday_abbrev: { [k: string]: string; }; /** * The separator string used for localizing list item separator. */ list_item_separator: string; /** * Stores the translated strings for the full month names. */ month: { "10": string; "11": string; "12": string; "01": string; "02": string; "03": string; "04": string; "05": string; "06": string; "07": string; "08": string; "09": string; }; /** * Stores the translated strings for the month names in genitive case, if the locale specifies. */ month_genitive: { "10": string; "11": string; "12": string; "01": string; "02": string; "03": string; "04": string; "05": string; "06": string; "07": string; "08": string; "09": string; }; /** * Stores the translated strings for the abbreviated month names. */ month_abbrev: { [k: string]: string; }; /** * Stores the translated strings for 'am', 'pm', 'AM', and 'PM'. */ meridiem: { am: string; pm: string; AM: string; PM: string; }; /** * The text direction of the locale language. */ text_direction: "ltr" | "rtl"; /** * The thousands separator and decimal point values used for localizing numbers. */ number_format: { thousands_sep: string; decimal_point: string; }; /** * The word count type of the locale language. */ word_count_type: "words" | "characters_excluding_spaces" | "characters_including_spaces"; } /** * Core class used for interacting with a multisite network. */ export interface WP_Network { /** * Domain of the network. */ domain: string; /** * Path of the network. */ path: string; /** * Domain used to set cookies for this network. */ cookie_domain: string; /** * Name of this network. * * Named "site" vs. "network" for legacy reasons. */ site_name: string; } /** * Core class used for interacting with post types. */ export interface WP_Post_Type { /** * Post type key. */ name: WP_Post_Type_Name | string; /** * Name of the post type shown in the menu. Usually plural. */ label: string; /** * Labels object for this post type. */ labels: WP_Post_Type_Labels; /** * A short descriptive summary of what the post type is. */ description: string; /** * Whether a post type is intended for use publicly either via the admin interface or by front-end users. */ public: boolean; /** * Whether the post type is hierarchical. */ hierarchical: boolean; /** * Whether to exclude posts with this post type from front end search results. */ exclude_from_search: boolean; /** * Whether queries can be performed on the front end for the post type as part of `parse_request()`. */ publicly_queryable: boolean; /** * Whether this post type is embeddable. */ embeddable: boolean; /** * Whether to generate and allow a UI for managing this post type in the admin. */ show_ui: boolean; /** * Where to show the post type in the admin menu. */ show_in_menu: boolean | string; /** * Makes this post type available for selection in navigation menus. */ show_in_nav_menus: boolean; /** * Makes this post type available via the admin bar. */ show_in_admin_bar: boolean; /** * The position in the menu order the post type should appear. */ menu_position: number | null; /** * The URL or reference to the icon to be used for this menu. Can include a URL, a base64-encoded SVG using a data URI, the name of a Dashicons helper class, or 'none'. Can include null for post types without a UI. */ menu_icon: string | "none" | null; /** * The string to use to build the read, edit, and delete capabilities. */ capability_type: string; /** * Whether to use the internal default meta capability handling. */ map_meta_cap: boolean; /** * Provide a callback function that sets up the meta boxes for the edit form. */ register_meta_box_cb: Callable | null; /** * An array of taxonomy identifiers that will be registered for the post type. */ taxonomies: (WP_Taxonomy_Name | string)[]; /** * Whether there should be post type archives, or if a string, the archive slug to use. */ has_archive: boolean | string; /** * Sets the query_var key for this post type. */ query_var: string | boolean; /** * Whether to allow this post type to be exported. */ can_export: boolean; /** * Whether to delete posts of this type when deleting a user. */ delete_with_user: boolean | null; /** * Array of blocks to use as the default initial state for an editor session. */ template: unknown[]; /** * Whether the block template should be locked if $template is set. */ template_lock: false | "all" | "insert"; /** * Whether this post type is a native or 'built-in' post_type. */ _builtin: boolean; /** * URL segment to use for edit link of this post type. */ _edit_link: string; /** * Post type capabilities. */ cap: WP_Post_Type_Caps; /** * Triggers the handling of rewrites for this post type. */ rewrite: WP_Post_Type_Rewrite | boolean; /** * The features supported by the post type. */ supports?: { [k: string]: unknown; }; /** * Whether this post type should appear in the REST API. */ show_in_rest: boolean; /** * The base path for this post type's REST API endpoints. */ rest_base: string | boolean; /** * The namespace for this post type's REST API endpoints. */ rest_namespace: string | boolean; /** * The controller for this post type's REST API endpoints. */ rest_controller_class: string | false; /** * The controller for this post type's revisions REST API endpoints. */ revisions_rest_controller_class: string | false; /** * The controller for this post type's autosave REST API endpoints. */ autosave_rest_controller_class: string | false; /** * The controller instance for this post type's REST API endpoints. */ rest_controller: { [k: string]: unknown; }; /** * The controller instance for this post type's revisions REST API endpoints. */ revisions_rest_controller: { [k: string]: unknown; }; /** * The controller instance for this post type's autosave REST API endpoints. */ autosave_rest_controller: { [k: string]: unknown; }; /** * A flag to register the post type REST API controller after its associated autosave / revisions controllers, instead of before. Registration order affects route matching priority. */ late_route_registration: boolean; } /** * Post type labels. */ export interface WP_Post_Type_Labels { name: string; singular_name: string; add_new: string; add_new_item: string; edit_item: string; new_item: string; view_item: string; view_items: string; search_items: string; not_found: string; not_found_in_trash: string; parent_item_colon: string | null; all_items: string; archives: string; attributes: string; insert_into_item: string; uploaded_to_this_item: string; featured_image: string; set_featured_image: string; remove_featured_image: string; use_featured_image: string; filter_items_list: string; filter_by_date: string; items_list_navigation: string; items_list: string; item_published: string; item_published_privately: string; item_reverted_to_draft: string; item_trashed: string; item_scheduled: string; item_updated: string; item_link: string; item_link_description: string; menu_name: string; name_admin_bar: string; template_name?: string; } /** * Post type capabilities. */ export interface WP_Post_Type_Caps { edit_post: WP_User_Cap_Name; read_post: WP_User_Cap_Name; delete_post: WP_User_Cap_Name; edit_posts: WP_User_Cap_Name; edit_others_posts: WP_User_Cap_Name; delete_posts: WP_User_Cap_Name; publish_posts: WP_User_Cap_Name; read_private_posts: WP_User_Cap_Name; read?: WP_User_Cap_Name; delete_private_posts?: WP_User_Cap_Name; delete_published_posts?: WP_User_Cap_Name; delete_others_posts?: WP_User_Cap_Name; edit_private_posts?: WP_User_Cap_Name; edit_published_posts?: WP_User_Cap_Name; create_posts: WP_User_Cap_Name; } /** * Post type rewrite rule definition. */ export interface WP_Post_Type_Rewrite { /** * Customize the permastruct slug. */ slug: string; /** * Whether the permastruct should be prepended with WP_Rewrite::$front. */ with_front: boolean; /** * Whether the feed permastruct should be built for this post type. */ feeds: boolean; /** * Whether the permastruct should provide for pagination. */ pages: boolean; /** * Endpoint mask to assign. */ ep_mask: number; [k: string]: unknown; } /** * Core class used to implement the WP_Post object. */ export interface WP_Post { /** * Post ID. */ ID: number; /** * ID of post author. * * A numeric string, for compatibility reasons. */ post_author: string; /** * The post's local publication time. */ post_date: WP_Date_Time; /** * The post's GMT publication time. */ post_date_gmt: WP_Date_Time; /** * The post's content. */ post_content: string; /** * The post's title. */ post_title: string; /** * The post's excerpt. */ post_excerpt: string; /** * The post's status. */ post_status: WP_Post_Status_Name | string; /** * Whether comments are allowed. */ comment_status: WP_Post_Comment_Status_Name; /** * Whether pings are allowed. */ ping_status: WP_Post_Comment_Status_Name; /** * The post's password in plain text. */ post_password: "" | string; /** * The post's slug. */ post_name: string; /** * URLs queued to be pinged. */ to_ping: "" | string; /** * URLs that have been pinged. */ pinged: "" | string; /** * The post's local modified time. */ post_modified: WP_Date_Time; /** * The post's GMT modified time. */ post_modified_gmt: WP_Date_Time; /** * A utility DB field for post content. */ post_content_filtered: string; /** * ID of a post's parent post. */ post_parent: number; /** * The unique identifier for a post, not necessarily a URL, used as the feed GUID. */ guid: string; /** * A field used for ordering posts. */ menu_order: number; /** * The post's type, like post or page. */ post_type: WP_Post_Type_Name | string; /** * An attachment's mime type. */ post_mime_type: string | ""; /** * Cached comment count. * * A numeric string, for compatibility reasons. */ comment_count: string; /** * Stores the post object's sanitization level. */ filter: WP_Object_Filter_Context | null; } /** * The WordPress Query class. */ export interface WP_Query { /** * Query vars set by the user. */ query: { [k: string]: unknown; } | null; /** * Query vars, after parsing. */ query_vars: | { [k: string]: unknown; } | EmptyArray; /** * Taxonomy query, as passed to get_tax_sql(). */ tax_query: { [k: string]: unknown; } | null; /** * Metadata query container. */ meta_query: | { [k: string]: unknown; } | false; /** * Date query container. */ date_query: | { [k: string]: unknown; } | false; /** * Holds the data for a single object that is queried. Holds the contents of a post, page, category, attachment. */ queried_object?: WP_Post | WP_Post_Type | WP_Term | WP_User | null; /** * The ID of the queried object. */ queried_object_id?: number | null; /** * SQL for the database query. */ request: string | null; /** * Array of post objects or post IDs. */ posts: WP_Post[] | number[] | EmptyArray | null; /** * The number of posts for the current query. */ post_count: number; /** * Index of the current item in the loop. */ current_post: number; /** * Whether the caller is before the loop. */ before_loop: boolean; /** * Whether the loop has started and the caller is in the loop. */ in_the_loop: boolean; /** * The current post. */ post?: WP_Post | null; /** * The list of comments for current post. */ comments?: WP_Comment[] | EmptyArray | null; /** * The number of comments for the posts. */ comment_count?: number; /** * The index of the comment in the comment loop. */ current_comment: number; /** * Current comment object. */ comment?: WP_Comment | null; /** * The number of found posts for the current query. If limit clause was not used, equals $post_count. */ found_posts: number; /** * The number of pages. */ max_num_pages: number; /** * The number of comment pages. */ max_num_comment_pages: number; /** * Signifies whether the current query is for a single post. */ is_single: boolean; /** * Signifies whether the current query is for a preview. */ is_preview: boolean; /** * Signifies whether the current query is for a page. */ is_page: boolean; /** * Signifies whether the current query is for an archive. */ is_archive: boolean; /** * Signifies whether the current query is for a date archive. */ is_date: boolean; /** * Signifies whether the current query is for a year archive. */ is_year: boolean; /** * Signifies whether the current query is for a month archive. */ is_month: boolean; /** * Signifies whether the current query is for a day archive. */ is_day: boolean; /** * Signifies whether the current query is for a specific time. */ is_time: boolean; /** * Signifies whether the current query is for an author archive. */ is_author: boolean; /** * Signifies whether the current query is for a category archive. */ is_category: boolean; /** * Signifies whether the current query is for a tag archive. */ is_tag: boolean; /** * Signifies whether the current query is for a taxonomy archive. */ is_tax: boolean; /** * Signifies whether the current query is for a search. */ is_search: boolean; /** * Signifies whether the current query is for a feed. */ is_feed: boolean; /** * Signifies whether the current query is for a comment feed. */ is_comment_feed: boolean; /** * Signifies whether the current query is for trackback endpoint call. */ is_trackback: boolean; /** * Signifies whether the current query is for the site homepage. */ is_home: boolean; /** * Signifies whether the current query is for the Privacy Policy page. */ is_privacy_policy: boolean; /** * Signifies whether the current query couldn't find anything. */ is_404: boolean; /** * Signifies whether the current query is for an embed. */ is_embed: boolean; /** * Signifies whether the current query is for a paged result and not for the first page. */ is_paged: boolean; /** * Signifies whether the current query is for an administrative interface page. */ is_admin: boolean; /** * Signifies whether the current query is for an attachment page. */ is_attachment: boolean; /** * Signifies whether the current query is for an existing single post of any post type (post, attachment, page, custom post types). */ is_singular: boolean; /** * Signifies whether the current query is for the robots.txt file. */ is_robots: boolean; /** * Signifies whether the current query is for the favicon.ico file. */ is_favicon: boolean; /** * Signifies whether the current query is for the page_for_posts page. Basically, the homepage if the option isn't set for the static homepage. */ is_posts_page: boolean; /** * Signifies whether the current query is for a post type archive. */ is_post_type_archive: boolean; /** * Set if post thumbnails are cached */ thumbnails_cached: boolean; } /** * Core class used to implement the WP_Term object. */ export interface WP_Term { /** * Term ID. */ term_id: number; /** * The term's name. */ name: string; /** * The term's slug. */ slug: string; /** * The term's term_group. */ term_group: number; /** * Term Taxonomy ID. */ term_taxonomy_id: number; /** * The term's taxonomy name. */ taxonomy: WP_Taxonomy_Name | string; /** * The term's description. */ description: string; /** * ID of a term's parent term. */ parent: number; /** * Cached object count for this term. */ count: number; /** * Term ID. Only present if the term object has passed through `_make_cat_compat()`. */ cat_ID?: number; /** * Cached object count for this term. Only present if the term object has passed through `_make_cat_compat()`. */ category_count?: number; /** * The term's description. Only present if the term object has passed through `_make_cat_compat()`. */ category_description?: string; /** * The term's name. Only present if the term object has passed through `_make_cat_compat()`. */ cat_name?: string; /** * The term's slug. Only present if the term object has passed through `_make_cat_compat()`. */ category_nicename?: string; /** * ID of a term's parent term. Only present if the term object has passed through `_make_cat_compat()`. */ category_parent?: number; /** * Stores the term object's sanitization level. */ filter: WP_Object_Filter_Context | null; } /** * Core class used to implement the WP_User object. */ export interface WP_User { /** * The user's ID. */ ID: number; /** * All capabilities the user has, including individual and role based. */ allcaps: WP_User_Caps; /** * User metadata option name. */ cap_key: string; /** * The individual capabilities the user has been given. * * See the allcaps property for a complete list of caps that the user has. */ caps: WP_User_Caps; /** * User data container. */ data: WP_User_Data; /** * The filter context applied to user data fields. */ filter: WP_Object_Filter_Context | null; /** * The roles the user is part of. */ roles: (WP_User_Role_Name | string)[]; } /** * A dictionary of user capabilities. * * Property names represent a capability name and boolean values represent whether the user has that capability. */ export interface WP_User_Caps { [k: string]: boolean; } /** * User data container. */ export interface WP_User_Data { /** * The user's ID. * * A numeric string, for compatibility reasons. */ ID?: string; /** * The user's deletion status. Only used on Multisite. */ deleted?: "0" | "1"; /** * The user's full display name. */ display_name?: string; /** * The user's spam status. Only used on Multisite. */ spam?: "0" | "1"; /** * The user's activation key. Be careful not to expose this in your application. */ user_activation_key?: string; /** * The user's email address. */ user_email?: string | ""; /** * The user's login name. */ user_login?: string; /** * The user's name as used in their author archive URL slug. */ user_nicename?: string; /** * The one-way hash of the user's password. */ user_pass?: string; /** * The user's registration date. */ user_registered?: WP_Date_Time; /** * The user's status. This field does not appear to be used by WordPress core. */ user_status?: "0"; /** * The user's URL. */ user_url?: string | ""; } /** * Core class used to extend the user roles API. */ export interface WP_Role { /** * Role name. */ name: WP_User_Role_Name | string; /** * List of capabilities the role contains. */ capabilities: WP_User_Caps; } /** * Core class used to implement an admin screen API. */ export interface WP_Screen { /** * Any action associated with the screen. */ action: string; /** * The base type of the screen. */ base: string; /** * The unique ID of the screen. */ id: string; /** * Whether the screen is in the network admin. */ is_network: boolean; /** * Whether the screen is in the user admin. */ is_user: boolean; /** * The base menu parent. */ parent_base: string | null; /** * The parent_file for the screen per the admin menu system. */ parent_file: string | null; /** * The post type associated with the screen, if any. */ post_type: string; /** * The taxonomy associated with the screen, if any. */ taxonomy: string; /** * The help tab data associated with the screen, if any. */ is_block_editor: boolean; } /** * Core class used for interacting with a multisite site. */ export interface WP_Site { /** * Site ID. * * A numeric string, for compatibility reasons. */ blog_id: string; /** * Domain of the site. */ domain: string; /** * Path of the site. */ path: string; /** * The ID of the site's parent network. * * Named "site" vs. "network" for legacy reasons. An individual site's "site" is its network. * * A numeric string, for compatibility reasons. */ site_id: string; /** * The date on which the site was created or registered. */ registered: WP_Date_Time; /** * The date and time on which site settings were last updated. */ last_updated: WP_Date_Time; /** * Whether the site should be treated as public. * * A numeric string, for compatibility reasons. */ public: "0" | "1"; /** * Whether the site should be treated as archived. * * A numeric string, for compatibility reasons. */ archived: "0" | "1"; /** * Whether the site should be treated as mature. * * A numeric string, for compatibility reasons. */ mature: "0" | "1"; /** * Whether the site should be treated as spam. * * A numeric string, for compatibility reasons. */ spam: "0" | "1"; /** * Whether the site should be treated as deleted. * * A numeric string, for compatibility reasons. */ deleted: "0" | "1"; /** * The language pack associated with this site. * * A numeric string, for compatibility reasons. */ lang_id: string; } /** * Core class used for interacting with taxonomies. */ export interface WP_Taxonomy { /** * Taxonomy key. */ name: WP_Taxonomy_Name | string; /** * Name of the taxonomy shown in the menu. Usually plural. */ label: string; /** * Labels object for this taxonomy. */ labels: WP_Taxonomy_Labels; /** * A short descriptive summary of what the taxonomy is for. */ description: string; /** * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users. */ public: boolean; /** * Whether the taxonomy is publicly queryable. */ publicly_queryable: boolean; /** * Whether the taxonomy is hierarchical. */ hierarchical: boolean; /** * Whether to generate and allow a UI for managing terms in this taxonomy in the admin. */ show_ui: boolean; /** * Whether to show the taxonomy in the admin menu. */ show_in_menu: boolean; /** * Whether the taxonomy is available for selection in navigation menus. */ show_in_nav_menus: boolean; /** * Whether to list the taxonomy in the tag cloud widget controls. */ show_tagcloud: boolean; /** * Whether to show the taxonomy in the quick/bulk edit panel. */ show_in_quick_edit: boolean; /** * Whether to display a column for the taxonomy on its post type listing screens. */ show_admin_column: boolean; /** * The callback function for the meta box display. */ meta_box_cb: Callable | false; /** * The callback function for sanitizing taxonomy data saved from a meta box. */ meta_box_sanitize_cb: Callable | false; /** * An array of object types this taxonomy is registered for. */ object_type: (WP_Post_Type_Name | string)[]; /** * Capabilities for this taxonomy. */ cap: WP_Taxonomy_Caps; /** * Rewrites information for this taxonomy. */ rewrite: WP_Taxonomy_Rewrite | boolean; /** * Query var string for this taxonomy. */ query_var: string | boolean; /** * Function that will be called when the count is updated. */ update_count_callback: Callable | ""; /** * Whether this taxonomy should appear in the REST API. * * Default false. If true, standard endpoints will be registered with respect to $rest_base and $rest_controller_class. */ show_in_rest: boolean; /** * The base path for this taxonomy's REST API endpoints. */ rest_base: string | boolean; /** * The namespace for this taxonomy's REST API endpoints. */ rest_namespace: string | boolean; /** * The controller for this taxonomy's REST API endpoints. * * Custom controllers must extend WP_REST_Controller. */ rest_controller_class: string | false; /** * The controller instance for this taxonomy's REST API endpoints. */ rest_controller: null; /** * The default term name for this taxonomy. If you pass an array you have to set 'name' and optionally 'slug' and 'description'. */ default_term: | { name: string; slug?: string; description?: string; } | string | null; /** * Whether terms in this taxonomy should be sorted in the order they are provided to `wp_set_object_terms()`. * * Use this in combination with `'orderby' => 'term_order'` when fetching terms. */ sort: boolean | null; /** * Array of arguments to automatically use inside `wp_get_object_terms()` for this taxonomy. */ args: { [k: string]: unknown; } | null; /** * Whether it is a built-in taxonomy. */ _builtin: boolean; } /** * Taxonomy labels. */ export interface WP_Taxonomy_Labels { name: string; name_field_description: string | null; singular_name: string; search_items: string; popular_items: string | null; all_items: string; archives?: string; parent_item: string | null; parent_item_colon: string | null; parent_field_description: string | null; slug_field_description: string | null; desc_field_description: string | null; edit_item: string; view_item: string; update_item: string; add_new_item: string; new_item_name: string; separate_items_with_commas: string | null; add_or_remove_items: string | null; choose_from_most_used: string | null; not_found: string; no_terms: string; filter_by_item: string | null; items_list_navigation: string; items_list: string; most_used: string; back_to_items: string; item_link: string; item_link_description: string; menu_name: string; name_admin_bar: string; template_name: string; } /** * Taxonomy capabilities. */ export interface WP_Taxonomy_Caps { manage_terms: WP_User_Cap_Name; edit_terms: WP_User_Cap_Name; delete_terms: WP_User_Cap_Name; assign_terms: WP_User_Cap_Name; } /** * Taxonomy rewrite rule definition. */ export interface WP_Taxonomy_Rewrite { /** * Should the permastruct be prepended with WP_Rewrite::$front. */ with_front: boolean; /** * Either hierarchical rewrite tag or not. */ hierarchical: boolean; /** * Assign an endpoint mask. */ ep_mask: number; /** * Customize the permastruct slug. */ slug: string; [k: string]: unknown; } /** * A user application password in a REST API context. */ export interface WP_REST_API_Application_Password { /** * The unique identifier for the application password. */ uuid: string; /** * A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace. */ app_id: string; /** * The name of the application password. */ name: string; /** * The generated password. Only available after adding an application. */ password?: string; /** * The GMT date the application password was created. */ created: WP_REST_API_Date_Time; /** * The GMT date the application password was last used. */ last_used: WP_REST_API_Date_Time | null; /** * The IP address the application password was last used by. */ last_ip: string | null; _links?: WP_REST_API_Object_Links; [k: string]: unknown; } /** * The relations for the object and its properties. */ export interface WP_REST_API_Object_Links { [k: string]: { href: string; embeddable?: boolean; [k: string]: unknown; }[]; } /** * A media attachment object in a REST API context. */ export interface WP_REST_API_Attachment { /** * The date the attachment was published, in the site's timezone. */ date: WP_REST_API_Date_Time; /** * The date the attachment was published, as GMT. */ date_gmt: WP_REST_API_Date_Time; /** * The globally unique identifier for the attachment. */ guid: { /** * GUID for the attachment, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * GUID for the attachment, transformed for display. */ rendered: string; }; /** * Unique identifier for the attachment. */ id: number; /** * The ID of the featured media for the post. */ featured_media: number; /** * URL to the attachment. */ link: string; /** * The date the attachment was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time; /** * The date the attachment was last modified, as GMT. */ modified_gmt: WP_REST_API_Date_Time; /** * An alphanumeric identifier for the attachment unique to its type. */ slug: string; /** * A named status for the attachment. */ status: WP_Post_Status_Name | string; /** * Type of Post for the attachment. */ type: WP_Post_Type_Name.attachment; /** * Alternative text to display when attachment is not displayed. */ alt_text: string; /** * The attachment caption. */ caption: { /** * Caption for the attachment, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML caption for the attachment, transformed for display. */ rendered: string; }; /** * The attachment description. */ description: { /** * Description for the attachment, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML description for the attachment, transformed for display. */ rendered: string; }; /** * Attachment type. */ media_type: "image" | "file"; /** * The attachment MIME type. */ mime_type: string; /** * Details about the media file, specific to its type. */ media_details: { [k: string]: unknown; }; /** * The ID for the associated post of the attachment. */ post: number | null; /** * URL to the original attachment file. */ source_url: string; /** * List of the missing image sizes of the attachment. Only present when using the 'edit' context. */ missing_image_sizes?: string[]; /** * Permalink template for the attachment. Only present when using the 'edit' context and the post type is public. */ permalink_template?: string; /** * Slug automatically generated from the attachment title. Only present when using the 'edit' context and the post type is public. */ generated_slug?: string; /** * An array of the class names for the post container element. */ class_list: string[]; /** * The title for the attachment. */ title: { /** * Title for the attachment, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML title for the attachment, transformed for display. */ rendered: string; }; /** * The ID for the author of the attachment. */ author: number; /** * Whether or not comments are open on the attachment. */ comment_status: WP_Post_Comment_Status_Name; /** * Whether or not the attachment can be pinged. */ ping_status: WP_Post_Comment_Status_Name; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; /** * The theme file to use to display the attachment. */ template: string; _links: WP_REST_API_Object_Links; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The author of the post. */ author: unknown[]; /** * The featured image post. */ "wp:featuredmedia"?: unknown[]; /** * The attachment parent post. */ "wp:attached-to"?: unknown[]; [k: string]: unknown; }; [k: string]: unknown; } /** * A block directory search result in a REST API context. */ export interface WP_REST_API_Block_Directory_Item { /** * The block name, in namespace/block-name format. */ name: string; /** * The block title, in human readable format. */ title: string; /** * A short description of the block, in human readable format. */ description: string; /** * The block slug. */ id: string; /** * The star rating of the block. */ rating: number; /** * The number of ratings. */ rating_count: number; /** * The number sites that have activated this block. */ active_installs: number; /** * The average rating of blocks published by the same author. */ author_block_rating: number; /** * The number of blocks published by the same author. */ author_block_count: number; /** * The WordPress.org username of the block author. */ author: string; /** * The block icon. */ icon: string; /** * The date when the block was last updated. */ last_updated: string; /** * The date when the block was last updated, in fuzzy human readable format. */ humanized_updated: string; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A block pattern category in a REST API context. */ export interface WP_REST_API_Block_Pattern_Category { /** * The category name. */ name: string; /** * The category label, in human readable format. */ label: string; /** * The category description, in human readable format. */ description?: string; [k: string]: unknown; } /** * A block pattern in a REST API context. */ export interface WP_REST_API_Block_Pattern { /** * The pattern name, in namespace/pattern-name format. */ name: string; /** * The pattern title, in human readable format. */ title: string; /** * The pattern content. */ content: string; /** * The pattern detailed description. */ description?: string; /** * The pattern viewport width for inserter preview. */ viewport_width?: number; /** * Determines whether the pattern is visible in inserter. */ inserter?: boolean; /** * The pattern category slugs. */ categories?: string[]; /** * The pattern keywords. */ keywords?: string[]; /** * Block types that the pattern is intended to be used with. */ block_types?: string[]; /** * Where the pattern comes from e.g. core. */ source?: | "core" | "plugin" | "theme" | "pattern-directory/core" | "pattern-directory/theme" | "pattern-directory/featured"; /** * An array of post types that the pattern is restricted to be used with. */ post_types?: string[]; /** * An array of template types where the pattern fits. */ template_types?: string[]; [k: string]: unknown; } /** * A block type object in a REST API context. */ export interface WP_REST_API_Block_Type { /** * Version of block API. */ api_version: number; /** * Title of block type. */ title: string; /** * Unique name identifying the block type. */ name: string; /** * Description of block type. */ description: string; /** * Icon of block type. */ icon: string | null; /** * Block attributes. */ attributes: | EmptyArray | { [k: string]: { [k: string]: unknown; }; } | null; /** * Ancestor blocks. */ ancestor?: string[] | null; /** * Context provided by blocks of this type. */ provides_context: | EmptyArray | { [k: string]: string; }; /** * Context values inherited by blocks of this type. */ uses_context: string[]; /** * Custom CSS selectors for theme.json style generation. */ selectors?: | EmptyArray | { [k: string]: unknown; }; /** * Block supports. */ supports: { [k: string]: unknown; }; /** * Block category. */ category: string | null; /** * Is the block dynamically rendered. */ is_dynamic: boolean; /** * Editor script handles. */ editor_script_handles?: string[] | null; /** * Public facing and editor script handles. */ script_handles?: string[] | null; /** * Public facing script handles. */ view_script_handles?: string[] | null; /** * Editor style handles. */ editor_style_handles?: string[] | null; /** * Public facing and editor style handles. */ style_handles?: string[] | null; /** * Editor script handle. DEPRECATED: Use `editor_script_handles` instead. */ editor_script: string | null; /** * Public facing and editor script handle. DEPRECATED: Use `script_handles` instead. */ script: string | null; /** * Public facing script handle. DEPRECATED: Use `view_script_handles` instead. */ view_script: string | null; /** * Editor style handle. DEPRECATED: Use `editor_style_handles` instead. */ editor_style: string | null; /** * Public facing and editor style handle. DEPRECATED: Use `style_handles` instead. */ style: string | null; /** * Block style variations. */ styles: { /** * Unique name identifying the style. */ name: string; /** * Indicates whether the current variation is the default one. */ isDefault?: boolean; /** * The human-readable label for the style. */ label?: string; /** * Inline CSS code that registers the CSS class required for the style. */ inline_style?: string; /** * Contains the handle that defines the block style. */ style_handle?: string; }[]; /** * Block variations. */ variations: { [k: string]: unknown; }[]; /** * Block hooks for this block type. */ block_hooks: | EmptyArray | { [k: string]: string; }; /** * Allowed child block types. */ allowed_blocks: string[] | null; /** * Block type front end only script module IDs. */ view_script_module_ids: string[]; /** * Block type front end only style handles. */ view_style_handles: string[]; /** * Public text domain. */ textdomain: string | null; /** * Parent blocks. */ parent: string[] | null; /** * Block keywords. */ keywords: string[]; /** * Block example. */ example: | EmptyArray | { /** * The attributes used in the example. */ attributes?: { [k: string]: unknown; }; /** * The list of inner blocks used in the example. */ innerBlocks?: { /** * The name of the inner block. */ name?: string; /** * The attributes of the inner block. */ attributes?: { [k: string]: unknown; }; /** * A list of the inner block's own inner blocks. This is a recursive definition following the parent innerBlocks schema. */ innerBlocks?: unknown[]; [k: string]: unknown; }[]; [k: string]: unknown; } | null; _links?: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A reusable block object in a REST API context. */ export interface WP_REST_API_Block { /** * The date the block was published, in the site's timezone. */ date: WP_REST_API_Date_Time; /** * The date the block was published, as GMT. */ date_gmt: WP_REST_API_Date_Time; /** * The globally unique identifier for the block. */ guid: { /** * GUID for the block, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * GUID for the block, transformed for display. */ rendered: string; }; /** * Unique identifier for the block. */ id: number; /** * URL to the block. */ link: string; /** * The date the block was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time; /** * The date the block was last modified, as GMT. */ modified_gmt: WP_REST_API_Date_Time; /** * An alphanumeric identifier for the block unique to its type. */ slug: string; /** * A named status for the block. */ status: WP_Post_Status_Name | string; /** * Type of Post for the block. */ type: WP_Post_Type_Name.wp_block; /** * A password to protect access to the content and excerpt. Only present when using the 'edit' context. */ password?: string; /** * The title for the block. */ title: { /** * Title for the block, as it exists in the database. */ raw: string; }; /** * The content for the block. */ content: { /** * Content for the block, as it exists in the database. */ raw: string; /** * Version of the content block format used by the block. Only present when using the 'edit' context. */ block_version?: number; /** * Whether the content is protected with a password. */ protected: boolean; }; /** * The excerpt for the block. */ excerpt?: { /** * Excerpt for the block, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML content for the post excerpt, transformed for display. */ rendered: string; /** * Whether the content is protected with a password. */ protected: boolean; }; wp_pattern_sync_status: "" | "partial" | "unsynced"; /** * Pattern categories. */ wp_pattern_category?: { [k: string]: unknown; }; /** * The theme file to use to display the block. */ template?: string; /** * Meta fields. */ meta?: | EmptyArray | { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A taxonomy term object in a REST API context. */ export interface WP_REST_API_Term { /** * Unique identifier for the term. */ id: number; /** * Number of published posts for the term. */ count: number; /** * HTML description of the term. */ description: string; /** * URL of the term. */ link: string; /** * HTML title for the term. */ name: string; /** * An alphanumeric identifier for the term unique to its type. */ slug: string; /** * Type attribution for the term. */ taxonomy: WP_Taxonomy_Name | string; /** * The parent term ID. Only present for hierarchical taxonomies. */ parent?: number; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A comment object in a REST API context. */ export interface WP_REST_API_Comment { /** * Unique identifier for the object. */ id: number; /** * The ID of the user object, if author was a user. */ author: number; /** * Email address for the comment author. Only present when using the 'edit' context. */ author_email?: string | ""; /** * IP address for the comment author. Only present when using the 'edit' context. */ author_ip?: string | ""; /** * Display name for the comment author. */ author_name: string; /** * URL for the comment author. */ author_url: string | ""; /** * User agent for the comment author. Only present when using the 'edit' context. */ author_user_agent?: string; /** * The content for the comment. */ content: { /** * Content for the comment, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML content for the comment, transformed for display. */ rendered?: string; }; /** * The date the comment was published, in the site's timezone. */ date: WP_REST_API_Date_Time; /** * The date the comment was published, as GMT. */ date_gmt: WP_REST_API_Date_Time; /** * URL to the comment. */ link: string; /** * The ID for the parent of the comment. */ parent: number; /** * The ID of the associated post object. */ post: number; /** * State of the comment. */ status: WP_Comment_Status_Name | string; /** * Type of comment. */ type: WP_Comment_Type_Name | string; /** * Avatar URLs for the comment author. */ author_avatar_urls?: { /** * Avatar URL with image size of 24 pixels. */ "24": string; /** * Avatar URL with image size of 48 pixels. */ "48": string; /** * Avatar URL with image size of 96 pixels. */ "96": string; /** * Avatar URL with image of another size. */ [k: string]: string; }; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The author of the comment. */ author?: unknown[]; /** * The associated post. */ up?: unknown[]; [k: string]: unknown; }; [k: string]: unknown; } /** * A font collection object in a REST API context. */ export interface WP_REST_API_Font_Collection { /** * Unique identifier for the font collection. */ slug: string; /** * The name for the font collection. */ name: string; /** * The description for the font collection. */ description: string; /** * The font families for the font collection. */ font_families: { font_family_settings: WP_Font_Family_Settings; categories?: string[]; }[]; /** * The categories for the font collection. */ categories: { name: string; slug: string; }[]; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * Font family settings. */ export interface WP_Font_Family_Settings { name: string; fontFamily: string; slug: string; fontFace?: WP_Font_Face[]; preview?: string; } /** * A font face. */ export interface WP_Font_Face { /** * URL to a preview image of the font. */ preview?: string; /** * CSS font-family value. */ fontFamily: string; /** * CSS font-style value. */ fontStyle?: string; /** * List of available font weights, separated by a space. */ fontWeight?: string | number; /** * CSS font-display value. */ fontDisplay?: "auto" | "block" | "fallback" | "swap" | "optional"; /** * Paths or URLs to the font files. */ src: string | string[]; /** * CSS font-stretch value. */ fontStretch?: string; /** * CSS ascent-override value. */ ascentOverride?: string; /** * CSS descent-override value. */ descentOverride?: string; /** * CSS font-variant value. */ fontVariant?: string; /** * CSS font-feature-settings value. */ fontFeatureSettings?: string; /** * CSS font-variation-settings value. */ fontVariationSettings?: string; /** * CSS line-gap-override value. */ lineGapOverride?: string; /** * CSS size-adjust value. */ sizeAdjust?: string; /** * CSS unicode-range value. */ unicodeRange?: string; } /** * A font face object in a REST API context. */ export interface WP_REST_API_Font_Face { /** * Unique identifier for the font face. */ id: number; /** * Version of the theme.json schema used for the typography settings. */ theme_json_version: number; /** * The ID for the parent font family of the font face. */ parent: number; /** * font-face declaration in theme.json format. */ font_face_settings: { /** * Unique identifier for the font family. */ id?: number; /** * Version of the theme.json schema used for the typography settings. */ theme_json_version?: number; /** * The IDs of the child font faces in the font family. */ font_faces?: number[]; font_family_settings?: WP_Font_Family_Settings; [k: string]: unknown; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A font family object in a REST API context. */ export interface WP_REST_API_Font_Family { /** * Unique identifier for the font family. */ id: number; /** * Version of the theme.json schema used for the typography settings. */ theme_json_version: number; /** * The IDs of the child font faces in the font family. */ font_faces: number[]; font_family_settings: WP_Font_Family_Settings; _links: WP_REST_API_Object_Links; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The associated font faces. */ font_faces?: unknown[]; [k: string]: unknown; }; [k: string]: unknown; } /** * A theme's global style config in a REST API context. */ export interface WP_REST_API_Global_Style_Config { /** * Global styles. */ styles: { [k: string]: unknown; }; /** * Global settings. */ settings: { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A global styles variation item in a REST API context. */ export interface WP_REST_API_Global_Style_Variation { /** * ID of global styles variation. */ id: number; /** * Global styles. */ styles: { [k: string]: unknown; }; /** * Global settings. */ settings: { [k: string]: unknown; }; /** * Title of the global styles variation. */ title: | string | { /** * Title for the global styles variation, as it exists in the database. */ raw?: string; /** * HTML title for the post, transformed for display. */ rendered?: string; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A global styles revision object in a REST API context. */ export interface WP_REST_API_Global_Styles_Revision { /** * Global settings for the revision. */ settings: { [k: string]: unknown; }; /** * Global styles for the revision. */ styles: { [k: string]: unknown; }; /** * The ID for the author of the revision. */ author: number; /** * The date the revision was published, in the site's timezone. */ date: WP_REST_API_Date_Time; /** * The date the revision was published, as GMT. */ date_gmt: WP_REST_API_Date_Time; /** * Unique identifier for the revision. */ id: number; /** * The date the revision was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time; /** * The date the revision was last modified, as GMT. */ modified_gmt: WP_REST_API_Date_Time; /** * The ID for the parent of the revision. */ parent: number; } /** * A menu item in a REST API context. */ export interface WP_REST_API_Menu_Item { /** * The title for the menu item. */ title: | string | { /** * Title for the menu item, as it exists in the database. */ raw?: string; /** * HTML title for the menu item, transformed for display. */ rendered?: string; }; /** * Unique identifier for the menu item. */ id: number; /** * The singular label used to describe this type of menu item. */ type_label: string; /** * The family of objects originally represented. */ type: "taxonomy" | "post_type" | "post_type_archive" | "custom"; /** * A named status for the menu item. */ status: "publish" | "future" | "draft" | "pending" | "private"; /** * The ID for the parent of the menu item. */ parent: number; /** * Text for the title attribute of the link element for this menu item. */ attr_title: string; /** * Class names for the link element of this menu item. */ classes: string[]; /** * The description of this menu item. */ description: string; /** * The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0. */ menu_order: number; /** * The type of object originally represented, such as "category", "post", or "attachment". */ object: string; /** * The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories. */ object_id: number; /** * The target attribute of the link element for this menu item. */ target: "_blank" | ""; /** * The URL to which this menu item points. */ url: string; /** * The XFN relationship expressed in the link of this menu item. */ xfn: string[]; /** * Whether the menu item represents an object that no longer exists. */ invalid: boolean; /** * The terms assigned to the menu item in the nav_menu taxonomy. */ menus: number; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The taxonomy terms for the nav menu item. */ "wp:term": unknown[]; [k: string]: unknown; }; [k: string]: unknown; } /** * A menu location in a REST API context. */ export interface WP_REST_API_Menu_Location { /** * The name of the menu location. */ name: string; /** * The description of the menu location. */ description: string; /** * The ID of the assigned menu. */ menu: number; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A collection of menu locations in a REST API context. */ export interface WP_REST_API_Menu_Locations { [k: string]: WP_REST_API_Menu_Location; } /** * A menu in a REST API context. */ export interface WP_REST_API_Menu { /** * Unique identifier for the menu. */ id: number; /** * HTML description of the menu. */ description: string; /** * HTML title for the menu. */ name: string; /** * An alphanumeric identifier for the menu unique to its type. */ slug: string; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; /** * The locations assigned to the menu. */ locations: string[]; /** * Whether to automatically add top level pages to this menu. */ auto_add: boolean; _links: WP_REST_API_Object_Links; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The menu locations. */ "wp:menu-location": unknown[]; [k: string]: unknown; }; [k: string]: unknown; } /** * Common post properties */ interface WP_REST_API_Partial_Post_Common { /** * The date the post was published, in the site's timezone. */ date: WP_REST_API_Date_Time; /** * The date the post was published, as GMT. */ date_gmt: WP_REST_API_Date_Time; /** * The globally unique identifier for the post. */ guid: { /** * GUID for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * GUID for the post, transformed for display. */ rendered: string; }; /** * Unique identifier for the post. */ id: number; /** * URL to the post. */ link: string; /** * The date the post was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time; /** * The date the post was last modified, as GMT. */ modified_gmt: WP_REST_API_Date_Time; /** * An alphanumeric identifier for the post unique to its type. */ slug: string; /** * A named status for the post. */ status: WP_Post_Status_Name | string; /** * Type of Post for the post. */ type: WP_Post_Type_Name | string; /** * A password to protect access to the content and excerpt. Only present when using the 'edit' context. */ password?: string; /** * The ID for the parent of the post. Only present for hierarchical post types. */ parent?: number; /** * A field used for ordering posts. */ menu_order?: number; /** * The title for the post. */ title: { /** * Title for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML title for the post, transformed for display. */ rendered: string; }; /** * The content for the post. */ content: { /** * Content for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML content for the post, transformed for display. */ rendered: string; /** * Version of the content block format used by the post. Only present when using the 'edit' context. */ block_version?: number; /** * Whether the content is protected with a password. */ protected: boolean; }; /** * The ID of the featured media for the post. */ featured_media?: number; /** * The format for the post. */ format?: WP_Post_Format_Name; /** * Meta fields. */ meta?: | EmptyArray | { [k: string]: unknown; }; /** * Whether or not the post should be treated as sticky. Only present for the 'post' post type. */ sticky?: boolean; /** * The theme file to use to display the post. */ template?: string; /** * The terms assigned to the post in the category taxonomy. Only present for post types that support categories. */ categories?: number[]; /** * The terms assigned to the post in the post_tag taxonomy. Only present for post types that support tags. */ tags?: number[]; _links: WP_REST_API_Object_Links; } /** * Hello. */ interface WP_REST_API_Partial_Post_Author { /** * The ID for the author of the post. */ author: number; } /** * Properties for public post types */ interface WP_REST_API_Partial_Post_Public { /** * Permalink template for the post. Only present when using the 'edit' context and the post type is public. */ permalink_template?: string; /** * Slug automatically generated from the post title. Only present when using the 'edit' context and the post type is public. */ generated_slug?: string; /** * An array of the class names for the post container element. */ class_list: string[]; } /** * Properties for post types that support comments */ interface WP_REST_API_Partial_Post_Comments { /** * Whether or not comments are open on the post. */ comment_status: WP_Post_Comment_Status_Name; /** * Whether or not the post can be pinged. */ ping_status: WP_Post_Comment_Status_Name; } /** * Properties for post types that support an excerpt */ interface WP_REST_API_Partial_Post_Excerpt { /** * The excerpt for the post. */ excerpt: { /** * Excerpt for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML excerpt for the post, transformed for display. */ rendered: string; /** * Whether the excerpt is protected with a password. */ protected: boolean; }; } /** * A pattern from the pattern directory in a REST API context. */ export interface WP_REST_API_Pattern_Directory_Pattern { /** * The pattern ID. */ id: number; /** * The pattern title, in human readable format. */ title: string; /** * The pattern content. */ content: string; /** * The pattern category slugs. */ categories: string[]; /** * The pattern keywords. */ keywords: string[]; /** * The pattern detailed description. */ description: string; /** * The pattern viewport width for inserter preview. */ viewport_width: number; /** * Block types that the pattern is intended to be used with. */ block_types?: string[]; [k: string]: unknown; } /** * A plugin in a REST API context. */ export interface WP_REST_API_Plugin { /** * The plugin file. */ plugin: string; /** * The plugin activation status. */ status: "inactive" | "active" | "network-active"; /** * The plugin name. */ name: string; /** * The plugin's website address. */ plugin_uri: string | ""; /** * The plugin author. */ author: string; /** * Plugin author's website address. */ author_uri: string | ""; /** * The plugin description. */ description: { /** * The raw plugin description. */ raw: string; /** * The plugin description formatted for display. */ rendered: string; }; /** * The plugin version number. */ version: string; /** * Whether the plugin can only be activated network-wide. */ network_only: boolean; /** * Minimum required version of WordPress. */ requires_wp: string; /** * Minimum required version of PHP. */ requires_php: string; /** * The plugin's text domain. */ textdomain: string; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A rendered dynamic block in a REST API context. Only accessible with the 'edit' context. */ export interface WP_REST_API_Rendered_Block { /** * The rendered block. */ rendered: string; [k: string]: unknown; } /** * Common revision properties shared by all revision types */ interface WP_REST_API_Partial_Revision_Common { /** * The ID for the author of the revision. */ author: number; /** * The date the revision was published, in the site's timezone. */ date: WP_REST_API_Date_Time; /** * The date the revision was published, as GMT. */ date_gmt: WP_REST_API_Date_Time; /** * Unique identifier for the revision. */ id: number; /** * The date the revision was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time; /** * The date the revision was last modified, as GMT. */ modified_gmt: WP_REST_API_Date_Time; /** * The ID for the parent of the revision. */ parent: number; /** * The title for the post. */ title: { /** * Title for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML title for the post, transformed for display. */ rendered: string; }; /** * The content for the post. */ content: { /** * Content for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML content for the post, transformed for display. */ rendered: string; /** * Version of the content block format used by the post. Only present when using the 'edit' context. */ block_version?: number; }; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; } /** * Revision properties specific to post-like content types (posts, pages, blocks, navigation) */ interface WP_REST_API_Partial_Revision_Post_Like { /** * The globally unique identifier for the post. */ guid: { /** * GUID for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * GUID for the post, transformed for display. */ rendered: string; }; /** * An alphanumeric identifier for the revision unique to its type. */ slug: string; /** * The excerpt for the post. */ excerpt?: { /** * Excerpt for the post, as it exists in the database. Only present when using the 'edit' context. */ raw?: string; /** * HTML excerpt for the post, transformed for display. */ rendered: string; }; } /** * A search result in a REST API context. */ export interface WP_REST_API_Search_Result { /** * Unique identifier for the object. */ id: number | string; /** * The title for the object. */ title: string; /** * URL to the object. */ url: string; /** * Object type. */ type: "post" | "term" | "post-format"; /** * Object subtype. */ subtype: string; _links: WP_REST_API_Object_Links; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The search result. */ self: { [k: string]: unknown; }[]; [k: string]: unknown; }; [k: string]: unknown; } /** * Site settings in a REST API context. */ export interface WP_REST_API_Settings { /** * Site title. */ title: string; /** * Site tagline. */ description: string; /** * Site URL. Not available on Multisite. */ url?: string; /** * This address is used for admin purposes, like new user notification. Not available on Multisite. */ email?: string; /** * A city in the same timezone as you. */ timezone: string; /** * A date format for all date strings. */ date_format: string; /** * A time format for all time strings. */ time_format: string; /** * A day number of the week that the week should start on. */ start_of_week: number; /** * WordPress locale code. */ language: string; /** * Convert emoticons like :-) and :-P to graphics on display. */ use_smilies: boolean; /** * Default post category. */ default_category: number; /** * Default post format. */ default_post_format: string; /** * Blog pages show at most. */ posts_per_page: number; /** * Allow link notifications from other blogs (pingbacks and trackbacks) on new articles. */ default_ping_status: WP_Post_Comment_Status_Name; /** * Allow people to submit comments on new posts. */ default_comment_status: WP_Post_Comment_Status_Name; /** * Site logo. */ site_logo: number | null; /** * Site icon. */ site_icon: number | null; /** * What to show on the front page. */ show_on_front?: "posts" | "page"; /** * The ID of the page that should be displayed on the front page. */ page_on_front?: number; /** * The ID of the page that should display the latest posts. */ page_for_posts?: number; [k: string]: unknown; } /** * A sidebar object in a REST API context. */ export interface WP_REST_API_Sidebar { id: ID; name: Name; description: Description; class: Class; before_widget: BeforeWidget; after_widget: AfterWidget; before_title: BeforeTitle; after_title: AfterTitle; status: Status; widgets: Widgets; /** * The embedded representation of relations. Only present when the '_embed' query parameter is set. */ _embedded?: { /** * The widgets in the sidebar. */ "wp:widget"?: unknown[]; [k: string]: unknown; }; _links?: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A post status object in a REST API context. */ export interface WP_REST_API_Status { /** * The title for the status. */ name: string; /** * Whether posts with this status should be private. Only present when using the 'edit' context. */ private?: boolean; /** * Whether posts with this status should be protected. Only present when using the 'edit' context. */ protected?: boolean; /** * Whether posts of this status should be shown in the front end of the site. */ public: boolean; /** * Whether posts with this status should be publicly-queryable. */ queryable: boolean; /** * Whether to include posts in the edit listing for their post type. Only present when using the 'edit' context. */ show_in_list?: boolean; /** * An alphanumeric identifier for the status. */ slug: string; /** * Whether posts of this status may have floating published dates. */ date_floating: boolean; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A collection of post status objects in a REST API context. */ export interface WP_REST_API_Statuses { [k: string]: WP_REST_API_Status; } /** * A collection of taxonomy objects in a REST API context. */ export interface WP_REST_API_Taxonomies { [k: string]: WP_REST_API_Taxonomy; } /** * A taxonomy in a REST API context. */ export interface WP_REST_API_Taxonomy { /** * All capabilities used by the taxonomy. Only present when using the 'edit' context. */ capabilities?: WP_Taxonomy_Caps; /** * A human-readable description of the taxonomy. */ description: string; /** * Whether or not the taxonomy should have children. */ hierarchical: boolean; /** * Human-readable labels for the taxonomy for various contexts. Only present when using the 'edit' context. */ labels?: WP_Taxonomy_Labels; /** * The title for the taxonomy. */ name: string; /** * An alphanumeric identifier for the taxonomy. */ slug: WP_Taxonomy_Name | string; /** * Whether or not the term cloud should be displayed. Only present when using the 'edit' context. */ show_cloud?: boolean; /** * Types associated with the taxonomy. */ types: (WP_Post_Type_Name | string)[]; /** * REST base route for the taxonomy. */ rest_base: string; /** * REST namespace route for the taxonomy. */ rest_namespace: string; /** * The visibility settings for the taxonomy. Only present when using the 'edit' context. */ visibility?: { /** * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users. */ public: boolean; /** * Whether the taxonomy is publicly queryable. */ publicly_queryable: boolean; /** * Whether to generate a default UI for managing this taxonomy. */ show_ui: boolean; /** * Whether to allow automatic creation of taxonomy columns on associated post-types table. */ show_admin_column: boolean; /** * Whether to make the taxonomy available for selection in navigation menus. */ show_in_nav_menus: boolean; /** * Whether to show the taxonomy in the quick/bulk edit panel. */ show_in_quick_edit: boolean; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A theme object in a REST API context. */ export interface WP_REST_API_Theme { /** * The theme's stylesheet. This uniquely identifies the theme. */ stylesheet: string; /** * The uri for the theme's stylesheet directory. */ stylesheet_uri?: string; /** * The theme's template. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme's stylesheet. */ template: string; /** * The uri for the theme's template directory. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme's stylesheet directory. */ template_uri?: string; /** * The theme author. */ author: { /** * The theme author's name, as found in the theme header. */ raw?: string; /** * HTML for the theme author, transformed for display. */ rendered?: string; }; /** * The website of the theme author. */ author_uri?: { /** * The website of the theme author, as found in the theme header. */ raw?: string; /** * The website of the theme author, transformed for display. */ rendered?: string; }; /** * A description of the theme. */ description: { /** * The theme description, as found in the theme header. */ raw?: string; /** * The theme description, transformed for display. */ rendered?: string; }; /** * Whether the theme is a block-based theme. */ is_block_theme: boolean; /** * The name of the theme. */ name: { /** * The theme name, as found in the theme header. */ raw?: string; /** * The theme name, transformed for display. */ rendered?: string; }; /** * The minimum PHP version required for the theme to work. */ requires_php?: string; /** * The minimum WordPress version required for the theme to work. */ requires_wp?: string; /** * The theme's screenshot URL. */ screenshot?: string; /** * Tags indicating styles and features of the theme. */ tags?: { /** * The theme tags, as found in the theme header. */ raw?: string[]; /** * The theme tags, transformed for display. */ rendered?: string; }; /** * The theme's text domain. */ textdomain?: string; /** * Features supported by this theme. */ theme_supports?: { "align-wide"?: boolean; "automatic-feed-links"?: boolean; "block-templates"?: boolean; "block-template-parts"?: boolean; "custom-background"?: boolean; "custom-header"?: boolean; "custom-logo"?: boolean; "customize-selective-refresh-widgets"?: boolean; "dark-editor-style"?: boolean; "disable-custom-colors"?: boolean; "disable-custom-font-sizes"?: boolean; "disable-custom-gradients"?: boolean; "disable-layout-styles"?: boolean; "editor-color-palette"?: boolean; "editor-font-sizes"?: boolean; "editor-gradient-presets"?: boolean; "editor-spacing-sizes"?: boolean; "editor-styles"?: boolean; html5?: string[]; formats?: string[]; "post-thumbnails"?: boolean; "responsive-embeds"?: boolean; "title-tag"?: boolean; "wp-block-styles"?: boolean; [k: string]: unknown; }; /** * The URI of the theme's webpage. */ theme_uri?: { /** * The URI of the theme's webpage, as found in the theme header. */ raw?: string; /** * The URI of the theme's webpage, transformed for display. */ rendered?: string; [k: string]: unknown; }; /** * The theme's current version. */ version: string; /** * A named status for the theme. */ status: "inactive" | "active"; /** * A list of default template types. */ default_template_types?: { slug?: string; title?: string; description?: string; }[]; /** * A list of allowed area values for template parts. */ default_template_part_areas?: { area?: string; label?: string; description?: string; icon?: string; area_tag?: string; }[]; _links?: WP_REST_API_Object_Links; [k: string]: unknown; } /** * Common fields for block template and template part objects. */ export interface WP_REST_API_Template_Common { /** * ID of template. */ id: string; /** * Unique slug identifying the template. */ slug: string; /** * Theme identifier for the template. */ theme: string; /** * Type of template. */ type: string; /** * Source of template */ source: string; /** * Source of a customized template */ origin: string | null; /** * Content of template. */ content: | { /** * Content for the template, as it exists in the database. */ raw?: string; /** * Version of the content block format used by the template. */ block_version?: number; } | string; /** * Title of template. */ title: | { /** * Title for the template, as it exists in the database. */ raw?: string; /** * HTML title for the template, transformed for display. */ rendered: string; } | string; /** * Description of template. */ description: string; /** * Status of template. */ status: "publish" | "future" | "draft" | "pending" | "private"; /** * Post ID. */ wp_id: number; /** * Theme file exists. */ has_theme_file: boolean; /** * The ID for the author of the template. */ author: number; /** * The date the template was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time | false; /** * Human readable text for the author. */ author_text: string; /** * Where the template originally comes from e.g. 'theme' */ original_source: "theme" | "plugin" | "site" | "user"; _links?: WP_REST_API_Object_Links; } /** * Common fields for block template and template part revision objects. */ export interface WP_REST_API_Template_Revision_Common { /** * ID of template. */ id: string; /** * Unique slug identifying the template. */ slug: string; /** * Theme identifier for the template. */ theme: string; /** * Type of template. */ type: string; /** * Source of template */ source: string; /** * Source of a customized template */ origin: string | null; /** * Content of template. */ content: | { /** * Content for the template, as it exists in the database. */ raw?: string; /** * Version of the content block format used by the template. */ block_version?: number; } | string; /** * Title of template. */ title: | { /** * Title for the template, as it exists in the database. */ raw?: string; /** * HTML title for the template, transformed for display. */ rendered?: string; } | string; /** * Description of template. */ description: string; /** * Status of template. */ status: "publish" | "future" | "draft" | "pending" | "private" | "inherit"; /** * Post ID. */ wp_id: number; /** * Theme file exists. */ has_theme_file: boolean; /** * The ID for the author of the revision. */ author: number; /** * The date the template was last modified, in the site's timezone. */ modified: WP_REST_API_Date_Time; /** * Human readable text for the author. */ author_text: string; /** * Where the template originally comes from e.g. 'theme' */ original_source: "theme" | "plugin" | "site" | "user"; /** * The ID for the parent of the revision. */ parent: number; _links: WP_REST_API_Object_Links; } /** * A post type object in a REST API context. */ export interface WP_REST_API_Type { /** * All capabilities used by the post type. Only present when using the 'edit' context. */ capabilities?: WP_Post_Type_Caps; /** * A human-readable description of the post type. */ description: string; /** * Whether or not the post type should have children. */ hierarchical: boolean; /** * If the value is a string, the value will be used as the archive slug. If the value is false the post type has no archive. */ has_archive: boolean | string; /** * Whether or not the post type can be viewed. Only present when using the 'edit' context. */ viewable?: boolean; /** * Human-readable labels for the post type for various contexts. Only present when using the 'edit' context. */ labels?: WP_Post_Type_Labels; /** * The title for the post type. */ name: string; /** * An alphanumeric identifier for the post type. */ slug: WP_Post_Type_Name | string; /** * All features, supported by the post type. Only present when using the 'edit' context. */ supports?: { [k: string]: unknown; }; /** * Taxonomies associated with post type. */ taxonomies: (WP_Taxonomy_Name | string)[]; /** * REST base route for the post type. */ rest_base: string; /** * REST route's namespace for the post type. */ rest_namespace: string; /** * The block template associated with the post type. */ template?: ( | [string] | [ string, { [k: string]: unknown; }, ] )[]; /** * The template lock associated with the post type, or false if none. */ template_lock?: "all" | "insert" | false; /** * The visibility settings for the post type. Only present when using the 'edit' context. */ visibility?: { /** * Whether to generate a default UI for managing this post type. */ show_ui?: boolean; /** * Whether to make the post type available for selection in navigation menus. */ show_in_nav_menus?: boolean; }; /** * The icon for the post type. */ icon: string | null; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A collection of post type objects in a REST API context. */ export interface WP_REST_API_Types { [k: string]: WP_REST_API_Type; } /** * A user object in a REST API context. */ export interface WP_REST_API_User { /** * Unique identifier for the user. */ id: number; /** * Login name for the user. Only present when using the 'edit' context. */ username?: string; /** * Display name for the user. */ name: string; /** * First name for the user. Only present when using the 'edit' context. */ first_name?: string; /** * Last name for the user. Only present when using the 'edit' context. */ last_name?: string; /** * The email address for the user. Only present when using the 'edit' context. */ email?: string | ""; /** * URL of the user. */ url: string | ""; /** * Description of the user. */ description: string; /** * Author URL of the user. */ link: string; /** * Locale for the user. Only present when using the 'edit' context. */ locale?: string; /** * The nickname for the user. Only present when using the 'edit' context. */ nickname?: string; /** * An alphanumeric identifier for the user. */ slug: string; /** * Registration date for the user in UTC. Only present when using the 'edit' context. */ registered_date?: WP_REST_API_Date_Time_UTC; /** * Roles assigned to the user. Only present when using the 'edit' context. */ roles?: (WP_User_Role_Name | string)[]; /** * All capabilities assigned to the user. Only present when using the 'edit' context. */ capabilities?: WP_User_Caps; /** * Any extra capabilities assigned to the user. Only present when using the 'edit' context. */ extra_capabilities?: WP_User_Caps; /** * Avatar URLs for the user. */ avatar_urls?: { /** * Avatar URL with image size of 24 pixels. */ "24": string; /** * Avatar URL with image size of 48 pixels. */ "48": string; /** * Avatar URL with image size of 96 pixels. */ "96": string; /** * Avatar URL with image of another size. */ [k: string]: string; }; /** * Meta fields. */ meta: | EmptyArray | { [k: string]: unknown; }; _links: WP_REST_API_Object_Links; [k: string]: unknown; } /** * A REST API error response. */ export interface WP_REST_API_Error { /** * The error message code. */ code: string; /** * The error message text. */ message: string; /** * Extra data about the error */ data: { /** * The HTTP status code */ status?: WP_Http_Status_Code; [k: string]: unknown; }; /** * Additional error objects, if there are any. */ additional_errors?: WP_REST_API_Error[]; } export const enum WP_Comment_Type_Name { comment = "comment", note = "note", pingback = "pingback", trackback = "trackback", } export const enum WP_Post_Type_Name { post = "post", page = "page", attachment = "attachment", revision = "revision", nav_menu_item = "nav_menu_item", custom_css = "custom_css", customize_changeset = "customize_changeset", oembed_cache = "oembed_cache", user_request = "user_request", wp_block = "wp_block", wp_global_styles = "wp_global_styles", wp_navigation = "wp_navigation", wp_template = "wp_template", wp_template_part = "wp_template_part", } export const enum WP_Taxonomy_Name { category = "category", post_tag = "post_tag", nav_menu = "nav_menu", post_format = "post_format", wp_template_part_area = "wp_template_part_area", wp_theme = "wp_theme", } export const enum WP_Post_Status_Name { publish = "publish", draft = "draft", auto_draft = "auto-draft", inherit = "inherit", pending = "pending", future = "future", trash = "trash", private = "private", } export const enum WP_Post_Comment_Status_Name { open = "open", closed = "closed", } export const enum WP_Object_Filter_Context { attribute = "attribute", db = "db", display = "display", edit = "edit", js = "js", raw = "raw", rss = "rss", } export const enum WP_User_Role_Name { administrator = "administrator", editor = "editor", author = "author", contributor = "contributor", subscriber = "subscriber", } export const enum WP_Comment_Status_Name { approved = "approved", unapproved = "unapproved", spam = "spam", trash = "trash", } export const enum WP_Post_Format_Name { aside = "aside", audio = "audio", chat = "chat", gallery = "gallery", image = "image", link = "link", quote = "quote", standard = "standard", status = "status", video = "video", } export const enum WP_Http_Status_Code { HTTP_CONTINUE = 100, SWITCHING_PROTOCOLS = 101, PROCESSING = 102, EARLY_HINTS = 103, OK = 200, CREATED = 201, ACCEPTED = 202, NON_AUTHORITATIVE_INFORMATION = 203, NO_CONTENT = 204, RESET_CONTENT = 205, PARTIAL_CONTENT = 206, MULTI_STATUS = 207, IM_USED = 226, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, USE_PROXY = 305, RESERVED = 306, TEMPORARY_REDIRECT = 307, PERMANENT_REDIRECT = 308, BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, REQUEST_TIMEOUT = 408, CONFLICT = 409, GONE = 410, LENGTH_REQUIRED = 411, PRECONDITION_FAILED = 412, REQUEST_ENTITY_TOO_LARGE = 413, REQUEST_URI_TOO_LONG = 414, UNSUPPORTED_MEDIA_TYPE = 415, REQUESTED_RANGE_NOT_SATISFIABLE = 416, EXPECTATION_FAILED = 417, IM_A_TEAPOT = 418, MISDIRECTED_REQUEST = 421, UNPROCESSABLE_ENTITY = 422, LOCKED = 423, FAILED_DEPENDENCY = 424, TOO_EARLY = 425, UPGRADE_REQUIRED = 426, PRECONDITION_REQUIRED = 428, TOO_MANY_REQUESTS = 429, REQUEST_HEADER_FIELDS_TOO_LARGE = 431, UNAVAILABLE_FOR_LEGAL_REASONS = 451, INTERNAL_SERVER_ERROR = 500, NOT_IMPLEMENTED = 501, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE = 503, GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, VARIANT_ALSO_NEGOTIATES = 506, INSUFFICIENT_STORAGE = 507, NOT_EXTENDED = 510, NETWORK_AUTHENTICATION_REQUIRED = 511, } type ValueOf = T[keyof T] /** * An enveloped REST API response (with `?_envelope`). * * @template T A REST API response type. */ export interface WP_REST_API_Envelope> { /** * The response body */ body: T; /** * The HTTP status code */ status: WP_Http_Status_Code; /** * The HTTP headers */ headers: { [k: string]: string|number; }; [k: string]: unknown; }