mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
tslint changes
This commit is contained in:
parent
e764748aa1
commit
bc6acaff72
|
@ -196,9 +196,11 @@ export class ActiveCampaign implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
dataKey = 'contact';
|
dataKey = 'contact';
|
||||||
|
|
||||||
body.contact = {
|
body.contact = {
|
||||||
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) as IDataObject;
|
||||||
addAdditionalFields(body.contact as IDataObject, additionalFields);
|
addAdditionalFields(body.contact as IDataObject, additionalFields);
|
||||||
|
|
||||||
|
@ -269,22 +271,22 @@ export class ActiveCampaign implements INodeType {
|
||||||
title: this.getNodeParameter('title', i) as string,
|
title: this.getNodeParameter('title', i) as string,
|
||||||
contact: this.getNodeParameter('contact', i) as string,
|
contact: this.getNodeParameter('contact', i) as string,
|
||||||
value: this.getNodeParameter('value', i) as number,
|
value: this.getNodeParameter('value', i) as number,
|
||||||
currency: this.getNodeParameter('currency', i) as string
|
currency: this.getNodeParameter('currency', i) as string,
|
||||||
} as IDataObject;
|
} as IDataObject;
|
||||||
|
|
||||||
const group = this.getNodeParameter('group', i) as string
|
const group = this.getNodeParameter('group', i) as string;
|
||||||
if (group !== '') {
|
if (group !== '') {
|
||||||
addAdditionalFields(body.deal as IDataObject, { group })
|
addAdditionalFields(body.deal as IDataObject, { group });
|
||||||
}
|
}
|
||||||
|
|
||||||
const owner = this.getNodeParameter('owner', i) as string
|
const owner = this.getNodeParameter('owner', i) as string;
|
||||||
if (owner !== '') {
|
if (owner !== '') {
|
||||||
addAdditionalFields(body.deal as IDataObject, { owner })
|
addAdditionalFields(body.deal as IDataObject, { owner });
|
||||||
}
|
}
|
||||||
|
|
||||||
const stage = this.getNodeParameter('stage', i) as string
|
const stage = this.getNodeParameter('stage', i) as string;
|
||||||
if (stage !== '') {
|
if (stage !== '') {
|
||||||
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) as IDataObject;
|
||||||
|
@ -343,11 +345,11 @@ export class ActiveCampaign implements INodeType {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// deal:createNote
|
// deal:createNote
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
requestMethod = 'POST'
|
requestMethod = 'POST';
|
||||||
|
|
||||||
body.note = {
|
body.note = {
|
||||||
note: this.getNodeParameter('dealNote', i) as string,
|
note: this.getNodeParameter('dealNote', i) as string,
|
||||||
} as IDataObject
|
} as IDataObject;
|
||||||
|
|
||||||
const dealId = this.getNodeParameter('dealId', i) as number;
|
const dealId = this.getNodeParameter('dealId', i) as number;
|
||||||
endpoint = `/api/3/deals/${dealId}/notes`;
|
endpoint = `/api/3/deals/${dealId}/notes`;
|
||||||
|
@ -356,11 +358,11 @@ export class ActiveCampaign implements INodeType {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// deal:updateNote
|
// deal:updateNote
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
requestMethod = 'PUT'
|
requestMethod = 'PUT';
|
||||||
|
|
||||||
body.note = {
|
body.note = {
|
||||||
note: this.getNodeParameter('dealNote', i) as string,
|
note: this.getNodeParameter('dealNote', i) as string,
|
||||||
} as IDataObject
|
} as IDataObject;
|
||||||
|
|
||||||
const dealId = this.getNodeParameter('dealId', i) as number;
|
const dealId = this.getNodeParameter('dealId', i) as number;
|
||||||
const dealNoteId = this.getNodeParameter('dealNoteId', i) as number;
|
const dealNoteId = this.getNodeParameter('dealNoteId', i) as number;
|
||||||
|
@ -480,7 +482,7 @@ export class ActiveCampaign implements INodeType {
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
if (additionalFields.acceptsMarketing !== undefined) {
|
if (additionalFields.acceptsMarketing !== undefined) {
|
||||||
if (additionalFields.acceptsMarketing == true) {
|
if (additionalFields.acceptsMarketing === true) {
|
||||||
additionalFields.acceptsMarketing = '1';
|
additionalFields.acceptsMarketing = '1';
|
||||||
} else {
|
} else {
|
||||||
additionalFields.acceptsMarketing = '0';
|
additionalFields.acceptsMarketing = '0';
|
||||||
|
@ -501,8 +503,8 @@ 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) as IDataObject;
|
||||||
if (updateFields.acceptsMarketing != undefined) {
|
if (updateFields.acceptsMarketing !== undefined) {
|
||||||
if (updateFields.acceptsMarketing == true) {
|
if (updateFields.acceptsMarketing === true) {
|
||||||
updateFields.acceptsMarketing = '1';
|
updateFields.acceptsMarketing = '1';
|
||||||
} else {
|
} else {
|
||||||
updateFields.acceptsMarketing = '0';
|
updateFields.acceptsMarketing = '0';
|
||||||
|
@ -587,9 +589,6 @@ export class ActiveCampaign implements INodeType {
|
||||||
throw new Error(`The operation "${operation}" is not known`);
|
throw new Error(`The operation "${operation}" is not known`);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(endpoint);
|
|
||||||
console.log(body)
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`The resource "${resource}" is not known!`);
|
throw new Error(`The resource "${resource}" is not known!`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue