@joshuanode/n8n-nodes-scalepad 0.0.2 → 0.0.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.
@@ -50,9 +50,6 @@ class ScalePadCoreApi {
50
50
  baseURL: '={{$credentials.environment === "production" ? "https://api.scalepad.com" : "https://api-sandbox.scalepad.com"}}',
51
51
  url: '/core/v1/clients',
52
52
  method: 'GET',
53
- qs: {
54
- limit: 1,
55
- },
56
53
  },
57
54
  };
58
55
  }
@@ -124,7 +124,7 @@ class ScalePadCore {
124
124
  const additionalFields = this.getNodeParameter('additionalFields', i);
125
125
  const qs = {};
126
126
  if (!returnAll) {
127
- qs.limit = this.getNodeParameter('limit', i);
127
+ qs.page_size = this.getNodeParameter('limit', i);
128
128
  }
129
129
  // Handle filters
130
130
  if (additionalFields.filter) {
@@ -172,7 +172,7 @@ class ScalePadCore {
172
172
  const additionalFields = this.getNodeParameter('additionalFields', i);
173
173
  const qs = {};
174
174
  if (!returnAll) {
175
- qs.limit = this.getNodeParameter('limit', i);
175
+ qs.page_size = this.getNodeParameter('limit', i);
176
176
  }
177
177
  if (additionalFields.clientId) {
178
178
  qs['filter[client_id]'] = `eq:${additionalFields.clientId}`;
@@ -204,7 +204,7 @@ class ScalePadCore {
204
204
  const additionalFields = this.getNodeParameter('additionalFields', i);
205
205
  const qs = {};
206
206
  if (!returnAll) {
207
- qs.limit = this.getNodeParameter('limit', i);
207
+ qs.page_size = this.getNodeParameter('limit', i);
208
208
  }
209
209
  if (additionalFields.clientId) {
210
210
  qs['filter[client_id]'] = `eq:${additionalFields.clientId}`;
@@ -239,7 +239,7 @@ class ScalePadCore {
239
239
  const additionalFields = this.getNodeParameter('additionalFields', i);
240
240
  const qs = {};
241
241
  if (!returnAll) {
242
- qs.limit = this.getNodeParameter('limit', i);
242
+ qs.page_size = this.getNodeParameter('limit', i);
243
243
  }
244
244
  if (additionalFields.clientId) {
245
245
  qs['filter[client_id]'] = `eq:${additionalFields.clientId}`;
@@ -290,7 +290,7 @@ class ScalePadCore {
290
290
  const additionalFields = this.getNodeParameter('additionalFields', i);
291
291
  const qs = {};
292
292
  if (!returnAll) {
293
- qs.limit = this.getNodeParameter('limit', i);
293
+ qs.page_size = this.getNodeParameter('limit', i);
294
294
  }
295
295
  // Apply common filters
296
296
  if (additionalFields.clientId) {
@@ -53,13 +53,12 @@ async function scalePadCoreApiRequest(method, endpoint, body = {}, qs = {}) {
53
53
  * Make an authenticated API request to ScalePad Core API with automatic pagination
54
54
  */
55
55
  async function scalePadCoreApiRequestAllItems(method, endpoint, body = {}, qs = {}) {
56
- var _a, _b;
57
56
  const returnData = [];
58
57
  let cursor;
59
58
  let hasMore = true;
60
- // Set default limit if not specified
61
- if (!qs.limit) {
62
- qs.limit = 200; // Maximum allowed by API
59
+ // Set default page size if not specified
60
+ if (!qs.page_size) {
61
+ qs.page_size = 200; // Maximum allowed by API
63
62
  }
64
63
  while (hasMore) {
65
64
  if (cursor) {
@@ -70,7 +69,7 @@ async function scalePadCoreApiRequestAllItems(method, endpoint, body = {}, qs =
70
69
  returnData.push(...response.data);
71
70
  }
72
71
  // Check for cursor-based pagination
73
- cursor = (_b = (_a = response.meta) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.cursor;
72
+ cursor = response.next_cursor;
74
73
  hasMore = !!cursor;
75
74
  // Safety check to prevent infinite loops
76
75
  if (returnData.length > 10000) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joshuanode/n8n-nodes-scalepad",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "n8n community node for ScalePad Core API and Lifecycle Manager",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",