n8n-nodes-base
Version:
Base nodes of n8n
219 lines (214 loc) • 5.74 kB
text/typescript
/**
* Wordpress Node - Version 1
* Discriminator: resource=post, operation=update
*/
interface Credentials {
wordpressApi: CredentialReference;
wordpressOAuth2Api: CredentialReference;
}
/** Update a post */
export type WordpressV1PostUpdateParams = {
resource: 'post';
operation: 'update';
/**
* The authentication method to use
* @default basicAuth
*/
authType?: 'basicAuth' | 'oAuth2' | Expression<string>;
/**
* Unique identifier for the object
*/
postId?: string | Expression<string> | PlaceholderValue;
/**
* Update Fields
* @default {}
*/
updateFields?: {
/** The ID for the author of the object. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
authorId?: string | Expression<string>;
/** The title for the post
*/
title?: string | Expression<string> | PlaceholderValue;
/** The content for the post
*/
content?: string | Expression<string> | PlaceholderValue;
/** An alphanumeric identifier for the object unique to its type
*/
slug?: string | Expression<string> | PlaceholderValue;
/** A password to protect access to the content and excerpt
*/
password?: string | Expression<string> | PlaceholderValue;
/** A named status for the post
* @default draft
*/
status?: 'draft' | 'future' | 'pending' | 'private' | 'publish' | Expression<string>;
/** The date the post was published, in the site's timezone
*/
date?: string | Expression<string>;
/** Whether or not comments are open on the post
* @default open
*/
commentStatus?: 'open' | 'closed' | Expression<string>;
/** Whether or not comments are open on the post
* @default open
*/
pingStatus?: 'open' | 'closed' | Expression<string>;
/** The format of the post
* @default standard
*/
format?: 'aside' | 'audio' | 'chat' | 'gallery' | 'image' | 'link' | 'quote' | 'standard' | 'status' | 'video' | Expression<string>;
/** Whether or not the object should be treated as sticky
* @default false
*/
sticky?: boolean | Expression<boolean>;
/** The terms assigned to the object in the category taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
categories?: string[];
/** The terms assigned to the object in the post_tag taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
tags?: string[];
/** Template
* @default {}
*/
postTemplate?: {
/** Values
*/
values?: {
/** Whether site uses elementor page builder
* @default true
*/
elementor?: boolean | Expression<boolean>;
/** The theme file to use
* @displayOptions.show { elementor: [false] }
*/
template?: string | Expression<string> | PlaceholderValue;
/** The Elementor template to use
* @displayOptions.show { elementor: [true] }
*/
template?: '' | 'elementor_canvas' | 'elementor_header_footer' | 'elementor_theme' | Expression<string>;
};
};
};
};
export type WordpressV1PostUpdateOutput = {
_links?: {
about?: Array<{
href?: string;
}>;
author?: Array<{
embeddable?: boolean;
href?: string;
}>;
collection?: Array<{
href?: string;
}>;
curies?: Array<{
href?: string;
name?: string;
templated?: boolean;
}>;
'predecessor-version'?: Array<{
href?: string;
id?: number;
}>;
replies?: Array<{
embeddable?: boolean;
href?: string;
}>;
self?: Array<{
href?: string;
targetHints?: {
allow?: Array<string>;
};
}>;
'version-history'?: Array<{
count?: number;
href?: string;
}>;
'wp:action-assign-author'?: Array<{
href?: string;
}>;
'wp:action-assign-categories'?: Array<{
href?: string;
}>;
'wp:action-assign-tags'?: Array<{
href?: string;
}>;
'wp:action-create-categories'?: Array<{
href?: string;
}>;
'wp:action-create-tags'?: Array<{
href?: string;
}>;
'wp:action-publish'?: Array<{
href?: string;
}>;
'wp:action-sticky'?: Array<{
href?: string;
}>;
'wp:action-unfiltered-html'?: Array<{
href?: string;
}>;
'wp:attachment'?: Array<{
href?: string;
}>;
'wp:term'?: Array<{
embeddable?: boolean;
href?: string;
taxonomy?: string;
}>;
};
author?: number;
categories?: Array<number>;
comment_status?: string;
content?: {
block_version?: number;
protected?: boolean;
raw?: string;
rendered?: string;
};
date?: string;
date_gmt?: string;
excerpt?: {
protected?: boolean;
raw?: string;
rendered?: string;
};
featured_media?: number;
format?: string;
generated_slug?: string;
guid?: {
raw?: string;
rendered?: string;
};
id?: number;
link?: string;
meta?: {
footnotes?: string;
};
modified?: string;
modified_gmt?: string;
password?: string;
permalink_template?: string;
ping_status?: string;
slug?: string;
status?: string;
sticky?: boolean;
tags?: Array<number>;
template?: string;
title?: {
raw?: string;
rendered?: string;
};
type?: string;
};
export type WordpressV1PostUpdateNode = {
type: 'n8n-nodes-base.wordpress';
version: 1;
credentials?: Credentials;
config: NodeConfig<WordpressV1PostUpdateParams>;
output?: Items<WordpressV1PostUpdateOutput>;
};