n8n-nodes-base
Version:
Base nodes of n8n
174 lines (169 loc) • 4.98 kB
text/typescript
/**
* Wordpress Node - Version 1
* Discriminator: resource=post, operation=getAll
*/
interface Credentials {
wordpressApi: CredentialReference;
}
/** Get many posts */
export type WordpressV1PostGetAllParams = {
resource: 'post';
operation: 'getAll';
/**
* Whether to return all results or only up to a given limit
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { returnAll: [false] }
* @default 5
*/
limit?: number | Expression<number>;
/**
* Options
* @default {}
*/
options?: {
/** Limit response to posts published after a given ISO8601 compliant date
*/
after?: string | Expression<string>;
/** Limit result set to posts assigned to specific authors. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
author?: string[];
/** Limit response to posts published before a given ISO8601 compliant date
*/
before?: string | Expression<string>;
/** Limit result set to all items that have the specified term assigned in the categories taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
categories?: string[];
/** Scope under which the request is made; determines fields present in response
* @default view
*/
context?: 'view' | 'embed' | 'edit' | Expression<string>;
/** Limit result set to all items except those that have the specified term assigned in the categories taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
excludedCategories?: string[];
/** Limit result set to all items except those that have the specified term assigned in the tags taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
excludedTags?: string[];
/** Order sort attribute ascending or descending
* @default desc
*/
order?: 'asc' | 'desc' | Expression<string>;
/** Sort collection by object attribute
* @default id
*/
orderBy?: 'author' | 'date' | 'id' | 'include' | 'include_slugs' | 'modified' | 'parent' | 'relevance' | 'slug' | 'title' | Expression<string>;
/** Limit results to those matching a string
*/
search?: string | Expression<string> | PlaceholderValue;
/** The status of the post
* @default publish
*/
status?: 'draft' | 'future' | 'pending' | 'private' | 'publish' | Expression<string>;
/** Whether to limit the result set to items that are sticky
* @default false
*/
sticky?: boolean | Expression<boolean>;
/** Limit result set to all items that have the specified term assigned in the tags taxonomy. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
tags?: string[];
};
};
export type WordpressV1PostGetAllOutput = {
_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:attachment'?: Array<{
href?: string;
}>;
'wp:featuredmedia'?: Array<{
embeddable?: boolean;
href?: string;
}>;
'wp:term'?: Array<{
embeddable?: boolean;
href?: string;
taxonomy?: string;
}>;
};
author?: number;
categories?: Array<number>;
comment_status?: string;
content?: {
protected?: boolean;
rendered?: string;
};
date?: string;
date_gmt?: string;
excerpt?: {
protected?: boolean;
rendered?: string;
};
featured_media?: number;
format?: string;
guid?: {
rendered?: string;
};
id?: number;
link?: string;
meta?: {
footnotes?: string;
};
modified?: string;
modified_gmt?: string;
ping_status?: string;
slug?: string;
status?: string;
sticky?: boolean;
tags?: Array<number>;
template?: string;
title?: {
rendered?: string;
};
type?: string;
};
export type WordpressV1PostGetAllNode = {
type: 'n8n-nodes-base.wordpress';
version: 1;
credentials?: Credentials;
config: NodeConfig<WordpressV1PostGetAllParams>;
output?: Items<WordpressV1PostGetAllOutput>;
};