mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
✨ Wordpress node
This commit is contained in:
@@ -16,7 +16,27 @@ export const postOperations = [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: ``,
|
||||
description: 'Create a post',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update a post',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a post',
|
||||
},
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
description: 'Get all posts',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a post',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
@@ -29,7 +49,6 @@ export const postFields = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
{
|
||||
displayName: 'Title',
|
||||
name: 'title',
|
||||
@@ -69,6 +88,9 @@ export const postFields = [
|
||||
displayName: 'Content',
|
||||
name: 'content',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
default: '',
|
||||
description: 'The content for the post',
|
||||
},
|
||||
@@ -116,8 +138,8 @@ export const postFields = [
|
||||
description: 'A named status for the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Content Status',
|
||||
name: 'contentStatus',
|
||||
displayName: 'Comment Status',
|
||||
name: 'commentStatus',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
@@ -149,11 +171,60 @@ export const postFields = [
|
||||
default: '',
|
||||
description: 'Whether or not comments are open on the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Format',
|
||||
name: 'format',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Standard',
|
||||
value: 'standard'
|
||||
},
|
||||
{
|
||||
name: 'Aside',
|
||||
value: 'aside'
|
||||
},
|
||||
{
|
||||
name: 'Chat',
|
||||
value: 'chat'
|
||||
},
|
||||
{
|
||||
name: 'Gallery',
|
||||
value: 'gallery'
|
||||
},
|
||||
{
|
||||
name: 'Link',
|
||||
value: 'link'
|
||||
},
|
||||
{
|
||||
name: 'Image',
|
||||
value: 'image'
|
||||
},
|
||||
{
|
||||
name: 'Quote',
|
||||
value: 'quote'
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: 'status'
|
||||
},
|
||||
{
|
||||
name: 'Video',
|
||||
value: 'video'
|
||||
},
|
||||
{
|
||||
name: 'Audio',
|
||||
value: 'audio'
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
description: 'Whether or not comments are open on the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Sticky',
|
||||
name: 'sticky',
|
||||
type: 'boolean',
|
||||
default: '',
|
||||
default: false,
|
||||
description: 'Whether or not the object should be treated as sticky.',
|
||||
},
|
||||
{
|
||||
@@ -166,187 +237,574 @@ export const postFields = [
|
||||
default: [],
|
||||
description: 'The terms assigned to the object in the category taxonomy.',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags',
|
||||
name: 'tags',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTags',
|
||||
},
|
||||
default: [],
|
||||
description: 'The terms assigned to the object in the post_tag taxonomy.',
|
||||
},
|
||||
]
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Post ID',
|
||||
name: 'postId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'Unique identifier for the object.',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields',
|
||||
name: 'updateFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Title',
|
||||
name: 'title',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The title for the post',
|
||||
},
|
||||
{
|
||||
displayName: 'Content',
|
||||
name: 'content',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
default: '',
|
||||
description: 'The content for the post',
|
||||
},
|
||||
{
|
||||
displayName: 'Slug',
|
||||
name: 'slug',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'An alphanumeric identifier for the object unique to its type.',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'A password to protect access to the content and excerpt.',
|
||||
},
|
||||
{
|
||||
displayName: 'Status',
|
||||
name: 'status',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Publish',
|
||||
value: 'publish'
|
||||
},
|
||||
{
|
||||
name: 'Future',
|
||||
value: 'future'
|
||||
},
|
||||
{
|
||||
name: 'Draft',
|
||||
value: 'draft'
|
||||
},
|
||||
{
|
||||
name: 'Pending',
|
||||
value: 'pending'
|
||||
},
|
||||
{
|
||||
name: 'Private',
|
||||
value: 'private'
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
description: 'A named status for the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Comment Status',
|
||||
name: 'commentStatus',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Open',
|
||||
value: 'open'
|
||||
},
|
||||
{
|
||||
name: 'Close',
|
||||
value: 'closed'
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
description: 'Whether or not comments are open on the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Ping Status',
|
||||
name: 'pingStatus',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Open',
|
||||
value: 'open'
|
||||
},
|
||||
{
|
||||
name: 'Close',
|
||||
value: 'closed'
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
description: 'Whether or not comments are open on the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Format',
|
||||
name: 'format',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Standard',
|
||||
value: 'standard'
|
||||
},
|
||||
{
|
||||
name: 'Aside',
|
||||
value: 'aside'
|
||||
},
|
||||
{
|
||||
name: 'Chat',
|
||||
value: 'chat'
|
||||
},
|
||||
{
|
||||
name: 'Gallery',
|
||||
value: 'gallery'
|
||||
},
|
||||
{
|
||||
name: 'Link',
|
||||
value: 'link'
|
||||
},
|
||||
{
|
||||
name: 'Image',
|
||||
value: 'image'
|
||||
},
|
||||
{
|
||||
name: 'Quote',
|
||||
value: 'quote'
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: 'status'
|
||||
},
|
||||
{
|
||||
name: 'Video',
|
||||
value: 'video'
|
||||
},
|
||||
{
|
||||
name: 'Audio',
|
||||
value: 'audio'
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
description: 'Whether or not comments are open on the post.',
|
||||
},
|
||||
{
|
||||
displayName: 'Sticky',
|
||||
name: 'sticky',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not the object should be treated as sticky.',
|
||||
},
|
||||
{
|
||||
displayName: 'Categories',
|
||||
name: 'categories',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCategories',
|
||||
},
|
||||
default: [],
|
||||
description: 'The terms assigned to the object in the category taxonomy.',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags',
|
||||
name: 'tags',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTags',
|
||||
},
|
||||
default: [],
|
||||
description: 'The terms assigned to the object in the post_tag taxonomy.',
|
||||
},
|
||||
]
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Post ID',
|
||||
name: 'postId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'Unique identifier for the object.',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The password for the post if it is password protected.',
|
||||
},
|
||||
{
|
||||
displayName: 'Context',
|
||||
name: 'context',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'View',
|
||||
value: 'view',
|
||||
},
|
||||
{
|
||||
name: 'Embed',
|
||||
value: 'embed',
|
||||
},
|
||||
{
|
||||
name: 'Edit',
|
||||
value: 'edit',
|
||||
},
|
||||
],
|
||||
default: 'view',
|
||||
description: 'Scope under which the request is made; determines fields present in response.',
|
||||
},
|
||||
]
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* post:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'If all results should be returned or only up to a given limit.',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 10,
|
||||
},
|
||||
default: 5,
|
||||
description: 'How many results to return.',
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Filter',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Context',
|
||||
name: 'context',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'View',
|
||||
value: 'view',
|
||||
},
|
||||
{
|
||||
name: 'Embed',
|
||||
value: 'embed',
|
||||
},
|
||||
{
|
||||
name: 'Edit',
|
||||
value: 'edit',
|
||||
},
|
||||
],
|
||||
default: [],
|
||||
description: 'Scope under which the request is made; determines fields present in response.',
|
||||
},
|
||||
{
|
||||
displayName: 'Order By',
|
||||
name: 'orderBy',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Author',
|
||||
value: 'author',
|
||||
},
|
||||
{
|
||||
name: 'Date',
|
||||
value: 'date',
|
||||
},
|
||||
{
|
||||
name: 'ID',
|
||||
value: 'id',
|
||||
},
|
||||
{
|
||||
name: 'ID',
|
||||
value: 'id',
|
||||
},
|
||||
{
|
||||
name: 'Include',
|
||||
value: 'include',
|
||||
},
|
||||
{
|
||||
name: 'Modified',
|
||||
value: 'modified',
|
||||
},
|
||||
{
|
||||
name: 'Parent',
|
||||
value: 'parent',
|
||||
},
|
||||
{
|
||||
name: 'Relevance',
|
||||
value: 'relevance',
|
||||
},
|
||||
{
|
||||
name: 'Slug',
|
||||
value: 'slug',
|
||||
},
|
||||
{
|
||||
name: 'Include Slugs',
|
||||
value: 'includeSlugs',
|
||||
},
|
||||
{
|
||||
name: 'Title',
|
||||
value: 'title',
|
||||
},
|
||||
],
|
||||
default: [],
|
||||
description: 'Sort collection by object attribute.',
|
||||
},
|
||||
{
|
||||
displayName: 'Order',
|
||||
name: 'order',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Desc',
|
||||
value: 'desc',
|
||||
},
|
||||
{
|
||||
name: 'Asc',
|
||||
value: 'asc',
|
||||
},
|
||||
],
|
||||
default: 'desc',
|
||||
description: 'Order sort attribute ascending or descending.',
|
||||
},
|
||||
{
|
||||
displayName: 'Search',
|
||||
name: 'search',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Limit results to those matching a string.',
|
||||
},
|
||||
{
|
||||
displayName: 'After',
|
||||
name: 'after',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'Limit response to posts published after a given ISO8601 compliant date.',
|
||||
},
|
||||
{
|
||||
displayName: 'Before',
|
||||
name: 'before',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'Limit response to posts published before a given ISO8601 compliant date.',
|
||||
},
|
||||
{
|
||||
displayName: 'Author',
|
||||
name: 'author',
|
||||
type: 'multiOptions',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getAuthors',
|
||||
},
|
||||
description: 'Limit result set to posts assigned to specific authors.',
|
||||
},
|
||||
{
|
||||
displayName: 'Categories',
|
||||
name: 'categories',
|
||||
type: 'multiOptions',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCategories',
|
||||
},
|
||||
description: 'Limit result set to all items that have the specified term assigned in the categories taxonomy.',
|
||||
},
|
||||
{
|
||||
displayName: 'Exclude Categories',
|
||||
name: 'excludedCategories',
|
||||
type: 'multiOptions',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCategories',
|
||||
},
|
||||
description: 'Limit result set to all items except those that have the specified term assigned in the categories taxonomy.',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags',
|
||||
name: 'tags',
|
||||
type: 'multiOptions',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTags',
|
||||
},
|
||||
description: 'Limit result set to all items that have the specified term assigned in the tags taxonomy.',
|
||||
},
|
||||
{
|
||||
displayName: 'Exclude Tags',
|
||||
name: 'excludedTags',
|
||||
type: 'multiOptions',
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTags',
|
||||
},
|
||||
description: 'Limit result set to all items except those that have the specified term assigned in the tags taxonomy.',
|
||||
},
|
||||
{
|
||||
displayName: 'Sticky',
|
||||
name: 'sticky',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Limit result set to items that are sticky.',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:alias */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
operation: [
|
||||
'alias',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The old unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'New ID',
|
||||
name: 'newId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
operation: [
|
||||
'alias',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The new unique identifier of the user',
|
||||
]
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:unsubscribe */
|
||||
/* post:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
displayName: 'Post ID',
|
||||
name: 'postId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
operation: [
|
||||
'unsubscribe',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the user',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:resubscribe */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
operation: [
|
||||
'resubscribe',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the user',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the user',
|
||||
description: 'Unique identifier for the object.',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:addTags */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
'post',
|
||||
],
|
||||
operation: [
|
||||
'addTags',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags',
|
||||
name: 'tags',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
'delete',
|
||||
],
|
||||
operation: [
|
||||
'addTags',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'Tags to add separated by ","',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:removeTags */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
operation: [
|
||||
'removeTags',
|
||||
]
|
||||
options: [
|
||||
{
|
||||
displayName: 'Force',
|
||||
name: 'force',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to bypass trash and force deletion.',
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags',
|
||||
name: 'tags',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
operation: [
|
||||
'removeTags',
|
||||
]
|
||||
},
|
||||
},
|
||||
description: 'Tags to remove separated by ","',
|
||||
]
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
Reference in New Issue
Block a user