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
- if (!returnAll) {
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,kDAAiD;AAE1C,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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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 { huduApiRequest } from '../requestUtils';
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
- const response = await huduApiRequest.call(
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
- undefined,
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-hudu",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "This n8n custom node facilitates integration with Hudu's API.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",