docs: remove impertinent Jsdocs comments (no-changelog) (#4181)

* 🔥 Remove impertinent Jsdocs comments

* Lint fixes
This commit is contained in:
agobrech
2022-09-29 14:37:56 +02:00
committed by GitHub
parent 64fffa0579
commit 8bd99e0600
77 changed files with 6 additions and 888 deletions

View File

@@ -19,11 +19,6 @@ export interface IProduct {
/**
* Make an API request to ActiveCampaign
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function activeCampaignApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -77,13 +72,7 @@ export async function activeCampaignApiRequest(
* Make an API request to paginated ActiveCampaign endpoint
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function activeCampaignApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View File

@@ -25,11 +25,6 @@ export interface IRecord {
/**
* Make an API request to Airtable
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@@ -79,13 +74,7 @@ export async function apiRequest(
* Make an API request to paginated Airtable endpoint
* and return all results
*
* @export
* @param {(IExecuteFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function apiRequestAllItems(
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,

View File

@@ -12,11 +12,6 @@ import { get } from 'lodash';
/**
* Make an API request to Asana
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function asanaApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View File

@@ -74,9 +74,6 @@ export async function copperApiRequest(
/**
* Creates a secret from the credentials
*
* @export
* @param {ICredentialDataDecryptedObject} credentials
* @returns
*/
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
const data = `${credentials.email},${credentials.apiKey}`;

View File

@@ -7,11 +7,6 @@ import { IDataObject, NodeApiError } from 'n8n-workflow';
/**
* Make an API request to Dropbox
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function dropboxApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -18,8 +18,6 @@ export interface IExecReturnData {
/**
* Promisifiy exec manually to also get the exit code
*
* @param {string} command
* @returns {Promise<IExecReturnData>}
*/
function execPromise(command: string): Promise<IExecReturnData> {
const returnData: IExecReturnData = {

View File

@@ -27,9 +27,6 @@ interface ScriptObject {
/**
* Make an API request to ActiveCampaign
*
* @param {IHookFunctions} this
* @param {string} method
* @returns {Promise<any>}
*/
export async function layoutsApiRequest(
this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions,
@@ -79,7 +76,6 @@ function parseLayouts(layouts: LayoutObject[]): INodePropertyOptions[] {
/**
* Make an API request to ActiveCampaign
*
* @returns {Promise<any>}
*/
export async function getFields(
this: ILoadOptionsFunctions,
@@ -114,7 +110,6 @@ export async function getFields(
/**
* Make an API request to ActiveCampaign
*
* @returns {Promise<any>}
*/
export async function getPortals(
this: ILoadOptionsFunctions,
@@ -149,7 +144,6 @@ export async function getPortals(
/**
* Make an API request to ActiveCampaign
*
* @returns {Promise<any>}
*/
export async function getScripts(
this: ILoadOptionsFunctions,

View File

@@ -11,7 +11,6 @@ interface IFormIoCredentials {
/**
* Method has the logic to get jwt token from Form.io
* @param this
*/
async function getToken(
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
@@ -46,8 +45,6 @@ async function getToken(
/**
* Method will call register or list webhooks based on the passed method in the parameter
* @param this
* @param method
*/
export async function formIoApiRequest(
this: IHookFunctions | ILoadOptionsFunctions | IWebhookFunctions,

View File

@@ -46,11 +46,6 @@ export enum FormstackFieldFormat {
/**
* Make an API request to Formstack
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
@@ -93,13 +88,7 @@ export async function apiRequest(
* Make an API request to paginated Formstack endpoint
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
@@ -139,9 +128,6 @@ export async function apiRequestAllItems(
/**
* Returns all the available forms
*
* @export
* @param {ILoadOptionsFunctions} this
* @returns {Promise<INodePropertyOptions[]>}
*/
export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = 'form.json';
@@ -165,10 +151,6 @@ export async function getForms(this: ILoadOptionsFunctions): Promise<INodeProper
/**
* Returns all the fields of a form
*
* @export
* @param {ILoadOptionsFunctions} this
* @param {string} formID
* @returns {Promise<IFormstackFieldDefinitionType[]>}
*/
export async function getFields(
this: IWebhookFunctions,
@@ -194,10 +176,6 @@ export async function getFields(
/**
* Returns all the fields of a form
*
* @export
* @param {ILoadOptionsFunctions} this
* @param {string} uniqueId
* @returns {Promise<IFormstackFieldDefinitionType[]>}
*/
export async function getSubmission(
this: ILoadOptionsFunctions | IWebhookFunctions,

View File

@@ -7,11 +7,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
/**
* Make an API request to Github
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function githubApiRequest(
this: IHookFunctions | IExecuteFunctions,
@@ -68,13 +63,7 @@ export async function githubApiRequest(
/**
* Returns the SHA of the given file
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} owner
* @param {string} repository
* @param {string} filePath
* @param {string} [branch]
* @returns {Promise<any>}
*/
export async function getFileSha(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -6,11 +6,6 @@ import { OptionsWithUri } from 'request';
/**
* Make an API request to Gitlab
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function gitlabApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -64,9 +64,6 @@ export class GoogleSheet {
/**
* Encodes the range that also none latin character work
*
* @param {string} range
* @returns {string}
* @memberof GoogleSheet
*/
encodeRange(range: string): string {
if (range.includes('!')) {
@@ -79,9 +76,6 @@ export class GoogleSheet {
/**
* Clears values from a sheet
*
* @param {string} range
* @returns {Promise<object>}
* @memberof GoogleSheet
*/
async clearData(range: string): Promise<object> {
const body = {
@@ -306,8 +300,6 @@ export class GoogleSheet {
* @param {string} range The range to look for data
* @param {number} keyRowIndex Index of the row which contains the keys
* @param {number} dataStartRowIndex Index of the first row which contains data
* @returns {Promise<string[][]>}
* @memberof GoogleSheet
*/
async updateSheetData(
inputData: IDataObject[],
@@ -478,8 +470,6 @@ export class GoogleSheet {
* @param {number} dataStartRowIndex Index of the first row which contains data
* @param {ILookupValues[]} lookupValues The lookup values which decide what data to return
* @param {boolean} [returnAllMatches] Returns all the found matches instead of only the first one
* @returns {Promise<IDataObject[]>}
* @memberof GoogleSheet
*/
async lookupValues(
inputData: string[][],

View File

@@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/**
* Make an API request to HackerNews
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} qs
* @returns {Promise<any>}
*/
export async function hackerNewsApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -38,12 +33,7 @@ export async function hackerNewsApiRequest(
* Make an API request to HackerNews
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} qs
* @returns {Promise<any>}
*/
export async function hackerNewsApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View File

@@ -7,11 +7,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
/**
* Make an API request to Message Bird
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function messageBirdApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -7,7 +7,6 @@ import { ITables } from './TableInterface';
*
* @param {INodeExecutionData} item The item to copy
* @param {string[]} properties The properties it should include
* @returns
*/
export function copyInputItem(item: INodeExecutionData, properties: string[]): IDataObject {
// Prepare the data to insert and copy it to be returned
@@ -27,7 +26,6 @@ export function copyInputItem(item: INodeExecutionData, properties: string[]): I
*
* @param {INodeExecutionData[]} items The items to extract the tables/columns for
* @param {function} getNodeParam getter for the Node's Parameters
* @returns {ITables} {tableName: {colNames: [items]}};
*/
export function createTableStruct(
getNodeParam: Function,
@@ -60,7 +58,6 @@ export function createTableStruct(
*
* @param {ITables} tables The ITables to be processed.
* @param {function} buildQueryQueue function that builds the queue of promises
* @returns {Promise}
*/
// tslint:disable-next-line: no-any
export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): Promise<any[]> {
@@ -84,7 +81,6 @@ export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): P
* Extracts the values from the item for INSERT
*
* @param {IDataObject} item The item to extract
* @returns {string} (Val1, Val2, ...)
*/
export function extractValues(item: IDataObject): string {
return `(${Object.values(item as any) // tslint:disable-line:no-any
@@ -108,7 +104,6 @@ export function extractValues(item: IDataObject): string {
*
* @param {IDataObject} item The item to extract from
* @param {string[]} columns The columns to update
* @returns {string} col1 = val1, col2 = val2
*/
export function extractUpdateSet(item: IDataObject, columns: string[]): string {
return columns
@@ -124,7 +119,6 @@ export function extractUpdateSet(item: IDataObject, columns: string[]): string {
*
* @param {IDataObject} item The item to extract from
* @param {string} key The column name to build the condition with
* @returns {string} id = '123'
*/
export function extractUpdateCondition(item: IDataObject, key: string): string {
return `${key} = ${typeof item[key] === 'string' ? `'${item[key]}'` : item[key]}`;
@@ -135,7 +129,6 @@ export function extractUpdateCondition(item: IDataObject, key: string): string {
*
* @param {IDataObject[]} items The items to extract the values from
* @param {string} key The column name to extract the value from for the delete condition
* @returns {string} (Val1, Val2, ...)
*/
export function extractDeleteValues(items: IDataObject[], key: string): string {
return `(${items

View File

@@ -5,11 +5,6 @@ import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-w
/**
* Make an API request to Twilio
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function moceanApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -32,7 +32,6 @@ export function buildParameterizedConnString(credentials: IMongoParametricCreden
* Build mongoDb connection string and resolve database name.
* If a connection string override value is provided, that will be used in place of individual args
*
* @param {IExecuteFunctions} self
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
*/
export function buildMongoConnectionParams(
@@ -66,7 +65,6 @@ export function buildMongoConnectionParams(
/**
* Verify credentials. If ok, build mongoDb connection string and resolve database name.
*
* @param {IExecuteFunctions} self
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
*/
export function validateAndResolveMongoCredentials(

View File

@@ -5,11 +5,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
/**
* Make an API request to MSG91
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function msg91ApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -6,7 +6,6 @@ import { IDataObject, INodeExecutionData } from 'n8n-workflow';
*
* @param {INodeExecutionData[]} items The items to copy
* @param {string[]} properties The properties it should include
* @returns
*/
export function copyInputItems(items: INodeExecutionData[], properties: string[]): IDataObject[] {
// Prepare the data to insert and copy it to be returned

View File

@@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/**
* Make an API request to NextCloud
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function nextCloudApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -21,11 +21,6 @@ interface IAttachment {
/**
* Make an API request to NocoDB
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@@ -76,13 +71,7 @@ export async function apiRequest(
* Make an API request to paginated NocoDB endpoint
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | IPollFunctions,

View File

@@ -86,7 +86,6 @@ export class Onfleet {
* @param addressCity Destination city
* @param addressCountry Destination country
* @param additionalFields Destination additional fields
* @returns
*/
/**
@@ -94,7 +93,6 @@ export class Onfleet {
* @param item Current execution data
* @param operation Current destination operation
* @param shared Whether the collection is in other resource or not
* @returns {OnfleetDestination} Destination information
*/
static getDestinationFields(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -181,7 +179,6 @@ export class Onfleet {
* Gets the properties of an administrator according to the operation chose
* @param item Current execution data
* @param operation Current administrator operation
* @returns {OnfleetAdmins} Administrator information
*/
static getAdminFields(
this: IExecuteFunctions,
@@ -221,7 +218,6 @@ export class Onfleet {
* Gets the properties of a hub according to the operation chose
* @param item Current execution data
* @param operation Current hub operation
* @returns {OnfleetHubs|null} Hub information
*/
static getHubFields(
this: IExecuteFunctions,
@@ -273,7 +269,6 @@ export class Onfleet {
* Gets the properties of a worker according to the operation chose
* @param item Current execution data
* @param operation Current worker operation
* @returns {OnfleetWorker|OnfleetWorkerFilter|OnfleetWorkerSchedule|null} Worker information
*/
static getWorkerFields(
this: IExecuteFunctions,
@@ -379,7 +374,6 @@ export class Onfleet {
* Gets the properties of a webhooks according to the operation chose
* @param item Current execution data
* @param operation Current webhooks operation
* @returns {OnfleetWebhook} Webhooks information
*/
static getWebhookFields(
this: IExecuteFunctions,
@@ -409,7 +403,6 @@ export class Onfleet {
* @param name Recipient name
* @param phone Recipient phone
* @param additionalFields Recipient additional fields
* @returns
*/
static formatRecipient(
name: string,
@@ -439,7 +432,6 @@ export class Onfleet {
* @param item Current execution data
* @param operation Current recipient operation
* @param shared Whether the collection is in other resource or not
* @returns {OnfleetRecipient} Recipient information
*/
static getRecipientFields(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -509,7 +501,6 @@ export class Onfleet {
* Gets the properties of a task according to the operation chose
* @param item Current execution data
* @param operation Current task operation
* @returns {OnfleetListTaskFilters | OnfleetTask } Task information
*/
static getTaskFields(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -647,7 +638,6 @@ export class Onfleet {
* Gets the properties of a team according to the operation chose
* @param item Current execution data
* @param operation Current team operation
* @returns {OnfleetTeams} Team information
*/
static getTeamFields(
this: IExecuteFunctions,
@@ -792,7 +782,6 @@ export class Onfleet {
* @param resource Resource to be executed (Task)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Task information
*/
static async executeTaskOperations(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -913,7 +902,6 @@ export class Onfleet {
* @param resource Resource to be executed (Destination)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Destination information
*/
static async executeDestinationOperations(
this: IExecuteFunctions,
@@ -959,7 +947,6 @@ export class Onfleet {
* @param resource Resource to be executed (Organization)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Organization information
*/
static async executeOrganizationOperations(
this: IExecuteFunctions,
@@ -1002,7 +989,6 @@ export class Onfleet {
* @param resource Resource to be executed (Recipient)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Recipient information
*/
static async executeRecipientOperations(
this: IExecuteFunctions,
@@ -1060,7 +1046,6 @@ export class Onfleet {
* @param resource Resource to be executed (Administrator)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Administrator information
*/
static async executeAdministratorOperations(
this: IExecuteFunctions,
@@ -1123,7 +1108,6 @@ export class Onfleet {
* @param resource Resource to be executed (Hub)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Hub information
*/
static async executeHubOperations(
this: IExecuteFunctions,
@@ -1180,7 +1164,6 @@ export class Onfleet {
* @param resource Resource to be executed (Worker)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Workers information
*/
static async executeWorkerOperations(
this: IExecuteFunctions,
@@ -1299,7 +1282,6 @@ export class Onfleet {
* @param resource Resource to be executed (Webhook)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Webhook information
*/
static async executeWebhookOperations(
this: IExecuteFunctions,
@@ -1348,7 +1330,6 @@ export class Onfleet {
* @param resource Resource to be executed (Container)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Container information
*/
static async executeContainerOperations(
this: IExecuteFunctions,
@@ -1407,7 +1388,6 @@ export class Onfleet {
* @param resource Resource to be executed (Team)
* @param operation Operation to be executed
* @param items Number of items to process by the node
* @returns Team information
*/
static async executeTeamOperations(
this: IExecuteFunctions,

View File

@@ -133,7 +133,6 @@ export class OnfleetTrigger implements INodeType {
/**
* Triggered function when an Onfleet webhook is executed
* @returns {Promise<IWebhookResponseData>} Response data
*/
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
const req = this.getRequestObject();

View File

@@ -21,11 +21,6 @@ export interface ICustomProperties {
/**
* Make an API request to Pipedrive
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function pipedriveApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -98,13 +93,7 @@ export async function pipedriveApiRequest(
* Make an API request to paginated Pipedrive endpoint
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function pipedriveApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions,
@@ -148,10 +137,7 @@ export async function pipedriveApiRequestAllItems(
/**
* Gets the custom properties from Pipedrive
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} resource
* @returns {Promise<ICustomProperties>}
*/
export async function pipedriveGetCustomProperties(
this: IHookFunctions | IExecuteFunctions,
@@ -197,9 +183,6 @@ export async function pipedriveGetCustomProperties(
* Converts names and values of custom properties from their actual values to the
* Pipedrive internal ones
*
* @export
* @param {ICustomProperties} customProperties
* @param {IDataObject} item
*/
export function pipedriveEncodeCustomProperties(
customProperties: ICustomProperties,
@@ -243,9 +226,6 @@ export function pipedriveEncodeCustomProperties(
/**
* Converts names and values of custom properties to their actual values
*
* @export
* @param {ICustomProperties} customProperties
* @param {IDataObject} item
*/
export function pipedriveResolveCustomProperties(
customProperties: ICustomProperties,

View File

@@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/**
* Make an API request to Plivo.
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function plivoApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -14,10 +14,6 @@ const BIN_ID_REGEX = /\b\d{13}-\d{13}\b/g;
* This function makes sure binId is in the expected format by parsing it
* from current node parameter value.
*
* @export
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/
export async function buildBinAPIURL(
this: IExecuteSingleFunctions,
@@ -35,10 +31,6 @@ export async function buildBinAPIURL(
* This function makes sure binId is in the expected format by parsing it
* from current node parameter value.
*
* @export
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/
export async function buildBinTestURL(
this: IExecuteSingleFunctions,
@@ -56,10 +48,6 @@ export async function buildBinTestURL(
* This function makes sure binId is in the expected format by parsing it
* from current node parameter value.
*
* @export
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/
export async function buildRequestURL(
this: IExecuteSingleFunctions,
@@ -78,9 +66,6 @@ export async function buildRequestURL(
* PostBin URL or from the string in the following format:
* `Bin '<binId>'.`
*
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/
function parseBinId(context: IExecuteSingleFunctions) {
const binId = context.getNodeParameter('binId') as string;
@@ -108,10 +93,6 @@ function parseBinId(context: IExecuteSingleFunctions) {
/**
* Converts the bin response data and adds additional properties
*
* @param {IExecuteSingleFunctions} this
* @param {INodeExecutionData} items[]
* @param {IN8nHttpFullResponse} response
* @returns {Promise<INodeExecutionData[]>}
*/
export async function transformBinReponse(
this: IExecuteSingleFunctions,

View File

@@ -9,7 +9,6 @@ import pg from 'pg-promise/typescript/pg-subset';
*
* @param {INodeExecutionData[]} items The items to copy
* @param {string[]} properties The properties it should include
* @returns
*/
export function getItemsCopy(
items: INodeExecutionData[],
@@ -38,7 +37,6 @@ export function getItemsCopy(
*
* @param {INodeExecutionData} item The item to copy
* @param {string[]} properties The properties it should include
* @returns
*/
export function getItemCopy(
item: INodeExecutionData,
@@ -62,7 +60,6 @@ export function getItemCopy(
* Returns a returning clause from a comma separated string
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param string returning The comma separated string
* @returns string
*/
export function generateReturning(pgp: pgPromise.IMain<{}, pg.IClient>, returning: string): string {
return (
@@ -81,7 +78,6 @@ export function generateReturning(pgp: pgPromise.IMain<{}, pg.IClient>, returnin
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {input[]} input The Node's input data
* @returns Promise<Array<IDataObject>>
*/
export async function pgQuery(
getNodeParam: Function,
@@ -251,7 +247,6 @@ export async function pgQueryV2(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be inserted
* @returns Promise<Array<IDataObject>>
*/
export async function pgInsert(
getNodeParam: Function,
@@ -340,7 +335,6 @@ export async function pgInsert(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be inserted
* @returns Promise<Array<IDataObject>>
*/
export async function pgInsertV2(
this: IExecuteFunctions,
@@ -375,7 +369,8 @@ export async function pgInsertV2(
const query =
pgp.helpers.insert(getItemsCopy(items, columnNames, guardedColumns), cs) + returning;
const queryResult = await db.any(query);
return queryResult.map((result, i) => {
return queryResult
.map((result, i) => {
return this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(result), {
itemData: { item: i },
});
@@ -446,7 +441,6 @@ export async function pgInsertV2(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be updated
* @returns Promise<Array<IDataObject>>
*/
export async function pgUpdate(
getNodeParam: Function,
@@ -569,7 +563,6 @@ export async function pgUpdate(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be updated
* @returns Promise<Array<IDataObject>>
*/
export async function pgUpdateV2(
this: IExecuteFunctions,

View File

@@ -97,9 +97,6 @@ export async function salesforceApiRequestAllItems(
/**
* Sorts the given options alphabetically
*
* @export
* @param {INodePropertyOptions[]} options
* @returns {INodePropertyOptions[]}
*/
export function sortOptions(options: INodePropertyOptions[]): void {
options.sort((a, b) => {

View File

@@ -89,9 +89,6 @@ export function validateJSON(json: string | undefined): any {
/**
* Converts data from the Salesmate format into a simple object
*
* @export
* @param {IDataObject[]} data
* @returns {IDataObject}
*/
export function simplifySalesmateData(data: IDataObject[]): IDataObject {
const returnData: IDataObject = {};

View File

@@ -8,13 +8,6 @@ import { OptionsWithUri } from 'request';
* Make an API request to SIGNL4
*
* @param {IHookFunctions | IExecuteFunctions} this
* @param {string} method
* @param {string} contentType
* @param {string} body
* @param {object} query
* @param {string} teamSecret
* @param {object} options
* @returns {Promise<any>}
*
*/

View File

@@ -8,10 +8,7 @@ import { OptionsWithUri } from 'request';
* Make an API request to Sms77
*
* @param {IHookFunctions | IExecuteFunctions} this
* @param {string} method
* @param {Endpoint} endpoint
* @param {object | undefined} data
* @returns {Promise<any>}
*/
export async function sms77ApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -9,11 +9,6 @@ import { get } from 'lodash';
/**
* Make an API request to Spotify
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function spotifyApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -22,7 +22,6 @@ import {
* Flattens an object with deep data
*
* @param {IDataObject} data The object to flatten
* @returns
*/
function flattenObject(data: IDataObject) {
const returnData: IDataObject = {};

View File

@@ -7,11 +7,6 @@ import { IDataObject, IPollFunctions, NodeApiError } from 'n8n-workflow';
/**
* Make an API request to Airtable
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@@ -56,13 +51,7 @@ export async function apiRequest(
* Make an API request to paginated Airtable endpoint
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | IPollFunctions,

View File

@@ -9,11 +9,6 @@ import { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-wo
/**
* Make an API request to Stripe
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function stripeApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View File

@@ -60,10 +60,8 @@ export interface IMarkupReplyKeyboardRemove {
/**
* Add the additional fields to the body
*
* @param {IExecuteFunctions} this
* @param {IDataObject} body The body object to add fields to
* @param {number} index The index of the item
* @returns
*/
export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject, index: number) {
// Add the additional fields
@@ -140,11 +138,6 @@ export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject,
/**
* Make an API request to Telegram
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,

View File

@@ -7,11 +7,6 @@ import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
/**
* Make an API request to Trello
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View File

@@ -6,11 +6,6 @@ import { OptionsWithUri } from 'request';
/**
* Make an API request to Twake
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function twakeApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View File

@@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/**
* Make an API request to Twilio
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function twilioApiRequest(
this: IHookFunctions | IExecuteFunctions,

View File

@@ -32,11 +32,6 @@ export interface ITypeformAnswerField {
/**
* Make an API request to Typeform
*
* @param {IHookFunctions} this
* @param {string} method
* @param {string} url
* @param {object} body
* @returns {Promise<any>}
*/
export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -74,13 +69,7 @@ export async function apiRequest(
* Make an API request to paginated Typeform endpoint
* and return all results
*
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/
export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@@ -118,9 +107,6 @@ export async function apiRequestAllItems(
/**
* Returns all the available forms
*
* @export
* @param {ILoadOptionsFunctions} this
* @returns {Promise<INodePropertyOptions[]>}
*/
export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = 'forms';

View File

@@ -95,9 +95,6 @@ export async function woocommerceApiRequestAllItems(
/**
* Creates a secret from the credentials
*
* @export
* @param {ICredentialDataDecryptedObject} credentials
* @returns
*/
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
const data = `${credentials.consumerKey},${credentials.consumerSecret}`;

View File

@@ -5,7 +5,6 @@
*
* @param {Array} array The array to process.
* @param {number} [size=1] The length of each chunk
* @returns {Array} Returns the new array of chunks.
* @example
*
* chunk(['a', 'b', 'c', 'd'], 2)
@@ -35,7 +34,6 @@ export function chunk(array: any[], size = 1) {
* Takes a multidimensional array and converts it to a one-dimensional array.
*
* @param {Array} nestedArray The array to be flattened.
* @returns {Array} Returns the new flattened array.
* @example
*
* flatten([['a', 'b'], ['c', 'd']])