mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Introduce overload for number-type node parameter (no-changelog) (#4644)
* 📘 Set up overloads * 📘 Add temporary assertion * 🔥 Remove inferrable number assertions * ✏️ Add ticket ref
This commit is contained in:
@@ -388,7 +388,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
Object.assign(qs, additionalFields);
|
||||
@@ -472,7 +472,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -641,7 +641,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -697,7 +697,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -804,7 +804,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -903,7 +903,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -1003,7 +1003,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -1092,7 +1092,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
@@ -1138,7 +1138,7 @@ export class ActiveCampaign implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i, true) as boolean;
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
|
||||
@@ -165,7 +165,7 @@ export class Affinity implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
responseData = await affinityApiRequest.call(this, 'GET', `/lists`, {}, qs);
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export class Affinity implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.page_size = this.getNodeParameter('limit', i) as number;
|
||||
qs.page_size = this.getNodeParameter('limit', i);
|
||||
responseData = await affinityApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -308,7 +308,7 @@ export class Affinity implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.page_size = this.getNodeParameter('limit', i) as number;
|
||||
qs.page_size = this.getNodeParameter('limit', i);
|
||||
responseData = await affinityApiRequest.call(this, 'GET', '/persons', {}, qs);
|
||||
responseData = responseData.persons;
|
||||
}
|
||||
@@ -396,7 +396,7 @@ export class Affinity implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.page_size = this.getNodeParameter('limit', i) as number;
|
||||
qs.page_size = this.getNodeParameter('limit', i);
|
||||
responseData = await affinityApiRequest.call(this, 'GET', '/organizations', {}, qs);
|
||||
responseData = responseData.organizations;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ export class AgileCrm implements INodeType {
|
||||
true,
|
||||
);
|
||||
} else {
|
||||
body.page_size = this.getNodeParameter('limit', 0) as number;
|
||||
body.page_size = this.getNodeParameter('limit', 0);
|
||||
responseData = await agileCrmApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
@@ -519,7 +519,7 @@ export class AgileCrm implements INodeType {
|
||||
page_size: limit,
|
||||
});
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await agileCrmApiRequest.call(this, 'GET', endpoint, undefined, {
|
||||
page_size: limit,
|
||||
});
|
||||
|
||||
@@ -648,7 +648,7 @@ export class Airtable implements INodeType {
|
||||
if (returnAll === true) {
|
||||
responseData = await apiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
|
||||
} else {
|
||||
qs.maxRecords = this.getNodeParameter('limit', 0) as number;
|
||||
qs.maxRecords = this.getNodeParameter('limit', 0);
|
||||
responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);
|
||||
}
|
||||
|
||||
|
||||
@@ -1978,7 +1978,7 @@ export class Asana implements INodeType {
|
||||
responseData = responseData.data;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as boolean;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -2067,7 +2067,7 @@ export class Asana implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as boolean;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
|
||||
|
||||
@@ -2365,7 +2365,7 @@ export class Asana implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as boolean;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
|
||||
|
||||
@@ -2410,10 +2410,9 @@ export class Asana implements INodeType {
|
||||
}
|
||||
|
||||
returnData.push(
|
||||
...this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
{ itemData: { item: i } },
|
||||
),
|
||||
...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), {
|
||||
itemData: { item: i },
|
||||
}),
|
||||
);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
|
||||
@@ -216,7 +216,7 @@ export class Automizy implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await automizyApiRequest.call(
|
||||
this,
|
||||
@@ -324,7 +324,7 @@ export class Automizy implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await automizyApiRequest.call(this, 'GET', `/smart-lists`, {}, qs);
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ export class Autopilot implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
responseData = await autopilotApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -256,7 +256,7 @@ export class Autopilot implements INodeType {
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
responseData = await autopilotApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -287,7 +287,7 @@ export class Autopilot implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
responseData = await autopilotApiRequest.call(this, 'GET', '/lists');
|
||||
|
||||
|
||||
@@ -107,11 +107,12 @@ export class AwsCertificateManager implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
|
||||
const body: { Includes: IDataObject; CertificateStatuses: string[]; MaxItems: number } = {
|
||||
CertificateStatuses: [],
|
||||
Includes: {},
|
||||
MaxItems: 0,
|
||||
};
|
||||
const body: { Includes: IDataObject; CertificateStatuses: string[]; MaxItems: number } =
|
||||
{
|
||||
CertificateStatuses: [],
|
||||
Includes: {},
|
||||
MaxItems: 0,
|
||||
};
|
||||
|
||||
if (options.certificateStatuses) {
|
||||
body.CertificateStatuses = options.certificateStatuses as string[];
|
||||
@@ -144,7 +145,7 @@ export class AwsCertificateManager implements INodeType {
|
||||
},
|
||||
);
|
||||
} else {
|
||||
body.MaxItems = this.getNodeParameter('limit', 0) as number;
|
||||
body.MaxItems = this.getNodeParameter('limit', 0);
|
||||
responseData = await awsApiRequestREST.call(
|
||||
this,
|
||||
`acm`,
|
||||
|
||||
@@ -383,7 +383,7 @@ export class AwsDynamoDB implements INodeType {
|
||||
headers,
|
||||
);
|
||||
} else {
|
||||
body.Limit = this.getNodeParameter('limit', 0, 1) as number;
|
||||
body.Limit = this.getNodeParameter('limit', 0, 1);
|
||||
responseData = await awsApiRequest.call(this, 'dynamodb', 'POST', '/', body, headers);
|
||||
if (select !== 'COUNT') {
|
||||
responseData = responseData.Items;
|
||||
|
||||
@@ -266,7 +266,7 @@ export class AwsElb implements INodeType {
|
||||
'/?Action=DescribeListenerCertificates&' + params.join('&'),
|
||||
);
|
||||
} else {
|
||||
params.push(('PageSize=' + this.getNodeParameter('limit', 0)) as string);
|
||||
params.push('PageSize=' + this.getNodeParameter('limit', 0));
|
||||
|
||||
responseData = await awsApiRequestSOAP.call(
|
||||
this,
|
||||
@@ -406,7 +406,7 @@ export class AwsElb implements INodeType {
|
||||
'/?Action=DescribeLoadBalancers&' + params.join('&'),
|
||||
);
|
||||
} else {
|
||||
params.push(('PageSize=' + this.getNodeParameter('limit', 0)) as string);
|
||||
params.push('PageSize=' + this.getNodeParameter('limit', 0));
|
||||
|
||||
responseData = await awsApiRequestSOAP.call(
|
||||
this,
|
||||
|
||||
@@ -182,7 +182,7 @@ export class AwsS3 implements INodeType {
|
||||
'',
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await awsApiRequestSOAPAllItems.call(
|
||||
this,
|
||||
'ListAllMyBucketsResult.Buckets.Bucket',
|
||||
@@ -249,7 +249,7 @@ export class AwsS3 implements INodeType {
|
||||
region,
|
||||
);
|
||||
} else {
|
||||
qs['max-keys'] = this.getNodeParameter('limit', 0) as number;
|
||||
qs['max-keys'] = this.getNodeParameter('limit', 0);
|
||||
responseData = await awsApiRequestSOAP.call(
|
||||
this,
|
||||
`${bucketName}.s3`,
|
||||
@@ -424,7 +424,7 @@ export class AwsS3 implements INodeType {
|
||||
region,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await awsApiRequestSOAPAllItems.call(
|
||||
this,
|
||||
'ListBucketResult.Contents',
|
||||
@@ -691,7 +691,7 @@ export class AwsS3 implements INodeType {
|
||||
region,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await awsApiRequestSOAPAllItems.call(
|
||||
this,
|
||||
'ListBucketResult.Contents',
|
||||
|
||||
@@ -920,7 +920,7 @@ export class AwsSes implements INodeType {
|
||||
'/?Action=ListCustomVerificationEmailTemplates',
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await awsApiRequestSOAP.call(
|
||||
this,
|
||||
@@ -1248,7 +1248,7 @@ export class AwsSes implements INodeType {
|
||||
'/?Action=ListTemplates',
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await awsApiRequestSOAP.call(
|
||||
this,
|
||||
|
||||
@@ -514,7 +514,7 @@ export class AwsTranscribe implements INodeType {
|
||||
{ 'x-amz-target': action, 'Content-Type': 'application/x-amz-json-1.1' },
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
body['MaxResults'] = limit;
|
||||
responseData = await awsApiRequestREST.call(
|
||||
this,
|
||||
|
||||
@@ -14,7 +14,7 @@ export async function getAll(
|
||||
|
||||
//limit parameters
|
||||
const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
const limit = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
//response
|
||||
const responseData = await apiRequest.call(this, requestMethod, endpoint, body);
|
||||
|
||||
@@ -17,7 +17,7 @@ export async function getAll(
|
||||
//limit parameters
|
||||
const simplifyOutput: boolean = this.getNodeParameter('simplifyOutput', index) as boolean;
|
||||
const returnAll: boolean = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
const limit: number = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit: number = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
//endpoint
|
||||
const endpoint = `employees/${id}/files/view/`;
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function getAll(
|
||||
//limit parameters
|
||||
const simplifyOutput: boolean = this.getNodeParameter('simplifyOutput', index) as boolean;
|
||||
const returnAll: boolean = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
const limit: number = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit: number = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
//response
|
||||
const responseData = await apiRequest.call(this, requestMethod, endpoint, body);
|
||||
|
||||
@@ -63,7 +63,7 @@ export async function baserowApiRequestAllItems(
|
||||
qs.size = 100;
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
const limit = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
do {
|
||||
responseData = await baserowApiRequest.call(this, method, endpoint, body, qs, jwtToken);
|
||||
|
||||
@@ -331,7 +331,7 @@ export class Beeminder implements INodeType {
|
||||
Object.assign(data, options);
|
||||
|
||||
if (returnAll === false) {
|
||||
data.count = this.getNodeParameter('limit', 0) as number;
|
||||
data.count = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
|
||||
results = await getAllDatapoints.call(this, data);
|
||||
|
||||
@@ -103,7 +103,7 @@ export async function handleGetAll(
|
||||
if (returnAll) {
|
||||
return responseData.data;
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
return responseData.data.slice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export class Box implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await boxApiRequest.call(this, 'GET', `/search`, {}, qs);
|
||||
responseData = responseData.entries;
|
||||
}
|
||||
@@ -449,7 +449,7 @@ export class Box implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await boxApiRequest.call(this, 'GET', `/search`, {}, qs);
|
||||
responseData = responseData.entries;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ export class Bubble implements INodeType {
|
||||
if (returnAll === true) {
|
||||
responseData = await bubbleApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await bubbleApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.response.results;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export class CircleCi implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await circleciApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
|
||||
@@ -270,7 +270,7 @@ export class CiscoWebex implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.max = this.getNodeParameter('limit', i) as number;
|
||||
qs.max = this.getNodeParameter('limit', i);
|
||||
responseData = await webexApiRequest.call(this, 'GET', '/messages', {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -429,7 +429,7 @@ export class CiscoWebex implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.max = this.getNodeParameter('limit', i) as number;
|
||||
qs.max = this.getNodeParameter('limit', i);
|
||||
responseData = await webexApiRequest.call(this, 'GET', '/meetings', {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -554,7 +554,7 @@ export class CiscoWebex implements INodeType {
|
||||
// responseData = await webexApiRequestAllItems.call(this, 'items', 'GET', '/meetingTranscripts', {}, qs);
|
||||
// returnData.push(...responseData);
|
||||
// } else {
|
||||
// qs.max = this.getNodeParameter('limit', i) as number;
|
||||
// qs.max = this.getNodeParameter('limit', i);
|
||||
// responseData = await webexApiRequest.call(this, 'GET', '/meetingTranscripts', {}, qs);
|
||||
// returnData.push(...responseData.items);
|
||||
// }
|
||||
|
||||
@@ -561,7 +561,7 @@ export class ClickUp implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const resource = this.getNodeParameter('commentsOn', i) as string;
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -618,7 +618,7 @@ export class ClickUp implements INodeType {
|
||||
if (filters.archived) {
|
||||
qs.archived = filters.archived as boolean;
|
||||
}
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -679,7 +679,7 @@ export class ClickUp implements INodeType {
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const teamId = this.getNodeParameter('team', i) as string;
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -1087,7 +1087,7 @@ export class ClickUp implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequestAllItems.call(
|
||||
this,
|
||||
'tasks',
|
||||
@@ -1112,7 +1112,7 @@ export class ClickUp implements INodeType {
|
||||
);
|
||||
responseData = responseData.members;
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -1298,7 +1298,7 @@ export class ClickUp implements INodeType {
|
||||
responseData = responseData.data;
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -1420,7 +1420,7 @@ export class ClickUp implements INodeType {
|
||||
responseData = responseData.data;
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -1477,7 +1477,7 @@ export class ClickUp implements INodeType {
|
||||
responseData = await clickupApiRequest.call(this, 'GET', `/space/${spaceId}/tag`);
|
||||
responseData = responseData.tags;
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -1555,7 +1555,7 @@ export class ClickUp implements INodeType {
|
||||
);
|
||||
responseData = responseData.members;
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -1594,7 +1594,7 @@ export class ClickUp implements INodeType {
|
||||
endpoint = `/folder/${folderId}/list`;
|
||||
}
|
||||
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await clickupApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.lists;
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
|
||||
@@ -337,7 +337,7 @@ export class Clockify implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await clockifyApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -427,7 +427,7 @@ export class Clockify implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await clockifyApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -521,7 +521,7 @@ export class Clockify implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await clockifyApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -638,7 +638,7 @@ export class Clockify implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['page-size'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['page-size'] = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await clockifyApiRequest.call(
|
||||
this,
|
||||
@@ -809,7 +809,7 @@ export class Clockify implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await clockifyApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -829,7 +829,7 @@ export class Clockify implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
responseData = await clockifyApiRequest.call(this, 'GET', '/workspaces', {}, qs);
|
||||
if (!returnAll) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ export class Cloudflare implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
Object.assign(qs, { per_page: limit });
|
||||
responseData = await cloudflareApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -121,7 +121,7 @@ export class Cockpit implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
options.limit = this.getNodeParameter('limit', i) as number;
|
||||
options.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
responseData = await getAllCollectionEntries.call(this, collectionName, options);
|
||||
|
||||
@@ -392,7 +392,7 @@ export class Coda implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ export class Coda implements INodeType {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -572,7 +572,7 @@ export class Coda implements INodeType {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -634,7 +634,7 @@ export class Coda implements INodeType {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -684,7 +684,7 @@ export class Coda implements INodeType {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -738,7 +738,7 @@ export class Coda implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -828,7 +828,7 @@ export class Coda implements INodeType {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export class CoinGecko implements INodeType {
|
||||
responseData = await coinGeckoApiRequest.call(this, 'GET', '/coins/list', {}, qs);
|
||||
|
||||
if (returnAll === false) {
|
||||
limit = this.getNodeParameter('limit', i) as number;
|
||||
limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ export class CoinGecko implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
qs.per_page = limit;
|
||||
|
||||
@@ -292,7 +292,7 @@ export class CoinGecko implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await coinGeckoApiRequest.call(
|
||||
this,
|
||||
@@ -425,7 +425,7 @@ export class CoinGecko implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
qs.per_page = limit;
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ export class Contentful implements INodeType {
|
||||
responseData = assets;
|
||||
}
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
qs.limit = limit;
|
||||
responseData = await contentfulApiRequest.call(
|
||||
this,
|
||||
@@ -300,7 +300,7 @@ export class Contentful implements INodeType {
|
||||
responseData = assets;
|
||||
}
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.limit = limit;
|
||||
responseData = await contentfulApiRequest.call(
|
||||
this,
|
||||
@@ -340,7 +340,7 @@ export class Contentful implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
qs.limit = limit;
|
||||
responseData = await contentfulApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -194,7 +194,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.custom_fields;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.forms;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
@@ -288,7 +288,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.subscriptions;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.courses;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.subscriptions;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
@@ -399,7 +399,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.tags;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
@@ -458,7 +458,7 @@ export class ConvertKit implements INodeType {
|
||||
responseData = responseData.subscriptions;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ export async function handleListing(
|
||||
return await copperApiRequestAllItems.call(this, method, endpoint, body, qs, uri, option);
|
||||
}
|
||||
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await copperApiRequestAllItems.call(this, method, endpoint, body, qs, uri, option);
|
||||
return responseData.slice(0, limit);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ export class Demio implements INodeType {
|
||||
responseData = await demioApiRequest.call(this, 'GET', `/events`, {}, qs);
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export class Discourse implements INodeType {
|
||||
responseData = responseData.category_list.categories;
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ export class Discourse implements INodeType {
|
||||
responseData = responseData.groups;
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,7 @@ export class Discourse implements INodeType {
|
||||
//https://docs.discourse.org/#tag/Posts/paths/~1posts.json/get
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const limit = this.getNodeParameter('limit', i, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', i, 0);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/posts.json`, {}, qs);
|
||||
responseData = responseData.latest_posts;
|
||||
@@ -382,7 +382,7 @@ export class Discourse implements INodeType {
|
||||
);
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ export class Disqus implements INodeType {
|
||||
endpoint,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as string;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.limit = limit;
|
||||
responseData = await disqusApiRequest.call(this, requestMethod, qs, endpoint);
|
||||
}
|
||||
@@ -680,7 +680,7 @@ export class Disqus implements INodeType {
|
||||
endpoint,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as string;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.limit = limit;
|
||||
responseData = (await disqusApiRequest.call(
|
||||
this,
|
||||
@@ -726,7 +726,7 @@ export class Disqus implements INodeType {
|
||||
endpoint,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as string;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.limit = limit;
|
||||
responseData = await disqusApiRequest.call(this, requestMethod, qs, endpoint);
|
||||
}
|
||||
|
||||
@@ -815,7 +815,7 @@ export class Dropbox implements INodeType {
|
||||
};
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
body.limit = limit;
|
||||
}
|
||||
|
||||
@@ -852,7 +852,7 @@ export class Dropbox implements INodeType {
|
||||
Object.assign(body.options!, filters);
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
Object.assign(body.options!, { max_results: limit });
|
||||
}
|
||||
|
||||
@@ -942,7 +942,7 @@ export class Dropbox implements INodeType {
|
||||
const newItem: INodeExecutionData = {
|
||||
json: items[i].json,
|
||||
binary: {},
|
||||
pairedItem: {item: i},
|
||||
pairedItem: { item: i },
|
||||
};
|
||||
|
||||
if (items[i].binary !== undefined) {
|
||||
@@ -1000,9 +1000,9 @@ export class Dropbox implements INodeType {
|
||||
} else if (resource === 'search' && operation === 'query') {
|
||||
let data = responseData;
|
||||
if (returnAll === true) {
|
||||
data = (simple === true) ? simplify(responseData) : responseData;
|
||||
data = simple === true ? simplify(responseData) : responseData;
|
||||
} else {
|
||||
data = (simple === true) ? simplify(responseData[property]) : responseData[property];
|
||||
data = simple === true ? simplify(responseData[property]) : responseData[property];
|
||||
}
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
@@ -1023,7 +1023,7 @@ export class Dropbox implements INodeType {
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
items[i].json = { error: error.message };
|
||||
} else {
|
||||
returnData.push({json: { error: error.message }});
|
||||
returnData.push({ json: { error: error.message } });
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ export class ERPNext implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.limit_page_length = limit;
|
||||
qs.limit_start = 0;
|
||||
responseData = await erpNextApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
|
||||
@@ -661,7 +661,7 @@ export class Egoi implements INodeType {
|
||||
{},
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await egoiApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -99,7 +99,7 @@ export async function handleListing(
|
||||
body,
|
||||
qs,
|
||||
);
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
|
||||
return responseData.slice(0, limit);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ export class Elasticsearch implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ export class Emelia implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
campaigns = campaigns.slice(0, limit);
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ export class Emelia implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
contactLists = contactLists.slice(0, limit);
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ export class Flow implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await flowApiRequest.call(this, 'GET', '/tasks', {}, qs);
|
||||
responseData = responseData.tasks;
|
||||
}
|
||||
|
||||
@@ -1319,7 +1319,7 @@ export class Freshdesk implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', i) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', i);
|
||||
responseData = await freshdeskApiRequest.call(this, 'GET', '/tickets', {}, qs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export async function handleListing(
|
||||
}
|
||||
|
||||
const responseData = await freshserviceApiRequestAllItems.call(this, method, endpoint, body, qs);
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
|
||||
return responseData.slice(0, limit);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ export class GetResponse implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.perPage = this.getNodeParameter('limit', i) as number;
|
||||
qs.perPage = this.getNodeParameter('limit', i);
|
||||
responseData = await getresponseApiRequest.call(this, 'GET', `/contacts`, {}, qs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ export class Git implements INodeType {
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', itemIndex, false) as boolean;
|
||||
if (returnAll === false) {
|
||||
logOptions.maxCount = this.getNodeParameter('limit', itemIndex, 100) as number;
|
||||
logOptions.maxCount = this.getNodeParameter('limit', itemIndex, 100);
|
||||
}
|
||||
if (options.file) {
|
||||
logOptions.file = options.file as string;
|
||||
|
||||
@@ -1934,7 +1934,7 @@ export class Github implements INodeType {
|
||||
returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
}
|
||||
if (operation === 'update') {
|
||||
@@ -1997,7 +1997,7 @@ export class Github implements INodeType {
|
||||
returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
}
|
||||
} else if (resource === 'review') {
|
||||
@@ -2023,7 +2023,7 @@ export class Github implements INodeType {
|
||||
const pullRequestNumber = this.getNodeParameter('pullRequestNumber', i) as string;
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
|
||||
endpoint = `/repos/${owner}/${repository}/pulls/${pullRequestNumber}/reviews`;
|
||||
@@ -2069,7 +2069,7 @@ export class Github implements INodeType {
|
||||
returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
} else if (operation === 'invite') {
|
||||
// ----------------------------------
|
||||
@@ -2093,7 +2093,7 @@ export class Github implements INodeType {
|
||||
returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1178,7 +1178,7 @@ export class Gitlab implements INodeType {
|
||||
returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
|
||||
endpoint = `/projects/${id}/releases`;
|
||||
|
||||
@@ -126,7 +126,7 @@ export async function handleGetAll(
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (!returnAll) {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
|
||||
return await goToWebinarApiRequestAllItems.call(this, 'GET', endpoint, qs, body, resource);
|
||||
|
||||
@@ -446,7 +446,7 @@ export class GoToWebinar implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (!returnAll) {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
|
||||
const { webinarKey, times } = this.getNodeParameter('additionalFields', i) as {
|
||||
@@ -566,7 +566,7 @@ export class GoToWebinar implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (!returnAll) {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
}
|
||||
|
||||
const { times } = this.getNodeParameter('additionalFields', i) as {
|
||||
|
||||
@@ -270,7 +270,7 @@ export class GoogleAnalytics implements INodeType {
|
||||
body,
|
||||
);
|
||||
} else {
|
||||
body.pageSize = this.getNodeParameter('limit', 0) as number;
|
||||
body.pageSize = this.getNodeParameter('limit', 0);
|
||||
responseData = await googleApiRequest.call(this, method, endpoint, body);
|
||||
responseData = responseData.sessions;
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ export class GoogleBigQuery implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
|
||||
@@ -368,7 +368,7 @@ export class GoogleBooks implements INodeType {
|
||||
{},
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -413,7 +413,7 @@ export class GoogleBooks implements INodeType {
|
||||
{},
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items || [];
|
||||
}
|
||||
@@ -464,7 +464,7 @@ export class GoogleBooks implements INodeType {
|
||||
{},
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items || [];
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ export class GoogleCalendar implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
|
||||
@@ -277,7 +277,7 @@ export class GoogleChat implements INodeType {
|
||||
`/v1/spaces`,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.pageSize = limit;
|
||||
|
||||
responseData = await googleApiRequest.call(this, 'GET', `/v1/spaces`, undefined, qs);
|
||||
@@ -315,7 +315,7 @@ export class GoogleChat implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.pageSize = limit;
|
||||
|
||||
responseData = await googleApiRequest.call(
|
||||
|
||||
@@ -304,7 +304,7 @@ export class GoogleContacts implements INodeType {
|
||||
responseData = responseData.map((result: IDataObject) => result.person);
|
||||
}
|
||||
} else {
|
||||
qs.pageSize = this.getNodeParameter('limit', i) as number;
|
||||
qs.pageSize = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(this, 'GET', `/people${endpoint}`, {}, qs);
|
||||
|
||||
responseData =
|
||||
|
||||
@@ -2216,7 +2216,7 @@ export class GoogleDrive implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.pageSize = this.getNodeParameter('limit', i) as number;
|
||||
qs.pageSize = this.getNodeParameter('limit', i);
|
||||
const data = await googleApiRequest.call(this, 'GET', `/drive/v3/drives`, {}, qs);
|
||||
response = data.drives as IDataObject[];
|
||||
}
|
||||
@@ -2477,7 +2477,7 @@ export class GoogleDrive implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
const pageSize = this.getNodeParameter('limit', i) as number;
|
||||
const pageSize = this.getNodeParameter('limit', i);
|
||||
|
||||
const qs = {
|
||||
pageSize,
|
||||
|
||||
@@ -192,7 +192,7 @@ export class GoogleFirebaseCloudFirestore implements INodeType {
|
||||
`/${projectId}/databases/${database}/documents/${collection}`,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as string;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
const getAllResponse = (await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -386,7 +386,7 @@ export class GoogleFirebaseCloudFirestore implements INodeType {
|
||||
// @ts-ignore
|
||||
responseData = getAllResponse.map((o) => ({ name: o }));
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as string;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
const getAllResponse = (await googleApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
|
||||
@@ -180,7 +180,7 @@ export class GSuiteAdmin implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await googleApiRequest.call(this, 'GET', `/directory/v1/groups`, {}, qs);
|
||||
|
||||
@@ -350,7 +350,7 @@ export class GSuiteAdmin implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await googleApiRequest.call(this, 'GET', `/directory/v1/users`, {}, qs);
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IBinaryKeyData,
|
||||
@@ -23,29 +21,15 @@ import {
|
||||
parseRawEmail,
|
||||
} from '../GenericFunctions';
|
||||
|
||||
import {
|
||||
messageFields,
|
||||
messageOperations,
|
||||
} from './MessageDescription';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
|
||||
import {
|
||||
messageLabelFields,
|
||||
messageLabelOperations,
|
||||
} from './MessageLabelDescription';
|
||||
import { messageLabelFields, messageLabelOperations } from './MessageLabelDescription';
|
||||
|
||||
import {
|
||||
labelFields,
|
||||
labelOperations,
|
||||
} from './LabelDescription';
|
||||
import { labelFields, labelOperations } from './LabelDescription';
|
||||
|
||||
import {
|
||||
draftFields,
|
||||
draftOperations,
|
||||
} from './DraftDescription';
|
||||
import { draftFields, draftOperations } from './DraftDescription';
|
||||
|
||||
import {
|
||||
isEmpty,
|
||||
} from 'lodash';
|
||||
import { isEmpty } from 'lodash';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Gmail',
|
||||
@@ -66,9 +50,7 @@ const versionDescription: INodeTypeDescription = {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'serviceAccount',
|
||||
],
|
||||
authentication: ['serviceAccount'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -77,9 +59,7 @@ const versionDescription: INodeTypeDescription = {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'oAuth2',
|
||||
],
|
||||
authentication: ['oAuth2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -165,9 +145,7 @@ export class GmailV1 implements INodeType {
|
||||
loadOptions: {
|
||||
// Get all the labels to display them to user so that he can
|
||||
// select them easily
|
||||
async getLabels(
|
||||
this: ILoadOptionsFunctions,
|
||||
): Promise<INodePropertyOptions[]> {
|
||||
async getLabels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const labels = await googleApiRequestAllItems.call(
|
||||
this,
|
||||
@@ -182,8 +160,12 @@ export class GmailV1 implements INodeType {
|
||||
});
|
||||
}
|
||||
return returnData.sort((a, b) => {
|
||||
if (a.name < b.name) { return -1; }
|
||||
if (a.name > b.name) { return 1; }
|
||||
if (a.name < b.name) {
|
||||
return -1;
|
||||
}
|
||||
if (a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
},
|
||||
@@ -209,7 +191,10 @@ export class GmailV1 implements INodeType {
|
||||
//https://developers.google.com/gmail/api/v1/reference/users/labels/create
|
||||
const labelName = this.getNodeParameter('name', i) as string;
|
||||
const labelListVisibility = this.getNodeParameter('labelListVisibility', i) as string;
|
||||
const messageListVisibility = this.getNodeParameter('messageListVisibility', i) as string;
|
||||
const messageListVisibility = this.getNodeParameter(
|
||||
'messageListVisibility',
|
||||
i,
|
||||
) as string;
|
||||
|
||||
method = 'POST';
|
||||
endpoint = '/gmail/v1/users/me/labels';
|
||||
@@ -230,7 +215,6 @@ export class GmailV1 implements INodeType {
|
||||
endpoint = `/gmail/v1/users/me/labels/${labelId}`;
|
||||
responseData = await googleApiRequest.call(this, method, endpoint, body, qs);
|
||||
responseData = { success: true };
|
||||
|
||||
}
|
||||
if (operation === 'get') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/labels/get
|
||||
@@ -255,7 +239,7 @@ export class GmailV1 implements INodeType {
|
||||
responseData = responseData.labels;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -325,15 +309,20 @@ export class GmailV1 implements INodeType {
|
||||
const attachmentsUi = additionalFields.attachmentsUi as IDataObject;
|
||||
const attachmentsBinary = [];
|
||||
if (!isEmpty(attachmentsUi)) {
|
||||
if (attachmentsUi.hasOwnProperty('attachmentsBinary')
|
||||
&& !isEmpty(attachmentsUi.attachmentsBinary)
|
||||
&& items[i].binary) {
|
||||
if (
|
||||
attachmentsUi.hasOwnProperty('attachmentsBinary') &&
|
||||
!isEmpty(attachmentsUi.attachmentsBinary) &&
|
||||
items[i].binary
|
||||
) {
|
||||
// @ts-ignore
|
||||
for (const { property } of attachmentsUi.attachmentsBinary as IDataObject[]) {
|
||||
for (const binaryProperty of (property as string).split(',')) {
|
||||
if (items[i].binary![binaryProperty] !== undefined) {
|
||||
const binaryData = items[i].binary![binaryProperty];
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(
|
||||
i,
|
||||
binaryProperty,
|
||||
);
|
||||
attachmentsBinary.push({
|
||||
name: binaryData.fileName || 'unknown',
|
||||
content: binaryDataBuffer,
|
||||
@@ -353,7 +342,7 @@ export class GmailV1 implements INodeType {
|
||||
}
|
||||
|
||||
const email: IEmail = {
|
||||
from: additionalFields.senderName as string || '',
|
||||
from: (additionalFields.senderName as string) || '',
|
||||
to: toStr,
|
||||
cc: ccStr,
|
||||
bcc: bccStr,
|
||||
@@ -362,7 +351,7 @@ export class GmailV1 implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean === true) {
|
||||
if ((this.getNodeParameter('includeHtml', i, false) as boolean) === true) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
@@ -376,7 +365,6 @@ export class GmailV1 implements INodeType {
|
||||
responseData = await googleApiRequest.call(this, method, endpoint, body, qs);
|
||||
}
|
||||
if (operation === 'reply') {
|
||||
|
||||
const id = this.getNodeParameter('messageId', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
|
||||
@@ -411,15 +399,20 @@ export class GmailV1 implements INodeType {
|
||||
const attachmentsUi = additionalFields.attachmentsUi as IDataObject;
|
||||
const attachmentsBinary = [];
|
||||
if (!isEmpty(attachmentsUi)) {
|
||||
if (attachmentsUi.hasOwnProperty('attachmentsBinary')
|
||||
&& !isEmpty(attachmentsUi.attachmentsBinary)
|
||||
&& items[i].binary) {
|
||||
if (
|
||||
attachmentsUi.hasOwnProperty('attachmentsBinary') &&
|
||||
!isEmpty(attachmentsUi.attachmentsBinary) &&
|
||||
items[i].binary
|
||||
) {
|
||||
// @ts-ignore
|
||||
for (const { property } of attachmentsUi.attachmentsBinary as IDataObject[]) {
|
||||
for (const binaryProperty of (property as string).split(',')) {
|
||||
if (items[i].binary![binaryProperty] !== undefined) {
|
||||
const binaryData = items[i].binary![binaryProperty];
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(
|
||||
i,
|
||||
binaryProperty,
|
||||
);
|
||||
attachmentsBinary.push({
|
||||
name: binaryData.fileName || 'unknown',
|
||||
content: binaryDataBuffer,
|
||||
@@ -453,11 +446,17 @@ export class GmailV1 implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
const subject = payload.headers.filter((data: { [key: string]: string }) => data.name === 'Subject')[0]?.value || '';
|
||||
const references = payload.headers.filter((data: { [key: string]: string }) => data.name === 'References')[0]?.value || '';
|
||||
const subject =
|
||||
payload.headers.filter(
|
||||
(data: { [key: string]: string }) => data.name === 'Subject',
|
||||
)[0]?.value || '';
|
||||
const references =
|
||||
payload.headers.filter(
|
||||
(data: { [key: string]: string }) => data.name === 'References',
|
||||
)[0]?.value || '';
|
||||
|
||||
const email: IEmail = {
|
||||
from: additionalFields.senderName as string || '',
|
||||
from: (additionalFields.senderName as string) || '',
|
||||
to: toStr,
|
||||
cc: ccStr,
|
||||
bcc: bccStr,
|
||||
@@ -466,7 +465,7 @@ export class GmailV1 implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean === true) {
|
||||
if ((this.getNodeParameter('includeHtml', i, false) as boolean) === true) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
@@ -504,9 +503,14 @@ export class GmailV1 implements INodeType {
|
||||
|
||||
let nodeExecutionData: INodeExecutionData;
|
||||
if (format === 'resolved') {
|
||||
const dataPropertyNameDownload = additionalFields.dataPropertyAttachmentsPrefixName as string || 'attachment_';
|
||||
const dataPropertyNameDownload =
|
||||
(additionalFields.dataPropertyAttachmentsPrefixName as string) || 'attachment_';
|
||||
|
||||
nodeExecutionData = await parseRawEmail.call(this, responseData, dataPropertyNameDownload);
|
||||
nodeExecutionData = await parseRawEmail.call(
|
||||
this,
|
||||
responseData,
|
||||
dataPropertyNameDownload,
|
||||
);
|
||||
} else {
|
||||
nodeExecutionData = {
|
||||
json: responseData,
|
||||
@@ -539,7 +543,7 @@ export class GmailV1 implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -557,7 +561,6 @@ export class GmailV1 implements INodeType {
|
||||
const format = additionalFields.format || 'resolved';
|
||||
|
||||
if (format !== 'ids') {
|
||||
|
||||
if (format === 'resolved') {
|
||||
qs.format = 'raw';
|
||||
} else {
|
||||
@@ -574,9 +577,14 @@ export class GmailV1 implements INodeType {
|
||||
);
|
||||
|
||||
if (format === 'resolved') {
|
||||
const dataPropertyNameDownload = additionalFields.dataPropertyAttachmentsPrefixName as string || 'attachment_';
|
||||
const dataPropertyNameDownload =
|
||||
(additionalFields.dataPropertyAttachmentsPrefixName as string) || 'attachment_';
|
||||
|
||||
responseData[i] = await parseRawEmail.call(this, responseData[i], dataPropertyNameDownload);
|
||||
responseData[i] = await parseRawEmail.call(
|
||||
this,
|
||||
responseData[i],
|
||||
dataPropertyNameDownload,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -584,7 +592,6 @@ export class GmailV1 implements INodeType {
|
||||
if (format !== 'resolved') {
|
||||
responseData = this.helpers.returnJsonArray(responseData);
|
||||
}
|
||||
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/messages/delete
|
||||
@@ -638,14 +645,19 @@ export class GmailV1 implements INodeType {
|
||||
const attachmentsBinary = [];
|
||||
if (!isEmpty(attachmentsUi)) {
|
||||
if (!isEmpty(attachmentsUi)) {
|
||||
if (attachmentsUi.hasOwnProperty('attachmentsBinary')
|
||||
&& !isEmpty(attachmentsUi.attachmentsBinary)
|
||||
&& items[i].binary) {
|
||||
if (
|
||||
attachmentsUi.hasOwnProperty('attachmentsBinary') &&
|
||||
!isEmpty(attachmentsUi.attachmentsBinary) &&
|
||||
items[i].binary
|
||||
) {
|
||||
for (const { property } of attachmentsUi.attachmentsBinary as IDataObject[]) {
|
||||
for (const binaryProperty of (property as string).split(',')) {
|
||||
if (items[i].binary![binaryProperty] !== undefined) {
|
||||
const binaryData = items[i].binary![binaryProperty];
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(
|
||||
i,
|
||||
binaryProperty,
|
||||
);
|
||||
attachmentsBinary.push({
|
||||
name: binaryData.fileName || 'unknown',
|
||||
content: binaryDataBuffer,
|
||||
@@ -675,7 +687,7 @@ export class GmailV1 implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean === true) {
|
||||
if ((this.getNodeParameter('includeHtml', i, false) as boolean) === true) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
@@ -712,9 +724,14 @@ export class GmailV1 implements INodeType {
|
||||
|
||||
let nodeExecutionData: INodeExecutionData;
|
||||
if (format === 'resolved') {
|
||||
const dataPropertyNameDownload = additionalFields.dataPropertyAttachmentsPrefixName as string || 'attachment_';
|
||||
const dataPropertyNameDownload =
|
||||
(additionalFields.dataPropertyAttachmentsPrefixName as string) || 'attachment_';
|
||||
|
||||
nodeExecutionData = await parseRawEmail.call(this, responseData.message, dataPropertyNameDownload);
|
||||
nodeExecutionData = await parseRawEmail.call(
|
||||
this,
|
||||
responseData.message,
|
||||
dataPropertyNameDownload,
|
||||
);
|
||||
|
||||
// Add the draft-id
|
||||
nodeExecutionData.json.messageId = nodeExecutionData.json.id;
|
||||
@@ -754,7 +771,7 @@ export class GmailV1 implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -779,7 +796,6 @@ export class GmailV1 implements INodeType {
|
||||
}
|
||||
|
||||
for (let i = 0; i < responseData.length; i++) {
|
||||
|
||||
responseData[i] = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -789,9 +805,14 @@ export class GmailV1 implements INodeType {
|
||||
);
|
||||
|
||||
if (format === 'resolved') {
|
||||
const dataPropertyNameDownload = additionalFields.dataPropertyAttachmentsPrefixName as string || 'attachment_';
|
||||
const dataPropertyNameDownload =
|
||||
(additionalFields.dataPropertyAttachmentsPrefixName as string) || 'attachment_';
|
||||
const id = responseData[i].id;
|
||||
responseData[i] = await parseRawEmail.call(this, responseData[i].message, dataPropertyNameDownload);
|
||||
responseData[i] = await parseRawEmail.call(
|
||||
this,
|
||||
responseData[i].message,
|
||||
dataPropertyNameDownload,
|
||||
);
|
||||
|
||||
// Add the draft-id
|
||||
responseData[i].json.messageId = responseData[i].json.id;
|
||||
|
||||
@@ -265,7 +265,7 @@ export class GmailV2 implements INodeType {
|
||||
responseData = this.helpers.returnJsonArray(responseData.labels);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -395,7 +395,7 @@ export class GmailV2 implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -620,7 +620,7 @@ export class GmailV2 implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -720,7 +720,7 @@ export class GmailV2 implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
|
||||
@@ -521,7 +521,7 @@ export class GoogleSlides implements INodeType {
|
||||
);
|
||||
responseData = responseData.slides;
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ export class GoogleTasks implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
|
||||
@@ -262,7 +262,7 @@ export class YouTube implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -505,7 +505,7 @@ export class YouTube implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -686,7 +686,7 @@ export class YouTube implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -808,7 +808,7 @@ export class YouTube implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await googleApiRequest.call(this, 'GET', `/youtube/v3/search`, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
@@ -1092,7 +1092,7 @@ export class YouTube implements INodeType {
|
||||
responseData = responseData.items;
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ export class Gotify implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await gotifyApiRequest.call(this, 'GET', `/message`, {}, qs);
|
||||
responseData = responseData.messages;
|
||||
}
|
||||
@@ -213,10 +213,9 @@ export class Gotify implements INodeType {
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({json:{ error: error.message }});
|
||||
returnData.push({ json: { error: error.message } });
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
|
||||
@@ -200,7 +200,7 @@ export class Grafana implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
Object.assign(qs, { limit });
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ export class Grafana implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'update') {
|
||||
@@ -407,7 +407,7 @@ export class Grafana implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -450,7 +450,7 @@ export class Grafana implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'update') {
|
||||
|
||||
@@ -223,7 +223,7 @@ export class Grist implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
const { sort, filter } = this.getNodeParameter(
|
||||
|
||||
@@ -289,7 +289,7 @@ export class HackerNews implements INodeType {
|
||||
returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
qs.hitsPerPage = this.getNodeParameter('limit', i) as number;
|
||||
qs.hitsPerPage = this.getNodeParameter('limit', i);
|
||||
}
|
||||
|
||||
endpoint = 'search?';
|
||||
|
||||
@@ -301,7 +301,7 @@ export class HaloPSA implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.count = limit;
|
||||
const { clients } = await haloPSAApiRequest.call(
|
||||
this,
|
||||
@@ -409,7 +409,7 @@ export class HaloPSA implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.count = limit;
|
||||
const { sites } = await haloPSAApiRequest.call(
|
||||
this,
|
||||
@@ -519,7 +519,7 @@ export class HaloPSA implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.count = limit;
|
||||
const { tickets } = await haloPSAApiRequest.call(
|
||||
this,
|
||||
@@ -628,7 +628,7 @@ export class HaloPSA implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.count = limit;
|
||||
const { users } = await haloPSAApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -110,7 +110,7 @@ export async function getAllResource(
|
||||
resource,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as string;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.per_page = limit;
|
||||
responseData = await harvestApiRequest.call(this, requestMethod, qs, endpoint);
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ export class HelpScout implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
this,
|
||||
'_embedded.conversations',
|
||||
@@ -373,7 +373,7 @@ export class HelpScout implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
this,
|
||||
'_embedded.customers',
|
||||
@@ -436,7 +436,7 @@ export class HelpScout implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
this,
|
||||
'_embedded.mailboxes',
|
||||
@@ -544,7 +544,7 @@ export class HelpScout implements INodeType {
|
||||
`/v2/conversations/${conversationId}/threads`,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await helpscoutApiRequestAllItems.call(
|
||||
this,
|
||||
'_embedded.threads',
|
||||
|
||||
@@ -207,7 +207,7 @@ export class HomeAssistant implements INodeType {
|
||||
'/services',
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'call') {
|
||||
@@ -247,7 +247,7 @@ export class HomeAssistant implements INodeType {
|
||||
'/states',
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'get') {
|
||||
@@ -290,7 +290,7 @@ export class HomeAssistant implements INodeType {
|
||||
'/events',
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'create') {
|
||||
@@ -385,7 +385,7 @@ export class HomeAssistant implements INodeType {
|
||||
qs,
|
||||
)) as IDataObject[];
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1363,7 +1363,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', 0) as number;
|
||||
qs.count = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.contacts;
|
||||
}
|
||||
@@ -1398,7 +1398,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', 0) as number;
|
||||
qs.count = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.contacts;
|
||||
}
|
||||
@@ -1458,7 +1458,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
body.limit = this.getNodeParameter('limit', 0) as number;
|
||||
body.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'POST', endpoint, body, qs);
|
||||
responseData = responseData.results;
|
||||
}
|
||||
@@ -1952,7 +1952,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.companies;
|
||||
}
|
||||
@@ -1980,7 +1980,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', 0) as number;
|
||||
qs.count = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.results;
|
||||
}
|
||||
@@ -2006,7 +2006,7 @@ export class Hubspot implements INodeType {
|
||||
body,
|
||||
);
|
||||
} else {
|
||||
body.limit = this.getNodeParameter('limit', 0) as number;
|
||||
body.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'POST', endpoint, body);
|
||||
responseData = responseData.results;
|
||||
}
|
||||
@@ -2190,7 +2190,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.deals;
|
||||
}
|
||||
@@ -2220,7 +2220,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', 0) as number;
|
||||
qs.count = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.results;
|
||||
}
|
||||
@@ -2279,7 +2279,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
body.limit = this.getNodeParameter('limit', 0) as number;
|
||||
body.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'POST', endpoint, body, qs);
|
||||
responseData = responseData.results;
|
||||
}
|
||||
@@ -2365,7 +2365,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.results;
|
||||
}
|
||||
@@ -2593,7 +2593,7 @@ export class Hubspot implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await hubspotApiRequestAllItems.call(
|
||||
this,
|
||||
'objects',
|
||||
|
||||
@@ -321,7 +321,7 @@ export class Hunter implements INodeType {
|
||||
responseData = tempReturnData;
|
||||
}
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
qs.limit = limit;
|
||||
responseData = await hunterApiRequest.call(this, 'GET', '/domain-search', {}, qs);
|
||||
responseData = responseData.data;
|
||||
|
||||
@@ -244,7 +244,7 @@ export class Intercom implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', i) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', i);
|
||||
responseData = await intercomApiRequest.call(this, '/contacts', 'GET', {}, qs);
|
||||
responseData = responseData.contacts;
|
||||
}
|
||||
@@ -419,7 +419,7 @@ export class Intercom implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', i) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', i);
|
||||
responseData = await intercomApiRequest.call(this, '/users', 'GET', {}, qs);
|
||||
responseData = responseData.users;
|
||||
}
|
||||
@@ -543,7 +543,7 @@ export class Intercom implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', i) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', i);
|
||||
responseData = await intercomApiRequest.call(this, '/companies', 'GET', {}, qs);
|
||||
responseData = responseData.companies;
|
||||
}
|
||||
@@ -576,7 +576,7 @@ export class Intercom implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', i) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', i);
|
||||
responseData = await intercomApiRequest.call(
|
||||
this,
|
||||
`/companies/${value}/users`,
|
||||
@@ -599,7 +599,7 @@ export class Intercom implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', i) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', i);
|
||||
responseData = await intercomApiRequest.call(this, '/companies', 'GET', {}, qs);
|
||||
responseData = responseData.users;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ export class InvoiceNinja implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
responseData = await invoiceNinjaApiRequest.call(this, 'GET', '/clients', {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
@@ -539,7 +539,7 @@ export class InvoiceNinja implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
responseData = await invoiceNinjaApiRequest.call(this, 'GET', '/invoices', {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
@@ -632,7 +632,7 @@ export class InvoiceNinja implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
responseData = await invoiceNinjaApiRequest.call(this, 'GET', '/tasks', {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
@@ -704,7 +704,7 @@ export class InvoiceNinja implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
responseData = await invoiceNinjaApiRequest.call(this, 'GET', '/payments', {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
@@ -805,7 +805,7 @@ export class InvoiceNinja implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
responseData = await invoiceNinjaApiRequest.call(this, 'GET', '/expenses', {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
@@ -969,7 +969,7 @@ export class InvoiceNinja implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.per_page = this.getNodeParameter('limit', 0) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', 0);
|
||||
responseData = await invoiceNinjaApiRequest.call(this, 'GET', '/quotes', {}, qs);
|
||||
responseData = responseData.data;
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ export class Jenkins implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
endpoint += `{0,${limit}}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -759,7 +759,7 @@ export class Jira implements INodeType {
|
||||
body,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
body.maxResults = limit;
|
||||
responseData = await jiraSoftwareCloudApiRequest.call(
|
||||
this,
|
||||
@@ -791,7 +791,7 @@ export class Jira implements INodeType {
|
||||
'GET',
|
||||
);
|
||||
} else {
|
||||
qs.maxResults = this.getNodeParameter('limit', i) as number;
|
||||
qs.maxResults = this.getNodeParameter('limit', i);
|
||||
responseData = await jiraSoftwareCloudApiRequest.call(
|
||||
this,
|
||||
`/api/2/issue/${issueKey}/changelog`,
|
||||
@@ -1107,7 +1107,7 @@ export class Jira implements INodeType {
|
||||
);
|
||||
responseData = attachment;
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
responseData = responseData.map((data: IDataObject) => ({ json: data }));
|
||||
@@ -1255,7 +1255,7 @@ export class Jira implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
body.maxResults = limit;
|
||||
responseData = await jiraSoftwareCloudApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -299,7 +299,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/companies', {}, qs);
|
||||
responseData = responseData.companies;
|
||||
}
|
||||
@@ -448,7 +448,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/contacts', {}, qs);
|
||||
responseData = responseData.contacts;
|
||||
}
|
||||
@@ -498,7 +498,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/notes', {}, qs);
|
||||
responseData = responseData.notes;
|
||||
}
|
||||
@@ -559,7 +559,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -629,7 +629,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/orders', {}, qs);
|
||||
responseData = responseData.orders;
|
||||
}
|
||||
@@ -674,7 +674,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/products', {}, qs);
|
||||
responseData = responseData.products;
|
||||
}
|
||||
@@ -716,7 +716,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/emails', {}, qs);
|
||||
responseData = responseData.emails;
|
||||
}
|
||||
@@ -810,7 +810,7 @@ export class Keap implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await keapApiRequest.call(this, 'GET', '/files', {}, qs);
|
||||
responseData = responseData.files;
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ export async function kitemakerRequest(
|
||||
}
|
||||
|
||||
export async function kitemakerRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
this: IExecuteFunctions,
|
||||
body: { query: string; variables: { [key: string]: string } },
|
||||
) {
|
||||
const resource = this.getNodeParameter('resource', 0) as 'space' | 'user' | 'workItem';
|
||||
const [group, items] = getGroupAndItems(resource);
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
const limit = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
const returnData: IDataObject[] = [];
|
||||
let responseData;
|
||||
|
||||
@@ -119,7 +119,7 @@ export class KoBoToolbox implements INodeType {
|
||||
responseData = await koBoToolboxApiRequest.call(this, {
|
||||
url: '/api/v2/assets/',
|
||||
qs: {
|
||||
limit: this.getNodeParameter('limit', i, 1000) as number,
|
||||
limit: this.getNodeParameter('limit', i, 1000),
|
||||
...(formFilterOptions.filter && { q: formFilterOptions.filter }),
|
||||
...(formQueryOptions?.sort?.value?.ordering && {
|
||||
ordering:
|
||||
@@ -148,7 +148,7 @@ export class KoBoToolbox implements INodeType {
|
||||
responseData = await koBoToolboxApiRequest.call(this, {
|
||||
url: `/api/v2/assets/${formId}/data/`,
|
||||
qs: {
|
||||
limit: this.getNodeParameter('limit', i, 1000) as number,
|
||||
limit: this.getNodeParameter('limit', i, 1000),
|
||||
...(filterJson && { query: filterJson }),
|
||||
...(submissionQueryOptions.sort && { sort: submissionQueryOptions.sort }),
|
||||
...(submissionQueryOptions.fields && {
|
||||
@@ -277,7 +277,7 @@ export class KoBoToolbox implements INodeType {
|
||||
responseData = await koBoToolboxApiRequest.call(this, {
|
||||
url: `/api/v2/assets/${formId}/hooks/`,
|
||||
qs: {
|
||||
limit: this.getNodeParameter('limit', i, 1000) as number,
|
||||
limit: this.getNodeParameter('limit', i, 1000),
|
||||
},
|
||||
scroll: this.getNodeParameter('returnAll', i) as boolean,
|
||||
});
|
||||
|
||||
@@ -135,7 +135,7 @@ export class Lemlist implements INodeType {
|
||||
responseData = await lemlistApiRequest.call(this, 'GET', '/activities', {}, qs);
|
||||
|
||||
if (returnAll === false) {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
responseData = responseData.slice(0, limit);
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ export class Lemlist implements INodeType {
|
||||
responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/unsubscribes');
|
||||
} else {
|
||||
const qs = {
|
||||
limit: this.getNodeParameter('limit', i) as number,
|
||||
limit: this.getNodeParameter('limit', i),
|
||||
};
|
||||
responseData = await lemlistApiRequest.call(this, 'GET', '/unsubscribes', {}, qs);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export class Linear implements INodeType {
|
||||
if (returnAll) {
|
||||
responseData = await linearApiRequestAllItems.call(this, 'data.issues', body);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
body.variables.first = limit;
|
||||
responseData = await linearApiRequest.call(this, body);
|
||||
responseData = responseData.data.issues.nodes;
|
||||
|
||||
@@ -446,7 +446,7 @@ export class Magento2 implements INodeType {
|
||||
qs as unknown as IDataObject,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
qs.search_criteria!.page_size = limit;
|
||||
responseData = await magentoApiRequest.call(
|
||||
this,
|
||||
@@ -626,7 +626,7 @@ export class Magento2 implements INodeType {
|
||||
qs as unknown as IDataObject,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
qs.search_criteria!.page_size = limit;
|
||||
responseData = await magentoApiRequest.call(
|
||||
this,
|
||||
@@ -748,7 +748,7 @@ export class Magento2 implements INodeType {
|
||||
qs as unknown as IDataObject,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
qs.search_criteria!.page_size = limit;
|
||||
responseData = await magentoApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -1700,7 +1700,7 @@ export class Mailchimp implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', i) as number;
|
||||
qs.count = this.getNodeParameter('limit', i);
|
||||
responseData = await mailchimpApiRequest.call(
|
||||
this,
|
||||
`/lists/${listId}/interest-categories/${categoryId}/interests`,
|
||||
@@ -1888,7 +1888,7 @@ export class Mailchimp implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', i) as number;
|
||||
qs.count = this.getNodeParameter('limit', i);
|
||||
responseData = await mailchimpApiRequest.call(
|
||||
this,
|
||||
`/lists/${listId}/members`,
|
||||
@@ -2126,7 +2126,7 @@ export class Mailchimp implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.count = this.getNodeParameter('limit', i) as number;
|
||||
qs.count = this.getNodeParameter('limit', i);
|
||||
responseData = await mailchimpApiRequest.call(this, `/campaigns`, 'GET', {}, qs);
|
||||
responseData = responseData.campaigns;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ export class MailerLite implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
|
||||
responseData = await mailerliteApiRequest.call(this, 'GET', `/subscribers`, {}, qs);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export async function marketstackApiRequestAllItems(
|
||||
qs: IDataObject = {},
|
||||
) {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean;
|
||||
const limit = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
let responseData;
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
@@ -157,7 +157,7 @@ export async function handleMatrixCall(
|
||||
from = responseData.end;
|
||||
} while (responseData.chunk.length > 0);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', index) as number;
|
||||
const limit = this.getNodeParameter('limit', index);
|
||||
const qs: IDataObject = {
|
||||
dir: 'b', // GetfallbackText latest messages first - doesn't return anything if we use f without a previous token.
|
||||
limit,
|
||||
|
||||
@@ -11,7 +11,7 @@ export async function members(
|
||||
const channelId = this.getNodeParameter('channelId', index) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', index) as boolean;
|
||||
const resolveData = this.getNodeParameter('resolveData', index) as boolean;
|
||||
const limit = this.getNodeParameter('limit', index, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', index, 0);
|
||||
|
||||
const body = {} as IDataObject;
|
||||
const qs = {} as IDataObject;
|
||||
@@ -19,7 +19,7 @@ export async function members(
|
||||
const endpoint = `channels/${channelId}/members`;
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', index) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', index);
|
||||
}
|
||||
|
||||
let responseData;
|
||||
|
||||
@@ -9,7 +9,7 @@ export async function getAll(
|
||||
index: number,
|
||||
): Promise<INodeExecutionData[]> {
|
||||
const postId = this.getNodeParameter('postId', index) as string;
|
||||
const limit = this.getNodeParameter('limit', 0, 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0, 0);
|
||||
|
||||
const qs = {} as IDataObject;
|
||||
const requestMethod = 'GET';
|
||||
|
||||
@@ -98,7 +98,7 @@ export async function getAll(
|
||||
}
|
||||
|
||||
if (returnAll === false) {
|
||||
qs.per_page = this.getNodeParameter('limit', index) as number;
|
||||
qs.per_page = this.getNodeParameter('limit', index);
|
||||
}
|
||||
|
||||
let responseData;
|
||||
|
||||
@@ -566,7 +566,7 @@ export class Mautic implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
qs.start = 0;
|
||||
responseData = await mauticApiRequest.call(this, 'GET', '/companies', {}, qs);
|
||||
if (responseData.errors) {
|
||||
@@ -853,7 +853,7 @@ export class Mautic implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
qs.start = 0;
|
||||
responseData = await mauticApiRequest.call(this, 'GET', '/contacts', {}, qs);
|
||||
if (responseData.errors) {
|
||||
|
||||
@@ -508,7 +508,7 @@ export class Medium implements INodeType {
|
||||
responseData = responseData.data;
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
const limit = this.getNodeParameter('limit', i);
|
||||
responseData = responseData.splice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ export class MicrosoftDynamicsCrm implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', 0) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', 0);
|
||||
responseData = await microsoftApiRequest.call(this, 'GET', `/accounts`, {}, qs);
|
||||
responseData = responseData.value;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ export class MicrosoftExcel implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -341,7 +341,7 @@ export class MicrosoftExcel implements INodeType {
|
||||
);
|
||||
} else {
|
||||
const rowsQs = { ...qs };
|
||||
rowsQs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
rowsQs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -534,7 +534,7 @@ export class MicrosoftExcel implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -596,7 +596,7 @@ export class MicrosoftExcel implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
|
||||
@@ -501,7 +501,7 @@ export class MicrosoftOutlook implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
||||
responseData = responseData.value;
|
||||
}
|
||||
@@ -862,7 +862,7 @@ export class MicrosoftOutlook implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
||||
responseData = responseData.value;
|
||||
}
|
||||
@@ -990,7 +990,7 @@ export class MicrosoftOutlook implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(this, 'GET', '/mailFolders', {}, qs);
|
||||
responseData = responseData.value;
|
||||
}
|
||||
@@ -1029,7 +1029,7 @@ export class MicrosoftOutlook implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -1104,7 +1104,7 @@ export class MicrosoftOutlook implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
||||
responseData = responseData.value;
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ export class MicrosoftTeams implements INodeType {
|
||||
`/v1.0/teams/${teamId}/channels`,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequestAllItems.call(
|
||||
this,
|
||||
'value',
|
||||
@@ -401,7 +401,7 @@ export class MicrosoftTeams implements INodeType {
|
||||
`/beta/teams/${teamId}/channels/${channelId}/messages`,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequestAllItems.call(
|
||||
this,
|
||||
'value',
|
||||
@@ -454,7 +454,7 @@ export class MicrosoftTeams implements INodeType {
|
||||
`/v1.0/chats/${chatId}/messages`,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequestAllItems.call(
|
||||
this,
|
||||
'value',
|
||||
@@ -545,7 +545,7 @@ export class MicrosoftTeams implements INodeType {
|
||||
`/v1.0/users/${memberId}/planner/tasks`,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequestAllItems.call(
|
||||
this,
|
||||
'value',
|
||||
@@ -566,7 +566,7 @@ export class MicrosoftTeams implements INodeType {
|
||||
`/v1.0/planner/plans/${planId}/tasks`,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequestAllItems.call(
|
||||
this,
|
||||
'value',
|
||||
|
||||
@@ -164,7 +164,7 @@ export class MicrosoftToDo implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -272,7 +272,7 @@ export class MicrosoftToDo implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
@@ -364,7 +364,7 @@ export class MicrosoftToDo implements INodeType {
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs['$top'] = this.getNodeParameter('limit', i) as number;
|
||||
qs['$top'] = this.getNodeParameter('limit', i);
|
||||
responseData = await microsoftApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
|
||||
@@ -72,7 +72,7 @@ export async function mispApiRequestAllItems(this: IExecuteFunctions, endpoint:
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
return responseData.slice(0, limit);
|
||||
}
|
||||
|
||||
|
||||
@@ -603,7 +603,7 @@ export class Misp implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
responseData = responseData.Tag.slice(0, limit);
|
||||
}
|
||||
} else if (operation === 'update') {
|
||||
@@ -720,7 +720,7 @@ export class Misp implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', 0) as number;
|
||||
const limit = this.getNodeParameter('limit', 0);
|
||||
responseData = responseData.Warninglists.slice(0, limit).map((i) => i.Warninglist);
|
||||
} else {
|
||||
responseData = responseData.Warninglists.map((i) => i.Warninglist);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user