n8n/packages/nodes-base/nodes/Cal/CalTrigger.node.ts

215 lines
5.4 KiB
TypeScript
Raw Normal View History

feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
import {
IHookFunctions,
IWebhookFunctions,
} from 'n8n-core';
import {
ILoadOptionsFunctions,
INodePropertyOptions,
INodeType,
INodeTypeDescription,
IWebhookResponseData,
} from 'n8n-workflow';
import {
calApiRequest,
sortOptionParameters,
} from './GenericFunctions';
export class CalTrigger implements INodeType {
description: INodeTypeDescription = {
displayName: 'Cal Trigger',
name: 'calTrigger',
icon: 'file:cal.svg',
group: ['trigger'],
version: 1,
subtitle: '=Events: {{$parameter["events"].join(", ")}}',
description: 'Handle Cal events via webhooks',
defaults: {
name: 'Cal Trigger',
color: '#888',
},
inputs: [],
outputs: ['main'],
credentials: [
{
name: 'calApi',
required: true,
},
],
webhooks: [
{
name: 'default',
httpMethod: 'POST',
responseMode: 'onReceived',
path: 'webhook',
},
],
properties: [
{
displayName: 'Events',
name: 'events',
type: 'multiOptions',
options: [
{
name: 'Booking Cancelled',
value: 'BOOKING_CANCELLED',
description: 'Receive notifications when a Cal event is canceled',
},
2022-06-05 10:43:00 -07:00
{
name: 'Booking Created',
value: 'BOOKING_CREATED',
description: 'Receive notifications when a new Cal event is created',
},
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
{
name: 'Booking Rescheduled',
value: 'BOOKING_RESCHEDULED',
description: 'Receive notifications when a Cal event is rescheduled',
},
],
default: [],
required: true,
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Field',
default: {},
options: [
{
displayName: 'App ID',
name: 'appId',
type: 'string',
2022-06-05 10:43:00 -07:00
description: 'The ID of the App to monitor',
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
default: '',
},
{
displayName: 'EventType Name or ID',
name: 'eventTypeId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getEventTypes',
},
2022-07-14 13:05:11 -07:00
description: 'The EventType to monitor. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
default: '',
},
{
displayName: 'Payload Template',
name: 'payloadTemplate',
type: 'string',
2022-06-05 10:43:00 -07:00
description: 'Template to customize the webhook payload',
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
default: '',
typeOptions: {
2022-06-05 10:43:00 -07:00
alwaysOpenEditWindow: true,
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
rows: 4,
2022-06-05 10:44:04 -07:00
},
},
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
],
},
],
};
methods = {
loadOptions: {
async getEventTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const data = await calApiRequest.call(this, 'GET', '/event-types', {});
for (const item of data.event_types) {
returnData.push({
name: item.title,
value: item.id,
});
}
return sortOptionParameters(returnData);
},
},
};
// @ts-ignore (because of request)
webhookMethods = {
default: {
async checkExists(this: IHookFunctions): Promise<boolean> {
const webhookUrl = this.getNodeWebhookUrl('default');
const webhookData = this.getWorkflowStaticData('node');
const events = this.getNodeParameter('events') as string;
// Check all the webhooks which exist already if it is identical to the
// one that is supposed to get created.
const data = await calApiRequest.call(this, 'GET', '/hooks', {});
for (const webhook of data.webhooks) {
if (webhook.subscriberUrl === webhookUrl) {
for (const event of events) {
if (!webhook.eventTriggers.includes(event)) {
return false;
}
}
// Set webhook-id to be sure that it can be deleted
webhookData.webhookId = webhook.id as string;
return true;
}
}
return false;
},
async create(this: IHookFunctions): Promise<boolean> {
const webhookData = this.getWorkflowStaticData('node');
const subscriberUrl = this.getNodeWebhookUrl('default');
const eventTriggers = this.getNodeParameter('events') as string;
const options = this.getNodeParameter('options');
const active = true;
const body = {
subscriberUrl,
eventTriggers,
active,
2022-06-05 10:44:04 -07:00
...options as object,
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
};
const responseData = await calApiRequest.call(this, 'POST', '/hooks', body);
if (responseData.webhook.id === undefined) {
// Required data is missing so was not successful
return false;
}
webhookData.webhookId = responseData.webhook.id as string;
return true;
},
async delete(this: IHookFunctions): Promise<boolean> {
const webhookData = this.getWorkflowStaticData('node');
if (webhookData.webhookId !== undefined) {
const endpoint = `/hooks/${webhookData.webhookId}`;
try {
await calApiRequest.call(this, 'DELETE', endpoint);
} catch (error) {
return false;
}
// Remove from the static workflow data so that it is clear
// that no webhooks are registred anymore
delete webhookData.webhookId;
}
return true;
},
},
};
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
const req = this.getRequestObject();
return {
workflowData: [
2022-06-05 10:43:00 -07:00
this.helpers.returnJsonArray({
triggerEvent: req.body.triggerEvent,
createdAt: req.body.createdAt,
2022-06-05 10:44:04 -07:00
...req.body.payload,
2022-06-05 10:43:00 -07:00
}),
feat(Cal Trigger Node): Add cal.com Trigger Node (#3439) * options and operations added * IT WORKS! * Added ReturnALL to GET method * comit for PR * updating shared operations * :zap: linter fixes * :zap: improvements * :zap: lock file fix * :zap: credentials update * added cal trigger node * Removed console log * Added advanced fields * feat(core): Add support for pairedItem (beta) (#3012) * :sparkles: Add pairedItem support * :shirt: Fix lint issue * :bug: Fix resolution in frontend * :bug: Fix resolution issue * :bug: Fix resolution in frontend * :bug: Fix another resolution issue in frontend * :zap: Try to automatically add pairedItem data if possible * :zap: Cleanup * :zap: Display expression errors in editor UI * :bug: Fix issue that it did not display errors in production * :bug: Fix auto-fix of missing pairedItem data * :bug: Fix frontend resolution for not executed nodes * :zap: Fail execution on pairedItem resolve issue and display information about itemIndex and runIndex * :zap: Allow that pairedItem is only set to number if runIndex is 0 * :sparkles: Improve Expression Errors * :zap: Remove no longer needed code * :zap: Make errors more helpful * :zap: Add additional errors * :shirt: Fix lint issue * :zap: Add pairedItem support to core nodes * :zap: Improve support in Merge-Node * :zap: Fix issue with not correctly converted incoming pairedItem data * :bug: Fix frontend resolve issue * :bug: Fix frontend parameter name display issue * :zap: Improve errors * :shirt: Fix lint issue * :zap: Improve errors * :zap: Make it possible to display parameter name in error messages * :zap: Improve error messages * :zap: Fix error message * :zap: Improve error messages * :zap: Add another error message * :zap: Simplify * refactor(core): Deduplicate encryption logic (#3434) * :zap: added function to credentials helper * Refactor function name * Fix lint issues Co-authored-by: Michael Kret <michael.k@radency.com> * test: Add timeout to `beforeAll` in users suite (#3433) * refactor(editor): Change node-setting's parameters order (#3435) * fix(core): Fix `user-management:reset` command (#3403) * :bug: Fix `email` setting * :test_tube: Add test * :test_tube: Add expectation for user email * :zap: Replace request with helper * 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> * fix(Hubspot Node): Fix loading of Contacts (#3426) * feat(QuickBooks Node): Add optional Tax item field (#3404) * Added tax refs * Nodelinter fixes * fix(EmailReadImap Node): Improve error handling (#3465) * refactor(core): Remove a floating promise * :zap: Improvements Co-authored-by: alex meredith <alexanderm@packt.com> Co-authored-by: ajmeredith1200 <100841449+ajmeredith1200@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> 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: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
2022-06-05 10:30:54 -07:00
],
};
}
}