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