n8n/packages/nodes-base/nodes/Ghost/PostDescription.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

819 lines
16 KiB
TypeScript
Raw Normal View History

import type { INodeProperties } from 'n8n-workflow';
export const postOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
noDataExpression: true,
type: 'options',
displayOptions: {
show: {
source: ['contentApi'],
resource: ['post'],
},
},
options: [
{
name: 'Get',
value: 'get',
description: 'Get a post',
action: 'Get a post',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many posts',
action: 'Get many posts',
},
],
default: 'get',
},
{
displayName: 'Operation',
name: 'operation',
noDataExpression: true,
type: 'options',
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a post',
action: 'Create a post',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a post',
action: 'Delete a post',
},
{
name: 'Get',
value: 'get',
description: 'Get a post',
action: 'Get a post',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many posts',
action: 'Get many posts',
},
{
name: 'Update',
value: 'update',
description: 'Update a post',
action: 'Update a post',
},
],
default: 'get',
},
];
export const postFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* post:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['create'],
},
},
description: "Post's title",
},
{
displayName: 'Content Format',
name: 'contentFormat',
type: 'options',
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['create'],
},
},
options: [
{
name: 'HTML',
value: 'html',
},
{
name: 'Mobile Doc',
value: 'mobileDoc',
},
],
default: 'html',
description: 'The format of the post',
},
{
displayName: 'Content',
name: 'content',
type: 'string',
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['create'],
contentFormat: ['html'],
},
},
default: '',
description: 'The content of the post to create',
},
{
displayName: 'Content (JSON)',
name: 'content',
type: 'json',
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['create'],
contentFormat: ['mobileDoc'],
},
},
default: '',
description:
'Mobiledoc is the raw JSON format that Ghost uses to store post contents. <a href="https://ghost.org/docs/concepts/posts/#document-storage">Info</a>.',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['create'],
},
},
options: [
{
refactor: Apply more `eslint-plugin-n8n-nodes-base` rules (#3534) * :zap: Update `lintfix` script * :zap: Run baseline `lintfix` * :fire: Remove unneeded exceptions (#3538) * :fire: Remove exceptions for `node-param-default-wrong-for-simplify` * :fire: Remove exceptions for `node-param-placeholder-miscased-id` * :zap: Update version * :shirt: Apply `node-param-placeholder-missing` (#3542) * :shirt: Apply `filesystem-wrong-cred-filename` (#3543) * :shirt: Apply `node-param-description-missing-from-dynamic-options` (#3545) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-class-description-empty-string` (#3546) * :shirt: Apply `node-class-description-icon-not-svg` (#3548) * :shirt: Apply `filesystem-wrong-node-filename` (#3549) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Expand lintings to credentials (#3550) * :shirt: Apply `node-param-multi-options-type-unsorted-items` (#3552) * :zap: fix * :zap: Minor fixes Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-multi-options` (#3541) * :zap: Add new lint rule, node-param-description-wrong-for-dynamic-multi-options * :zap: Fix with updated linting rules * :zap: Minor fixes Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-boolean-without-whether` (#3553) * :zap: fix * Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply node-param-display-name-wrong-for-dynamic-multi-options (#3537) * :shirt: Add exceptions * :shirt: Add exception * :pencil2: Alphabetize rules * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
2022-06-20 07:54:01 -07:00
displayName: 'Author Names or IDs',
name: 'authors',
type: 'multiOptions',
description:
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getAuthors',
},
default: [],
},
{
displayName: 'Cannonical URL',
name: 'canonical_url',
type: 'string',
default: '',
},
{
displayName: 'Code Injection Foot',
name: 'codeinjection_foot',
type: 'string',
default: '',
description: 'The Code Injection allows you inject a small snippet into your Ghost site',
},
{
displayName: 'Code Injection Head',
name: 'codeinjection_head',
type: 'string',
default: '',
description: 'The Code Injection allows you inject a small snippet into your Ghost site',
},
{
displayName: 'Featured',
name: 'featured',
type: 'boolean',
default: false,
},
{
displayName: 'Meta Description',
name: 'meta_description',
type: 'string',
default: '',
},
{
displayName: 'Meta Title',
name: 'meta_title',
type: 'string',
default: '',
},
{
displayName: 'Open Graph Description',
name: 'og_description',
type: 'string',
default: '',
},
{
displayName: 'Open Graph Image',
name: 'og_image',
type: 'string',
default: '',
description: 'URL of the image',
},
{
displayName: 'Open Graph Title',
name: 'og_title',
type: 'string',
default: '',
},
{
displayName: 'Published At',
name: 'published_at',
type: 'dateTime',
default: '',
},
{
displayName: 'Slug',
name: 'slug',
type: 'string',
default: '',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Draft',
value: 'draft',
},
{
name: 'Published',
value: 'published',
},
{
name: 'Scheduled',
value: 'scheduled',
},
],
default: 'draft',
},
{
refactor: Apply more `eslint-plugin-n8n-nodes-base` rules (#3534) * :zap: Update `lintfix` script * :zap: Run baseline `lintfix` * :fire: Remove unneeded exceptions (#3538) * :fire: Remove exceptions for `node-param-default-wrong-for-simplify` * :fire: Remove exceptions for `node-param-placeholder-miscased-id` * :zap: Update version * :shirt: Apply `node-param-placeholder-missing` (#3542) * :shirt: Apply `filesystem-wrong-cred-filename` (#3543) * :shirt: Apply `node-param-description-missing-from-dynamic-options` (#3545) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-class-description-empty-string` (#3546) * :shirt: Apply `node-class-description-icon-not-svg` (#3548) * :shirt: Apply `filesystem-wrong-node-filename` (#3549) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Expand lintings to credentials (#3550) * :shirt: Apply `node-param-multi-options-type-unsorted-items` (#3552) * :zap: fix * :zap: Minor fixes Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-multi-options` (#3541) * :zap: Add new lint rule, node-param-description-wrong-for-dynamic-multi-options * :zap: Fix with updated linting rules * :zap: Minor fixes Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-boolean-without-whether` (#3553) * :zap: fix * Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply node-param-display-name-wrong-for-dynamic-multi-options (#3537) * :shirt: Add exceptions * :shirt: Add exception * :pencil2: Alphabetize rules * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
2022-06-20 07:54:01 -07:00
displayName: 'Tag Names or IDs',
name: 'tags',
type: 'multiOptions',
description:
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Twitter Description',
name: 'twitter_description',
type: 'string',
default: '',
},
{
displayName: 'Twitter Image',
name: 'twitter_image',
type: 'string',
default: '',
description: 'URL of the image',
},
{
displayName: 'Twitter Title',
name: 'twitter_title',
type: 'string',
default: '',
},
],
},
/* -------------------------------------------------------------------------- */
/* post:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Post ID',
name: 'postId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['delete'],
},
},
description: 'The ID of the post to delete',
},
/* -------------------------------------------------------------------------- */
/* post:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'By',
name: 'by',
type: 'options',
default: 'id',
required: true,
options: [
{
name: 'ID',
value: 'id',
},
{
name: 'Slug',
value: 'slug',
},
],
displayOptions: {
show: {
source: ['contentApi', 'adminApi'],
resource: ['post'],
operation: ['get'],
},
},
description: 'Get the post either by slug or ID',
},
{
displayName: 'Identifier',
name: 'identifier',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
source: ['contentApi', 'adminApi'],
resource: ['post'],
operation: ['get'],
},
},
description: 'The ID or slug of the post to get',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['get'],
},
},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
refactor: Apply more `eslint-plugin-n8n-nodes-base` autofixable rules (#3432) * :zap: Update `lintfix` script * :shirt: Remove unneeded lint exceptions * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-description-miscased-url` (#3441) * :shirt: Apply `rule node-param-placeholder-miscased-id` (#3443) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-name-wrong-for-upsert` (#3446) * :shirt: Apply `node-param-min-value-wrong-for-limit` (#3442) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-wrong-for-dynamic-options` (#3454) * :hammer: fix * :zap: Fix `Assigned To` fields Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `rule node-param-default-wrong-for-number` (#3453) * :shirt: Apply `node-param-default-wrong-for-string` (#3452) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-miscased` (#3449) * :hammer: fix * :hammer: exceptions * :zap: review fixes * :shirt: Apply `node-param-description-lowercase-first-char` (#3451) * :zap: fix * :zap: review fixes * :zap: fix Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-options` (#3456) * Rule working as intended * Add rule * :fire: Remove repetitions * :shirt: Add exceptions Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Small fix for `node-param-description-wrong-for-dynamic-options` * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3460) * :shirt: Apply `node-param-description-line-break-html-tag` (#3462) * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-options-type-unsorted-items` (#3459) * :zap: fix * :hammer: exceptions * Add exception for Salesmate and Zoom Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :zap: Restore `lintfix` command Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-miscased-url
description:
'Limit the fields returned in the response object. E.g. for posts fields=title,url.',
},
{
displayName: 'Formats',
name: 'formats',
type: 'multiOptions',
options: [
{
name: 'HTML',
value: 'html',
},
{
name: 'Mobile Doc',
value: 'mobiledoc',
},
],
default: ['mobiledoc'],
},
],
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
source: ['contentApi'],
resource: ['post'],
operation: ['get'],
},
},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
refactor: Apply more `eslint-plugin-n8n-nodes-base` autofixable rules (#3432) * :zap: Update `lintfix` script * :shirt: Remove unneeded lint exceptions * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-description-miscased-url` (#3441) * :shirt: Apply `rule node-param-placeholder-miscased-id` (#3443) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-name-wrong-for-upsert` (#3446) * :shirt: Apply `node-param-min-value-wrong-for-limit` (#3442) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-wrong-for-dynamic-options` (#3454) * :hammer: fix * :zap: Fix `Assigned To` fields Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `rule node-param-default-wrong-for-number` (#3453) * :shirt: Apply `node-param-default-wrong-for-string` (#3452) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-miscased` (#3449) * :hammer: fix * :hammer: exceptions * :zap: review fixes * :shirt: Apply `node-param-description-lowercase-first-char` (#3451) * :zap: fix * :zap: review fixes * :zap: fix Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-options` (#3456) * Rule working as intended * Add rule * :fire: Remove repetitions * :shirt: Add exceptions Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Small fix for `node-param-description-wrong-for-dynamic-options` * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3460) * :shirt: Apply `node-param-description-line-break-html-tag` (#3462) * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-options-type-unsorted-items` (#3459) * :zap: fix * :hammer: exceptions * Add exception for Salesmate and Zoom Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :zap: Restore `lintfix` command Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-miscased-url
description:
'Limit the fields returned in the response object. E.g. for posts fields=title,url.',
},
{
displayName: 'Formats',
name: 'formats',
type: 'multiOptions',
options: [
{
name: 'HTML',
value: 'html',
},
{
name: 'Plaintext',
value: 'plaintext',
},
],
default: ['html'],
},
],
},
/* -------------------------------------------------------------------------- */
/* post:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
source: ['contentApi', 'adminApi'],
resource: ['post'],
operation: ['getAll'],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
source: ['adminApi', 'contentApi'],
resource: ['post'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 100,
},
default: 50,
description: 'Max number of results to return',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
source: ['contentApi'],
resource: ['post'],
operation: ['getAll'],
},
},
options: [
{
displayName: 'Include',
name: 'include',
type: 'multiOptions',
options: [
{
name: 'Authors',
value: 'authors',
},
{
name: 'Tags',
value: 'tags',
},
],
default: [],
description:
'Tells the API to return additional data related to the resource you have requested',
},
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
refactor: Apply more `eslint-plugin-n8n-nodes-base` autofixable rules (#3432) * :zap: Update `lintfix` script * :shirt: Remove unneeded lint exceptions * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-description-miscased-url` (#3441) * :shirt: Apply `rule node-param-placeholder-miscased-id` (#3443) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-name-wrong-for-upsert` (#3446) * :shirt: Apply `node-param-min-value-wrong-for-limit` (#3442) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-wrong-for-dynamic-options` (#3454) * :hammer: fix * :zap: Fix `Assigned To` fields Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `rule node-param-default-wrong-for-number` (#3453) * :shirt: Apply `node-param-default-wrong-for-string` (#3452) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-miscased` (#3449) * :hammer: fix * :hammer: exceptions * :zap: review fixes * :shirt: Apply `node-param-description-lowercase-first-char` (#3451) * :zap: fix * :zap: review fixes * :zap: fix Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-options` (#3456) * Rule working as intended * Add rule * :fire: Remove repetitions * :shirt: Add exceptions Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Small fix for `node-param-description-wrong-for-dynamic-options` * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3460) * :shirt: Apply `node-param-description-line-break-html-tag` (#3462) * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-options-type-unsorted-items` (#3459) * :zap: fix * :hammer: exceptions * Add exception for Salesmate and Zoom Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :zap: Restore `lintfix` command Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-miscased-url
description:
'Limit the fields returned in the response object. E.g. for posts fields=title,url.',
},
{
displayName: 'Formats',
name: 'formats',
type: 'multiOptions',
options: [
{
name: 'HTML',
value: 'html',
},
{
name: 'Plaintext',
value: 'plaintext',
},
],
default: ['html'],
description:
'By default, only html is returned, however each post and page in Ghost has 2 available formats: html and plaintext',
},
],
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['getAll'],
},
},
options: [
{
displayName: 'Include',
name: 'include',
type: 'multiOptions',
options: [
{
name: 'Authors',
value: 'authors',
},
{
name: 'Tags',
value: 'tags',
},
],
default: [],
description:
'Tells the API to return additional data related to the resource you have requested',
},
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
refactor: Apply more `eslint-plugin-n8n-nodes-base` autofixable rules (#3432) * :zap: Update `lintfix` script * :shirt: Remove unneeded lint exceptions * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-description-miscased-url` (#3441) * :shirt: Apply `rule node-param-placeholder-miscased-id` (#3443) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-name-wrong-for-upsert` (#3446) * :shirt: Apply `node-param-min-value-wrong-for-limit` (#3442) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-wrong-for-dynamic-options` (#3454) * :hammer: fix * :zap: Fix `Assigned To` fields Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `rule node-param-default-wrong-for-number` (#3453) * :shirt: Apply `node-param-default-wrong-for-string` (#3452) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * Apply `node-param-display-name-miscased` (#3449) * :hammer: fix * :hammer: exceptions * :zap: review fixes * :shirt: Apply `node-param-description-lowercase-first-char` (#3451) * :zap: fix * :zap: review fixes * :zap: fix Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-options` (#3456) * Rule working as intended * Add rule * :fire: Remove repetitions * :shirt: Add exceptions Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Small fix for `node-param-description-wrong-for-dynamic-options` * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3460) * :shirt: Apply `node-param-description-line-break-html-tag` (#3462) * :shirt: Run baseline `lintfix` * :shirt: Apply `node-param-options-type-unsorted-items` (#3459) * :zap: fix * :hammer: exceptions * Add exception for Salesmate and Zoom Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :zap: Restore `lintfix` command Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-miscased-url
description:
'Limit the fields returned in the response object. E.g. for posts fields=title,url.',
},
{
displayName: 'Formats',
name: 'formats',
type: 'multiOptions',
options: [
{
name: 'HTML',
value: 'html',
},
{
name: 'Mobile Doc',
value: 'mobiledoc',
},
],
default: ['mobiledoc'],
},
],
},
/* -------------------------------------------------------------------------- */
/* post:update */
/* -------------------------------------------------------------------------- */
{
displayName: 'Post ID',
name: 'postId',
type: 'string',
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['update'],
},
},
default: '',
description: 'The ID of the post to update',
},
{
displayName: 'Content Format',
name: 'contentFormat',
type: 'options',
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['update'],
},
},
options: [
{
name: 'HTML',
value: 'html',
},
{
name: 'Mobile Doc',
value: 'mobileDoc',
},
],
default: 'html',
description: 'The format of the post',
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
source: ['adminApi'],
resource: ['post'],
operation: ['update'],
},
},
options: [
{
refactor: Apply more `eslint-plugin-n8n-nodes-base` rules (#3534) * :zap: Update `lintfix` script * :zap: Run baseline `lintfix` * :fire: Remove unneeded exceptions (#3538) * :fire: Remove exceptions for `node-param-default-wrong-for-simplify` * :fire: Remove exceptions for `node-param-placeholder-miscased-id` * :zap: Update version * :shirt: Apply `node-param-placeholder-missing` (#3542) * :shirt: Apply `filesystem-wrong-cred-filename` (#3543) * :shirt: Apply `node-param-description-missing-from-dynamic-options` (#3545) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-class-description-empty-string` (#3546) * :shirt: Apply `node-class-description-icon-not-svg` (#3548) * :shirt: Apply `filesystem-wrong-node-filename` (#3549) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Expand lintings to credentials (#3550) * :shirt: Apply `node-param-multi-options-type-unsorted-items` (#3552) * :zap: fix * :zap: Minor fixes Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-multi-options` (#3541) * :zap: Add new lint rule, node-param-description-wrong-for-dynamic-multi-options * :zap: Fix with updated linting rules * :zap: Minor fixes Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-boolean-without-whether` (#3553) * :zap: fix * Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply node-param-display-name-wrong-for-dynamic-multi-options (#3537) * :shirt: Add exceptions * :shirt: Add exception * :pencil2: Alphabetize rules * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
2022-06-20 07:54:01 -07:00
displayName: 'Author Names or IDs',
name: 'authors',
type: 'multiOptions',
description:
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getAuthors',
},
default: [],
},
{
displayName: 'Cannonical URL',
name: 'canonical_url',
type: 'string',
default: '',
},
{
displayName: 'Code Injection Foot',
name: 'codeinjection_foot',
type: 'string',
default: '',
},
{
displayName: 'Code Injection Head',
name: 'codeinjection_head',
type: 'string',
default: '',
},
{
displayName: 'Content',
name: 'content',
type: 'string',
displayOptions: {
show: {
'/contentFormat': ['html'],
},
},
default: '',
},
{
displayName: 'Content (JSON)',
name: 'contentJson',
type: 'json',
displayOptions: {
show: {
'/contentFormat': ['mobileDoc'],
},
},
default: '',
description:
'Mobiledoc is the raw JSON format that Ghost uses to store post contents. <a href="https://ghost.org/docs/concepts/posts/#document-storage">Info.</a>.',
},
{
displayName: 'Featured',
name: 'featured',
type: 'boolean',
default: false,
},
{
displayName: 'Meta Description',
name: 'meta_description',
type: 'string',
default: '',
},
{
displayName: 'Meta Title',
name: 'meta_title',
type: 'string',
default: '',
},
{
displayName: 'Open Graph Description',
name: 'og_description',
type: 'string',
default: '',
},
{
displayName: 'Open Graph Image',
name: 'og_image',
type: 'string',
default: '',
description: 'URL of the image',
},
{
displayName: 'Open Graph Title',
name: 'og_title',
type: 'string',
default: '',
},
{
displayName: 'Published At',
name: 'published_at',
type: 'dateTime',
default: '',
},
{
displayName: 'Slug',
name: 'slug',
type: 'string',
default: '',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Draft',
value: 'draft',
},
{
name: 'Published',
value: 'published',
},
{
name: 'Scheduled',
value: 'scheduled',
},
],
default: 'draft',
},
{
refactor: Apply more `eslint-plugin-n8n-nodes-base` rules (#3534) * :zap: Update `lintfix` script * :zap: Run baseline `lintfix` * :fire: Remove unneeded exceptions (#3538) * :fire: Remove exceptions for `node-param-default-wrong-for-simplify` * :fire: Remove exceptions for `node-param-placeholder-miscased-id` * :zap: Update version * :shirt: Apply `node-param-placeholder-missing` (#3542) * :shirt: Apply `filesystem-wrong-cred-filename` (#3543) * :shirt: Apply `node-param-description-missing-from-dynamic-options` (#3545) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-class-description-empty-string` (#3546) * :shirt: Apply `node-class-description-icon-not-svg` (#3548) * :shirt: Apply `filesystem-wrong-node-filename` (#3549) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Expand lintings to credentials (#3550) * :shirt: Apply `node-param-multi-options-type-unsorted-items` (#3552) * :zap: fix * :zap: Minor fixes Co-authored-by: Michael Kret <michael.k@radency.com> * :shirt: Apply `node-param-description-wrong-for-dynamic-multi-options` (#3541) * :zap: Add new lint rule, node-param-description-wrong-for-dynamic-multi-options * :zap: Fix with updated linting rules * :zap: Minor fixes Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-boolean-without-whether` (#3553) * :zap: fix * Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply node-param-display-name-wrong-for-dynamic-multi-options (#3537) * :shirt: Add exceptions * :shirt: Add exception * :pencil2: Alphabetize rules * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
2022-06-20 07:54:01 -07:00
displayName: 'Tag Names or IDs',
name: 'tags',
type: 'multiOptions',
description:
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getTags',
},
default: [],
},
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: "Post's title",
},
{
displayName: 'Twitter Description',
name: 'twitter_description',
type: 'string',
default: '',
},
{
displayName: 'Twitter Image',
name: 'twitter_image',
type: 'string',
default: '',
description: 'URL of the image',
},
{
displayName: 'Twitter Title',
name: 'twitter_title',
type: 'string',
default: '',
},
],
},
];