n8n-nodes-hudu 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,17 +18,7 @@ async function handleMatcherGetAllOperation(integrationId, filters = {}, returnA
|
|
|
18
18
|
if (filters.company_id !== undefined) {
|
|
19
19
|
queryParams.company_id = Number.parseInt(filters.company_id, 10);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
queryParams.page_size = limit;
|
|
23
|
-
}
|
|
24
|
-
const response = await requestUtils_1.huduApiRequest.call(this, 'GET', '/matchers', undefined, queryParams);
|
|
25
|
-
let matchers = Array.isArray(response)
|
|
26
|
-
? response
|
|
27
|
-
: response.matchers || [];
|
|
28
|
-
if (!returnAll && matchers.length > limit) {
|
|
29
|
-
matchers = matchers.slice(0, limit);
|
|
30
|
-
}
|
|
31
|
-
return matchers;
|
|
21
|
+
return await requestUtils_1.handleListing.call(this, 'GET', '/matchers', 'matchers', {}, queryParams, returnAll, limit);
|
|
32
22
|
}
|
|
33
23
|
exports.handleMatcherGetAllOperation = handleMatcherGetAllOperation;
|
|
34
24
|
//# sourceMappingURL=matchers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/utils/operations/matchers.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/utils/operations/matchers.ts"],"names":[],"mappings":";;;AACA,kDAAgD;AAEzC,KAAK,UAAU,4BAA4B,CAEhD,aAAqB,EACrB,UAAuB,EAAE,EACzB,SAAS,GAAG,KAAK,EACjB,KAAK,GAAG,EAAE;IAEV,MAAM,WAAW,GAAgB;QAC/B,cAAc,EAAE,aAAa;KAC9B,CAAC;IAGF,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;QACjC,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;KACvC;IACD,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;QACjC,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;KACvC;IACD,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE;QACpC,WAAW,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;KAC7C;IACD,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE;QACpC,WAAW,CAAC,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAoB,EAAE,EAAE,CAAC,CAAC;KAC5E;IAGD,OAAO,MAAM,4BAAa,CAAC,IAAI,CAC7B,IAAI,EACJ,KAAK,EACL,WAAW,EACX,UAAU,EACV,EAAE,EACF,WAAW,EACX,SAAS,EACT,KAAK,CACN,CAAC;AACJ,CAAC;AApCD,oEAoCC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
|
2
|
-
import {
|
|
2
|
+
import { handleListing } from '../requestUtils';
|
|
3
3
|
|
|
4
4
|
export async function handleMatcherGetAllOperation(
|
|
5
5
|
this: IExecuteFunctions,
|
|
@@ -25,26 +25,16 @@ export async function handleMatcherGetAllOperation(
|
|
|
25
25
|
if (filters.company_id !== undefined) {
|
|
26
26
|
queryParams.company_id = Number.parseInt(filters.company_id as string, 10);
|
|
27
27
|
}
|
|
28
|
-
if (!returnAll) {
|
|
29
|
-
queryParams.page_size = limit;
|
|
30
|
-
}
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
// Use the shared handleListing function for proper pagination support
|
|
30
|
+
return await handleListing.call(
|
|
33
31
|
this,
|
|
34
32
|
'GET',
|
|
35
33
|
'/matchers',
|
|
36
|
-
|
|
34
|
+
'matchers',
|
|
35
|
+
{},
|
|
37
36
|
queryParams,
|
|
37
|
+
returnAll,
|
|
38
|
+
limit,
|
|
38
39
|
);
|
|
39
|
-
|
|
40
|
-
// Extract the matchers array from the response
|
|
41
|
-
let matchers = Array.isArray(response)
|
|
42
|
-
? response
|
|
43
|
-
: ((response as IDataObject).matchers as IDataObject[]) || [];
|
|
44
|
-
|
|
45
|
-
if (!returnAll && matchers.length > limit) {
|
|
46
|
-
matchers = matchers.slice(0, limit);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return matchers;
|
|
50
40
|
}
|