# nodes

node_type: n8n-nodes-base.Storyblok
name: Storyblok
package_name: n8n-nodes-base
display_name: Storyblok
description: Consume Storyblok API
code_hash: 883eea1ccd320f86c2501929a0fa7ef6e0721ae17abc05a8e5c65d7b16983f24
source_location: node_modules/n8n-nodes-base/dist/nodes/Storyblok/Storyblok.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Storyblok = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const StoryContentDescription_1 = require("./StoryContentDescription");
  const StoryManagementDescription_1 = require("./StoryManagementDescription");
  class Storyblok {
      constructor() {
          this.description = {
              displayName: 'Storyblok',
              name: 'storyblok',
              icon: 'file:storyblok.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Storyblok API',
              defaults: {
                  name: 'Storyblok',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'storyblokContentApi',
                      required: true,
                      displayOptions: {
                          show: {
                              source: ['contentApi'],
                          },
                      },
                  },
                  {
                      name: 'storyblokManagementApi',
                      required: true,
                      displayOptions: {
                          show: {
                              source: ['managementApi'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Source',
                      name: 'source',
                      type: 'options',
                      default: 'contentApi',
                      description: 'Pick where your data comes from, Content or Management API',
                      options: [
                          {
                              name: 'Content API',
                              value: 'contentApi',
                          },
                          {
                              name: 'Management API',
                              value: 'managementApi',
                          },
                      ],
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Story',
                              value: 'story',
                          },
                      ],
                      default: 'story',
                      displayOptions: {
                          show: {
                              source: ['contentApi'],
                          },
                      },
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Story',
                              value: 'story',
                          },
                      ],
                      default: 'story',
                      displayOptions: {
                          show: {
                              source: ['managementApi'],
                          },
                      },
                  },
                  ...StoryContentDescription_1.storyContentOperations,
                  ...StoryContentDescription_1.storyContentFields,
                  ...StoryManagementDescription_1.storyManagementOperations,
                  ...StoryManagementDescription_1.storyManagementFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getSpaces() {
                      const returnData = [];
                      const { spaces } = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', '/v1/spaces');
                      for (const space of spaces) {
                          returnData.push({
                              name: space.name,
                              value: space.id,
                          });
                      }
                      return returnData;
                  },
                  async getComponents() {
                      const returnData = [];
                      const space = this.getCurrentNodeParameter('space');
                      const { components } = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/components`);
                      for (const component of components) {
                          returnData.push({
                              name: `${component.name} ${component.is_root ? '(root)' : ''}`,
                              value: component.name,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const source = this.getNodeParameter('source', 0);
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (source === 'contentApi') {
                      if (resource === 'story') {
                          if (operation === 'get') {
                              const identifier = this.getNodeParameter('identifier', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/cdn/stories/${identifier}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'getAll') {
                              const filters = this.getNodeParameter('filters', i);
                              const returnAll = this.getNodeParameter('returnAll', i);
                              Object.assign(qs, filters);
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.storyblokApiRequestAllItems.call(this, 'stories', 'GET', '/v1/cdn/stories', {}, qs);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.per_page = limit;
                                  responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', '/v1/cdn/stories', {}, qs);
                                  responseData = responseData.stories;
                              }
                          }
                      }
                  }
                  if (source === 'managementApi') {
                      if (resource === 'story') {
                          if (operation === 'delete') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'DELETE', `/v1/spaces/${space}/stories/${storyId}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'get') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'getAll') {
                              const space = this.getNodeParameter('space', i);
                              const filters = this.getNodeParameter('filters', i);
                              const returnAll = this.getNodeParameter('returnAll', i);
                              Object.assign(qs, filters);
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.storyblokApiRequestAllItems.call(this, 'stories', 'GET', `/v1/spaces/${space}/stories`, {}, qs);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.per_page = limit;
                                  responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories`, {}, qs);
                                  responseData = responseData.stories;
                              }
                          }
                          if (operation === 'publish') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              const options = this.getNodeParameter('options', i);
                              const query = {};
                              if (options.releaseId) {
                                  query.release_id = options.releaseId;
                              }
                              if (options.language) {
                                  query.lang = options.language;
                              }
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}/publish`, {}, query);
                              responseData = responseData.story;
                          }
                          if (operation === 'unpublish') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}/unpublish`);
                              responseData = responseData.story;
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Storyblok = Storyblok;
  //# sourceMappingURL=Storyblok.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Strapi
name: Strapi
package_name: n8n-nodes-base
display_name: Strapi
description: Consume Strapi API
code_hash: 6d23d2bca4436fba9185d08178d05af5842389779fe3c06be65ca04239b1eaad
source_location: node_modules/n8n-nodes-base/dist/nodes/Strapi/Strapi.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Strapi = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const EntryDescription_1 = require("./EntryDescription");
  class Strapi {
      constructor() {
          this.description = {
              displayName: 'Strapi',
              name: 'strapi',
              icon: 'file:strapi.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Strapi API',
              defaults: {
                  name: 'Strapi',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'strapiApi',
                      required: true,
                      testedBy: 'strapiApiTest',
                      displayOptions: {
                          show: {
                              authentication: ['password'],
                          },
                      },
                  },
                  {
                      name: 'strapiTokenApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['token'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Username & Password',
                              value: 'password',
                          },
                          {
                              name: 'API Token',
                              value: 'token',
                          },
                      ],
                      default: 'password',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      noDataExpression: true,
                      type: 'options',
                      options: [
                          {
                              name: 'Entry',
                              value: 'entry',
                          },
                      ],
                      default: 'entry',
                  },
                  ...EntryDescription_1.entryOperations,
                  ...EntryDescription_1.entryFields,
              ],
          };
          this.methods = {
              credentialTest: {
                  async strapiApiTest(credential) {
                      const credentials = credential.data;
                      let options = {};
                      const url = (0, GenericFunctions_1.removeTrailingSlash)(credentials.url);
                      options = {
                          headers: {
                              'content-type': 'application/json',
                          },
                          method: 'POST',
                          body: {
                              identifier: credentials.email,
                              password: credentials.password,
                          },
                          uri: credentials.apiVersion === 'v4' ? `${url}/api/auth/local` : `${url}/auth/local`,
                          json: true,
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: `Auth settings are not valid: ${error}`,
                          };
                      }
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          const headers = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const authenticationMethod = this.getNodeParameter('authentication', 0);
          let apiVersion;
          if (authenticationMethod === 'password') {
              const { jwt } = await GenericFunctions_1.getToken.call(this);
              apiVersion = (await this.getCredentials('strapiApi')).apiVersion;
              headers.Authorization = `Bearer ${jwt}`;
          }
          else {
              apiVersion = (await this.getCredentials('strapiTokenApi')).apiVersion;
          }
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'entry') {
                      if (operation === 'create') {
                          const body = {};
                          const contentType = this.getNodeParameter('contentType', i);
                          const columns = this.getNodeParameter('columns', i);
                          const columnList = columns.split(',').map((column) => column.trim());
                          for (const key of Object.keys(items[i].json)) {
                              if (columnList.includes(key)) {
                                  apiVersion === 'v4'
                                      ? (body.data = items[i].json)
                                      : (body[key] = items[i].json[key]);
                              }
                          }
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'POST', `/${contentType}`, body, qs, undefined, headers);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'delete') {
                          const contentType = this.getNodeParameter('contentType', i);
                          const entryId = this.getNodeParameter('entryId', i);
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'DELETE', `/${contentType}/${entryId}`, {}, qs, undefined, headers);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const contentType = this.getNodeParameter('contentType', i);
                          const options = this.getNodeParameter('options', i);
                          if (apiVersion === 'v4') {
                              if (options.sort && options.sort.length !== 0) {
                                  const sortFields = options.sort;
                                  qs.sort = sortFields.join(',');
                              }
                              if (options.where) {
                                  const query = (0, GenericFunctions_1.validateJSON)(options.where);
                                  if (query !== undefined) {
                                      qs.filters = query;
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query must be a valid JSON', {
                                          itemIndex: i,
                                      });
                                  }
                              }
                              if (options.publicationState) {
                                  qs.publicationState = options.publicationState;
                              }
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.strapiApiRequestAllItems.call(this, 'GET', `/${contentType}`, {}, qs, headers, apiVersion);
                              }
                              else {
                                  qs['pagination[pageSize]'] = this.getNodeParameter('limit', i);
                                  ({ data: responseData } = await GenericFunctions_1.strapiApiRequest.call(this, 'GET', `/${contentType}`, {}, qs, undefined, headers));
                              }
                          }
                          else {
                              if (options.sort && options.sort.length !== 0) {
                                  const sortFields = options.sort;
                                  qs._sort = sortFields.join(',');
                              }
                              if (options.where) {
                                  const query = (0, GenericFunctions_1.validateJSON)(options.where);
                                  if (query !== undefined) {
                                      qs._where = query;
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query must be a valid JSON', {
                                          itemIndex: i,
                                      });
                                  }
                              }
                              if (options.publicationState) {
                                  qs._publicationState = options.publicationState;
                              }
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.strapiApiRequestAllItems.call(this, 'GET', `/${contentType}`, {}, qs, headers, apiVersion);
                              }
                              else {
                                  qs._limit = this.getNodeParameter('limit', i);
                                  responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'GET', `/${contentType}`, {}, qs, undefined, headers);
                              }
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'get') {
                          const contentType = this.getNodeParameter('contentType', i);
                          const entryId = this.getNodeParameter('entryId', i);
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'GET', `/${contentType}/${entryId}`, {}, qs, undefined, headers);
                          if (apiVersion === 'v4') {
                              responseData = responseData.data;
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'update') {
                          const body = {};
                          const contentType = this.getNodeParameter('contentType', i);
                          const columns = this.getNodeParameter('columns', i);
                          const updateKey = this.getNodeParameter('updateKey', i);
                          const columnList = columns.split(',').map((column) => column.trim());
                          const entryId = items[i].json[updateKey];
                          for (const key of Object.keys(items[i].json)) {
                              if (columnList.includes(key)) {
                                  apiVersion === 'v4'
                                      ? (body.data = items[i].json)
                                      : (body[key] = items[i].json[key]);
                              }
                          }
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'PUT', `/${contentType}/${entryId}`, body, qs, undefined, headers);
                          if (apiVersion === 'v4') {
                              responseData = responseData.data;
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Strapi = Strapi;
  //# sourceMappingURL=Strapi.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Strava
name: Strava
package_name: n8n-nodes-base
display_name: Strava
description: Consume Strava API
code_hash: 7a22dfb2e271c2501cb569ed4956c2717f03c82004e50494b33660c19bd5d9a5
source_location: node_modules/n8n-nodes-base/dist/nodes/Strava/Strava.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Strava = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ActivityDescription_1 = require("./ActivityDescription");
  const moment_1 = __importDefault(require("moment"));
  class Strava {
      constructor() {
          this.description = {
              displayName: 'Strava',
              name: 'strava',
              icon: 'file:strava.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Strava API',
              defaults: {
                  name: 'Strava',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'stravaOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Activity',
                              value: 'activity',
                          },
                      ],
                      default: 'activity',
                  },
                  ...ActivityDescription_1.activityOperations,
                  ...ActivityDescription_1.activityFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'activity') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const type = this.getNodeParameter('type', i);
                          const startDate = this.getNodeParameter('startDate', i);
                          const elapsedTime = this.getNodeParameter('elapsedTime', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.trainer === true) {
                              additionalFields.trainer = 1;
                          }
                          if (additionalFields.commute === true) {
                              additionalFields.commute = 1;
                          }
                          const body = {
                              name,
                              type,
                              start_date_local: (0, moment_1.default)(startDate).toISOString(),
                              elapsed_time: elapsedTime,
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'POST', '/activities', body);
                      }
                      if (operation === 'get') {
                          const activityId = this.getNodeParameter('activityId', i);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', `/activities/${activityId}`);
                      }
                      if (['getLaps', 'getZones', 'getKudos', 'getComments'].includes(operation)) {
                          const path = {
                              getComments: 'comments',
                              getZones: 'zones',
                              getKudos: 'kudos',
                              getLaps: 'laps',
                          };
                          const activityId = this.getNodeParameter('activityId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', `/activities/${activityId}/${path[operation]}`);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'getStreams') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const keys = this.getNodeParameter('keys', i);
                          qs.keys = keys.toString();
                          qs.key_by_type = true;
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', `/activities/${activityId}/streams`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.stravaApiRequestAllItems.call(this, 'GET', '/activities', {}, qs);
                          }
                          else {
                              qs.per_page = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', '/activities', {}, qs);
                          }
                      }
                      if (operation === 'update') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'PUT', `/activities/${activityId}`, body);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Strava = Strava;
  //# sourceMappingURL=Strava.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Stripe
name: Stripe
package_name: n8n-nodes-base
display_name: Stripe
description: Consume the Stripe API
code_hash: a140efa1ba344639e26ed3feb6d57c8e4e5ed6c063161e3d63c831962c1f45ad
source_location: node_modules/n8n-nodes-base/dist/nodes/Stripe/Stripe.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Stripe = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
  const helpers_1 = require("./helpers");
  const descriptions_1 = require("./descriptions");
  class Stripe {
      constructor() {
          this.description = {
              displayName: 'Stripe',
              name: 'stripe',
              icon: 'file:stripe.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Stripe API',
              defaults: {
                  name: 'Stripe',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'stripeApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Balance',
                              value: 'balance',
                          },
                          {
                              name: 'Charge',
                              value: 'charge',
                          },
                          {
                              name: 'Coupon',
                              value: 'coupon',
                          },
                          {
                              name: 'Customer',
                              value: 'customer',
                          },
                          {
                              name: 'Customer Card',
                              value: 'customerCard',
                          },
                          {
                              name: 'Source',
                              value: 'source',
                          },
                          {
                              name: 'Token',
                              value: 'token',
                          },
                      ],
                      default: 'balance',
                  },
                  ...descriptions_1.balanceOperations,
                  ...descriptions_1.customerCardOperations,
                  ...descriptions_1.customerCardFields,
                  ...descriptions_1.chargeOperations,
                  ...descriptions_1.chargeFields,
                  ...descriptions_1.couponOperations,
                  ...descriptions_1.couponFields,
                  ...descriptions_1.customerOperations,
                  ...descriptions_1.customerFields,
                  ...descriptions_1.sourceOperations,
                  ...descriptions_1.sourceFields,
                  ...descriptions_1.tokenOperations,
                  ...descriptions_1.tokenFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCustomers() {
                      return helpers_1.loadResource.call(this, 'customer');
                  },
                  async getCurrencies() {
                      const returnData = [];
                      const { data } = await helpers_1.stripeApiRequest.call(this, 'GET', '/country_specs', {});
                      for (const currency of data[0].supported_payment_currencies) {
                          returnData.push({
                              name: currency.toUpperCase(),
                              value: currency,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const returnData = [];
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'balance') {
                      if (operation === 'get') {
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', '/balance', {}, {});
                      }
                  }
                  else if (resource === 'customerCard') {
                      if (operation === 'add') {
                          const body = {
                              source: this.getNodeParameter('token', i),
                          };
                          const customerId = this.getNodeParameter('customerId', i);
                          const endpoint = `/customers/${customerId}/sources`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', endpoint, body, {});
                      }
                      else if (operation === 'remove') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const endpoint = `/customers/${customerId}/sources/${cardId}`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      }
                      else if (operation === 'get') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const sourceId = this.getNodeParameter('sourceId', i);
                          const endpoint = `/customers/${customerId}/sources/${sourceId}`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', endpoint, {}, {});
                      }
                  }
                  else if (resource === 'charge') {
                      if (operation === 'create') {
                          const body = {
                              customer: this.getNodeParameter('customerId', i),
                              currency: this.getNodeParameter('currency', i).toLowerCase(),
                              amount: this.getNodeParameter('amount', i),
                              source: this.getNodeParameter('source', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!(0, isEmpty_1.default)(additionalFields)) {
                              Object.assign(body, (0, helpers_1.adjustChargeFields)(additionalFields));
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/charges', body, {});
                      }
                      else if (operation === 'get') {
                          const chargeId = this.getNodeParameter('chargeId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', `/charges/${chargeId}`, {}, {});
                      }
                      else if (operation === 'getAll') {
                          responseData = await helpers_1.handleListing.call(this, resource, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if ((0, isEmpty_1.default)(updateFields)) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          Object.assign(body, (0, helpers_1.adjustChargeFields)(updateFields));
                          const chargeId = this.getNodeParameter('chargeId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', `/charges/${chargeId}`, body, {});
                      }
                  }
                  else if (resource === 'coupon') {
                      if (operation === 'create') {
                          const body = {
                              duration: this.getNodeParameter('duration', i),
                          };
                          const type = this.getNodeParameter('type', i);
                          if (type === 'fixedAmount') {
                              body.amount_off = this.getNodeParameter('amountOff', i);
                              body.currency = this.getNodeParameter('currency', i);
                          }
                          else {
                              body.percent_off = this.getNodeParameter('percentOff', i);
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/coupons', body, {});
                      }
                      else if (operation === 'getAll') {
                          responseData = await helpers_1.handleListing.call(this, resource, i);
                      }
                  }
                  else if (resource === 'customer') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!(0, isEmpty_1.default)(additionalFields)) {
                              Object.assign(body, (0, helpers_1.adjustCustomerFields)(additionalFields));
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/customers', body, {});
                      }
                      else if (operation === 'delete') {
                          const customerId = this.getNodeParameter('customerId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'DELETE', `/customers/${customerId}`, {}, {});
                      }
                      else if (operation === 'get') {
                          const customerId = this.getNodeParameter('customerId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', `/customers/${customerId}`, {}, {});
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (!(0, isEmpty_1.default)(filters)) {
                              qs.email = filters.email;
                          }
                          responseData = await helpers_1.handleListing.call(this, resource, i, qs);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if ((0, isEmpty_1.default)(updateFields)) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          Object.assign(body, (0, helpers_1.adjustCustomerFields)(updateFields));
                          const customerId = this.getNodeParameter('customerId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', `/customers/${customerId}`, body, {});
                      }
                  }
                  else if (resource === 'source') {
                      if (operation === 'create') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const body = {
                              type: this.getNodeParameter('type', i),
                              amount: this.getNodeParameter('amount', i),
                              currency: this.getNodeParameter('currency', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!(0, isEmpty_1.default)(additionalFields)) {
                              Object.assign(body, (0, helpers_1.adjustMetadata)(additionalFields));
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/sources', body, {});
                          const endpoint = `/customers/${customerId}/sources`;
                          await helpers_1.stripeApiRequest.call(this, 'POST', endpoint, { source: responseData.id }, {});
                      }
                      else if (operation === 'delete') {
                          const sourceId = this.getNodeParameter('sourceId', i);
                          const customerId = this.getNodeParameter('customerId', i);
                          const endpoint = `/customers/${customerId}/sources/${sourceId}`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      }
                      else if (operation === 'get') {
                          const sourceId = this.getNodeParameter('sourceId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', `/sources/${sourceId}`, {}, {});
                      }
                  }
                  else if (resource === 'token') {
                      if (operation === 'create') {
                          const type = this.getNodeParameter('type', i);
                          const body = {};
                          if (type !== 'cardToken') {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Only card token creation implemented.', { itemIndex: i });
                          }
                          body.card = {
                              number: this.getNodeParameter('number', i),
                              exp_month: this.getNodeParameter('expirationMonth', i),
                              exp_year: this.getNodeParameter('expirationYear', i),
                              cvc: this.getNodeParameter('cvc', i),
                          };
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/tokens', body, {});
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Stripe = Stripe;
  //# sourceMappingURL=Stripe.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Supabase
name: Supabase
package_name: n8n-nodes-base
display_name: Supabase
description: Add, get, delete and update data in a table
code_hash: 6690085b257b8dfeb9738fd6b9f1ff9c39e50ee8432805b445f1c3c7f934bf41
source_location: node_modules/n8n-nodes-base/dist/nodes/Supabase/Supabase.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Supabase = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const RowDescription_1 = require("./RowDescription");
  class Supabase {
      constructor() {
          this.description = {
              displayName: 'Supabase',
              name: 'supabase',
              icon: 'file:supabase.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Add, get, delete and update data in a table',
              defaults: {
                  name: 'Supabase',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'supabaseApi',
                      required: true,
                      testedBy: 'supabaseApiCredentialTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Row',
                              value: 'row',
                          },
                      ],
                      default: 'row',
                  },
                  ...RowDescription_1.rowOperations,
                  ...RowDescription_1.rowFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTables() {
                      const returnData = [];
                      const { paths } = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', '/');
                      for (const path of Object.keys(paths)) {
                          if (path === '/')
                              continue;
                          returnData.push({
                              name: path.replace('/', ''),
                              value: path.replace('/', ''),
                          });
                      }
                      return returnData;
                  },
                  async getTableColumns() {
                      const returnData = [];
                      const tableName = this.getCurrentNodeParameter('tableId');
                      const { definitions } = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', '/');
                      for (const column of Object.keys(definitions[tableName].properties)) {
                          returnData.push({
                              name: `${column} - (${definitions[tableName].properties[column].type})`,
                              value: column,
                          });
                      }
                      return returnData;
                  },
              },
              credentialTest: {
                  async supabaseApiCredentialTest(credential) {
                      try {
                          await GenericFunctions_1.validateCredentials.call(this, credential.data);
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: 'The Service Key is invalid',
                          };
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          if (resource === 'row') {
              if (operation === 'create') {
                  const records = [];
                  const tableId = this.getNodeParameter('tableId', 0);
                  for (let i = 0; i < length; i++) {
                      const record = {};
                      const dataToSend = this.getNodeParameter('dataToSend', 0);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              record[key] = items[i].json[key];
                          }
                      }
                      else {
                          const fields = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fields) {
                              record[`${field.fieldId}`] = field.fieldValue;
                          }
                      }
                      records.push(record);
                  }
                  const endpoint = `/${tableId}`;
                  try {
                      const createdRows = await GenericFunctions_1.supabaseApiRequest.call(this, 'POST', endpoint, records);
                      createdRows.forEach((row, i) => {
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(row), { itemData: { item: i } });
                          returnData.push(...executionData);
                      });
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: (0, GenericFunctions_1.mapPairedItemsFrom)(records) });
                          returnData.push(...executionData);
                      }
                      else {
                          throw error;
                      }
                  }
              }
              if (operation === 'delete') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const filterType = this.getNodeParameter('filterType', 0);
                  let endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      if (filterType === 'manual') {
                          const matchType = this.getNodeParameter('matchType', 0);
                          const keys = this.getNodeParameter('filters.conditions', i, []);
                          if (!keys.length) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one select condition must be defined', { itemIndex: i });
                          }
                          if (matchType === 'allFilters') {
                              const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildQuery)(obj, value), {});
                              Object.assign(qs, data);
                          }
                          if (matchType === 'anyFilter') {
                              const data = keys.map((key) => (0, GenericFunctions_1.buildOrQuery)(key));
                              Object.assign(qs, { or: `(${data.join(',')})` });
                          }
                      }
                      if (filterType === 'string') {
                          const filterString = this.getNodeParameter('filterString', i);
                          endpoint = `${endpoint}?${encodeURI(filterString)}`;
                      }
                      let rows;
                      try {
                          rows = await GenericFunctions_1.supabaseApiRequest.call(this, 'DELETE', endpoint, {}, qs);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              if (operation === 'get') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      const keys = this.getNodeParameter('filters.conditions', i, []);
                      const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildGetQuery)(obj, value), {});
                      Object.assign(qs, data);
                      let rows;
                      if (!keys.length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one select condition must be defined', { itemIndex: i });
                      }
                      try {
                          rows = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', endpoint, {}, qs);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              if (operation === 'getAll') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const returnAll = this.getNodeParameter('returnAll', 0);
                  const filterType = this.getNodeParameter('filterType', 0);
                  let endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      if (filterType === 'manual') {
                          const matchType = this.getNodeParameter('matchType', 0);
                          const keys = this.getNodeParameter('filters.conditions', i, []);
                          if (keys.length !== 0) {
                              if (matchType === 'allFilters') {
                                  const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildQuery)(obj, value), {});
                                  Object.assign(qs, data);
                              }
                              if (matchType === 'anyFilter') {
                                  const data = keys.map((key) => (0, GenericFunctions_1.buildOrQuery)(key));
                                  Object.assign(qs, { or: `(${data.join(',')})` });
                              }
                          }
                      }
                      if (filterType === 'string') {
                          const filterString = this.getNodeParameter('filterString', i);
                          endpoint = `${endpoint}?${encodeURI(filterString)}`;
                      }
                      if (!returnAll) {
                          qs.limit = this.getNodeParameter('limit', 0);
                      }
                      let rows;
                      try {
                          rows = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', endpoint, {}, qs);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                  }
              }
              if (operation === 'update') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const filterType = this.getNodeParameter('filterType', 0);
                  let endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      if (filterType === 'manual') {
                          const matchType = this.getNodeParameter('matchType', 0);
                          const keys = this.getNodeParameter('filters.conditions', i, []);
                          if (!keys.length) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one select condition must be defined', { itemIndex: i });
                          }
                          if (matchType === 'allFilters') {
                              const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildQuery)(obj, value), {});
                              Object.assign(qs, data);
                          }
                          if (matchType === 'anyFilter') {
                              const data = keys.map((key) => (0, GenericFunctions_1.buildOrQuery)(key));
                              Object.assign(qs, { or: `(${data.join(',')})` });
                          }
                      }
                      if (filterType === 'string') {
                          const filterString = this.getNodeParameter('filterString', i);
                          endpoint = `${endpoint}?${encodeURI(filterString)}`;
                      }
                      const record = {};
                      const dataToSend = this.getNodeParameter('dataToSend', 0);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              record[key] = items[i].json[key];
                          }
                      }
                      else {
                          const fields = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fields) {
                              record[`${field.fieldId}`] = field.fieldValue;
                          }
                      }
                      let updatedRow;
                      try {
                          updatedRow = await GenericFunctions_1.supabaseApiRequest.call(this, 'PATCH', endpoint, record, qs);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(updatedRow), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                  }
              }
          }
          return [returnData];
      }
  }
  exports.Supabase = Supabase;
  //# sourceMappingURL=Supabase.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Switch
name: Switch
package_name: n8n-nodes-base
display_name: Switch
description: Route items depending on defined expression or rules
code_hash: c1b9c3794375e6db2acbdf04c54a05bfeec3053a08c530f04f57e173953e77c9
source_location: node_modules/n8n-nodes-base/dist/nodes/Switch/Switch.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Switch = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SwitchV1_node_1 = require("./V1/SwitchV1.node");
  const SwitchV2_node_1 = require("./V2/SwitchV2.node");
  class Switch extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Switch',
              name: 'switch',
              icon: 'fa:map-signs',
              group: ['transform'],
              description: 'Route items depending on defined expression or rules',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new SwitchV1_node_1.SwitchV1(baseDescription),
              2: new SwitchV2_node_1.SwitchV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Switch = Switch;
  //# sourceMappingURL=Switch.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Taiga
name: Taiga
package_name: n8n-nodes-base
display_name: Taiga
description: Consume Taiga API
code_hash: b5515948bd59b70034e4508dd755ebad7d28139a4db63a8d93f64faf53aaa923
source_location: node_modules/n8n-nodes-base/dist/nodes/Taiga/Taiga.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Taiga = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class Taiga {
      constructor() {
          this.description = {
              displayName: 'Taiga',
              name: 'taiga',
              icon: 'file:taiga.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Taiga API',
              defaults: {
                  name: 'Taiga',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'taigaApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Epic',
                              value: 'epic',
                          },
                          {
                              name: 'Issue',
                              value: 'issue',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'User Story',
                              value: 'userStory',
                          },
                      ],
                      default: 'issue',
                  },
                  ...descriptions_1.epicOperations,
                  ...descriptions_1.epicFields,
                  ...descriptions_1.issueOperations,
                  ...descriptions_1.issueFields,
                  ...descriptions_1.taskOperations,
                  ...descriptions_1.taskFields,
                  ...descriptions_1.userStoryOperations,
                  ...descriptions_1.userStoryFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getEpics() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const epics = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/epics', {}, { project }));
                      return epics.map(({ subject, id }) => ({ name: subject, value: id }));
                  },
                  async getMilestones() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const milestones = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/milestones', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(milestones);
                  },
                  async getPriorities() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const priorities = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/priorities', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(priorities);
                  },
                  async getProjects() {
                      const { id } = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/users/me'));
                      const projects = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/projects', {}, { member: id }));
                      return (0, GenericFunctions_1.toOptions)(projects);
                  },
                  async getRoles() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const roles = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/roles', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(roles);
                  },
                  async getSeverities() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const severities = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/severities', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(severities);
                  },
                  async getTags() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const tags = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/projects/${project}/tags_colors`));
                      return Object.keys(tags).map((tag) => ({ name: tag, value: tag }));
                  },
                  async getTypes() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const types = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/issue-types', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(types);
                  },
                  async getUsers() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const users = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/users', {}, { project }));
                      return users.map(({ full_name_display, id }) => ({ name: full_name_display, value: id }));
                  },
                  async getUserStories() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const userStories = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/userstories', {}, { project }));
                      return userStories.map(({ subject, id }) => ({ name: subject, value: id }));
                  },
                  async getIssueStatuses() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const statuses = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/issue-statuses', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(statuses);
                  },
                  async getTaskStatuses() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const statuses = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/task-statuses', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(statuses);
                  },
                  async getUserStoryStatuses() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const statuses = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/userstory-statuses', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(statuses);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'epic') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/epics', body);
                      }
                      else if (operation === 'delete') {
                          const epicId = this.getNodeParameter('epicId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', `/epics/${epicId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const epicId = this.getNodeParameter('epicId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/epics/${epicId}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/epics', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const epicId = this.getNodeParameter('epicId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/epics/${epicId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/epics/${epicId}`, body);
                      }
                  }
                  else if (resource === 'issue') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/issues', body);
                      }
                      else if (operation === 'delete') {
                          const issueId = this.getNodeParameter('issueId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', `/issues/${issueId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const issueId = this.getNodeParameter('issueId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/issues/${issueId}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/issues', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const issueId = this.getNodeParameter('issueId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/issues/${issueId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/issues/${issueId}`, body);
                      }
                  }
                  else if (resource === 'task') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/tasks', body);
                      }
                      else if (operation === 'delete') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', `/tasks/${taskId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/tasks/${taskId}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/tasks', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const taskId = this.getNodeParameter('taskId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/tasks/${taskId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/tasks/${taskId}`, body);
                      }
                  }
                  else if (resource === 'userStory') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/userstories', body);
                      }
                      else if (operation === 'delete') {
                          const userStoryId = this.getNodeParameter('userStoryId', i);
                          const endpoint = `/userstories/${userStoryId}`;
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const userStoryId = this.getNodeParameter('userStoryId', i);
                          const endpoint = `/userstories/${userStoryId}`;
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/userstories', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const userStoryId = this.getNodeParameter('userStoryId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/userstories/${userStoryId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/userstories/${userStoryId}`, body);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Taiga = Taiga;
  //# sourceMappingURL=Taiga.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Tapfiliate
name: Tapfiliate
package_name: n8n-nodes-base
display_name: Tapfiliate
description: Consume Tapfiliate API
code_hash: 322284a7aa45ad766d6bfbf77223992d532b8fa418f9f4a1c231747871981d2e
source_location: node_modules/n8n-nodes-base/dist/nodes/Tapfiliate/Tapfiliate.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Tapfiliate = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const AffiliateDescription_1 = require("./AffiliateDescription");
  const AffiliateMetadataDescription_1 = require("./AffiliateMetadataDescription");
  const ProgramAffiliateDescription_1 = require("./ProgramAffiliateDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Tapfiliate {
      constructor() {
          this.description = {
              displayName: 'Tapfiliate',
              name: 'tapfiliate',
              icon: 'file:tapfiliate.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Consume Tapfiliate API',
              defaults: {
                  name: 'Tapfiliate',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'tapfiliateApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Affiliate',
                              value: 'affiliate',
                          },
                          {
                              name: 'Affiliate Metadata',
                              value: 'affiliateMetadata',
                          },
                          {
                              name: 'Program Affiliate',
                              value: 'programAffiliate',
                          },
                      ],
                      default: 'affiliate',
                      required: true,
                  },
                  ...AffiliateDescription_1.affiliateOperations,
                  ...AffiliateDescription_1.affiliateFields,
                  ...AffiliateMetadataDescription_1.affiliateMetadataOperations,
                  ...AffiliateMetadataDescription_1.affiliateMetadataFields,
                  ...ProgramAffiliateDescription_1.programAffiliateOperations,
                  ...ProgramAffiliateDescription_1.programAffiliateFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getPrograms() {
                      const returnData = [];
                      const programs = await GenericFunctions_1.tapfiliateApiRequestAllItems.call(this, 'GET', '/programs/');
                      for (const program of programs) {
                          returnData.push({
                              name: program.title,
                              value: program.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          var _a;
          const items = this.getInputData();
          const length = items.length;
          const qs = {};
          let responseData;
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'affiliate') {
                      if (operation === 'create') {
                          const firstname = this.getNodeParameter('firstname', i);
                          const lastname = this.getNodeParameter('lastname', i);
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              firstname,
                              lastname,
                              email,
                          };
                          Object.assign(body, additionalFields);
                          if (body.addressUi) {
                              body.address = body.addressUi.addressValues;
                              delete body.addressUi;
                              if (body.address.country) {
                                  body.address.country = {
                                      code: body.address.country,
                                  };
                              }
                          }
                          if (body.companyName) {
                              body.company = {
                                  name: body.companyName,
                              };
                              delete body.companyName;
                          }
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'POST', '/affiliates/', body);
                          returnData.push(responseData);
                      }
                      if (operation === 'delete') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'DELETE', `/affiliates/${affiliateId}/`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', `/affiliates/${affiliateId}/`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.tapfiliateApiRequestAllItems.call(this, 'GET', '/affiliates/', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', '/affiliates/', {}, qs);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  if (resource === 'affiliateMetadata') {
                      if (operation === 'add') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const metadata = ((_a = this.getNodeParameter('metadataUi', i)) === null || _a === void 0 ? void 0 : _a.metadataValues) || [];
                          if (metadata.length === 0) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Metadata cannot be empty.', {
                                  itemIndex: i,
                              });
                          }
                          for (const { key, value } of metadata) {
                              await GenericFunctions_1.tapfiliateApiRequest.call(this, 'PUT', `/affiliates/${affiliateId}/meta-data/${key}/`, { value });
                          }
                          responseData = { success: true };
                      }
                      if (operation === 'remove') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const key = this.getNodeParameter('key', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'DELETE', `/affiliates/${affiliateId}/meta-data/${key}/`);
                          responseData = { success: true };
                      }
                      if (operation === 'update') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const key = this.getNodeParameter('key', i);
                          const value = this.getNodeParameter('value', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'PUT', `/affiliates/${affiliateId}/meta-data/`, { [key]: value });
                      }
                  }
                  if (resource === 'programAffiliate') {
                      if (operation === 'add') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              affiliate: {
                                  id: affiliateId,
                              },
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'POST', `/programs/${programId}/affiliates/`, body);
                      }
                      if (operation === 'approve') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'PUT', `/programs/${programId}/affiliates/${affiliateId}/approved/`);
                      }
                      if (operation === 'disapprove') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'DELETE', `/programs/${programId}/affiliates/${affiliateId}/approved/`);
                      }
                      if (operation === 'get') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', `/programs/${programId}/affiliates/${affiliateId}/`);
                      }
                      if (operation === 'getAll') {
                          const programId = this.getNodeParameter('programId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.tapfiliateApiRequestAllItems.call(this, 'GET', `/programs/${programId}/affiliates/`, {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', `/programs/${programId}/affiliates/`, {}, qs);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Tapfiliate = Tapfiliate;
  //# sourceMappingURL=Tapfiliate.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Telegram
name: Telegram
package_name: n8n-nodes-base
display_name: Telegram
description: Sends data to Telegram
code_hash: f3c5a39bf643219deb3a2978b9bea87fc66b9bd893b076fa8339233a39fd38c7
source_location: node_modules/n8n-nodes-base/dist/nodes/Telegram/Telegram.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Telegram = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Telegram {
      constructor() {
          this.description = {
              displayName: 'Telegram',
              name: 'telegram',
              icon: 'file:telegram.svg',
              group: ['output'],
              version: [1, 1.1],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Sends data to Telegram',
              defaults: {
                  name: 'Telegram',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'telegramApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Chat',
                              value: 'chat',
                          },
                          {
                              name: 'Callback',
                              value: 'callback',
                          },
                          {
                              name: 'File',
                              value: 'file',
                          },
                          {
                              name: 'Message',
                              value: 'message',
                          },
                      ],
                      default: 'message',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['chat'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get up to date information about a chat',
                              action: 'Get a chat',
                          },
                          {
                              name: 'Get Administrators',
                              value: 'administrators',
                              description: 'Get the Administrators of a chat',
                              action: 'Get all administrators in a chat',
                          },
                          {
                              name: 'Get Member',
                              value: 'member',
                              description: 'Get the member of a chat',
                              action: 'Get a member in a chat',
                          },
                          {
                              name: 'Leave',
                              value: 'leave',
                              description: 'Leave a group, supergroup or channel',
                              action: 'Leave a chat',
                          },
                          {
                              name: 'Set Description',
                              value: 'setDescription',
                              description: 'Set the description of a chat',
                              action: 'Set description on a chat',
                          },
                          {
                              name: 'Set Title',
                              value: 'setTitle',
                              description: 'Set the title of a chat',
                              action: 'Set a title on a chat',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['callback'],
                          },
                      },
                      options: [
                          {
                              name: 'Answer Query',
                              value: 'answerQuery',
                              description: 'Send answer to callback query sent from inline keyboard',
                              action: 'Answer Query a callback',
                          },
                          {
                              name: 'Answer Inline Query',
                              value: 'answerInlineQuery',
                              description: 'Send answer to callback query sent from inline bot',
                              action: 'Answer an inline query callback',
                          },
                      ],
                      default: 'answerQuery',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['file'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a file',
                              action: 'Get a file',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Delete Chat Message',
                              value: 'deleteMessage',
                              description: 'Delete a chat message',
                              action: 'Delete a chat message',
                          },
                          {
                              name: 'Edit Message Text',
                              value: 'editMessageText',
                              description: 'Edit a text message',
                              action: 'Edit a test message',
                          },
                          {
                              name: 'Pin Chat Message',
                              value: 'pinChatMessage',
                              description: 'Pin a chat message',
                              action: 'Pin a chat message',
                          },
                          {
                              name: 'Send Animation',
                              value: 'sendAnimation',
                              description: 'Send an animated file',
                              action: 'Send an animated file',
                          },
                          {
                              name: 'Send Audio',
                              value: 'sendAudio',
                              description: 'Send a audio file',
                              action: 'Send an audio file',
                          },
                          {
                              name: 'Send Chat Action',
                              value: 'sendChatAction',
                              description: 'Send a chat action',
                              action: 'Send a chat action',
                          },
                          {
                              name: 'Send Document',
                              value: 'sendDocument',
                              description: 'Send a document',
                              action: 'Send a document',
                          },
                          {
                              name: 'Send Location',
                              value: 'sendLocation',
                              description: 'Send a location',
                              action: 'Send a location',
                          },
                          {
                              name: 'Send Media Group',
                              value: 'sendMediaGroup',
                              description: 'Send group of photos or videos to album',
                              action: 'Send a media group message',
                          },
                          {
                              name: 'Send Message',
                              value: 'sendMessage',
                              description: 'Send a text message',
                              action: 'Send a text message',
                          },
                          {
                              name: 'Send Photo',
                              value: 'sendPhoto',
                              description: 'Send a photo',
                              action: 'Send a photo message',
                          },
                          {
                              name: 'Send Sticker',
                              value: 'sendSticker',
                              description: 'Send a sticker',
                              action: 'Send a sticker',
                          },
                          {
                              name: 'Send Video',
                              value: 'sendVideo',
                              description: 'Send a video',
                              action: 'Send a video',
                          },
                          {
                              name: 'Unpin Chat Message',
                              value: 'unpinChatMessage',
                              description: 'Unpin a chat message',
                              action: 'Unpin a chat message',
                          },
                      ],
                      default: 'sendMessage',
                  },
                  {
                      displayName: 'Chat ID',
                      name: 'chatId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: [
                                  'administrators',
                                  'deleteMessage',
                                  'get',
                                  'leave',
                                  'member',
                                  'pinChatMessage',
                                  'setDescription',
                                  'setTitle',
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendChatAction',
                                  'sendDocument',
                                  'sendLocation',
                                  'sendMessage',
                                  'sendMediaGroup',
                                  'sendPhoto',
                                  'sendSticker',
                                  'sendVideo',
                                  'unpinChatMessage',
                              ],
                              resource: ['chat', 'message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername)',
                  },
                  {
                      displayName: 'Message ID',
                      name: 'messageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['deleteMessage'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the message to delete',
                  },
                  {
                      displayName: 'Message ID',
                      name: 'messageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['pinChatMessage', 'unpinChatMessage'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the message to pin or unpin',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['pinChatMessage'],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Disable Notification',
                              name: 'disable_notification',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to send a notification to all chat members about the new pinned message',
                          },
                      ],
                  },
                  {
                      displayName: 'User ID',
                      name: 'userId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['member'],
                              resource: ['chat'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the target user',
                  },
                  {
                      displayName: 'Description',
                      name: 'description',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['setDescription'],
                              resource: ['chat'],
                          },
                      },
                      required: true,
                      description: 'New chat description, 0-255 characters',
                  },
                  {
                      displayName: 'Title',
                      name: 'title',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['setTitle'],
                              resource: ['chat'],
                          },
                      },
                      required: true,
                      description: 'New chat title, 1-255 characters',
                  },
                  {
                      displayName: 'Query ID',
                      name: 'queryId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['answerQuery'],
                              resource: ['callback'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the query to be answered',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['answerQuery'],
                              resource: ['callback'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Cache Time',
                              name: 'cache_time',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              default: 0,
                              description: 'The maximum amount of time in seconds that the result of the callback query may be cached client-side',
                          },
                          {
                              displayName: 'Show Alert',
                              name: 'show_alert',
                              type: 'boolean',
                              default: false,
                              description: 'Whether an alert will be shown by the client instead of a notification at the top of the chat screen',
                          },
                          {
                              displayName: 'Text',
                              name: 'text',
                              type: 'string',
                              default: '',
                              description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters.',
                          },
                          {
                              displayName: 'URL',
                              name: 'url',
                              type: 'string',
                              default: '',
                              description: "URL that will be opened by the user's client",
                          },
                      ],
                  },
                  {
                      displayName: 'Query ID',
                      name: 'queryId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['answerInlineQuery'],
                              resource: ['callback'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the answered query',
                  },
                  {
                      displayName: 'Results',
                      name: 'results',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['answerInlineQuery'],
                              resource: ['callback'],
                          },
                      },
                      required: true,
                      description: 'A JSON-serialized array of results for the inline query',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['answerInlineQuery'],
                              resource: ['callback'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Cache Time',
                              name: 'cache_time',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              default: 0,
                              description: 'The maximum amount of time in seconds that the result of the callback query may be cached client-side',
                          },
                          {
                              displayName: 'Show Alert',
                              name: 'show_alert',
                              type: 'boolean',
                              default: false,
                              description: 'Whether an alert will be shown by the client instead of a notification at the top of the chat screen',
                          },
                          {
                              displayName: 'Text',
                              name: 'text',
                              type: 'string',
                              default: '',
                              description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters.',
                          },
                          {
                              displayName: 'URL',
                              name: 'url',
                              type: 'string',
                              default: '',
                              description: "URL that will be opened by the user's client",
                          },
                      ],
                  },
                  {
                      displayName: 'File ID',
                      name: 'fileId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['file'],
                          },
                      },
                      required: true,
                      description: 'The ID of the file',
                  },
                  {
                      displayName: 'Download',
                      name: 'download',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['file'],
                          },
                      },
                      default: true,
                      description: 'Whether to download the file',
                  },
                  {
                      displayName: 'Message Type',
                      name: 'messageType',
                      type: 'options',
                      displayOptions: {
                          show: {
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Inline Message',
                              value: 'inlineMessage',
                          },
                          {
                              name: 'Message',
                              value: 'message',
                          },
                      ],
                      default: 'message',
                      description: 'The type of the message to edit',
                  },
                  {
                      displayName: 'Chat ID',
                      name: 'chatId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              messageType: ['message'],
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername). To find your chat ID ask @get_id_bot.',
                  },
                  {
                      displayName: 'Binary Data',
                      name: 'binaryData',
                      type: 'boolean',
                      default: false,
                      required: true,
                      displayOptions: {
                          show: {
                              operation: [
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendDocument',
                                  'sendPhoto',
                                  'sendVideo',
                                  'sendSticker',
                              ],
                              resource: ['message'],
                          },
                      },
                      description: 'Whether the data to upload should be taken from binary field',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: [
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendDocument',
                                  'sendPhoto',
                                  'sendVideo',
                                  'sendSticker',
                              ],
                              resource: ['message'],
                              binaryData: [true],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property that contains the data to upload',
                  },
                  {
                      displayName: 'Message ID',
                      name: 'messageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              messageType: ['message'],
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the message to edit',
                  },
                  {
                      displayName: 'Inline Message ID',
                      name: 'inlineMessageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              messageType: ['inlineMessage'],
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the inline message to edit',
                  },
                  {
                      displayName: 'Reply Markup',
                      name: 'replyMarkup',
                      displayOptions: {
                          show: {
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'None',
                              value: 'none',
                          },
                          {
                              name: 'Inline Keyboard',
                              value: 'inlineKeyboard',
                          },
                      ],
                      default: 'none',
                      description: 'Additional interface options',
                  },
                  {
                      displayName: 'Animation',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendAnimation'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Animation to send. Pass a file_id to send an animation that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get an animation from the Internet.',
                  },
                  {
                      displayName: 'Audio',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendAudio'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Audio file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
                  },
                  {
                      displayName: 'Action',
                      name: 'action',
                      type: 'options',
                      displayOptions: {
                          show: {
                              operation: ['sendChatAction'],
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Find Location',
                              value: 'find_location',
                              action: 'Find location',
                          },
                          {
                              name: 'Record Audio',
                              value: 'record_audio',
                              action: 'Record audio',
                          },
                          {
                              name: 'Record Video',
                              value: 'record_video',
                              action: 'Record video',
                          },
                          {
                              name: 'Record Video Note',
                              value: 'record_video_note',
                              action: 'Record video note',
                          },
                          {
                              name: 'Typing',
                              value: 'typing',
                              action: 'Typing a message',
                          },
                          {
                              name: 'Upload Audio',
                              value: 'upload_audio',
                              action: 'Upload audio',
                          },
                          {
                              name: 'Upload Document',
                              value: 'upload_document',
                              action: 'Upload document',
                          },
                          {
                              name: 'Upload Photo',
                              value: 'upload_photo',
                              action: 'Upload photo',
                          },
                          {
                              name: 'Upload Video',
                              value: 'upload_video',
                              action: 'Upload video',
                          },
                          {
                              name: 'Upload Video Note',
                              value: 'upload_video_note',
                              action: 'Upload video note',
                          },
                      ],
                      default: 'typing',
                      description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive. The status is set for 5 seconds or less (when a message arrives from your bot).',
                  },
                  {
                      displayName: 'Document',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendDocument'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Document to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
                  },
                  {
                      displayName: 'Latitude',
                      name: 'latitude',
                      type: 'number',
                      default: 0.0,
                      typeOptions: {
                          numberPrecision: 10,
                          minValue: -90,
                          maxValue: 90,
                      },
                      displayOptions: {
                          show: {
                              operation: ['sendLocation'],
                              resource: ['message'],
                          },
                      },
                      description: 'Location latitude',
                  },
                  {
                      displayName: 'Longitude',
                      name: 'longitude',
                      type: 'number',
                      typeOptions: {
                          numberPrecision: 10,
                          minValue: -180,
                          maxValue: 180,
                      },
                      default: 0.0,
                      displayOptions: {
                          show: {
                              operation: ['sendLocation'],
                              resource: ['message'],
                          },
                      },
                      description: 'Location longitude',
                  },
                  {
                      displayName: 'Media',
                      name: 'media',
                      type: 'fixedCollection',
                      displayOptions: {
                          show: {
                              operation: ['sendMediaGroup'],
                              resource: ['message'],
                          },
                      },
                      description: 'The media to add',
                      placeholder: 'Add Media',
                      typeOptions: {
                          multipleValues: true,
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Media',
                              name: 'media',
                              values: [
                                  {
                                      displayName: 'Type',
                                      name: 'type',
                                      type: 'options',
                                      options: [
                                          {
                                              name: 'Photo',
                                              value: 'photo',
                                          },
                                          {
                                              name: 'Video',
                                              value: 'video',
                                          },
                                      ],
                                      default: 'photo',
                                      description: 'The type of the media to add',
                                  },
                                  {
                                      displayName: 'Media File',
                                      name: 'media',
                                      type: 'string',
                                      default: '',
                                      description: 'Media to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass an HTTP URL for Telegram to get a file from the Internet.',
                                  },
                                  {
                                      displayName: 'Additional Fields',
                                      name: 'additionalFields',
                                      type: 'collection',
                                      placeholder: 'Add Field',
                                      default: {},
                                      options: [
                                          {
                                              displayName: 'Caption',
                                              name: 'caption',
                                              type: 'string',
                                              default: '',
                                              description: 'Caption text to set, 0-1024 characters',
                                          },
                                          {
                                              displayName: 'Parse Mode',
                                              name: 'parse_mode',
                                              type: 'options',
                                              options: [
                                                  {
                                                      name: 'Markdown',
                                                      value: 'Markdown',
                                                  },
                                                  {
                                                      name: 'HTML',
                                                      value: 'HTML',
                                                  },
                                              ],
                                              default: 'HTML',
                                              description: 'How to parse the text',
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Text',
                      name: 'text',
                      type: 'string',
                      required: true,
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['editMessageText', 'sendMessage'],
                              resource: ['message'],
                          },
                      },
                      description: 'Text of the message to be sent',
                  },
                  {
                      displayName: 'Photo',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendPhoto'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Photo to send. Pass a file_id to send a photo that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a photo from the Internet.',
                  },
                  {
                      displayName: 'Sticker',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendSticker'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Sticker to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a .webp file from the Internet.',
                  },
                  {
                      displayName: 'Video',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendVideo'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Video file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
                  },
                  {
                      displayName: 'Reply Markup',
                      name: 'replyMarkup',
                      displayOptions: {
                          show: {
                              operation: [
                                  'sendAnimation',
                                  'sendDocument',
                                  'sendMessage',
                                  'sendPhoto',
                                  'sendSticker',
                                  'sendVideo',
                                  'sendAudio',
                                  'sendLocation',
                              ],
                              resource: ['message'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'Force Reply',
                              value: 'forceReply',
                          },
                          {
                              name: 'Inline Keyboard',
                              value: 'inlineKeyboard',
                          },
                          {
                              name: 'None',
                              value: 'none',
                          },
                          {
                              name: 'Reply Keyboard',
                              value: 'replyKeyboard',
                          },
                          {
                              name: 'Reply Keyboard Remove',
                              value: 'replyKeyboardRemove',
                          },
                      ],
                      default: 'none',
                      description: 'Additional interface options',
                  },
                  {
                      displayName: 'Force Reply',
                      name: 'forceReply',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              replyMarkup: ['forceReply'],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Force Reply',
                              name: 'force_reply',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to show reply interface to the user, as if they manually selected the bot‘s message and tapped ’Reply',
                          },
                          {
                              displayName: 'Selective',
                              name: 'selective',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to force reply from specific users only',
                          },
                      ],
                  },
                  {
                      displayName: 'Inline Keyboard',
                      name: 'inlineKeyboard',
                      placeholder: 'Add Keyboard Row',
                      description: 'Adds an inline keyboard that appears right next to the message it belongs to',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              replyMarkup: ['inlineKeyboard'],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Rows',
                              name: 'rows',
                              values: [
                                  {
                                      displayName: 'Row',
                                      name: 'row',
                                      type: 'fixedCollection',
                                      description: 'The value to set',
                                      placeholder: 'Add Button',
                                      typeOptions: {
                                          multipleValues: true,
                                      },
                                      default: {},
                                      options: [
                                          {
                                              displayName: 'Buttons',
                                              name: 'buttons',
                                              values: [
                                                  {
                                                      displayName: 'Text',
                                                      name: 'text',
                                                      type: 'string',
                                                      default: '',
                                                      description: 'Label text on the button',
                                                  },
                                                  {
                                                      displayName: 'Additional Fields',
                                                      name: 'additionalFields',
                                                      type: 'collection',
                                                      placeholder: 'Add Field',
                                                      default: {},
                                                      options: [
                                                          {
                                                              displayName: 'Callback Data',
                                                              name: 'callback_data',
                                                              type: 'string',
                                                              default: '',
                                                              description: 'Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes',
                                                          },
                                                          {
                                                              displayName: 'Pay',
                                                              name: 'pay',
                                                              type: 'boolean',
                                                              default: false,
                                                              description: 'Whether to send a Pay button',
                                                          },
                                                          {
                                                              displayName: 'Switch Inline Query Current Chat',
                                                              name: 'switch_inline_query_current_chat',
                                                              type: 'string',
                                                              default: '',
                                                              description: "If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field.Can be empty, in which case only the bot’s username will be inserted",
                                                          },
                                                          {
                                                              displayName: 'Switch Inline Query',
                                                              name: 'switch_inline_query',
                                                              type: 'string',
                                                              default: '',
                                                              description: 'If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.',
                                                          },
                                                          {
                                                              displayName: 'URL',
                                                              name: 'url',
                                                              type: 'string',
                                                              default: '',
                                                              description: 'HTTP or tg:// URL to be opened when button is pressed',
                                                          },
                                                      ],
                                                  },
                                              ],
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Reply Keyboard',
                      name: 'replyKeyboard',
                      placeholder: 'Add Reply Keyboard Row',
                      description: 'Adds a custom keyboard with reply options',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              replyMarkup: ['replyKeyboard'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Rows',
                              name: 'rows',
                              values: [
                                  {
                                      displayName: 'Row',
                                      name: 'row',
                                      type: 'fixedCollection',
                                      description: 'The value to set',
                                      placeholder: 'Add Button',
                                      typeOptions: {
                                          multipleValues: true,
                                      },
                                      default: {},
                                      options: [
                                          {
                                              displayName: 'Buttons',
                                              name: 'buttons',
                                              values: [
                                                  {
                                                      displayName: 'Text',
                                                      name: 'text',
                                                      type: 'string',
                                                      default: '',
                                                      description: 'Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed.',
                                                  },
                                                  {
                                                      displayName: 'Additional Fields',
                                                      name: 'additionalFields',
                                                      type: 'collection',
                                                      placeholder: 'Add Field',
                                                      default: {},
                                                      options: [
                                                          {
                                                              displayName: 'Request Contact',
                                                              name: 'request_contact',
                                                              type: 'boolean',
                                                              default: false,
                                                              description: "Whether the user's phone number will be sent as a contact when the button is pressed.Available in private chats only",
                                                          },
                                                          {
                                                              displayName: 'Request Location',
                                                              name: 'request_location',
                                                              type: 'boolean',
                                                              default: false,
                                                              description: "Whether the user's request_location",
                                                          },
                                                      ],
                                                  },
                                              ],
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Reply Keyboard Options',
                      name: 'replyKeyboardOptions',
                      type: 'collection',
                      placeholder: 'Add Option',
                      displayOptions: {
                          show: {
                              replyMarkup: ['replyKeyboard'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Resize Keyboard',
                              name: 'resize_keyboard',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to request clients to resize the keyboard vertically for optimal fit',
                          },
                          {
                              displayName: 'One Time Keyboard',
                              name: 'one_time_keyboard',
                              type: 'boolean',
                              default: false,
                              description: "Whether to request clients to hide the keyboard as soon as it's been used",
                          },
                          {
                              displayName: 'Selective',
                              name: 'selective',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to show the keyboard to specific users only',
                          },
                      ],
                  },
                  {
                      displayName: 'Reply Keyboard Remove',
                      name: 'replyKeyboardRemove',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              replyMarkup: ['replyKeyboardRemove'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Remove Keyboard',
                              name: 'remove_keyboard',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to request clients to remove the custom keyboard',
                          },
                          {
                              displayName: 'Selective',
                              name: 'selective',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to force reply from specific users only',
                          },
                      ],
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: [
                                  'editMessageText',
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendDocument',
                                  'sendLocation',
                                  'sendMessage',
                                  'sendMediaGroup',
                                  'sendPhoto',
                                  'sendSticker',
                                  'sendVideo',
                              ],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Append n8n Attribution',
                              name: 'appendAttribution',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to include the phrase “This message was sent automatically with n8n” to the end of the message',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendMessage'],
                                  },
                              },
                          },
                          {
                              displayName: 'Caption',
                              name: 'caption',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendDocument',
                                          'sendPhoto',
                                          'sendVideo',
                                      ],
                                  },
                              },
                              default: '',
                              description: 'Caption text to set, 0-1024 characters',
                          },
                          {
                              displayName: 'Disable Notification',
                              name: 'disable_notification',
                              type: 'boolean',
                              default: false,
                              displayOptions: {
                                  hide: {
                                      '/operation': ['editMessageText'],
                                  },
                              },
                              description: 'Whether to send the message silently. Users will receive a notification with no sound.',
                          },
                          {
                              displayName: 'Disable WebPage Preview',
                              name: 'disable_web_page_preview',
                              type: 'boolean',
                              displayOptions: {
                                  show: {
                                      '/operation': ['editMessageText', 'sendMessage'],
                                  },
                              },
                              default: false,
                              description: 'Whether to disable link previews for links in this message',
                          },
                          {
                              displayName: 'Duration',
                              name: 'duration',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendAudio', 'sendVideo'],
                                  },
                              },
                              default: 0,
                              description: 'Duration of clip in seconds',
                          },
                          {
                              displayName: 'File Name',
                              name: 'fileName',
                              type: 'string',
                              default: '',
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendDocument',
                                          'sendPhoto',
                                          'sendVideo',
                                          'sendSticker',
                                      ],
                                      '/resource': ['message'],
                                      '/binaryData': [true],
                                  },
                              },
                              placeholder: 'image.jpeg',
                          },
                          {
                              displayName: 'Height',
                              name: 'height',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendVideo'],
                                  },
                              },
                              default: 0,
                              description: 'Height of the video',
                          },
                          {
                              displayName: 'Parse Mode',
                              name: 'parse_mode',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Markdown',
                                      value: 'Markdown',
                                  },
                                  {
                                      name: 'HTML',
                                      value: 'HTML',
                                  },
                              ],
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'editMessageText',
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendMessage',
                                          'sendPhoto',
                                          'sendVideo',
                                          'sendDocument',
                                      ],
                                  },
                              },
                              default: 'HTML',
                              description: 'How to parse the text',
                          },
                          {
                              displayName: 'Performer',
                              name: 'performer',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAudio'],
                                  },
                              },
                              default: '',
                              description: 'Name of the performer',
                          },
                          {
                              displayName: 'Reply To Message ID',
                              name: 'reply_to_message_id',
                              type: 'number',
                              displayOptions: {
                                  hide: {
                                      '/operation': ['editMessageText'],
                                  },
                              },
                              default: 0,
                              description: 'If the message is a reply, ID of the original message',
                          },
                          {
                              displayName: 'Message Thread ID',
                              name: 'message_thread_id',
                              type: 'number',
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendChatAction',
                                          'sendDocument',
                                          'sendLocation',
                                          'sendMediaGroup',
                                          'sendMessage',
                                          'sendPhoto',
                                          'sendSticker',
                                          'sendVideo',
                                      ],
                                  },
                              },
                              default: 0,
                              description: 'The unique identifier of the forum topic',
                          },
                          {
                              displayName: 'Title',
                              name: 'title',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAudio'],
                                  },
                              },
                              default: '',
                              description: 'Title of the track',
                          },
                          {
                              displayName: 'Thumbnail',
                              name: 'thumb',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendAudio', 'sendDocument', 'sendVideo'],
                                  },
                              },
                              default: '',
                              description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320.',
                          },
                          {
                              displayName: 'Width',
                              name: 'width',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendVideo'],
                                  },
                              },
                              default: 0,
                              description: 'Width of the video',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          var _a, _b;
          const items = this.getInputData();
          const returnData = [];
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          const binaryData = this.getNodeParameter('binaryData', 0, false);
          const nodeVersion = this.getNode().typeVersion;
          const instanceId = this.getInstanceId();
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'POST';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'callback') {
                      if (operation === 'answerQuery') {
                          endpoint = 'answerCallbackQuery';
                          body.callback_query_id = this.getNodeParameter('queryId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                      else if (operation === 'answerInlineQuery') {
                          endpoint = 'answerInlineQuery';
                          body.inline_query_id = this.getNodeParameter('queryId', i);
                          body.results = this.getNodeParameter('results', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                  }
                  else if (resource === 'chat') {
                      if (operation === 'get') {
                          endpoint = 'getChat';
                          body.chat_id = this.getNodeParameter('chatId', i);
                      }
                      else if (operation === 'administrators') {
                          endpoint = 'getChatAdministrators';
                          body.chat_id = this.getNodeParameter('chatId', i);
                      }
                      else if (operation === 'leave') {
                          endpoint = 'leaveChat';
                          body.chat_id = this.getNodeParameter('chatId', i);
                      }
                      else if (operation === 'member') {
                          endpoint = 'getChatMember';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.user_id = this.getNodeParameter('userId', i);
                      }
                      else if (operation === 'setDescription') {
                          endpoint = 'setChatDescription';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.description = this.getNodeParameter('description', i);
                      }
                      else if (operation === 'setTitle') {
                          endpoint = 'setChatTitle';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.title = this.getNodeParameter('title', i);
                      }
                  }
                  else if (resource === 'file') {
                      if (operation === 'get') {
                          endpoint = 'getFile';
                          body.file_id = this.getNodeParameter('fileId', i);
                      }
                  }
                  else if (resource === 'message') {
                      if (operation === 'editMessageText') {
                          endpoint = 'editMessageText';
                          const messageType = this.getNodeParameter('messageType', i);
                          if (messageType === 'inlineMessage') {
                              body.inline_message_id = this.getNodeParameter('inlineMessageId', i);
                          }
                          else {
                              body.chat_id = this.getNodeParameter('chatId', i);
                              body.message_id = this.getNodeParameter('messageId', i);
                          }
                          body.text = this.getNodeParameter('text', i);
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'deleteMessage') {
                          endpoint = 'deleteMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.message_id = this.getNodeParameter('messageId', i);
                      }
                      else if (operation === 'pinChatMessage') {
                          endpoint = 'pinChatMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.message_id = this.getNodeParameter('messageId', i);
                          const { disable_notification } = this.getNodeParameter('additionalFields', i);
                          if (disable_notification) {
                              body.disable_notification = true;
                          }
                      }
                      else if (operation === 'unpinChatMessage') {
                          endpoint = 'unpinChatMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.message_id = this.getNodeParameter('messageId', i);
                      }
                      else if (operation === 'sendAnimation') {
                          endpoint = 'sendAnimation';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.animation = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendAudio') {
                          endpoint = 'sendAudio';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.audio = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendChatAction') {
                          endpoint = 'sendChatAction';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.action = this.getNodeParameter('action', i);
                      }
                      else if (operation === 'sendDocument') {
                          endpoint = 'sendDocument';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.document = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendLocation') {
                          endpoint = 'sendLocation';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.latitude = this.getNodeParameter('latitude', i);
                          body.longitude = this.getNodeParameter('longitude', i);
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendMessage') {
                          endpoint = 'sendMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.text = this.getNodeParameter('text', i);
                          GenericFunctions_1.addAdditionalFields.call(this, body, i, nodeVersion, instanceId);
                      }
                      else if (operation === 'sendMediaGroup') {
                          endpoint = 'sendMediaGroup';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          const mediaItems = this.getNodeParameter('media', i);
                          body.media = [];
                          for (const mediaItem of mediaItems.media) {
                              if (mediaItem.additionalFields !== undefined) {
                                  Object.assign(mediaItem, mediaItem.additionalFields);
                                  delete mediaItem.additionalFields;
                              }
                              body.media.push(mediaItem);
                          }
                      }
                      else if (operation === 'sendPhoto') {
                          endpoint = 'sendPhoto';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.photo = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendSticker') {
                          endpoint = 'sendSticker';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.sticker = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendVideo') {
                          endpoint = 'sendVideo';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.video = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  let responseData;
                  if (binaryData) {
                      const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0);
                      const itemBinaryData = items[i].binary[binaryPropertyName];
                      const propertyName = (0, GenericFunctions_1.getPropertyName)(operation);
                      const fileName = this.getNodeParameter('additionalFields.fileName', 0, '');
                      const filename = fileName || ((_a = itemBinaryData.fileName) === null || _a === void 0 ? void 0 : _a.toString());
                      if (!fileName && !itemBinaryData.fileName) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `File name is needed to ${operation}. Make sure the property that holds the binary data
  						has the file name property set or set it manually in the node using the File Name parameter under
  						Additional Fields.`);
                      }
                      body.disable_notification = ((_b = body.disable_notification) === null || _b === void 0 ? void 0 : _b.toString()) || 'false';
                      let uploadData;
                      if (itemBinaryData.id) {
                          uploadData = await this.helpers.getBinaryStream(itemBinaryData.id);
                      }
                      else {
                          uploadData = Buffer.from(itemBinaryData.data, n8n_workflow_1.BINARY_ENCODING);
                      }
                      const formData = {
                          ...body,
                          [propertyName]: {
                              value: uploadData,
                              options: {
                                  filename,
                                  contentType: itemBinaryData.mimeType,
                              },
                          },
                      };
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, {}, qs, { formData });
                  }
                  else {
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, body, qs);
                  }
                  if (resource === 'file' && operation === 'get') {
                      if (this.getNodeParameter('download', i, false)) {
                          const filePath = responseData.result.file_path;
                          const credentials = await this.getCredentials('telegramApi');
                          const file = await GenericFunctions_1.apiRequest.call(this, 'GET', '', {}, {}, {
                              json: false,
                              encoding: null,
                              uri: `https://api.telegram.org/file/bot${credentials.accessToken}/${filePath}`,
                              resolveWithFullResponse: true,
                              useStream: true,
                          });
                          const fileName = filePath.split('/').pop();
                          const data = await this.helpers.prepareBinaryData(file.body, fileName);
                          returnData.push({
                              json: responseData,
                              binary: { data },
                              pairedItem: { item: i },
                          });
                          continue;
                      }
                  }
                  else if (resource === 'chat' && operation === 'administrators') {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.result), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ json: {}, error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Telegram = Telegram;
  //# sourceMappingURL=Telegram.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.TheHive
