mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
7fc7b65c15
* upstream merge * ⚡ version 2 support for trigger * ⚡ lock fix * ⚡ typo fix * fix(core): Fix logger error when logging circular json (#3583) * Fix logger error when logging circular json * add type * feat: Migrated to npm release of riot-tmpl fork (#3581) * feat: Migrated to npm release of riot-tmpl fork. * fix: Updated imports to use @n8n_io/riot-tmpl * fix: Fixed Logger.ts types. Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * fix: Fix issue with required optional parameters (#3577) * fix: Correct misfix from `node-param-display-name-wrong-for-dynamic-multi-options` (#3575) * 👕 Correct misfix * 👕 Fix build * fix(editor): Fix credentials rendering when the node has no parameters (#3563) * test: Fix failing tests on MySQL for Public API (#3520) * ⚡ Generalize transformer * ⚡ Use transformer * 🧪 Fix expectations * fix(LinkedIn Node): Fix LinkedIn image preview (#3528) * Fixed issue with Preview not being generated when description and title is blank * Nodelinter fixes * Fixed lint issue... build should work Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * ⚡ Improvements * fix: Fix issue with required optional parameters (#3597) * Fixed issue with Reddit node not getting all posts * Fixed remaining issues with required options * test: Make oclif commands testable (#3571) * ➕ Add `@oclif/core` * 📦 Update `package-lock.json` * 📘 Export `Logger` for use as type * ✨ Create `BaseCommand` * 🐛 Prevent DB re-init * ♻️ Refactor `reset` command * 🧪 Fix `reset` test * 👕 Add lint exception Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * fix(HTTP Request Node): Make all OAuth2 credentials work with HTTP Request Node (#3503) * fix(Salesforce Node): Fix issue with lead status not using name on update (#3599) * Fixed issue with lead status not using name on update * 🔥 Remove unnecessary line Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * refactor: Automatically add fileExtension from FileTypeResult to binary data (#3591) * ♻️ Add fileExtension from FileTypeResult to buffer data * ⚡ Minor improvement Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> * feat(core): Expose item index being processed (#3590) * 🧑💻 Expose item index being processed * ✅ Fix tests for getCurrentItemIndex * ✅ Fix tests for getCurrentItemIndex * ⚡ Rename method Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> * feat(core) Simplify authentication type (#3578) * ⚡ Add generic auth type * ⚡ Remove queryAuth * ⚡ Remove bearer * ⚡ Remove headerAuth * ⚡ Remove basicAuth * ⚡ Adjust tests * ⚡ Small improvements * 👕 Fix lint issue * fix(editor): Display full text of long error messages (#3561) * feat(core): Give access to getBinaryDataBuffer in preSend method (#3588) * fix(Cortex Node): Fix issue that not all Analyzers got returned (#3606) * Updated Cortex analyzer search url to fetch all * Updated Cortex credentials * Nodelinter fixes * More fixes * feat(Clockify Node): Add more resources and improvements (#3411) * ✨ Add more Clockify resources * Moved headers in credentials file and added testing * add address to additional fields * Add pagination to workflow * 🎨 Rename additional fields to filter * Remove non-required fields to additional fields * 🔥 Remove loading of client id * ⚡ Improvements * ⚡ Small change Co-authored-by: pemontto <pemontto@gmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * ⬆️ Update package-lock.json file * 🔖 Release n8n-workflow@0.106.0 * ⬆️ Set n8n-workflow@0.106.0 on n8n-core * 🔖 Release n8n-core@0.124.0 * ⬆️ Set n8n-core@0.124.0 and n8n-workflow@0.106.0 on n8n-node-dev * 🔖 Release n8n-node-dev@0.63.0 * ⬆️ Set n8n-core@0.124.0 and n8n-workflow@0.106.0 on n8n-nodes-base * 🔖 Release n8n-nodes-base@0.182.0 * ⬆️ Set n8n-workflow@0.106.0 on n8n-editor-ui * 🔖 Release n8n-editor-ui@0.150.0 * ⬆️ Set n8n-core@0.124.0, n8n-editor-ui@0.150.0, n8n-nodes-base@0.182.0 and n8n-workflow@0.106.0 on n8n * 🔖 Release n8n@0.184.0 * 🔖 Update main package.json to 0.184.0 * 📚 Update CHANGELOG.md with version 0.184.0 * 🧪 Truncate mapping tables * 🧪 Add DB init timeout * 🧪 Separate statements when clearing mappings in MySQL * 🧪 Hide logging during tests * 🧪 Make PG truncation sequential * 🧪 Add missing SMTP timeout * 🎨 Formatting fixes * feat(Wordpress Node): Add post template option (#3139) * Add wordpress post template option * Fix: Add UI components and fix typo * Add elementor template options * Add Standard option * 🔨 ability to use non elementor template, credential test, linter fixes * 🔨 removed commented code * ⚡ Improvements Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * refactor(Notion Node): Add content access note to Notion Trigger (#3625) * Added notice to Notion trigger * Changed position * fix(Todoist Node): Fix multiple item support (#3614) * Fixed multiple items handling with todoist node * Removed unused import * fix(Hubspot Node): Fix search endpoints (#3640) * Fixed Hubspot search endpoints * 👕 Fix lint issue Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> * feat: Add debug configuration file with instructions (#3631) * Add debug configuration file with instructions * Add debugger.md file for clarifications * Moved debugger file to vscode folder * feat(Webflow Trigger Node): Reduce chance of webhook duplication and add credential test (#3594) * upstream merge * ⚡ additional check for webhook, credentials update * 🔥 Remove unnecessary condition * ⚡ Change credential injection to generic type * 👕 Fix linting issue Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * fix(Odoo Node): Prevent possible issues with some custom fields (#3496) * ci: Using npm ci instead of npm install to reuse package-lock.json (#3648) * refactor: Apply more `eslint-plugin-n8n-nodes-base` rules (#3624) * ⬆️ Upgrade `eslint-plugin-n8n-nodes-base` * 📦 Update `package-lock.json` * 🔧 Adjust renamed filesystem rules * ✏️ Alphabetize ruleset * ⚡ Categorize overrides * ⚡ Set renamings in lint exceptions * ⚡ Run baseline `lintfix` * ⚡ Update linting scripts * 👕 Apply `node-param-description-missing-from-dynamic-multi-options` * 👕 Apply `cred-class-field-name-missing-oauth2` (#3627) * Rule working as intended * Removed comments * Move cred rule to different rule set * 👕 Apply `node-param-array-type-assertion` * 👕 Apply `node-dirname-against-convention` * Apply `cred-class-field-display-name-oauth2` (#3628) * Apply `node-execute-block-wrong-error-thrown` * Apply `node-class-description-display-name-unsuffixed-trigger-node` * Apply `node-class-description-name-unsuffixed-trigger-node` * Apply `cred-class-name-missing-oauth2-suffix` (#3636) * Rule working as intended, add exception to existing nodes * 👕 Apply `cred-class-field-name-uppercase-first-char` (#3638) * ⬆️ Upgrade to plugin version 1.2.28 * 📦 Update `package-lock.json` * 👕 Update lintings with 1.2.8 change * 👕 Apply `cred-class-field-name-unsuffixed` * 👕 Apply `cred-class-name-unsuffixed` * 👕 Apply `node-class-description-credentials-name-unsuffixed` * ✏️ Alphabetize rules * ➖ Remove `nodelinter` package * 📦 Update `package-lock.json` * ⚡ Consolidate `lint` and `lintfix` scripts Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> * feat(Jira Node): Use Jira rendered fields with simplify option (#3323) * 💄 Use Jira rendered fields with simplify * 🐛 Merge the renderedField results with fields * ⚡ improvements * ⚡ Improvements Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * ci: Fix Vue build issues (#3650) * lock vue versions to patch. Not use docker cache in nightly builds * revert to using npm install * ⬆️ Update package-lock.json file * fix(Sticky Node): Fix main header hiding (#3654) * feat(core): Add `action` to `INodePropertyOptions` (#3610) * 📘 Add `action` to `INodeProperties` * 📘 Add `action` to `INodePropertyOptions` * 🔥 Remove unneeded key * fix(KoboToolbox Node): Improve attachment matching logic and GeoJSON Polygon format (#3394) * Fix query,sort + use question name in attachments * Change Menu structure * kobo: Clearer webhook name * [kobo]: fix when no json filter * Fix ambiguous attachment matching + GeoJSON Polygon format * Fix kobo function * Fix extra descriptions * fix(KoboToolbox Node): Improve attachment matching logic and GeoJSON Polygon format (#3535) * Fix query,sort + use question name in attachments * Change Menu structure * kobo: Clearer webhook name * [kobo]: fix when no json filter * Fix ambiguous attachment matching + GeoJSON Polygon format * Fix kobo function * Fix extra descriptions * Add credentials injection and testing * Fix credential injection and lint issues Co-authored-by: Yann Jouanique <yann.jouanique@oneacrefund.org> Co-authored-by: Yann Jouanique <yann.jouanique@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * feat(Google Ads Node): Add new node (#3526) * Add basic layout with icon for Google Ads * Add node versioning(V1) * Add node and credential to package * Add basic layout with icon for Google Ads * Add node versioning(V1) * Add node and credential to package * Add api call to getall * Fix formdata in the body for the request * N8N-2928 Added custom queries to campaign * Fix header bug and add developer-token field * Add operation and fields to campaign new format * Add more configurations and queries * Add Invoice ressources and operations * Remov old version from the node * Fixed bud with typo * Correctly prepends the baseURL * add query to invocie request * Fixes header not parsing the expression * Invoice param changes * Fixes bug related to headers not being parsed, and bug with auth * Remove useless imports * Added analytics to google ad node and removed useless header * Removed url for testing * Fixed inconsistent behaviour with the access token not being refreshed * Added placeholders to help user * Removed useless comments * Resolved name confusion * Added support for body in a GET method * Removed hyphens, parse body's expression * Renamed operation for clarity * Remove unused code * Removed invoice resource and fixed bug with body and headers The invoice operation was removed since it does not reflect what a user would expect from it. Google ADS invoices are only used for big advertisers where invoicing is performed after the end of the month and for big sums. This would be misleading for the majority of the users expecting an expenses report. Also fixed a bug with header and body being sent since it was broken for multiple input rows. The first execution would override all others. Lastly, made some improvements to the node itself by transforming data, adding filters and operations. * Improve campagin operation and remove analytics; fix tests * Improve tooltips and descriptions * Fix lint issues * Improve tooltip to explain amounts in micros * Change wording for micros * Change the fix to a more elegant solution Co-authored-by: Cyril Gobrecht <cyril.gobrecht@gmail.com> Co-authored-by: Aël Gobrecht <ael.gobrecht@gmail.com> * feat(DeepL Node): Add support for longer texts + Credential tests (#3651) * Updated DeepL to send data with Body instead of QS allowing larger translations * Updated Credentials and added test * feat(Facebook Node): Add support for Facebook Graph API versions 14 (#3656) * ⬆️ Update package-lock.json file * ⬇️ Downgrading fontawesome to v5 (#3658) * ⬆️ Update package-lock.json file * 🔖 Release n8n-workflow@0.107.0 * ⬆️ Set n8n-workflow@0.107.0 on n8n-core * 🔖 Release n8n-core@0.125.0 * ⬆️ Set n8n-core@0.125.0 and n8n-workflow@0.107.0 on n8n-node-dev * 🔖 Release n8n-node-dev@0.64.0 * ⬆️ Set n8n-core@0.125.0 and n8n-workflow@0.107.0 on n8n-nodes-base * 🔖 Release n8n-nodes-base@0.183.0 * 🔖 Release n8n-design-system@0.25.0 * ⬆️ Set n8n-design-system@0.25.0 and n8n-workflow@0.107.0 on n8n-editor-ui * 🔖 Release n8n-editor-ui@0.151.0 * ⬆️ Set n8n-core@0.125.0, n8n-editor-ui@0.151.0, n8n-nodes-base@0.183.0 and n8n-workflow@0.107.0 on n8n * 🔖 Release n8n@0.185.0 * 🔖 Update main package.json to 0.185.0 * 📚 Update CHANGELOG.md with version 0.185.0 * feat(Redis Node): Add push and pop operations (#3127) * ✨ Add push and pop operations * ⚡ linter fixes * ⚡ linter fixes * 🐛 Fix errors and remove overwrite * 🐛 Remove errant hint * ⚡ Small change Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * refactor: Telemetry updates (#3529) * Init unit tests for telemetry * Update telemetry tests * Test Workflow execution errored event * Add new tracking logic in pulse * cleanup * interfaces * Add event_version for Workflow execution count event * add version_cli in all events * add user saved credentials event * update manual wf exec finished, fixes * improve typings, lint * add node_graph_string in User clicked execute workflow button event * add User set node operation or mode event * Add instance started event in FE * Add User clicked retry execution button event * add expression editor event * add input node type to add node event * add User stopped workflow execution wvent * add error message in saved credential event * update stop execution event * add execution preflight event * Remove instance started even tfrom FE, add session started to FE,BE * improve typing * remove node_graph as property from all events * move back from default export * move psl npm package to cli package * cr * update webhook node domain logic * fix is_valid for User saved credentials event * fix Expression Editor variable selector event * add caused_by_credential in preflight event * undo webhook_domain * change node_type to full type * add webhook_domain property in manual execution event (#3680) * add webhook_domain property in manual execution event * lint fix * feat(SpreadsheetFile Node): Allow skipping headers when writing spreadsheets (#3234) * ⚡ Allow skipping headers when writing spreadsheets * Fix type on sheet options * fix(Telegram Node): Fix sending binaryData media (photo, document, video etc.) (#3408) * fixed send media (photo, document, video etc.) issues on Telegram Node * fixed send media (photo, document, video etc.) issues on Telegram Node * file name is optional now * ⚡ lock file and linter fix * ⚡ improvements * ⚡ fixes * ⚡ Improvements * ⚡ Add placeholder to File Name * ⚡ Add error message * 🔥 Remove requestWithAuthentication * ⚡ Fix typo * 👕 Fix linting issues Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat(Freshworks CRM Node): Add Search + Lookup functionality (#3131) * Add fields and Ops for Lookup Search * Adds Search (Search + Lookup) operations * 🔨 credentials update * 🔨 improvements * ⚡ clean up and linter fixes * ⚡ merged search and query, more hints * ⚡ Improvements * ⚡ Add generic type to authentication method Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat(Jira Trigger Node): Add optional query auth for security (#3172) * ✨ Add query auth for Jira Trigger security * ⚡ small fixes: * ⚡ Response with 403 when invalid query authentication * 👕 Fix linting issues Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat(Elasticsearch Node): Add credential tests, index pipelines and index refresh (#2420) * 🐛 ES query string not passed to request * 🔑 Add ES credential test * ✨ Add ES index pipelines and index refresh * 🔨 merge fix * ⚡ renamed additional filds as options * ⚡ added ignore ssl to credentials * ⚡ Improvements * ⚡ Improvements * feat(Redis Node): Add push and pop operations (#3127) * ✨ Add push and pop operations * ⚡ linter fixes * ⚡ linter fixes * 🐛 Fix errors and remove overwrite * 🐛 Remove errant hint * ⚡ Small change Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * refactor: Telemetry updates (#3529) * Init unit tests for telemetry * Update telemetry tests * Test Workflow execution errored event * Add new tracking logic in pulse * cleanup * interfaces * Add event_version for Workflow execution count event * add version_cli in all events * add user saved credentials event * update manual wf exec finished, fixes * improve typings, lint * add node_graph_string in User clicked execute workflow button event * add User set node operation or mode event * Add instance started event in FE * Add User clicked retry execution button event * add expression editor event * add input node type to add node event * add User stopped workflow execution wvent * add error message in saved credential event * update stop execution event * add execution preflight event * Remove instance started even tfrom FE, add session started to FE,BE * improve typing * remove node_graph as property from all events * move back from default export * move psl npm package to cli package * cr * update webhook node domain logic * fix is_valid for User saved credentials event * fix Expression Editor variable selector event * add caused_by_credential in preflight event * undo webhook_domain * change node_type to full type * add webhook_domain property in manual execution event (#3680) * add webhook_domain property in manual execution event * lint fix * feat(SpreadsheetFile Node): Allow skipping headers when writing spreadsheets (#3234) * ⚡ Allow skipping headers when writing spreadsheets * Fix type on sheet options * fix(Telegram Node): Fix sending binaryData media (photo, document, video etc.) (#3408) * fixed send media (photo, document, video etc.) issues on Telegram Node * fixed send media (photo, document, video etc.) issues on Telegram Node * file name is optional now * ⚡ lock file and linter fix * ⚡ improvements * ⚡ fixes * ⚡ Improvements * ⚡ Add placeholder to File Name * ⚡ Add error message * 🔥 Remove requestWithAuthentication * ⚡ Fix typo * 👕 Fix linting issues Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat(Freshworks CRM Node): Add Search + Lookup functionality (#3131) * Add fields and Ops for Lookup Search * Adds Search (Search + Lookup) operations * 🔨 credentials update * 🔨 improvements * ⚡ clean up and linter fixes * ⚡ merged search and query, more hints * ⚡ Improvements * ⚡ Add generic type to authentication method Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat(Jira Trigger Node): Add optional query auth for security (#3172) * ✨ Add query auth for Jira Trigger security * ⚡ small fixes: * ⚡ Response with 403 when invalid query authentication * 👕 Fix linting issues Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * ⚡ Changed authentication to use the generic type Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Ahsan Virani <ahsan.virani@gmail.com> Co-authored-by: Nicholas Penree <nick@penree.com> Co-authored-by: Taha Sönmez <35905778+tahasonmez@users.noreply.github.com> Co-authored-by: Jan Thiel <JanThiel@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> * feat(Postgres Node): Improvement handling of large numbers (#3360) * 🔨 fix * ⚡ ui update * feat(Customer.io Node): Add support for tracking API region selection (#3378) * support for customer.io tracking api endpoint region selection If your account is based in our EU region use the EU endpoints (track-eu.customer.io) for US (other than EU) tracking endpoints (track.customer.io). * Changed name to keep constistency with other nodes * Switched to credentials injection * Add throwing error when unknow way of authenticating * Fixed url for http request * Add hint to region field about being omited with http node * Fix bug for credentials working with http node * Improve IF by deduplicating code Co-authored-by: h4ux <alon@h4ux.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> * feat(AWS DynamoDB Node): Improve error handling + add optional GetAll Scan FilterExpression (#3318) * FilterExpression, ExpressionAttributeValues optional * Returns AWS JSON messages not in response body * 🔨 fixed filterExpression missing in request body * ⚡ linter fixes * Reintroduced 'fix' block at :311 results in duplication * ⚡ lock file fix * ⚡ fix Co-authored-by: Michael Kret <michael.k@radency.com> * fix(EmailReadImap Node): Improve handling of network problems (#3406) * ⚡ fix * ⚡ tlsOptions fix * 👕 Fix lint issue * feat(Rename Node): Add regex replace (#2576) * ✨ Add regex replace for Rename node * ⚡ ability to add multiple regex, case insensetivity option, UI imrovements * ⚡ UI update: * ⚡ removed hint * 🔨 UI change, regex under additional options * ⚡ added notice * ⚡ Fix order and set correct default value * 👕 Fix lint issue Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> * feat(Elasticsearch Node): Add 'Source Excludes' and 'Source Includes' options on 'Document: getAll' operation (#3660) * Added 'Source Excludes' and 'Source Includes' options on 'document: getAll' operation * Updated credentials to use new system Co-authored-by: mp <miguel@mconf.com> Co-authored-by: miguel-mconf <107938570+miguel-mconf@users.noreply.github.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * feat(AWS DynamoDB Node): Improve error handling (#3661) Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * fix(Google Drive Node): Process all input items with List operation (#3525) * Fix: process all input items in GDrive list * ⚡ linter fixes * ⚡ added versioning * ⚡ fix option naming * ⚡ removed option for choosing list operation behavior * ⚡ Improvement Co-authored-by: Yann Jouanique <yann.jouanique@gmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat: Updated multiple credentials with tests and allow to be used on HTTP Request Node (#3670) * Notion cred updated * Airtable new cred * revamped twilio cred * urlscanlo revamp cred * Wordpress revamp cred with testing * SendGrid cred revamped * 🐛 Fix imports * 🐛 Fixes imports in urlscanio * Fix airtable cred injection * Fixes notion request, changes way of cred injection * Change auth type from method to generic * Fix minor issues * Fix lint issue Co-authored-by: Omar Ajoue <krynble@gmail.com> * refactor: Add `action` to all operations on all nodes (#3655) * 👕 Add `action` to `INodePropertyOptions` * 👕 Apply `node-param-operation-option-without-action` * ✏️ Fix add/remove phrasing * ✏️ Fix email template phrasing * ✏️ Fix add/remove phrasing * ✏️ Fix custom fields phrasing * ✏️ Fix job report phrasing * ✏️ Fix query phrasing * ✏️ Various phrasing fixes * ✏️ Fix final phrasings * ✏️ Remove `conversation` * ✏️ Fix plural * refactor(editor): Create N8nCheckbox Vue component (#3678) * ✨ Implementing N8nCheckbox Vue component * ✨ Added checkbox support to N8nFormInput component * 👌 Updating n8n-checkbox component so it supports indeterminate state and input event * 💄 Adding the `labelSize` property to the `N8nCheckbox` component * feat: Add item information to more node errors (#3681) * ⚡ Add `itemIndex` to node-thrown errors * ⚡ Add some missing item indexes * fix(editor): Fix error after multiple executions (#3697) * 📌 Pin `vue-fragment` to 1.5.1 * 📦 Update `package-lock.json` * ⬆️ Update package-lock.json file * 🔖 Release n8n-workflow@0.108.0 * ⬆️ Set n8n-workflow@0.108.0 on n8n-core * 🔖 Release n8n-core@0.126.0 * ⬆️ Set n8n-core@0.126.0 and n8n-workflow@0.108.0 on n8n-node-dev * 🔖 Release n8n-node-dev@0.65.0 * ⬆️ Set n8n-core@0.126.0 and n8n-workflow@0.108.0 on n8n-nodes-base * 🔖 Release n8n-nodes-base@0.184.0 * 🔖 Release n8n-design-system@0.26.0 * ⬆️ Set n8n-design-system@0.26.0 and n8n-workflow@0.108.0 on n8n-editor-ui * 🔖 Release n8n-editor-ui@0.152.0 * ⬆️ Set n8n-core@0.126.0, n8n-editor-ui@0.152.0, n8n-nodes-base@0.184.0 and n8n-workflow@0.108.0 on n8n * 🔖 Release n8n@0.186.0 * 👕 Fix lint issue * 📚 Update CHANGELOG.md with version 0.186.0 * 🔖 Update main package.json to 0.186.0 * fix(Airtable Node): Fix authentication issue (#3709) * 🔖 Release n8n-nodes-base@0.184.1 * ⬆️ n8n-nodes-base@0.186.1 on n8n * 🔖 Release n8n@0.186.1 * 📚 Update CHANGELOG.md with version 0.186.1 * 🔖 Update main package.json to 0.186.1 * 🔥 Remove access token credential from package.json * fix: Fix broken links in nodes (#3716) * test: Mock mailer service (#3711) * 🧪 Mock mailer service * 🔥 Remove unneeded imports * ⚡ Improvements * ⚡ Remove array from version property * 🔥 Remove console.log() * fix(editor): Hide 'Execute previous node' button in readonly mode (#3714) * ⚡ Also hide button subtext in readonly mode (#3718) * feat(Google Drive Node): Add move to trash support (#3693) * feat(Google Drive Node): Add move to trash support * ⚡ Improvements Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * feat(Shopify Node): Add OAuth support (#3389) * ⚡ wip * ⚡ Add includeAccessTokenInHeader option to OAuth2 * 🔨 fixed build error, fixed trigger node when using token auth * 🔨 fixed trigger when using oauth2 * 🔨 changed default auth method to access token * ⚡ Improvements * ⚡ Improvements * ⚡ Improvements * ⚡ Rename includeAccessTokenInHeader to keyToIncludeInAccessTokenHeader * ⚡ Assign values to only header property * 🔥 Remove unreachable code * ⚡ Add keyToIncludeInAccessTokenHeader when isN8nRequest * ⚡ Add CC grant type when isN8nRequest Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * feat: Add more credentials tests (#3668) * ✨ Add injection to notion, Add test to notion in cred * 🔥 Remove unuse method * 🎨 Move testing from node file to cred file * ✨ Add injection and testing in facebook graph * Add cred injec with testing * Add Cred injection and cred test * Add cred injection, and cred testing for typeform, fix issue in clickup * Add cred injection, move testing inside creds * Add cred injection and cred testing to SendGrid * Add cred injection and cred testing to woocommerce * Add cred injection, add cred test to gitlab * 🔥 Fix duplicated imports in Mautic cred * 🔥 removed unused credentials testing in node * Add cred injection, cred testing, handles slash trailing for Grafana node * Add cred injection, cred testing to shopify * Add cred injection , add cred testing to stripe * changed cred injection, add testing to cred for mattermost * add cred injection and testing for dropbox * Add cred injection, cred testing to webflow * ✨ Add cred injection and cred test to nocodb * ✨ Add cred injection, cred testing to mailchimp * 🐛 fix a bug In credentials testing * ✨ Add cred injection, cred testing to sms77 * ✨ Add cred injection, cred testing to ActiveCampaign * Add cred injection, cred testing to TheHive * ✨ Add cred injection, add cred testing to ApiTemplateio * ✨ Add cred injection, add cred testing for zoom * ✨ Add cred injection, cred testing to rocketchat * ✨ Add cred injection, add cred test to getResponse * 🔥 Remove useless authentcate creds and testing from facebookGraphApp * 🔥 Remove useless imports in FacebookGrappApp credentials file * 🔥 Removed useless imports and if statement * 🐛 Add version to header when testing cred Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> * fix(Baserow Node): Fix issue that table names are not getting pulled in new version (#3721) * refactor: Move OAuth2 endpoints to OAuth2 controller (#3450) * Move oauth2 endpoints to oauth2 controller * Remove old oauth2-credential auth endpoint from server.ts * Move OAuth2 callback endpoint to controller * Fix tests and eslint issues * Fix typo * fix lint issues * update package-lock * Import lodash methods individually * Minimise lint rule disables * Cleanup * rebase * CR * npm package: Remove lodash, use lodash.intersect * fixups * rebase * ⚡ Simplify code Co-authored-by: Ahsan Virani <ahsan.virani@gmail.com> Co-authored-by: Alex Grozav <alex@grozav.com> Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Milorad FIlipović <miloradfilipovic19@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: pemontto <pemontto@gmail.com> Co-authored-by: Cornelius Suermann <cornelius@n8n.io> Co-authored-by: Zapfmeister <zapfmeister@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: pemontto <939704+pemontto@users.noreply.github.com> Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> Co-authored-by: Yann Jouanique <yann.jouanique@gmail.com> Co-authored-by: Yann Jouanique <yann.jouanique@oneacrefund.org> Co-authored-by: Cyril Gobrecht <cyril.gobrecht@gmail.com> Co-authored-by: Nicholas Penree <nick@penree.com> Co-authored-by: Taha Sönmez <35905778+tahasonmez@users.noreply.github.com> Co-authored-by: Jan Thiel <JanThiel@users.noreply.github.com> Co-authored-by: h4ux <alon@h4ux.com> Co-authored-by: Bryce Sheehan <bryce.sheehan@gmail.com> Co-authored-by: mp <miguel@mconf.com> Co-authored-by: miguel-mconf <107938570+miguel-mconf@users.noreply.github.com> Co-authored-by: Olivier Aygalenq <56312812+oaygalenq@users.noreply.github.com>
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import {
|
|
ICredentialDataDecryptedObject,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
IHttpRequestOptions,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class CalendlyApi implements ICredentialType {
|
|
name = 'calendlyApi';
|
|
displayName = 'Calendly API';
|
|
documentationUrl = 'calendly';
|
|
properties: INodeProperties[] = [
|
|
// Change name to Personal Access Token once API Keys
|
|
// are deprecated
|
|
{
|
|
displayName: 'API Key or Personal Access Token',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
];
|
|
async authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions> {
|
|
//check whether the token is an API Key or an access token
|
|
const { apiKey } = credentials as { apiKey: string } ;
|
|
const tokenType = getAuthenticationType(apiKey);
|
|
// remove condition once v1 is deprecated
|
|
// and only inject credentials as an access token
|
|
if (tokenType === 'accessToken') {
|
|
requestOptions.headers!['Authorization'] = `Bearer ${apiKey}`;
|
|
} else {
|
|
requestOptions.headers!['X-TOKEN'] = apiKey;
|
|
}
|
|
return requestOptions;
|
|
}
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://calendly.com',
|
|
url: '/api/v1/users/me',
|
|
},
|
|
};
|
|
}
|
|
|
|
const getAuthenticationType = (data: string): 'accessToken' | 'apiKey' => {
|
|
// The access token is a JWT, so it will always include dots to separate
|
|
// header, payoload and signature.
|
|
return data.includes('.') ? 'accessToken' : 'apiKey';
|
|
};
|