2023-01-27 03:22:44 -08:00
import type { INodeProperties } from 'n8n-workflow' ;
2019-12-31 13:24:01 -08:00
2021-12-03 00:44:16 -08:00
export const postOperations : INodeProperties [ ] = [
2019-12-31 13:24:01 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
2020-01-02 14:34:48 -08:00
description : 'Create a post' ,
2022-07-10 13:50:51 -07:00
action : 'Create a post' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get a post' ,
2022-07-10 13:50:51 -07:00
action : 'Get a post' ,
2020-01-02 14:34:48 -08:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2020-01-02 14:34:48 -08:00
value : 'getAll' ,
2022-09-13 03:36:36 -07:00
description : 'Get many posts' ,
2022-09-08 08:10:13 -07:00
action : 'Get many posts' ,
2020-01-02 14:34:48 -08:00
} ,
{
2020-01-03 19:47:19 -08:00
name : 'Update' ,
value : 'update' ,
description : 'Update a post' ,
2022-07-10 13:50:51 -07:00
action : 'Update a post' ,
2019-12-31 13:24:01 -08:00
} ,
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2019-12-31 13:24:01 -08:00
2021-12-03 00:44:16 -08:00
export const postFields : INodeProperties [ ] = [
2022-08-17 08:50:24 -07:00
/* -------------------------------------------------------------------------- */
/* post:create */
/* -------------------------------------------------------------------------- */
2019-12-31 13:24:01 -08:00
{
2020-01-01 07:58:27 -08:00
displayName : 'Title' ,
name : 'title' ,
2019-12-31 13:24:01 -08:00
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'create' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-01 07:58:27 -08:00
description : 'The title for the post' ,
2019-12-31 13:24:01 -08:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'create' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
options : [
2020-09-15 23:33:59 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Author Name or ID' ,
2020-09-15 23:33:59 -07:00
name : 'authorId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getAuthors' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-09-15 23:33:59 -07:00
} ,
2019-12-31 13:24:01 -08:00
{
2020-01-01 07:58:27 -08:00
displayName : 'Content' ,
name : 'content' ,
2019-12-31 13:24:01 -08:00
type : 'string' ,
default : '' ,
2020-01-01 07:58:27 -08:00
description : 'The content for the post' ,
2019-12-31 13:24:01 -08:00
} ,
2020-01-01 07:58:27 -08:00
{
displayName : 'Slug' ,
name : 'slug' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'An alphanumeric identifier for the object unique to its type' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-01 07:58:27 -08:00
displayName : 'Password' ,
name : 'password' ,
type : 'string' ,
2022-09-12 00:36:50 -07:00
typeOptions : { password : true } ,
2020-01-01 07:58:27 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'A password to protect access to the content and excerpt' ,
2020-01-01 07:58:27 -08:00
} ,
{
displayName : 'Status' ,
name : 'status' ,
type : 'options' ,
options : [
2019-12-31 13:24:01 -08:00
{
2020-01-03 19:47:19 -08:00
name : 'Draft' ,
value : 'draft' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-01 07:58:27 -08:00
name : 'Future' ,
2020-01-03 19:47:19 -08:00
value : 'future' ,
2020-01-01 07:58:27 -08:00
} ,
{
name : 'Pending' ,
2020-01-03 19:47:19 -08:00
value : 'pending' ,
2020-01-01 07:58:27 -08:00
} ,
{
name : 'Private' ,
2020-01-03 19:47:19 -08:00
value : 'private' ,
} ,
{
name : 'Publish' ,
value : 'publish' ,
2019-12-31 13:24:01 -08:00
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'draft' ,
2022-05-06 14:01:25 -07:00
description : 'A named status for the post' ,
2020-01-01 07:58:27 -08:00
} ,
{
2020-01-02 14:34:48 -08:00
displayName : 'Comment Status' ,
name : 'commentStatus' ,
2020-01-01 07:58:27 -08:00
type : 'options' ,
options : [
{
name : 'Open' ,
2020-01-03 19:47:19 -08:00
value : 'open' ,
2020-01-01 07:58:27 -08:00
} ,
{
name : 'Close' ,
2020-01-03 19:47:19 -08:00
value : 'closed' ,
2020-01-01 07:58:27 -08:00
} ,
2019-12-31 13:24:01 -08:00
] ,
2020-01-03 19:47:19 -08:00
default : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not comments are open on the post' ,
2020-01-01 07:58:27 -08:00
} ,
{
displayName : 'Ping Status' ,
name : 'pingStatus' ,
type : 'options' ,
options : [
{
name : 'Open' ,
2020-01-03 19:47:19 -08:00
value : 'open' ,
2020-01-01 07:58:27 -08:00
} ,
{
name : 'Close' ,
2020-01-03 19:47:19 -08:00
value : 'closed' ,
2020-01-01 07:58:27 -08:00
} ,
2019-12-31 13:24:01 -08:00
] ,
2020-01-03 19:47:19 -08:00
default : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'If the a message should be send to announce the post' ,
2019-12-31 13:24:01 -08:00
} ,
2020-01-02 14:34:48 -08:00
{
displayName : 'Format' ,
name : 'format' ,
type : 'options' ,
options : [
{
name : 'Aside' ,
2020-01-03 19:47:19 -08:00
value : 'aside' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Audio' ,
value : 'audio' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Chat' ,
2020-01-03 19:47:19 -08:00
value : 'chat' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Gallery' ,
2020-01-03 19:47:19 -08:00
value : 'gallery' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Image' ,
2020-01-03 19:47:19 -08:00
value : 'image' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Link' ,
value : 'link' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Quote' ,
2020-01-03 19:47:19 -08:00
value : 'quote' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Standard' ,
value : 'standard' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Status' ,
2020-01-03 19:47:19 -08:00
value : 'status' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Video' ,
2020-01-03 19:47:19 -08:00
value : 'video' ,
2020-01-02 14:34:48 -08:00
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'standard' ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not comments are open on the post' ,
2020-01-02 14:34:48 -08:00
} ,
2020-01-01 07:58:27 -08:00
{
displayName : 'Sticky' ,
name : 'sticky' ,
type : 'boolean' ,
2020-01-02 14:34:48 -08:00
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not the object should be treated as sticky' ,
2020-01-01 07:58:27 -08:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Category Names or IDs' ,
2020-01-01 07:58:27 -08:00
name : 'categories' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getCategories' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-01-01 07:58:27 -08:00
} ,
2020-01-02 14:34:48 -08:00
{
2022-06-20 07:54:01 -07:00
displayName : 'Tag Names or IDs' ,
2020-01-02 14:34:48 -08:00
name : 'tags' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getTags' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-01-02 14:34:48 -08:00
} ,
2022-07-04 00:39:56 -07:00
{
displayName : 'Template' ,
name : 'postTemplate' ,
type : 'fixedCollection' ,
default : { } ,
typeOptions : {
multipleValues : false ,
} ,
options : [
{
displayName : 'Values' ,
name : 'values' ,
values : [
{
displayName : 'Elementor Template' ,
name : 'elementor' ,
type : 'boolean' ,
default : true ,
description : 'Whether site uses elementor page builder' ,
} ,
{
displayName : 'Template' ,
name : 'template' ,
type : 'string' ,
default : '' ,
description : 'The theme file to use' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
elementor : [ false ] ,
2022-07-04 00:39:56 -07:00
} ,
} ,
} ,
{
displayName : 'Template' ,
name : 'template' ,
type : 'options' ,
options : [
{
name : 'Standard' ,
value : '' ,
} ,
{
name : 'Elementor Canvas' ,
value : 'elementor_canvas' ,
} ,
{
name : 'Elementor Header Footer' ,
value : 'elementor_header_footer' ,
} ,
{
name : 'Elementor Theme' ,
value : 'elementor_theme' ,
} ,
] ,
default : '' ,
description : 'The Elementor template to use' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
elementor : [ true ] ,
2022-07-04 00:39:56 -07:00
} ,
} ,
} ,
] ,
} ,
] ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-31 13:24:01 -08:00
} ,
2022-08-17 08:50:24 -07:00
/* -------------------------------------------------------------------------- */
/* post:update */
/* -------------------------------------------------------------------------- */
2019-12-31 13:24:01 -08:00
{
2020-01-02 14:34:48 -08:00
displayName : 'Post ID' ,
name : 'postId' ,
2019-12-31 13:24:01 -08:00
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'update' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Unique identifier for the object' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-02 14:34:48 -08:00
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'update' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-02 14:34:48 -08:00
options : [
2020-09-15 23:33:59 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Author Name or ID' ,
2020-09-15 23:33:59 -07:00
name : 'authorId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getAuthors' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-09-15 23:33:59 -07:00
} ,
2020-01-02 14:34:48 -08:00
{
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
description : 'The title for the post' ,
} ,
{
displayName : 'Content' ,
name : 'content' ,
type : 'string' ,
default : '' ,
description : 'The content for the post' ,
} ,
{
displayName : 'Slug' ,
name : 'slug' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'An alphanumeric identifier for the object unique to its type' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Password' ,
name : 'password' ,
type : 'string' ,
2022-09-12 00:36:50 -07:00
typeOptions : { password : true } ,
2020-01-02 14:34:48 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'A password to protect access to the content and excerpt' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Status' ,
name : 'status' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'Draft' ,
value : 'draft' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Future' ,
2020-01-03 19:47:19 -08:00
value : 'future' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Pending' ,
2020-01-03 19:47:19 -08:00
value : 'pending' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Private' ,
2020-01-03 19:47:19 -08:00
value : 'private' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Publish' ,
value : 'publish' ,
} ,
2020-01-02 14:34:48 -08:00
] ,
2020-01-03 19:47:19 -08:00
default : 'draft' ,
2022-05-06 14:01:25 -07:00
description : 'A named status for the post' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Comment Status' ,
name : 'commentStatus' ,
type : 'options' ,
options : [
{
name : 'Open' ,
2020-01-03 19:47:19 -08:00
value : 'open' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Close' ,
2020-01-03 19:47:19 -08:00
value : 'closed' ,
2020-01-02 14:34:48 -08:00
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not comments are open on the post' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Ping Status' ,
name : 'pingStatus' ,
type : 'options' ,
options : [
{
name : 'Open' ,
2020-01-03 19:47:19 -08:00
value : 'open' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Close' ,
2020-01-03 19:47:19 -08:00
value : 'closed' ,
2020-01-02 14:34:48 -08:00
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not comments are open on the post' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Format' ,
name : 'format' ,
type : 'options' ,
options : [
{
name : 'Aside' ,
2020-01-03 19:47:19 -08:00
value : 'aside' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Audio' ,
value : 'audio' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Chat' ,
2020-01-03 19:47:19 -08:00
value : 'chat' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Gallery' ,
2020-01-03 19:47:19 -08:00
value : 'gallery' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Image' ,
2020-01-03 19:47:19 -08:00
value : 'image' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Link' ,
value : 'link' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Quote' ,
2020-01-03 19:47:19 -08:00
value : 'quote' ,
2020-01-02 14:34:48 -08:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Standard' ,
value : 'standard' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Status' ,
2020-01-03 19:47:19 -08:00
value : 'status' ,
2020-01-02 14:34:48 -08:00
} ,
{
name : 'Video' ,
2020-01-03 19:47:19 -08:00
value : 'video' ,
2020-01-02 14:34:48 -08:00
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'standard' ,
2022-05-06 14:01:25 -07:00
description : 'The format of the post' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Sticky' ,
name : 'sticky' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not the object should be treated as sticky' ,
2020-01-02 14:34:48 -08:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Category Names or IDs' ,
2020-01-02 14:34:48 -08:00
name : 'categories' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getCategories' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-01-02 14:34:48 -08:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Tag Names or IDs' ,
2020-01-02 14:34:48 -08:00
name : 'tags' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getTags' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-01-02 14:34:48 -08:00
} ,
2022-07-04 00:39:56 -07:00
{
displayName : 'Template' ,
name : 'postTemplate' ,
type : 'fixedCollection' ,
default : { } ,
typeOptions : {
multipleValues : false ,
} ,
options : [
{
displayName : 'Values' ,
name : 'values' ,
values : [
{
displayName : 'Elementor Template' ,
name : 'elementor' ,
type : 'boolean' ,
default : true ,
description : 'Whether site uses elementor page builder' ,
} ,
{
displayName : 'Template' ,
name : 'template' ,
type : 'string' ,
default : '' ,
description : 'The theme file to use' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
elementor : [ false ] ,
2022-07-04 00:39:56 -07:00
} ,
} ,
} ,
{
displayName : 'Template' ,
name : 'template' ,
type : 'options' ,
options : [
{
name : 'Standard' ,
value : '' ,
} ,
{
name : 'Elementor Canvas' ,
value : 'elementor_canvas' ,
} ,
{
name : 'Elementor Header Footer' ,
value : 'elementor_header_footer' ,
} ,
{
name : 'Elementor Theme' ,
value : 'elementor_theme' ,
} ,
] ,
default : '' ,
description : 'The Elementor template to use' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
elementor : [ true ] ,
2022-07-04 00:39:56 -07:00
} ,
} ,
} ,
] ,
} ,
] ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-31 13:24:01 -08:00
} ,
2022-08-17 08:50:24 -07:00
/* -------------------------------------------------------------------------- */
/* post:get */
/* -------------------------------------------------------------------------- */
2019-12-31 13:24:01 -08:00
{
2020-01-02 14:34:48 -08:00
displayName : 'Post ID' ,
name : 'postId' ,
2019-12-31 13:24:01 -08:00
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'get' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Unique identifier for the object' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-02 14:34:48 -08:00
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Option' ,
default : { } ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'get' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-02 14:34:48 -08:00
options : [
{
displayName : 'Password' ,
name : 'password' ,
type : 'string' ,
2022-09-12 00:36:50 -07:00
typeOptions : { password : true } ,
2020-01-02 14:34:48 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The password for the post if it is password protected' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Context' ,
name : 'context' ,
type : 'options' ,
options : [
{
name : 'View' ,
value : 'view' ,
} ,
{
name : 'Embed' ,
value : 'embed' ,
} ,
{
name : 'Edit' ,
value : 'edit' ,
} ,
] ,
default : 'view' ,
2022-05-06 14:01:25 -07:00
description : 'Scope under which the request is made; determines fields present in response' ,
2020-01-02 14:34:48 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-31 13:24:01 -08:00
} ,
2022-08-17 08:50:24 -07:00
/* -------------------------------------------------------------------------- */
/* post:getAll */
/* -------------------------------------------------------------------------- */
2019-12-31 13:24:01 -08:00
{
2020-01-02 14:34:48 -08:00
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'getAll' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-02 14:34:48 -08:00
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-02 14:34:48 -08:00
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-02 14:34:48 -08:00
typeOptions : {
minValue : 1 ,
maxValue : 10 ,
} ,
default : 5 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-03 19:47:19 -08:00
displayName : 'Options' ,
name : 'options' ,
2020-01-02 14:34:48 -08:00
type : 'collection' ,
2020-01-03 19:47:19 -08:00
placeholder : 'Add Option' ,
2020-01-02 14:34:48 -08:00
default : { } ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'getAll' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-02 14:34:48 -08:00
options : [
2022-03-13 03:42:23 -07:00
{
displayName : 'After' ,
name : 'after' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Limit response to posts published after a given ISO8601 compliant date' ,
2022-03-13 03:42:23 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Author Names or IDs' ,
2022-03-13 03:42:23 -07:00
name : 'author' ,
type : 'multiOptions' ,
default : [ ] ,
typeOptions : {
loadOptionsMethod : 'getAuthors' ,
} ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2022-03-13 03:42:23 -07:00
} ,
{
displayName : 'Before' ,
name : 'before' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Limit response to posts published before a given ISO8601 compliant date' ,
2022-03-13 03:42:23 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Category Names or IDs' ,
2022-03-13 03:42:23 -07:00
name : 'categories' ,
type : 'multiOptions' ,
default : [ ] ,
typeOptions : {
loadOptionsMethod : 'getCategories' ,
} ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2022-03-13 03:42:23 -07:00
} ,
2020-01-02 14:34:48 -08:00
{
displayName : 'Context' ,
name : 'context' ,
type : 'options' ,
options : [
{
name : 'View' ,
value : 'view' ,
} ,
{
name : 'Embed' ,
value : 'embed' ,
} ,
{
name : 'Edit' ,
value : 'edit' ,
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'view' ,
2022-05-06 14:01:25 -07:00
description : 'Scope under which the request is made; determines fields present in response' ,
2020-01-02 14:34:48 -08:00
} ,
2022-03-13 03:42:23 -07:00
{
2022-06-20 07:54:01 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
2022-03-13 03:42:23 -07:00
displayName : 'Exclude Categories' ,
name : 'excludedCategories' ,
type : 'multiOptions' ,
default : [ ] ,
typeOptions : {
loadOptionsMethod : 'getCategories' ,
} ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2022-03-13 03:42:23 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
2022-03-13 03:42:23 -07:00
displayName : 'Exclude Tags' ,
name : 'excludedTags' ,
type : 'multiOptions' ,
default : [ ] ,
typeOptions : {
loadOptionsMethod : 'getTags' ,
} ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2022-03-13 03:42:23 -07:00
} ,
{
displayName : 'Order' ,
name : 'order' ,
type : 'options' ,
options : [
{
name : 'ASC' ,
value : 'asc' ,
} ,
{
name : 'DESC' ,
value : 'desc' ,
} ,
] ,
default : 'desc' ,
2022-05-06 14:01:25 -07:00
description : 'Order sort attribute ascending or descending' ,
2022-03-13 03:42:23 -07:00
} ,
2020-01-02 14:34:48 -08:00
{
displayName : 'Order By' ,
name : 'orderBy' ,
type : 'options' ,
options : [
{
name : 'Author' ,
value : 'author' ,
} ,
{
name : 'Date' ,
value : 'date' ,
} ,
{
name : 'ID' ,
value : 'id' ,
} ,
{
name : 'Include' ,
value : 'include' ,
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Include Slugs' ,
value : 'include_slugs' ,
} ,
2020-01-02 14:34:48 -08:00
{
name : 'Modified' ,
value : 'modified' ,
} ,
{
name : 'Parent' ,
value : 'parent' ,
} ,
{
name : 'Relevance' ,
value : 'relevance' ,
} ,
{
name : 'Slug' ,
value : 'slug' ,
} ,
{
name : 'Title' ,
value : 'title' ,
} ,
] ,
2020-01-03 19:47:19 -08:00
default : 'id' ,
2022-05-06 14:01:25 -07:00
description : 'Sort collection by object attribute' ,
2020-01-02 14:34:48 -08:00
} ,
{
displayName : 'Search' ,
name : 'search' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Limit results to those matching a string' ,
2020-01-02 14:34:48 -08:00
} ,
{
2022-03-13 03:42:23 -07:00
displayName : 'Status' ,
name : 'status' ,
type : 'options' ,
options : [
{
name : 'Draft' ,
value : 'draft' ,
} ,
{
name : 'Future' ,
value : 'future' ,
} ,
{
name : 'Pending' ,
value : 'pending' ,
} ,
{
name : 'Private' ,
value : 'private' ,
} ,
{
name : 'Publish' ,
value : 'publish' ,
} ,
] ,
default : 'publish' ,
2022-05-06 14:01:25 -07:00
description : 'The status of the post' ,
2020-01-02 14:34:48 -08:00
} ,
{
2022-03-13 03:42:23 -07:00
displayName : 'Sticky' ,
name : 'sticky' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether to limit the result set to items that are sticky' ,
2020-01-02 14:34:48 -08:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Tag Names or IDs' ,
2020-01-02 14:34:48 -08:00
name : 'tags' ,
type : 'multiOptions' ,
default : [ ] ,
typeOptions : {
loadOptionsMethod : 'getTags' ,
} ,
2022-08-17 08:50:24 -07:00
description :
'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-examples/expressions/">expression</a>.' ,
2020-01-02 14:34:48 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-31 13:24:01 -08:00
} ,
2022-08-17 08:50:24 -07:00
/* -------------------------------------------------------------------------- */
/* post:delete */
/* -------------------------------------------------------------------------- */
2019-12-31 13:24:01 -08:00
{
2020-01-02 14:34:48 -08:00
displayName : 'Post ID' ,
name : 'postId' ,
2019-12-31 13:24:01 -08:00
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'delete' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Unique identifier for the object' ,
2019-12-31 13:24:01 -08:00
} ,
{
2020-01-02 14:34:48 -08:00
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Option' ,
default : { } ,
2019-12-31 13:24:01 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'post' ] ,
operation : [ 'delete' ] ,
2019-12-31 13:24:01 -08:00
} ,
} ,
2020-01-02 14:34:48 -08:00
options : [
{
displayName : 'Force' ,
name : 'force' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to bypass trash and force deletion' ,
2020-01-02 14:34:48 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-31 13:24:01 -08:00
} ,
2021-12-03 00:44:16 -08:00
] ;