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