name: TheHive
package_name: n8n-nodes-base
display_name: TheHive
description: Consume TheHive API
code_hash: 4693e13130108cbcdb7b8541cea40e18dff162d3e1cdd41ddc11bb95d829a947
source_location: node_modules/n8n-nodes-base/dist/nodes/TheHive/TheHive.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TheHive = void 0;
  const AlertDescription_1 = require("./descriptions/AlertDescription");
  const ObservableDescription_1 = require("./descriptions/ObservableDescription");
  const CaseDescription_1 = require("./descriptions/CaseDescription");
  const TaskDescription_1 = require("./descriptions/TaskDescription");
  const LogDescription_1 = require("./descriptions/LogDescription");
  const QueryFunctions_1 = require("./QueryFunctions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const set_1 = __importDefault(require("lodash/set"));
  class TheHive {
      constructor() {
          this.description = {
              displayName: 'TheHive',
              name: 'theHive',
              icon: 'file:thehive.svg',
              group: ['transform'],
              subtitle: '={{$parameter["operation"]}} : {{$parameter["resource"]}}',
              version: 1,
              description: 'Consume TheHive API',
              defaults: {
                  name: 'TheHive',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'theHiveApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      options: [
                          {
                              name: 'Alert',
                              value: 'alert',
                          },
                          {
                              name: 'Case',
                              value: 'case',
                          },
                          {
                              name: 'Log',
                              value: 'log',
                          },
                          {
                              name: 'Observable',
                              value: 'observable',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                      ],
                      default: 'alert',
                  },
                  ...AlertDescription_1.alertOperations,
                  ...AlertDescription_1.alertFields,
                  ...ObservableDescription_1.observableOperations,
                  ...ObservableDescription_1.observableFields,
                  ...CaseDescription_1.caseOperations,
                  ...CaseDescription_1.caseFields,
                  ...TaskDescription_1.taskOperations,
                  ...TaskDescription_1.taskFields,
                  ...LogDescription_1.logOperations,
                  ...LogDescription_1.logFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async loadResponders() {
                      const resource = (0, GenericFunctions_1.mapResource)(this.getNodeParameter('resource'));
                      const resourceId = this.getNodeParameter('id');
                      const endpoint = `/connector/cortex/responder/${resource}/${resourceId}`;
                      const responders = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      const returnData = [];
                      for (const responder of responders) {
                          returnData.push({
                              name: responder.name,
                              value: responder.id,
                              description: responder.description,
                          });
                      }
                      return returnData;
                  },
                  async loadAnalyzers() {
                      const dataType = this.getNodeParameter('dataType');
                      const endpoint = `/connector/cortex/analyzer/type/${dataType}`;
                      const requestResult = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      const returnData = [];
                      for (const analyzer of requestResult) {
                          for (const cortexId of analyzer.cortexIds) {
                              returnData.push({
                                  name: `[${cortexId}] ${analyzer.name}`,
                                  value: `${analyzer.id}::${cortexId}`,
                                  description: analyzer.description,
                              });
                          }
                      }
                      return returnData;
                  },
                  async loadCustomFields() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const endpoint = version === 'v1' ? '/customField' : '/list/custom_fields';
                      const requestResult = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      const returnData = [];
                      const customFields = version === 'v1'
                          ? requestResult
                          : Object.keys(requestResult).map((key) => requestResult[key]);
                      for (const field of customFields) {
                          returnData.push({
                              name: `${field.name}: ${field.reference}`,
                              value: field.reference,
                              description: `${field.type}: ${field.description}`,
                          });
                      }
                      return returnData;
                  },
                  async loadObservableOptions() {
                      const version = (await this.getCredentials('theHiveApi')).apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count observables' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create observable' },
                          {
                              name: 'Execute Analyzer',
                              value: 'executeAnalyzer',
                              description: 'Execute an responder on selected observable',
                          },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on selected observable',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get all observables of a specific case',
                          },
                          { name: 'Get', value: 'get', description: 'Get a single observable' },
                          { name: 'Search', value: 'search', description: 'Search observables' },
                          { name: 'Update', value: 'update', description: 'Update observable' },
                      ];
                      return options;
                  },
                  async loadObservableTypes() {
                      const version = (await this.getCredentials('theHiveApi')).apiVersion;
                      const endpoint = version === 'v1' ? '/observable/type?range=all' : '/list/list_artifactDataType';
                      const dataTypes = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      let returnData = [];
                      if (version === 'v1') {
                          returnData = dataTypes.map((dataType) => {
                              return {
                                  name: dataType.name,
                                  value: dataType.name,
                              };
                          });
                      }
                      else {
                          returnData = Object.keys(dataTypes).map((key) => {
                              const dataType = dataTypes[key];
                              return {
                                  name: dataType,
                                  value: dataType,
                              };
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async loadTaskOptions() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count tasks' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create a task' },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on the specified task',
                          },
                          { name: 'Get Many', value: 'getAll', description: 'Get all asks of a specific case' },
                          { name: 'Get', value: 'get', description: 'Get a single task' },
                          { name: 'Search', value: 'search', description: 'Search tasks' },
                          { name: 'Update', value: 'update', description: 'Update a task' },
                      ];
                      return options;
                  },
                  async loadAlertOptions() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count alerts' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create alert' },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on the specified alert',
                          },
                          { name: 'Get', value: 'get', description: 'Get an alert' },
                          { name: 'Get Many', value: 'getAll', description: 'Get all alerts' },
                          { name: 'Mark as Read', value: 'markAsRead', description: 'Mark the alert as read' },
                          {
                              name: 'Mark as Unread',
                              value: 'markAsUnread',
                              description: 'Mark the alert as unread',
                          },
                          { name: 'Merge', value: 'merge', description: 'Merge alert into an existing case' },
                          { name: 'Promote', value: 'promote', description: 'Promote an alert into a case' },
                          { name: 'Update', value: 'update', description: 'Update alert' },
                      ];
                      return options;
                  },
                  async loadCaseOptions() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count a case' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create a case' },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on the specified case',
                          },
                          { name: 'Get Many', value: 'getAll', description: 'Get all cases' },
                          { name: 'Get', value: 'get', description: 'Get a single case' },
                          { name: 'Update', value: 'update', description: 'Update a case' },
                      ];
                      return options;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'alert') {
                      if (operation === 'count') {
                          const filters = this.getNodeParameter('filters', i, {});
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _countSearchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'tags') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.In)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'title') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listAlert',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-Alert';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'create') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, additionalFields, jsonParameters);
                          const body = {
                              title: this.getNodeParameter('title', i),
                              description: this.getNodeParameter('description', i),
                              severity: this.getNodeParameter('severity', i),
                              date: Date.parse(this.getNodeParameter('date', i)),
                              tags: (0, GenericFunctions_1.splitTags)(this.getNodeParameter('tags', i)),
                              tlp: this.getNodeParameter('tlp', i),
                              status: this.getNodeParameter('status', i),
                              type: this.getNodeParameter('type', i),
                              source: this.getNodeParameter('source', i),
                              sourceRef: this.getNodeParameter('sourceRef', i),
                              follow: this.getNodeParameter('follow', i, true),
                              ...(0, GenericFunctions_1.prepareOptional)(additionalFields),
                          };
                          if (customFields) {
                              Object.keys(customFields).forEach((key) => {
                                  (0, set_1.default)(body, key, customFields[key]);
                              });
                          }
                          const artifactUi = this.getNodeParameter('artifactUi', i);
                          if (artifactUi) {
                              const artifactValues = artifactUi.artifactValues;
                              if (artifactValues) {
                                  const artifactData = [];
                                  for (const artifactvalue of artifactValues) {
                                      const element = {};
                                      element.message = artifactvalue.message;
                                      element.tags = artifactvalue.tags.split(',');
                                      element.dataType = artifactvalue.dataType;
                                      element.data = artifactvalue.data;
                                      if (artifactvalue.dataType === 'file') {
                                          const binaryPropertyName = artifactvalue.binaryProperty;
                                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                          element.data = `${binaryData.fileName};${binaryData.mimeType};${binaryData.data}`;
                                      }
                                      artifactData.push(element);
                                  }
                                  body.artifacts = artifactData;
                              }
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/alert', body);
                      }
                      if (operation === 'executeResponder') {
                          const alertId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: alertId,
                              objectType: 'alert',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'get') {
                          const alertId = this.getNodeParameter('id', i);
                          const includeSimilar = this.getNodeParameter('options.includeSimilar', i, false);
                          if (includeSimilar) {
                              qs.similarity = true;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', `/alert/${alertId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const filters = this.getNodeParameter('filters', i, {});
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const options = this.getNodeParameter('options', i);
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _searchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'tags') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.In)(key, queryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'title') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listAlert',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'alerts';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/alert/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'markAsRead') {
                          const alertId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/markAsRead`);
                      }
                      if (operation === 'markAsUnread') {
                          const alertId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/markAsUnread`);
                      }
                      if (operation === 'merge') {
                          const alertId = this.getNodeParameter('id', i);
                          const caseId = this.getNodeParameter('caseId', i);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/merge/${caseId}`, {});
                      }
                      if (operation === 'promote') {
                          const alertId = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {};
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/createCase`, body);
                      }
                      if (operation === 'update') {
                          const alertId = this.getNodeParameter('id', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, updateFields, jsonParameters);
                          const artifactUi = updateFields.artifactUi;
                          delete updateFields.artifactUi;
                          const body = {
                              ...customFields,
                          };
                          Object.assign(body, updateFields);
                          if (artifactUi) {
                              const artifactValues = artifactUi.artifactValues;
                              if (artifactValues) {
                                  const artifactData = [];
                                  for (const artifactvalue of artifactValues) {
                                      const element = {};
                                      element.message = artifactvalue.message;
                                      element.tags = artifactvalue.tags.split(',');
                                      element.dataType = artifactvalue.dataType;
                                      element.data = artifactvalue.data;
                                      if (artifactvalue.dataType === 'file') {
                                          const binaryPropertyName = artifactvalue.binaryProperty;
                                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                          element.data = `${binaryData.fileName};${binaryData.mimeType};${binaryData.data}`;
                                      }
                                      artifactData.push(element);
                                  }
                                  body.artifacts = artifactData;
                              }
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/alert/${alertId}`, body);
                      }
                  }
                  if (resource === 'observable') {
                      if (operation === 'count') {
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'dataType' || key === 'tags') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.In)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'keywork' || key === 'message') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'range') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Between)('startDate', countQueryAttributs['range']['dateRange']['fromDate'], countQueryAttributs['range']['dateRange']['toDate']));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listObservable',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-observables';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'executeAnalyzer') {
                          const observableId = this.getNodeParameter('id', i);
                          const analyzers = this.getNodeParameter('analyzers', i).map((analyzer) => {
                              const parts = analyzer.split('::');
                              return {
                                  analyzerId: parts[0],
                                  cortexId: parts[1],
                              };
                          });
                          let response;
                          let body;
                          responseData = [];
                          for (const analyzer of analyzers) {
                              body = {
                                  ...analyzer,
                                  artifactId: observableId,
                              };
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/job', body, qs);
                              const jobId = response.id;
                              qs.name = 'observable-jobs';
                              do {
                                  responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', `/connector/cortex/job/${jobId}`, body, qs);
                              } while (responseData.status === 'Waiting' || responseData.status === 'InProgress');
                          }
                      }
                      if (operation === 'executeResponder') {
                          const observableId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: observableId,
                              objectType: 'case_artifact',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'create') {
                          const caseId = this.getNodeParameter('caseId', i);
                          let body = {
                              dataType: this.getNodeParameter('dataType', i),
                              message: this.getNodeParameter('message', i),
                              startDate: Date.parse(this.getNodeParameter('startDate', i)),
                              tlp: this.getNodeParameter('tlp', i),
                              ioc: this.getNodeParameter('ioc', i),
                              sighted: this.getNodeParameter('sighted', i),
                              status: this.getNodeParameter('status', i),
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('options', i, {})),
                          };
                          let options = {};
                          if (body.dataType === 'file') {
                              const binaryPropertyName = this.getNodeParameter('binaryProperty', i);
                              const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                              const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                              options = {
                                  formData: {
                                      attachment: {
                                          value: dataBuffer,
                                          options: {
                                              contentType: binaryData.mimeType,
                                              filename: binaryData.fileName,
                                          },
                                      },
                                      _json: JSON.stringify(body),
                                  },
                              };
                              body = {};
                          }
                          else {
                              body.data = this.getNodeParameter('data', i);
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/case/${caseId}/artifact`, body, qs, '', options);
                      }
                      if (operation === 'get') {
                          const observableId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getObservable',
                                          idOrName: observableId,
                                      },
                                  ],
                              };
                              qs.name = `get-observable-${observableId}`;
                          }
                          else {
                              method = 'GET';
                              endpoint = `/case/artifact/${observableId}`;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const options = this.getNodeParameter('options', i);
                          const caseId = this.getNodeParameter('caseId', i);
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getCase',
                                          idOrName: caseId,
                                      },
                                      {
                                          _name: 'observables',
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'observables';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/artifact/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = (0, QueryFunctions_1.Parent)('case', (0, QueryFunctions_1.Id)(caseId));
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'search') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          const options = this.getNodeParameter('options', i);
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'dataType' || key === 'tags') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.In)(key, queryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'keywork' || key === 'message') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else if (key === 'range') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Between)('startDate', queryAttributs['range']['dateRange']['fromDate'], queryAttributs['range']['dateRange']['toDate']));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listObservable',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'observables';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/artifact/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('updateFields', i, {})),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/case/artifact/${id}`, body, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'case') {
                      if (operation === 'count') {
                          const filters = this.getNodeParameter('filters', i, {});
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _countSearchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'tags') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.In)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'summary' || key === 'title') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listCase',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-cases';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'executeResponder') {
                          const caseId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: caseId,
                              objectType: 'case',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'create') {
                          const options = this.getNodeParameter('options', i, {});
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, options, jsonParameters);
                          const body = {
                              title: this.getNodeParameter('title', i),
                              description: this.getNodeParameter('description', i),
                              severity: this.getNodeParameter('severity', i),
                              startDate: Date.parse(this.getNodeParameter('startDate', i)),
                              owner: this.getNodeParameter('owner', i),
                              flag: this.getNodeParameter('flag', i),
                              tlp: this.getNodeParameter('tlp', i),
                              tags: (0, GenericFunctions_1.splitTags)(this.getNodeParameter('tags', i)),
                              ...(0, GenericFunctions_1.prepareOptional)(options),
                          };
                          if (customFields) {
                              Object.keys(customFields).forEach((key) => {
                                  (0, set_1.default)(body, key, customFields[key]);
                              });
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/case', body);
                      }
                      if (operation === 'get') {
                          const caseId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getCase',
                                          idOrName: caseId,
                                      },
                                  ],
                              };
                              qs.name = `get-case-${caseId}`;
                          }
                          else {
                              method = 'GET';
                              endpoint = `/case/${caseId}`;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const filters = this.getNodeParameter('filters', i, {});
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          const options = this.getNodeParameter('options', i);
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _searchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'tags') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.In)(key, queryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'summary' || key === 'title') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listCase',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'cases';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i, {});
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, updateFields, jsonParameters);
                          const body = {
                              ...customFields,
                              ...(0, GenericFunctions_1.prepareOptional)(updateFields),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/case/${id}`, body);
                      }
                  }
                  if (resource === 'task') {
                      if (operation === 'count') {
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'title' || key === 'description') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listTask',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-tasks';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'create') {
                          const caseId = this.getNodeParameter('caseId', i);
                          const body = {
                              title: this.getNodeParameter('title', i),
                              status: this.getNodeParameter('status', i),
                              flag: this.getNodeParameter('flag', i),
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('options', i, {})),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/case/${caseId}/task`, body);
                      }
                      if (operation === 'executeResponder') {
                          const taskId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: taskId,
                              objectType: 'case_task',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'task-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'get') {
                          const taskId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getTask',
                                          idOrName: taskId,
                                      },
                                  ],
                              };
                              qs.name = `get-task-${taskId}`;
                          }
                          else {
                              method = 'GET';
                              endpoint = `/case/task/${taskId}`;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const caseId = this.getNodeParameter('caseId', i);
                          const options = this.getNodeParameter('options', i);
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getCase',
                                          idOrName: caseId,
                                      },
                                      {
                                          _name: 'tasks',
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'case-tasks';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = (0, QueryFunctions_1.And)((0, QueryFunctions_1.Parent)('case', (0, QueryFunctions_1.Id)(caseId)));
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'search') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          const options = this.getNodeParameter('options', i);
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'title' || key === 'description') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listTask',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'tasks';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('updateFields', i, {})),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/case/task/${id}`, body);
                      }
                  }
                  if (resource === 'log') {
                      if (operation === 'create') {
                          const taskId = this.getNodeParameter('taskId', i);
                          let body = {
                              message: this.getNodeParameter('message', i),
                              startDate: Date.parse(this.getNodeParameter('startDate', i)),
                              status: this.getNodeParameter('status', i),
                          };
                          const optionals = this.getNodeParameter('options', i);
                          let options = {};
                          if (optionals.attachementUi) {
                              const attachmentValues = optionals.attachementUi
                                  .attachmentValues;
                              if (attachmentValues) {
                                  const binaryPropertyName = attachmentValues.binaryProperty;
                                  const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                                  options = {
                                      formData: {
                                          attachment: {
                                              value: dataBuffer,
                                              options: {
                                                  contentType: binaryData.mimeType,
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          _json: JSON.stringify(body),
                                      },
                                  };
                                  body = {};
                              }
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/case/task/${taskId}/log`, body, qs, '', options);
                      }
                      if (operation === 'executeResponder') {
                          const logId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: logId,
                              objectType: 'case_task_log',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'get') {
                          const logId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getLog',
                                          idOrName: logId,
                                      },
                                  ],
                              };
                              qs.name = `get-log-${logId}`;
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/log/_search';
                              body.query = { _id: logId };
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const taskId = this.getNodeParameter('taskId', i);
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getTask',
                                          idOrName: taskId,
                                      },
                                      {
                                          _name: 'logs',
                                      },
                                  ],
                              };
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'case-task-logs';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/log/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = (0, QueryFunctions_1.And)((0, QueryFunctions_1.Parent)('task', (0, QueryFunctions_1.Id)(taskId)));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.TheHive = TheHive;
  //# sourceMappingURL=TheHive.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.TimescaleDb
name: TimescaleDb
package_name: n8n-nodes-base
display_name: TimescaleDB
description: Add and update data in TimescaleDB
code_hash: 713e4569856e0462795d8d821badaf29b960c59683cb71520ce0d1e709b5c921
source_location: node_modules/n8n-nodes-base/dist/nodes/TimescaleDb/TimescaleDb.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TimescaleDb = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const genericFunctions_1 = require("../Postgres/v1/genericFunctions");
  const pg_promise_1 = __importDefault(require("pg-promise"));
  class TimescaleDb {
      constructor() {
          this.description = {
              displayName: 'TimescaleDB',
              name: 'timescaleDb',
              icon: 'file:timescale.svg',
              group: ['input'],
              version: 1,
              description: 'Add and update data in TimescaleDB',
              defaults: {
                  name: 'TimescaleDB',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'timescaleDb',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      options: [
                          {
                              name: 'Execute Query',
                              value: 'executeQuery',
                              description: 'Execute an SQL query',
                              action: 'Execute a SQL query',
                          },
                          {
                              name: 'Insert',
                              value: 'insert',
                              description: 'Insert rows in database',
                              action: 'Insert rows in database',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update rows in database',
                              action: 'Update rows in database',
                          },
                      ],
                      default: 'insert',
                  },
                  {
                      displayName: 'Query',
                      name: 'query',
                      type: 'string',
                      noDataExpression: true,
                      typeOptions: {
                          editor: 'sqlEditor',
                          rows: 5,
                          sqlDialect: 'PostgreSQL',
                      },
                      displayOptions: {
                          show: {
                              operation: ['executeQuery'],
                          },
                      },
                      default: '',
                      placeholder: 'SELECT id, name FROM product WHERE quantity > $1 AND price <= $2',
                      required: true,
                      description: 'The SQL query to execute. You can use n8n expressions or $1 and $2 in conjunction with query parameters.',
                  },
                  {
                      displayName: 'Schema',
                      name: 'schema',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: 'public',
                      required: true,
                      description: 'Name of the schema the table belongs to',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'Name of the table in which to insert data to',
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: '',
                      placeholder: 'id,name,description',
                      description: 'Comma-separated list of the properties which should used as columns for the new rows',
                  },
                  {
                      displayName: 'Schema',
                      name: 'schema',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: 'public',
                      required: true,
                      description: 'Name of the schema the table belongs to',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'Name of the table in which to update data in',
                  },
                  {
                      displayName: 'Update Key',
                      name: 'updateKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: 'id',
                      required: true,
                      description: 'Name of the property which decides which rows in the database should be updated. Normally that would be "id".',
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: '',
                      placeholder: 'name,description',
                      description: 'Comma-separated list of the properties which should used as columns for rows to update',
                  },
                  {
                      displayName: 'Return Fields',
                      name: 'returnFields',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert', 'update'],
                          },
                      },
                      default: '*',
                      description: 'Comma-separated list of the fields that the operation will return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      options: [
                          {
                              displayName: 'Mode',
                              name: 'mode',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Independently',
                                      value: 'independently',
                                      description: 'Execute each query independently',
                                  },
                                  {
                                      name: 'Multiple Queries',
                                      value: 'multiple',
                                      description: '<b>Default</b>. Sends multiple queries at once to database.',
                                  },
                                  {
                                      name: 'Transaction',
                                      value: 'transaction',
                                      description: 'Executes all queries in a single transaction',
                                  },
                              ],
                              default: 'multiple',
                              description: 'The way queries should be sent to database. Can be used in conjunction with <b>Continue on Fail</b>. See <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.timescaledb/">the docs</a> for more examples',
                          },
                          {
                              displayName: 'Query Parameters',
                              name: 'queryParams',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['executeQuery'],
                                  },
                              },
                              default: '',
                              placeholder: 'quantity,price',
                              description: 'Comma-separated list of properties which should be used as query parameters',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const credentials = await this.getCredentials('timescaleDb');
          const pgp = (0, pg_promise_1.default)();
          const config = {
              host: credentials.host,
              port: credentials.port,
              database: credentials.database,
              user: credentials.user,
              password: credentials.password,
              ssl: !['disable', undefined].includes(credentials.ssl),
              sslmode: credentials.ssl || 'disable',
          };
          const db = pgp(config);
          let returnItems = [];
          const items = this.getInputData();
          const operation = this.getNodeParameter('operation', 0);
          if (operation === 'executeQuery') {
              const queryResult = await genericFunctions_1.pgQueryV2.call(this, pgp, db, items, this.continueOnFail(), {
                  resolveExpression: true,
              });
              returnItems = this.helpers.returnJsonArray(queryResult);
          }
          else if (operation === 'insert') {
              const insertData = await (0, genericFunctions_1.pgInsert)(this.getNodeParameter, pgp, db, items, this.continueOnFail());
              for (let i = 0; i < insertData.length; i++) {
                  returnItems.push({
                      json: insertData[i],
                  });
              }
          }
          else if (operation === 'update') {
              const updateItems = await (0, genericFunctions_1.pgUpdate)(this.getNodeParameter, pgp, db, items, this.continueOnFail());
              returnItems = this.helpers.returnJsonArray(updateItems);
          }
          else {
              await db.$pool.end();
              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported!`);
          }
          await db.$pool.end();
          return [returnItems];
      }
  }
  exports.TimescaleDb = TimescaleDb;
  //# sourceMappingURL=TimescaleDb.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Todoist
name: Todoist
package_name: n8n-nodes-base
display_name: Todoist
description: Consume Todoist API
code_hash: 5834162f968265342f1a072c65b59b08ebab47f0384790d999054541ff446777
source_location: node_modules/n8n-nodes-base/dist/nodes/Todoist/Todoist.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Todoist = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const TodoistV1_node_1 = require("./v1/TodoistV1.node");
  const TodoistV2_node_1 = require("./v2/TodoistV2.node");
  class Todoist extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Todoist',
              name: 'todoist',
              icon: 'file:todoist.svg',
              group: ['output'],
              defaultVersion: 2,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Todoist API',
          };
          const nodeVersions = {
              1: new TodoistV1_node_1.TodoistV1(baseDescription),
              2: new TodoistV2_node_1.TodoistV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Todoist = Todoist;
  //# sourceMappingURL=Todoist.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Totp
name: Totp
package_name: n8n-nodes-base
display_name: TOTP
description: Generate a time-based one-time password
code_hash: 7cdfce3ae2cf188a1b283409f9cc3859c6e6231987208b6599b91d397b862b07
source_location: node_modules/n8n-nodes-base/dist/nodes/Totp/Totp.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Totp = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const otpauth_1 = __importDefault(require("otpauth"));
  class Totp {
      constructor() {
          this.description = {
              displayName: 'TOTP',
              name: 'totp',
              icon: 'fa:fingerprint',
              group: ['transform'],
              version: 1,
              subtitle: '={{ $parameter["operation"] }}',
              description: 'Generate a time-based one-time password',
              defaults: {
                  name: 'TOTP',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'totpApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Generate Secret',
                              value: 'generateSecret',
                              action: 'Generate secret',
                          },
                      ],
                      default: 'generateSecret',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['generateSecret'],
                          },
                      },
                      default: {},
                      placeholder: 'Add Option',
                      options: [
                          {
                              displayName: 'Algorithm',
                              name: 'algorithm',
                              type: 'options',
                              default: 'SHA1',
                              description: 'HMAC hashing algorithm. Defaults to SHA1.',
                              options: [
                                  {
                                      name: 'SHA1',
                                      value: 'SHA1',
                                  },
                                  {
                                      name: 'SHA224',
                                      value: 'SHA224',
                                  },
                                  {
                                      name: 'SHA256',
                                      value: 'SHA256',
                                  },
                                  {
                                      name: 'SHA3-224',
                                      value: 'SHA3-224',
                                  },
                                  {
                                      name: 'SHA3-256',
                                      value: 'SHA3-256',
                                  },
                                  {
                                      name: 'SHA3-384',
                                      value: 'SHA3-384',
                                  },
                                  {
                                      name: 'SHA3-512',
                                      value: 'SHA3-512',
                                  },
                                  {
                                      name: 'SHA384',
                                      value: 'SHA384',
                                  },
                                  {
                                      name: 'SHA512',
                                      value: 'SHA512',
                                  },
                              ],
                          },
                          {
                              displayName: 'Digits',
                              name: 'digits',
                              type: 'number',
                              default: 6,
                              description: 'Number of digits in the generated TOTP code. Defaults to 6 digits.',
                          },
                          {
                              displayName: 'Period',
                              name: 'period',
                              type: 'number',
                              default: 30,
                              description: 'How many seconds the generated TOTP code is valid for. Defaults to 30 seconds.',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const operation = this.getNodeParameter('operation', 0);
          const credentials = (await this.getCredentials('totpApi'));
          if (!credentials.label.includes(':')) {
              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Malformed label - expected `issuer:username`');
          }
          const options = this.getNodeParameter('options', 0);
          if (!options.algorithm)
              options.algorithm = 'SHA1';
          if (!options.digits)
              options.digits = 6;
          if (!options.period)
              options.period = 30;
          const [issuer] = credentials.label.split(':');
          const totp = new otpauth_1.default.TOTP({
              issuer,
              label: credentials.label,
              secret: credentials.secret,
              algorithm: options.algorithm,
              digits: options.digits,
              period: options.period,
          });
          const token = totp.generate();
          const secondsRemaining = (options.period * (1 - ((Date.now() / 1000 / options.period) % 1))) | 0;
          if (operation === 'generateSecret') {
              for (let i = 0; i < items.length; i++) {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ token, secondsRemaining }), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
          }
          return [returnData];
      }
  }
  exports.Totp = Totp;
  //# sourceMappingURL=Totp.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.TravisCi
