mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)
* 📘 Set up overload * 🔥 Remove inferrable record assertions * 👕 Fix semicolon * 👕 Fix another semicolon
This commit is contained in:
parent
0565194473
commit
0d9eeea024
|
@ -233,7 +233,7 @@ export class ActionNetwork implements INodeType {
|
|||
},
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length && body.person) {
|
||||
Object.assign(body.person, adjustPersonPayload(additionalFields));
|
||||
|
@ -265,7 +265,7 @@ export class ActionNetwork implements INodeType {
|
|||
|
||||
const personId = this.getNodeParameter('personId', i);
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, adjustPersonPayload(updateFields));
|
||||
|
@ -361,7 +361,7 @@ export class ActionNetwork implements INodeType {
|
|||
|
||||
const body = makeOsdiLink(personId) as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
|
|
@ -356,7 +356,7 @@ export class ActiveCampaign implements INodeType {
|
|||
email: this.getNodeParameter('email', i) as string,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
addAdditionalFields(body.contact as IDataObject, additionalFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -385,7 +385,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
@ -417,7 +417,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.contact = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.contact as IDataObject, updateFields);
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
|
@ -442,7 +442,7 @@ export class ActiveCampaign implements INodeType {
|
|||
name: this.getNodeParameter('name', i) as string,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
addAdditionalFields(body.account as IDataObject, additionalFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -481,7 +481,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
endpoint = `/api/3/accounts`;
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
Object.assign(qs, filters);
|
||||
} else if (operation === 'update') {
|
||||
// ----------------------------------
|
||||
|
@ -497,7 +497,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.account = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.account as IDataObject, updateFields);
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
|
@ -523,7 +523,7 @@ export class ActiveCampaign implements INodeType {
|
|||
account: this.getNodeParameter('account', i) as string,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
addAdditionalFields(body.account as IDataObject, additionalFields);
|
||||
} else if (operation === 'update') {
|
||||
// ----------------------------------
|
||||
|
@ -539,7 +539,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.accountContact = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.accountContact as IDataObject, updateFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -667,7 +667,7 @@ export class ActiveCampaign implements INodeType {
|
|||
tagType: this.getNodeParameter('tagType', i) as string,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
addAdditionalFields(body.tag as IDataObject, additionalFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -719,7 +719,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.tag = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.tag as IDataObject, updateFields);
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
|
@ -760,7 +760,7 @@ export class ActiveCampaign implements INodeType {
|
|||
addAdditionalFields(body.deal as IDataObject, { stage });
|
||||
}
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
addAdditionalFields(body.deal as IDataObject, additionalFields);
|
||||
} else if (operation === 'update') {
|
||||
// ----------------------------------
|
||||
|
@ -774,7 +774,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.deal = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.deal as IDataObject, updateFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -873,7 +873,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.connection = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.connection as IDataObject, updateFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -959,7 +959,7 @@ export class ActiveCampaign implements INodeType {
|
|||
) as unknown as IProduct[];
|
||||
addAdditionalFields(body.ecomOrder as IDataObject, { orderProducts });
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
addAdditionalFields(body.ecomOrder as IDataObject, additionalFields);
|
||||
} else if (operation === 'update') {
|
||||
// ----------------------------------
|
||||
|
@ -973,7 +973,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.ecomOrder = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
addAdditionalFields(body.ecomOrder as IDataObject, updateFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
|
@ -1034,7 +1034,7 @@ export class ActiveCampaign implements INodeType {
|
|||
email: this.getNodeParameter('email', i) as string,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.acceptsMarketing !== undefined) {
|
||||
if (additionalFields.acceptsMarketing === true) {
|
||||
additionalFields.acceptsMarketing = '1';
|
||||
|
@ -1055,7 +1055,7 @@ export class ActiveCampaign implements INodeType {
|
|||
|
||||
body.ecomCustomer = {} as IDataObject;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
if (updateFields.acceptsMarketing !== undefined) {
|
||||
if (updateFields.acceptsMarketing === true) {
|
||||
updateFields.acceptsMarketing = '1';
|
||||
|
|
|
@ -175,7 +175,7 @@ export class Affinity implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
const entityId = this.getNodeParameter('entityId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
entity_id: parseInt(entityId, 10),
|
||||
};
|
||||
|
@ -243,7 +243,7 @@ export class Affinity implements INodeType {
|
|||
const firstName = this.getNodeParameter('firstName', i) as string;
|
||||
const lastName = this.getNodeParameter('lastName', i) as string;
|
||||
const emails = this.getNodeParameter('emails', i) as string[];
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IPerson = {
|
||||
first_name: firstName,
|
||||
last_name: lastName,
|
||||
|
@ -257,7 +257,7 @@ export class Affinity implements INodeType {
|
|||
//https://api-docs.affinity.co/#update-a-person
|
||||
if (operation === 'update') {
|
||||
const personId = this.getNodeParameter('personId', i) as number;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const emails = this.getNodeParameter('emails', i) as string[];
|
||||
const body: IPerson = {
|
||||
emails,
|
||||
|
@ -276,7 +276,7 @@ export class Affinity implements INodeType {
|
|||
//https://api-docs.affinity.co/#get-a-specific-person
|
||||
if (operation === 'get') {
|
||||
const personId = this.getNodeParameter('personId', i) as number;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.withInteractionDates) {
|
||||
qs.with_interaction_dates = options.withInteractionDates as boolean;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ export class Affinity implements INodeType {
|
|||
//https://api-docs.affinity.co/#search-for-persons
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.term) {
|
||||
qs.term = options.term as string;
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ export class Affinity implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const domain = this.getNodeParameter('domain', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IOrganization = {
|
||||
name,
|
||||
domain,
|
||||
|
@ -343,7 +343,7 @@ export class Affinity implements INodeType {
|
|||
//https://api-docs.affinity.co/#update-an-organization
|
||||
if (operation === 'update') {
|
||||
const organizationId = this.getNodeParameter('organizationId', i) as number;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IOrganization = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
@ -364,7 +364,7 @@ export class Affinity implements INodeType {
|
|||
//https://api-docs.affinity.co/#get-a-specific-organization
|
||||
if (operation === 'get') {
|
||||
const organizationId = this.getNodeParameter('organizationId', i) as number;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.withInteractionDates) {
|
||||
qs.with_interaction_dates = options.withInteractionDates as boolean;
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ export class Affinity implements INodeType {
|
|||
//https://api-docs.affinity.co/#search-for-organizations
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.term) {
|
||||
qs.term = options.term as string;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,7 @@ export class AgileCrm implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
// if company, add 'company' as type. default is person
|
||||
if (resource === 'company') {
|
||||
|
@ -366,7 +366,7 @@ export class AgileCrm implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.starValue) {
|
||||
body.star_value = additionalFields.starValue as string;
|
||||
|
@ -544,7 +544,7 @@ export class AgileCrm implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
body.close_date = new Date(this.getNodeParameter('closeDate', i) as string).getTime();
|
||||
body.expected_value = this.getNodeParameter('expectedValue', i) as number;
|
||||
|
@ -584,7 +584,7 @@ export class AgileCrm implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
body.id = this.getNodeParameter('dealId', i) as number;
|
||||
|
||||
if (additionalFields.expectedValue) {
|
||||
|
|
|
@ -392,7 +392,7 @@ export class ApiTemplateIo implements INodeType {
|
|||
|
||||
let options: IDataObject = {};
|
||||
if (download) {
|
||||
options = this.getNodeParameter('options', i) as IDataObject;
|
||||
options = this.getNodeParameter('options', i);
|
||||
}
|
||||
|
||||
const qs = {
|
||||
|
@ -483,7 +483,7 @@ export class ApiTemplateIo implements INodeType {
|
|||
|
||||
let options: IDataObject = {};
|
||||
if (download) {
|
||||
options = this.getNodeParameter('options', i) as IDataObject;
|
||||
options = this.getNodeParameter('options', i);
|
||||
}
|
||||
|
||||
const qs = {
|
||||
|
|
|
@ -1955,7 +1955,7 @@ export class Asana implements INodeType {
|
|||
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
requestMethod = 'GET';
|
||||
endpoint = `/tasks/${taskId}/subtasks`;
|
||||
|
@ -2031,7 +2031,7 @@ export class Asana implements INodeType {
|
|||
// task:getAll
|
||||
// ----------------------------------
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
requestMethod = 'GET';
|
||||
|
@ -2146,7 +2146,7 @@ export class Asana implements INodeType {
|
|||
|
||||
endpoint = `/tasks/${taskId}/stories`;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
|
@ -2216,7 +2216,7 @@ export class Asana implements INodeType {
|
|||
|
||||
const taskId = this.getNodeParameter('id', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
requestMethod = 'POST';
|
||||
|
||||
|
@ -2281,7 +2281,7 @@ export class Asana implements INodeType {
|
|||
// ----------------------------------
|
||||
// project:create
|
||||
// ----------------------------------
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const teamId = this.getNodeParameter('team', i);
|
||||
|
||||
// request parameters
|
||||
|
@ -2340,7 +2340,7 @@ export class Asana implements INodeType {
|
|||
// project:getAll
|
||||
// ----------------------------------
|
||||
const workspaceId = this.getNodeParameter('workspace', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
requestMethod = 'GET';
|
||||
|
@ -2378,7 +2378,7 @@ export class Asana implements INodeType {
|
|||
// project:update
|
||||
// ----------------------------------
|
||||
const projectId = this.getNodeParameter('id', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
// request parameters
|
||||
requestMethod = 'PUT';
|
||||
|
|
|
@ -134,7 +134,7 @@ export class Automizy implements INodeType {
|
|||
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
|
@ -196,7 +196,7 @@ export class Automizy implements INodeType {
|
|||
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.direction && additionalFields.sortBy) {
|
||||
qs.order = `${additionalFields.sortBy}:${additionalFields.direction}`;
|
||||
|
@ -236,7 +236,7 @@ export class Automizy implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -304,7 +304,7 @@ export class Automizy implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.direction && additionalFields.sortBy) {
|
||||
qs.order = `${additionalFields.sortBy}:${additionalFields.direction}`;
|
||||
|
|
|
@ -129,7 +129,7 @@ export class Autopilot implements INodeType {
|
|||
if (operation === 'upsert') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
Email: email,
|
||||
|
|
|
@ -105,7 +105,7 @@ export class AwsCertificateManager implements INodeType {
|
|||
//https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
|
||||
if (operation === 'getMany') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: { Includes: IDataObject; CertificateStatuses: string[]; MaxItems: number } =
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ export class AwsComprehend implements INodeType {
|
|||
const action = 'Comprehend_20171127.DetectEntities';
|
||||
const text = this.getNodeParameter('text', i) as string;
|
||||
const languageCode = this.getNodeParameter('languageCode', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
Text: text,
|
||||
|
|
|
@ -192,7 +192,7 @@ export class AwsDynamoDB implements INodeType {
|
|||
i,
|
||||
[],
|
||||
) as IAttributeNameUi[];
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const simple = this.getNodeParameter('simple', 0, false) as boolean;
|
||||
|
||||
const items = this.getNodeParameter('keysUi.keyValues', i, []) as [
|
||||
|
@ -245,7 +245,7 @@ export class AwsDynamoDB implements INodeType {
|
|||
const tableName = this.getNodeParameter('tableName', 0) as string;
|
||||
const simple = this.getNodeParameter('simple', 0, false) as boolean;
|
||||
const select = this.getNodeParameter('select', 0) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const eanUi = this.getNodeParameter(
|
||||
'additionalFields.eanUi.eanValues',
|
||||
i,
|
||||
|
|
|
@ -316,7 +316,7 @@ export class AwsElb implements INodeType {
|
|||
|
||||
const subnets = this.getNodeParameter('subnets', i) as string[];
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const params = ['Version=2015-12-01'];
|
||||
|
||||
|
@ -388,7 +388,7 @@ export class AwsElb implements INodeType {
|
|||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll) {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (filters.names) {
|
||||
const names = (filters.names as string).split(',');
|
||||
|
|
|
@ -342,7 +342,7 @@ export class AwsRekognition implements INodeType {
|
|||
if (resource === 'image') {
|
||||
//https://docs.aws.amazon.com/rekognition/latest/dg/API_DetectModerationLabels.html#API_DetectModerationLabels_RequestSyntax
|
||||
if (operation === 'analyze') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
let action = undefined;
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ export class AwsS3 implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const credentials = await this.getCredentials('aws');
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.acl) {
|
||||
headers['x-amz-acl'] = paramCase(additionalFields.acl as string);
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ export class AwsS3 implements INodeType {
|
|||
if (operation === 'search') {
|
||||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0);
|
||||
|
||||
if (additionalFields.prefix) {
|
||||
qs['prefix'] = additionalFields.prefix as string;
|
||||
|
@ -275,7 +275,7 @@ export class AwsS3 implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const folderName = this.getNodeParameter('folderName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
let path = `/${folderName}/`;
|
||||
|
||||
if (additionalFields.requesterPays) {
|
||||
|
@ -455,7 +455,7 @@ export class AwsS3 implements INodeType {
|
|||
if (operation === 'copy') {
|
||||
const sourcePath = this.getNodeParameter('sourcePath', i) as string;
|
||||
const destinationPath = this.getNodeParameter('destinationPath', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
headers['x-amz-copy-source'] = sourcePath;
|
||||
|
||||
|
@ -627,7 +627,7 @@ export class AwsS3 implements INodeType {
|
|||
|
||||
const fileKey = this.getNodeParameter('fileKey', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (options.versionId) {
|
||||
qs.versionId = options.versionId as string;
|
||||
|
@ -721,7 +721,7 @@ export class AwsS3 implements INodeType {
|
|||
const bucketName = this.getNodeParameter('bucketName', i) as string;
|
||||
const fileName = this.getNodeParameter('fileName', i) as string;
|
||||
const isBinaryData = this.getNodeParameter('binaryData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const tagsValues = (this.getNodeParameter('tagsUi', i) as IDataObject)
|
||||
.tagsValues as IDataObject[];
|
||||
let path = '/';
|
||||
|
|
|
@ -941,7 +941,7 @@ export class AwsSes implements INodeType {
|
|||
|
||||
const templateName = this.getNodeParameter('templateName', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const params = [
|
||||
`Action=SendCustomVerificationEmail`,
|
||||
|
@ -967,7 +967,7 @@ export class AwsSes implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const templateName = this.getNodeParameter('templateName', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const params = [
|
||||
`Action=UpdateCustomVerificationEmailTemplate`,
|
||||
|
@ -1018,7 +1018,7 @@ export class AwsSes implements INodeType {
|
|||
|
||||
const isBodyHtml = this.getNodeParameter('isBodyHtml', i) as boolean;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const params = [
|
||||
`Message.Subject.Data=${encodeURIComponent(subject)}`,
|
||||
|
@ -1096,7 +1096,7 @@ export class AwsSes implements INodeType {
|
|||
|
||||
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const templateDataUi = this.getNodeParameter('templateDataUi', i) as IDataObject;
|
||||
|
||||
|
@ -1184,7 +1184,7 @@ export class AwsSes implements INodeType {
|
|||
|
||||
const htmlPart = this.getNodeParameter('htmlPart', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const params = [
|
||||
`Template.TemplateName=${templateName}`,
|
||||
|
@ -1265,7 +1265,7 @@ export class AwsSes implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const templateName = this.getNodeParameter('templateName', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const params = [`Template.TemplateName=${templateName}`];
|
||||
|
||||
|
|
|
@ -491,7 +491,7 @@ export class AwsTranscribe implements INodeType {
|
|||
//https://docs.aws.amazon.com/transcribe/latest/dg/API_ListTranscriptionJobs.html
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const action = 'Transcribe.ListTranscriptionJobs';
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export async function create(
|
|||
body.firstName = this.getNodeParameter('firstName', index) as string;
|
||||
body.lastName = this.getNodeParameter('lastName', index) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', index) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', index);
|
||||
const synced = this.getNodeParameter('synced', index) as boolean;
|
||||
|
||||
if (synced) {
|
||||
|
|
|
@ -11,7 +11,7 @@ export async function upload(this: IExecuteFunctions, index: number) {
|
|||
const items = this.getInputData();
|
||||
|
||||
const category = this.getNodeParameter('categoryId', index) as string;
|
||||
const options = this.getNodeParameter('options', index) as IDataObject;
|
||||
const options = this.getNodeParameter('options', index);
|
||||
|
||||
if (items[index].binary === undefined) {
|
||||
throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', {
|
||||
|
|
|
@ -116,7 +116,7 @@ export class Bannerbear implements INodeType {
|
|||
//https://developers.bannerbear.com/#create-an-image
|
||||
if (operation === 'create') {
|
||||
const templateId = this.getNodeParameter('templateId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const modifications = (this.getNodeParameter('modificationsUi', i) as IDataObject)
|
||||
.modificationsValues as IDataObject;
|
||||
const body: IDataObject = {
|
||||
|
|
|
@ -135,7 +135,7 @@ export class Bitly implements INodeType {
|
|||
if (resource === 'link') {
|
||||
if (operation === 'create') {
|
||||
const longUrl = this.getNodeParameter('longUrl', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
long_url: longUrl,
|
||||
};
|
||||
|
@ -168,7 +168,7 @@ export class Bitly implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const linkId = this.getNodeParameter('id', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.longUrl) {
|
||||
body.long_url = updateFields.longUrl as string;
|
||||
|
|
|
@ -219,7 +219,7 @@ export class Bitwarden implements INodeType {
|
|||
// event: getAll
|
||||
// ----------------------------------
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const qs = isEmpty(filters) ? {} : filters;
|
||||
const endpoint = '/public/events';
|
||||
responseData = await handleGetAll.call(this, i, 'GET', endpoint, qs, {});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { INodeProperties } from 'n8n-workflow';
|
||||
import type { IDataObject, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const collectionOperations: INodeProperties[] = [
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ export const collectionFields: INodeProperties[] = [
|
|||
},
|
||||
];
|
||||
|
||||
export interface CollectionUpdateFields {
|
||||
export type CollectionUpdateFields = IDataObject & {
|
||||
groups: string[];
|
||||
externalId: string;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ export class Box implements INodeType {
|
|||
if (operation === 'copy') {
|
||||
const fileId = this.getNodeParameter('fileId', i) as string;
|
||||
const parentId = this.getNodeParameter('parentId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (additionalFields.name) {
|
||||
body.name = additionalFields.name as string;
|
||||
|
@ -163,7 +163,7 @@ export class Box implements INodeType {
|
|||
// https://developer.box.com/reference/get-files-id
|
||||
if (operation === 'get') {
|
||||
const fileId = this.getNodeParameter('fileId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.fields) {
|
||||
qs.fields = additionalFields.fields as string;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ export class Box implements INodeType {
|
|||
if (operation === 'search') {
|
||||
const query = this.getNodeParameter('query', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const timezone = this.getTimezone();
|
||||
qs.type = 'file';
|
||||
qs.query = query;
|
||||
|
@ -225,7 +225,7 @@ export class Box implements INodeType {
|
|||
const fileId = this.getNodeParameter('fileId', i) as string;
|
||||
const role = this.getNodeParameter('role', i) as string;
|
||||
const accessibleBy = this.getNodeParameter('accessibleBy', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
// tslint:disable-next-line: no-any
|
||||
const body: { accessible_by: IDataObject; [key: string]: any } = {
|
||||
accessible_by: {},
|
||||
|
@ -366,7 +366,7 @@ export class Box implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const parentId = this.getNodeParameter('parentId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
};
|
||||
|
@ -407,7 +407,7 @@ export class Box implements INodeType {
|
|||
if (operation === 'search') {
|
||||
const query = this.getNodeParameter('query', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const timezone = this.getTimezone();
|
||||
qs.type = 'folder';
|
||||
qs.query = query;
|
||||
|
@ -459,7 +459,7 @@ export class Box implements INodeType {
|
|||
const folderId = this.getNodeParameter('folderId', i) as string;
|
||||
const role = this.getNodeParameter('role', i) as string;
|
||||
const accessibleBy = this.getNodeParameter('accessibleBy', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
// tslint:disable-next-line: no-any
|
||||
const body: { accessible_by: IDataObject; [key: string]: any } = {
|
||||
accessible_by: {},
|
||||
|
@ -501,7 +501,7 @@ export class Box implements INodeType {
|
|||
//https://developer.box.com/guides/folders/single/move/
|
||||
if (operation === 'update') {
|
||||
const folderId = this.getNodeParameter('folderId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (updateFields.fields) {
|
||||
qs.fields = updateFields.fields;
|
||||
|
|
|
@ -122,7 +122,7 @@ export class Bubble implements INodeType {
|
|||
const endpoint = `/obj/${typeName}`;
|
||||
|
||||
const jsonParameters = this.getNodeParameter('jsonParameters', 0) as boolean;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (jsonParameters === false) {
|
||||
if (options.filters) {
|
||||
|
|
|
@ -75,7 +75,7 @@ export class CircleCi implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const vcs = this.getNodeParameter('vcs', i) as string;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
let slug = this.getNodeParameter('projectSlug', i) as string;
|
||||
|
||||
|
@ -112,7 +112,7 @@ export class CircleCi implements INodeType {
|
|||
const vcs = this.getNodeParameter('vcs', i) as string;
|
||||
let slug = this.getNodeParameter('projectSlug', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
slug = slug.replace(new RegExp(/\//g), '%2F');
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ export class CiscoWebex implements INodeType {
|
|||
const qs: IDataObject = {
|
||||
roomId: this.getNodeParameter('roomId', i),
|
||||
};
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
|
@ -319,7 +319,7 @@ export class CiscoWebex implements INodeType {
|
|||
i,
|
||||
[],
|
||||
) as IDataObject[];
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
title,
|
||||
|
@ -350,7 +350,7 @@ export class CiscoWebex implements INodeType {
|
|||
|
||||
if (operation === 'delete') {
|
||||
const meetingId = this.getNodeParameter('meetingId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const qs: IDataObject = {
|
||||
...options,
|
||||
|
@ -371,7 +371,7 @@ export class CiscoWebex implements INodeType {
|
|||
|
||||
if (operation === 'get') {
|
||||
const meetingId = this.getNodeParameter('meetingId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
let headers = {};
|
||||
|
||||
const qs: IDataObject = {
|
||||
|
@ -400,7 +400,7 @@ export class CiscoWebex implements INodeType {
|
|||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const qs: IDataObject = {
|
||||
|
@ -446,7 +446,7 @@ export class CiscoWebex implements INodeType {
|
|||
i,
|
||||
[],
|
||||
) as IDataObject[];
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const { title, password, start, end } = await webexApiRequest.call(
|
||||
this,
|
||||
|
@ -516,7 +516,7 @@ export class CiscoWebex implements INodeType {
|
|||
// const transcriptId = this.getNodeParameter('transcriptId', i) as string;
|
||||
// const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string;
|
||||
// const meetingId = this.getNodeParameter('meetingId', i) as string;
|
||||
// const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
// const options = this.getNodeParameter('options', i);
|
||||
|
||||
// const qs: IDataObject = {
|
||||
// meetingId,
|
||||
|
@ -542,7 +542,7 @@ export class CiscoWebex implements INodeType {
|
|||
// for (let i = 0; i < items.length; i++) {
|
||||
// try {
|
||||
// const meetingId = this.getNodeParameter('meetingId', i) as string;
|
||||
// const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
// const filters = this.getNodeParameter('filters', i);
|
||||
// const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
// const qs: IDataObject = {
|
||||
|
|
|
@ -71,7 +71,7 @@ export class CitrixAdc implements INodeType {
|
|||
if (operation === 'upload') {
|
||||
const fileLocation = this.getNodeParameter('fileLocation', i) as string;
|
||||
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const endpoint = `/config/systemfile`;
|
||||
|
||||
const item = items[i];
|
||||
|
|
|
@ -69,7 +69,7 @@ export class Clearbit implements INodeType {
|
|||
if (resource === 'person') {
|
||||
if (operation === 'enrich') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
qs.email = email;
|
||||
if (additionalFields.givenName) {
|
||||
qs.given_name = additionalFields.givenName as string;
|
||||
|
@ -111,7 +111,7 @@ export class Clearbit implements INodeType {
|
|||
if (resource === 'company') {
|
||||
if (operation === 'enrich') {
|
||||
const domain = this.getNodeParameter('domain', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
qs.domain = domain;
|
||||
if (additionalFields.companyName) {
|
||||
qs.company_name = additionalFields.companyName as string;
|
||||
|
|
|
@ -459,7 +459,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const checklistId = this.getNodeParameter('checklist', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
@ -480,7 +480,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const checklistId = this.getNodeParameter('checklist', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
};
|
||||
|
@ -508,7 +508,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const checklistId = this.getNodeParameter('checklist', i) as string;
|
||||
const checklistItemId = this.getNodeParameter('checklistItem', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
@ -536,7 +536,7 @@ export class ClickUp implements INodeType {
|
|||
const resource = this.getNodeParameter('commentOn', i) as string;
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
const commentText = this.getNodeParameter('commentText', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
comment_text: commentText,
|
||||
};
|
||||
|
@ -574,7 +574,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const commentId = this.getNodeParameter('comment', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.commentText) {
|
||||
body.comment_text = updateFields.commentText as string;
|
||||
|
@ -613,7 +613,7 @@ export class ClickUp implements INodeType {
|
|||
responseData = await clickupApiRequest.call(this, 'GET', `/folder/${folderId}`);
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const spaceId = this.getNodeParameter('space', i) as string;
|
||||
if (filters.archived) {
|
||||
qs.archived = filters.archived as boolean;
|
||||
|
@ -631,7 +631,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const folderId = this.getNodeParameter('folder', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
@ -643,7 +643,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const teamId = this.getNodeParameter('team', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
};
|
||||
|
@ -692,7 +692,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const goalId = this.getNodeParameter('goal', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
@ -725,7 +725,7 @@ export class ClickUp implements INodeType {
|
|||
const goalId = this.getNodeParameter('goal', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const type = this.getNodeParameter('type', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
type,
|
||||
|
@ -793,7 +793,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const keyResultId = this.getNodeParameter('keyResult', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
@ -826,7 +826,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const teamId = this.getNodeParameter('team', i) as string;
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
};
|
||||
|
@ -870,7 +870,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const teamId = this.getNodeParameter('team', i) as string;
|
||||
const guestId = this.getNodeParameter('guest', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {};
|
||||
if (updateFields.username) {
|
||||
body.username = updateFields.username as string;
|
||||
|
@ -897,7 +897,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: ITask = {
|
||||
name,
|
||||
};
|
||||
|
@ -954,7 +954,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const taskId = this.getNodeParameter('id', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: ITask = {
|
||||
assignees: {
|
||||
add: [],
|
||||
|
@ -1018,7 +1018,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
if (filters.archived) {
|
||||
qs.archived = filters.archived as boolean;
|
||||
}
|
||||
|
@ -1162,7 +1162,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'add') {
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const name = this.getNodeParameter('tagName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const qs: IDataObject = {};
|
||||
Object.assign(qs, additionalFields);
|
||||
responseData = await clickupApiRequest.call(
|
||||
|
@ -1177,7 +1177,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'remove') {
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const name = this.getNodeParameter('tagName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const qs: IDataObject = {};
|
||||
Object.assign(qs, additionalFields);
|
||||
responseData = await clickupApiRequest.call(
|
||||
|
@ -1248,7 +1248,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const teamId = this.getNodeParameter('team', i) as string;
|
||||
const timeEntryId = this.getNodeParameter('timeEntry', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const timezone = this.getTimezone();
|
||||
const body: IDataObject = {};
|
||||
Object.assign(body, updateFields);
|
||||
|
@ -1277,7 +1277,7 @@ export class ClickUp implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const teamId = this.getNodeParameter('team', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const timezone = this.getTimezone();
|
||||
Object.assign(qs, filters);
|
||||
|
||||
|
@ -1321,7 +1321,7 @@ export class ClickUp implements INodeType {
|
|||
const taskId = this.getNodeParameter('task', i) as string;
|
||||
const start = this.getNodeParameter('start', i) as string;
|
||||
const duration = this.getNodeParameter('duration', i) as number;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const timezone = this.getTimezone();
|
||||
const body: IDataObject = {
|
||||
start: moment.tz(start, timezone).valueOf(),
|
||||
|
@ -1347,7 +1347,7 @@ export class ClickUp implements INodeType {
|
|||
const taskId = this.getNodeParameter('task', i) as string;
|
||||
const body: IDataObject = {};
|
||||
body.tid = taskId;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
responseData = await clickupApiRequest.call(
|
||||
this,
|
||||
|
@ -1503,7 +1503,7 @@ export class ClickUp implements INodeType {
|
|||
const spaceId = this.getNodeParameter('space', i) as string;
|
||||
const folderless = this.getNodeParameter('folderless', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IList = {
|
||||
name,
|
||||
};
|
||||
|
@ -1582,7 +1582,7 @@ export class ClickUp implements INodeType {
|
|||
responseData = await clickupApiRequest.call(this, 'GET', `/list/${listId}`);
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const spaceId = this.getNodeParameter('space', i) as string;
|
||||
const folderless = this.getNodeParameter('folderless', i) as boolean;
|
||||
if (filters.archived) {
|
||||
|
@ -1601,7 +1601,7 @@ export class ClickUp implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const listId = this.getNodeParameter('list', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IList = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
|
|
@ -288,7 +288,7 @@ export class Clockify implements INodeType {
|
|||
const clientId = this.getNodeParameter('clientId', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
|
@ -324,7 +324,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
|
@ -358,7 +358,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
|
@ -414,7 +414,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
|
@ -446,7 +446,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const projectId = this.getNodeParameter('projectId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -508,7 +508,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
|
@ -540,7 +540,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const tagId = this.getNodeParameter('tagId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -564,7 +564,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
|
@ -625,7 +625,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const projectId = this.getNodeParameter('projectId', i) as string;
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
Object.assign(qs, filters);
|
||||
|
||||
|
@ -657,7 +657,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -686,7 +686,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const start = this.getNodeParameter('start', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
start: moment.tz(start, timezone).utc().format(),
|
||||
|
@ -751,7 +751,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const timeEntryId = this.getNodeParameter('timeEntryId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -796,7 +796,7 @@ export class Clockify implements INodeType {
|
|||
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ export class Cockpit implements INodeType {
|
|||
|
||||
responseData = await createCollectionEntry.call(this, collectionName, data);
|
||||
} else if (operation === 'getAll') {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
|
|
|
@ -255,7 +255,7 @@ export class Coda implements INodeType {
|
|||
qs = {};
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
|
||||
|
||||
if (options.disableParsing) {
|
||||
|
@ -316,7 +316,7 @@ export class Coda implements INodeType {
|
|||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows/${rowId}`;
|
||||
if (options.useColumnNames === false) {
|
||||
|
@ -860,7 +860,7 @@ export class Coda implements INodeType {
|
|||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const keyName = this.getNodeParameter('keyName', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const body: IDataObject = {};
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}`;
|
||||
if (options.disableParsing) {
|
||||
|
|
|
@ -151,7 +151,7 @@ export class CoinGecko implements INodeType {
|
|||
//https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_
|
||||
//https://www.coingecko.com/api/documentations/v3#/contract/get_coins__id__contract__contract_address_
|
||||
if (operation === 'get') {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.community_data = false;
|
||||
qs.developer_data = false;
|
||||
|
@ -207,7 +207,7 @@ export class CoinGecko implements INodeType {
|
|||
if (operation === 'market') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const baseCurrency = this.getNodeParameter('baseCurrency', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.vs_currency = baseCurrency;
|
||||
|
||||
|
@ -240,7 +240,7 @@ export class CoinGecko implements INodeType {
|
|||
if (operation === 'price') {
|
||||
const searchBy = this.getNodeParameter('searchBy', i) as string;
|
||||
const quoteCurrencies = this.getNodeParameter('quoteCurrencies', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.vs_currencies = quoteCurrencies.join(',');
|
||||
|
||||
|
@ -274,7 +274,7 @@ export class CoinGecko implements INodeType {
|
|||
if (operation === 'ticker') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const coinId = this.getNodeParameter('coinId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -311,7 +311,7 @@ export class CoinGecko implements INodeType {
|
|||
if (operation === 'history') {
|
||||
const coinId = this.getNodeParameter('coinId', i) as string;
|
||||
const date = this.getNodeParameter('date', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -411,7 +411,7 @@ export class CoinGecko implements INodeType {
|
|||
//https://www.coingecko.com/api/documentations/v3#/events/get_events
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -440,7 +440,7 @@ export class CoinGecko implements INodeType {
|
|||
if (operation === 'price') {
|
||||
const ids = this.getNodeParameter('ids', i) as string;
|
||||
const currencies = this.getNodeParameter('currencies', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
(qs.ids = ids), (qs.vs_currencies = currencies.join(','));
|
||||
|
||||
|
@ -454,7 +454,7 @@ export class CoinGecko implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
const contractAddresses = this.getNodeParameter('contractAddresses', i) as string;
|
||||
const currencies = this.getNodeParameter('currencies', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.contract_addresses = contractAddresses;
|
||||
qs.vs_currencies = currencies.join(',');
|
||||
|
|
|
@ -111,7 +111,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
const id = this.getNodeParameter('contentTypeId', 0) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
responseData = await contentfulApiRequest.call(
|
||||
this,
|
||||
|
@ -132,7 +132,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
const id = this.getNodeParameter('entryId', 0) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
responseData = await contentfulApiRequest.call(
|
||||
this,
|
||||
|
@ -150,7 +150,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const rawData = additionalFields.rawData;
|
||||
additionalFields.rawData = undefined;
|
||||
|
||||
|
@ -231,7 +231,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
const id = this.getNodeParameter('assetId', 0) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
responseData = await contentfulApiRequest.call(
|
||||
this,
|
||||
|
@ -249,7 +249,7 @@ export class Contentful implements INodeType {
|
|||
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const rawData = additionalFields.rawData;
|
||||
additionalFields.rawData = undefined;
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ export class ConvertKit implements INodeType {
|
|||
|
||||
const formId = this.getNodeParameter('id', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
|
@ -271,7 +271,7 @@ export class ConvertKit implements INodeType {
|
|||
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.subscriberState) {
|
||||
qs.subscriber_state = additionalFields.subscriberState as string;
|
||||
|
@ -301,7 +301,7 @@ export class ConvertKit implements INodeType {
|
|||
|
||||
const sequenceId = this.getNodeParameter('id', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
|
@ -354,7 +354,7 @@ export class ConvertKit implements INodeType {
|
|||
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.subscriberState) {
|
||||
qs.subscriber_state = additionalFields.subscriberState as string;
|
||||
|
@ -412,7 +412,7 @@ export class ConvertKit implements INodeType {
|
|||
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
|
|
|
@ -138,7 +138,7 @@ export class Copper implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, adjustCompanyFields(additionalFields));
|
||||
|
@ -190,7 +190,7 @@ export class Copper implements INodeType {
|
|||
const companyId = this.getNodeParameter('companyId', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, adjustCompanyFields(updateFields));
|
||||
|
@ -231,7 +231,7 @@ export class Copper implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, adjustLeadFields(additionalFields));
|
||||
|
@ -281,7 +281,7 @@ export class Copper implements INodeType {
|
|||
const leadId = this.getNodeParameter('leadId', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, adjustLeadFields(updateFields));
|
||||
|
@ -361,7 +361,7 @@ export class Copper implements INodeType {
|
|||
const opportunityId = this.getNodeParameter('opportunityId', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, updateFields);
|
||||
|
@ -390,7 +390,7 @@ export class Copper implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, adjustPersonFields(additionalFields));
|
||||
|
@ -440,7 +440,7 @@ export class Copper implements INodeType {
|
|||
const personId = this.getNodeParameter('personId', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, adjustPersonFields(updateFields));
|
||||
|
@ -464,7 +464,7 @@ export class Copper implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -516,7 +516,7 @@ export class Copper implements INodeType {
|
|||
const projectId = this.getNodeParameter('projectId', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, updateFields);
|
||||
|
@ -540,7 +540,7 @@ export class Copper implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -592,7 +592,7 @@ export class Copper implements INodeType {
|
|||
const taskId = this.getNodeParameter('taskId', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, updateFields);
|
||||
|
|
|
@ -180,7 +180,7 @@ export class Cortex implements INodeType {
|
|||
|
||||
const observableType = this.getNodeParameter('observableType', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const tlp = this.getNodeParameter('tlp', i) as string;
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ export class CrateDb implements INodeType {
|
|||
// update
|
||||
// ----------------------------------
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0);
|
||||
const mode = additionalFields.mode ?? ('multiple' as string);
|
||||
|
||||
if (mode === 'independently') {
|
||||
|
|
|
@ -121,7 +121,7 @@ export class CustomerIo implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const period = this.getNodeParameter('period', i) as string;
|
||||
let endpoint = `/campaigns/${campaignId}/metrics`;
|
||||
|
||||
|
@ -168,7 +168,7 @@ export class CustomerIo implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.customProperties) {
|
||||
const data: any = {}; // tslint:disable-line:no-any
|
||||
|
@ -237,7 +237,7 @@ export class CustomerIo implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const data: any = {}; // tslint:disable-line:no-any
|
||||
|
||||
if (additionalFields.customAttributes) {
|
||||
|
@ -286,7 +286,7 @@ export class CustomerIo implements INodeType {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const data: any = {}; // tslint:disable-line:no-any
|
||||
|
||||
if (additionalFields.customAttributes) {
|
||||
|
|
|
@ -379,7 +379,7 @@ export class DateTime implements INodeType {
|
|||
const currentDate = this.getNodeParameter('value', i) as string;
|
||||
const dataPropertyName = this.getNodeParameter('dataPropertyName', i) as string;
|
||||
const toFormat = this.getNodeParameter('toFormat', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
let newDate;
|
||||
|
||||
if (currentDate === undefined) {
|
||||
|
|
|
@ -114,7 +114,7 @@ export class DeepL implements INodeType {
|
|||
try {
|
||||
const resource = this.getNodeParameter('resource', i) as string;
|
||||
const operation = this.getNodeParameter('operation', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (resource === 'language') {
|
||||
if (operation === 'translate') {
|
||||
let body: IDataObject = {};
|
||||
|
|
|
@ -117,7 +117,7 @@ export class Demio implements INodeType {
|
|||
if (resource === 'event') {
|
||||
if (operation === 'get') {
|
||||
const id = this.getNodeParameter('eventId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.date_id !== undefined) {
|
||||
responseData = await demioApiRequest.call(
|
||||
|
@ -131,7 +131,7 @@ export class Demio implements INodeType {
|
|||
}
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
Object.assign(qs, filters);
|
||||
|
@ -147,7 +147,7 @@ export class Demio implements INodeType {
|
|||
const eventId = this.getNodeParameter('eventId', i) as string;
|
||||
const firstName = this.getNodeParameter('firstName', i) as string;
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name: firstName,
|
||||
|
@ -175,7 +175,7 @@ export class Demio implements INodeType {
|
|||
if (resource === 'report') {
|
||||
if (operation === 'get') {
|
||||
const sessionId = this.getNodeParameter('dateId', i) as string;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
Object.assign(qs, filters);
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ export class Dhl implements INodeType {
|
|||
if (resource === 'shipment') {
|
||||
if (operation === 'get') {
|
||||
const trackingNumber = this.getNodeParameter('trackingNumber', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs = {
|
||||
trackingNumber,
|
||||
|
|
|
@ -134,7 +134,7 @@ export class Discord implements INodeType {
|
|||
|
||||
const webhookUri = this.getNodeParameter('webhookUri', i) as string;
|
||||
body.content = this.getNodeParameter('text', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (!body.content && !options.embeds) {
|
||||
throw new NodeOperationError(this.getNode(), 'Either content or embeds must be set.', {
|
||||
|
|
|
@ -154,7 +154,7 @@ export class Discourse implements INodeType {
|
|||
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
|
@ -228,7 +228,7 @@ export class Discourse implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const content = this.getNodeParameter('content', i) as string;
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
title,
|
||||
|
@ -283,7 +283,7 @@ export class Discourse implements INodeType {
|
|||
|
||||
const content = this.getNodeParameter('content', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
raw: content,
|
||||
|
@ -309,7 +309,7 @@ export class Discourse implements INodeType {
|
|||
|
||||
// const simple = this.getNodeParameter('simple', i) as boolean;
|
||||
|
||||
// const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
// const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
// Object.assign(qs, updateFields);
|
||||
|
||||
|
@ -341,7 +341,7 @@ export class Discourse implements INodeType {
|
|||
const email = this.getNodeParameter('email', i) as string;
|
||||
const password = this.getNodeParameter('password', i) as string;
|
||||
const username = this.getNodeParameter('username', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
|
|
|
@ -598,7 +598,7 @@ export class Disqus implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
qs.forum = id;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
|
@ -622,7 +622,7 @@ export class Disqus implements INodeType {
|
|||
endpoint = 'forums/listPosts.json';
|
||||
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
@ -663,7 +663,7 @@ export class Disqus implements INodeType {
|
|||
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
qs.forum = id;
|
||||
|
@ -712,7 +712,7 @@ export class Disqus implements INodeType {
|
|||
qs.forum = id;
|
||||
qs.limit = 100;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ export class Drift implements INodeType {
|
|||
//https://devdocs.drift.com/docs/creating-a-contact
|
||||
if (operation === 'create') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IContact = {
|
||||
email,
|
||||
};
|
||||
|
@ -105,7 +105,7 @@ export class Drift implements INodeType {
|
|||
//https://devdocs.drift.com/docs/updating-a-contact
|
||||
if (operation === 'update') {
|
||||
const contactId = this.getNodeParameter('contactId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IContact = {};
|
||||
if (updateFields.name) {
|
||||
body.name = updateFields.name as string;
|
||||
|
|
|
@ -804,7 +804,7 @@ export class Dropbox implements INodeType {
|
|||
|
||||
returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
property = 'entries';
|
||||
|
||||
|
@ -833,7 +833,7 @@ export class Dropbox implements INodeType {
|
|||
|
||||
simple = this.getNodeParameter('simple', 0) as boolean;
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
property = 'matches';
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ export class Egoi implements INodeType {
|
|||
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: ICreateMemberBody = {
|
||||
base: {
|
||||
|
@ -684,7 +684,7 @@ export class Egoi implements INodeType {
|
|||
const contactId = this.getNodeParameter('contactId', i) as string;
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: ICreateMemberBody = {
|
||||
base: {},
|
||||
extra: [],
|
||||
|
|
|
@ -252,7 +252,7 @@ export class ElasticSecurity implements INodeType {
|
|||
const {
|
||||
syncAlerts, // ignored because already set
|
||||
...rest
|
||||
} = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
} = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(rest).length) {
|
||||
Object.assign(body, rest);
|
||||
|
@ -322,7 +322,7 @@ export class ElasticSecurity implements INodeType {
|
|||
const caseId = this.getNodeParameter('caseId', i);
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (!Object.keys(updateFields).length) {
|
||||
throwOnEmptyUpdate.call(this, resource);
|
||||
|
@ -442,7 +442,7 @@ export class ElasticSecurity implements INodeType {
|
|||
|
||||
const simple = this.getNodeParameter('simple', i) as boolean;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body = {
|
||||
comment: this.getNodeParameter('comment', i),
|
||||
|
|
|
@ -99,7 +99,7 @@ export class Elasticsearch implements INodeType {
|
|||
const documentId = this.getNodeParameter('documentId', i);
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (Object.keys(options).length) {
|
||||
Object.assign(qs, options);
|
||||
|
@ -216,7 +216,7 @@ export class Elasticsearch implements INodeType {
|
|||
}
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(qs, omit(additionalFields, ['documentId']));
|
||||
|
@ -283,7 +283,7 @@ export class Elasticsearch implements INodeType {
|
|||
|
||||
const body = {} as IDataObject;
|
||||
const qs = {} as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
const { aliases, mappings, settings, ...rest } = additionalFields;
|
||||
|
@ -315,7 +315,7 @@ export class Elasticsearch implements INodeType {
|
|||
const indexId = this.getNodeParameter('indexId', i) as string;
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(qs, additionalFields);
|
||||
|
|
|
@ -102,7 +102,7 @@ export class Emelia implements INodeType {
|
|||
email: this.getNodeParameter('contactEmail', i) as string,
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (!isEmpty(additionalFields)) {
|
||||
Object.assign(contact, additionalFields);
|
||||
|
@ -303,7 +303,7 @@ export class Emelia implements INodeType {
|
|||
// campaign: duplicate
|
||||
// ----------------------------------
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const variables = {
|
||||
fromId: this.getNodeParameter('campaignId', i),
|
||||
name: this.getNodeParameter('campaignName', i),
|
||||
|
@ -358,7 +358,7 @@ export class Emelia implements INodeType {
|
|||
email: this.getNodeParameter('contactEmail', i) as string,
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (!isEmpty(additionalFields)) {
|
||||
Object.assign(contact, additionalFields);
|
||||
|
|
|
@ -69,7 +69,7 @@ export class Flow implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: ITask = {
|
||||
organization_id: credentials.organizationId as number,
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ export class Flow implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: ITask = {
|
||||
organization_id: credentials.organizationId as number,
|
||||
};
|
||||
|
@ -198,7 +198,7 @@ export class Flow implements INodeType {
|
|||
//https://developer.getflow.com/api/#tasks_get-task
|
||||
if (operation === 'get') {
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
qs.organization_id = credentials.organizationId as number;
|
||||
if (filters.include) {
|
||||
qs.include = (filters.include as string[]).join(',');
|
||||
|
@ -212,7 +212,7 @@ export class Flow implements INodeType {
|
|||
//https://developer.getflow.com/api/#tasks_get-tasks
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
qs.organization_id = credentials.organizationId as number;
|
||||
if (filters.include) {
|
||||
qs.include = (filters.include as string[]).join(',');
|
||||
|
|
|
@ -1108,7 +1108,7 @@ export class Freshdesk implements INodeType {
|
|||
const status = this.getNodeParameter('status', i) as string;
|
||||
const priority = this.getNodeParameter('priority', i) as string;
|
||||
const source = this.getNodeParameter('source', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
//const jsonActive = this.getNodeParameter('jsonParameters') as boolean;
|
||||
const body: ICreateTicketBody = {
|
||||
// @ts-ignore
|
||||
|
@ -1201,7 +1201,7 @@ export class Freshdesk implements INodeType {
|
|||
//https://developers.freshdesk.com/api/#update_ticket
|
||||
if (operation === 'update') {
|
||||
const ticketId = this.getNodeParameter('ticketId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: ICreateTicketBody = {};
|
||||
|
||||
if (updateFields.requester) {
|
||||
|
@ -1286,7 +1286,7 @@ export class Freshdesk implements INodeType {
|
|||
//https://developers.freshdesk.com/api/#list_all_tickets
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.requesterId) {
|
||||
qs.requester_id = options.requesterId as string;
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ export class Freshservice implements INodeType {
|
|||
|
||||
Object.assign(body, adjustAgentRoles(roles));
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -329,7 +329,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, formatFilters(filters));
|
||||
|
@ -342,7 +342,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -370,7 +370,7 @@ export class Freshservice implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -405,7 +405,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -573,7 +573,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, formatFilters(filters));
|
||||
|
@ -586,7 +586,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -614,7 +614,7 @@ export class Freshservice implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -650,7 +650,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -682,7 +682,7 @@ export class Freshservice implements INodeType {
|
|||
change_type: 1,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -713,7 +713,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, formatFilters(filters));
|
||||
|
@ -726,7 +726,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -789,7 +789,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, formatFilters(filters));
|
||||
|
@ -868,7 +868,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -897,7 +897,7 @@ export class Freshservice implements INodeType {
|
|||
impact: 1,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -932,7 +932,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -957,7 +957,7 @@ export class Freshservice implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -993,7 +993,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
Object.assign(body, updateFields);
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ export class Freshservice implements INodeType {
|
|||
planned_end_date: this.getNodeParameter('plannedEndDate', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -1055,7 +1055,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
Object.assign(body, updateFields);
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, formatFilters(filters));
|
||||
|
@ -1158,7 +1158,7 @@ export class Freshservice implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -1198,7 +1198,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ export class Freshservice implements INodeType {
|
|||
},
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body.application!, additionalFields);
|
||||
|
@ -1260,7 +1260,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = { application: {} } as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
@ -1326,7 +1326,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
let endpoint = '';
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
|
@ -1343,7 +1343,7 @@ export class Freshservice implements INodeType {
|
|||
// ----------------------------------------
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
validateUpdateFields.call(this, updateFields, resource);
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ export class FreshworksCrm implements INodeType {
|
|||
name: this.getNodeParameter('name', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -320,7 +320,7 @@ export class FreshworksCrm implements INodeType {
|
|||
// https://developers.freshworks.com/crm/api/#update_a_account
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, updateFields);
|
||||
|
@ -496,7 +496,7 @@ export class FreshworksCrm implements INodeType {
|
|||
emails: this.getNodeParameter('emails', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, adjustAccounts(additionalFields));
|
||||
|
@ -546,7 +546,7 @@ export class FreshworksCrm implements INodeType {
|
|||
// https://developers.freshworks.com/crm/api/#update_a_contact
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, adjustAccounts(updateFields));
|
||||
|
@ -579,7 +579,7 @@ export class FreshworksCrm implements INodeType {
|
|||
amount: this.getNodeParameter('amount', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, adjustAccounts(additionalFields));
|
||||
|
@ -627,7 +627,7 @@ export class FreshworksCrm implements INodeType {
|
|||
// https://developers.freshworks.com/crm/api/#update_a_deal
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, adjustAccounts(updateFields));
|
||||
|
@ -686,7 +686,7 @@ export class FreshworksCrm implements INodeType {
|
|||
// https://developers.freshworks.com/crm/api/#update_a_note
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (Object.keys(updateFields).length) {
|
||||
Object.assign(body, updateFields);
|
||||
|
@ -731,7 +731,7 @@ export class FreshworksCrm implements INodeType {
|
|||
targetable_id: this.getNodeParameter('targetable_id', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -886,7 +886,7 @@ export class FreshworksCrm implements INodeType {
|
|||
targetable_id: this.getNodeParameter('targetable_id', i),
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -949,7 +949,7 @@ export class FreshworksCrm implements INodeType {
|
|||
// https://developers.freshworks.com/crm/api/#update_a_task
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (!Object.keys(updateFields).length) {
|
||||
throwOnEmptyUpdate.call(this, resource);
|
||||
|
|
|
@ -488,7 +488,7 @@ export class Ftp implements INodeType {
|
|||
|
||||
if (operation === 'delete') {
|
||||
const path = this.getNodeParameter('path', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (options.folder === true) {
|
||||
responseData = await sftp!.rmdir(path, !!options.recursive);
|
||||
|
@ -599,7 +599,7 @@ export class Ftp implements INodeType {
|
|||
|
||||
if (operation === 'delete') {
|
||||
const path = this.getNodeParameter('path', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (options.folder === true) {
|
||||
responseData = await ftp!.rmdir(path, !!options.recursive);
|
||||
|
|
|
@ -146,7 +146,7 @@ export class GetResponse implements INodeType {
|
|||
|
||||
const campaignId = this.getNodeParameter('campaignId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
|
@ -179,7 +179,7 @@ export class GetResponse implements INodeType {
|
|||
if (operation === 'delete') {
|
||||
const contactId = this.getNodeParameter('contactId', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -197,7 +197,7 @@ export class GetResponse implements INodeType {
|
|||
if (operation === 'get') {
|
||||
const contactId = this.getNodeParameter('contactId', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -213,7 +213,7 @@ export class GetResponse implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const timezone = this.getTimezone();
|
||||
|
||||
|
@ -269,7 +269,7 @@ export class GetResponse implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const contactId = this.getNodeParameter('contactId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ export class Ghost implements INodeType {
|
|||
|
||||
const identifier = this.getNodeParameter('identifier', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -156,7 +156,7 @@ export class Ghost implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -187,7 +187,7 @@ export class Ghost implements INodeType {
|
|||
|
||||
const content = this.getNodeParameter('content', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const post: IDataObject = {
|
||||
title,
|
||||
|
@ -243,7 +243,7 @@ export class Ghost implements INodeType {
|
|||
|
||||
const identifier = this.getNodeParameter('identifier', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -261,7 +261,7 @@ export class Ghost implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -286,7 +286,7 @@ export class Ghost implements INodeType {
|
|||
|
||||
const contentFormat = this.getNodeParameter('contentFormat', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const post: IDataObject = {};
|
||||
|
||||
|
|
|
@ -2034,7 +2034,7 @@ export class Github implements INodeType {
|
|||
requestMethod = 'POST';
|
||||
|
||||
const pullRequestNumber = this.getNodeParameter('pullRequestNumber', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
body.event = snakeCase(this.getNodeParameter('event', i) as string).toUpperCase();
|
||||
|
|
|
@ -521,7 +521,7 @@ export class GoToWebinar implements INodeType {
|
|||
times: timesProperties,
|
||||
} as IDataObject;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const endpoint = `organizers/${organizerKey}/webinars`;
|
||||
|
@ -605,7 +605,7 @@ export class GoToWebinar implements INodeType {
|
|||
|
||||
let body = {};
|
||||
|
||||
let updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
let updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (updateFields.times) {
|
||||
const { times } = updateFields as {
|
||||
|
|
|
@ -157,7 +157,7 @@ export class GoogleAnalytics implements INodeType {
|
|||
endpoint = '/v4/reports:batchGet';
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const simple = this.getNodeParameter('simple', i) as boolean;
|
||||
|
||||
const body: IData = {
|
||||
|
@ -250,7 +250,7 @@ export class GoogleAnalytics implements INodeType {
|
|||
const viewId = this.getNodeParameter('viewId', i);
|
||||
const userId = this.getNodeParameter('userId', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
viewId,
|
||||
user: {
|
||||
|
|
|
@ -164,7 +164,7 @@ export class GoogleBigQuery implements INodeType {
|
|||
const body: IDataObject = {};
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
Object.assign(body, options);
|
||||
if (body.traceId === undefined) {
|
||||
body.traceId = uuid();
|
||||
|
@ -232,7 +232,7 @@ export class GoogleBigQuery implements INodeType {
|
|||
|
||||
for (let i = 0; i < length; i++) {
|
||||
try {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
Object.assign(qs, options);
|
||||
|
||||
if (qs.selectedFields) {
|
||||
|
|
|
@ -164,7 +164,7 @@ export class GoogleCalendar implements INodeType {
|
|||
const calendarId = this.getNodeParameter('calendar', i) as string;
|
||||
const timeMin = this.getNodeParameter('timeMin', i) as string;
|
||||
const timeMax = this.getNodeParameter('timeMax', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const outputFormat = options.outputFormat || 'availability';
|
||||
|
||||
const body: IDataObject = {
|
||||
|
@ -208,7 +208,7 @@ export class GoogleCalendar implements INodeType {
|
|||
const start = this.getNodeParameter('start', i) as string;
|
||||
const end = this.getNodeParameter('end', i) as string;
|
||||
const useDefaultReminders = this.getNodeParameter('useDefaultReminders', i) as boolean;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.maxAttendees) {
|
||||
qs.maxAttendees = additionalFields.maxAttendees as number;
|
||||
|
@ -353,7 +353,7 @@ export class GoogleCalendar implements INodeType {
|
|||
if (operation === 'delete') {
|
||||
const calendarId = this.getNodeParameter('calendar', i) as string;
|
||||
const eventId = this.getNodeParameter('eventId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.sendUpdates) {
|
||||
qs.sendUpdates = options.sendUpdates as number;
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ export class GoogleCalendar implements INodeType {
|
|||
if (operation === 'get') {
|
||||
const calendarId = this.getNodeParameter('calendar', i) as string;
|
||||
const eventId = this.getNodeParameter('eventId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.maxAttendees) {
|
||||
qs.maxAttendees = options.maxAttendees as number;
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ export class GoogleCalendar implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const calendarId = this.getNodeParameter('calendar', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.iCalUID) {
|
||||
qs.iCalUID = options.iCalUID as string;
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ export class GoogleCalendar implements INodeType {
|
|||
const calendarId = this.getNodeParameter('calendar', i) as string;
|
||||
const eventId = this.getNodeParameter('eventId', i) as string;
|
||||
const useDefaultReminders = this.getNodeParameter('useDefaultReminders', i) as boolean;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const timezone = updateFields.timezone as string;
|
||||
|
||||
if (updateFields.maxAttendees) {
|
||||
|
|
|
@ -339,7 +339,7 @@ export class GoogleChat implements INodeType {
|
|||
const spaceId = this.getNodeParameter('spaceId', i) as string;
|
||||
|
||||
// get additional fields for threadKey and requestId
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.threadKey) {
|
||||
qs.threadKey = additionalFields.threadKey;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ export class GoogleChat implements INodeType {
|
|||
const uri = this.getNodeParameter('incomingWebhookUrl', i) as string;
|
||||
|
||||
// get additional fields for threadKey
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.threadKey) {
|
||||
qs.threadKey = additionalFields.threadKey;
|
||||
}
|
||||
|
|
|
@ -261,7 +261,7 @@ export class GoogleCloudNaturalLanguage implements INodeType {
|
|||
if (resource === 'document') {
|
||||
if (operation === 'analyzeSentiment') {
|
||||
const source = this.getNodeParameter('source', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const encodingType = (options.encodingType as string | undefined) || 'UTF16';
|
||||
const documentType = (options.documentType as string | undefined) || 'PLAIN_TEXT';
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ export class GoogleContacts implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const familyName = this.getNodeParameter('familyName', i) as string;
|
||||
const givenName = this.getNodeParameter('givenName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
names: [
|
||||
|
@ -329,7 +329,7 @@ export class GoogleContacts implements INodeType {
|
|||
|
||||
const fields = this.getNodeParameter('fields', i) as string[];
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
let etag;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export interface IUpdateBody extends IDataObject {
|
||||
requests: IDataObject[];
|
||||
writeControl?: { [key: string]: string };
|
||||
}
|
||||
|
||||
export interface IUpdateFields {
|
||||
export type IUpdateFields = IDataObject & {
|
||||
writeControlObject: {
|
||||
control: string;
|
||||
value: string;
|
||||
|
|
|
@ -2303,7 +2303,7 @@ export class GoogleDrive implements INodeType {
|
|||
const fileId = this.getNodeParameter('fileId', i, undefined, {
|
||||
extractValue: true,
|
||||
}) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const requestOptions = {
|
||||
resolveWithFullResponse: true,
|
||||
|
@ -2751,7 +2751,7 @@ export class GoogleDrive implements INodeType {
|
|||
|
||||
const permissions = this.getNodeParameter('permissionsUi', i) as IDataObject;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
|
@ -162,7 +162,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -192,7 +192,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const groupId = this.getNodeParameter('groupId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -222,7 +222,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
|
||||
const makeAdmin = this.getNodeParameter('makeAdmin', i) as boolean;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name: {
|
||||
|
@ -285,7 +285,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
|
||||
const projection = this.getNodeParameter('projection', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.projection = projection;
|
||||
|
||||
|
@ -318,7 +318,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
|
||||
const projection = this.getNodeParameter('projection', i) as string;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.projection = projection;
|
||||
|
||||
|
@ -362,7 +362,7 @@ export class GSuiteAdmin implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: {
|
||||
name: { givenName?: string; familyName?: string };
|
||||
|
|
|
@ -276,7 +276,7 @@ export class GmailV1 implements INodeType {
|
|||
if (operation === 'send') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/messages/send
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
let toStr = '';
|
||||
let ccStr = '';
|
||||
|
@ -366,7 +366,7 @@ export class GmailV1 implements INodeType {
|
|||
}
|
||||
if (operation === 'reply') {
|
||||
const id = this.getNodeParameter('messageId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
let toStr = '';
|
||||
let ccStr = '';
|
||||
|
@ -488,7 +488,7 @@ export class GmailV1 implements INodeType {
|
|||
|
||||
const id = this.getNodeParameter('messageId', i);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const format = additionalFields.format || 'resolved';
|
||||
|
||||
if (format === 'resolved') {
|
||||
|
@ -521,7 +521,7 @@ export class GmailV1 implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
if (qs.labelIds) {
|
||||
|
@ -609,7 +609,7 @@ export class GmailV1 implements INodeType {
|
|||
if (operation === 'create') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/drafts/create
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
let toStr = '';
|
||||
let ccStr = '';
|
||||
|
@ -707,7 +707,7 @@ export class GmailV1 implements INodeType {
|
|||
method = 'GET';
|
||||
const id = this.getNodeParameter('messageId', i);
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const format = additionalFields.format || 'resolved';
|
||||
|
||||
if (format === 'resolved') {
|
||||
|
@ -758,7 +758,7 @@ export class GmailV1 implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
if (returnAll) {
|
||||
|
|
|
@ -276,7 +276,7 @@ export class GmailV2 implements INodeType {
|
|||
if (resource === 'message') {
|
||||
if (operation === 'send') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/messages/send
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const sendTo = this.getNodeParameter('sendTo', i) as string;
|
||||
let qs: IDataObject = {};
|
||||
|
||||
|
@ -339,7 +339,7 @@ export class GmailV2 implements INodeType {
|
|||
}
|
||||
if (operation === 'reply') {
|
||||
const messageIdGmail = this.getNodeParameter('messageId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
responseData = await replayToEmail.call(this, items, messageIdGmail, options, i);
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ export class GmailV2 implements INodeType {
|
|||
if (resource === 'draft') {
|
||||
if (operation === 'create') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/drafts/create
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
let qs: IDataObject = {};
|
||||
|
||||
let to = '';
|
||||
|
@ -573,7 +573,7 @@ export class GmailV2 implements INodeType {
|
|||
const endpoint = `/gmail/v1/users/me/drafts/${id}`;
|
||||
const qs: IDataObject = {};
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
qs.format = 'raw';
|
||||
|
||||
responseData = await googleApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
|
@ -606,7 +606,7 @@ export class GmailV2 implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const qs: IDataObject = {};
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
@ -679,7 +679,7 @@ export class GmailV2 implements INodeType {
|
|||
const id = this.getNodeParameter('threadId', i);
|
||||
const endpoint = `/gmail/v1/users/me/threads/${id}`;
|
||||
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const onlyMessages = options.returnOnlyMessages || false;
|
||||
const qs: IDataObject = {};
|
||||
|
||||
|
@ -706,7 +706,7 @@ export class GmailV2 implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
//https://developers.google.com/gmail/api/reference/rest/v1/users.threads/list
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const qs: IDataObject = {};
|
||||
Object.assign(qs, prepareQuery.call(this, filters));
|
||||
|
||||
|
@ -739,7 +739,7 @@ export class GmailV2 implements INodeType {
|
|||
}
|
||||
if (operation === 'reply') {
|
||||
const messageIdGmail = this.getNodeParameter('messageId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
responseData = await replayToEmail.call(this, items, messageIdGmail, options, i);
|
||||
}
|
||||
|
|
|
@ -537,7 +537,7 @@ export class GoogleSlides implements INodeType {
|
|||
// ----------------------------------
|
||||
const presentationId = this.getNodeParameter('presentationId', i) as string;
|
||||
const texts = this.getNodeParameter('textUi.textValues', i, []) as IDataObject[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const requests = texts.map((text) => {
|
||||
return {
|
||||
replaceAllText: {
|
||||
|
|
|
@ -94,7 +94,7 @@ export class GoogleTasks implements INodeType {
|
|||
//https://developers.google.com/tasks/v1/reference/tasks/insert
|
||||
const taskId = this.getNodeParameter('task', i) as string;
|
||||
body.title = this.getNodeParameter('title', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.parent) {
|
||||
qs.parent = additionalFields.parent as string;
|
||||
|
@ -164,7 +164,7 @@ export class GoogleTasks implements INodeType {
|
|||
showDeleted = false,
|
||||
showHidden = false,
|
||||
...options
|
||||
} = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
} = this.getNodeParameter('additionalFields', i);
|
||||
if (options.completedMax) {
|
||||
qs.completedMax = options.completedMax as string;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ export class GoogleTasks implements INodeType {
|
|||
//https://developers.google.com/tasks/v1/reference/tasks/patch
|
||||
const taskListId = this.getNodeParameter('task', i) as string;
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (updateFields.previous) {
|
||||
qs.previous = updateFields.previous as string;
|
||||
|
|
|
@ -225,8 +225,8 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
let part = this.getNodeParameter('part', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (part.includes('*')) {
|
||||
part = [
|
||||
|
@ -276,7 +276,7 @@ export class YouTube implements INodeType {
|
|||
//https://developers.google.com/youtube/v3/docs/channels/update
|
||||
if (operation === 'update') {
|
||||
const channelId = this.getNodeParameter('channelId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
id: channelId,
|
||||
|
@ -452,7 +452,7 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'get') {
|
||||
let part = this.getNodeParameter('part', i) as string[];
|
||||
const playlistId = this.getNodeParameter('playlistId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (part.includes('*')) {
|
||||
part = ['contentDetails', 'id', 'localizations', 'player', 'snippet', 'status'];
|
||||
|
@ -478,8 +478,8 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
let part = this.getNodeParameter('part', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (part.includes('*')) {
|
||||
part = ['contentDetails', 'id', 'localizations', 'player', 'snippet', 'status'];
|
||||
|
@ -519,7 +519,7 @@ export class YouTube implements INodeType {
|
|||
//https://developers.google.com/youtube/v3/docs/playlists/insert
|
||||
if (operation === 'create') {
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.part = 'snippet';
|
||||
|
||||
|
@ -564,7 +564,7 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const playlistId = this.getNodeParameter('playlistId', i) as string;
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
qs.part = 'snippet, status';
|
||||
|
||||
|
@ -611,7 +611,7 @@ export class YouTube implements INodeType {
|
|||
//https://developers.google.com/youtube/v3/docs/playlists/delete
|
||||
if (operation === 'delete') {
|
||||
const playlistId = this.getNodeParameter('playlistId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
id: playlistId,
|
||||
|
@ -636,7 +636,7 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'get') {
|
||||
let part = this.getNodeParameter('part', i) as string[];
|
||||
const playlistItemId = this.getNodeParameter('playlistItemId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (part.includes('*')) {
|
||||
part = ['contentDetails', 'id', 'snippet', 'status'];
|
||||
|
@ -662,9 +662,9 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
let part = this.getNodeParameter('part', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const playlistId = this.getNodeParameter('playlistId', i) as string;
|
||||
//const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
//const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (part.includes('*')) {
|
||||
part = ['contentDetails', 'id', 'snippet', 'status'];
|
||||
|
@ -701,7 +701,7 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'add') {
|
||||
const playlistId = this.getNodeParameter('playlistId', i) as string;
|
||||
const videoId = this.getNodeParameter('videoId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.part = 'snippet, contentDetails';
|
||||
|
||||
|
@ -751,7 +751,7 @@ export class YouTube implements INodeType {
|
|||
//https://developers.google.com/youtube/v3/docs/playlistItems/delete
|
||||
if (operation === 'delete') {
|
||||
const playlistItemId = this.getNodeParameter('playlistItemId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
id: playlistItemId,
|
||||
|
@ -775,8 +775,8 @@ export class YouTube implements INodeType {
|
|||
//https://developers.google.com/youtube/v3/docs/search/list
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
qs.part = 'snippet';
|
||||
|
||||
|
@ -817,7 +817,7 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'get') {
|
||||
let part = this.getNodeParameter('part', i) as string[];
|
||||
const videoId = this.getNodeParameter('videoId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
if (part.includes('*')) {
|
||||
part = [
|
||||
|
@ -848,7 +848,7 @@ export class YouTube implements INodeType {
|
|||
if (operation === 'upload') {
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const categoryId = this.getNodeParameter('categoryId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const binaryProperty = this.getNodeParameter('binaryProperty', i) as string;
|
||||
|
||||
let mimeType;
|
||||
|
@ -969,7 +969,7 @@ export class YouTube implements INodeType {
|
|||
const id = this.getNodeParameter('videoId', i) as string;
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const categoryId = this.getNodeParameter('categoryId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
qs.part = 'snippet, status, recordingDetails';
|
||||
|
||||
|
@ -1038,7 +1038,7 @@ export class YouTube implements INodeType {
|
|||
//https://developers.google.com/youtube/v3/docs/videos/delete?hl=en
|
||||
if (operation === 'delete') {
|
||||
const videoId = this.getNodeParameter('videoId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
id: videoId,
|
||||
|
|
|
@ -171,7 +171,7 @@ export class Gotify implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const message = this.getNodeParameter('message', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
message,
|
||||
|
|
|
@ -149,7 +149,7 @@ export class Grafana implements INodeType {
|
|||
},
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
if (additionalFields.folderId === '') delete additionalFields.folderId;
|
||||
|
@ -191,7 +191,7 @@ export class Grafana implements INodeType {
|
|||
type: 'dash-db',
|
||||
};
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, filters);
|
||||
|
@ -278,7 +278,7 @@ export class Grafana implements INodeType {
|
|||
name: this.getNodeParameter('name', i) as string,
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(body, additionalFields);
|
||||
|
@ -312,7 +312,7 @@ export class Grafana implements INodeType {
|
|||
|
||||
const qs = {} as IDataObject;
|
||||
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, filters);
|
||||
|
@ -334,7 +334,7 @@ export class Grafana implements INodeType {
|
|||
|
||||
// https://grafana.com/docs/grafana/latest/http_api/team/#update-team
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
throwOnEmptyUpdate.call(this, resource, updateFields);
|
||||
|
||||
|
@ -461,7 +461,7 @@ export class Grafana implements INodeType {
|
|||
// https://grafana.com/docs/grafana/latest/http_api/org/#updates-the-given-user
|
||||
|
||||
const body: IDataObject = {};
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
throwOnEmptyUpdate.call(this, resource, updateFields);
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ export class HackerNews implements INodeType {
|
|||
|
||||
if (resource === 'all') {
|
||||
if (operation === 'getAll') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const keyword = additionalFields.keyword as string;
|
||||
const tags = additionalFields.tags as string[];
|
||||
|
||||
|
@ -303,7 +303,7 @@ export class HackerNews implements INodeType {
|
|||
} else if (resource === 'article') {
|
||||
if (operation === 'get') {
|
||||
endpoint = `items/${this.getNodeParameter('articleId', i)}`;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
includeComments = additionalFields.includeComments as boolean;
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
|
|
|
@ -235,7 +235,7 @@ export class HaloPSA implements INodeType {
|
|||
const simplifiedOutput = ['id', 'name', 'notes', 'is_vip', 'website'];
|
||||
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const name = this.getNodeParameter('clientName', i) as string;
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
|
@ -283,7 +283,7 @@ export class HaloPSA implements INodeType {
|
|||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const simplify = this.getNodeParameter('simplify', i) as boolean;
|
||||
const qs: IDataObject = {};
|
||||
|
@ -320,7 +320,7 @@ export class HaloPSA implements INodeType {
|
|||
|
||||
if (operation === 'update') {
|
||||
const clientId = this.getNodeParameter('clientId', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {
|
||||
id: clientId,
|
||||
...updateFields,
|
||||
|
@ -349,7 +349,7 @@ export class HaloPSA implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('siteName', i) as string;
|
||||
const clientId = this.getNodeParameter('clientId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
client_id: clientId,
|
||||
|
@ -391,7 +391,7 @@ export class HaloPSA implements INodeType {
|
|||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const simplify = this.getNodeParameter('simplify', i) as boolean;
|
||||
const qs: IDataObject = {};
|
||||
|
@ -428,7 +428,7 @@ export class HaloPSA implements INodeType {
|
|||
|
||||
if (operation === 'update') {
|
||||
const siteId = this.getNodeParameter('siteId', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {
|
||||
id: siteId,
|
||||
...updateFields,
|
||||
|
@ -458,7 +458,7 @@ export class HaloPSA implements INodeType {
|
|||
const summary = this.getNodeParameter('summary', i) as string;
|
||||
const details = this.getNodeParameter('details', i) as string;
|
||||
const ticketType = this.getNodeParameter('ticketType', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
tickettype_id: ticketType,
|
||||
summary,
|
||||
|
@ -501,7 +501,7 @@ export class HaloPSA implements INodeType {
|
|||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const simplify = this.getNodeParameter('simplify', i) as boolean;
|
||||
const qs: IDataObject = {};
|
||||
|
@ -538,7 +538,7 @@ export class HaloPSA implements INodeType {
|
|||
|
||||
if (operation === 'update') {
|
||||
const ticketId = this.getNodeParameter('ticketId', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {
|
||||
id: ticketId,
|
||||
...updateFields,
|
||||
|
@ -568,7 +568,7 @@ export class HaloPSA implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('userName', i) as string;
|
||||
const siteId = this.getNodeParameter('siteId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
site_id: siteId,
|
||||
|
@ -610,7 +610,7 @@ export class HaloPSA implements INodeType {
|
|||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const simplify = this.getNodeParameter('simplify', i) as boolean;
|
||||
const qs: IDataObject = {};
|
||||
|
@ -647,7 +647,7 @@ export class HaloPSA implements INodeType {
|
|||
|
||||
if (operation === 'update') {
|
||||
const userId = this.getNodeParameter('userId', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject = {
|
||||
id: userId,
|
||||
...updateFields,
|
||||
|
|
|
@ -95,7 +95,7 @@ export async function getAllResource(
|
|||
|
||||
qs.per_page = 100;
|
||||
|
||||
const additionalFields = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
|
|
|
@ -258,7 +258,7 @@ export class Harvest implements INodeType {
|
|||
body.task_id = this.getNodeParameter('taskId', i) as string;
|
||||
body.spent_date = this.getNodeParameter('spentDate', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -286,7 +286,7 @@ export class Harvest implements INodeType {
|
|||
body.task_id = this.getNodeParameter('taskId', i) as string;
|
||||
body.spent_date = this.getNodeParameter('spentDate', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -380,7 +380,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `time_entries/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
Object.assign(body, updateFields);
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -446,7 +446,7 @@ export class Harvest implements INodeType {
|
|||
|
||||
body.name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -472,7 +472,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `clients/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -559,7 +559,7 @@ export class Harvest implements INodeType {
|
|||
body.bill_by = this.getNodeParameter('billBy', i) as string;
|
||||
body.budget_by = this.getNodeParameter('budgetBy', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -585,7 +585,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `projects/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
Object.assign(body, updateFields);
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -687,7 +687,7 @@ export class Harvest implements INodeType {
|
|||
body.last_name = this.getNodeParameter('lastName', i) as string;
|
||||
body.email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -713,7 +713,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `users/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -797,7 +797,7 @@ export class Harvest implements INodeType {
|
|||
body.client_id = this.getNodeParameter('clientId', i) as string;
|
||||
body.first_name = this.getNodeParameter('firstName', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -823,7 +823,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `contacts/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -930,7 +930,7 @@ export class Harvest implements INodeType {
|
|||
|
||||
body.name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -956,7 +956,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `tasks/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -1039,7 +1039,7 @@ export class Harvest implements INodeType {
|
|||
|
||||
body.client_id = this.getNodeParameter('clientId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -1065,7 +1065,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `invoices/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -1150,7 +1150,7 @@ export class Harvest implements INodeType {
|
|||
body.expense_category_id = this.getNodeParameter('expenseCategoryId', i) as string;
|
||||
body.spent_date = this.getNodeParameter('spentDate', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -1176,7 +1176,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `expenses/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -1259,7 +1259,7 @@ export class Harvest implements INodeType {
|
|||
|
||||
body.client_id = this.getNodeParameter('clientId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
@ -1285,7 +1285,7 @@ export class Harvest implements INodeType {
|
|||
const id = this.getNodeParameter('id', i) as string;
|
||||
endpoint = `estimates/${id}`;
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
const responseData = await harvestApiRequest.call(
|
||||
|
|
|
@ -163,7 +163,7 @@ export class HelpScout implements INodeType {
|
|||
const subject = this.getNodeParameter('subject', i) as string;
|
||||
const type = this.getNodeParameter('type', i) as string;
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const threads = (this.getNodeParameter('threadsUi', i) as IDataObject)
|
||||
.threadsValues as IDataObject[];
|
||||
const body: IConversation = {
|
||||
|
@ -247,7 +247,7 @@ export class HelpScout implements INodeType {
|
|||
//https://developer.helpscout.com/mailbox-api/endpoints/conversations/list
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
Object.assign(qs, options);
|
||||
if (returnAll) {
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
|
@ -276,7 +276,7 @@ export class HelpScout implements INodeType {
|
|||
//https://developer.helpscout.com/mailbox-api/endpoints/customers/create
|
||||
if (operation === 'create') {
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const chats = (this.getNodeParameter('chatsUi', i) as IDataObject)
|
||||
.chatsValues as IDataObject[];
|
||||
const address = (this.getNodeParameter('addressUi', i) as IDataObject)
|
||||
|
@ -361,7 +361,7 @@ export class HelpScout implements INodeType {
|
|||
//https://developer.helpscout.com/mailbox-api/endpoints/customers/list
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
Object.assign(qs, options);
|
||||
if (returnAll) {
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
|
@ -388,7 +388,7 @@ export class HelpScout implements INodeType {
|
|||
//https://developer.helpscout.com/mailbox-api/endpoints/customers/overwrite/
|
||||
if (operation === 'update') {
|
||||
const customerId = this.getNodeParameter('customerId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
let body: ICustomer = {};
|
||||
body = Object.assign({}, updateFields);
|
||||
if (body.age) {
|
||||
|
@ -455,7 +455,7 @@ export class HelpScout implements INodeType {
|
|||
const conversationId = this.getNodeParameter('conversationId', i) as string;
|
||||
const _type = this.getNodeParameter('type', i) as string;
|
||||
const text = this.getNodeParameter('text', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const attachments = this.getNodeParameter('attachmentsUi', i) as IDataObject;
|
||||
const body: IThread = {
|
||||
text,
|
||||
|
|
|
@ -326,7 +326,7 @@ export class HomeAssistant implements INodeType {
|
|||
};
|
||||
}
|
||||
} else if (operation === 'getLogbookEntries') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
let endpoint = '/logbook';
|
||||
|
||||
if (Object.entries(additionalFields).length) {
|
||||
|
@ -356,7 +356,7 @@ export class HomeAssistant implements INodeType {
|
|||
} else if (resource === 'history') {
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
let endpoint = '/history/period';
|
||||
|
||||
if (Object.entries(additionalFields).length) {
|
||||
|
|
|
@ -993,7 +993,7 @@ export class Hubspot implements INodeType {
|
|||
if (operation === 'upsert') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
const resolveData = this.getNodeParameter('resolveData', i);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject[] = [];
|
||||
if (additionalFields.annualRevenue) {
|
||||
body.push({
|
||||
|
@ -1320,7 +1320,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/contacts/get_contact
|
||||
if (operation === 'get') {
|
||||
const contactId = this.getNodeParameter('contactId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.formSubmissionMode) {
|
||||
qs.formSubmissionMode = additionalFields.formSubmissionMode as string;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
//https://developers.hubspot.com/docs/methods/contacts/get_contacts
|
||||
if (operation === 'getAll') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
if (additionalFields.formSubmissionMode) {
|
||||
qs.formSubmissionMode = additionalFields.formSubmissionMode as string;
|
||||
|
@ -1372,7 +1372,7 @@ export class Hubspot implements INodeType {
|
|||
if (operation === 'getRecentlyCreatedUpdated') {
|
||||
let endpoint;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
if (filters.formSubmissionMode) {
|
||||
qs.formSubmissionMode = filters.formSubmissionMode as string;
|
||||
}
|
||||
|
@ -1411,7 +1411,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
//https://developers.hubspot.com/docs/api/crm/search
|
||||
if (operation === 'search') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const filtersGroupsUi = this.getNodeParameter('filterGroupsUi', i) as IDataObject;
|
||||
const sortBy = additionalFields.sortBy || 'createdate';
|
||||
|
@ -1469,7 +1469,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/companies/create_company
|
||||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject[] = [];
|
||||
body.push({
|
||||
name: 'name',
|
||||
|
@ -1694,7 +1694,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/companies/update_company
|
||||
if (operation === 'update') {
|
||||
const companyId = this.getNodeParameter('companyId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IDataObject[] = [];
|
||||
if (updateFields.name) {
|
||||
body.push({
|
||||
|
@ -1921,7 +1921,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/companies/get_company
|
||||
if (operation === 'get') {
|
||||
const companyId = this.getNodeParameter('companyId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.includeMergeAudits) {
|
||||
qs.includeMergeAudits = additionalFields.includeMergeAudits as boolean;
|
||||
}
|
||||
|
@ -1930,7 +1930,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
//https://developers.hubspot.com/docs/methods/companies/get-all-companies
|
||||
if (operation === 'getAll') {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
if (options.includeMergeAudits) {
|
||||
qs.includeMergeAudits = options.includeMergeAudits as boolean;
|
||||
|
@ -1964,7 +1964,7 @@ export class Hubspot implements INodeType {
|
|||
if (operation === 'getRecentlyCreated') {
|
||||
endpoint = `/companies/v2/companies/recent/created`;
|
||||
} else {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
if (filters.since) {
|
||||
qs.since = new Date(filters.since as string).getTime();
|
||||
}
|
||||
|
@ -1988,7 +1988,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/companies/search_companies_by_domain
|
||||
if (operation === 'searchByDomain') {
|
||||
const domain = this.getNodeParameter('domain', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const body: IDataObject = {
|
||||
requestOptions: {},
|
||||
|
@ -2024,7 +2024,7 @@ export class Hubspot implements INodeType {
|
|||
const body: IDeal = {};
|
||||
body.properties = [];
|
||||
const association: IAssociation = {};
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const stage = this.getNodeParameter('stage', i) as string;
|
||||
if (stage) {
|
||||
body.properties.push({
|
||||
|
@ -2093,7 +2093,7 @@ export class Hubspot implements INodeType {
|
|||
if (operation === 'update') {
|
||||
const body: IDeal = {};
|
||||
body.properties = [];
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const dealId = this.getNodeParameter('dealId', i) as string;
|
||||
if (updateFields.stage) {
|
||||
body.properties.push({
|
||||
|
@ -2154,7 +2154,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const dealId = this.getNodeParameter('dealId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.includePropertyVersions) {
|
||||
qs.includePropertyVersions = additionalFields.includePropertyVersions as boolean;
|
||||
}
|
||||
|
@ -2162,7 +2162,7 @@ export class Hubspot implements INodeType {
|
|||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint);
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
if (filters.includeAssociations) {
|
||||
qs.includeAssociations = filters.includeAssociations as boolean;
|
||||
|
@ -2197,7 +2197,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
if (operation === 'getRecentlyCreated' || operation === 'getRecentlyModified') {
|
||||
let endpoint;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
if (filters.since) {
|
||||
qs.since = new Date(filters.since as string).getTime();
|
||||
|
@ -2232,7 +2232,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
//https://developers.hubspot.com/docs/api/crm/search
|
||||
if (operation === 'search') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const filtersGroupsUi = this.getNodeParameter('filterGroupsUi', i) as IDataObject;
|
||||
const sortBy = additionalFields.sortBy || 'createdate';
|
||||
|
@ -2385,7 +2385,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/forms/submit_form_v3
|
||||
if (operation === 'submit') {
|
||||
const formId = this.getNodeParameter('formId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const context = (this.getNodeParameter('contextUi', i) as IDataObject)
|
||||
.contextValue as IDataObject;
|
||||
const legalConsent = (this.getNodeParameter('lengalConsentUi', i) as IDataObject)
|
||||
|
@ -2444,7 +2444,7 @@ export class Hubspot implements INodeType {
|
|||
if (resource === 'ticket') {
|
||||
//https://developers.hubspot.com/docs/methods/tickets/create-ticket
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const pipelineId = this.getNodeParameter('pipelineId', i) as string;
|
||||
const stageId = this.getNodeParameter('stageId', i) as string;
|
||||
const ticketName = this.getNodeParameter('ticketName', i) as string;
|
||||
|
@ -2555,7 +2555,7 @@ export class Hubspot implements INodeType {
|
|||
//https://developers.hubspot.com/docs/methods/tickets/get_ticket_by_id
|
||||
if (operation === 'get') {
|
||||
const ticketId = this.getNodeParameter('ticketId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.properties) {
|
||||
qs.properties = additionalFields.properties as string[];
|
||||
}
|
||||
|
@ -2572,7 +2572,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
//https://developers.hubspot.com/docs/methods/tickets/get-all-tickets
|
||||
if (operation === 'getAll') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
if (additionalFields.properties) {
|
||||
qs.properties = additionalFields.properties as string[];
|
||||
|
@ -2614,7 +2614,7 @@ export class Hubspot implements INodeType {
|
|||
}
|
||||
//https://developers.hubspot.com/docs/methods/tickets/update-ticket
|
||||
if (operation === 'update') {
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const ticketId = this.getNodeParameter('ticketId', i) as string;
|
||||
const body: IDataObject[] = [];
|
||||
if (updateFields.pipelineId) {
|
||||
|
|
|
@ -127,7 +127,7 @@ export class HumanticAi implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.userid = userId;
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ export class Hunter implements INodeType {
|
|||
//https://hunter.io/api-documentation/v2#domain-search
|
||||
if (operation === 'domainSearch') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
const domain = this.getNodeParameter('domain', i) as string;
|
||||
const onlyEmails = this.getNodeParameter('onlyEmails', i, false) as boolean;
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ export class ICalendar implements INodeType {
|
|||
let end = this.getNodeParameter('end', i) as string;
|
||||
end = allDay ? (moment(end).utc().add(1, 'day').format() as string) : end;
|
||||
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
let fileName = 'event.ics';
|
||||
|
||||
const eventStart = moment(start)
|
||||
|
|
|
@ -113,7 +113,7 @@ export class Intercom implements INodeType {
|
|||
//https://developers.intercom.com/intercom-api-reference/reference#leads
|
||||
if (resource === 'lead') {
|
||||
if (operation === 'create' || operation === 'update') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
const body: ILead = {};
|
||||
if (operation === 'create') {
|
||||
|
@ -230,7 +230,7 @@ export class Intercom implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
Object.assign(qs, filters);
|
||||
|
||||
try {
|
||||
|
@ -270,7 +270,7 @@ export class Intercom implements INodeType {
|
|||
//https://developers.intercom.com/intercom-api-reference/reference#users
|
||||
if (resource === 'user') {
|
||||
if (operation === 'create' || operation === 'update') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
const body: IUser = {};
|
||||
|
||||
|
@ -405,7 +405,7 @@ export class Intercom implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
Object.assign(qs, filters);
|
||||
|
||||
try {
|
||||
|
@ -444,7 +444,7 @@ export class Intercom implements INodeType {
|
|||
if (resource === 'company') {
|
||||
if (operation === 'create' || operation === 'update') {
|
||||
const id = this.getNodeParameter('companyId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', i);
|
||||
const body: ICompany = {
|
||||
company_id: id,
|
||||
|
@ -529,7 +529,7 @@ export class Intercom implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
Object.assign(qs, filters);
|
||||
|
||||
try {
|
||||
|
|
|
@ -276,7 +276,7 @@ export class InvoiceNinja implements INodeType {
|
|||
try {
|
||||
if (resource === 'client') {
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IClient = {};
|
||||
if (additionalFields.clientName) {
|
||||
body.name = additionalFields.clientName as string;
|
||||
|
@ -349,7 +349,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const clientId = this.getNodeParameter('clientId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (resource === 'invoice') {
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IInvoice = {};
|
||||
if (additionalFields.email) {
|
||||
body.email = additionalFields.email as string;
|
||||
|
@ -507,7 +507,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const invoiceId = this.getNodeParameter('invoiceId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (resource === 'task') {
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: ITask = {};
|
||||
if (additionalFields.client) {
|
||||
body.client_id = additionalFields.client as number;
|
||||
|
@ -603,7 +603,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -645,7 +645,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (resource === 'payment') {
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const invoice = this.getNodeParameter('invoice', i) as number;
|
||||
const client = (
|
||||
await invoiceNinjaApiRequest.call(this, 'GET', `/invoices/${invoice}`, {}, qs)
|
||||
|
@ -675,7 +675,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const paymentId = this.getNodeParameter('paymentId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -690,7 +690,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (resource === 'expense') {
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IExpense = {};
|
||||
if (additionalFields.amount) {
|
||||
body.amount = additionalFields.amount as number;
|
||||
|
@ -823,7 +823,7 @@ export class InvoiceNinja implements INodeType {
|
|||
if (resource === 'quote') {
|
||||
const resourceEndpoint = apiVersion === 'v4' ? '/invoices' : '/quotes';
|
||||
if (operation === 'create') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IQuote = {
|
||||
is_quote: true,
|
||||
};
|
||||
|
@ -937,7 +937,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'get') {
|
||||
const quoteId = this.getNodeParameter('quoteId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
@ -952,7 +952,7 @@ export class InvoiceNinja implements INodeType {
|
|||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.include) {
|
||||
qs.include = options.include as string;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ export class Iterable implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (!additionalFields.email && !additionalFields.id) {
|
||||
throw new NodeOperationError(
|
||||
|
@ -155,7 +155,7 @@ export class Iterable implements INodeType {
|
|||
|
||||
const value = this.getNodeParameter('value', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -293,7 +293,7 @@ export class Iterable implements INodeType {
|
|||
|
||||
const identifier = this.getNodeParameter('identifier', 0) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0);
|
||||
|
||||
const body: IDataObject = {
|
||||
listId: parseInt(listId, 10),
|
||||
|
|
|
@ -457,7 +457,7 @@ export class Jira implements INodeType {
|
|||
const summary = this.getNodeParameter('summary', i) as string;
|
||||
const projectId = this.getNodeParameter('project', i) as string;
|
||||
const issueTypeId = this.getNodeParameter('issueType', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IIssue = {};
|
||||
const fields: IFields = {
|
||||
summary,
|
||||
|
@ -560,7 +560,7 @@ export class Jira implements INodeType {
|
|||
if (operation === 'update') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IIssue = {};
|
||||
const fields: IFields = {};
|
||||
if (updateFields.summary) {
|
||||
|
@ -674,7 +674,7 @@ export class Jira implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const simplifyOutput = this.getNodeParameter('simplifyOutput', i) as boolean;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.fields) {
|
||||
qs.fields = additionalFields.fields as string;
|
||||
}
|
||||
|
@ -735,7 +735,7 @@ export class Jira implements INodeType {
|
|||
if (operation === 'getAll') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const body: IDataObject = {};
|
||||
if (options.fields) {
|
||||
body.fields = (options.fields as string).split(',') as string[];
|
||||
|
@ -814,7 +814,7 @@ export class Jira implements INodeType {
|
|||
if (operation === 'notify') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const jsonActive = this.getNodeParameter('jsonParameters', 0) as boolean;
|
||||
const body: INotify = {};
|
||||
if (additionalFields.textBody) {
|
||||
|
@ -920,7 +920,7 @@ export class Jira implements INodeType {
|
|||
if (operation === 'transitions') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
if (additionalFields.transitionId) {
|
||||
qs.transitionId = additionalFields.transitionId as string;
|
||||
}
|
||||
|
@ -1155,7 +1155,7 @@ export class Jira implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
const jsonParameters = this.getNodeParameter('jsonParameters', 0) as boolean;
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const body: IDataObject = {};
|
||||
if (options.expand) {
|
||||
qs.expand = options.expand as string;
|
||||
|
@ -1219,7 +1219,7 @@ export class Jira implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const commentId = this.getNodeParameter('commentId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
Object.assign(qs, options);
|
||||
responseData = await jiraSoftwareCloudApiRequest.call(
|
||||
this,
|
||||
|
@ -1242,7 +1242,7 @@ export class Jira implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const body: IDataObject = {};
|
||||
Object.assign(qs, options);
|
||||
if (returnAll) {
|
||||
|
@ -1301,7 +1301,7 @@ export class Jira implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
const issueKey = this.getNodeParameter('issueKey', i) as string;
|
||||
const commentId = this.getNodeParameter('commentId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const jsonParameters = this.getNodeParameter('jsonParameters', 0) as boolean;
|
||||
const body: IDataObject = {};
|
||||
if (options.expand) {
|
||||
|
@ -1373,7 +1373,7 @@ export class Jira implements INodeType {
|
|||
displayName: this.getNodeParameter('displayName', i),
|
||||
};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ export class Keap implements INodeType {
|
|||
const phones = (this.getNodeParameter('phonesUi', i) as IDataObject)
|
||||
.phonesValues as IDataObject[];
|
||||
const companyName = this.getNodeParameter('companyName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: ICompany = {
|
||||
company_name: companyName,
|
||||
};
|
||||
|
@ -282,7 +282,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Company/listCompaniesUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
keysToSnakeCase(options);
|
||||
Object.assign(qs, options);
|
||||
if (qs.fields) {
|
||||
|
@ -319,7 +319,7 @@ export class Keap implements INodeType {
|
|||
.socialAccountsValues as IDataObject[];
|
||||
const phones = (this.getNodeParameter('phonesUi', i) as IDataObject)
|
||||
.phonesValues as IDataObject[];
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IContact = {
|
||||
duplicate_option: pascalCase(duplicateOption),
|
||||
};
|
||||
|
@ -407,7 +407,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Contact/getContactUsingGET
|
||||
if (operation === 'get') {
|
||||
const contactId = parseInt(this.getNodeParameter('contactId', i) as string, 10);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.fields) {
|
||||
qs.optional_properties = options.fields as string;
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Contact/listContactsUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
if (options.email) {
|
||||
qs.email = options.email as boolean;
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ export class Keap implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const userId = this.getNodeParameter('userId', i) as number;
|
||||
const contactId = parseInt(this.getNodeParameter('contactId', i) as string, 10);
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: INote = {
|
||||
user_id: userId,
|
||||
contact_id: contactId,
|
||||
|
@ -485,7 +485,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Note/listNotesUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
keysToSnakeCase(filters);
|
||||
Object.assign(qs, filters);
|
||||
if (returnAll) {
|
||||
|
@ -506,7 +506,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Note/updatePropertiesOnNoteUsingPATCH
|
||||
if (operation === 'update') {
|
||||
const noteId = this.getNodeParameter('noteId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: INote = {};
|
||||
keysToSnakeCase(additionalFields);
|
||||
if (additionalFields.type) {
|
||||
|
@ -582,7 +582,7 @@ export class Keap implements INodeType {
|
|||
.orderItemsValues as IDataObject[];
|
||||
const shippingAddress = (this.getNodeParameter('addressUi', i) as IDataObject)
|
||||
.addressValues as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IEcommerceOrder = {
|
||||
contact_id: contactId,
|
||||
order_date: orderDate,
|
||||
|
@ -616,7 +616,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/E-Commerce/listOrdersUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
keysToSnakeCase(options);
|
||||
Object.assign(qs, options);
|
||||
if (returnAll) {
|
||||
|
@ -639,7 +639,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Product/createProductUsingPOST
|
||||
if (operation === 'create') {
|
||||
const productName = this.getNodeParameter('productName', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IEcommerceProduct = {
|
||||
product_name: productName,
|
||||
};
|
||||
|
@ -661,7 +661,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Product/listProductsUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
keysToSnakeCase(filters);
|
||||
Object.assign(qs, filters);
|
||||
if (returnAll) {
|
||||
|
@ -685,7 +685,7 @@ export class Keap implements INodeType {
|
|||
if (operation === 'createRecord') {
|
||||
const sentFromAddress = this.getNodeParameter('sentFromAddress', i) as string;
|
||||
const sendToAddress = this.getNodeParameter('sentToAddress', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IDataObject = {
|
||||
sent_to_address: sendToAddress,
|
||||
sent_from_address: sentFromAddress,
|
||||
|
@ -703,7 +703,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/Email/listEmailsUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
keysToSnakeCase(filters);
|
||||
Object.assign(qs, filters);
|
||||
if (returnAll) {
|
||||
|
@ -728,7 +728,7 @@ export class Keap implements INodeType {
|
|||
(this.getNodeParameter('contactIds', i) as string).split(',') as string[]
|
||||
).map((e) => parseInt(e, 10));
|
||||
const subject = this.getNodeParameter('subject', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IEmail = {
|
||||
user_id: userId,
|
||||
contacts: contactIds,
|
||||
|
@ -788,7 +788,7 @@ export class Keap implements INodeType {
|
|||
//https://developer.infusionsoft.com/docs/rest/#!/File/listFilesUsingGET
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
keysToSnakeCase(filters);
|
||||
Object.assign(qs, filters);
|
||||
if (qs.permission) {
|
||||
|
|
|
@ -252,7 +252,7 @@ export class Kitemaker implements INodeType {
|
|||
);
|
||||
}
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (Object.keys(additionalFields).length) {
|
||||
Object.assign(input, additionalFields);
|
||||
|
@ -299,7 +299,7 @@ export class Kitemaker implements INodeType {
|
|||
id: this.getNodeParameter('workItemId', i),
|
||||
};
|
||||
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (!Object.keys(updateFields).length) {
|
||||
throw new NodeOperationError(
|
||||
|
|
|
@ -114,7 +114,7 @@ export class KoBoToolbox implements INodeType {
|
|||
};
|
||||
};
|
||||
};
|
||||
const formFilterOptions = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const formFilterOptions = this.getNodeParameter('filters', i);
|
||||
|
||||
responseData = await koBoToolboxApiRequest.call(this, {
|
||||
url: '/api/v2/assets/',
|
||||
|
@ -142,7 +142,7 @@ export class KoBoToolbox implements INodeType {
|
|||
// Submissions: getAll
|
||||
// ----------------------------------
|
||||
|
||||
const submissionQueryOptions = this.getNodeParameter('options', i) as IDataObject;
|
||||
const submissionQueryOptions = this.getNodeParameter('options', i);
|
||||
const filterJson = this.getNodeParameter('filterJson', i, null) as string;
|
||||
|
||||
responseData = await koBoToolboxApiRequest.call(this, {
|
||||
|
@ -183,7 +183,7 @@ export class KoBoToolbox implements INodeType {
|
|||
// Submissions: get
|
||||
// ----------------------------------
|
||||
const submissionId = this.getNodeParameter('submissionId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
responseData = [
|
||||
await koBoToolboxApiRequest.call(this, {
|
||||
|
|
|
@ -173,7 +173,7 @@ export class Lemlist implements INodeType {
|
|||
// https://developer.lemlist.com/#add-a-lead-in-a-campaign
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.deduplicate !== undefined) {
|
||||
qs.deduplicate = additionalFields.deduplicate;
|
||||
|
|
|
@ -72,7 +72,7 @@ export class Line implements INodeType {
|
|||
if (operation === 'send') {
|
||||
const message = this.getNodeParameter('message', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
message,
|
||||
|
|
|
@ -167,7 +167,7 @@ export class Linear implements INodeType {
|
|||
if (operation === 'create') {
|
||||
const teamId = this.getNodeParameter('teamId', i) as string;
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: IGraphqlBody = {
|
||||
query: query.createIssue(),
|
||||
variables: {
|
||||
|
@ -223,7 +223,7 @@ export class Linear implements INodeType {
|
|||
}
|
||||
if (operation === 'update') {
|
||||
const issueId = this.getNodeParameter('issueId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: IGraphqlBody = {
|
||||
query: query.updateIssue(),
|
||||
variables: {
|
||||
|
|
|
@ -157,7 +157,7 @@ export class LingvaNex implements INodeType {
|
|||
if (operation === 'translate') {
|
||||
const text = this.getNodeParameter('text', i) as string;
|
||||
const translateTo = this.getNodeParameter('translateTo', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
data: text,
|
||||
|
|
|
@ -84,7 +84,7 @@ export class LinkedIn implements INodeType {
|
|||
const text = this.getNodeParameter('text', i) as string;
|
||||
const shareMediaCategory = this.getNodeParameter('shareMediaCategory', i) as string;
|
||||
const postAs = this.getNodeParameter('postAs', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
let authorUrn = '';
|
||||
let visibility = 'PUBLIC';
|
||||
|
@ -189,7 +189,7 @@ export class LinkedIn implements INodeType {
|
|||
},
|
||||
};
|
||||
} else if (shareMediaCategory === 'ARTICLE') {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.description) {
|
||||
description = additionalFields.description as string;
|
||||
|
|
|
@ -242,7 +242,7 @@ export class Mqtt implements INodeType {
|
|||
for (let i = 0; i < length; i++) {
|
||||
let message;
|
||||
const topic = this.getNodeParameter('topic', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
try {
|
||||
if (sendInputData === true) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue