diff --git a/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts b/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts index a7800334e..44af95a15 100644 --- a/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts +++ b/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts @@ -1,4 +1,6 @@ -import { INodeProperties } from 'n8n-workflow'; +import { + INodeProperties, +} from 'n8n-workflow'; export const eventOperations = [ { @@ -7,34 +9,36 @@ export const eventOperations = [ type: 'options', displayOptions: { show: { - resource: ['event'] - } + resource: [ + 'event', + ], + }, }, options: [ { name: 'Create', value: 'create', - description: 'Add a event to calendar' + description: 'Add a event to calendar', }, { name: 'Delete', value: 'delete', - description: 'Delete an event' + description: 'Delete an event', }, { name: 'Get', value: 'get', - description: 'Retrieve an event' + description: 'Retrieve an event', }, { name: 'Get All', value: 'getAll', - description: 'Retrieve all events from a calendar' + description: 'Retrieve all events from a calendar', }, { name: 'Update', value: 'update', - description: 'Update an event' + description: 'Update an event', } ], default: 'create', @@ -56,9 +60,13 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['create'], - resource: ['event'] - } + operation: [ + 'create' + ], + resource: [ + 'event' + ], + }, }, default: '' }, @@ -69,9 +77,13 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['create'], - resource: ['event'] - } + operation: [ + 'create', + ], + resource: [ + 'event', + ], + }, }, default: '', description: 'Start time of the event.' @@ -83,9 +95,13 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['create'], - resource: ['event'] - } + operation: [ + 'create', + ], + resource: [ + 'event', + ], + }, }, default: '', description: 'End time of the event.' @@ -96,9 +112,13 @@ export const eventFields = [ type: 'boolean', displayOptions: { show: { - operation: ['create'], - resource: ['event'] - } + operation: [ + 'create', + ], + resource: [ + 'event', + ], + }, }, default: true }, @@ -110,9 +130,13 @@ export const eventFields = [ default: {}, displayOptions: { show: { - operation: ['create'], - resource: ['event'] - } + operation: [ + 'create', + ], + resource: [ + 'event', + ], + }, }, options: [ { @@ -122,12 +146,12 @@ export const eventFields = [ options: [ { name: 'Yes', - value: 'yes' + value: 'yes', }, { name: 'No', - value: 'no' - } + value: 'no', + }, ], default: 'no', description: 'Wheater the event is all day or not' @@ -138,57 +162,55 @@ export const eventFields = [ type: 'string', typeOptions: { multipleValues: true, - multipleValueButtonText: 'Add Attendee' + multipleValueButtonText: 'Add Attendee', }, default: '', - description: 'The attendees of the event' + description: 'The attendees of the event', }, { displayName: 'Color', name: 'color', type: 'options', typeOptions: { - loadOptionsMethod: 'getColors' + loadOptionsMethod: 'getColors', }, default: '', - description: 'The color of the event.' + description: 'The color of the event.', }, { displayName: 'Guests Can Invite Others', name: 'guestsCanInviteOthers', type: 'boolean', default: true, - description: - 'Whether attendees other than the organizer can invite others to the event' + description: 'Whether attendees other than the organizer can invite others to the event', }, { displayName: 'Guests Can Modify', name: 'guestsCanModify', type: 'boolean', default: false, - description: - 'Whether attendees other than the organizer can modify the event' + description: 'Whether attendees other than the organizer can modify the event', }, { displayName: 'Guests Can See Other Guests', name: 'guestsCanSeeOtherGuests', type: 'boolean', default: true, - description: `Whether attendees other than the organizer can see who the event's attendees are.` + description: `Whether attendees other than the organizer can see who the event's attendees are.`, }, { displayName: 'ID', name: 'id', type: 'string', default: '', - description: 'Opaque identifier of the event' + description: 'Opaque identifier of the event', }, { displayName: 'Location', name: 'location', type: 'string', default: '', - description: 'Geographic location of the event as free-form text.' + description: 'Geographic location of the event as free-form text.', }, { displayName: 'Max Attendees', @@ -196,7 +218,7 @@ export const eventFields = [ type: 'number', default: 0, description: `The maximum number of attendees to include in the response.
- If there are more than the specified number of attendees, only the participant is returned` + If there are more than the specified number of attendees, only the participant is returned`, }, { displayName: 'Repeat Frecuency', @@ -205,28 +227,28 @@ export const eventFields = [ options: [ { name: 'Daily', - value: 'Daily' + value: 'Daily', }, { name: 'Weekly', - value: 'weekly' + value: 'weekly', }, { name: 'Monthly', - value: 'monthly' + value: 'monthly', }, { name: 'Yearly', - value: 'yearly' + value: 'yearly', } ], - default: '' + default: '', }, { displayName: 'Repeat Until', name: 'repeatUntil', type: 'dateTime', - default: '' + default: '', }, { displayName: 'Repeat How Many Times?', @@ -245,31 +267,28 @@ export const eventFields = [ { name: 'All', value: 'all', - description: ' Notifications are sent to all guests' + description: 'Notifications are sent to all guests' }, { name: 'External Only', value: 'externalOnly', - description: - 'Notifications are sent to non-Google Calendar guests only' + description: 'Notifications are sent to non-Google Calendar guests only', }, { name: 'None', value: 'none', - description: - ' No notifications are sent. This value should only be used for migration use case' + description: 'No notifications are sent. This value should only be used for migration use case', } ], - description: - 'Whether to send notifications about the creation of the new event', - default: '' + description: 'Whether to send notifications about the creation of the new event', + default: '', }, { displayName: 'Summary', name: 'summary', type: 'string', default: '', - description: 'Title of the event.' + description: 'Title of the event.', }, { displayName: 'Show Me As', @@ -279,27 +298,26 @@ export const eventFields = [ { name: 'Available', value: 'transparent', - description: 'The event does not block time on the calendar' + description: 'The event does not block time on the calendar', }, { name: 'Busy', value: 'opaque', - description: ' The event does block time on the calendar.' + description: ' The event does block time on the calendar.', } ], default: 'opaque', - description: 'Whether the event blocks time on the calendar' + description: 'Whether the event blocks time on the calendar', }, { displayName: 'Timezone', name: 'timezone', type: 'options', typeOptions: { - loadOptionsMethod: 'getTimezones' + loadOptionsMethod: 'getTimezones', }, default: '', - description: - 'The timezone the event will have set. By default events are schedule on timezone set in n8n.' + description: 'The timezone the event will have set. By default events are schedule on timezone set in n8n.', }, { displayName: 'Visibility', @@ -309,32 +327,28 @@ export const eventFields = [ { name: 'Confidential', value: 'confidential', - description: - 'The event is private. This value is provided for compatibility reasons.' + description: 'The event is private. This value is provided for compatibility reasons.', }, { name: 'Default', value: 'default', - description: - ' Uses the default visibility for events on the calendar.' + description: 'Uses the default visibility for events on the calendar.', }, { name: 'Private', value: 'private', - description: - 'The event is private and only event attendees may view event details.' + description: 'The event is private and only event attendees may view event details.', }, { name: 'Public', value: 'public', - description: - 'The event is public and event details are visible to all readers of the calendar.' - } + description: 'The event is public and event details are visible to all readers of the calendar.', + }, ], default: 'default', description: 'Visibility of the event.' - } - ] + }, + ], }, { displayName: 'Reminders', @@ -348,10 +362,16 @@ export const eventFields = [ required: false, displayOptions: { show: { - resource: ['event'], - operation: ['create'], - useDefaultReminders: [false] - } + resource: [ + 'event', + ], + operation: [ + 'create', + ], + useDefaultReminders: [ + false, + ], + }, }, options: [ { @@ -365,14 +385,14 @@ export const eventFields = [ options: [ { name: 'Email', - value: 'email' + value: 'email', }, { name: 'Popup', - value: 'popup' - } + value: 'popup', + }, ], - default: '' + default: '', }, { displayName: 'Minutes Before', @@ -380,12 +400,12 @@ export const eventFields = [ type: 'number', typeOptions: { minValue: 0, - maxValue: 40320 + maxValue: 40320, }, - default: 0 - } - ] - } + default: 0, + }, + ], + }, ], description: `If the event doesn't use the default reminders, this lists the reminders specific to the event` }, @@ -397,14 +417,18 @@ export const eventFields = [ name: 'calendar', type: 'options', typeOptions: { - loadOptionsMethod: 'getCalendars' + loadOptionsMethod: 'getCalendars', }, required: true, displayOptions: { show: { - operation: ['delete'], - resource: ['event'] - } + operation: [ + 'delete', + ], + resource: [ + 'event', + ], + }, }, default: '' }, @@ -415,11 +439,15 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['delete'], - resource: ['event'] - } + operation: [ + 'delete', + ], + resource: [ + 'event', + ], + }, }, - default: '' + default: '', }, { displayName: 'Options', @@ -429,9 +457,13 @@ export const eventFields = [ default: {}, displayOptions: { show: { - operation: ['delete'], - resource: ['event'] - } + operation: [ + 'delete', + ], + resource: [ + 'event', + ], + }, }, options: [ { @@ -442,26 +474,23 @@ export const eventFields = [ { name: 'All', value: 'all', - description: ' Notifications are sent to all guests' + description: 'Notifications are sent to all guests', }, { name: 'External Only', value: 'externalOnly', - description: - 'Notifications are sent to non-Google Calendar guests only' + description: 'Notifications are sent to non-Google Calendar guests only', }, { name: 'None', value: 'none', - description: - ' No notifications are sent. This value should only be used for migration use case' + description: 'No notifications are sent. This value should only be used for migration use case', } ], - description: - 'Whether to send notifications about the creation of the new event', - default: '' - } - ] + description: 'Whether to send notifications about the creation of the new event', + default: '', + }, + ], }, /* -------------------------------------------------------------------------- */ /* event:get */ @@ -471,14 +500,18 @@ export const eventFields = [ name: 'calendar', type: 'options', typeOptions: { - loadOptionsMethod: 'getCalendars' + loadOptionsMethod: 'getCalendars', }, required: true, displayOptions: { show: { - operation: ['get'], - resource: ['event'] - } + operation: [ + 'get', + ], + resource: [ + 'event', + ], + }, }, default: '' }, @@ -489,11 +522,15 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['get'], - resource: ['event'] - } + operation: [ + 'get', + ], + resource: [ + 'event', + ], + }, }, - default: '' + default: '', }, { displayName: 'Options', @@ -503,9 +540,13 @@ export const eventFields = [ default: {}, displayOptions: { show: { - operation: ['get'], - resource: ['event'] - } + operation: [ + 'get', + ], + resource: [ + 'event', + ], + }, }, options: [ { @@ -514,17 +555,17 @@ export const eventFields = [ type: 'number', default: 0, description: `The maximum number of attendees to include in the response.
- If there are more than the specified number of attendees, only the participant is returned` + If there are more than the specified number of attendees, only the participant is returned`, }, { displayName: 'Timezone', name: 'timeZone', type: 'options', typeOptions: { - loadOptionsMethod: 'getTimezones' + loadOptionsMethod: 'getTimezones', }, default: '', - description: `Time zone used in the response. The default is the time zone of the calendar.` + description: `Time zone used in the response. The default is the time zone of the calendar.`, } ] }, @@ -536,14 +577,18 @@ export const eventFields = [ name: 'calendar', type: 'options', typeOptions: { - loadOptionsMethod: 'getCalendars' + loadOptionsMethod: 'getCalendars', }, required: true, displayOptions: { show: { - operation: ['getAll'], - resource: ['event'] - } + operation: [ + 'getAll', + ], + resource: [ + 'event', + ], + }, }, default: '' }, @@ -553,13 +598,16 @@ export const eventFields = [ type: 'boolean', displayOptions: { show: { - operation: ['getAll'], - resource: ['event'] - } + operation: [ + 'getAll', + ], + resource: [ + 'event', + ], + }, }, default: false, - description: - 'If all results should be returned or only up to a given limit.' + description: 'If all results should be returned or only up to a given limit.', }, { displayName: 'Limit', @@ -567,17 +615,23 @@ export const eventFields = [ type: 'number', displayOptions: { show: { - operation: ['getAll'], - resource: ['event'], - returnAll: [false] - } + operation: [ + 'getAll', + ], + resource: [ + 'event', + ], + returnAll: [ + false, + ], + }, }, typeOptions: { minValue: 1, - maxValue: 500 + maxValue: 500, }, default: 100, - description: 'How many results to return.' + description: 'How many results to return.', }, { displayName: 'Options', @@ -587,9 +641,13 @@ export const eventFields = [ default: {}, displayOptions: { show: { - operation: ['getAll'], - resource: ['event'] - } + operation: [ + 'getAll', + ], + resource: [ + 'event', + ], + }, }, options: [ { @@ -597,8 +655,7 @@ export const eventFields = [ name: 'iCalUID', type: 'string', default: '', - description: - 'Specifies event ID in the iCalendar format to be included in the response' + description: 'Specifies event ID in the iCalendar format to be included in the response', }, { displayName: 'Max Attendees', @@ -606,7 +663,7 @@ export const eventFields = [ type: 'number', default: 0, description: `The maximum number of attendees to include in the response.
- If there are more than the specified number of attendees, only the participant is returned` + If there are more than the specified number of attendees, only the participant is returned`, }, { displayName: 'Order By', @@ -616,40 +673,37 @@ export const eventFields = [ { name: 'Start Time', value: 'startTime', - description: - 'Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True)' + description: 'Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True)', }, { name: 'Updated', value: 'updated', - description: 'Order by last modification time (ascending).' + description: 'Order by last modification time (ascending).', } ], default: '', - description: 'The order of the events returned in the result.' + description: 'The order of the events returned in the result.', }, { displayName: 'Query', name: 'query', type: 'string', default: '', - description: - 'Free text search terms to find events that match these terms in any field, except for extended properties.' + description: 'Free text search terms to find events that match these terms in any field, except for extended properties.', }, { displayName: 'Show Deleted', name: 'showDeleted', type: 'boolean', default: false, - description: - 'Whether to include deleted events (with status equals "cancelled") in the result.' + description: 'Whether to include deleted events (with status equals "cancelled") in the result.', }, { displayName: 'Show Hidden Invitations', name: 'showHiddenInvitations', type: 'boolean', default: false, - description: 'Whether to include hidden invitations in the result.' + description: 'Whether to include hidden invitations in the result.', }, { displayName: 'Single Events', @@ -657,31 +711,31 @@ export const eventFields = [ type: 'boolean', default: false, description: `Whether to expand recurring events into instances and only return single one-off
- events and instances of recurring events, but not the underlying recurring events themselves.` + events and instances of recurring events, but not the underlying recurring events themselves.`, }, { displayName: 'Time Max', name: 'timeMax', type: 'dateTime', default: '', - description: `Upper bound (exclusive) for an event's start time to filter by` + description: `Upper bound (exclusive) for an event's start time to filter by`, }, { displayName: 'Time Min', name: 'timeMin', type: 'dateTime', default: '', - description: `Lower bound (exclusive) for an event's end time to filter by` + description: `Lower bound (exclusive) for an event's end time to filter by`, }, { displayName: 'Timezone', name: 'timeZone', type: 'options', typeOptions: { - loadOptionsMethod: 'getTimezones' + loadOptionsMethod: 'getTimezones', }, default: '', - description: `Time zone used in the response. The default is the time zone of the calendar.` + description: `Time zone used in the response. The default is the time zone of the calendar.`, }, { displayName: 'Updated Min', @@ -689,7 +743,7 @@ export const eventFields = [ type: 'dateTime', default: '', description: `Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. - When specified, entries deleted since this time will always be included regardless of showDeleted` + When specified, entries deleted since this time will always be included regardless of showDeleted`, } ] }, @@ -706,11 +760,15 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['update'], - resource: ['event'] - } + operation: [ + 'update', + ], + resource: [ + 'event', + ], + }, }, - default: '' + default: '', }, { displayName: 'Event ID', @@ -719,11 +777,15 @@ export const eventFields = [ required: true, displayOptions: { show: { - operation: ['update'], - resource: ['event'] - } + operation: [ + 'update', + ], + resource: [ + 'event', + ], + }, }, - default: '' + default: '', }, { displayName: 'Use Default Reminders', @@ -731,9 +793,13 @@ export const eventFields = [ type: 'boolean', displayOptions: { show: { - operation: ['update'], - resource: ['event'] - } + operation: [ + 'update', + ], + resource: [ + 'event', + ], + }, }, default: true }, @@ -745,9 +811,13 @@ export const eventFields = [ default: {}, displayOptions: { show: { - operation: ['update'], - resource: ['event'] - } + operation: [ + 'update', + ], + resource: [ + 'event', + ], + }, }, options: [ { @@ -757,15 +827,15 @@ export const eventFields = [ options: [ { name: 'Yes', - value: 'yes' + value: 'yes', }, { name: 'No', - value: 'no' + value: 'no', } ], default: 'no', - description: 'Wheater the event is all day or not' + description: 'Wheater the event is all day or not', }, { displayName: 'Attendees', @@ -773,64 +843,62 @@ export const eventFields = [ type: 'string', typeOptions: { multipleValues: true, - multipleValueButtonText: 'Add Attendee' + multipleValueButtonText: 'Add Attendee', }, default: '', - description: 'The attendees of the event' + description: 'The attendees of the event', }, { displayName: 'Color', name: 'color', type: 'options', typeOptions: { - loadOptionsMethod: 'getColors' + loadOptionsMethod: 'getColors', }, default: '', - description: 'The color of the event.' + description: 'The color of the event.', }, { displayName: 'End', name: 'end', type: 'dateTime', default: '', - description: 'End time of the event.' + description: 'End time of the event.', }, { displayName: 'Guests Can Invite Others', name: 'guestsCanInviteOthers', type: 'boolean', default: true, - description: - 'Whether attendees other than the organizer can invite others to the event' + description: 'Whether attendees other than the organizer can invite others to the event', }, { displayName: 'Guests Can Modify', name: 'guestsCanModify', type: 'boolean', default: false, - description: - 'Whether attendees other than the organizer can modify the event' + description: 'Whether attendees other than the organizer can modify the event', }, { displayName: 'Guests Can See Other Guests', name: 'guestsCanSeeOtherGuests', type: 'boolean', default: true, - description: `Whether attendees other than the organizer can see who the event's attendees are.` + description: `Whether attendees other than the organizer can see who the event's attendees are.`, }, { displayName: 'ID', name: 'id', type: 'string', default: '', - description: 'Opaque identifier of the event' + description: 'Opaque identifier of the event', }, { displayName: 'Location', name: 'location', type: 'string', default: '', - description: 'Geographic location of the event as free-form text.' + description: 'Geographic location of the event as free-form text.', }, { displayName: 'Max Attendees', @@ -838,7 +906,7 @@ export const eventFields = [ type: 'number', default: 0, description: `The maximum number of attendees to include in the response.
- If there are more than the specified number of attendees, only the participant is returned` + If there are more than the specified number of attendees, only the participant is returned`, }, { displayName: 'Repeat Frecuency', @@ -847,44 +915,44 @@ export const eventFields = [ options: [ { name: 'Daily', - value: 'Daily' + value: 'Daily', }, { name: 'Weekly', - value: 'weekly' + value: 'weekly', }, { name: 'Monthly', - value: 'monthly' + value: 'monthly', }, { name: 'Yearly', - value: 'yearly' + value: 'yearly', } ], - default: '' + default: '', }, { displayName: 'Repeat Until', name: 'repeatUntil', type: 'dateTime', - default: '' + default: '', }, { displayName: 'Repeat How Many Times?', name: 'repeatHowManyTimes', type: 'number', typeOptions: { - minValue: 1 + minValue: 1, }, - default: 1 + default: 1, }, { displayName: 'Start', name: 'start', type: 'dateTime', default: '', - description: 'Start time of the event.' + description: 'Start time of the event.', }, { displayName: 'Send Updates', @@ -894,31 +962,28 @@ export const eventFields = [ { name: 'All', value: 'all', - description: ' Notifications are sent to all guests' + description: ' Notifications are sent to all guests', }, { name: 'External Only', value: 'externalOnly', - description: - 'Notifications are sent to non-Google Calendar guests only' + description: 'Notifications are sent to non-Google Calendar guests only', }, { name: 'None', value: 'none', - description: - ' No notifications are sent. This value should only be used for migration use case' + description: 'No notifications are sent. This value should only be used for migration use case', } ], - description: - 'Whether to send notifications about the creation of the new event', - default: '' + description: 'Whether to send notifications about the creation of the new event', + default: '', }, { displayName: 'Summary', name: 'summary', type: 'string', default: '', - description: 'Title of the event.' + description: 'Title of the event.', }, { displayName: 'Show Me As', @@ -928,27 +993,26 @@ export const eventFields = [ { name: 'Available', value: 'transparent', - description: 'The event does not block time on the calendar' + description: 'The event does not block time on the calendar', }, { name: 'Busy', value: 'opaque', - description: ' The event does block time on the calendar.' - } + description: ' The event does block time on the calendar.', + }, ], default: 'opaque', - description: 'Whether the event blocks time on the calendar' + description: 'Whether the event blocks time on the calendar', }, { displayName: 'Timezone', name: 'timezone', type: 'options', typeOptions: { - loadOptionsMethod: 'getTimezones' + loadOptionsMethod: 'getTimezones', }, default: '', - description: - 'The timezone the event will have set. By default events are schedule on n8n timezone ' + description: 'The timezone the event will have set. By default events are schedule on n8n timezone', }, { displayName: 'Visibility', @@ -958,32 +1022,28 @@ export const eventFields = [ { name: 'Confidential', value: 'confidential', - description: - 'The event is private. This value is provided for compatibility reasons.' + description: 'The event is private. This value is provided for compatibility reasons.', }, { name: 'Default', value: 'default', - description: - ' Uses the default visibility for events on the calendar.' + description: 'Uses the default visibility for events on the calendar.', }, { name: 'Public', value: 'public', - description: - 'The event is public and event details are visible to all readers of the calendar.' + description: 'The event is public and event details are visible to all readers of the calendar.', }, { name: 'Private', value: 'private', - description: - 'The event is private and only event attendees may view event details.' + description: 'The event is private and only event attendees may view event details.', } ], default: 'default', - description: 'Visibility of the event.' - } - ] + description: 'Visibility of the event.', + }, + ], }, { displayName: 'Reminders', @@ -997,10 +1057,16 @@ export const eventFields = [ required: false, displayOptions: { show: { - resource: ['event'], - operation: ['update'], - useDefaultReminders: [false] - } + resource: [ + 'event', + ], + operation: [ + 'update', + ], + useDefaultReminders: [ + false, + ], + }, }, options: [ { @@ -1014,14 +1080,14 @@ export const eventFields = [ options: [ { name: 'Email', - value: 'email' + value: 'email', }, { name: 'Popup', - value: 'popup' + value: 'popup', } ], - default: '' + default: '', }, { displayName: 'Minutes Before', @@ -1029,13 +1095,13 @@ export const eventFields = [ type: 'number', typeOptions: { minValue: 0, - maxValue: 40320 + maxValue: 40320, }, - default: 0 - } - ] - } + default: 0, + }, + ], + }, ], - description: `If the event doesn't use the default reminders, this lists the reminders specific to the event` + description: `If the event doesn't use the default reminders, this lists the reminders specific to the event`, } ] as INodeProperties[]; diff --git a/packages/nodes-base/nodes/Google/Calendar/EventInterface.ts b/packages/nodes-base/nodes/Google/Calendar/EventInterface.ts index 72bf96cc8..14cda0fe4 100644 --- a/packages/nodes-base/nodes/Google/Calendar/EventInterface.ts +++ b/packages/nodes-base/nodes/Google/Calendar/EventInterface.ts @@ -1,4 +1,6 @@ -import { IDataObject } from "n8n-workflow"; +import { + IDataObject, + } from 'n8n-workflow'; export interface IReminder { useDefault?: boolean; diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts index 53d3d9de8..dc0ddad94 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts @@ -1,4 +1,6 @@ -import { IExecuteFunctions } from 'n8n-core'; +import { + IExecuteFunctions, +} from 'n8n-core'; import { IDataObject, @@ -6,14 +8,22 @@ import { INodeTypeDescription, INodeType, ILoadOptionsFunctions, - INodePropertyOptions + INodePropertyOptions, } from 'n8n-workflow'; -import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; +import { + googleApiRequest, + googleApiRequestAllItems, +} from './GenericFunctions'; -import { eventOperations, eventFields } from './EventDescription'; +import { + eventOperations, + eventFields, +} from './EventDescription'; -import { IEvent } from './EventInterface'; +import { + IEvent, +} from './EventInterface'; import * as moment from 'moment-timezone'; @@ -28,14 +38,14 @@ export class GoogleCalendar implements INodeType { description: 'Consume Google Calendar API.', defaults: { name: 'Google Calendar', - color: '#3E87E4' + color: '#3E87E4', }, inputs: ['main'], outputs: ['main'], credentials: [ { name: 'googleCalendarOAuth2Api', - required: true + required: true, } ], properties: [ @@ -46,15 +56,15 @@ export class GoogleCalendar implements INodeType { options: [ { name: 'Event', - value: 'event' - } + value: 'event', + }, ], default: 'event', description: 'The resource to operate on.' }, ...eventOperations, - ...eventFields - ] + ...eventFields, + ], }; methods = { diff --git a/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts b/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts index 5a7418a70..46f70c85d 100644 --- a/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts +++ b/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts @@ -1,13 +1,17 @@ -import { IExecuteFunctions } from 'n8n-core'; +import { + IExecuteFunctions, + } from 'n8n-core'; import { IDataObject, INodeTypeDescription, INodeExecutionData, - INodeType + INodeType, } from 'n8n-workflow'; -import { messageBirdApiRequest } from './GenericFunctions'; +import { + messageBirdApiRequest, +} from './GenericFunctions'; export class MessageBird implements INodeType { description: INodeTypeDescription = { @@ -20,15 +24,15 @@ export class MessageBird implements INodeType { description: 'Sending SMS', defaults: { name: 'MessageBird', - color: '#2481d7' + color: '#2481d7', }, inputs: ['main'], outputs: ['main'], credentials: [ { name: 'messageBirdApi', - required: true - } + required: true, + }, ], properties: [ { @@ -38,31 +42,32 @@ export class MessageBird implements INodeType { options: [ { name: 'SMS', - value: 'sms' - } + value: 'sms', + }, ], default: 'sms', - description: 'The resource to operate on.' + description: 'The resource to operate on.', }, - { displayName: 'Operation', name: 'operation', type: 'options', displayOptions: { show: { - resource: ['sms'] - } + resource: [ + 'sms', + ], + }, }, options: [ { name: 'Send', value: 'send', - description: 'Send text messages (SMS)' - } + description: 'Send text messages (SMS)', + }, ], default: 'send', - description: 'The operation to perform.' + description: 'The operation to perform.', }, // ---------------------------------- @@ -77,11 +82,15 @@ export class MessageBird implements INodeType { required: true, displayOptions: { show: { - operation: ['send'], - resource: ['sms'] - } + operation: [ + 'send', + ], + resource: [ + 'sms', + ], + }, }, - description: 'The number from which to send the message.' + description: 'The number from which to send the message.', }, { displayName: 'To', @@ -92,13 +101,16 @@ export class MessageBird implements INodeType { required: true, displayOptions: { show: { - operation: ['send'], - resource: ['sms'] - } + operation: [ + 'send', + ], + resource: [ + 'sms', + ], + }, }, - description: 'All recipients separated by commas.' + description: 'All recipients separated by commas.', }, - { displayName: 'Message', name: 'message', @@ -107,11 +119,15 @@ export class MessageBird implements INodeType { required: true, displayOptions: { show: { - operation: ['send'], - resource: ['sms'] - } + operation: [ + 'send', + ], + resource: [ + 'sms', + ], + }, }, - description: 'The message to be send.' + description: 'The message to be send.', }, { displayName: 'Additional Fields', @@ -125,8 +141,7 @@ export class MessageBird implements INodeType { name: 'createdDatetime', type: 'dateTime', default: '', - description: - 'The date and time of the creation of the message in RFC3339 format (Y-m-dTH:i:sP).' + description: 'The date and time of the creation of the message in RFC3339 format (Y-m-dTH:i:sP).', }, { displayName: 'Datacoding', @@ -135,27 +150,26 @@ export class MessageBird implements INodeType { options: [ { name: 'Auto', - value: 'auto' + value: 'auto', }, { name: 'Plain', - value: 'plain' + value: 'plain', }, { name: 'Unicode', - value: 'unicode' - } + value: 'unicode', + }, ], default: '', - description: - 'Using unicode will limit the maximum number of characters to 70 instead of 160.' + description: 'Using unicode will limit the maximum number of characters to 70 instead of 160.', }, { displayName: 'Gateway', name: 'gateway', type: 'number', default: '', - description: 'The SMS route that is used to send the message.' + description: 'The SMS route that is used to send the message.', }, { displayName: 'Group IDs', @@ -163,8 +177,7 @@ export class MessageBird implements INodeType { placeholder: '1,2', type: 'string', default: '', - description: - 'Group IDs separated by commas, If provided recipients can be omitted.' + description: 'Group IDs separated by commas, If provided recipients can be omitted.', }, { displayName: 'Message Type', @@ -174,39 +187,36 @@ export class MessageBird implements INodeType { options: [ { name: 'Flash', - value: 1 + value: 1, }, { name: 'Normal', - value: 0 - } + value: 0, + }, ], default: 1, - description: - 'Indicated the message type. 1 is a normal message, 0 is a flash message.' + description: 'Indicated the message type. 1 is a normal message, 0 is a flash message.', }, { displayName: 'Reference', name: 'reference', type: 'string', default: '', - description: 'A client reference.' + description: 'A client reference.', }, { displayName: 'Report Url', name: 'reportUrl', type: 'string', default: '', - description: - 'The status report URL to be used on a per-message basis.
Reference is required for a status report webhook to be sent.' + description: 'The status report URL to be used on a per-message basis.
Reference is required for a status report webhook to be sent.', }, { displayName: 'Scheduled Date-time', name: 'scheduledDatetime', type: 'dateTime', default: '', - description: - 'The scheduled date and time of the message in RFC3339 format (Y-m-dTH:i:sP).' + description: 'The scheduled date and time of the message in RFC3339 format (Y-m-dTH:i:sP).', }, { displayName: 'Type', @@ -215,28 +225,26 @@ export class MessageBird implements INodeType { options: [ { name: 'Binary', - value: 'binary' + value: 'binary', }, { name: 'Flash', - value: 'flash' + value: 'flash', }, { name: 'SMS', - value: 'sms' - } + value: 'sms', + }, ], default: '', - description: - 'The type of message.
Values can be: sms, binary, or flash.' + description: 'The type of message.
Values can be: sms, binary, or flash.', }, { displayName: 'Type Details', name: 'typeDetails', type: 'string', default: '', - description: - 'A hash with extra information.
Is only used when a binary message is sent.' + description: 'A hash with extra information.
Is only used when a binary message is sent.', }, { displayName: 'Validity', @@ -244,13 +252,13 @@ export class MessageBird implements INodeType { type: 'number', default: 1, typeOptions: { - minValue: 1 + minValue: 1, }, - description: 'The amount of seconds that the message is valid.' - } - ] - } - ] + description: 'The amount of seconds that the message is valid.', + }, + ], + }, + ], }; async execute(this: IExecuteFunctions): Promise {