name: TravisCi
package_name: n8n-nodes-base
display_name: TravisCI
description: Consume TravisCI API
code_hash: 3e073fa53575b8a98002bddbb6651c488e7ff09881d8d210b015393b839f0cba
source_location: node_modules/n8n-nodes-base/dist/nodes/TravisCi/TravisCi.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TravisCi = void 0;
  const BuildDescription_1 = require("./BuildDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class TravisCi {
      constructor() {
          this.description = {
              displayName: 'TravisCI',
              name: 'travisCi',
              icon: 'file:travisci.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume TravisCI API',
              defaults: {
                  name: 'TravisCI',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'travisCiApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Build',
                              value: 'build',
                          },
                      ],
                      default: 'build',
                  },
                  ...BuildDescription_1.buildOperations,
                  ...BuildDescription_1.buildFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'build') {
                      if (operation === 'get') {
                          const buildId = this.getNodeParameter('buildId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.include) {
                              qs.include = additionalFields.include;
                          }
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'GET', `/build/${buildId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (additionalFields.sortBy) {
                              qs.sort_by = additionalFields.sortBy;
                          }
                          if (additionalFields.sortBy && additionalFields.order) {
                              qs.sort_by = `${additionalFields.sortBy}:${additionalFields.order}`;
                          }
                          if (additionalFields.include) {
                              qs.include = additionalFields.include;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.travisciApiRequestAllItems.call(this, 'builds', 'GET', '/builds', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'GET', '/builds', {}, qs);
                              responseData = responseData.builds;
                          }
                      }
                      if (operation === 'cancel') {
                          const buildId = this.getNodeParameter('buildId', i);
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'POST', `/build/${buildId}/cancel`, {}, qs);
                      }
                      if (operation === 'restart') {
                          const buildId = this.getNodeParameter('buildId', i);
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'POST', `/build/${buildId}/restart`, {}, qs);
                      }
                      if (operation === 'trigger') {
                          let slug = this.getNodeParameter('slug', i);
                          const branch = this.getNodeParameter('branch', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          slug = slug.replace(new RegExp(/\//g), '%2F');
                          const request = {
                              branch,
                          };
                          if (additionalFields.message) {
                              request.message = additionalFields.message;
                          }
                          if (additionalFields.mergeMode) {
                              request.merge_mode = additionalFields.mergeMode;
                          }
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'POST', `/repo/${slug}/requests`, JSON.stringify({ request }));
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.TravisCi = TravisCi;
  //# sourceMappingURL=TravisCi.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Trello
name: Trello
package_name: n8n-nodes-base
display_name: Trello
description: Create, change and delete boards and cards
code_hash: 3a5713584d89db802864ee8bb673e2c70882f0385ed0fbb2062f8101107f612b
source_location: node_modules/n8n-nodes-base/dist/nodes/Trello/Trello.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Trello = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const AttachmentDescription_1 = require("./AttachmentDescription");
  const BoardDescription_1 = require("./BoardDescription");
  const BoardMemberDescription_1 = require("./BoardMemberDescription");
  const CardDescription_1 = require("./CardDescription");
  const CardCommentDescription_1 = require("./CardCommentDescription");
  const ChecklistDescription_1 = require("./ChecklistDescription");
  const LabelDescription_1 = require("./LabelDescription");
  const ListDescription_1 = require("./ListDescription");
  class Trello {
      constructor() {
          this.description = {
              displayName: 'Trello',
              name: 'trello',
              icon: 'file:trello.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Create, change and delete boards and cards',
              defaults: {
                  name: 'Trello',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'trelloApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Attachment',
                              value: 'attachment',
                          },
                          {
                              name: 'Board',
                              value: 'board',
                          },
                          {
                              name: 'Board Member',
                              value: 'boardMember',
                          },
                          {
                              name: 'Card',
                              value: 'card',
                          },
                          {
                              name: 'Card Comment',
                              value: 'cardComment',
                          },
                          {
                              name: 'Checklist',
                              value: 'checklist',
                          },
                          {
                              name: 'Label',
                              value: 'label',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                      ],
                      default: 'card',
                  },
                  ...AttachmentDescription_1.attachmentOperations,
                  ...BoardDescription_1.boardOperations,
                  ...BoardMemberDescription_1.boardMemberOperations,
                  ...CardDescription_1.cardOperations,
                  ...CardCommentDescription_1.cardCommentOperations,
                  ...ChecklistDescription_1.checklistOperations,
                  ...LabelDescription_1.labelOperations,
                  ...ListDescription_1.listOperations,
                  ...AttachmentDescription_1.attachmentFields,
                  ...BoardDescription_1.boardFields,
                  ...BoardMemberDescription_1.boardMemberFields,
                  ...CardDescription_1.cardFields,
                  ...CardCommentDescription_1.cardCommentFields,
                  ...ChecklistDescription_1.checklistFields,
                  ...LabelDescription_1.labelFields,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              listSearch: {
                  async searchBoards(query) {
                      if (!query) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query required for Trello search');
                      }
                      const searchResults = await GenericFunctions_1.apiRequest.call(this, 'GET', 'search', {}, {
                          query,
                          modelTypes: 'boards',
                          board_fields: 'name,url,desc',
                          partial: true,
                          boards_limit: 50,
                      });
                      return {
                          results: searchResults.boards.map((b) => ({
                              name: b.name,
                              value: b.id,
                              url: b.url,
                              description: b.desc,
                          })),
                      };
                  },
                  async searchCards(query) {
                      if (!query) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query required for Trello search');
                      }
                      const searchResults = await GenericFunctions_1.apiRequest.call(this, 'GET', 'search', {}, {
                          query,
                          modelTypes: 'cards',
                          board_fields: 'name,url,desc',
                          partial: true,
                          cards_limit: 50,
                      });
                      return {
                          results: searchResults.cards.map((b) => ({
                              name: b.name,
                              value: b.id,
                              url: b.url,
                              description: b.desc,
                          })),
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          let returnAll = false;
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'board') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'boards';
                          qs.name = this.getNodeParameter('name', i);
                          qs.desc = this.getNodeParameter('description', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `boards/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `boards/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `boards/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'boardMember') {
                      if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          endpoint = `boards/${id}/members`;
                      }
                      else if (operation === 'add') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          const idMember = this.getNodeParameter('idMember', i);
                          endpoint = `boards/${id}/members/${idMember}`;
                          qs.type = this.getNodeParameter('type', i);
                          qs.allowBillableGuest = this.getNodeParameter('additionalFields.allowBillableGuest', i, false);
                      }
                      else if (operation === 'invite') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `boards/${id}/members`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.email = this.getNodeParameter('email', i);
                          qs.type = additionalFields.type;
                          body.fullName = additionalFields.fullName;
                      }
                      else if (operation === 'remove') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i);
                          const idMember = this.getNodeParameter('idMember', i);
                          endpoint = `boards/${id}/members/${idMember}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'card') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'cards';
                          qs.idList = this.getNodeParameter('listId', i);
                          qs.name = this.getNodeParameter('name', i);
                          qs.desc = this.getNodeParameter('description', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `cards/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `cards/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `cards/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'cardComment') {
                      if (operation === 'create') {
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          qs.text = this.getNodeParameter('text', i);
                          requestMethod = 'POST';
                          endpoint = `cards/${cardId}/actions/comments`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const commentId = this.getNodeParameter('commentId', i);
                          endpoint = `/cards/${cardId}/actions/${commentId}/comments`;
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const commentId = this.getNodeParameter('commentId', i);
                          qs.text = this.getNodeParameter('text', i);
                          endpoint = `cards/${cardId}/actions/${commentId}/comments`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'list') {
                      if (operation === 'archive') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          qs.value = this.getNodeParameter('archive', i);
                          endpoint = `lists/${id}/closed`;
                      }
                      else if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'lists';
                          qs.idBoard = this.getNodeParameter('idBoard', i);
                          qs.name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `lists/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          const id = this.getNodeParameter('id', i);
                          endpoint = `boards/${id}/lists`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getCards') {
                          requestMethod = 'GET';
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          const id = this.getNodeParameter('id', i);
                          endpoint = `lists/${id}/cards`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `lists/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'attachment') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const url = this.getNodeParameter('url', i);
                          Object.assign(qs, {
                              url,
                          });
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          endpoint = `cards/${cardId}/attachments`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `cards/${cardId}/attachments/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `cards/${cardId}/attachments/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `cards/${cardId}/attachments`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'checklist') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const name = this.getNodeParameter('name', i);
                          Object.assign(qs, { name });
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          endpoint = `cards/${cardId}/checklists`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `cards/${cardId}/checklists/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `checklists/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `cards/${cardId}/checklists`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getCheckItem') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const checkItemId = this.getNodeParameter('checkItemId', i);
                          endpoint = `cards/${cardId}/checkItem/${checkItemId}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'createCheckItem') {
                          requestMethod = 'POST';
                          const checklistId = this.getNodeParameter('checklistId', i);
                          endpoint = `checklists/${checklistId}/checkItems`;
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, { name, ...additionalFields });
                      }
                      else if (operation === 'deleteCheckItem') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const checkItemId = this.getNodeParameter('checkItemId', i);
                          endpoint = `cards/${cardId}/checkItem/${checkItemId}`;
                      }
                      else if (operation === 'updateCheckItem') {
                          requestMethod = 'PUT';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const checkItemId = this.getNodeParameter('checkItemId', i);
                          endpoint = `cards/${cardId}/checkItem/${checkItemId}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'completedCheckItems') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `cards/${cardId}/checkItemStates`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'label') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const idBoard = this.getNodeParameter('boardId', i, undefined, {
                              extractValue: true,
                          });
                          const name = this.getNodeParameter('name', i);
                          const color = this.getNodeParameter('color', i);
                          Object.assign(qs, {
                              idBoard,
                              name,
                              color,
                          });
                          endpoint = 'labels';
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `labels/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `labels/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const idBoard = this.getNodeParameter('boardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `board/${idBoard}/labels`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `labels/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else if (operation === 'addLabel') {
                          requestMethod = 'POST';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          qs.value = id;
                          endpoint = `/cards/${cardId}/idLabels`;
                      }
                      else if (operation === 'removeLabel') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `/cards/${cardId}/idLabels/${id}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  const skipPagination = ['list:getAll'];
                  if (returnAll && !skipPagination.includes(`${resource}:${operation}`)) {
                      responseData = await GenericFunctions_1.apiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
                  }
                  else {
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, body, qs);
                      if (!returnAll && qs.limit) {
                          responseData = responseData.splice(0, qs.limit);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Trello = Trello;
  //# sourceMappingURL=Trello.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Twake
name: Twake
package_name: n8n-nodes-base
display_name: Twake
description: Consume Twake API
code_hash: f118ef0fa20da4dc9fcaccdc87561206ca8708f58badba3b415d090b004c82bd
source_location: node_modules/n8n-nodes-base/dist/nodes/Twake/Twake.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Twake = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Twake {
      constructor() {
          this.description = {
              displayName: 'Twake',
              name: 'twake',
              group: ['transform'],
              version: 1,
              icon: 'file:twake.png',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Twake API',
              defaults: {
                  name: 'Twake',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'twakeCloudApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Message',
                              value: 'message',
                              description: 'Send data to the message app',
                          },
                      ],
                      default: 'message',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send a message',
                              action: 'Send a message',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Channel Name or ID',
                      name: 'channelId',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getChannels',
                      },
                      displayOptions: {
                          show: {
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'Channel\'s ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Content',
                      name: 'content',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'Message content',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Sender Icon',
                              name: 'senderIcon',
                              type: 'string',
                              default: '',
                              description: 'URL of the image/icon',
                          },
                          {
                              displayName: 'Sender Name',
                              name: 'senderName',
                              type: 'string',
                              default: '',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getChannels() {
                      const responseData = await GenericFunctions_1.twakeApiRequest.call(this, 'POST', '/channel', {});
                      if (responseData === undefined) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No data got returned');
                      }
                      const returnData = [];
                      for (const channel of responseData) {
                          returnData.push({
                              name: channel.name,
                              value: channel.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              if (resource === 'message') {
                  if (operation === 'send') {
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const message = {
                          channel_id: this.getNodeParameter('channelId', i),
                          content: {
                              formatted: this.getNodeParameter('content', i),
                          },
                          hidden_data: {
                              allow_delete: 'everyone',
                          },
                      };
                      if (additionalFields.senderName) {
                          message.hidden_data.custom_title = additionalFields.senderName;
                      }
                      if (additionalFields.senderIcon) {
                          message.hidden_data.custom_icon = additionalFields.senderIcon;
                      }
                      const body = {
                          object: message,
                      };
                      const endpoint = '/actions/message/save';
                      responseData = await GenericFunctions_1.twakeApiRequest.call(this, 'POST', endpoint, body);
                      responseData = responseData.object;
                  }
              }
          }
          if (Array.isArray(responseData)) {
              returnData.push.apply(returnData, responseData);
          }
          else if (responseData !== undefined) {
              returnData.push(responseData);
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Twake = Twake;
  //# sourceMappingURL=Twake.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Twilio
name: Twilio
package_name: n8n-nodes-base
display_name: Twilio
description: Send SMS and WhatsApp messages or make phone calls
code_hash: 6a6d8e5660a38615ba7a11199540fed80d7d36fac57b6ba4728a36927c913bd4
source_location: node_modules/n8n-nodes-base/dist/nodes/Twilio/Twilio.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Twilio = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Twilio {
      constructor() {
          this.description = {
              displayName: 'Twilio',
              name: 'twilio',
              icon: 'file:twilio.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Send SMS and WhatsApp messages or make phone calls',
              defaults: {
                  name: 'Twilio',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'twilioApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Call',
                              value: 'call',
                          },
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send SMS/MMS/WhatsApp message',
                              action: 'Send an SMS/MMS/WhatsApp message',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['call'],
                          },
                      },
                      options: [
                          {
                              name: 'Make',
                              value: 'make',
                              action: 'Make a call',
                          },
                      ],
                      default: 'make',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      default: '',
                      placeholder: '+14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send', 'make'],
                              resource: ['sms', 'call'],
                          },
                      },
                      description: 'The number from which to send the message',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      default: '',
                      placeholder: '+14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send', 'make'],
                              resource: ['sms', 'call'],
                          },
                      },
                      description: 'The number to which to send the message',
                  },
                  {
                      displayName: 'To Whatsapp',
                      name: 'toWhatsapp',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'Whether the message should be sent to WhatsApp',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The message to send',
                  },
                  {
                      displayName: 'Use TwiML',
                      name: 'twiml',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['make'],
                              resource: ['call'],
                          },
                      },
                      description: 'Whether to use the <a href="https://www.twilio.com/docs/voice/twiml">Twilio Markup Language</a> in the message',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['make'],
                              resource: ['call'],
                          },
                      },
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      options: [
                          {
                              displayName: 'Status Callback',
                              name: 'statusCallback',
                              type: 'string',
                              default: '',
                              description: 'Status Callbacks allow you to receive events related to the REST resources managed by Twilio: Rooms, Recordings and Compositions',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let operation;
          let resource;
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  resource = this.getNodeParameter('resource', i);
                  operation = this.getNodeParameter('operation', i);
                  if (resource === 'sms') {
                      if (operation === 'send') {
                          requestMethod = 'POST';
                          endpoint = '/Messages.json';
                          body.From = this.getNodeParameter('from', i);
                          body.To = this.getNodeParameter('to', i);
                          body.Body = this.getNodeParameter('message', i);
                          body.StatusCallback = this.getNodeParameter('options.statusCallback', i, '');
                          const toWhatsapp = this.getNodeParameter('toWhatsapp', i);
                          if (toWhatsapp) {
                              body.From = `whatsapp:${body.From}`;
                              body.To = `whatsapp:${body.To}`;
                          }
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'call') {
                      if (operation === 'make') {
                          requestMethod = 'POST';
                          endpoint = '/Calls.json';
                          const message = this.getNodeParameter('message', i);
                          const useTwiml = this.getNodeParameter('twiml', i);
                          body.From = this.getNodeParameter('from', i);
                          body.To = this.getNodeParameter('to', i);
                          if (useTwiml) {
                              body.Twiml = message;
                          }
                          else {
                              body.Twiml = `<Response><Say>${(0, GenericFunctions_1.escapeXml)(message)}</Say></Response>`;
                          }
                          body.StatusCallback = this.getNodeParameter('options.statusCallback', i, '');
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  const responseData = await GenericFunctions_1.twilioApiRequest.call(this, requestMethod, endpoint, body, qs);
                  returnData.push(responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Twilio = Twilio;
  //# sourceMappingURL=Twilio.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Twist
name: Twist
package_name: n8n-nodes-base
display_name: Twist
description: Consume Twist API
code_hash: e9b8d9315076ff304212703c7127f5754cf7480780be718af94afdd99f21a7b2
source_location: node_modules/n8n-nodes-base/dist/nodes/Twist/Twist.node.js
extracted_at: 2025-06-07 19:36:44
updated_at: 2025-06-07 19:36:44
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Twist = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ChannelDescription_1 = require("./ChannelDescription");
  const MessageConversationDescription_1 = require("./MessageConversationDescription");
  const ThreadDescription_1 = require("./ThreadDescription");
  const CommentDescription_1 = require("./CommentDescription");
  const uuid_1 = require("uuid");
  const moment_1 = __importDefault(require("moment"));
  class Twist {
      constructor() {
          this.description = {
              displayName: 'Twist',
              name: 'twist',
              icon: 'file:twist.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Twist API',
              defaults: {
                  name: 'Twist',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'twistOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Channel',
                              value: 'channel',
                          },
                          {
                              name: 'Comment',
                              value: 'comment',
                          },
                          {
                              name: 'Message Conversation',
                              value: 'messageConversation',
                          },
                          {
                              name: 'Thread',
                              value: 'thread',
                          },
                      ],
                      default: 'messageConversation',
                  },
                  ...ChannelDescription_1.channelOperations,
                  ...ChannelDescription_1.channelFields,
                  ...CommentDescription_1.commentOperations,
                  ...CommentDescription_1.commentFields,
                  ...MessageConversationDescription_1.messageConversationOperations,
                  ...MessageConversationDescription_1.messageConversationFields,
                  ...ThreadDescription_1.threadOperations,
                  ...ThreadDescription_1.threadFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getWorkspaces() {
                      const returnData = [];
                      const workspaces = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/workspaces/get');
                      for (const workspace of workspaces) {
                          returnData.push({
                              name: workspace.name,
                              value: workspace.id,
                          });
                      }
                      return returnData;
                  },
                  async getConversations() {
                      const returnData = [];
                      const qs = {
                          workspace_id: this.getCurrentNodeParameter('workspaceId'),
                      };
                      const conversations = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/conversations/get', {}, qs);
                      for (const conversation of conversations) {
                          returnData.push({
                              name: conversation.title || conversation.id,
                              value: conversation.id,
                          });
                      }
                      return returnData;
                  },
                  async getUsers() {
                      const returnData = [];
                      const qs = {
                          id: this.getCurrentNodeParameter('workspaceId'),
                      };
                      const users = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/workspaces/get_users', {}, qs);
                      for (const user of users) {
                          returnData.push({
                              name: user.name,
                              value: user.id,
                          });
                      }
                      return returnData;
                  },
                  async getGroups() {
                      const returnData = [];
                      const qs = {
                          workspace_id: this.getCurrentNodeParameter('workspaceId'),
                      };
                      const groups = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/groups/get', {}, qs);
                      for (const group of groups) {
                          returnData.push({
                              name: group.name,
                              value: group.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'channel') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              workspace_id: workspaceId,
                              name,
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/add', body);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/remove', {}, qs);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/channels/getone', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs.workspace_id = workspaceId;
                          Object.assign(qs, filters);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/channels/get', {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const channelId = this.getNodeParameter('channelId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: channelId,
                          };
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/update', body);
                      }
                      if (operation === 'archive') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/archive', {}, qs);
                      }
                      if (operation === 'unarchive') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/unarchive', {}, qs);
                      }
                  }
                  if (resource === 'comment') {
                      if (operation === 'create') {
                          const threadId = this.getNodeParameter('threadId', i);
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              thread_id: threadId,
                              content,
                          };
                          Object.assign(body, additionalFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/comments/add', body);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('commentId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/comments/remove', {}, qs);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('commentId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/comments/getone', {}, qs);
                          responseData = responseData === null || responseData === void 0 ? void 0 : responseData.comment;
                      }
                      if (operation === 'getAll') {
                          const threadId = this.getNodeParameter('threadId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs.thread_id = threadId;
                          Object.assign(qs, filters);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (qs.older_than_ts) {
                              qs.older_than_ts = (0, moment_1.default)(qs.older_than_ts).unix();
                          }
                          if (qs.newer_than_ts) {
                              qs.newer_than_ts = (0, moment_1.default)(qs.newer_than_ts).unix();
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/comments/get', {}, qs);
                          if (qs.as_ids) {
                              responseData = responseData.map((id) => ({ ID: id }));
                          }
                      }
                      if (operation === 'update') {
                          const commentId = this.getNodeParameter('commentId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: commentId,
                          };
                          Object.assign(body, updateFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/comments/update', body);
                      }
                  }
                  if (resource === 'messageConversation') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              conversation_id: conversationId,
                              workspace_id: workspaceId,
                              content,
                          };
                          Object.assign(body, additionalFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/conversation_messages/add', body);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/conversation_messages/getone', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.conversation_id = conversationId;
                          Object.assign(qs, additionalFields);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/conversation_messages/get', {}, qs);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/conversation_messages/remove', {}, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id,
                          };
                          Object.assign(body, updateFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/conversation_messages/update', body);
                      }
                  }
                  if (resource === 'thread') {
                      if (operation === 'create') {
                          const channelId = this.getNodeParameter('channelId', i);
                          const title = this.getNodeParameter('title', i);
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              channel_id: channelId,
                              content,
                              title,
                          };
                          Object.assign(body, additionalFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/threads/add', body);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('threadId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/threads/remove', {}, qs);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('threadId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/threads/getone', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const channelId = this.getNodeParameter('channelId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs.channel_id = channelId;
                          Object.assign(qs, filters);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (qs.older_than_ts) {
                              qs.older_than_ts = (0, moment_1.default)(qs.older_than_ts).unix();
                          }
                          if (qs.newer_than_ts) {
                              qs.newer_than_ts = (0, moment_1.default)(qs.newer_than_ts).unix();
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/threads/get', {}, qs);
                          if (qs.as_ids) {
                              responseData = responseData.map((id) => ({ ID: id }));
                          }
                      }
                      if (operation === 'update') {
                          const threadId = this.getNodeParameter('threadId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: threadId,
                          };
                          Object.assign(body, updateFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/threads/update', body);
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Twist = Twist;
  //# sourceMappingURL=Twist.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Twitter
name: Twitter
package_name: n8n-nodes-base
display_name: X (Formerly Twitter)
description: Consume the X API
code_hash: 5e1aad84374009c13bc16df5fbf185f045b053d91f9481ea49ec3337e43cd209
source_location: node_modules/n8n-nodes-base/dist/nodes/Twitter/Twitter.node.js
extracted_at: 2025-06-07 19:36:46
updated_at: 2025-06-07 19:36:46
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Twitter = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const TwitterV1_node_1 = require("./V1/TwitterV1.node");
  const TwitterV2_node_1 = require("./V2/TwitterV2.node");
  class Twitter extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'X (Formerly Twitter)',
              name: 'twitter',
              icon: 'file:x.svg',
              group: ['output'],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the X API',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new TwitterV1_node_1.TwitterV1(baseDescription),
              2: new TwitterV2_node_1.TwitterV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Twitter = Twitter;
  //# sourceMappingURL=Twitter.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.UProc
name: UProc
package_name: n8n-nodes-base
display_name: uProc
description: Consume uProc API
code_hash: 24d13cc08ff97149e68e34a4a7b583ed84cc776550f9a6cd39738925e56418d9
source_location: node_modules/n8n-nodes-base/dist/nodes/UProc/UProc.node.js
extracted_at: 2025-06-07 19:36:46
updated_at: 2025-06-07 19:36:46
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.UProc = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const GroupDescription_1 = require("./GroupDescription");
  const ToolDescription_1 = require("./ToolDescription");
  class UProc {
      constructor() {
          this.description = {
              displayName: 'uProc',
              name: 'uproc',
              icon: 'file:uproc.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["tool"]}}',
              description: 'Consume uProc API',
              defaults: {
                  name: 'uProc',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'uprocApi',
                      required: true,
                  },
              ],
              properties: [
                  ...GroupDescription_1.groupOptions,
                  ...ToolDescription_1.toolOperations,
                  ...ToolDescription_1.toolParameters,
                  {
                      displayName: 'Additional Options',
                      name: 'additionalOptions',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              group: [
                                  'audio',
                                  'communication',
                                  'company',
                                  'finance',
                                  'geographic',
                                  'image',
                                  'internet',
                                  'personal',
                                  'product',
                                  'security',
                                  'text',
                              ],
                          },
                      },
                      options: [
                          {
                              displayName: 'Data Webhook',
                              name: 'dataWebhook',
                              type: 'string',
                              description: 'URL to send tool response when tool has resolved your request',
                              default: '',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const group = this.getNodeParameter('group', 0);
          const tool = this.getNodeParameter('tool', 0);
          const additionalOptions = this.getNodeParameter('additionalOptions', 0);
          const dataWebhook = additionalOptions.dataWebhook;
          const fields = ToolDescription_1.toolParameters
              .filter((field) => {
              var _a, _b;
              return (((_b = (_a = field === null || field === void 0 ? void 0 : field.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.group) &&
                  field.displayOptions.show.tool &&
                  field.displayOptions.show.group.indexOf(group) !== -1 &&
                  field.displayOptions.show.tool.indexOf(tool) !== -1);
          })
              .map((field) => {
              return field.name;
          });
          for (let i = 0; i < length; i++) {
              try {
                  const toolKey = tool.replace(/([A-Z]+)/g, '-$1').toLowerCase();
                  const body = {
                      processor: toolKey,
                      params: {},
                  };
                  fields.forEach((field) => {
                      if (field === null || field === void 0 ? void 0 : field.length) {
                          const data = this.getNodeParameter(field, i);
                          body.params[field] = data + '';
                      }
                  });
                  if (dataWebhook === null || dataWebhook === void 0 ? void 0 : dataWebhook.length) {
                      body.callback = {};
                  }
                  if (dataWebhook === null || dataWebhook === void 0 ? void 0 : dataWebhook.length) {
                      body.callback.data = dataWebhook;
                  }
                  responseData = await GenericFunctions_1.uprocApiRequest.call(this, 'POST', body);
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.UProc = UProc;
  //# sourceMappingURL=UProc.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.UnleashedSoftware
name: UnleashedSoftware
package_name: n8n-nodes-base
display_name: Unleashed Software
description: Consume Unleashed Software API
code_hash: 8773e68fb6b500f5f3588c5fd46d57e0a82cf6f5be5dc93c8d17f9c065a38708
source_location: node_modules/n8n-nodes-base/dist/nodes/UnleashedSoftware/UnleashedSoftware.node.js
extracted_at: 2025-06-07 19:36:46
updated_at: 2025-06-07 19:36:46
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.UnleashedSoftware = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const SalesOrderDescription_1 = require("./SalesOrderDescription");
  const StockOnHandDescription_1 = require("./StockOnHandDescription");
  const moment_1 = __importDefault(require("moment"));
  class UnleashedSoftware {
      constructor() {
          this.description = {
              displayName: 'Unleashed Software',
              name: 'unleashedSoftware',
              group: ['transform'],
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              icon: 'file:unleashedSoftware.png',
              version: 1,
              description: 'Consume Unleashed Software API',
              defaults: {
                  name: 'Unleashed Software',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'unleashedSoftwareApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Sales Order',
                              value: 'salesOrder',
                          },
                          {
                              name: 'Stock On Hand',
                              value: 'stockOnHand',
                          },
                      ],
                      default: 'salesOrder',
                  },
                  ...SalesOrderDescription_1.salesOrderOperations,
                  ...SalesOrderDescription_1.salesOrderFields,
                  ...StockOnHandDescription_1.stockOnHandOperations,
                  ...StockOnHandDescription_1.stockOnHandFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData = [];
          for (let i = 0; i < length; i++) {
              const resource = this.getNodeParameter('resource', 0);
              const operation = this.getNodeParameter('operation', 0);
              if (resource === 'salesOrder') {
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      if (filters.startDate) {
                          filters.startDate = (0, moment_1.default)(filters.startDate).format('YYYY-MM-DD');
                      }
                      if (filters.endDate) {
                          filters.endDate = (0, moment_1.default)(filters.endDate).format('YYYY-MM-DD');
                      }
                      if (filters.modifiedSince) {
                          filters.modifiedSince = (0, moment_1.default)(filters.modifiedSince).format('YYYY-MM-DD');
                      }
                      if (filters.orderStatus) {
                          filters.orderStatus = filters.orderStatus.join(',');
                      }
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.unleashedApiRequestAllItems.call(this, 'Items', 'GET', '/SalesOrders', {}, qs);
                      }
                      else {
                          const limit = this.getNodeParameter('limit', i);
                          qs.pageSize = limit;
                          responseData = (await GenericFunctions_1.unleashedApiRequest.call(this, 'GET', '/SalesOrders', {}, qs, 1));
                          responseData = responseData.Items;
                      }
                      (0, GenericFunctions_1.convertNETDates)(responseData);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
              }
              if (resource === 'stockOnHand') {
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      if (filters.asAtDate) {
                          filters.asAtDate = (0, moment_1.default)(filters.asAtDate).format('YYYY-MM-DD');
                      }
                      if (filters.modifiedSince) {
                          filters.modifiedSince = (0, moment_1.default)(filters.modifiedSince).format('YYYY-MM-DD');
                      }
                      if (filters.orderBy) {
                          filters.orderBy = filters.orderBy.trim();
                      }
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.unleashedApiRequestAllItems.call(this, 'Items', 'GET', '/StockOnHand', {}, qs);
                      }
                      else {
                          const limit = this.getNodeParameter('limit', i);
                          qs.pageSize = limit;
                          responseData = (await GenericFunctions_1.unleashedApiRequest.call(this, 'GET', '/StockOnHand', {}, qs, 1));
                          responseData = responseData.Items;
                      }
                      (0, GenericFunctions_1.convertNETDates)(responseData);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'get') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.unleashedApiRequest.call(this, 'GET', `/StockOnHand/${productId}`);
                      (0, GenericFunctions_1.convertNETDates)(responseData);
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.UnleashedSoftware = UnleashedSoftware;
  //# sourceMappingURL=UnleashedSoftware.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.Uplead
name: Uplead
package_name: n8n-nodes-base
display_name: Uplead
description: Consume Uplead API
code_hash: 3ce27be43c0af9f6c0de56319d909fb40b551379d3fe62ccaa67dc9472090fa3
source_location: node_modules/n8n-nodes-base/dist/nodes/Uplead/Uplead.node.js
extracted_at: 2025-06-07 19:36:46
updated_at: 2025-06-07 19:36:46
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Uplead = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const CompanyDesciption_1 = require("./CompanyDesciption");
  const PersonDescription_1 = require("./PersonDescription");
  class Uplead {
      constructor() {
          this.description = {
              displayName: 'Uplead',
              name: 'uplead',
              icon: 'file:uplead.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Consume Uplead API',
              defaults: {
                  name: 'Uplead',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'upleadApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Company',
                              value: 'company',
                              description: 'Company API lets you lookup company data via a domain name or company name',
                          },
                          {
                              name: 'Person',
                              value: 'person',
                              description: 'Person API lets you lookup a person based on an email address OR based on a domain name + first name + last name',
                          },
                      ],
                      default: 'company',
                  },
                  ...CompanyDesciption_1.companyOperations,
                  ...CompanyDesciption_1.companyFields,
                  ...PersonDescription_1.personOperations,
                  ...PersonDescription_1.personFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'person') {
                      if (operation === 'enrich') {
                          const email = this.getNodeParameter('email', i);
                          const firstname = this.getNodeParameter('firstname', i);
                          const lastname = this.getNodeParameter('lastname', i);
                          const domain = this.getNodeParameter('domain', i);
                          if (email) {
                              qs.email = email;
                          }
                          if (firstname) {
                              qs.first_name = firstname;
                          }
                          if (lastname) {
                              qs.last_name = lastname;
                          }
                          if (domain) {
                              qs.domain = domain;
                          }
                          responseData = await GenericFunctions_1.upleadApiRequest.call(this, 'GET', '/person-search', {}, qs);
                      }
                  }
                  if (resource === 'company') {
                      if (operation === 'enrich') {
                          const domain = this.getNodeParameter('domain', i);
                          const company = this.getNodeParameter('company', i);
                          if (domain) {
                              qs.domain = domain;
                          }
                          if (company) {
                              qs.company = company;
                          }
                          responseData = await GenericFunctions_1.upleadApiRequest.call(this, 'GET', '/company-search', {}, qs);
                      }
                  }
                  if (Array.isArray(responseData.data)) {
                      returnData.push.apply(returnData, responseData.data);
                  }
                  else {
                      if (responseData.data !== null) {
                          returnData.push(responseData.data);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Uplead = Uplead;
  //# sourceMappingURL=Uplead.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


node_type: n8n-nodes-base.UptimeRobot
name: UptimeRobot
package_name: n8n-nodes-base
display_name: UptimeRobot
description: Consume UptimeRobot API
code_hash: b74303511b0fa831d7dd7988ab722bfae325dcf112b7c4820d7772ee00c7f7f8
source_location: node_modules/n8n-nodes-base/dist/nodes/UptimeRobot/UptimeRobot.node.js
extracted_at: 2025-06-07 19:36:46
updated_at: 2025-06-07 19:36:46
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.UptimeRobot = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const MonitorDescription_1 = require("./MonitorDescription");
  const AlertContactDescription_1 = require("./AlertContactDescription");
  const MaintenanceWindowDescription_1 = require("./MaintenanceWindowDescription");
  const PublicStatusPageDescription_1 = require("./PublicStatusPageDescription");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class UptimeRobot {
      constructor() {
          this.description = {
              displayName: 'UptimeRobot',
              name: 'uptimeRobot',
              icon: 'file:uptimerobot.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume UptimeRobot API',
              defaults: {
                  name: 'UptimeRobot',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'uptimeRobotApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Account',
                              value: 'account',
                          },
                          {
                              name: 'Alert Contact',
                              value: 'alertContact',
                          },
                          {
                              name: 'Maintenance Window',
                              value: 'maintenanceWindow',
                          },
                          {
                              name: 'Monitor',
                              value: 'monitor',
                          },
                          {
                              name: 'Public Status Page',
                              value: 'publicStatusPage',
                          },
                      ],
                      default: 'account',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['account'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get account details',
                              action: 'Get an account',
                          },
                      ],
                      default: 'get',
                  },
                  ...MonitorDescription_1.monitorOperations,
                  ...MonitorDescription_1.monitorFields,
                  ...AlertContactDescription_1.alertContactOperations,
                  ...AlertContactDescription_1.alertContactFields,
                  ...MaintenanceWindowDescription_1.maintenanceWindowOperations,
                  ...MaintenanceWindowDescription_1.maintenanceWindowFields,
                  ...PublicStatusPageDescription_1.publicStatusPageOperations,
                  ...PublicStatusPageDescription_1.publicStatusPageFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const timezone = this.getTimezone();
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  let body = {};
                  if (resource === 'account') {
                      if (operation === 'get') {
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getAccountDetails');
                          responseData = responseData.account;
                      }
                  }
                  if (resource === 'monitor') {
                      if (operation === 'create') {
                          body = {
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              url: this.getNodeParameter('url', i),
                              type: this.getNodeParameter('type', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newMonitor', body);
                          responseData = responseData.monitor;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deleteMonitor', body);
                          responseData = responseData.monitor;
                      }
                      if (operation === 'get') {
                          const monitors = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMonitors', {
                              monitors,
                          });
                          responseData = responseData.monitors;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          body = {
                              ...filters,
                          };
                          if (body.statuses) {
                              body.statuses = body.statuses.join('-');
                          }
                          if (body.types) {
                              body.types = body.types.join('-');
                          }
                          if (body.alert_contacts) {
                              body.alert_contacts = 1;
                          }
                          if (body.logs) {
                              body.logs = 1;
                          }
                          if (body.mwindow) {
                              body.mwindows = 1;
                          }
                          if (body.response_times) {
                              body.response_times = 1;
                          }
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMonitors', body);
                          responseData = responseData.monitors;
                      }
                      if (operation === 'reset') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/resetMonitor', body);
                          responseData = responseData.monitor;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editMonitor', body);
                          responseData = responseData.monitor;
                      }
                  }
                  if (resource === 'alertContact') {
                      if (operation === 'create') {
                          body = {
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              value: this.getNodeParameter('value', i),
                              type: this.getNodeParameter('type', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newAlertContact', body);
                          responseData = responseData.alertcontact;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deleteAlertContact', body);
                          responseData = responseData.alert_contact;
                      }
                      if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getAlertContacts', {
                              alert_contacts: id,
                          });
                          responseData = responseData.alert_contacts;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          body = {
                              ...this.getNodeParameter('filters', i),
                          };
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getAlertContacts', body);
                          responseData = responseData.alert_contacts;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editAlertContact', body);
                          responseData = responseData.alert_contact;
                      }
                  }
                  if (resource === 'maintenanceWindow') {
                      if (operation === 'create') {
                          const startTime = this.getNodeParameter('start_time', i);
                          const type = this.getNodeParameter('type', i);
                          const parsedStartTime = type === 1
                              ? moment_timezone_1.default.tz(startTime, timezone).unix()
                              : moment_timezone_1.default.tz(startTime, timezone).format('HH:mm');
                          body = {
                              duration: this.getNodeParameter('duration', i),
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              start_time: parsedStartTime,
                              type,
                          };
                          if (type === 3) {
                              body.value = this.getNodeParameter('weekDay', i);
                          }
                          if (type === 4) {
                              body.value = this.getNodeParameter('monthDay', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newMWindow', body);
                          responseData = responseData.mwindow;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deleteMWindow', body);
                          responseData = { status: responseData.message };
                      }
                      if (operation === 'get') {
                          const mwindows = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMWindows', {
                              mwindows,
                          });
                          responseData = responseData.mwindows;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          body = {
                              ...this.getNodeParameter('filters', i),
                          };
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMWindows', body);
                          responseData = responseData.mwindows;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              duration: this.getNodeParameter('duration', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          if (body.type === 1 && body.start_time) {
                              body.start_time = moment_timezone_1.default.tz(body.start_time, timezone).unix();
                          }
                          else {
                              body.start_time = moment_timezone_1.default.tz(body.start_time, timezone).format('HH:mm');
                          }
                          if (body.type === 3) {
                              body.value = body.weekDay;
                              delete body.weekDay;
                          }
                          if (body.type === 4) {
                              body.value = body.monthDay;
                              delete body.monthDay;
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editMWindow', body);
                          responseData = responseData.mwindow;
                      }
                  }
                  if (resource === 'publicStatusPage') {
                      if (operation === 'create') {
                          body = {
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              monitors: this.getNodeParameter('monitors', i),
                              ...this.getNodeParameter('additionalFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newPSP', body);
                          responseData = responseData.psp;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deletePSP', body);
                          responseData = responseData.psp;
                      }
                      if (operation === 'get') {
                          const psps = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getPSPs', { psps });
                          responseData = responseData.psps;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          body = {
                              ...this.getNodeParameter('filters', i),
                          };
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getPSPs', body);
                          responseData = responseData.psps;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editPSP', body);
                          responseData = responseData.psp;
                      }
                  }
                  Array.isArray(responseData)
                      ? returnData.push(...responseData)
                      : returnData.push(responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.UptimeRobot = UptimeRobot;
  //# sourceMappingURL=UptimeRobot.node.js.map

package_info:
[cell repeats an earlier one in this file: 36903 characters]


